Blank
Writeup for Blank (Web) - Imaginary (2023) 💜
Last updated
Writeup for Blank (Web) - Imaginary (2023) 💜
Last updated
I asked ChatGPT to make me a website. It refused to make it vulnerable so I added a little something to make it interesting. I might have forgotten something though...
Source code is provided, so let's review it before we check .
We need to login as admin to access the /flag
endpoint.
The /login
endpoint appears to be vulnerable to
A users
table is inserted into the database, but no users are added! We'll need to specify the username as admin
and use SQLi to bypass the password check.
Sending a double quote will create an error in the SQL statement, returning 500.
We can use a UNION query, ensuring that the number of columns matches the expected.
Now, we just need to visit http://blank.chal.imaginaryctf.org/flag and receive our flag.
Flag: ictf{sqli_too_powerful_9b36140a}
Additionally, the database type is sqlite3
, so we'll need to