La interfaz está localizada; las descripciones y documentos de las Skills se traducen automáticamente con IA a su idioma. El código, los comandos, rutas y términos técnicos se mantienen en el original, y prevalece el documento del autor.
Explorar Skills
Desarrollo · SKILL.md

pen-test-plan

pen-test-plan

Plan penetration testing engagements: scope definition, methodology selection (OWASP, PTES), rules of engagement, testing phases, reporting format, and remediation tracking. TRIGGER when: user says /pen-test-plan, asks about planning a penetration test, needs help defining pentest scope, or wants to structure a security testing engagement.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentación de la Skill

GitHub

name: pen-test-plan description: > Plan penetration testing engagements: scope definition, methodology selection (OWASP, PTES), rules of engagement, testing phases, reporting format, and remediation tracking. TRIGGER when: user says /pen-test-plan, asks about planning a penetration test, needs help defining pentest scope, or wants to structure a security testing engagement. argument-hint: "[target application, system, or engagement scope]" user-invocable: true

Penetration Test Planning

You are a senior security engineer planning a structured penetration testing engagement. Produce a comprehensive test plan that defines scope, methodology, rules of engagement, testing phases, and reporting standards to ensure thorough and professional security testing.

Process

Step 1: Define Engagement Scope

Establish clear boundaries for what will and will not be tested.

  • What systems, applications, or networks are in scope?
  • What environments will be tested (production, staging, dedicated test)?
  • What is the engagement type (black-box, grey-box, white-box)?
  • What is the testing window and timezone?
  • Are there any systems or actions explicitly out of scope?

Scope definition template:

Scope ElementIn ScopeOut of Scope
Applicationse.g., api.example.com, app.example.come.g., legacy.example.com (EOL system)
Networkse.g., 10.0.1.0/24, external perimetere.g., 10.0.99.0/24 (third-party managed)
Cloud accountse.g., AWS account 123456789012e.g., shared services account
User rolese.g., anonymous, authenticated user, admine.g., super-admin (break-glass only)
Attack typese.g., injection, auth bypass, privilege escalatione.g., physical access, social engineering, DDoS

Engagement type comparison:

TypeTester KnowledgeRealismCoverageTypical Duration
Black-boxNo internal knowledge, external attacker perspectiveHighestLowest (may miss internal paths)2-4 weeks
Grey-boxCredentials, API docs, architecture diagrams providedMediumMedium (balances realism and coverage)1-3 weeks
White-boxFull source code, infrastructure access, documentationLowestHighest (most thorough)2-5 weeks

Step 2: Select Methodology

Choose and tailor the testing methodology based on the target and engagement type.

Methodology selection guide:

MethodologyBest ForKey PhasesStandard Reference
OWASP Testing GuideWeb applications, APIsInformation gathering, configuration testing, authentication, authorization, input validation, business logic, client-sideOWASP WSTG v4.2
PTES (Penetration Testing Execution Standard)Full-scope engagements (network + application)Pre-engagement, intelligence gathering, threat modeling, vulnerability analysis, exploitation, post-exploitation, reportingptes.org
OWASP Mobile Testing GuideiOS and Android applicationsArchitecture, data storage, cryptography, authentication, network communication, platform interaction, code qualityOWASP MASTG
NIST SP 800-115Government and regulated environmentsPlanning, discovery, attack, reportingNIST 800-115
CIS BenchmarksInfrastructure and configuration reviewBenchmark comparison against hardening standardsCIS

OWASP Top 10 coverage checklist (for web application tests):

  • A01: Broken Access Control (IDOR, privilege escalation, forced browsing)
  • A02: Cryptographic Failures (weak TLS, plaintext secrets, poor key management)
  • A03: Injection (SQLi, NoSQLi, OS command, LDAP, XPath)
  • A04: Insecure Design (business logic flaws, missing threat modeling)
  • A05: Security Misconfiguration (default creds, verbose errors, unnecessary features)
  • A06: Vulnerable and Outdated Components (known CVEs, unpatched libraries)
  • A07: Identification and Authentication Failures (brute force, weak passwords, session issues)
  • A08: Software and Data Integrity Failures (insecure deserialization, unsigned updates)
  • A09: Security Logging and Monitoring Failures (missing audit trails, no alerting)
  • A10: Server-Side Request Forgery (SSRF to internal services, cloud metadata)

Step 3: Establish Rules of Engagement

