Detection rules › Panther
AWS Unsuccessful MFA attempt
Monitor application logs for suspicious events including repeated MFA failures that may indicate user's primary credentials have been compromised.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Credential Access | T1621 Multi-Factor Authentication Request Generation |
Rule body yaml
AnalysisType: rule
Description: Monitor application logs for suspicious events including repeated MFA failures that may indicate user's primary credentials have been compromised.
DisplayName: "AWS Unsuccessful MFA attempt"
Enabled: false
Filename: aws_cloudtrail_unsuccessful_mfa_attempt.py
Reference: https://attack.mitre.org/techniques/T1621/
Tags:
- Configuration Required # configure threshold for multiple MFA failures
Reports:
MITRE ATT&CK:
- TA0006:T1621
Severity: High
Tests:
- ExpectedResult: false
Log:
additionalEventData:
LoginTo: https://console.aws.amazon.com/console/home?state=hashArgs%23&isauthcode=true
MFAIdentifier: arn:aws:iam::111122223333:u2f/user/anaya/default-AAAAAAAABBBBBBBBCCCCCCCCDD
MFAUsed: "Yes"
MobileVersion: "No"
awsRegion: us-east-1
eventID: fed06f42-cb12-4764-8c69-121063dc79b9
eventName: ConsoleLogin
eventSource: signin.amazonaws.com
eventTime: "2022-11-10T16:24:34Z"
eventType: AwsConsoleSignIn
eventVersion: "1.05"
recipientAccountId: "111122223333"
requestParameters: null
responseElements:
ConsoleLogin: Success
sourceIPAddress: 192.0.2.0
userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
userIdentity:
accountId: "111122223333"
arn: arn:aws:iam::111122223333:user/anaya
principalId: AIDACKCEVSQ6C2EXAMPLE
type: IAMUser
userName: anaya
Name: Successful Login w/ MFA
- ExpectedResult: true
Log:
additionalEventData:
LoginTo: https://console.aws.amazon.com/console/home?state=hashArgs%23&isauthcode=true
MFAUsed: "Yes"
MobileVersion: "No"
awsRegion: us-east-1
errorMessage: Failed authentication
eventID: d38ce1b3-4575-4cb8-a632-611b8243bfc3
eventName: ConsoleLogin
eventSource: signin.amazonaws.com
eventTime: "2022-11-10T16:24:34Z"
eventType: AwsConsoleSignIn
eventVersion: "1.05"
recipientAccountId: "111122223333"
requestParameters: null
responseElements:
ConsoleLogin: Failure
sourceIPAddress: 192.0.2.0
userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
userIdentity:
accessKeyId: ""
accountId: "111122223333"
principalId: AIDACKCEVSQ6C2EXAMPLE
type: IAMUser
userName: anaya
Name: Unsuccessful Login w/ MFA
DedupPeriodMinutes: 15
LogTypes:
- AWS.CloudTrail
RuleID: "AWS.Unsuccessful.MFA.attempt"
Threshold: 2
Detection logic
Condition
not (eventSource ne "signin.amazonaws.com" and eventName ne "ConsoleLogin")
additionalEventData.MFAUsed eq "Yes"
responseElements.ConsoleLogin eq "Failure"
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
eventName | ne | ConsoleLogin |
eventSource | ne | signin.amazonaws.com |
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 |
|---|---|---|
additionalEventData.MFAUsed | eq |
|
responseElements.ConsoleLogin | eq |
|
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 | userIdenity.arn |
userName | userIdentity.userName |