Server Side Request Forgery (SSRF)

Introduction

Server Side Request Forgery is a web application vulnerability that allows attackers to make outgoing requests originating from the vulnerable server

Where to find

Usually it can be found in the request that contain request to another url, for example like this

POST /api/check/products HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
Origin: https://example.com
Referer: https://example.com

urlApi=http://192.168.1.1%2fapi%2f&id=1

or

GET /image?url=http://192.168.1.1/
Host: example.com

How to exploit

  1. Basic payload

  1. Hex encoding

  1. Octal encoding

  1. Dword encoding

  1. Mixed encoding

  1. Using URL encoding

  1. Using IPv6

  1. Using bubble text

How to exploit (URI Scheme)

  1. File scheme

  1. Dict scheme

  1. FTP scheme

  1. TFTP scheme

  1. SFTP scheme

  1. LDAP scheme

  1. Gopher scheme

References

Last updated