流量操作技术 Traffic manipulation technique 渗透测试中经常遇到访问受限的网络环境 使用隐蔽的手段逃避安全监测措施和溯源追踪 证明看似严格的访问控制仍然存在弱点 在非受信任的网络中实现安全的数据传输 部分概念的实现过程略有烧脑 |
流量操作技术 重定向(Redirection) - IP、Port 隧道(Tunneling) - 在不受信任的网络环境中实现安全的通信 - 通常使用多种加密技术建立通信隧道 - 点到点(IP2IP)、端到端(Port2Port)隧道 - VPN: pptp、12tp、IPSec、SSL vpn 封装(encapsulation) - 通常结合在隧道中使用,使用一种协议封装一种协议(RPC o http、VoIP) - 使用网关设备实现不同类型网络的互联互通 |
重定向 Rinetd - 安装:apt-get install rinetd - 配置:/etc/rinetd.conf bindadd bindport connectadd connectport - 运行:rinetd 应用场景 - 重定向web流量,图片上网限制 - 远程桌面重定向 - Nc重定向获得shell - 不兼容FTP等二次连接的协议 安装monowall防火墙 |
**** This is mOnOwall, version 1.8.1
built on Web Jan 15 13:32:38 GET 2014 for generic-pc
Copyright (C) 2002-2014 by Manuel Kasper. All rights reserved.
Visit http://mOnO.ch/wall for updates.
LAN IP address: 192.168.1.1
WAN IP address: (unknown)
Port configuration:
LAN -> em0
WLAn -> em1
mOnOwall console setup
*********************
1) Interfaces: assign network ports
2) Set up LAN IP address
3) Reset webGUI password
4) Reset to factory defaults
5) Reboot system
6) Ping host
7) Install on Hard Drive
Enter a number: 7
Enter disks are:
ad0 VBOX HARDDISK 1.0 8.00 GB
Enter the device name you wish to install onto: ad0
************************************************************************************
* WARNING! *
* m0n0wall is about to be installed onto the ad0 device. *
* - everything on this device will be erased! *
* - this cannot be undone! *
************************************************************************************
The firewall will reboot after installation.
Do you want to proceed? (y/n) y
Installing... done
Copying configuration... done
------------------------------------------------------------------------------------
*** This is mOnOwall, version 1.8.1
built on Web Jan 15 13:32:38 GET 2014 for generic-pc
Copyright (C) 2002-2014 by Manuel Kasper. All rights reserved.
Visit http://mOnO.ch/wall for updates.
LAN IP address: 192.168.1.1
WAN IP address: (unknown)
Port configuration:
LAN -> em0
WLAn -> em1
mOnOwall console setup
*********************
1) Interfaces: assign network ports
2) Set up LAN IP address
3) Reset webGUI password
4) Reset to factory defaults
5) Reboot system
6) Ping host
7) Install on Hard Drive
Enter a number: 1
Valid interfaces are:
em0 08:00:27:ed:e5:3c (up) Intel(R) PRO/1000 Legacy Network Connect...
em1 08:00:27:2c:11:c8 (up) Intel(R) PRO/1000 Legacy Network Connect...
Note that wireless LAN interfaces are not included in the list above:
they can be set up through the webGUI Later on.
Do you want to set up VLANS first?
If you're not going to use VLANs, or only for optional interfaces, you
should say no here and use the webGUI to configure VLANs later, if required.
Do you want to set up VLANs now? (y/n)n
If you don't know the names of your interfaces, you may choose the use
auto-detection. In that case, disconnect all interfaces before you begin,
and reconnect each one when prompted to do so.
Enter the LAN interface name or 'a' for auto-detection: em0
Enter the LAN interface name or 'a' for auto-detection: em1
Enter the Optional 1 interface name 'a' for auto-detection
(or nothing if finished):
The interfaces will be assigned as follows:
LAN -> em0
WAN -> em1
The firewall will reboot after sving the changes.
Do you want to proceed? (y/n) y
The firewall is rebooting now.
------------------------------------------------------------------------------------
*** This is mOnOwall, version 1.8.1
built on Web Jan 15 13:32:38 GET 2014 for generic-pc
Copyright (C) 2002-2014 by Manuel Kasper. All rights reserved.
Visit http://mOnO.ch/wall for updates.
LAN IP address: 192.168.1.1
WAN IP address: (unknown)
Port configuration:
LAN -> em0
WLAn -> em1
mOnOwall console setup
*********************
1) Interfaces: assign network ports
2) Set up LAN IP address
3) Reset webGUI password
4) Reset to factory defaults
5) Reboot system
6) Ping host
7) Install on Hard Drive
Enter a number: 2
Enter the new LAN IP address: 1.1.1.1
Subnet masks are entered as bit counts (as in CIDR notation) in mOnOwall.
e.g. 255.255.255.0 = 24
255.255.0.0 = 16
255.0.0.0 = 8
Enter the new LAN subnet bit count: 24
Do you want to enable the DHCP server on LAN? (y/n) y
Enter the star address of the client address range: 1.1.1.10
Enter the end address of the client address range: 1.1.1.100
The LAN IP address has been set to 1.1.1.1/24
You can now access the webGUI by opening the following URL
in you browser:
http://1.1.1.1/
Press ENTER to continue.
------------------------------------------------------------------------------------
*** This is mOnOwall, version 1.8.1
built on Web Jan 15 13:32:38 GET 2014 for generic-pc
Copyright (C) 2002-2014 by Manuel Kasper. All rights reserved.
Visit http://mOnO.ch/wall for updates.
LAN IP address: 192.168.1.1
WAN IP address: (unknown)
Port configuration:
LAN -> em0
WLAn -> em1
mOnOwall console setup
*********************
1) Interfaces: assign network ports
2) Set up LAN IP address
3) Reset webGUI password
4) Reset to factory defaults
5) Reboot system
6) Ping host
7) Install on Hard Drive
Enter a number: 3
The webGUI password will be reset to the default (which is 'mono').
Do you want to proceed? (y/n) y
The password for the webGUI has been reset.
Remember to set the password to something else than
the default as soon as you have logged into the webGUI
Press ENTER to continue.
------------------------------------------------------------------------------------
*** This is mOnOwall, version 1.8.1
built on Web Jan 15 13:32:38 GET 2014 for generic-pc
Copyright (C) 2002-2014 by Manuel Kasper. All rights reserved.
Visit http://mOnO.ch/wall for updates.
LAN IP address: 192.168.1.1
WAN IP address: (unknown)
Port configuration:
LAN -> em0
WLAn -> em1
mOnOwall console setup
*********************
1) Interfaces: assign network ports
2) Set up LAN IP address
3) Reset webGUI password
4) Reset to factory defaults
5) Reboot system
6) Ping host
7) Install on Hard Drive
Enter a number: 5
The firewal will reboot. This may take one minute.
Do you want to proceed? (y/n) y
The firewall is rebooting now.
------------------------------------------------------------------------------------
http://1.1.1.1/
admin
mono
root@k:~# apt-get instal rinetd
root@k:~# cat /etc/rinetd.conf
root@k:~# vi /etc/rinetd.conf
# bindadress bindport connectaddress connectport
192.168.1.110 53 192.168.1.124 80
root@k:~# rinetd //启动
root@k:~# ps aux | grep rinetd
root 3205 0.0 0.0 4208 1328 ? Ss 20:59 0:00 /usr/sbin/rinetd
root 3645 0.0 0.0 6328 1656 ? Ss 21:02 0:00 rinetd
root 3648 0.0 0.0 12680 1736 pts/0 Ss 21:02 0:00 grep rinetd
root@k:~# netstat -pantu | grep :53
tcp 0 0 192.168.1.111:53 0.0.0.0:* LISTEN 3645/rinetd
root@k:~# vi /etc/rinetd.conf
# bindadress bindport connectaddress connectport
192.168.1.110 53 192.168.1.124 3389
root@k:~# pkill rinetd
root@k:~# rinetd
root@k:~# netstat -pantu | grep :53
tcp 0 0 192.168.1.111:53 0.0.0.0:* LISTEN 3706/rinetd
开始----->运行----->mstsc(打开远程桌面连接工具)
root@k:~# cp /usr/share/windows.binaries/nc.exe /media/sf_D_DRIVE/
C:\Documents and Settings/Administrator>cd\
C:\dir
C:\nc -nvlp 333
listening on [any] 333 ...
root@k:~# vi /etc/rinetd.conf
# bindadress bindport connectaddress connectport
192.168.1.110 53 192.168.1.124 333
root@k:~# pkill rinetd
root@k:~# rinetd