Penetration Testing Core Refresher
Planning and Scoping
Before You Hack
Professional penetration testing isn't about wildly attacking a system to see what breaks. It's a controlled, methodical process that starts with a solid plan. Think of it less like a chaotic movie hacking scene and more like a carefully planned military operation. The first and most critical phase is all about planning and scoping, which sets the foundation for everything that follows.
This initial stage is where you draw the map, agree on the destination, and set the rules for the journey. Without this step, a security test could cause accidental damage, cross legal lines, or simply fail to test the right things. The most important document created here is the (RoE).
Clearly define the scope – it is critical to define the scope of your penetration test, both to keep your client happy and to avoid ethical and legal issues.
Defining the Scope
Scope defines the technical boundaries of the test. It's a precise list of what you are allowed to test and what is strictly off-limits. Think of a home inspector: they are hired to inspect the house, but not the neighbor's shed. Trying to test systems outside the agreed-upon scope is not only unprofessional but can also have serious legal consequences.
The scope is usually defined by specific IP addresses, network ranges, or application URLs. For example:
- In-Scope: The corporate website at
www.example.comand the employee login portal atlogin.example.com. - Out-of-Scope: The third-party payment processor linked from the website or any other systems not explicitly listed.
Sticking to the scope protects both the tester and the client. It prevents accidental service disruptions and ensures the testing effort is focused on the systems the client is most concerned about.
Testing Models
Once you know what you're testing, you need to decide how you'll approach it. This is determined by how much information the client gives you beforehand. There are three primary models, each simulating a different type of attacker.
| Testing Model | Information Provided to Tester | Simulates an... |
|---|---|---|
| Black-Box | None. Only the target name or URL. | External attacker with no prior knowledge. |
| White-Box | Everything. Source code, architecture diagrams, user credentials. | Insider threat or a developer looking for flaws. |
| Grey-Box | Some. Basic user credentials, general knowledge of the system. | External attacker who has gained some initial access. |
In a black-box test , the tester starts with zero inside information, just like a real external hacker would. It's a great way to see what a determined outsider could discover. A white-box test is the opposite; the tester gets full access to the system's blueprints. This allows for a much deeper and more thorough code and infrastructure review, often finding vulnerabilities that a black-box test would miss.
Grey-box testing is a hybrid approach. The tester might be given a standard user account to see how much damage they could do with limited, non-privileged access. This is useful for simulating what a typical employee or a customer could potentially exploit.
Legal and Professional Groundwork
The single most important document in this phase is the written authorization. You must have explicit, written permission from the system owner before you begin any testing activities. This document is what legally separates a professional penetration tester from a criminal hacker.
No permission, no test. It's the golden rule of ethical hacking.
This pre-engagement documentation typically includes the Rules of Engagement, a detailed scope, and often a liability waiver. This paperwork ensures everyone understands the objectives, constraints, and potential risks. It establishes a professional relationship built on trust and clear communication, setting the stage for a successful and valuable security assessment.
What is the most critical element that legally distinguishes a professional penetration tester from a criminal hacker?
A company hires you for a penetration test. They provide you with full network diagrams, source code for their applications, and administrator-level credentials. What type of test is this?
With a solid plan in place, the tester is ready to move on to the more active phases of the engagement.
