November 27, 2026 Free pentesting academy for Web2 & Web3

Pentesting Cheat Sheets

Searchable, copy-ready command references for authorized penetration tests and smart contract audits.

Quick, copy-ready command references for learning and for authorized, scoped security testing. Search across every sheet, filter by category, and copy any snippet with one click. These are lookup references, not ready-to-run attack payloads — each section links to the full tutorial and official docs.

Use these commands only on systems you own or are explicitly authorized to test. Keep notes and timestamps for your report.

Reconnaissance & Enumeration

First-phase commands you run against systems you own or are authorized to test, to understand what is exposed before anything else. Keep notes and timestamps for your report.

Nmap — quick TCP top-ports sweep
nmap -sV -sC --top-ports 1000 -oA scan_quick TARGET
Nmap — all TCP ports, then service scan the open ones
nmap -p- --min-rate 2000 -oA scan_allports TARGET
nmap -p$(ports) -sV -sC -oA scan_services TARGET
Nmap — safe NSE discovery scripts
nmap -sV --script "default,safe" -oN scan_nse.txt TARGET
Host discovery on a subnet (ping sweep)
nmap -sn 10.0.0.0/24 -oG sweep.txt
DNS: records and zone data
dig +short ANY example.com
dig +short MX example.com
host -t txt example.com
TLS certificate and protocols
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates
HTTP headers (security headers review)
curl -sI https://example.com

Web Application Testing

References for reviewing your own web apps against the OWASP Testing Guide. Use a staging environment and a written scope.

OWASP ZAP — baseline passive scan (Docker)
docker run --rm -t ghcr.io/zaproxy/zaproxy zap-baseline.py -t https://staging.example.com
Nuclei — non-intrusive templates only
nuclei -u https://staging.example.com -etags intrusive,dos,fuzz -severity low,medium,high,critical
Content discovery (ffuf) against your own app
ffuf -u https://staging.example.com/FUZZ -w wordlist.txt -mc 200,204,301,302,401,403
Security headers to verify are present
Content-Security-Policy
Strict-Transport-Security
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Referrer-Policy: strict-origin-when-cross-origin
Secure cookie attributes checklist
Set-Cookie: session=...; Secure; HttpOnly; SameSite=Lax; Path=/

Linux Hardening & Audit

Read-only commands to audit a Linux host you administer: find weak configuration before an attacker does.

System and kernel version
uname -a
cat /etc/os-release
Listening services and owning processes
sudo ss -tulpen
World-writable files and SUID binaries (audit)
find / -xdev -type f -perm -0002 -ls 2>/dev/null
find / -xdev -perm -4000 -type f -ls 2>/dev/null
Sudo rights of the current user
sudo -l
Review scheduled jobs
crontab -l
sudo ls -la /etc/cron.* /etc/cron.d
Automated hardening audit (Lynis)
sudo lynis audit system

Containers & Cloud

Scan container images and infrastructure-as-code for vulnerabilities and misconfigurations in your pipeline.

Trivy — scan a container image
trivy image --severity HIGH,CRITICAL --ignore-unfixed myorg/app:latest
Trivy — scan IaC (Terraform/K8s) and secrets
trivy config .\ntrivy fs --scanners secret,vuln .
Generate an SBOM (CycloneDX)
trivy image --format cyclonedx -o sbom.json myorg/app:latest
Prowler — AWS CIS benchmark (read-only role)
prowler aws --compliance cis_3.0_aws
kube-bench — CIS check for a cluster node
kube-bench run --targets node

Smart Contract Security

Tooling for auditing Solidity contracts you are authorized to review. Run on a copy of the repository.

Slither — static analysis of a project
slither .
Slither — human-readable summary printer
slither . --print human-summary
Surya — contract structure and call graph
surya describe contracts/Token.sol
surya graph contracts/Token.sol | dot -Tpng > graph.png
Mythril — symbolic analysis of one contract
myth analyze contracts/Token.sol --solv 0.8.21
Foundry — build and run tests with gas report
forge build
forge test --gas-report
Foundry — fuzz / invariant run count
forge test --fuzz-runs 10000

Quick Reference Tables

Lookups you reach for constantly during an assessment.

Common ports
20/21 FTP   22 SSH   23 Telnet   25 SMTP
53 DNS   80 HTTP   110 POP3   143 IMAP
389 LDAP   443 HTTPS   445 SMB   3306 MySQL
3389 RDP   5432 Postgres   6379 Redis   27017 MongoDB
HTTP status codes worth noting
200 OK       301/302 Redirect   401 Unauthorized
403 Forbidden   404 Not Found    405 Method Not Allowed
429 Too Many Requests   500 Server Error   502/503 Gateway
Spin up a quick local HTTP server (file transfer in a lab)
python3 -m http.server 8000
Generate a strong random password
openssl rand -base64 24
Hash a file (integrity check)
sha256sum file.bin

Get new tutorials in your inbox

One email when a new guide, cheat sheet or Web3 security write-up is published. No spam, unsubscribe in one click.

By subscribing you accept our Privacy Policy. Unsubscribe anytime.