- A
Move the database to a separate internal server and require VPN access for administration.
Why wrong: This addresses database exposure but does not prevent the initial command injection attack on the web server.
- B
Upgrade the PHP version to the latest release and enable SELinux.
Why wrong: Upgrading PHP may not fix the specific vulnerability if it is application-level, and SELinux would not prevent command injection in the web context.
- C
Remove the legacy script and update the firewall to block all traffic except necessary IPs.
Why wrong: While removing the script helps, blocking all traffic except necessary IPs is impractical for a public web server and does not prevent future application-level attacks.
- D
Implement a web application firewall (WAF) with virtual patching for the vulnerability.
A WAF can block the exploit and similar attacks without requiring code changes, providing immediate protection.
Quick Answer
The correct answer is implementing a web application firewall with virtual patching for the vulnerability. This approach is most effective because virtual patching allows the WAF to inspect incoming HTTP POST requests and block malicious payloads targeting the legacy script, providing immediate protection without requiring any changes to the underlying PHP code. On the ISC2 Certified in Cybersecurity CC exam, this scenario tests your understanding of compensating controls—specifically, how a WAF can mitigate application-layer attacks when a permanent fix is not immediately feasible. A common trap is choosing to simply update firewall rules or disable the script, but those options fail to address the specific exploit vector or may break functionality. Remember the mnemonic WAF-VP: When Application Fixes are delayed, Virtual Patching provides instant protection.
ISC2 CC Security Principles Practice Question
This CC practice question tests your understanding of security principles. Examine the command output carefully: the correct answer depends on what the output actually shows, not on general recall alone. 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.
A small e-commerce company hosts its web application on a single server with a public IP address. The server runs a Linux OS with Apache, MySQL, and PHP. The company recently experienced a data breach where an attacker gained access to the customer database. The investigation reveals that the attacker exploited a vulnerability in the PHP application to execute arbitrary commands. The server logs show that the attacker used an unauthenticated HTTP POST request to a legacy script that should have been removed. Additionally, the server had default firewall rules allowing all inbound traffic on ports 80 and 443. The company wants to prevent future breaches without redesigning the entire application. Which course of action is the most effective?
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
Implement a web application firewall (WAF) with virtual patching for the vulnerability.
Option D is the most effective because it provides immediate protection against the exploited vulnerability without requiring application redesign. A WAF with virtual patching can inspect HTTP POST requests to the legacy script and block malicious payloads, even if the underlying code remains vulnerable. This approach addresses the root cause (the unauthenticated exploit) while allowing the company to maintain operations and plan a permanent fix.
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.
- ✗
Move the database to a separate internal server and require VPN access for administration.
Why it's wrong here
This addresses database exposure but does not prevent the initial command injection attack on the web server.
- ✗
Upgrade the PHP version to the latest release and enable SELinux.
Why it's wrong here
Upgrading PHP may not fix the specific vulnerability if it is application-level, and SELinux would not prevent command injection in the web context.
- ✗
Remove the legacy script and update the firewall to block all traffic except necessary IPs.
Why it's wrong here
While removing the script helps, blocking all traffic except necessary IPs is impractical for a public web server and does not prevent future application-level attacks.
- ✓
Implement a web application firewall (WAF) with virtual patching for the vulnerability.
Why this is correct
A WAF can block the exploit and similar attacks without requiring code changes, providing immediate protection.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
ISC2 often tests the misconception that removing the vulnerable component (Option C) is sufficient, but the trap is that the question asks for preventing future breaches without redesigning the entire application, meaning a WAF provides ongoing protection against similar exploits in other parts of the application, whereas simply removing one script leaves other potential vulnerabilities unaddressed.
Trap categories for this question
Command / output trap
This addresses database exposure but does not prevent the initial command injection attack on the web server.
Detailed technical explanation
How to think about this question
A WAF operates at Layer 7 (application layer) and can analyze HTTP request bodies, headers, and parameters for known attack patterns (e.g., command injection via POST data). Virtual patching creates a rule that mimics a security patch without modifying the application code, allowing the WAF to drop requests matching the exploit signature. In real-world scenarios, this is critical for legacy systems where code changes are risky or delayed, as the WAF can block the exact payload used in the breach while the team schedules a permanent fix.
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.
- →
Security Principles — study guide chapter
Learn the concepts, then practise the questions
- →
Security Principles practice questions
Targeted practice on this topic area only
- →
All CC questions
500 questions across all exam domains
- →
ISC2 Certified in Cybersecurity CC study guide
Full concept coverage aligned to exam objectives
- →
CC practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related CC practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Access Controls Concepts practice questions
Practise CC questions linked to Access Controls Concepts.
Business Continuity, DR & Incident Response practice questions
Practise CC questions linked to Business Continuity, DR & Incident Response.
Security Principles practice questions
Practise CC questions linked to Security Principles.
Network Security practice questions
Practise CC questions linked to Network Security.
Security Operations practice questions
Practise CC questions linked to Security Operations.
CC fundamentals practice questions
Practise CC questions linked to CC fundamentals.
CC scenario practice questions
Practise CC questions linked to CC scenario.
CC troubleshooting practice questions
Practise CC questions linked to CC troubleshooting.
Practice this exam
Start a free CC 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 CC question test?
Security Principles — This question tests Security Principles — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Implement a web application firewall (WAF) with virtual patching for the vulnerability. — Option D is the most effective because it provides immediate protection against the exploited vulnerability without requiring application redesign. A WAF with virtual patching can inspect HTTP POST requests to the legacy script and block malicious payloads, even if the underlying code remains vulnerable. This approach addresses the root cause (the unauthenticated exploit) while allowing the company to maintain operations and plan a permanent fix.
What should I do if I get this CC 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 →
Last reviewed: Jun 30, 2026
This CC 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 CC exam.
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.
Sign in to join the discussion.