Courseiva

Detect Overly Permissive Security Groups in CloudTrail Logs

Exhibit

Refer to the exhibit.

CloudTrail log event (JSON):
{
  "eventVersion": "1.08",
  "userIdentity": {
    "type": "AssumedRole",
    "arn": "arn:aws:sts::123456789012:assumed-role/AdminRole/User1",
    "accountId": "123456789012",
    "sessionContext": {
      "sessionIssuer": {
        "type": "Role",
        "arn": "arn:aws:iam::123456789012:role/AdminRole"
      },
      "webIdFederationData": {},
      "attributes": {
        "mfaAuthenticated": "false",
        "creationDate": "2024-01-15T10:00:00Z"
      }
    }
  },
  "eventTime": "2024-01-15T10:05:00Z",
  "eventSource": "ec2.amazonaws.com",
  "eventName": "AuthorizeSecurityGroupIngress",
  "awsRegion": "us-east-1",
  "sourceIPAddress": "203.0.113.5",
  "userAgent": "console.amazonaws.com",
  "requestParameters": {
    "groupId": "sg-0123456789abcdef0",
    "ipPermissions": {
      "items": [
        {
          "ipProtocol": "tcp",
          "fromPort": 22,
          "toPort": 22,
          "ipRanges": {
            "items": [
              {"cidrIp": "0.0.0.0/0"}
            ]
          }
        }
      ]
    }
  },
  "responseElements": {
    "requestId": "r-12345678",
    "_return": true
  }
}

Refer to the exhibit. A security engineer finds this CloudTrail log entry. What is the most significant security concern indicated by this event?

Quick Answer

The security concern here is not merely that a security group rule was changed, it is specifically what that rule now allows: opening port 22 to 0.0.0.0/0 means literally any IPv4 address on the internet can attempt an SSH connection to the instance, removing any meaningful network-level restriction on who can try to log in. This is a textbook violation of least-privilege network access, because SSH access should be scoped to specific trusted IP ranges, such as a corporate VPN range or a bastion host's address, not left open to the entire internet, and an open SSH port is one of the most commonly targeted misconfigurations for brute-force login attempts and automated scanning. The reason this reading matters is that the CloudTrail entry itself is just a factual record of an AuthorizeSecurityGroupIngress API call; the exam is testing whether you can translate that raw API call into its actual security implication, namely that a specific port has now become reachable from anywhere on the internet, rather than just noticing that a change was made. Any time a CloudTrail or security-group-focused question shows a rule change that includes 0.0.0.0/0 as the source alongside a sensitive management port like 22 or 3389, treat that combination as the answer, since unrestricted access to an administrative port from any IP address is one of the most consistently tested high-severity findings across AWS security scenarios.

⚠ Common exam trap

The trap here is that candidates may focus on the source IP address or MFA status, but the core security concern is the overly permissive security group rule that grants unrestricted SSH access to the internet.

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

✓

The security group rule allows SSH access from any IP address (0.0.0.0/0).

The CloudTrail log entry shows an `AuthorizeSecurityGroupIngress` API call that adds a rule allowing SSH (port 22) from 0.0.0.0/0. This is a critical security concern because it exposes the EC2 instance to SSH access from any IP address on the internet, creating a high risk of brute-force attacks, unauthorized access, and potential compromise. Security best practices mandate restricting SSH access to specific trusted IP ranges, not the entire internet.

Answer analysis

Option-by-option breakdown

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

  • ✓

    The security group rule allows SSH access from any IP address (0.0.0.0/0).

    Why this is correct

    Ingress from 0.0.0.0/0 on port 22 exposes SSH to the entire internet, permitting brute-force and credential-stuffing attempts against every instance in that security group. This unrestricted CIDR is the concrete exposure the log reveals, regardless of other fields present.

  • ✗

    The event is a normal administrative action and poses no security concern.

    Why it's wrong here

    The CloudTrail entry records an AssumeRole call whose request parameters reveal anomalous attributes, so dismissing it as routine ignores the specific indicators the exhibit presents. Normal administrative actions do appear in CloudTrail, and treating them as benign is correct when the event matches established baselines for that principal, source, and time.

  • ✗

    The user did not have MFA enabled when assuming the AdminRole.

    Why it's wrong here

    The log entry does not record MFA state; CloudTrail's AssumeRole event captures identity, source IP, and session context, not the authentication factors used beforehand. MFA absence is a genuine concern when a console sign-in or GetSessionToken event shows it, but this event's fields cannot evidence that condition.

  • ✗

    The source IP address (203.0.113.5) is from an unusual location.

    Why it's wrong here

    The exhibit does not establish that 203.0.113.5 is unusual; that address sits in the documentation range, and no baseline of prior source addresses is given. Geo-anomaly detection is the right lens when logs show a principal authenticating from a region it has never used before, which this entry does not demonstrate.

About these practice questions

This SCS-C02 question is part of Courseiva's 1,205-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way 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. Refer to the exhibit. A security engineer is reviewing a CloudTrail event. What security concern does this event raise?

hard
  • A.The user is revoking a security group rule.
  • B.The event is not being logged by CloudTrail.
  • C.The user is using the AWS root account.
  • ✓ D.The user is opening SSH access to the world.

Why D: The CloudTrail event shows an AuthorizeSecurityGroupIngress API call with a CidrIp of 0.0.0.0/0 for port 22 (SSH). This opens SSH access to the entire internet, which is a severe security risk because it exposes the instance to brute-force attacks, unauthorized access, and potential compromise. The correct answer is D because this action directly violates the principle of least privilege and is a common misconfiguration.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.