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

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.

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.

If we attempt to upload jpeg we get different output with a comment:
File upload tricks and checklist:

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 !
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:
Flag: GPNCTF{WHA7_A_8AnGEr_1_DEC14re_yoU_WINNeR!}
Last updated