Question 37 of 504
Security Operations and AdministrationhardMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is to validate file extension and content type on the server side, as this directly prevents webshell upload through server-side validation. Without this control, an attacker can bypass client-side filters by crafting a file with a legitimate extension but containing executable PHP code, and server-side checks of both the extension and the actual MIME type magic bytes ensure that only expected, non-executable file types are accepted. On the Systems Security Certified Practitioner SSCP exam, this concept tests your understanding of secure file upload mechanisms and the principle that client-side validation is never sufficient for security. A common trap is to assume that disabling PHP execution in the upload directory or relying on a WAF is enough, but these are compensating controls that can be evaded. Memory tip: think “two gates” — extension and content type — both must be locked server-side to stop a webshell from slipping through.

SSCP Security Operations and Administration Practice Question

This SSCP practice question tests your understanding of security operations and administration. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

During a security assessment, a penetration tester discovers that a web application allows users to upload files without proper validation. The tester successfully uploads a PHP web shell. Which control would have MOST effectively prevented this exploitation?

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Validate file extension and content type on the server side.

Option D is correct because server-side validation of both file extension and content type (e.g., MIME type magic bytes) is the most effective control to prevent uploading executable files like a PHP web shell. Without this validation, an attacker can bypass client-side checks and upload a malicious script that the server will execute. Disabling PHP execution in the upload directory (Option A) is a compensating control but does not prevent the upload itself, and a WAF rule (Option B) can be evaded with obfuscation or encoding.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Disable PHP execution in the upload directory.

    Why it's wrong here

    This prevents execution but does not prevent uploading the file itself.

  • Implement a WAF rule to block common webshell patterns.

    Why it's wrong here

    WAF can be bypassed with obfuscation.

  • Enable audit logging for file uploads.

    Why it's wrong here

    Logging does not prevent the upload.

  • Validate file extension and content type on the server side.

    Why this is correct

    Proper validation blocks malicious files at upload.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often choose Option A (disabling PHP execution) because it seems like a direct fix, but the SSCP exam tests the principle that preventing the upload of malicious files (input validation) is more fundamental than mitigating execution after the fact.

Detailed technical explanation

How to think about this question

Server-side file validation should check both the file extension (e.g., .php, .asp) and the actual content type by reading the file's magic bytes (e.g., the first few bytes of a PNG file are 89 50 4E 47). Attackers often use double extensions (e.g., shell.php.jpg) or null byte injection (e.g., shell.php%00.jpg) to bypass weak checks. In a real-world scenario, a missing validation allowed the 2017 Equifax breach where a vulnerable Apache Struts file upload component was exploited.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A security team runs a vulnerability scan on a web application and discovers an unpatched SQL injection flaw. The team prioritises remediation by CVSS score — critical flaws are patched within 24 hours, high within 7 days. Questions like this test whether you understand vulnerability management processes, scanning tools, and remediation prioritisation.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related SSCP practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SSCP practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SSCP question test?

Security Operations and Administration — This question tests Security Operations and Administration — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Validate file extension and content type on the server side. — Option D is correct because server-side validation of both file extension and content type (e.g., MIME type magic bytes) is the most effective control to prevent uploading executable files like a PHP web shell. Without this validation, an attacker can bypass client-side checks and upload a malicious script that the server will execute. Disabling PHP execution in the upload directory (Option A) is a compensating control but does not prevent the upload itself, and a WAF rule (Option B) can be evaded with obfuscation or encoding.

What should I do if I get this SSCP question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This SSCP practice question is part of Courseiva's free ISC2 certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SSCP exam.