-
Inspecting the website, we can see that the flag is hidden under a canvas
-
We can remove the line above the flag image to reveal the flag
tjctf{pretty_canvas_577f7045}
c = conn.cursor()
string = "SELECT description FROM notes WHERE owner == '" + name + "';"
c.execute(string)
- We can perform an SQL injection whereby if we put
' OR 1=1; --
in theName
field, the SQL command above will become"SELECT description FROM notes WHERE owner == '' OR 1=1; --';"
. The--
turns everything behind it on that line into a comment, and since'' OR 1=1
always returnTrue
, the website will display everything from everyowner
in the database. - Since
admin
is the first entry in the database, the first few lines displayed will contail the flag.
tjctf{swill_sql_1y1029345029374}