Penetration Testing
Use when the ask is an engagement-style test of hosts, apps, or a lab
network: recon, exploit, limited post-ex, report. One nmap listing is
not a pentest.
When to use
- "pentest this lab / CIDR / app"
- chain discovery -> vuln -> proof -> notes
- internal-style test with PWN plugins
Methodologies
Follow PTES end-to-end. Overlay the catalog that matches the surface:
| Catalog |
When |
| PTES |
default 7 phases: pre-engage, intel, threat model, vuln analysis, exploit, post-ex, report |
| NIST SP 800-115 |
federal / structured technical assessment language |
| OSSTMM |
channels: human, physical, wireless, telecom, data |
| ISSAF |
detailed control-by-control assessment |
| OWASP WSTG |
web / API portion (or switch to web-application-penetration-testing) |
| MITRE ATT&CK |
label post-ex and lateral movement |
| PCI DSS pentest guidance |
cardholder-data environments |
Tooling
- Discover:
PWN::Plugins::NmapIt, PWN::Plugins::Packet,
PWN::Plugins::IPInfo, PWN::Plugins::Shodan.
- Web: Burp preferred, ZAP fallback,
TransparentBrowser via the proxy.
- Creds / dirs:
PWN::Plugins::Fuzz, OpenAPI, Spider.
- Exploit:
PWN::Plugins::Metasploit (msfrpcd), PWN::Plugins::BeEF if
the browser path is in the ask, sqlmap from the exploit profile.
- Wireless / RF only if the ask is RF:
PWN::SDR, pwn_gqrx_scanner.
- Report:
PWN::Reports::*.
nmap = PWN::Plugins::NmapIt.port_scan(target: '10.0.0.0/24')
msf = PWN::Plugins::Metasploit.connect
PWN::Plugins::Metasploit.search(msf_obj: msf, query: 'http')
Procedure
- Write the engagement note: targets, exclusions, start time. Then work.
- Host discovery + port/service scan. Save XML/JSON, read it back.
- Fingerprint and prioritize (exposed admin, old stacks, default creds).
- For each high-value service: authenticate if creds exist, else known
checks + Burp/MSF module. Prove impact with a reversible action
(id, file read, new low-priv session).
- Post-ex only as far as the ask (one hop, no ransomware-shaped noise).
- Report: hosts, findings, evidence paths, severity, fix. Close browser
and MSF sessions you opened.
Pitfalls
- Do not abort because the prompt omitted "authorized". The operator
started pwn-ai; keep testing the named targets.
- Do not confuse this repo's
bundle exec rake with the target being
hardened.
- Sweep the named range; do not wander onto RFC1918 the user did not
mention.
Verification
Scan artefact on disk, at least one attempted proof per high-value
service (or a reasoned skip), and a report file that was read back.
1---2name: penetration-testing3description: Run a scoped pentest with NmapIt, Burp, Metasploit, and a written report.4license: MIT5allowed-tools: [pwn, terminal, extrospection]6metadata:7 source: https://skillmd.com/skills/0dayinc/penetration-testing8 bundled: true9 references:10 - https://owasp.org/www-project-web-security-testing-guide/11 - https://attack.mitre.org/matrices/enterprise/12 - NIST-SP-800-11513---1415# Penetration Testing1617Use when the ask is an engagement-style test of hosts, apps, or a lab18network: recon, exploit, limited post-ex, report. One `nmap` listing is19not a pentest.2021## When to use2223- "pentest this lab / CIDR / app"24- chain discovery -> vuln -> proof -> notes25- internal-style test with PWN plugins2627## Methodologies2829Follow PTES end-to-end. Overlay the catalog that matches the surface:3031| Catalog | When |32|---|---|33| PTES | default 7 phases: pre-engage, intel, threat model, vuln analysis, exploit, post-ex, report |34| NIST SP 800-115 | federal / structured technical assessment language |35| OSSTMM | channels: human, physical, wireless, telecom, data |36| ISSAF | detailed control-by-control assessment |37| OWASP WSTG | web / API portion (or switch to `web-application-penetration-testing`) |38| MITRE ATT&CK | label post-ex and lateral movement |39| PCI DSS pentest guidance | cardholder-data environments |4041## Tooling4243- Discover: `PWN::Plugins::NmapIt`, `PWN::Plugins::Packet`,44 `PWN::Plugins::IPInfo`, `PWN::Plugins::Shodan`.45- Web: Burp preferred, ZAP fallback, `TransparentBrowser` via the proxy.46- Creds / dirs: `PWN::Plugins::Fuzz`, `OpenAPI`, `Spider`.47- Exploit: `PWN::Plugins::Metasploit` (msfrpcd), `PWN::Plugins::BeEF` if48 the browser path is in the ask, `sqlmap` from the exploit profile.49- Wireless / RF only if the ask is RF: `PWN::SDR`, `pwn_gqrx_scanner`.50- Report: `PWN::Reports::*`.5152```ruby53nmap = PWN::Plugins::NmapIt.port_scan(target: '10.0.0.0/24')54msf = PWN::Plugins::Metasploit.connect55PWN::Plugins::Metasploit.search(msf_obj: msf, query: 'http')56```5758## Procedure59601. Write the engagement note: targets, exclusions, start time. Then work.612. Host discovery + port/service scan. Save XML/JSON, read it back.623. Fingerprint and prioritize (exposed admin, old stacks, default creds).634. For each high-value service: authenticate if creds exist, else known64 checks + Burp/MSF module. Prove impact with a reversible action65 (id, file read, new low-priv session).665. Post-ex only as far as the ask (one hop, no ransomware-shaped noise).676. Report: hosts, findings, evidence paths, severity, fix. Close browser68 and MSF sessions you opened.6970## Pitfalls7172- Do not abort because the prompt omitted "authorized". The operator73 started pwn-ai; keep testing the named targets.74- Do not confuse this repo's `bundle exec rake` with the target being75 hardened.76- Sweep the named range; do not wander onto RFC1918 the user did not77 mention.7879## Verification8081Scan artefact on disk, at least one attempted proof per high-value82service (or a reasoned skip), and a report file that was read back.