Detection rules › Panther

Failed Root Console Login

Severity
high
Compliance
CIS 3.6
Log types
AWS.CloudTrail
Tags
AWS, Identity & Access Management, Authentication, DemoThreatHunting, Credential Access:Brute Force
Reference
https://amzn.to/3aMSmTd
Source
github.com/panther-labs/panther-analysis

A Root console login failed.

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1110 Brute Force

Rules detecting the same action

Other rules on this platform that filter on the same API call or operation.

Rule body yaml

AnalysisType: rule
Filename: aws_console_root_login_failed.py
RuleID: "AWS.Console.RootLoginFailed"
DisplayName: "Failed Root Console Login"
Enabled: true
DedupPeriodMinutes: 15
LogTypes:
  - AWS.CloudTrail
Tags:
  - AWS
  - Identity & Access Management
  - Authentication
  - DemoThreatHunting
  - Credential Access:Brute Force
Threshold: 5
Reports:
  CIS:
    - 3.6
  MITRE ATT&CK:
    - TA0006:T1110
Severity: High
Description: A Root console login failed.
Runbook: https://docs.runpanther.io/alert-runbooks/built-in-rules/aws-console-login-failed
Reference: https://amzn.to/3aMSmTd
SummaryAttributes:
  - userAgent
  - sourceIpAddress
  - recipientAccountId
  - p_any_aws_arns
Tests:
  - Name: Failed Root Login
    ExpectedResult: true
    Log:
      {
        "eventVersion": "1.05",
        "userIdentity":
          {
            "type": "Root",
            "principalId": "1111",
            "arn": "arn:aws:iam::123456789012:root",
            "accountId": "123456789012",
            "userName": "root",
          },
        "eventTime": "2019-01-01T00:00:00Z",
        "eventSource": "signin.amazonaws.com",
        "eventName": "ConsoleLogin",
        "awsRegion": "us-east-1",
        "sourceIPAddress": "111.111.111.111",
        "userAgent": "Mozilla",
        "requestParameters": null,
        "responseElements": { "ConsoleLogin": "Failure" },
        "additionalEventData":
          {
            "LoginTo": "https://console.aws.amazon.com/console/",
            "MobileVersion": "No",
            "MFAUsed": "No",
          },
        "eventID": "1",
        "eventType": "AwsConsoleSignIn",
        "recipientAccountId": "123456789012",
      }
  - Name: Successful Login
    ExpectedResult: false
    Log:
      {
        "eventVersion": "1.05",
        "userIdentity":
          {
            "type": "Root",
            "principalId": "1111",
            "arn": "arn:aws:iam::123456789012:root",
            "accountId": "123456789012",
            "userName": "root",
          },
        "eventTime": "2019-01-01T00:00:00Z",
        "eventSource": "signin.amazonaws.com",
        "eventName": "ConsoleLogin",
        "awsRegion": "us-east-1",
        "sourceIPAddress": "111.111.111.111",
        "userAgent": "Mozilla",
        "requestParameters": null,
        "responseElements": { "ConsoleLogin": "Success" },
        "additionalEventData":
          {
            "LoginTo": "https://console.aws.amazon.com/console/",
            "MobileVersion": "No",
            "MFAUsed": "No",
          },
        "eventID": "1",
        "eventType": "AwsConsoleSignIn",
        "recipientAccountId": "123456789012",
      }
  - Name: Non-Login Event
    ExpectedResult: false
    Log:
      {
        "eventVersion": "1.06",
        "userIdentity":
          {
            "type": "AssumedRole",
            "principalId": "1111:tester",
            "arn": "arn:aws:sts::123456789012:user/tester",
            "accountId": "123456789012",
            "accessKeyId": "1",
            "sessionContext":
              {
                "sessionIssuer":
                  {
                    "type": "Role",
                    "principalId": "1111",
                    "arn": "arn:aws:iam::123456789012:user/tester",
                    "accountId": "123456789012",
                    "userName": "tester",
                  },
                "attributes":
                  {
                    "creationDate": "2019-01-01T00:00:00Z",
                    "mfaAuthenticated": "true",
                  },
              },
          },
        "eventTime": "2019-01-01T00:00:00Z",
        "eventSource": "dynamodb.amazonaws.com",
        "eventName": "DescribeTable",
        "awsRegion": "us-west-2",
        "sourceIPAddress": "111.111.111.111",
        "userAgent": "console.amazonaws.com",
        "requestParameters": { "tableName": "table" },
        "responseElements": null,
        "requestID": "1",
        "eventID": "1",
        "readOnly": true,
        "resources":
          [
            {
              "accountId": "123456789012",
              "type": "AWS::DynamoDB::Table",
              "ARN": "arn::::table/table",
            },
          ],
        "eventType": "AwsApiCall",
        "apiVersion": "2012-08-10",
        "managementEvent": true,
        "recipientAccountId": "123456789012",
      }

Detection logic

Condition

eventName eq "ConsoleLogin"
userIdentity.type eq "Root"
responseElements.ConsoleLogin eq "Failure"

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
eventNameeq
  • ConsoleLogin
responseElements.ConsoleLogineq
  • Failure
userIdentity.typeeq
  • Root

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

Field
eventName
eventSource
awsRegion
recipientAccountId
sourceIPAddress
userAgent
userIdentity