A pentest asks a different question from vulnerability scanning: not “which known weaknesses are visible in the system” but “what could an attacker actually do”. Specialists attack the system under agreed rules: they look for chains of weaknesses, gain access and show how far they could get. The methodology is described in NIST SP 800-115.
How the test is carried out
NIST SP 800-115 describes four phases. The first is planning: the parties agree the rules of engagement, set the goals of the test and obtain written permission from the system owner; no testing takes place in this phase. Then comes discovery — gathering information about the targets, scanning ports and services and matching the findings against vulnerability databases. The third phase is attack: hypotheses are tested with exploits and every successful attack confirms a vulnerability; after the breach the attack often continues from inside the system, in search of the next step. The report is written in parallel with all the phases.
| Phase | What happens |
|---|---|
| Planning | rules and scope of the test, goals, written permission from the system owner |
| Discovery | information gathering, port and service scanning, vulnerability analysis |
| Attack | hypotheses tested with exploits, vulnerabilities confirmed, access expanded |
| Reporting | logging throughout the test, a final report with threats and protective measures |
How it differs from vulnerability scanning
A scanner finds known weaknesses using vulnerability databases and can run as often as every night in CI. A pentest is carried out by people, rarely — usually once a year and after major changes — and it shows how weaknesses add up to a real attack path: through a chain of several vulnerabilities an attacker gains more access than any one of them would give on its own. A pentest therefore complements scanning rather than replacing it.
Types of pentest
- White box — the specialists know everything about the system: source code, diagrams and configuration.
- Black box — only the address is known and the team finds out everything else itself, like an external attacker.
- Gray box — something in between: for example, a regular user account.
The scope is chosen separately: a single test usually covers external infrastructure, web applications or a wireless network. For web applications, the test methodology is built on the OWASP Web Security Testing Guide (WSTG).
Example
A team is preparing an online shop for launch and orders a pentest covering the external perimeter and the web application — gray box, with a customer account. The testers discover that an old administration panel on a subdomain allows a file to be overwritten with an arbitrary name and use this to run their own code on the server. The report contains a confirmed attack, the risk and remediation: move the panel to the internal network and remove the outdated version.
Sources
the term is written from these pages- NIST SP 800-115 — Technical Guide to Information Security Testing and Assessment (сентябрь 2008)nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-115.pdf(opens in a new tab)
- NIST CSRC Glossary — Penetration Testingcsrc.nist.gov/glossary/term/penetration_testing(opens in a new tab)
- OWASP Web Security Testing Guideowasp.org/projects/web-security-testing-guide(opens in a new tab)
Verified 9 Nov