Skills Assessment - File Upload Attacks


I have a problem with solving the Skills Assessment - File Upload Attacks.

Here are the steps I followed:

  1. I created a shell.php file with the following code:
<?php system($_REQUEST['cmd']); ?>`

يُرجى استخدام الرمز بحذر. مزيد من المعلومات


  1. I used a hex editor to convert the file to JPEG format by adding the following bytes:


  1. I changed the file extension to .phar.jpeg.
  2. I uploaded the file to a website and it was successfully uploaded.
  3. I tried to view the source code of the file by going to the following URL:


At this point, I do not get any results, and even viewing the source code does not show any results.

Can some one help me?

Hey! Looks like you are really close.

I would first try to get the source code in a similar way to the Limited File Uploads section. Once you have the upload.php source code you should be able to see what is happening on the back end. The image file gets modified during the upload process.

Take a look at the source code of upload.php and you will see.

I try this code
“”"<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE svg <!ENTITY xxe SYSTEM "php://filter/convert.base64-encode/resource=upload.php &xxe;

But it didn’t work
There’s another way, please?