Courseiva
312-50Chapter 18 of 18Objective 12.1

Penetration Testing and Reporting

If you skip penetration testing, you are essentially leaving your organisation's front door unlocked and hoping nobody tries the handle. This concept matters for the 312-50 exam because it is the one skill that ties all your hacking knowledge together: you learn to find vulnerabilities, but you also need to prove you found them, explain how to fix them, and clean up every trace of your work before you leave.

12 min read
Advanced
Updated Jul 23, 2026
Editorial oversight: Johnson Ajibi· Security Systems Architect · MSc IT Security · IEEE Senior Member

A simple way to picture Penetration Testing and Reporting

The Restaurant Health Inspection Analogy

Have you ever wondered how a restaurant gets a perfect score from the health inspector, but you still got food poisoning from their takeaway?

The health inspector walks through the kitchen with a clipboard, checking temperatures, looking for pests, and making sure the cook washes their hands. But here is the catch: the restaurant knows the inspector is coming. They scrub every surface, hide the expired sauce, and train the staff to say "Yes, chef" at the right moments. The inspector sees only what the restaurant wants them to see.

A real penetration test works differently. It is like hiring a secret diner who pretends to be a regular customer but actually tries to sneak into the kitchen, bribe the waiter for the backdoor code, and order food that should make them sick — all without the restaurant knowing when or how they will attack. The restaurant has its normal defences: locks on the doors, a security camera, a rule that only staff can enter the walk-in fridge. The secret diner tests whether those defences actually work when someone is actively trying to break them.

After the test, the diner writes a report that does not just say "You failed." It says "The back door lock is broken, the fridge alarm does not sound, and here are the three steps to fix both problems before a real criminal shows up." That report — with its findings, evidence, and fix recommendations — is the deliverable that turns a scary security test into a practical improvement plan.

How It Actually Works

Penetration testing (often shortened to pentesting) is a controlled, authorised simulation of a cyber attack against a system, network, or application. The goal is not to cause damage: it is to identify security weaknesses before a real attacker does. In the 312-50 exam, you need to understand not just how to run the test, but how to plan it, execute it properly, document every finding, and clean up afterwards so you leave the environment exactly as you found it.

The entire process follows a standard lifecycle with five phases: Planning, Reconnaissance, Exploitation, Post-Exploitation, and Reporting. Each phase has a specific purpose and set of activities.

Phase 1: Planning. Before you touch a single keyboard, you and the client sign a document called a 'Rules of Engagement' (RoE). This document defines the scope: which IP addresses are you allowed to scan? What time of day? Are you allowed to try social engineering on employees? You also agree on the type of test: Black Box (no prior knowledge), White Box (full access to documentation and source code), or Grey Box (some knowledge, like login credentials but no architecture diagrams). The planning phase also includes getting written authorisation from someone with the legal authority to approve the test. Without this, you are committing a crime.

Phase 2: Reconnaissance. This is the information-gathering stage. You use techniques like footprinting (gathering publicly available info from websites, social media, DNS records) and scanning (using tools like Nmap to discover open ports and running services on the target). The goal is to build a map of the target's attack surface — every possible way someone could try to break in.

Phase 3: Exploitation. Now you try to actually break in. Using the vulnerabilities you discovered during reconnaissance (like an unpatched web server or a weak password), you attempt to gain access. You might use tools like Metasploit to deliver a payload that gives you a shell on the target system. The goal here is to prove that the vulnerability is real and that an attacker could use it to gain a foothold.

Phase 4: Post-Exploitation. Once you have access, you perform activities that simulate what a real attacker would do: privilege escalation (trying to become the administrator/root user), lateral movement (accessing other systems on the network), data exfiltration (proving you could steal sensitive data), and maintaining persistence (creating a backdoor account, though in a real test you would typically only prove this is possible, not actually leave the backdoor). This phase demonstrates the business impact of the initial compromise.

Phase 5: Reporting. This is arguably the most important phase. You produce a penetration testing report that documents everything: the methodology used, the vulnerabilities discovered, the evidence (screenshots, log extracts, packet captures), the risk rating for each finding (using a standard like CVSS — Common Vulnerability Scoring System), and actionable remediation recommendations. The report must be clear enough for a non-technical manager to understand the business risk, but detailed enough for a system administrator to fix each issue.

