- A
Isolate the instance by revoking its security group egress rules temporarily to prevent further communication.
Immediate containment by blocking outbound traffic stops the malware from phoning home.
- B
Start a full antivirus scan on the instance and monitor the network logs.
Why wrong: Scanning is slow and does not stop the ongoing communication.
- C
Take a forensic snapshot of the instance and then terminate it.
Why wrong: Termination destroys volatile evidence; containment should precede.
- D
Modify the security group inbound rules to block traffic from the miner IP only.
Why wrong: Inbound rules control incoming traffic, not outbound; the compromised instance initiates outbound.
Quick Answer
The answer is to isolate the instance by revoking its security group egress rules temporarily. This is the correct first action because it immediately cuts off the outbound communication to the known mining pool, containing the crypto mining malware without destroying evidence. In a compromised EC2 instance response, containment must precede investigation or remediation; terminating the instance would lose volatile data like running processes, while merely blocking a specific IP address fails to stop the malware from switching to a different mining pool endpoint. On the CompTIA SecurityX CAS-004 exam, this scenario tests your understanding of incident response phases—specifically containment over eradication—and the cloud-specific concept of using security group egress as a logical air gap. A common trap is jumping to termination or investigation, but the exam emphasizes that the first step in any active breach is to stop the attack flow. Memory tip: “Egress first, forensics next”—always cut the outbound pipe before you inspect the leak.
CAS-004 Security Operations Practice Question
This CAS-004 practice question tests your understanding of security operations. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. 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 cloud security team uses AWS and has configured a virtual private cloud (VPC) with a public subnet for a web application. The web servers in the public subnet have security groups that allow inbound HTTP/HTTPS from 0.0.0.0/0. The security team receives an alert that an EC2 instance in the public subnet is making outbound connections to an IP address that is listed on a threat intelligence feed as a known mining pool. The instance's security group allows all outbound traffic. The team suspects the instance is compromised and running cryptocurrency mining malware. Which of the following should be the FIRST action to take?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue:
"first"Why it matters: Order matters here. You are being tested on which action comes before the others — not which action is generally useful.
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
Isolate the instance by revoking its security group egress rules temporarily to prevent further communication.
Option D is correct because isolating the instance by revoking its security group egress immediately cuts off the communication to the mining pool, containing the threat. Option A (terminating) loses evidence. Option B (investigating) allows the attack to continue. Option C (temporary rule blocking specific IP) may not block future connections.
Key principle: Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Isolate the instance by revoking its security group egress rules temporarily to prevent further communication.
Why this is correct
Immediate containment by blocking outbound traffic stops the malware from phoning home.
Clue confirmation
The clue word "first" in the question point toward this answer.
Related concept
CIDR notation defines the prefix length.
- ✗
Start a full antivirus scan on the instance and monitor the network logs.
Why it's wrong here
Scanning is slow and does not stop the ongoing communication.
- ✗
Take a forensic snapshot of the instance and then terminate it.
Why it's wrong here
Termination destroys volatile evidence; containment should precede.
- ✗
Modify the security group inbound rules to block traffic from the miner IP only.
Why it's wrong here
Inbound rules control incoming traffic, not outbound; the compromised instance initiates outbound.
Common exam traps
Common exam trap: usable hosts are not the same as total addresses
Subnetting questions often tempt you into counting all addresses. In normal IPv4 subnets, the network and broadcast addresses are not usable host addresses.
Detailed technical explanation
How to think about this question
Subnetting questions test whether you can identify the network, broadcast address, usable range, mask and correct subnet. Slow down enough to calculate the block size correctly.
KKey Concepts to Remember
- CIDR notation defines the prefix length.
- Block size helps identify subnet boundaries.
- Network and broadcast addresses are not usable hosts in normal IPv4 subnets.
- The required host count determines the smallest suitable subnet.
TExam Day Tips
- Write the block size before choosing the subnet.
- Check whether the question asks for hosts, subnets or a specific address range.
- Do not confuse /24, /25, /26 and /27 host counts.
Key takeaway
Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.
Real-world example
How this comes up in practice
A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.
What to study next
Got this wrong? Here's your next step.
Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related CAS-004 subnetting questions on CIDR, address ranges, and subnet selection.
- →
Security Operations — study guide chapter
Learn the concepts, then practise the questions
- →
Security Operations practice questions
Targeted practice on this topic area only
- →
All CAS-004 questions
510 questions across all exam domains
- →
CompTIA SecurityX CAS-004 study guide
Full concept coverage aligned to exam objectives
- →
CAS-004 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related CAS-004 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Scripting, Containers and Automation practice questions
Practise CAS-004 questions linked to Scripting, Containers and Automation.
Application Environment, Configuration and Security practice questions
Practise CAS-004 questions linked to Application Environment, Configuration and Security.
Governance, Risk and Compliance practice questions
Practise CAS-004 questions linked to Governance, Risk and Compliance.
Security Engineering practice questions
Practise CAS-004 questions linked to Security Engineering.
Security Architecture practice questions
Practise CAS-004 questions linked to Security Architecture.
Security Operations practice questions
Practise CAS-004 questions linked to Security Operations.
CAS-004 fundamentals practice questions
Practise CAS-004 questions linked to CAS-004 fundamentals.
CAS-004 scenario practice questions
Practise CAS-004 questions linked to CAS-004 scenario.
CAS-004 troubleshooting practice questions
Practise CAS-004 questions linked to CAS-004 troubleshooting.
Practice this exam
Start a free CAS-004 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 CAS-004 question test?
Security Operations — This question tests Security Operations — CIDR notation defines the prefix length..
What is the correct answer to this question?
The correct answer is: Isolate the instance by revoking its security group egress rules temporarily to prevent further communication. — Option D is correct because isolating the instance by revoking its security group egress immediately cuts off the communication to the mining pool, containing the threat. Option A (terminating) loses evidence. Option B (investigating) allows the attack to continue. Option C (temporary rule blocking specific IP) may not block future connections.
What should I do if I get this CAS-004 question wrong?
Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related CAS-004 subnetting questions on CIDR, address ranges, and subnet selection.
Are there clue words in this question I should notice?
Yes — watch for: "first". Order matters here. You are being tested on which action comes before the others — not which action is generally useful.
What is the key concept behind this question?
CIDR notation defines the prefix length.
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 24, 2026
This CAS-004 practice question is part of Courseiva's free CompTIA 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 CAS-004 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.