Question 49 of 1,748
Threat Detection and Incident ResponsehardMultiple ChoiceObjective-mapped

Block Outbound Traffic from Compromised EC2 Instance to Malicious IP | AWS Security Specialty Explained

This SCS-C02 practice question tests your understanding of threat detection and incident response. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. A key principle to apply: security Groups vs Network ACLs. 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 security engineer notices that an EC2 instance is sending outbound traffic to a known malicious IP address. The engineer needs to quickly block all traffic to that IP while preserving the instance for forensic analysis. Which approach 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

Add a network ACL rule to deny outbound traffic from the instance's subnet to the malicious IP.

Modifying the network ACL to deny outbound traffic to the malicious IP is the most effective approach. Network ACLs are stateless and can explicitly deny traffic, applying at the subnet level. This blocks the traffic immediately while preserving the instance for forensic analysis, as it does not require stopping the instance or affecting its state.

Key principle: Security Groups vs Network ACLs

Answer analysis

Option-by-option breakdown

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

  • Stop the instance immediately.

    Why it's wrong here

    Stopping the instance disrupts the running state and may interfere with forensic evidence such as memory or disk content.

  • Modify the instance's security group to deny outbound traffic to the malicious IP.

    Why it's wrong here

    Security groups cannot deny outbound traffic; they only allow. Modifying the security group to remove outbound rules would block all outbound traffic, not just to the malicious IP.

  • Add a network ACL rule to deny outbound traffic from the instance's subnet to the malicious IP.

    Why this is correct

    Correct. Network ACLs allow explicit deny rules and apply at the subnet level, immediately blocking outbound traffic to the specified IP while preserving the instance.

    Related concept

    Security Groups vs Network ACLs

  • Modify the route table to route traffic to the malicious IP to a blackhole.

    Why it's wrong here

    Modifying the route table to blackhole traffic also blocks traffic to the IP but affects the entire subnet and is less granular than a network ACL rule; it is harder to revert.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap is that candidates often believe security groups can deny specific IP traffic, but security groups are allow-only. Network ACLs, being stateless, can explicitly deny traffic and are the correct tool for this scenario.

Detailed technical explanation

How to think about this question

Security groups are stateful, meaning that if you add an outbound deny rule for a specific IP, the security group automatically allows return traffic for any established connections, but new outbound connections to that IP are blocked immediately. Under the hood, security group rules are implemented as iptables or equivalent firewall rules on the hypervisor, and changes propagate within seconds without affecting the instance's running state. In a real-world incident response scenario, this approach allows the engineer to isolate the instance's communication while keeping it running for memory capture, disk imaging, or live analysis using tools like AWS Systems Manager Session Manager.

KKey Concepts to Remember

  • Security Groups vs Network ACLs
  • Explicit Deny

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

Security Groups vs Network ACLs

Real-world example

How this comes up in practice

A healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.

Visual reference

Source Router + ACL permit 10.0.0.0/8 deny any Server 10.0.0.5 ✓ 192.168.1.1 ✗ dropped ACLs evaluate top-down; first match wins — implicit deny all at end

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

What to study next

Got this wrong? Here's your next step.

Review security Groups vs Network ACLs, then practise related SCS-C02 questions on the same topic to reinforce the concept.

Related practice questions

Related SCS-C02 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 SCS-C02 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 SCS-C02 question test?

Threat Detection and Incident Response — This question tests Threat Detection and Incident Response — Security Groups vs Network ACLs.

What is the correct answer to this question?

The correct answer is: Add a network ACL rule to deny outbound traffic from the instance's subnet to the malicious IP. — Modifying the network ACL to deny outbound traffic to the malicious IP is the most effective approach. Network ACLs are stateless and can explicitly deny traffic, applying at the subnet level. This blocks the traffic immediately while preserving the instance for forensic analysis, as it does not require stopping the instance or affecting its state.

What should I do if I get this SCS-C02 question wrong?

Review security Groups vs Network ACLs, then practise related SCS-C02 questions on the same topic to reinforce the concept.

What is the key concept behind this question?

Security Groups vs Network ACLs

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

Same concept, more angles

1 more ways this is tested on SCS-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A security engineer notices that an EC2 instance is sending outbound traffic to a known malicious IP address. The instance is part of an Auto Scaling group behind an Application Load Balancer. The engineer needs to immediately stop the exfiltration while preserving forensic evidence. What is the BEST course of action?

medium
  • A.Detach the EBS volume from the instance.
  • B.Terminate the EC2 instance immediately.
  • C.Shut down the instance from within the OS.
  • D.Remove the instance from the target group and apply a security group that denies all traffic.

Why D: Option D is correct because removing the instance from the target group immediately stops new traffic from the Application Load Balancer to the instance, while applying a security group that denies all outbound traffic (e.g., a custom security group with no outbound rules) halts any ongoing exfiltration without destroying the instance or its attached EBS volumes. This preserves the forensic evidence (memory, disk, logs) for later analysis, unlike termination or shutdown which could lose volatile data.

Keep practising

More SCS-C02 practice questions

Last reviewed: Jul 4, 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 SCS-C02 practice question is part of Courseiva's free Amazon Web Services 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 SCS-C02 exam.