workflows/workflows/agent-environment-setup/platforms/codex/skills/pentest-skill/SKILL.md
Guide authorized penetration testing engagements using PTES methodology. Covers reconnaissance, vulnerability scanning, exploitation, post-exploitation, and professional reporting. Requires explicit authorization before any testing activity.
npx skillsauth add cubetiq/cubis-foundry pentest-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provide structured guidance for authorized penetration testing engagements following the Penetration Testing Execution Standard (PTES). This skill assists with planning reconnaissance, identifying vulnerabilities, guiding exploitation strategies, and producing professional pentest reports.
STOP — Before proceeding, confirm the user has explicit authorization for penetration testing on the target system. Request evidence of a signed rules-of-engagement document, scope agreement, or written authorization because unauthorized testing is illegal and unethical regardless of intent.
Define and validate the engagement scope — Confirm in-scope IP ranges, domains, applications, and any exclusions (production databases, third-party services) because testing outside scope exposes the tester to legal liability and can cause unintended damage.
Establish rules of engagement — Document testing windows, emergency contacts, escalation procedures, and data handling requirements because clear rules prevent misunderstandings and protect both tester and client.
Conduct passive reconnaissance — Gather OSINT including DNS records, WHOIS data, certificate transparency logs, public code repositories, and employee information because passive recon builds target knowledge without generating detectable traffic.
Conduct active reconnaissance — Perform port scanning (nmap), service enumeration, banner grabbing, and directory brute-forcing because active recon identifies the live attack surface that passive methods cannot fully reveal.
Enumerate services and technologies — Fingerprint web servers, frameworks, CMS platforms, API endpoints, and authentication mechanisms because accurate technology identification drives exploit selection.
Identify vulnerabilities — Cross-reference enumerated services against CVE databases, run vulnerability scanners (Nessus, OpenVAS, Nuclei), and perform manual testing for logic flaws because automated scanners miss business-logic and chained vulnerabilities.
Validate and prioritize vulnerabilities — Confirm each finding is exploitable in context, eliminate false positives, and rank by CVSS score adjusted for business impact because validated findings carry credibility in the final report.
Plan exploitation carefully — For each validated vulnerability, prepare the exploit, set up a safe test environment if possible, and document the expected outcome because uncontrolled exploitation can crash services or corrupt data.
Execute exploitation with minimal impact — Achieve proof of concept without causing denial of service, data destruction, or persistent backdoors because the goal is to demonstrate risk, not to cause harm.
Perform post-exploitation assessment — If authorized, pivot to assess lateral movement possibilities, privilege escalation paths, and data access scope because post-exploitation demonstrates the true business impact of a breach.
Document every action with timestamps — Maintain a detailed testing log including commands, outputs, screenshots, and timing because reproducibility and evidence are essential for the report and for legal protection.
Clean up testing artifacts — Remove shells, test accounts, uploaded files, and any persistent changes because leaving artifacts behind creates new vulnerabilities and violates professional standards.
Write the penetration test report — Produce an executive summary, methodology section, findings with evidence and severity, and remediation recommendations because the report is the primary deliverable and must be actionable for both technical and executive audiences.
Conduct a findings debrief — Walk the client through critical and high findings, demonstrate exploitation where appropriate, and discuss remediation priorities because interactive debriefs drive faster remediation than reports alone.
Plan remediation verification — Schedule a retest window and define success criteria for each finding because verification confirms that fixes actually address the root cause rather than masking symptoms.
## Penetration Test Report
### Engagement Overview
[Client, scope, dates, methodology (PTES), authorization reference]
### Executive Summary
[Business risk narrative, critical finding count, overall risk rating]
### Methodology
[Phases completed, tools used, testing approach]
### Findings Summary
| # | Title | Severity | CVSS | Category | Status |
|---|-------|----------|------|----------|--------|
| 1 | ... | Critical | 9.8 | RCE | Open |
### Detailed Findings
[For each: description, steps to reproduce, evidence/screenshots,
impact analysis, remediation recommendation, references]
### Attack Narrative
[Chain of findings that demonstrate business impact]
### Remediation Roadmap
[Priority-ordered fixes with effort estimates]
### Appendix
[Testing log, tool output, scope documentation]
| Topic | Reference | Load When |
|-------|-----------|-----------|
| Reconnaissance Techniques | references/reconnaissance.md | Planning or executing recon phase |
| Vulnerability Scanning | references/vulnerability-scanning.md | Running scanners or triaging results |
| Exploitation Guidance | references/exploitation.md | Planning or executing exploitation |
| Report Writing | references/reporting.md | Drafting the pentest report |
| PTES Methodology | references/methodology.md | Understanding engagement phases |
tools
Use when investigating latest vendor behavior, comparing tools or platforms, verifying claims beyond the repo, or gathering external evidence before implementation.
documentation
Use when designing database schemas, normalization strategies, indexing plans, query optimization, and migration workflows for relational, document, or hybrid data stores.
development
Use when writing, reviewing, or refactoring modern C#/.NET code, including minimal APIs, records, async streams, pattern matching, DI lifetimes, and memory-efficient performance tuning.
development
Use when conducting code reviews, building review checklists, calibrating review depth, providing structured feedback, or establishing team review practices. Covers review methodology, feedback patterns, automated checks, and batch review strategies.