TL;DR
This guide explains how to perform a ‘black box’ penetration test on a private network without prior knowledge of its systems. It covers planning, reconnaissance, scanning, exploitation, and reporting.
1. Planning & Scope Definition
- Define the scope: Clearly identify which IP addresses, domains, and systems are in scope for testing. Get written permission from the network owner! This is crucial to avoid legal issues.
- Establish rules of engagement (ROE): Document what actions are permitted (e.g., denial-of-service attacks usually aren’t allowed). Include contact information for emergencies.
- Determine testing type: We’re doing a black box test, meaning no prior knowledge is assumed.
- Set objectives: What are you trying to achieve? (e.g., identify vulnerabilities, gain access to sensitive data, assess security posture).
2. Reconnaissance
Gather information about the target network without directly interacting with it.
- Passive reconnaissance: Use publicly available sources.
- WHOIS lookups: Find domain registration details (e.g., owner, contact info).
- DNS enumeration: Discover subdomains and associated IP addresses using tools like
digor online DNS lookup services. Example:dig targetdomain.com - Search engines: Use Google dorks to find exposed information (e.g., login pages, error messages).
- Social media: Look for employee profiles and potential clues about technologies used.
- Active reconnaissance (limited): Perform initial scans from outside the network.
- Ping sweep: Identify live hosts on the target network. Be cautious, as this can be detected.
ping -c 1
- Ping sweep: Identify live hosts on the target network. Be cautious, as this can be detected.
3. Scanning
Identify open ports, services, and vulnerabilities on the target systems.
- Port scanning: Use a tool like Nmap to identify open ports.
nmap -sV -T4(
-sVfor version detection,-T4for faster scan speed – adjust as needed). - Service identification: Determine the services running on open ports. Nmap will attempt to identify these automatically.
- Vulnerability scanning: Use a vulnerability scanner like Nessus or OpenVAS to identify known vulnerabilities. These tools require more setup and configuration.
4. Exploitation
Attempt to gain access to the target systems by exploiting identified vulnerabilities.
- Research exploits: Search for publicly available exploits for the identified vulnerabilities (e.g., on Exploit-DB).
- Exploit selection: Choose an exploit that is appropriate for the target system and your objectives.
- Exploit execution: Carefully execute the exploit, following the instructions provided. Be prepared to handle errors and unexpected behavior.
- Post-exploitation: Once you have gained access, explore the system to gather further information and identify sensitive data.
- Privilege escalation: Attempt to gain higher privileges on the system (e.g., root or administrator).
- Data exfiltration: If authorized, attempt to extract sensitive data from the system.
5. Reporting
Document your findings in a comprehensive report.
- Executive summary: Provide a high-level overview of the testing process and key findings for non-technical stakeholders.
- Technical details: Document all identified vulnerabilities, including their severity, impact, and remediation recommendations.
- Proof of concept (PoC): Include screenshots or other evidence to demonstrate the exploitation of vulnerabilities.
- Remediation recommendations: Provide specific steps that can be taken to address the identified vulnerabilities.

