Mastering Penetration Testing Techniques
Advanced Reconnaissance
Seeing Through Walls
Before a magician performs a trick, they study the stage. Before a general plans a battle, they map the terrain. And before a security professional tests a system's defenses, they perform reconnaissance. This is the art of gathering information, and it's the foundation of any successful penetration test. The goal is to build a detailed map of the target's digital footprint.
Information gathering, or reconnaissance, is the foundation of a successful penetration test.
Reconnaissance comes in two flavors: passive and active. Passive reconnaissance is like being a detective gathering clues from public sources without ever visiting the crime scene. You collect information without directly touching the target's systems. This could involve sifting through company websites, social media profiles, public records, and job postings to understand the organization's structure, technology stack, and key personnel. The goal is to be a ghost; the target should have no idea you're looking.
Passive information gathering is safe and quiet, but it only gets you so far. To get a clearer picture, you need to move on to active reconnaissance.
Knocking on Digital Doors
Active reconnaissance involves directly interacting with the target's systems. This is like the detective deciding to knock on the door and ask a few questions. You're sending packets to their servers, probing their network, and seeing what responds. It’s much more direct and yields more detailed technical information, but it also creates noise. A well-prepared target might detect these probes.
The most common form of active reconnaissance is network scanning. This is where you systematically check a target's network for live hosts, open ports, and the services running on those ports.
Port
noun
A numbered endpoint for connections in a computer network. Different services use different port numbers (e.g., web traffic typically uses ports 80 and 443). An 'open' port means a service is listening for connections.
The undisputed king of network scanning tools is Nmap (Network Mapper). It's a powerful, free utility that can discover which devices are on a network and what services they are offering. This process of identifying services and their versions is called service enumeration.
# This command scans the target IP address.
# -sV: Probes open ports to determine service and version info.
# -p-: Scans all 65,535 possible TCP ports, not just common ones.
# -T4: Makes the scan faster (T5 is fastest, T1 is slowest).
nmap -sV -p- -T4 scanme.nmap.org
Running a scan like this gives you a list of open doors into the system. Knowing not just that a web server is running, but that it's Apache httpd 2.4.52, is incredibly valuable. Specific versions of software often have known vulnerabilities, and this information helps the tester focus their efforts later on.
Intercepting the Mail
Beyond network ports, most modern applications are web-based. To understand how a web application works, you need to see the communication between your browser and the server. This is where a web proxy comes in.
A web proxy is a tool that sits between your browser and the web server. It intercepts, inspects, and can even modify all the HTTP/S traffic going in both directions. It’s like being able to open and read all the mail being sent back and forth.
One of the most popular web proxies is Burp Suite. By channeling browser traffic through Burp, a penetration tester can see exactly how the application is built. They can discover hidden form fields that aren't visible on the webpage, identify all the different API endpoints the application uses, and see how the server uses cookies to manage user sessions.
This deep look into the application's traffic can reveal subtle logic flaws or expose parameters that might be vulnerable to attacks like Cross-Site Scripting (XSS) or Cross-Site Request Forgery (CSRF). Finding these hidden features and data points is a critical piece of reconnaissance for any web application test.
What is the key difference between active and passive reconnaissance in a penetration test?
Which of the following activities is a classic example of passive reconnaissance?
Mastering these reconnaissance techniques provides the detailed map needed to navigate a target's defenses effectively. Without this foundational step, any further testing is just fumbling around in the dark.

