Detection rules › Panther
AWS User Login Profile Created or Modified
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
| Tactic | Techniques |
|---|---|
| Persistence | T1098 Account Manipulation, T1108 Redundant Access |
| Stealth | T1108 Redundant Access |
| Lateral Movement | T1550 Use Alternate Authentication Material |
Rules detecting the same action
Other rules on this platform that filter on the same API call or operation.
- AWS IAM Login Profile Added for Root (Elastic)
- AWS IAM Login Profile Added to User (Elastic)
- AWS IAM S3Browser LoginProfile Creation (Sigma)
- AWS User Login Profile Was Modified (Sigma)
- DEPRECATED - AWS User Login Profile Modified (Panther)
- High-Risk Cross-Cloud User Impersonation (Kusto)
- IAM Login Profile Created (Sigma)
- IAM Login Profile Deleted (Sigma)
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.
| Field | Kind | Excluded values |
|---|---|---|
errorCode | is_not_null | |
errorMessage | is_not_null |
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.
| Field | Kind | Values |
|---|---|---|
eventName | in |
|
eventSource | eq |
|
requestParameters.passwordResetRequired | is_null |
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 | Source |
|---|---|
eventName | |
eventSource | |
awsRegion | |
recipientAccountId | |
sourceIPAddress | |
userAgent | |
userIdentity | |
arn | userIdentity.arn |
userName | requestParameters.userName |