Detection rules › Panther

AWS User Login Profile Created or Modified

Severity
low
Compliance
Stratus Red Team aws.persistence.iam-create-user-login-profile, aws.privilege-escalation.iam-update-user-login-profile
Log types
AWS.CloudTrail
Reference
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws_my-sec-creds-self-manage-pass-accesskeys-ssh.html
Source
github.com/panther-labs/panther-analysis

An attacker with iam:UpdateLoginProfile permission on other users can change the password used to login to the AWS console. May be legitimate account administration.

MITRE ATT&CK coverage

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_cloudtrail_loginprofilecreatedormodified.py
RuleID: "AWS.CloudTrail.LoginProfileCreatedOrModified"
DisplayName: "AWS User Login Profile Created or Modified"
Enabled: true
LogTypes:
    - AWS.CloudTrail
Severity: Low

Reports:
  MITRE ATT&CK:
    - TA0003:T1098
    - TA0005:T1108
    - TA0005:T1550
    - TA0008:T1550

  Stratus Red Team:
    - aws.persistence.iam-create-user-login-profile
    - aws.privilege-escalation.iam-update-user-login-profile

Description: An attacker with iam:UpdateLoginProfile permission on other users can change the password used to login to the AWS console. May be legitimate account administration.
DedupPeriodMinutes: 60
Threshold: 1
Reference: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws_my-sec-creds-self-manage-pass-accesskeys-ssh.html
Tests:
    - Name: ChangeOwnPassword
      ExpectedResult: false
      Log:
        { "awsRegion": "us-east-1",
            "eventCategory": "Management",
            "eventID": "1234",
            "eventName": "UpdateLoginProfile",
            "eventSource": "iam.amazonaws.com",
            "eventTime": "2022-09-15 13:45:24",
            "eventType": "AwsApiCall",
            "eventVersion": "1.08",
            "managementEvent": true,
            "readOnly": false,
            "recipientAccountId": "987654321",
            "requestParameters":
              { "passwordResetRequired": false,
                  "userName": "alice" },
            "sessionCredentialFromConsole": true,
            "sourceIPAddress": "AWS Internal",
            "userAgent": "AWS Internal",
            "userIdentity":
              { "accessKeyId": "ABC1234",
                  "accountId": "987654321",
                  "arn": "arn:aws:sts::98765432:assumed-role/IAM/alice",
                  "principalId": "ABCDE:alice",
                  "sessionContext":
                    { "attributes":
                        { "creationDate": "2022-09-15T13:36:47Z",
                            "mfaAuthenticated": "true" },
                        "sessionIssuer":
                          { "accountId": "987654321",
                              "arn": "arn:aws:iam::9876432:role/IAM",
                              "principalId": "1234ABC",
                              "type": "Role",
                              "userName": "IAM" },
                        "webIdFederationData": { } },
                  "type": "AssumedRole" } }
    - Name: User changed password for other
      ExpectedResult: true
      Log:
        { "awsRegion": "us-east-1",
            "eventCategory": "Management",
            "eventID": "1234",
            "eventName": "UpdateLoginProfile",
            "eventSource": "iam.amazonaws.com",
            "eventTime": "2022-09-15 13:45:24",
            "eventType": "AwsApiCall",
            "eventVersion": "1.08",
            "managementEvent": true,
            "readOnly": false,
            "recipientAccountId": "987654321",
            "requestParameters":
              { "passwordResetRequired": false,
                  "userName": "bob" },
            "sessionCredentialFromConsole": true,
            "sourceIPAddress": "AWS Internal",
            "userAgent": "AWS Internal",
            "userIdentity":
              { "accessKeyId": "ABC1234",
                  "accountId": "987654321",
                  "arn": "arn:aws:sts::98765432:assumed-role/IAM/alice",
                  "principalId": "ABCDE:alice",
                  "sessionContext":
                    { "attributes":
                        { "creationDate": "2022-09-15T13:36:47Z",
                            "mfaAuthenticated": "true" },
                        "sessionIssuer":
                          { "accountId": "987654321",
                              "arn": "arn:aws:iam::9876432:role/IAM",
                              "principalId": "1234ABC",
                              "type": "Role",
                              "userName": "IAM" },
                        "webIdFederationData": { } },
                  "type": "AssumedRole" } }

Detection logic

Condition

not (errorCode is_not_null or errorMessage is_not_null)
eventSource eq "iam.amazonaws.com"
eventName in ["UpdateLoginProfile", "CreateLoginProfile", "DeleteLoginProfile"]
requestParameters.passwordResetRequired is_null

This rule also runs imperative logic the parser cannot express as a filter; the conditions above are the structured part it could extract.

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
errorCodeis_not_null(no value, null check)
errorMessageis_not_null(no value, null check)

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
eventNamein
  • CreateLoginProfile
  • DeleteLoginProfile
  • UpdateLoginProfile
eventSourceeq
  • iam.amazonaws.com
requestParameters.passwordResetRequiredis_null
  • (no value, null check)

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.

FieldSource
eventName
eventSource
awsRegion
recipientAccountId
sourceIPAddress
userAgent
userIdentity
arnuserIdentity.arn
userNamerequestParameters.userName