> For the complete documentation index, see [llms.txt](https://kunalwalavalkar.gitbook.io/write-ups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kunalwalavalkar.gitbook.io/write-ups/portswigger-labs/server-side-topics/server-side-request-forgery-ssrf/basic-ssrf-against-another-back-end-system.md).

# Basic SSRF against another back-end system

https\://portswigger.net/web-security/ssrf/lab-basic-ssrf-against-backend-system

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2Fc09uIsXmUHF4cE3bUofS%2F1.png?alt=media&amp;token=76968c58-18ea-4eb9-b164-250541e02d2f" alt=""><figcaption></figcaption></figure>

Let's check out the stock.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FIFSsTJPpMh8gax4YXQKg%2F2.png?alt=media&amp;token=c40207d4-e1d5-469b-9182-2a70128c6df9" alt=""><figcaption></figcaption></figure>

We can intercept the request using Burpsuite and send it to the `Intruder`.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FumYbeY0RtlwLUgKgY1Zg%2F3.png?alt=media&amp;token=5786cbf6-5fdc-445f-9d49-4d02782023d0" alt=""><figcaption></figcaption></figure>

We do not know the IP address of the back-end system. We can find it by fuzzing all the IP addresses in the network.

Let's set the `stockApi` parameter to the following:

```
http://192.168.0.X:8080/admin
```

For the payload, the type is `Numbers` from 1-255.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FXzdiSsDQdflcYe3xkAoV%2F4.png?alt=media&amp;token=d722a498-4835-448e-a6c9-0cee31b15279" alt=""><figcaption></figcaption></figure>

Let's start the attack.&#x20;

After some time we can see the only request that returned a `200` response code is the one where the last field is `59`.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F9JzPqAcDWErriKZTRRxV%2F5.png?alt=media&amp;token=02180c3c-e297-4f84-a1c4-64665e1753de" alt=""><figcaption></figcaption></figure>

This means that the IP address of the backend system is `192.168.0.59`.

Finally, we have to send the request to the `Repeater` and set the `stockAPI` parameter to the following:

```
http://192.168.0.159:8080/admin/delete?username=carlos
```

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F0tFSNg6T2MX2yaSdXoYB%2F6.png?alt=media&amp;token=a1d510fe-ac53-4eaa-ab18-b81175594d61" alt=""><figcaption></figcaption></figure>

We have solved the lab

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FytMqFkZcl2QSrbrWpBDQ%2F7.png?alt=media&amp;token=4eb5386a-0cb4-4f78-8199-24c508980ed8" alt=""><figcaption></figcaption></figure>
