Skip to content
Pwnversity
FUND-METODOLOGIAbasic · 14 min · upd. 2026-11

Pentest Methodology

A pentest isn’t throwing tools at a target until something works. It’s an orderly process that turns “I know nothing about this target” into “I know how to compromise it, I’ve proven it and I can explain it”. The method is what stops you leaving surface unexamined, stops you repeating work, and leaves you at the end with a report someone else can reproduce. Web app, Active Directory or lab machine, the phases are the same; only the tools change.

Without a method, two things always break:

  • Coverage. You latch onto the first interesting port and leave half the surface untouched. The serious flaw is usually exactly where you didn’t look.
  • Traceability. You find something, don’t write down how you got there and, at report time, can’t reproduce it. If you can’t repeat it, for the client it doesn’t exist.

A method turns luck into a repeatable process: you find the flaw because you followed the steps, not because you got lucky.

Before you touch anything, what you’re allowed to do gets signed. That’s what separates a pentest from a crime.

Element What it sets Example
Scope Which targets are in and which are out 10.20.0.0/24 and app.client.lab; mail and VPN are out
Windows When testing is allowed Monday to Friday, 9:00 to 18:00; nothing during month-end close
Forbidden techniques What you don’t do even if it would work Denial of service, social engineering, deleting data
Emergency contact Who you call if something breaks Technical lead with a 24 h phone number
Sensitive data What you do if you find real data Don’t download it; document it with a minimal sample
Written authorisation Who signs and with what authority The system owner, not “someone in IT”

The practical rule is simple: if something isn’t clearly in scope, it’s out. When in doubt, ask before touching it.

The phases and what goes in and out of each

Section titled “The phases and what goes in and out of each”

Each phase takes something from the previous one and hands something to the next. Thinking about it this way tells you when a phase is done and when it isn’t.

Phase In What you do Out
Recon Scope Find out what’s there: live hosts, domains, ports List of targets and services
Enumeration Services Versions, paths, users, shares, parameters Detailed surface and candidate vulnerabilities
Exploitation Candidate vulnerabilities Turn a weakness into access or impact, as non-destructively as possible Access (shell, credentials, data) and evidence
Post-exploitation Access Understand where you are, escalate privileges, look for credentials and paths to other systems New targets, new access
Reporting Everything above Findings, impact, reproduction steps, recommendations The deliverable

Enumeration is the slowest phase and the one that pays off most. Almost everything that gets exploited was found by enumerating well.

The phases aren’t a straight line. Every new foothold (a credential, an internal host, a more privileged user) opens surface you couldn’t see before, and that sends you back to recon and enumeration from the new position.

flowchart LR
    S["Scope and rules"] --> R[Recon]
    R --> E[Enumeration]
    E --> X[Exploitation]
    X --> P[Post-exploitation]
    P -->|"new access or credential"| R
    P --> I[Report]
    E -->|"no clear vector"| R

When you get stuck, it’s almost never about pushing the same exploit harder: something hasn’t been enumerated yet. Go back.

You don’t have to follow them to the letter, but they help you not forget anything and speak the same language as the client.

Framework What it is What you use it for
PTES Penetration testing execution standard, from preparation to report Overall structure of the engagement
OWASP WSTG Testing guide for web applications, with concrete test cases Checklist for the web part
NIST SP 800-115 NIST’s technical guide to security testing Framing the service for clients and auditors
OSSTMM Open testing methodology focused on measuring operational security A more formal, quantitative approach

MITRE ATT&CK isn’t a pentest methodology but a catalogue of tactics and techniques used by real attackers. It’s useful for describing what you did in a language the defensive team understands.

If it isn’t written down, it didn’t happen. Organise the work from minute one with a folder per target:

client-2026-11/
├── scope.md # what was signed, copied verbatim
├── notes.md # timestamped log: what you try, what you see, what you rule out
├── 10.20.0.15/
│ ├── nmap/ # nmap output (-oA)
│ ├── web/ # saved requests and responses
│ ├── loot/ # credentials, hashes, files obtained
│ └── screenshots/ # with date and time in the name
└── report/

Every finding needs: the exact command or request, the output that proves it, the time, and where you ran it from. With that, anyone can repeat it, including you three weeks later.

Time is limited, so not everything gets the same depth. A reasonable order:

  1. What gives direct access: services with default credentials, versions with known exploits, exposed admin panels.
  2. What has the most surface: custom web applications, feature-rich services.
  3. What connects to other systems: a host with reused credentials or access to the internal network.
  4. Weaknesses without direct impact (headers, old versions with no exploit), which get documented but not chased for hours.

