Press "Enter" to skip to content

Tag: SQL

[SEC-T] Naughty ads

Solution http://naughtyads.alieni.se/

So, maybe we can read the source code through http://naughtyads.alieni.se/index.phps ??

We can see that there has a very secure filter for $_REQUEST[‘id’] , but not for $_GET[‘id’]. It do nothing and parse $_GET[‘id’] to the function. So, we can bypass the filter like this

Finally, i got the username and password. Username:webmasterofdoom3755 Password:5ebe2294ecd0e0f08eab7690d2a6ee69 Reverse the md5 here: https://md5.gromweb.com/?md5=5ebe2294ecd0e0f08eab7690d2a6ee69 And found that the real password is secret. Use this identity to login into the website, and fill in the phone number for submit the form, and then the website will give you the flag.

Leave a Comment

[MeePwnCTF2017] Br0kenMySQL

Question

Solution So, the task is we have to set the $row[“username”] to ‘guest’ in first query. But in the second query, we have to make it equals to ‘admin’. Because of each time of guest query, it will add one new record into logs table. I think we can have make a use of it. 1.We have to count the number of rows in logs table without using count funciton.

2.We have to use if funciton in the union select query

If we change 1=1 to 1=2 , the username will be equals to ‘guest’ 3. According to the number of rows in logs table, we can make a query to check is the number are equals something than output something. Here is our final payload:

and have few times of refresh we finally get the flag.

Leave a Comment