So I found a file uploader on example.com
. The file uploader accepts every file extension and the file is uploaded inside the directory
/temp/random-numeric-id.php
I tried to upload a php file and it got uploaded, however when I access that file, the content of the file is read as html comment. For example, I uploaded a file with content <?php print(123); ?>
and when I visit example.com/temp/111111111.php
I see a blank page because my php code has became the following:
<!--?php print(123); -->
Is this some kind of protection mechanism? How can I bypass this to execute my print functionality with php on that server?
X-Requested-With: XMLHttpRequest
header. It also supports json and html but no php request in sight.<%
is also used by jsp and very probably other templating languages.Apache
based, could it be that they didn't install php on it?