Back to exam

PT1-002 Cheatsheet

CompTIA PenTest+ Certification Exam

Download free PDF

Planning and scoping

Authorization and engagement documents

  • **Written authorization** identifies the asset owner, approved targets and permitted activities. Client ownership of an application does not automatically authorize testing its hosting provider or partners.
  • **SOW** defines work, deliverables, responsibilities and schedule. **MSA** sets the broader commercial relationship; **NDA** protects confidential information; **ROE** defines operational testing boundaries.
  • **Rules of engagement** specify test windows, source addresses, allowed techniques, exclusions, stop conditions and escalation contacts. Explicitly agree on physical access, social engineering, denial of service and persistence.
  • **Readiness checks** confirm connectivity, working accounts, required privileges, backups and emergency contacts before the test window. Carry authorization documents during physical assessments.

Safety, cloud ownership and third parties

  • **Hot sites and failover systems** can depend on shared infrastructure or third-party services. Map those dependencies and obtain the necessary permissions before testing continuity defenses.
  • **SCADA, PLCs and cyber-physical systems** can affect machinery, doors and human safety. Coordinate with operators; prefer controlled lab validation and explicitly approved low-impact methods.
  • **Industrial protocols** may lack strong authentication or command-origin validation. Never assume a controller is isolated, rejects injected commands or tolerates ordinary IT vulnerability scans.
  • **Cloud testing** must respect provider policy, account boundaries and shared responsibility. Authorize subcontractors and assess their confidentiality, exploit-handling and safety practices.

Communication, ethics and stop conditions

  • **Deconfliction** correlates alerts with tester activity through agreed contacts, source IPs and timestamps. Sinkholing or blocking may explain a sudden loss of access; coordinate before changing tactics.
  • **Prior compromise, malware or suspected fraud** triggers the agreed stop and escalation process. Notify the designated contact promptly and preserve relevant evidence without expanding into unauthorized investigation.
  • **Confidentiality** covers inventories, diagrams, credentials and findings. Share only with authorized recipients; public exploit disclosure or posting client details requires explicit authorization.
  • **Truthful reporting** includes critical findings even when inconvenient. Keep testing within scope and document limitations, blocked access and approved changes.

Methodologies and assessment types

  • **PTES** connects pre-engagement, intelligence gathering, threat modeling, vulnerability analysis, exploitation, post-exploitation and reporting.
  • **NIST SP 800-115** guides technical security assessment; **OWASP WSTG** organizes web testing; **OSSTMM** provides an operational security testing methodology.
  • **MITRE ATT&CK** organizes adversary tactics and techniques with associated mitigations. **OWASP Top 10** highlights major web application risk categories; it is not an exhaustive test checklist.
  • **Vulnerability scans** identify suspected weaknesses; **penetration tests** validate attack paths and impact; **red teams** emulate adversaries against defined objectives. Compliance scan and penetration-test cadences are separate requirements.

Information gathering and vulnerability scanning

Passive reconnaissance and web discovery

  • **Passive reconnaissance** uses existing third-party information such as search engines, public records, social profiles, WHOIS and Shodan. Results may be stale or incomplete.
  • **Active reconnaissance** contacts the target: crawling, directory enumeration, DNS queries, zone-transfer attempts and port scans. Low traffic does not make an activity passive.
  • **Shodan** indexes exposed services and banners. Combine organization, address and service clues, then confirm ownership and actual authentication behavior within scope.
  • **robots.txt**, source code, readme files and headers reveal paths and technologies but do not enforce access control. **DIRB/DirBuster** enumerate content; **WPScan** focuses on WordPress.
  • **Content discovery** compares status codes, body sizes and response content. Repeated identical responses can be soft errors; a 200 response alone does not prove a useful page exists.

Nmap discovery and scan selection

  • **-sn** performs host discovery without a port scan; **-Pn** skips discovery and treats targets as online. **-PS**, **-PA** and **-PU** select TCP SYN, TCP ACK and UDP discovery probes.
  • **-sS** performs a TCP SYN scan; **-sT** uses full TCP connections; **-sU** scans UDP. Discovery probe options do not replace a service port scan.
  • **-p** selects ports; **-p-** covers TCP ports 1 through 65535 in a TCP scan; **-F** scans a smaller common-port set. Keep target ranges and protocols explicit.
  • **-sV** probes service versions; **-O** estimates the OS; **-A** enables OS detection, version detection, default scripts and traceroute. Review noise and script behavior before use.
  • **-oA** writes normal, XML and grepable output. Prefer structured output for automation. Timing templates and fragmentation alter traffic but cannot guarantee evasion of monitoring.

