Image Contest

Description

You have technicians here, making noise, they are not artists because no one has submitted any art yet. Which is exactly what you need to do: submit a banger image and win the flag. Sadly, the image contest doesn't end until the end of the CTF, so you will need to expedite the process.

Solution

Image_Contest.png

We are dropped into Image Contest, our username is Suspicious, ID 7308 and we can't logout. +No cookies.

We are allowed to upload image files on server.

Image_Contest-1.png

There's very small changes to the uploaded file and original file; Most probably some metadata got stripped off, but that's about it.

File upload seems to be restricted to only single file. If you upload image A, then upload B, A is deleted and B stays; Name stays the same.

After some messing around we get our first error message.

Image_Contest-2.png

If we attempt to upload jpeg we get different output with a comment:

File upload tricks and checklistarrow-up-right:

Image_Contest-3.png

Looks like JPEG is a dead end.

As always synacktiv with bombarding PHP posts... Persistent PHP payloads in PNGs: How to inject PHP code in an image – and keep it there !arrow-up-right

I managed to solve challenge after the CTF ended. (My laptop managed to fry itself, twice. Now that it's on life support I scrambled help from Discord and managed to get challenge, fun)

Trickiest part was identifying that image/TYPE saves the files as that extension and there's no check against PHP 😡

Anyway here's the whole thing:

circle-check

Last updated