• Email info@cyberry.co.uk
  • issuing php RFI commands on remote system – changing your apache config file

  • By default, when a request is made by a remote server onto my apache server it will run the request on my host.

    So for example, if I run the php script:




    it will output the id of my system, which is not what I want.

    Instead i want it to treat this as plain text so that the command runs remotely.

    To do this, I need to temporarily comment out the lines in my apache configuration file (/etc/apache2/mods-enabled/php7.0.conf)

    #<FilesMatch “.+\.ph(p[345]?|t|tml)$”>
    # SetHandler application/x-httpd-php

    It is very important that you restart apache for the changes to kick in, so issue the command:

    root@kali~# service apache2 restart

    now when you issue this php request it will provide the remote system details instead of the local ones.

    remember to change it back and restart apache once again when you’ve finished.