Web Exploitation
Ingfokan Lokasi Takjil 🥇
52
Redirection
28
TobTobiTobTobTobiTobTobTobiTobTobTobali
24
Ingfokan Lokasi Takjil
Description
Author: Max The Computer Fox
Max dan teman teman nya sedang berencana untuk mencari takjil sebanyak mungkin untuk entar dimakan bersama saat buka nanti, tetapi mereka harus cepat sebelum takjil takjil yang di jual habis. Merekapun membuat platform untuk membagikan lokasi lokasi takjil yang dapat mereka kunjungi secara privat, apakah anda dapat menemukan vulnerabilitas di platform mereka untuk mencari lokasi takjil favorit Max?
Connect: http://playground.tcp1p.team:11451
Initial Analysis
We are given a website:

There's one post, that is password protected at http://playground.tcp1p.team:11451/post/67d832eb9b9bf9605608a3ab

Source Code Analysis
We are given a source code file, the directory tree is like this:
We can conclude that this is a python web app. We take a look at app.py
There's an interesting piece of code here:
It basically checks if the password in a JSON format, it will serialize it into a JSON object. Then it will pass it into this code:
Exploitation
Since the app used MongoDB as its database, this piece of code is vulnerable to NoSQL Injection.
Basically we can use a JSON object to inject the MongoDB query to this:
This will make the MongoDB queried password ≠ "bukanrilpassword". Since the password is obviously not "bukanrilpassword". This query injection passes the checks, returns true, and we get the flag.
Thus, the payload is:
We put this into the password field and we got the flag!

Flag: RAMADAN{T4kj1lnya_K3mana_Ab4ngkuh}
Redirection
Description
Author: dimas
Can you do open redirection on youtube?
Connect: http://playground.tcp1p.team:16787
Initial Analysis
We are given a website:

Nothing interesting.
Source Code Analysis
We are given a single source code:
This code basically will redirect, only if the URL supplied, passes this regex:
And to get the flag, we need to control where it redirects to get the FLAG parameter. Thus we need an Open Redirect Vulnerability on YouTube.
Exploitation
After looking for a while, there's apparently an Open Redirect vulnerability on YouTube. Based on this writeup:

So i used the first payload, adjusted it to my webhook, and it apparently worked😂.

Flag: RAMADAN{open_redirection_on_youtube_is_really_handy}
TobTobiTobTobTobiTobTobTobiTobTobTobali
Description
Author: DJumanto
Cat Tobitob decided to make a gift card page, so you can say "Happy ramadhan", to your relatives :D
Connect: http://playground.tcp1p.team:8888
Initial Analysis
We are given a website:

And if we input something, our input gets reflected.

Source Code Analysis
We are given a source code, the directory tree looks like this:
Looking at the app.py file:
We can see there's a vulnerability at this line:
The render_template_stringfunction is vulnerable to SSTI (Server Side Template Injection). And since we can control what is passed to the template here:
We can just use the template syntax to get RCE.
To confirm our theory, we can inject simple payload like {{ 7 * 7 }} and see if it returns 49.

Exploitation
There are several functions that we cannot use, defined by this array:
We can use one of the payloads from HackTricks and adjust them:
We can see the provided <class 'object'> by using this payload:

Since our flag name is randomized, we need a class where we can do code execution to execute lsand cat . There is <class 'subprocess.Popen'> class to do just that at index 370.
In the end i used this payload:

And since we know the flag file name, we can read it with this payload:

Flag: RAMADAN{"Setor_Hafalan_Dulu_Gak_Sih_TobTobiTobTobTobiTobTobTobiTobTobTobaliXD"}
Last updated