Define the operational boundaries and communication protocols for the engagement.

Rules of engagement document:

RuleDefinition
Testing windowe.g., Mon-Fri 09:00-17:00 UTC, or 24/7 for production-like staging
Notification contactsPrimary: name, phone, email; Secondary: name, phone, email
Emergency stop procedureTester calls primary contact immediately; cease all testing; preserve evidence
Allowed actionsVulnerability scanning, manual exploitation, credential stuffing (test accounts only), privilege escalation
Prohibited actionsDenial of service, data destruction, social engineering of employees, modification of production data, accessing real customer data
Data handlingAll findings encrypted at rest; shared via secure channel only; destroyed 90 days post-engagement
Third-party systemsDo not test third-party SaaS without written authorization; report any unintentional access immediately
Credential usageUse only provided test accounts; do not create unauthorized accounts; report any real credentials discovered

Legal and authorization checklist:

  • Written authorization signed by system owner with legal authority
  • Scope document reviewed and signed by both parties
  • Cloud provider notification completed (AWS penetration testing policy, etc.)
  • Third-party authorization obtained for any shared infrastructure
  • Non-disclosure agreement (NDA) executed
  • Liability and indemnification clauses reviewed by legal
  • Data processing agreement in place if tester will access personal data
  • Insurance verification (professional liability / errors and omissions)

Step 4: Plan Testing Phases

Structure the engagement into distinct phases with clear objectives and deliverables.

Phase 1: Reconnaissance and Information Gathering

ActivityTechniqueToolsOutput
Passive reconnaissanceDNS enumeration, OSINT, certificate transparencySubfinder, Amass, crt.sh, ShodanTarget inventory, subdomain list
Active reconnaissancePort scanning, service enumeration, technology fingerprintingNmap, Masscan, WappalyzerOpen port/service inventory, technology stack
Application mappingCrawling, sitemap analysis, API endpoint discoveryBurp Suite, OWASP ZAP, PostmanApplication sitemap, API endpoint catalog
Authentication enumerationLogin page analysis, registration flow, password policyManual testing, Burp SuiteAuth mechanism inventory, policy assessment

Phase 2: Vulnerability Identification

ActivityTechniqueToolsOutput
Automated scanningVulnerability scanning, DASTBurp Scanner, Nuclei, NiktoAutomated findings (to be validated)
Manual testingBusiness logic review, auth bypass attempts, injection testingBurp Suite, sqlmap, custom scriptsValidated vulnerability list
Configuration reviewServer hardening, TLS configuration, header analysistestssl.sh, SecurityHeaders.com, manualConfiguration findings
Dependency analysisKnown CVE identification in third-party componentsSnyk, OWASP Dependency-CheckVulnerable component inventory

Phase 3: Exploitation and Proof of Concept

ActivityTechniqueToolsOutput
Vulnerability exploitationTargeted exploitation of confirmed vulnerabilitiesBurp Suite, Metasploit, custom PoCsExploitation evidence (screenshots, request/response)
Privilege escalationHorizontal and vertical privilege escalation attemptsManual testing, custom scriptsPrivilege escalation paths documented
ChainingCombine low-severity findings into higher-impact attack chainsManual analysisAttack chain narratives
Data access verificationDetermine what data is accessible through exploited vulnerabilitiesManual testingData exposure evidence (redacted)

Phase 4: Post-Exploitation (if in scope)

ActivityTechniqueToolsOutput
Lateral movementPivot from compromised system to adjacent systemsSSH, RDP, cloud API callsLateral movement map
Persistence assessmentIdentify mechanisms an attacker could use for persistenceManual analysisPersistence risk assessment
Data exfiltration simulationDemonstrate ability to extract sensitive data (simulated)Manual testingExfiltration path documentation
Detection assessmentEvaluate whether testing activities triggered security alertsCoordination with SOC/SIEM teamDetection gap analysis

Phase 5: Cleanup and Verification

  • Remove all tester-created accounts and test data
  • Delete all uploaded files, shells, or payloads
  • Restore any modified configurations to original state
  • Verify no persistent access mechanisms remain
  • Confirm all testing artifacts are removed from target systems
  • Document any changes that could not be reversed

Step 5: Define Reporting Format

Establish the structure and standards for the final penetration test report.

Finding severity classification:

SeverityCVSS RangeDescriptionRemediation SLA
Critical9.0 - 10.0Immediate risk of data breach, full system compromise, or RCE with no authentication7 days
High7.0 - 8.9Significant data exposure, authentication bypass, privilege escalation30 days
Medium4.0 - 6.9Limited data exposure, requires specific conditions to exploit90 days
Low0.1 - 3.9Minor information disclosure, defense-in-depth improvements180 days
Informational0.0Best practice recommendations, no direct security impactBacklog

Individual finding template:

### [SEVERITY] Finding Title

**ID:** PT-YYYY-NNN
**CVSS Score:** X.X (Vector string)
**Affected Asset:** [URL, IP, component]
**Category:** [OWASP Top 10 category or CWE]

**Description:**
[Clear explanation of the vulnerability and why it matters]

**Steps to Reproduce:**
1. [Step-by-step reproduction instructions]
2. [Include specific requests, parameters, payloads]
3. [Include screenshots or request/response pairs]

**Impact:**
[What an attacker could achieve by exploiting this vulnerability]

**Recommendation:**
[Specific, actionable remediation guidance with code examples where applicable]

**References:**
- [CWE link]
- [OWASP reference]
- [Vendor advisory if applicable]

Step 6: Remediation Tracking

Establish a process for tracking remediation of identified findings.

Remediation tracker:

Finding IDSeverityTitleOwnerRemediation SLAStatusRetest DateRetest Result
PT-2026-001CriticalSQL Injection in search APIBackend Team7 daysRemediateddatePass
PT-2026-002HighBroken access control on admin endpointsAPI Team30 daysIn ProgressdatePending
PT-2026-003MediumMissing rate limiting on authenticationPlatform Team90 daysNot StarteddatePending

Remediation workflow:

  1. Finding delivered — Tester shares finding with development/security team
  2. Triage and assign — Team confirms finding, assigns owner, sets target date
  3. Remediate — Owner implements fix following the provided recommendation
  4. Verify fix — Owner validates fix in staging with the reproduction steps
  5. Request retest — Owner requests tester to verify remediation
  6. Retest — Tester confirms vulnerability is resolved and no regressions introduced
  7. Close — Finding marked as remediated with retest evidence

Output Format

Present the test plan as a structured document:

## Penetration Test Plan

### Engagement Overview
- Target: [application, system, or network]
- Type: [black-box / grey-box / white-box]
- Methodology: [OWASP / PTES / NIST]
- Testing window: [dates and hours]
- Environment: [production / staging / dedicated test]

### Scope
- In-scope and out-of-scope tables

### Rules of Engagement
- Authorized actions, prohibited actions, emergency contacts

### Testing Phases
- Phase breakdown with activities, tools, and expected outputs

### Reporting Standards
- Severity classification, finding template, deliverable timeline

### Remediation Process
- SLA definitions, tracking process, retest procedures

### Authorization
- Sign-off from system owner and legal

Quality Checklist

  • Scope explicitly lists both in-scope and out-of-scope targets with no ambiguity
  • Rules of engagement include emergency stop procedures and contact information
  • Methodology is appropriate for the target type (web, mobile, network, cloud)
  • Testing phases are sequenced logically with clear entry and exit criteria
  • Severity classification uses an industry-standard scoring system (CVSS)
  • Reporting format includes reproduction steps sufficient for developers to verify and fix
  • Remediation SLAs are realistic and aligned with organizational capacity
  • Legal authorization and cloud provider notifications are completed before testing begins
  • Data handling and destruction requirements are clearly defined
  • Cleanup procedures ensure no tester artifacts remain on target systems

Edge Cases

  • For production testing: require explicit written authorization; test during low-traffic windows; have rollback plans; coordinate with on-call teams for immediate incident response if needed
  • For API-only targets: supplement automated scanning with thorough manual testing of business logic, authorization, and rate limiting which scanners frequently miss
  • For cloud infrastructure tests: verify cloud provider penetration testing policies (AWS, GCP, Azure each have specific requirements); include IAM and resource policy review
  • For microservices architectures: test inter-service authentication and authorization, not just the external API gateway; verify service mesh security configurations
  • For CI/CD pipeline testing: include supply chain attack scenarios (dependency confusion, pipeline poisoning); test secret management and build artifact integrity
  • For retests after remediation: verify the specific fix does not introduce regressions; test bypass variations of the original vulnerability; confirm fix is deployed to all affected environments
Skills guardadas