WakeWill blog

Penetration Testing Explained: The Phases of an Ethical Hack

A penetration test is an authorised, simulated attack. Here are the phases professionals follow, from scoping and rules of engagement to the final report.

Cover image for: Penetration Testing Explained: The Phases of an Ethical Hack

A penetration test is an authorised attempt to break into an organisation’s systems, done so the weaknesses can be fixed before real attackers find them. The difference between a pentester and a criminal is permission, scope and the report at the end.

Important: never test systems you do not have written permission to test. Unauthorised testing is illegal in almost every country, including under Sweden’s criminal code on data breach (dataintrång).

1. Scoping and rules of engagement

Before any testing, the client and the tester agree in writing on:

  • What is in scope: IP ranges, domains, applications, cloud accounts, offices.
  • What is out of scope: for example production databases, third-party services, or social engineering of certain staff.
  • When testing may happen, and who to call if something breaks.
  • The type of test: black box (no information), grey box (some information, such as a user account) or white box (full information, including source code).

2. Reconnaissance

Gathering information, first passively, without touching the target: public websites, DNS records, certificate transparency logs, job ads that reveal technologies, leaked credentials and employee details on social media (OSINT). Then actively: scanning to find live hosts, open ports and running services.

3. Vulnerability analysis

Matching what was found against known weaknesses: outdated software with known CVEs, default passwords, misconfigurations, weak TLS settings and application flaws. Automated scanners help, but a good tester verifies each finding manually and removes false positives.

4. Exploitation

Carefully proving that a weakness is real and showing its impact, for example gaining access to an application, reading data the tester should not see, or getting a shell on a server. Professionals choose methods that will not crash systems or destroy data.

5. Post-exploitation

Answering “so what?”: what can an attacker reach from here? This includes privilege escalation, lateral movement to other systems, and demonstrating access to the client’s most important assets, the “crown jewels”.

6. Reporting

The report is the actual product. A good report contains:

  • An executive summary in plain language for management.
  • Each finding with severity, evidence, business impact and clear remediation steps.
  • What was tested, how and when, so results can be reproduced.

7. Remediation and retest

The client fixes the issues, and the tester retests to confirm the fixes work.

  • Vulnerability scan: automated and broad, but no exploitation or human analysis.
  • Red team: a longer, goal-based exercise that also tests detection and response, often including social engineering.
  • Bug bounty: public or private programmes that pay independent researchers for valid findings within published rules.

Key takeaways

  • Permission and scope come first, always in writing.
  • The phases are scoping, reconnaissance, vulnerability analysis, exploitation, post-exploitation, reporting and retest.
  • The report and the fixes are what make a pentest valuable.

This guide was prepared with AI assistance.

Spotted an error or have more information? Contact the editor.