Methodology

Penetration testing standards, models and severity

The standards answer different questions, the box model sets what a tester can see, and a finding is only as good as the evidence and classification behind it.

A penetration test is three decisions wearing one deliverable: which document governs it, what the tester is allowed to know, and how an observation becomes a severity. Most methodology arguments are disagreements about one of the three.

The standards map

PTES is the engagement method. Seven sections — pre-engagement, intelligence gathering, threat modeling, vulnerability analysis, exploitation, post exploitation, reporting — from first contact to final report. It began in 2009, still calls itself v1.0, and the copy linked here is an unofficial GFDL 1.2 mirror; use it for phase gates, not technique.

The WSTG is a test catalogue; ASVS is a requirements standard. The WSTG's stable release is v4.2 (3 December 2020): 97 tests in 12 categories, each with an objective, procedure and references. ASVS 5.0.0 (30 May 2025) is 17 chapters of verifiable requirements at three levels. ASVS says what must be true, the WSTG how to check it, and ASVS supplies the pass criterion the WSTG omits.

The OWASP Top 10 is an awareness document. The 2025 edition is current, and its categories are risk labels rather than tests: Injection is A05 now, A03 in 2021. It explains priorities to non-testers, not coverage.

NIST SP 800-115 is an assessment method. Published in September 2008, it separates planning, execution and post-execution, and describes four penetration-testing phases with a loop from attack back to discovery. OSSTMM is a measurement manual. Version 3.02 (14 December 2010) covers human, physical and network channels, and outputs an attack-surface metric (rav) and a STAR report for comparing exposure over time.

ATT&CK is a behaviour knowledge base. Version 20.1 describes tactics, techniques and procedures, updated twice a year. It does not say what to test; it lets a finding state what the weakness would let an adversary do in the language detection teams use.

PCI DSS is a compliance regime, not a test method. The current standard is v4.0.1 (June 2024), and penetration testing sits in Requirement 11.4, renumbered from 11.3. 11.4.1 demands a documented methodology: industry-accepted approach, CDE perimeter coverage, testing inside and outside, segmentation validation, application-layer and network-layer testing, a 12-month threat review and 12-month retention. 11.4.2 and 11.4.3 require internal and external tests every 12 months and after significant change; 11.4.4 correction and retest; 11.4.5 segmentation. It borrows a method, so PCI work still needs a PTES-shaped plan.

ArtefactScopeOutputLicenceWho uses it
PTESAny pen testPhase artefactsGFDL 1.2Providers, procurement
WSTG v4.2Web apps and APIs97 test proceduresCC BY-SA 4.0Web testers, AppSec
ASVS 5.0.0Web apps and servicesRequirements, L1–L3CC BY-SA 4.0Architects, auditors
Top 10:2025Web application riskTen awareness categoriesCC BY 3.0Developers, executives
NIST 800-115Systems and networksPhases, vocabularyU.S. Gov workGovernment, regulated
OSSTMM 3.02Human, physical, networkrav, STARCC BY-NC-ND 3.0Measurement programmes
ATT&CK v20.1Adversary behaviourTactic/technique IDsMITRE termsDetection, threat intel
PCI DSS v4.0.1Cardholder data environmentRequirement 11.4 evidencePCI SSC licenceMerchants, QSAs

Black, gray and white box

Box colour describes how much the tester is told, not how hard the test is: more knowledge buys depth and costs realism.

  • Black box — no credentials, source or diagrams; an outsider's view, honest about the internet attacker, slowest to depth.
  • Gray box — one or two accounts and partial documentation; the usual application test, because expensive web findings need a session.
  • White box — source, design, admin credentials and logs; deepest and least realistic, and it can miss the deployed configuration.

Black-box depth is expensive because every step is also discovery; gray box usually buys the best coverage per hour; white box is the only model that can review authorization logic before it is reachable. Internet reach calls for external black box, role enforcement for gray box with real accounts, code trust for white box, and quarter-on-quarter comparison for the same model twice.

Write the model into scope as facts: which accounts and roles, whether source is provided, from which network position, what is withheld. Gray box with a global administrator is not comparable with gray box with a read-only user.

What a tester is given in black-box, gray-box and white-box testing Three columns compare the knowledge, simulated adversary, cost and coverage, and appropriate use of black-box, gray-box and white-box testing. Black box gives no credentials or source and simulates an internet attacker. Gray box gives one or two accounts and partial documentation and simulates an authenticated user. White box gives source, design documents, admin credentials and logs and simulates an insider or auditor. WHAT THE TESTER IS GIVEN Black box outsider's view KNOWS no credentials no source, no diagrams only what responses reveal SIMULATES internet attacker with no prior access COST / COVERAGE cheapest per asset broad but shallow slow to reach depth USE WHEN perimeter and compliance tests external-only scope Gray box the working default KNOWS one or two accounts partial documentation roles, not internals SIMULATES authenticated user or partner COST / COVERAGE best coverage per hour for web and API needs account hygiene USE WHEN application assurance with real roles most web engagements White box full context KNOWS source and design docs admin credentials logs and network map SIMULATES insider or auditor with full context COST / COVERAGE deepest, most expensive may miss deployment state and config drift USE WHEN code and SDLC review crypto or authz logic remediation validation Knowledge is the variable, not difficulty. Two "gray box" tests are comparable only with the same accounts. The most realistic model is the least informed; the most informed is the least realistic.
Figure 1. Three box models compared by what the tester knows, not by tooling. The model belongs in the scope document, because it changes what the result means.