Time-box each path. If it hasn’t moved in an hour, note it down and switch; you’ll come back with more context.

Lab / CTF Real engagement
Goal Get the flag or root Find and document risks for the client
Scope The lab machine or network What was signed, not one host more
Noise Doesn’t matter Matters: there may be monitoring and fragile systems
Breaking things You can reset the machine No taking services down or deleting data
Data Fake Real: handled carefully and minimised
Deliverable Optional (writeup) The report is the product
Public exploits Fire them off Read and understand them first, test carefully

Labs train the technique; real engagements add responsibility. Get used to taking notes and respecting scope in the lab too: it’s what you’ll do later.

Set up the target folder and let the terminal record everything you do:

Ventana de terminal
mkdir -p ~/work/lab-01/{nmap,web,loot,screenshots}
cd ~/work/lab-01
script -a -f "session-$(date +%F_%H%M).log"
# Script started, output log file is 'session-2026-11-05_1012.log'.
# From here on, everything you type and its output goes into that file.
# To stop: exit

Initial recon and enumeration, always saving the output:

Ventana de terminal
nmap -sn 10.20.0.0/24 -oA nmap/hosts
# Nmap scan report for 10.20.0.15
# Host is up (0.0011s latency).
# Nmap done: 256 IP addresses (4 hosts up) <- 4 live targets
nmap -p- --min-rate 2000 -oA nmap/10.20.0.15-tcp 10.20.0.15
# PORT STATE SERVICE
# 22/tcp open ssh
# 80/tcp open http
# 8080/tcp open http-proxy <- two web servers: enumerate both
nmap -sCV -p 22,80,8080 -oA nmap/10.20.0.15-services 10.20.0.15
# 80/tcp open http Apache httpd 2.4.52
# 8080/tcp open http Apache Tomcat 9.0.30 <- a specific version: look it up

-oA saves three formats at once (.nmap human-readable, .gnmap for grep and .xml for other tools). For a one-off command run outside script, tee lets you see the output and save it:

Ventana de terminal
curl -si http://10.20.0.15:8080/ | tee web/8080-root.txt # no | head after it: it would truncate the file
# HTTP/1.1 200
# Content-Type: text/html;charset=UTF-8 <- and it's saved in web/8080-root.txt

And in the log, one line per relevant thing, with the time:

10:24 8080 Tomcat 9.0.30. Try /manager/html.
10:31 /manager/html asks for basic auth. Default credentials: no.
10:40 Parked for now; moving to the web server on 80.
Concept What to remember
Scope If it isn’t clearly in, it’s out. In writing and signed.
Rules of engagement Windows, forbidden techniques, emergency contact, sensitive data.
Phases Recon → enumeration → exploitation → post-exploitation → report.
Loop Every new foothold sends you back to enumeration.
Stuck Almost always missing enumeration, not a better exploit.
Enumeration The slowest phase and the one that pays off most.
Evidence Exact command or request, output, time and origin.
nmap -oA Three output formats at once.
script / tee Record the whole session or one command’s output.
Prioritise Direct access, then surface, then what connects. Time-boxed.
PTES · WSTG · SP 800-115 · OSSTMM Full engagement · web · NIST framework · quantitative approach.
ATT&CK Catalogue of techniques, not a methodology.
  1. What two things always break when you work without a method?

    Answer

    Coverage (you leave surface unexamined because you focus on the first thing you see) and traceability (you can’t reproduce how you reached a finding).

  2. During an engagement you find a server that isn’t in scope but looks vulnerable. What do you do?

    Answer

    You don’t touch it. You note it and tell the client contact so they can decide whether to extend the scope in writing. Until then, it’s out.

  3. What does the enumeration phase hand to the exploitation phase?

    Answer

    A detailed surface: exact versions, paths, users, shares and parameters, with the candidate vulnerabilities that come out of them.

  4. You get a user’s credentials on one host. Why does that send you back to recon?

    Answer

    Because they open new surface: services you can now authenticate to, other hosts where they may be reused, and an internal network you couldn’t see before. You need to enumerate from that new position.

  5. You’ve spent an hour on an exploit that doesn’t work. What should you do?

    Answer

    Note what you tried, stop that path and go back to enumeration or another path. Most likely you’re missing information (a different version, path or service), not more attempts.

  6. What does a piece of evidence need so the client can reproduce a finding?

    Answer

    The exact command or request, the output that shows the flaw, the time, and where it was run from.

  7. Why isn’t MITRE ATT&CK a pentest methodology?

    Answer

    Because it doesn’t tell you what order to work in: it’s a catalogue of tactics and techniques used by real attackers. It helps describe what you did, not plan the engagement.