Interpret results and validate findings

  • **Open** means a service accepts traffic; **closed** means the host responds but no service is listening; **filtered** means filtering prevents a clear decision. UDP **open|filtered** often reflects no response.
  • **OS fingerprints, TTLs and banners** are clues rather than proof. Hops change TTL, banners can mislead, and patches may be backported without an obvious upstream version change.
  • **Authenticated scans** inspect local configuration and patch state with approved credentials. Use sufficient platform-specific privileges, verify successful authentication and protect the account.
  • **Nessus/OpenVAS** identify potential vulnerabilities. Correlate service, version, configuration and vendor advisories; use approved, controlled validation to distinguish true findings from false positives.
  • **CVE** identifies a published vulnerability; **CVSS** describes technical severity. Applicability, exploitability, asset value and compensating controls determine practical priority.

Service enumeration and exposed management

  • **DNS** commonly uses port 53; **SNMP** uses UDP 161 and traps commonly use UDP 162; **NetBIOS** commonly uses UDP 137/138 and TCP 139. **SMB** commonly uses TCP 445.
  • **SMTP VRFY/EXPN** may reveal users or list membership; recipient handling can also leak accounts. **Open relay** testing checks whether unauthorized senders can relay mail.
  • **Anonymous FTP** may expose files or writable directories. FTP credentials are cleartext without transport protection; capture analysis can demonstrate exposure in an authorized on-path test.
  • **SMB shares, RPC and RDP** expose different attack surfaces. Check share permissions, guest access, authentication and management reachability rather than inferring a vulnerability from a port alone.
  • **Management isolation** separates administrative interfaces from ordinary production traffic. Prefer a restricted management network, strong authentication and encrypted protocols.

Attacks, exploits and post-exploitation

Layer 2, DNS and availability attacks

  • **ARP poisoning** inserts false IP-to-MAC mappings to redirect local traffic. One MAC mapped to multiple IPs is a lead, not conclusive proof; validate against topology, captures and legitimate proxy ARP.
  • **VLAN double tagging** nests 802.1Q tags and can cross a boundary under vulnerable native-VLAN conditions. Restrict trunks, disable automatic trunk negotiation and avoid user access on the native VLAN.
  • **DNS spoofing** supplies a forged answer when an attacker can influence resolution. Match response identifiers and question context; validate through trusted resolution and supported integrity controls.
  • **Smurf** abuses ICMP amplification; **Fraggle** is associated with UDP amplification. **Slowloris** holds HTTP connections with incomplete requests. Rate limits, timeouts and anti-spoofing reduce distinct risks.

Wireless and social engineering

  • **Evil twins** mimic trusted wireless networks. Deauthentication can disrupt associations and encourage reconnection; protected management frames and server-certificate validation reduce relevant risks.
  • **Aircrack-ng** supports wireless capture and assessment; **Wifite** automates wireless workflows; **Kismet** supports wireless discovery and monitoring. Validate wireless IDS alerts against authorized test events.
  • **Phishing** solicits actions or secrets through deceptive messages; **spear phishing** targets a person or role. Recurring awareness training, phishing-resistant MFA and filtering provide complementary defenses.
  • **Baiting** offers enticing media or gifts; **tailgating** follows an authorized entrant; **shoulder surfing** observes secrets; **dumpster diving** retrieves discarded information. Use physical access controls and secure disposal.

Injection and unsafe input handling

  • **SQL injection** occurs when untrusted data changes query structure. Quotes, database errors and UNION behavior can be clues; use parameterized queries and appropriately constrained database privileges.
  • **Command injection** sends untrusted input to an operating-system command interpreter. Prefer safe APIs and fixed arguments; apply allowlist validation when external input must select permitted actions.
  • **HTTP parameter pollution** supplies repeated parameter names whose values may be handled differently by proxies, filters and applications. Reject ambiguity and normalize input consistently.
  • **Shellshock** is a Bash function-import parsing vulnerability that can be exposed through environment variables in affected integrations. Patch affected components and remove unnecessary interpreter exposure.
  • **WAFs** can reduce exposure but do not repair unsafe code. Input validation, parameterization and output encoding solve different problems; Base64 is encoding, not a security boundary.

