Detection rules › Panther

DEPRECATED - AWS User Login Profile Modified

Severity
high
Compliance
Stratus Red Team 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
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."
DisplayName: "DEPRECATED - AWS User Login Profile Modified"
Enabled: true
Filename: aws_user_login_profile_modified.py
Reports:
  MITRE ATT&CK:
    - TA0003:T1098
    - TA0005:T1108
    - TA0005:T1550
    - TA0008:T1550

  Stratus Red Team:
    - aws.privilege-escalation.iam-update-user-login-profile
Reference: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws_my-sec-creds-self-manage-pass-accesskeys-ssh.html
Severity: High
Tests:
  - 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: ChangeOwnPassword
  - 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
    Name: User changed password for other
  - 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: true
        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
    Name: User changed password for other reset required
DedupPeriodMinutes: 60
LogTypes:
  - AWS.CloudTrail
RuleID: "AWS.User.Login.Profile.Modified"
Threshold: 1

Detection logic

Condition

eventSource eq "iam.amazonaws.com"
eventName eq "UpdateLoginProfile"
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.

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
  • 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