SSRF
Server Side Request Forgery: Methodology, payloads, tools

Detection - Vulnerable Parameters
Basic payload
Paylod List
SSRF to LFI
File Inclusion LFI / RFIFinding SSRF with Burp
Match: https?:\/\/(www\.)?[-a-zA-Z0–9@:%._\+~#=]{1,256}\.[a-zA-Z0–9()]{1,6}\b([-a-zA-Z0–9()@:%_\+.~#?&//=]*)
Replace: https://{YOUR_SERVER}/ (Burp Collaborator)

Source: https://x.com/intigriti/status/1848288871735320916?t=bTTpk3N1LoqLpO1768DhQw&s=03
Port scan

List of common ports
Filter Bypass
Burp extension
Decimal notation
Other notation

More payload: https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/url-format-bypass
IP encoding
Here IP 8.8.4.4 (Google DNS) is used:
Use your own server to redirect on localhost
redirector.py:
Run redirector server:
Vicitim payload: http://[YOUR_IP]


DNS Rebinding

Also try 127.0.0.1 and 169.254.169.254

More payloads
Also check Paylaod List
Cloud Metadata IP
URL / Host Validation Bypass

Replace "{CANARY_TOKEN}" with your controlled hostname and replace "example.com" with a whitelisted target host.
Bypassing protocol whitelists
URL Schemes
file://, dict://, sftp://, ldap://, tftp://, gopher://
Gopher
Blind SSRF with OOB
Exploit Blind SSRF with OOB Techniques - TCM SecurityTCM Security - Penetration Testing & ConsultingSee Use your own server to redirect on localhost
Platform to receive HTTP & DNS callbacks for SSRF (Blind) - interactsh
SSRF (XSS) in PDF Generator
XSSPDF Generator - SSRF in .NET Application to RCE
Look for encryption keys in web.config
Craft a ViewState payload that executed a PowerShell command to exfiltrate server information
NextJS apps
Next.jsCVE-2024-34351 - fixed in v14.1.1.
Tools
SSRFmap
Autossrf
0dSSRF
SSRFPwned
Interesting Books
Interesting BooksThe Web Application Hacker’s Handbook The go-to manual for web app pentesters. Covers XSS, SQLi, logic flaws, and more
Bug Bounty Bootcamp: The Guide to Finding and Reporting Web Vulnerabilities Learn how to perform reconnaissance on a target, how to identify vulnerabilities, and how to exploit them
Real-World Bug Hunting: A Field Guide to Web Hacking Learn about the most common types of bugs like cross-site scripting, insecure direct object references, and server-side request forgery.
Support this Gitbook
I hope it helps you as much as it has helped me. If you can support me in any way, I would deeply appreciate it.
Resources
Last updated

