QA Interview Hub · Knowledge base · Quizzes · Українська

Penetration Testing › Pentest basics

Pentest phases, methodologies and where QA fits

A pentest runs in phases once authorisation and scope are agreed: recon, scanning and enumeration, exploitation, post-exploitation, reporting and retest. PTES describes the phases from agreements to the report, OWASP WSTG is a web testing methodology, and the Top 10 is only a risk ranking. A QA Engineer does not replace a pentester but adds negative access scenarios and takes part in threat modelling.

A typical pentest is not random attempts but a sequence of phases that starts once authorization and scope are agreed (pre-engagement):

  1. Reconnaissance — collecting open information: domains, subdomains, technologies, employees;
  2. Scanning and enumeration — open ports, services, versions, endpoints, parameters;
  3. Exploitation — checking that a weakness can really be used, within the rules of engagement;
  4. Post-exploitation — what can be done next with the access obtained (moving deeper, reaching data) and how dangerous that is;
  5. Reporting — findings, impact, reproduction, recommendations;
  6. Retest — checking after fixes that findings are closed and the fix created no new problems.

Methodologies and standards: PTES (Penetration Testing Execution Standard) — phases from agreements to the report; OWASP WSTG — a web application testing methodology with test cases by category (while the OWASP Top 10 is only a risk ranking, not a methodology); NIST SP 800-115 — a technical guide to security testing; OSSTMM — a methodology for measuring operational security.

Where QA fits. A QA Engineer does not replace a pentester but shifts security left:

  • negative access scenarios in regression: another user's id, a role without rights, an expired token;
  • checks of input handling, output encoding, security headers, error messages;
  • taking part in threat modelling: STRIDE — Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege; for each data flow the question "what can go wrong here?";
  • retesting fixes for findings like ordinary defects.

Example. Before releasing a new profile form, QA adds scenarios: another user's id in the request, HTML in the name field, a very long value. Two of them find defects before the pentest.

Mistakes: confusing the OWASP Top 10 with a methodology; starting with exploitation without enumeration; skipping the retest.

Short answer: "Six phases from recon to retest; QA adds security checks to ordinary testing and takes part in threat modelling".

More articles in this chapter