External versus internal

External testing starts where an attacker with no foothold starts: DNS, certificate transparency, edge services. The threat model runs from opportunistic scanning to targeted intrusion; findings are exposed admin interfaces, TLS and authentication flaws, unpatched edge appliances, public storage. Tooling is discovery-heavy, and the constraints are the WAF and CDN, rate limits, and no internal context.

Internal testing starts on the network, or a VPN that behaves like it, often with one domain account. The threat model is an insider, a compromised workstation, or ransomware with a foothold; findings cluster in Active Directory — weak delegation, missing SMB signing, credentials in shares, flat segmentation. Tooling is BloodHound, Impacket, Responder and LDAP enumeration; constraints are EDR, change windows and fragile production systems.

ExternalInternal
Starting positionInternet, no credentialsOn-network or VPN, often a domain account
Threat modelOpportunistic scanning to targeted intrusionInsider, compromised workstation, ransomware
Typical findingsExposed admin panels, TLS and auth flaws, unpatched edge servicesAD misconfiguration, SMB signing, delegation, flat segmentation
ToolingOSINT, port scanning, TLS probes, proxy, nucleiBloodHound, Impacket, Responder, nmap, LDAP
ConstraintsWAF and CDN behaviour, rate limits, no contextEDR, change windows, fragile production systems
Reporting emphasisWhat an internet attacker reachesBlast radius and the path to tier 0

The same configuration error matters differently on each side. An unpatched SMB service on an internet-facing host is a perimeter emergency; inside a flat network it is a lateral path that may end at the backup server. Default credentials on an edge appliance are a one-request compromise; on an internal console they are a step in a chain that first needs a foothold. Severity follows the path, not the CVE.

From observation to finding

An observation becomes a finding through five gates; one that skips a gate is a rumour with a screenshot. Reproduction comes first: clean state, second account, twice, independent path. If it worked once and never again, it is an observation.

Then capture the exact request and response, or command and output, with timestamp, source address, account and a SHA-256. Redact cookies and tokens but keep the header names.

Ruling out artefacts is the step most often skipped. Caching can serve another user's object from a CDN: check Cache-Control, Vary and the cache key, and repeat with a unique parameter and a second account. A WAF block page can look like a successful injection; a load balancer can hide a broken node; seeded test data can make an access-control failure look real; a CDN can serve a different configuration in another region.

State exploitability and prerequisites — authentication level, network position, configuration, user interaction, a race window — and write the business impact: what data, how much, whose, whether a tenant boundary was crossed. Then record it, unverified until the evidence exists.

A verbose stack trace that reveals a framework version is confidentiality-only: 5.3 Medium, CWE-209, WSTG-ERRH-01. SQL injection behind a login needs an account, so PR:L, but reads and writes every tenant's rows: 8.1 High. The same injection reachable without an account is 9.8 Critical. Those numbers encode a precondition change, not inflation; inflation is claiming the 8.1 without a captured request.

The finding lifecycle from observation to report Five stages run left to right: observation, reproduction, classification, evidence and report. Two panels below show what is rejected at a gate and what is accepted into the report. A rejected item stays an observation with unverified status; an accepted item is reproducible, has captured evidence and stated preconditions, and carries a written impact. FROM OBSERVATION TO ACCEPTED FINDING Observation a response that looks wrong Reproduce clean state, twice, second account Classify CVSS, CWE, OWASP, WSTG Evidence request/response, hash, timestamp Report finding, impact, SARIF log Every gate can send the item back: a failed reproduction returns it to observation. REJECTED AT A GATE not reproducible only a scanner banner cache, WAF or CDN artefact no captured request or output stays an observation, status unverified ACCEPTED INTO THE REPORT reproduced from a clean state exact request/response captured and hashed preconditions and position stated impact written in business terms verified finding, traceable to evidence The lifecycle is a filter, not a conveyor belt: classification without evidence ruins credibility.
Figure 2. Five gates between an observation and an accepted finding. The rejected panel is not hypothetical — most scanner output stops at the first gate.
Severity is not a marketing budget

An unverified finding is a hypothesis, and a critical label on a hypothesis destroys trust faster than a low-severity finding ever will. Record what was proven, from which position, with which account. If the only evidence is a tool's guess, say so in the finding.

Scoring and classification

CVSS v3.1's base group has eight metrics and assumes a reasonable worst case. For the authenticated export injection: AV:N (HTTP), AC:L, PR:L (an account), UI:N, S:U (application and database only), C:H and I:H (every tenant's rows are read and modified), A:N. Result: 8.1 High — CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N.

The vector is the audit trail: prefix, mandatory base metrics, optional temporal and environmental metrics. Publish both, because a score without its vector cannot be checked.