Post-Test Cleanup. After the report is delivered, you must destroy any credentials, backdoors, or tools you left on the target system. This includes removing user accounts you created, deleting uploaded files, reverting configuration changes, and securely wiping any data you collected from the client's environment. If you forget to clean up, you leave the client more vulnerable than when you started.

The penetration testing lifecycle from initial client request to final cleanup and report delivery.

Walk-Through

1

Planning and Preparation

You define the scope of the test, sign the Rules of Engagement (RoE), gather authorisation, and agree on the type of test (Black Box, White Box, Grey Box). This step ensures you stay legal and focused.

2

Reconnaissance

You gather information about the target using passive techniques (e.g., searching public records, social media) and active techniques (e.g., port scanning with Nmap, DNS enumeration). This builds a map of the attack surface.

3

Exploitation

You attempt to exploit the vulnerabilities you discovered. This might involve using a tool like Metasploit to deliver a payload, SQL injection to extract data, or password cracking. The goal is to prove that the vulnerability is real.

4

Post-Exploitation

Once you have access, you escalate privileges, move laterally to other systems, and attempt to exfiltrate sensitive data. This demonstrates the full impact of the initial compromise.

5

Cleanup and Reporting

You remove all tools, accounts, and files you placed on the target system. Then you write the final report with an executive summary, detailed technical findings, CVSS scores, evidence, and remediation recommendations. Finally, you securely delete all client data from your systems.

What This Looks Like on the Job

Imagine you work as a junior penetration tester for a security consultancy called SafeShield. A mid-sized e-commerce company, ShopFast, hires you to run an external penetration test on their main website and public-facing APIs. The goal is to find out whether an attacker could steal customer credit card data.

First, you attend a kick-off meeting with ShopFast's IT manager. You sign a Rules of Engagement document that says: test only between 2 AM and 6 AM on Saturday, do not attempt denial-of-service attacks, and do not social-engineer employees. You also receive a VPN access point for reporting, but no credentials for the target application — this is a Black Box test.

On Saturday at 2 AM, you start reconnaissance. You use Nmap to scan the web server's IP address. You discover ports 80 (HTTP) and 443 (HTTPS) are open, along with port 3306 (MySQL), which should not be exposed to the internet. That is your first finding. You also run a web application scanner called Nikto and discover that the site is running an old version of the Apache web server with a known vulnerability.

At 2:45 AM, you move to exploitation. You find a SQL injection vulnerability in the search box on the product page. You use a tool called SQLmap to extract the database contents, including a table called 'users' that contains email addresses and password hashes. You also find that the password hashes use MD5, a weak algorithm that can be cracked in seconds. You crack a few hashes and prove you could log in as an administrative user.

At 3:30 AM, you escalate privileges. The admin account you cracked has full access to the server's file system. You find a configuration file containing the database connection string with the root password in plain text. You take a screenshot. You then demonstrate lateral movement by using that root password to access the internal database server, which contains a table of customer credit card numbers stored in plain text — a PCI DSS violation.

At 4 AM, you begin cleanup. You delete the SQLmap output files from your local machine, remove any temporary user accounts you created, and verify that the SQL injection payloads you sent did not corrupt any data. You check that the web application is still functioning normally by browsing a few pages. You log out of all sessions and disconnect the VPN.

The next week, you write the report. It includes:

Executive summary: "ShopFast's website has four critical vulnerabilities that could lead to a complete data breach."

Technical findings: Each finding includes a CVSS score, a detailed description, proof of concept screenshots, and a step-by-step remediation guide.

Risk ratings: One critical (SQL injection), two high (exposed MySQL port, plain text passwords), one medium (outdated Apache version).

Remediation: "Patch Apache to version 2.4.51, move MySQL to an internal network, implement parameterised queries, and enforce strong password hashing."

You deliver the report in PDF format and present the executive summary to ShopFast's CTO. You then securely delete all client data from your local drive and close the engagement.

How 312-50 Actually Tests This

The 312-50 exam tests your understanding of the entire penetration testing lifecycle, with heavy emphasis on the planning and reporting phases. Expect around 5-8 questions on this topic, spread across the exam. The questions are designed to make you choose the correct order of phases, the correct document names, and the correct type of test for a given scenario.

