1

I have been given a server to hack into for a cyber security class I have taken.

After using dirb to look at the file structure, the only accessible file was the phpinfo.php file. I need to use this file to find the path to other files.

However, I haven't been able to find any useful information yet.

The php version is 5.4.16. The file contains the system version, apache environment, mysql environment, http head information, PHP environment variables, and more.

What are some common exploits I could use with the phpinfo.php file? I'm trying to access more files on the server.

  • 5
    In generally, phpinfo files are not themselves vastly useful targets to exploit, but can point to other potential flaws with a system: looking at what modules are enabled in PHP, the configuration settings for the web server, etc. – Matthew Mar 2 '18 at 14:58
2

As stated in @Matthew's comment, the PHPinfo file itself does not pose a direct vulnerability, nor does it have "common exploits".

However, an exposed PHPinfo page is considered to be an information disclosure vulnerability, and may reveal significant information about other components or configurations which actually may be vulnerable.

As you have mentioned, the page displays version information for PHP, the system, Apache, MySQL; perhaps an online search for the product and version number will reveal some potential next steps (e.g. a search for "PHP 5.4.16 vulnerabilities"). Make sure to investigate the same for any installed modules as well.

If you aren't able to find any vulnerable and exposed software this way, perhaps an issue exists somewhere else on the page, maybe in the configuration of something, but it is impossible for us to know without being able to see the whole page. Identifying the vulnerability may require some background knowledge of the system and the services it is running.

Finally, it is possible that the PHPinfo page is just a small hint or perhaps a red herring, and it may be more fruitful to spend time taking a different approach. But again, it really depends on the situation, and there's no way to know for sure given the information in the question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.