🔥 40% Off Crucial Exams Memberships — Deal ends today!

44 minutes, 40 seconds remaining!

Certified Ethical Hacker (CEH) Practice Question

While testing a photo-sharing application you discover that its POST /api/upload endpoint saves every incoming file, without modification, directly into the server's public/assets directory and only checks that the request's Content-Type header is exactly image/png. What is the most reliable technique to upload a working PHP web shell through this API under these conditions?

  • Upload a PNG-PHP polyglot that starts with valid PNG header bytes, save it as shell.php, and include your PHP payload after the PNG data.

  • Name the file shell.php%00.png to rely on a null-byte truncation of the extension during upload validation.

  • Issue an HTTP PUT request to replace public/assets/index.html with raw PHP code while keeping the Content-Type set to image/png.

  • Change the Content-Type header to application/x-php and upload a plain PHP script whose filename ends in .png.

Certified Ethical Hacker (CEH)
Web Application Hacking
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot