Crashing The Port (Failed)

Description

Upload your customs and my python script will detect the price 😎.

Solution

Main page presents Filling a form, but we are soon redirected to /login

Crashing The Port.png

Since we don't have an account we can /register

Creds: test02@ctf.ae:test02@ctf.ae

I uploaded a random file and it just says Checking file

Crashing The Port-1.png

/uploads/t2.py path doesn't exist

Injecting XSS into all fields and attaching HTML with XSS payload also yielded no results...

We can visit /shipments to view our Shipments

Crashing The Port-2.png

When fuzzing for SSTI I replaced filename and it responded with Noooo

Crashing The Port-3.png

It doesn't like {} characters in filename, yet it's still uploaded (?)

Changing filename to just single quote crashes the application and reveals some backend code.

Crashing The Port-4.png

Because check_output has shell=True this means we get free RCE, any bash like commands can be ran here.

Crashing The Port-5.png

Filename has few noticeable restrictions: first no spaces are allowed, we could have used ${IFS} or $IFS as alternative space but nothing.

Tab character () can be used as alternative space.

Crashing The Port-6.png

For me the easiest way to inject characters into burp is to Base64 encode and then decode with Ctrl+Shift+B

Anyway, no flag in sight; but there's a database?

Crashing The Port-7.png

I was able to bypass the / checks by using cd

Exfiltration was pointless 😭

Crashing The Port-8.png

Also cat is blocked, rev too, but not tac or base32 (64 is blocked)

Make life easier:

circle-info

Note: Script is far from complete, decent or anything good..

Now that I have proper LFI we need to A: find the flag or B: get RCE. We can get RCE if we login in Debug Console (it's on since we saw the debug messages)

Console path doesn't work so I guess it's out of the question...

Crashing The Port-9.png

CTF ended and it turns out flag was in fucking ENV 😐

https://media1.tenor.com/m/X13wwMFZN2YAAAAd/dies-cat.gif

Last updated