Phpmyadmin Hacktricks Exclusive
If you obtain valid credentials (either via brute-force, default settings, or credential stuffing), your privileges within the database determine your next steps. Arbitrary File Read via SQL (LOAD DATA INFILE)
: Older versions sometimes left /scripts/setup.php or /setup/index.php accessible without authentication, potentially allowing configuration manipulation.
The flaw allows an attacker to include files via the target parameter.
UDF allows you to extend MySQL functionality with custom functions written in C/C++. Using MySQL root access, you can create functions that execute operating system commands, effectively escalating from SQL access to system-level command execution. phpmyadmin hacktricks
phpMyAdmin is a widely used web-based interface for managing MySQL and MariaDB databases. Because it often has direct access to sensitive data, it is a frequent target for security auditors and attackers alike. This guide compiles essential enumeration techniques, configuration flaws, and exploitation vectors associated with phpMyAdmin, structured similarly to the popular HackTricks information security wiki. 1. Initial Enumeration and Reconnaissance
Identifying the exact version of phpMyAdmin and its configuration is the first step in assessing its security posture. Version Fingerprinting
If credentials are obtained, or if the version is outdated, you can escalate privileges. A. CVE-2018-12613 (RCE via File Inclusion) If you obtain valid credentials (either via brute-force,
The most secure method is to make phpMyAdmin accessible only via a VPN or SSH tunnel . Authentication & Credential Security:
To mitigate these risks, administrators should implement defensive best practices:
Check accessible static text assets such as /README , /ChangeLog , or /RELEASE-DATE-X.X.X . UDF allows you to extend MySQL functionality with
: If you have write permissions to log directories, you can inject PHP code into a log and then use a file inclusion vulnerability to execute it. 4. Remediation & Hardening To secure a phpMyAdmin installation, follow these HackTricks recommendations: Immediate Patching
To execute this attack, the absolute path of the web directory must be known (often leaked via phpMyAdmin error messages or PHP info pages).
An authenticated user can execute malicious scripts through the "Insert" tab functionality. CVE-2022-0813 (Information Disclosure):
Pentesting phpMyAdmin: A Comprehensive Guide via HackTricks Methodology