Find a course

Module 2: Methodology, Reconnaissance and ScanningLesson 3 of 1015 min

The Phases of a Penetration Test

Walk through planning, reconnaissance, scanning, exploitation, post-exploitation and reporting, and meet the frameworks professionals use to stay systematic.

Step 1 of 10Learn

Method beats luck

Movies show hackers typing furiously until a screen flashes ACCESS GRANTED. Real penetration testing looks more like detective work: patient, methodical and heavily documented. A structured method matters for three reasons. It makes coverage consistent, so important areas aren't skipped because the tester got excited about one finding. It makes results repeatable, so a retest after fixes is meaningful. And it makes the work defensible: the client can see exactly what was tested, how and when.

Most methodologies describe roughly the same phases:

  1. Planning and pre-engagement: agree on goals, scope, rules of engagement and authorization.
  2. Reconnaissance: gather information about the target, starting passively.
  3. Scanning and enumeration: actively identify live hosts, open ports, running services and potential weaknesses.
  4. Exploitation (gaining access): attempt to use weaknesses to get a foothold, carefully and within the rules.
  5. Post-exploitation: determine what that access means: escalate privileges, move to other systems, and reach agreed goals such as a specific database, while documenting everything.
  6. Reporting: explain findings, evidence, risk and remediation to the client.
  7. Cleanup: remove accounts, files and tools added during testing, and restore any changed settings.

In practice the phases loop. A foothold on one server reveals a new network, which triggers fresh reconnaissance and scanning from that vantage point.

The phases of a penetration test1. Planningandauthorization2. Recon-naissance3. Scanningandenumeration4.Exploitation5.Post-exploitation6. Reporting7. CleanupIn practice the middle phases loop: a new foothold triggers fresh recon and scanning

Step 2 of 10Practice · Put in order

Put the main phases of a penetration test in order.

Drag the items, or use the arrow buttons, to put them in order.

  1. Reconnaissance
  2. Reporting and cleanup
  3. Exploitation
  4. Planning and authorization
  5. Scanning and enumeration
  6. Post-exploitation

Step 3 of 10Learn

Frameworks professionals use

Several public frameworks guide testers and help clients compare providers:

  • PTES (Penetration Testing Execution Standard) describes the full engagement from pre-engagement interactions through reporting.
  • NIST SP 800-115, the Technical Guide to Information Security Testing and Assessment, from the US National Institute of Standards and Technology, covers planning, techniques and reporting for security assessments.
  • The OWASP Web Security Testing Guide (WSTG) is a detailed checklist for testing web applications, organized by area such as authentication, session management and input validation.
  • MITRE ATT&CK is a public knowledge base of real attacker behavior, organized into tactics (the why, such as initial access, persistence, privilege escalation, lateral movement and exfiltration) and techniques (the how). Red teams use it to plan realistic attack paths, and defenders use the same map to check which techniques they can detect.
  • The Cyber Kill Chain, published by Lockheed Martin, describes an intrusion as a sequence of stages: reconnaissance, weaponization, delivery, exploitation, installation, command and control, and actions on objectives. Breaking any link stops the attack.

The frameworks share a key idea: attacks are sequences, not single events. Each step depends on earlier ones, which gives defenders multiple chances to detect and interrupt an attacker, and gives testers a structured way to show where defenses held and where they failed.

The Cyber Kill Chain: break any link to stop the attackRecon-naissanceWeapon-izationDeliveryExploitationInstallationCommand andcontrolActions onobjectives

Step 4 of 10Practice · Match the pairs

Match each framework to its main purpose.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. MITRE ATT&CK
  2. OWASP WSTG
  3. NIST SP 800-115
  4. Cyber Kill Chain

Step 5 of 10Note

Step 6 of 10Learn

Exploitation and post-exploitation, responsibly

Exploitation means using a weakness to do something the system's designers didn't intend: logging in with a guessed password, running code through a vulnerable service, or reading files through a flawed web page. In professional work, exploitation is controlled. Testers prefer reliable, well-understood techniques, avoid anything likely to crash production systems, and check with the client before risky steps.

After gaining a foothold, post-exploitation answers the question the client really cares about: so what? A foothold on a printer means little; a foothold that leads to the finance database means a lot. Typical activities:

  • Privilege escalation: moving from a limited account to an administrator or system account, for example through a misconfigured service or a missing patch.
  • Lateral movement: using credentials or trust relationships found on one machine to reach others.
  • Persistence (only if the rules allow it): demonstrating how an attacker could maintain access after a reboot.
  • Demonstrating impact: reaching an agreed goal, the so-called crown jewels, and proving it with minimal evidence, such as a screenshot of a record count rather than copying the records.

Throughout, testers keep a detailed activity log: timestamps, commands, source IP addresses and results. It allows the client to match test activity against their own logs, separate test traffic from any real attack, and verify cleanup.

From foothold to crown jewelsFoothold(limitedaccount)PrivilegeescalationLateralmovementCrown jewels:prove withminimalevidence

Step 7 of 10Note

Step 8 of 10Practice · Sort into groups

Sort each activity into the phase where it belongs.

Tap an item, then tap its group (or drag it there).

Step 9 of 10Practice · What would you do?

What would you do?

Midway through a test, a tester realizes a technique they planned could crash the client's main order-processing server, which is in scope. The client is a busy online store, and it's Friday afternoon. What's the professional move?

Step 10 of 10Practice · Fill in the blanks

Fill in the blanks

Moving from a limited user account to an administrator account is called , while using access on one machine to reach other machines is called .