CVSS v4.0 has been current since 1 November 2023 (specification v1.2, June 2024). It keeps four groups but replaces Scope with separate impact metrics for vulnerable and subsequent systems, adds Attack Requirements, and scores through MacroVectors. The same vulnerability need not receive the same number; FIRST's FAQ explains why. Pick one version per programme and never compare the two as if they shared a scale; NVD publishes the CVSS version and vector alongside a CVE.

The base score is not the severity of the engagement. Environmental metrics reflect compensating controls and asset criticality, threat metrics reflect exploitation, and business context sits outside CVSS. A public 9.8 on an isolated lab host can matter less than an 8.1 on the system that moves money. PCI DSS agrees: 11.4.4 ties correction to the entity's own risk assessment.

Three identifiers answer three questions, and a fourth names the instance. CWE names the weakness class (CWE-89); the OWASP Top 10 the risk category (A05:2025 Injection); the WSTG the test (WSTG-INPV-05). A CVE names a specific disclosed vulnerability in a specific product. One CWE can be the root cause of many CVE records, so a pentest finding usually has a CWE and only sometimes a CVE.

Use the Top 10 as OWASP describes it: awareness and prioritisation. Its categories mix root causes, its CWE mappings are approximate, and it defines no tests or pass criteria, so "A01 covered" says nothing about what was done. The plugin's bundled knowledge base still ships the 2021 Top 10 while 2025 is current, so a finding should record the edition it was classified against.

Worked example, illustrative: "Authenticated SQL injection in report export", 8.1 High, CWE-89, A05:2025, WSTG-INPV-05. The impact statement is what a business reader acts on: any authenticated user with the reporting role can read and modify every tenant's invoice history by changing the id parameter; names, addresses and tax identifiers are exposed, and no administrative privilege is required.

Four coordinates, one sentence

A usable finding names the weakness (CWE), the risk category (OWASP Top 10), the test that found it (WSTG) and the severity with its vector (CVSS) — plus evidence and an impact statement. Remove any one and the reader can reproduce it or prioritise it, but not both.

How dsh-redteam enforces it

pentest_add_finding accepts cvss, cvssVector, cwe, owasp and wstgIds alongside evidence. With severity omitted it derives from the score: 9.0+ critical, 7.0–8.9 high, 4.0–6.9 medium, 0.1–3.9 low, 0 info. A finding recorded as verified or exploited without evidence, a tool run, linked ids or a validation record is stored unverified: an assertion cannot outrun its proof.

pentest_verify is deterministic and evidence-only. Ten CWEs — 78, 79, 89, 22, 352, 319, 693, 200, 918, 601 — map to rules requiring specific signals; CWE-89 needs an injection payload plus a database error, union result or time-delay signature. It returns confirmed, refuted or inconclusive with named checks, sends no request, and with apply:true lifts a finding only from unverified to verified on a confirmed verdict. It never sets exploited.

pentest_sarif exports SARIF 2.1.0: one rule per CWE with OWASP and WSTG tags, CVSS score and vector in result properties, severity mapped to error/warning/note, and a stable dshFinding/v1 fingerprint. Bodies, headers and tool output are never exported. The report's CVSS breakdown renders 3.x vectors only, so a v4.0 vector is stored but not decomposed.

# the identifiers the report and SARIF log will consume
pentest_add_finding {
  "title": "Authenticated SQL injection in report export",
  "cvss": 8.1, "cvssVector": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N",
  "cwe": "CWE-89", "owasp": "A05:2025", "wstgIds": ["WSTG-INPV-05"],
  "evidence": "req/resp 0412: id=1' UNION SELECT ... -> 200, 12 rows"
}
dsh-redteam Findings panel showing a verified critical 9.8 OS command injection (CWE-78, A03:2021, WSTG-INPV-12), a verified high 7.8 sudo misconfiguration (CWE-250, A05:2021, WSTG-ATHN-02) and a verified medium 4.9 internal-service exposure (CWE-441, A01:2021, WSTG-CONF-01).
Figure 3. A 1.2-build lab capture of the Findings panel: a critical 9.8 OS command injection, a high 7.8 sudo misconfiguration and a medium 4.9 internal-service exposure, each with its CVSS v3.1 score, CWE, OWASP Top 10 (2021) category and WSTG test. The OWASP identifiers are from the 2021 edition because that is the mapping the bundled dataset carries — the edition is part of the claim.

The fields the reviewer reads are the fields the report and the SARIF log consume, so a classification decided badly at record time propagates into every deliverable.

Key takeaways

  • Standards compose: PTES governs the engagement, the WSTG lists tests, ASVS states requirements, the Top 10 frames awareness, NIST supplies vocabulary, OSSTMM measures, ATT&CK describes behaviour, and PCI DSS is a compliance regime.
  • Box colour is knowledge, not difficulty: record the accounts, documents and network position, or the result is not comparable.
  • External and internal tests differ in starting position and reporting emphasis; the same misconfiguration can be a perimeter emergency outside and a lateral step inside.
  • A finding needs reproduction, evidence, false-positive elimination, preconditions and impact before it earns a severity. CVSS v3.1 and v4.0 are different scales.