Browser, session and file boundaries

  • **XSS** executes attacker-controlled script in a trusted origin. Use context-specific output encoding, safe DOM APIs and defense-in-depth content security policy.
  • **CSRF** induces a browser to send an unwanted authenticated request. Use anti-CSRF tokens, appropriate SameSite cookies and origin checks; enforce authorization on the server.
  • **Session hijacking** abuses a valid session identifier. Use unpredictable tokens, rotation after authentication, expiration and invalidation; set **Secure**, **HttpOnly** and appropriate **SameSite** cookie attributes.
  • **Clickjacking** tricks users into interacting with framed content. Restrict framing with CSP **frame-ancestors** and suitable legacy X-Frame-Options where needed.
  • **Directory traversal** escapes an intended file boundary; **LFI/RFI** include local or remote resources. Canonicalize paths, constrain permitted resources, restrict writes and prevent uploads from executing.
  • **TLS** protects transport when certificate trust and hostname validation succeed. HTTP Basic authentication encodes credentials with Base64 and needs TLS to protect them in transit.

Cloud identity and shared infrastructure

  • **SSRF** makes a server issue attacker-influenced requests, potentially reaching internal services or instance metadata. Restrict destinations, redirects and egress; use supported hardened metadata access.
  • **Instance-role credentials** authorize API actions according to attached permissions. Minimize those permissions and protect temporary credentials; metadata exposure can turn a web flaw into cloud access.
  • **IAM enumeration** identifies effective permissions; **privilege escalation** seeks a path to greater rights. Policy conditions, resource policies and explicit denies matter as well as attached role policies.
  • **Malicious workloads or images** threaten cloud integrity. Restrict image provenance and deployment rights; isolate tenants and workloads. **Side channels** exploit shared-resource behavior to infer information.

Passwords and authentication material

  • **Online guessing** interacts with a service and can trigger lockouts; **password spraying** tries a few likely passwords across many accounts. **Offline cracking** tests acquired hashes without contacting the login service.
  • **Hydra** supports online authentication testing; **John the Ripper** supports offline password auditing; **crunch** generates candidate lists. Avoid choosing a workflow before identifying the authentication material.
  • **unshadow** combines passwd and shadow information for compatible offline auditing. Restrict access to password databases and protect captured credentials as sensitive evidence.
  • **Rainbow tables** precompute hash-to-password relationships and are most useful against unsalted hashes. Unique salts defeat reuse of the same table; slow password KDFs such as bcrypt or PBKDF2 add cost.
  • **Responder** can exploit local name-resolution behavior to capture challenge-response material. NTLM challenge responses differ from raw password hashes; signing, reduced legacy name resolution and stronger authentication reduce attack paths.

Host permissions and privilege escalation

  • **Windows service permissions** can allow modification of service configuration or executable paths. AccessChk helps inspect rights; distinguish permission to query, start, stop, change configuration and replace files.
  • **Unquoted service paths** are dangerous when path parsing and writable intermediate locations enable execution. Quote executable paths and restrict write permissions on service binaries and directories.
  • **SUID** executes a program with the file owner's effective identity; **SGID** affects group identity. Review root-owned SUID executables with a command such as `find / -user root -perm -4000 -type f 2>/dev/null`.
  • **id** and **whoami** reveal execution context. Distinguish obtaining a shell, escalating privileges and moving laterally; each needs its own evidence and authorization.

Persistence, movement and cleanup

  • **Windows scheduled tasks** and services can trigger execution at startup or on a schedule. **Linux systemd services** and cron can provide execution across reboots when configured and enabled appropriately.
  • **WMI** supports Windows management and process creation. **NTFS alternate data streams** attach additional named streams to files; storage in a stream does not itself guarantee execution or persistence.
  • **Reverse shells** connect from the target to a listener; **bind shells** listen on the target. Firewalls, routing and process context affect reachability and privilege.
  • **Post-engagement cleanup** removes tester-created payloads, accounts, tasks, services and configuration changes, then verifies restoration with the client. Stop test processes before deleting their files.
  • **History clearing and timestamp manipulation** can conceal activity. They are distinct from restoring the environment; preserve agreed evidence and perform only authorized cleanup.

Reporting and communication