Here are the specific concepts the exam loves to test:

The five phases of ethical hacking (Penetration Testing Lifecycle): Reconnaissance, Scanning/Gaining Access (Exploitation), Maintaining Access (Post-Exploitation), Clearing Tracks (Cleanup), and Reporting. The exam may give you a list of activities and ask you to match them to the correct phase. A common trap is confusing 'Maintaining Access' (creating backdoors) with 'Post-Exploitation' (privilege escalation). Remember: Maintaining Access is about persistence; Post-Exploitation is about what you do after you get in.

The types of penetration tests: Black Box, White Box, Grey Box. The exam will give you a scenario like 'the client provides network diagrams but not credentials' and ask you to identify it as Grey Box. Another scenario: 'the tester has no prior knowledge at all' is Black Box. 'The tester has full access to source code and credentials' is White Box.

The Rules of Engagement (RoE) document: This is a legally binding document that defines scope, timing, and authorisation. The exam will ask what is included in the RoE. Common items: type of test, IP range, time window, what is off-limits (e.g., production database), and contacts. It is NOT the same as the test report or the SOW (Statement of Work).

The reporting structure: The exam expects you to know the two main sections of a penetration testing report: the Executive Summary (for management, non-technical, focuses on business risk) and the Technical Report (for IT staff, includes evidence, CVSS scores, and step-by-step fix instructions). A common trap question: 'Which section of the report should the CISO read first?' Answer: the Executive Summary.

CVSS scores: You need to know the CVSS scoring ranges: 0-3.9 (Low), 4.0-6.9 (Medium), 7.0-8.9 (High), 9.0-10.0 (Critical). The exam may give you a CVSS score of 7.5 and ask for the severity level: High.

The difference between a vulnerability assessment and a penetration test. A vulnerability assessment only identifies weaknesses; a penetration test actively exploits them to prove impact. The exam loves this distinction.

Post-test cleanup: The exam asks what must happen after the test. The correct answer always includes removing tools, deleting accounts, reverting changes, and securely destroying client data. A trap: 'Leaving a backdoor for future testing' is wrong — you must remove everything.

Common exam traps: Questions that ask 'Which phase comes after Exploitation?' The correct answer is Post-Exploitation, not 'Reporting' or 'Cleanup.' Also, questions that describe a scenario where the tester uses social engineering without permission — the correct answer is that this violates the Rules of Engagement.

To memorise: the lifecycle order is Reconnaissance -> Exploitation -> Post-Exploitation -> Maintaining Access -> Clearing Tracks -> Reporting. Some sources combine phases, but for the exam, memorise the full list and their definitions.

Key Takeaways

A penetration test has five mandatory phases: Planning, Reconnaissance, Exploitation, Post-Exploitation, and Reporting, with cleanup embedded in the final phase.

The Rules of Engagement (RoE) is a legally binding document that defines scope, timing, authorisation, and what is off-limits — never test without it.

Black Box tests simulate an external attacker with zero inside knowledge; White Box tests simulate a fully informed insider; Grey Box tests fall somewhere in between.

The penetration testing report must always include both an Executive Summary for management and a Technical Report for IT staff, with evidence and CVSS scores.

Post-test cleanup is non-negotiable: remove all tools, accounts, files, and configuration changes you made during the test.

A vulnerability assessment identifies weaknesses; a penetration test proves they can be exploited and demonstrates the business impact.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Black Box Test

Tester has no prior knowledge of the target

Simulates an external attacker with no inside help

Takes more time because the tester must discover everything from scratch

White Box Test

Tester has full knowledge: source code, credentials, network diagrams

Simulates a malicious insider or privileged attacker

Often faster because the tester can focus on deeper analysis

Vulnerability Assessment

Only identifies and lists vulnerabilities

Does not attempt to exploit weaknesses

Produces a list of findings with severity ratings

Penetration Test

Actively exploits vulnerabilities to prove impact

Goes beyond scanning to simulate a real attack

Produces a report with evidence of successful breaches

Executive Summary

Written for non-technical management

Focuses on business risk and high-level impact

