1. The Methodological Penetration Testing Workflow
Professional penetration testing must adhere to rigorous industry standards (such as the Penetration Testing Execution Standard - PTES):
ARCHITECTURE DIAGRAMSYSTEM SCHEMATIC
1. Reconnaissance & OSINT
(DNS enumeration, sublist3r, certificate transparency logs)
|
v
2. Attack Surface Mapping & Vulnerability Scanning
(Nmap port scanning, tech stack fingerprinting via Wappalyzer)
|
v
3. Active Vulnerability Exploitation
(Testing injection points, authentication bypasses, SSRF, IDOR)
|
v
4. Post-Exploitation & Lateral Movement
(Privilege escalation, token harvesting, persistence validation)
|
v
5. Comprehensive Reporting & Remediation Roadmap
(CVSS v3.1 scoring, executive summary, reproduction steps)§
2. Exploiting Server-Side Request Forgery (SSRF)
In cloud-native environments, Server-Side Request Forgery (SSRF) is one of the most critical vulnerabilities. It occurs when a web server fetches a remote resource (such as downloading a profile image from a URL) based on user-supplied input without validating the destination IP address:
ARCHITECTURE DIAGRAMSYSTEM SCHEMATIC
Attacker Vulnerable Cloud Web Server
| |
| HTTP POST /api/fetch-avatar |
| url: "http://169.254.169.254/latest/meta-data/" |
+------------------------------------------------->|
| Outbound GET to
| Local Cloud Metadata
v
[ AWS / GCP Link-Local Metadata Service ]
(169.254.169.254)
|
| Returns IAM Credentials
| (AccessKey, SecretKey, Token)
v
|<-------------------------------------------------+
| Attacker extracts Cloud Admin Credentials!Remediation Best Practices:
- 1Network Segmentation: Block outgoing connections from application tiers to link-local metadata addresses (
169.254.169.254/32) via host firewalls or Kubernetes NetworkPolicies. - 2IMDSv2 (Session-Oriented Metadata): Enforce AWS IMDSv2, which mandates generating a cryptographic session token via HTTP
PUTbefore metadata can be queried—neutralizing simple SSRF queries. - 3Strict Whitelisting: Validate input URLs against an explicit allowlist of domain names; reject all internal IP ranges (RFC 1918:
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,127.0.0.1).