SSRF Exploitation
SSRF exploitation uses a confirmed server-side request to reach internal services, cloud metadata endpoints, and internal APIs not accessible externally. Confirm SSRF with an out-of-band callback first through SSRF detection before probing internal infrastructure.
AWS IMDS Credential Theft
The AWS Instance Metadata Service exposes IAM role credentials at 169.254.169.254. This is the highest-impact SSRF target in cloud environments:
ec2-role-name
{
"AccessKeyId": "ASIA...",
"SecretAccessKey": "abc123...",
"Token": "AQoD...",
"Expiration": "2026-03-28T18:00:00Z"
}
Use the returned credentials directly from your Kali machine to enumerate AWS resources:
Internal Service Access
Use SSRF to reach internal services not exposed externally. Target common internal ports:
<html><title>Admin Panel</title>
-ERR wrong number of arguments for 'get' command
A Redis error response means the SSRF reached an unauthenticated Redis instance. Send Redis commands through the SSRF to write SSH keys or a web shell to disk.
Internal Network Scanning
Use SSRF to map the internal network by probing private IP ranges:
200 10.0.0.5 200 10.0.0.12 401 10.0.0.20
SSRF Filter Bypasses
When the application blocks obvious internal addresses, try alternative representations:
The same integer, hex, and short-form encodings apply to any blocklisted destination, including the cloud metadata address shown above. Encode it the same way to slip past a filter that only matches the literal string.
References
-
PortSwigger — SSRFportswigger.net/web-security/ssrf (opens in new tab)
Internal service targeting and bypass techniques
-
AWS — IMDS Endpointsdocs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html (opens in new tab)
Metadata service paths for IAM credential retrieval
Was this helpful?
Your feedback helps improve this page.