On a server of mine I have a current version of phpMyAdmin running. Unfortunately (my bad I knew I had to delete this folder for security after installation, I simply forgot... dangit) I still had the setup folder still in the phpMyAdmin's root directory, so anybody who accessed my server with http://example.com/phpMyAdmin/setup.php
had access to the setup site.
Today I found this in my nginx access.log files (excerpt):
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.1.1.0-all-languages/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.0.1.0/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.1.2.0/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.1.2.0-english/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin2/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.1.2.0-all-languages/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.1.0.0/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin3/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-2/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.0.1.0-english/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-2.9.2/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [02/Mar/2016:21:03:22 +0100] "GET //phpMyAdmin-3.0.0.0-all-languages/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [04/Mar/2016:05:02:58 +0100] "GET //phpMyAdmin/scripts/setup.php HTTP/1.1" 301 185 "-" "-"
SOMEBADIP - - [26/Feb/2016:10:10:58 +0100] "GET /phpMyAdmin/scripts/setup.php HTTP/1.1" 301 185 "-" "ZmEu"
This looks like the attacker used a script, to scan my main domain for the folders listed above. What I don't understand is, why does he use //
rather than /
because http://example.com//phpMyAdmin/setup.php
would directly end in an invalid path / redirection.
Second of all I was using a subdomain for phpMyAdmin, no folder structure which renders this attack completely useless because there is no such folder structure on my server that the attacker's script tried to find.
What I am currently wondering is, what could potentially happen if a attacker has success with such an attack on phpMyAdmin? What could he do with it?