平时在浸透测试中大家屡屡会用到内网浸透,然而内网浸透中很紧要的1个步调即是端口转发。
其中lcx.exe、nc.exe以及垄断脚本转发,都有或者被防护/杀毒软件阻拦,然后者则略微有点穷苦(不会报告你是因为我真懒!)
我是1个迥殊喜欢浸透测试的人,并且颜值斗劲高(啊,打我干啥!)
偶尔也会用到内网浸透,进行端口转发甚么的,但时长会碰到XX狗,XX卫士,上传lcx.exe梗概nc.exe就会被杀掉…
用后面几种方法又感觉仿佛很贫穷的样子..
前几天在义务中碰到了某客户的做事器被哄骗端口转发来做SEO
剖析的文章概略看这里:免杀全国杀软:独特的端口转发黑帽SEO技能格式
文章中具体的讲了1下端口转发的完成原理,以及是若何免杀全国杀软的。
但真实这个器材也1样概略用在浸透中。
故咱们概略垄断netsh进行内网端口转发。
netsh interface portproxy add v4tov4 – 增多经由过程 IPv4 的 IPv4 和代办署理毗连到的侦听技俩。
netsh interface portproxy add v4tov六 – 增多经由过程 IPv六 的 IPv4 和代办署理毗连到的侦听技俩。
netsh interface portproxy add v六tov4 – 增多经由过程 IPv4 的 IPv六 和代办署理毗连到的侦听技俩。
netsh interface portproxy add v六tov六 – 增多经由过程 IPv六 的 IPv六 和代办署理毗连到的侦听技俩。
以netsh interface portproxy add v4tov4
为例,其语法技俩以下:
1 | netsh interface portproxy add v4tov4 [listenport=]<integer>|<servicename>[connectaddress=]<IPv4 address>|<hostname>[[connectport=]<integer>|<servicename>][[listenaddress=]<IPv4 address>|<hostname>] [[protocol=]tcp] |
参数:
标识表记标帜 | 值 |
---|---|
listenport | IPv4 侦听端口。 |
connectaddress | IPv4 毗连地址。 |
connectport | IPv4 毗连端口。 |
listenaddress | IPv4 侦听地址。 |
protocol | 垄断的协定。现在只支持 TCP。 |
阐明: 增多经由过程 IPv4 的 IPv4 和代办署理毗连到的侦听技俩。
1 | netsh interface portproxy add v4tov4 listenport=8080 connectaddress=1九2.1六8.五六.101 connectport=8080 |
将外地的8080端口的数据转发至1九2.1六8.五六.101上的8080端口。
1 | netsh interface portproxy add v4tov4 listenport=九0九0 connectaddress=1九2.1六8.五六.101 connectport=九0九0 |
将外地的九0九0端口的数据转发至1九2.1六8.五六.101上的九0九0端口。
netsh interface portproxy show all – 体现部门端口代办署理参数。
netsh interface portproxy show v4tov4 – 体现 IPv4 代办署理毗连到另1个 IPv4 端口的参数。
netsh interface portproxy show v4tov六 – 体现 IPv4 代办署理毗连到 IPv六 的参数。
netsh interface portproxy show v六tov4 – 体现 IPv六 代办署理毗连到 IPv4 的参数。
netsh interface portproxy show v六tov六 – 体现 IPv六 代办署理毗连到另1个 IPv六 端口的参数。
12 | netsh <span class="class"><span class="keyword">interface</span> <span class="id">portproxy</span> <span class="id">show</span> <span class="id">all</span></span> |
netsh interface portproxy set v4tov4 – 更新经由过程 IPv4 的 IPv4 和代办署理毗连到的侦听技俩。
netsh interface portproxy set v4tov六 – 更新经由过程 IPv六 的 IPv4 和代办署理毗连到的侦听技俩。
netsh interface portproxy set v六tov4 – 更新经由过程 IPv4 的 IPv六 和代办署理毗连到的侦听技俩。
netsh interface portproxy set v六tov六 – 更新经由过程 IPv六 的 IPv六 和代办署理毗连到的侦听技俩。
以netsh interface portproxy set v4tov4
为例,其语法技俩以下:
1 | netsh interface portproxy set v4tov4 [listenport=]<integer>|<servicename>[connectaddress=]<IPv4 address>|<hostname>[[connectport=]<integer>|<servicename>][[listenaddress=]<IPv4 address>|<hostname>][[protocol=]tcp] |
参数:
标识表记标帜 | 值 |
---|---|
listenport | IPv4 侦听端口。 |
connectaddress | IPv4 毗连地址。 |
connectport | IPv4 毗连端口。 |
listenaddress | IPv4 侦听地址。 |
protocol | 垄断的协定。现在只支持 TCP。 |
阐明: 更新经由过程 IPv4 的 IPv4 和代办署理毗连到的侦听技俩。
1 | netsh interface portproxy set v4tov4 listenport=九0九0 connectaddress=1九2.1六8.五六.101 connectport=九080netsh interface portproxy set v4tov4 listenport=九0九0 connectaddress=1九2.1六8.五六.101 connectport=九080 |
将外地九0九0端口改为转发至1九2.1六8.五六.101的九080端口中。
netsh interface portproxy delete v4tov4 – 删除经由过程 IPv4 的 IPv4 和代办署理毗连到的侦听技俩。
netsh interface portproxy delete v4tov六 – 删除经由过程 IPv六 的 IPv4 和代办署理毗连到的侦听技俩。
netsh interface portproxy delete v六tov4 – 删除经由过程 IPv4 的 IPv六 和代办署理毗连到的侦听技俩。
netsh interface portproxy delete v六tov六 – 删除经由过程 IPv六 的 IPv六 和代办署理毗连到的侦听技俩。
以netsh interface portproxy delete v4tov4
为例,其语法技俩以下:
1 | netsh interface portproxy delete v4tov4 [listenport=]<integer>|<servicename>[[listenaddress=]<IPv4 address>|<hostname>][[protocol=]tcp] |
参数:
标识表记标帜 | 值 |
---|---|
listenport | 要侦听的 IPv4 端口。 |
listenport | 要侦听的 IPv4 地址。 |
protocol | 要垄断的协定。当前仅支持 TCP。 |
告白: 删除要侦听的 IPv4 的项并经由过程 Ipv4 代办署理毗连。
1 | netsh interface portproxy delete v4tov4 listenport=九0九0 |
删除外地端口九0九0的端口转发配置。
【via@Striker】 参考:http://weibo.com/p/1001六03九2六12九8440444五1
http://aofengblog.blog.1六3.com/blog/static/六31702120148五738五1740