Uses plain language with minimal jargon

Technical Report

Written for system administrators and IT staff

Contains detailed evidence, screenshots, and CVSS scores

Includes step-by-step remediation instructions

Reconnaissance Phase

Gathers information about the target

Uses passive and active techniques like scanning

Does not attempt to break in

Exploitation Phase

Attempts to break into the system

Uses tools to exploit identified vulnerabilities

Proves that a vulnerability is exploitable

Watch Out for These

Mistake

A penetration tester only needs to find one vulnerability and exploit it, then the job is done.

Correct

A proper penetration test requires documenting every vulnerability found, attempting multiple exploitation paths, and providing a comprehensive report with remediation steps. Finding one hole is not enough; you must demonstrate the full scope of risk.

Movies and TV shows often show hackers finding one 'backdoor' and instantly owning the system. In reality, a real attacker would chain multiple vulnerabilities together, and the client needs to know all of them to fix their security posture.

Mistake

Post-test cleanup is optional as long as you did not cause any damage.

Correct

Cleanup is mandatory. You must remove any accounts, files, scripts, or tools you placed on the target system, and revert any configuration changes you made. Failure to do so leaves the client vulnerable and could create legal liability.

Many beginners think that since they only ran scans and did not install anything, no cleanup is required. But even a simple SSH key you uploaded for access is a backdoor that a real attacker could find and use.

Mistake

The penetration testing report should be written only for technical staff.

Correct

A good report has two sections: an Executive Summary for non-technical management (focused on business risk and high-level recommendations) and a Technical Report for IT staff (with detailed evidence, CVSS scores, and fix instructions).

Beginners often write reports full of jargon and technical details, forgetting that the person who approves the budget (the CISO or CEO) needs to understand the business impact, not just the exploit code.

Mistake

You can start a penetration test as soon as the client asks you to, without any paperwork.

Correct

Before any testing begins, you must have a signed Rules of Engagement (RoE) document and written authorisation from a person with legal authority to approve the test. Without this, you are committing unauthorised access — a crime.

The urgency to 'fix the problem right now' often leads testers to skip the legal step. In many jurisdictions, even well-intentioned security testing without permission is illegal under computer misuse laws.

Mistake

A vulnerability assessment and a penetration test are the same thing.

Correct

A vulnerability assessment only identifies and lists vulnerabilities (e.g., missing patches). A penetration test actively exploits those vulnerabilities to prove they are real and to determine the business impact. Penetration testing goes a step further.

The terms are often used interchangeably in casual conversation, even by IT professionals. The exam specifically tests the distinction, so beginners must understand that exploitation is what separates a pentest from a vuln scan.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the difference between a vulnerability assessment and a penetration test?

A vulnerability assessment scans for known weaknesses (like missing patches) and lists them. A penetration test goes further by actively trying to exploit those weaknesses to prove they can be used to gain unauthorised access or cause harm.

Do I need a signed document before I start a penetration test?

Yes, absolutely. You need a signed Rules of Engagement (RoE) document and written authorisation from someone with legal authority. Without it, your actions could be considered illegal hacking.

What is a Black Box penetration test?

A Black Box test gives the penetration tester no prior knowledge of the target's internal systems, network architecture, or credentials. The tester starts with only publicly available information, simulating an external attacker.

What is the CVSS score range for a 'Critical' vulnerability?

A vulnerability with a CVSS score between 9.0 and 10.0 is classified as 'Critical.' Scores from 7.0 to 8.9 are 'High,' 4.0 to 6.9 are 'Medium,' and 0 to 3.9 are 'Low.'

What should I include in the Executive Summary of a penetration testing report?

The Executive Summary should be non-technical and focus on business risk: how many critical vulnerabilities were found, what the potential impact is (e.g., data breach, financial loss), and high-level recommendations for fixing them.

What is the difference between the Planning phase and the Reconnaissance phase?

The Planning phase is about legal and logistical preparation: signing contracts, defining scope, and getting permissions. The Reconnaissance phase is the actual technical step of gathering information about the target.

Terms Worth Knowing

Keep going

You've finished Penetration Testing and Reporting. Continue through the 312-50 study guide to build a complete picture of the exam.

Done with this chapter?