tl;dr
- Rename table and exploit SQL Injection to get the flag.
#
Challenge Description
Who let the blacklists out?
#
Source Code
| |
#
Analysis
- Parameters
userandpassare directly fed into the query and might cause SQL Injection. - The filters applied for the parameters are not strong enough.
- Multiple queries can be executed at a time since
multi_queryfunction is used. - Inserting single quotes are not allowed.
#
Solution
Inserting
\as value foruserparameter causes a part of the query to be treated as a string, and thepassparameter can be used for SQL Injection. The query becomes