Pentest Methodology
ASecurityAuthorised security testing — penetration testing and ethical hacking methodology for web apps, APIs, cloud and infrastructure, run as a senior offensive-security engineer would, with a hard authorisation gate, scoped rules of engagement, non-destructive proof, severity-ranked reporting and retesting. Use when the user says "pentest", "penetration test", "ethical hacking", "hack my own app", "red team", "bug bounty", "security assessment", "vulnerability assessment", "attack surface", "recon"...
- 3 stars
- 0 votes
- 0 copies
- 1 view
- Added November 8, 2026
Works with
Security analysis
100/100Pro scans all 11 files and shows the line behind each finding
npx -y skills add Kin9Zeus/senior-engineer-skills --skill pentest-methodology --agent claude-codeAre you the author of Pentest Methodology?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/kin9zeus-pentest-methodology)---
name: pentest-methodology
description: Authorised security testing — penetration testing and ethical hacking methodology for web apps, APIs, cloud and infrastructure, run as a senior offensive-security engineer would, with a hard authorisation gate, scoped rules of engagement, non-destructive proof, severity-ranked reporting and retesting. Use when the user says "pentest", "penetration test", "ethical hacking", "hack my own app", "red team", "bug bounty", "security assessment", "vulnerability assessment", "attack surface", "recon", "can someone break into this", "test my API security", "OWASP testing", "WSTG", "ASVS", "OWASP API Top 10", "find vulnerabilities in my site", "security test plan", "retest", "capture the flag", "CTF" or "set up a hacking lab"; before any active scanning or probing; and as the testing counterpart to a code-level security review. Authorised, scoped, non-destructive testing only. By Devleck.
license: MIT
---
# Pentest Methodology
Think like an attacker so the system's owner doesn't have to learn what an
attacker would do the hard way. This skill is how a senior offensive-security
engineer works: **scoped, authorised, evidence-driven, minimally invasive**, and
finished only when the fix is retested.
> **The gate comes first.** Everything active in this skill — scanning,
> fuzzing, authenticated probing, load of any kind — requires written
> authorisation from someone entitled to give it, a defined scope, and rules of
> engagement. If any of these is missing, you may do **static code review, work
> on a local lab, or test the user's own `localhost`** — and nothing else.
> `references/authorization-and-roe.md` has the gate in full.
**Out of scope for this skill, always:** weaponised exploit development against
real targets, malware, persistence on systems you do not own, denial of service,
social engineering of real people, testing third-party systems you were not
authorised to test, and anything aimed at accounts or data of people who did not
consent. Proof of a vulnerability uses the **least harmful evidence that proves
it**.
---
## 0 · The authorisation gate (run this before anything else)
Answer all of these, in writing, before sending a single probing packet:
```
[ ] Who owns the target, and is the requester entitled to authorise testing?
[ ] Is there a written scope: exact hosts / URLs / IP ranges / apps / accounts?
[ ] What is explicitly OUT of scope? (third-party SaaS, payment processors,
CDN/WAF providers, shared hosting neighbours, production data stores…)
[ ] Environment: staging / clone preferred. Production only with explicit approval.
[ ] Time window, rate limits, and a stop contact reachable during the test.
[ ] Allowed techniques; forbidden techniques (DoS, social engineering, physical…)
[ ] Data handling: how test data, findings and any captured data are stored/destroyed.
[ ] Cloud/provider testing policy checked (current policy — it changes).
[ ] Backups taken / rollback possible if a test misbehaves.
```
Use `templates/rules-of-engagement.md`. Then enforce scope mechanically:
```bash
bash skills/pentest-methodology/scripts/scope-guard.sh scope.txt https://staging.example.com
# exit 0 = in scope and authorisation still valid · 1 = refuse · 2 = usage error
```
**No guard pass, no traffic.** Run it before every new target, host or IP — the
scope file is the source of truth, not your memory.
---
## 1 · Choose the test mode
| Mode | You get | Best for | Allowed without full gate? |
|---|---|---|---|
| **White-box** (code + running staging) | Source, architecture, test accounts | Highest yield per hour; finds logic and authz bugs fast | Code review yes; running tests need the gate |
| **Grey-box** (accounts at 2+ roles, no source) | Credentials per role | Authz, business logic, API | Needs the gate |
| **Black-box** (nothing) | Public surface only | Realistic external attacker view | Needs the gate |
| **Local lab / CTF** | Deliberately vulnerable apps you run yourself | Practice, tool validation, training | Yes — your own machine only |
Prefer white-box on staging. The most valuable findings in real systems are
authorisation and logic flaws; they need two accounts and source access, not a
fancier scanner.
---
## 2 · The methodology — in order
```
1 SCOPE & GATE authorisation, scope file, RoE, stop contacts
2 MODEL what is valuable? who is the attacker? data-flow + trust boundaries
3 RECON passive first (public records), then active inside scope
4 MAP routes, parameters, roles, APIs, auth flows, third parties
5 TEST by category, highest yield first (below)
6 VALIDATE minimal proof; reproduce twice; rule out false positives
7 ASSESS IMPACT chain findings; what is the worst realistic outcome?
8 REPORT severity-ranked, each with fix + verification
9 RETEST prove each fix; add the regression test
```
### Test priority — by real-world yield
Same order as `security-hardening`, applied from the outside:
1. **Secrets and exposure** — `.env`, `.git/`, backups, source maps, debug
routes, API keys in bundles, public buckets
2. **Broken access control** — the cross-account test, forced browsing, role
escalation, mass assignment (`web-app-testing.md` §authorization)
3. **Authentication** — brute-force resistance, reset flow, session handling,
MFA bypasses, token validation
4. **Injection** — SQL, NoSQL, command, template, header, path
5. **XSS and content injection**, CSP effectiveness
6. **SSRF and redirects**, file upload, XXE and deserialization
7. **Business logic** — price tampering, workflow skipping, race conditions,
coupon/credit abuse, enumeration
8. **Configuration** — headers, TLS, CORS, cloud storage permissions, admin
surfaces, default credentials
9. **Infrastructure** — exposed services, outdated components, cloud IAM
10. **Supply chain & CI** — dependency risk, pipeline permissions
Detail per category: `web-app-testing.md`, `api-testing.md`,
`infra-and-cloud-testing.md`.
---
## 3 · Evidence rules
1. **Prove, do not harvest.** For a data-exposure bug, show that *your own*
second test account's record is readable by the first — never browse real
customers' data. If you accidentally see real personal data, **stop, record
the request id, do not copy it, report immediately**.
2. **Benign markers.** For injection or command execution, use a harmless,
unique marker (a sleep of a few seconds, an `echo` of a random string, a
timestamp read) — never a payload that changes state or reads secrets.
3. **No persistence, no pivoting** unless the RoE explicitly includes it.
4. **Reproduce twice** from a clean session before reporting.
5. **Record exactly**: request/response (redact secrets and tokens), account used,
time, build/version, tool and flags.
6. **Respect rate limits** in the RoE; a test that takes the service down is a
finding *and* an incident you caused.
## 4 · Stop conditions — halt and call the contact
- You encounter real customers' personal data you were not meant to see
- The system becomes unstable or errors spike after your test
- You find evidence the system is **already compromised** (webshells, unknown
processes, foreign admin users) → stop testing and switch to
`security-incident-response`
- An asset appears that is not in the scope file
- Any ambiguity about whether an action is allowed — ask first
## 5 · What people get wrong
- **Running a scanner and calling it a pentest.** A scanner finds known-pattern
issues; the severe findings (authorisation, logic) need a human with two
accounts and an idea of what the app is for.
- **Testing production at full speed without a stop contact.**
- **Reporting scanner output unverified.** A pile of false positives destroys the
reader's trust in the one real finding. Every finding is reproduced.
- **Scope drift.** "While I was in there" is how out-of-scope systems get touched.
- **No retest.** An unverified fix is a claim, not a fix.
- **Severity inflation.** Severity is impact × likelihood in this system, not the
scanner's colour. Use the suite's P0–P3 rubric and justify it.
- **Forgetting the defender's view.** The report should say what logging or
alerting would have caught the attack — the blue team's takeaway.
## 6 · Reporting
Findings use the suite's standard shape; full structure in
`references/reporting-and-retest.md` and `templates/pentest-report.md`:
```markdown
### <Title> — P0
**Class** Broken object-level authorization (OWASP A01 / API1)
**Asset** https://staging.example.com/api/invoices/{id} (in scope: yes)
**Confidence** CONFIRMED (reproduced twice)
**Impact** <what an attacker gains, concretely, and how many records/users>
**Reproduce** <exact steps with two test accounts; redact tokens>
**Fix** <diff or configuration change>
**Verify** <the test that must fail before and pass after>
**Detection** <the log line / alert that would have caught this>
```
End with **"What I could not verify"** — untested areas, tool limits, anything out
of scope that deserves its own engagement.
---
## References, templates and scripts
- `references/authorization-and-roe.md` — the gate, evidence of ownership, third-party and cloud policies, data handling, legal framing
- `references/web-app-testing.md` — per-category test cases with safe verification
- `references/api-testing.md` — the OWASP API Security Top 10 as a test plan
- `references/infra-and-cloud-testing.md` — attack-surface inventory, TLS/DNS/ports, cloud and container review
- `references/tooling-and-lab.md` — tool matrix, a local practice lab, CI-integrated scanning
- `references/reporting-and-retest.md` — report structure, severity, retest protocol
- `templates/rules-of-engagement.md` · `templates/pentest-report.md`
- `scripts/scope-guard.sh` / `scripts/scope-guard.ps1` — refuses targets outside a signed scope file
- Related skills: `security-hardening` (the fixes), `security-incident-response`, `cloud-security`, `ai-security`, `testing-strategy` (turning findings into regression tests)
Files in this skill
- SKILL.md
- references/api-testing.md
- references/authorization-and-roe.md
- references/infra-and-cloud-testing.md
- references/reporting-and-retest.md
- references/tooling-and-lab.md
- references/web-app-testing.md
- scripts/scope-guard.ps1
- scripts/scope-guard.sh
- templates/pentest-report.md
- templates/rules-of-engagement.md
Attribution
Related skills
View all in security →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.