Useful findings and remediation

  • **Technical findings** identify affected assets, vulnerability, preconditions, evidence, reproducible validation, impact and remediation. Include relevant identifiers and distinguish confirmed issues from unvalidated scanner output.
  • **Executive summaries** explain business exposure and priorities. **Developer reports** include affected code context and safe design changes; **administrator guidance** specifies actionable configuration or patch steps.
  • **Risk prioritization** combines technical severity with business impact and exposure. Record limitations, compensating controls and uncertainty; a tool name or CVSS number alone is insufficient.
  • **Remediation** addresses root causes: patch management for vulnerable components, restricted management access, corrected permissions, safer input handling and removal of embedded secrets.
  • **Insider-fraud controls** include separation of duties, independent approvals, audit review, job rotation and mandatory vacations. MFA protects authentication but does not alone prevent misuse of legitimately granted rights.

Evidence protection and secure delivery

  • **Data minimization** collects enough evidence to prove impact without unnecessarily copying sensitive records. Restrict access and record evidence context, integrity and handling.
  • **Encrypted delivery** uses approved secure channels and verified recipients. **S/MIME** supports email encryption and signing; signing alone does not provide confidentiality.
  • **DNSSEC** authenticates DNS data rather than encrypting email or DNS traffic. **FTPS** protects FTP with TLS; select controls according to the actual transport and recipients.
  • **Retention and destruction** follow the agreement after handover. Remove authorized working copies, credentials and temporary stores as required; retain only explicitly permitted records.

Validation and engagement closeout

  • **Peer review and client review** improve report accuracy and confirm affected assets and business context. Resolve false positives using evidence rather than accepting scanner labels.
  • **Final delivery and sign-off** record the agreed results and acceptance. Assign remediation owners and priorities, then schedule follow-up validation according to the engagement.
  • **Retesting** confirms that fixes close the original path and do not introduce obvious regressions. Document residual exposure and changes in scope.
  • **Lessons learned** examine access delays, communication, deconfliction, safety and process failures to improve future assessments.

Tools and code analysis

Match tools to the task

  • **Burp Suite/OWASP ZAP** intercept and test web traffic; **sqlmap** focuses on SQL injection. Select a tool for the observed vulnerability and authorized test objective.
  • **Wireshark/tcpdump** capture and analyze packets. **Scapy** builds and manipulates packets programmatically; **hping3** generates crafted probes. Capture tools do not by themselves forge protocol responses.
  • **Netcat/Socat** support network connections, listeners and relays. **curl** sends requests; `curl -I example.test` requests HTTP headers with HEAD.
  • **Impacket** provides Python implementations and classes for network protocols. **Pacu** supports AWS security assessment workflows, including IAM permission analysis.
  • **Nmap NSE** uses Lua for scripted interactions. A custom protocol test may need a full connection, ordered messages, response parsing and timeouts rather than a generic vulnerability scan.

Read scripts and recognize behavior

  • **#!/bin/bash** is a shebang selecting an interpreter on supported systems. Read variables, loops, conditions, function calls and exit paths to determine actual behavior.
  • **Python increment** uses `val += 1` or `val = val + 1`; Python has no C-style increment operator. **Concatenation** joins strings or compatible sequences.
  • **Socket code** that iterates addresses and attempts connections may discover hosts or ports. A listener accepts incoming connections; packet-generation loops can instead create disruptive traffic.
  • **Shell redirection** sends output to files or streams: `>` overwrites, `>>` appends and `2>/dev/null` discards standard error. Pipelines pass output between commands; inspect each stage before interpreting results.
  • **Temporary file serving** exposes the selected directory. Python 3 provides `python -m http.server 9891`; restrict the directory, bind address and access, then stop the server after authorized transfer.

Application code, binaries and dependencies

  • **SAST** analyzes code without executing the application; **DAST** tests running behavior. **Fuzzing** sends unexpected input to expose parsing, validation and memory-safety faults.
  • **Reverse engineering** examines compiled binaries through disassembly, decompilation and debugging. Match the tool to architecture and executable format; older x86 debuggers do not imply native x64 support.
  • **Unsafe casts, buffer errors and race conditions** require code and runtime context. A banner or generic risk category cannot establish a specific memory-corruption vulnerability.
  • **Software composition analysis** inventories third-party components and detects known vulnerable dependencies. Assess provenance, maintenance, licensing and update paths; public source availability alone is not a vulnerability.
  • **Dependency checks in CI/CD** catch vulnerable modules repeatedly included in otherwise sound applications. Maintain an inventory and test updates; first-party static analysis alone does not replace dependency review.