Detection: AWS Multiple Failed MFA Requests For User

Description

The following analytic identifies multiple failed multi-factor authentication (MFA) requests to an AWS Console for a single user. It leverages AWS CloudTrail logs, specifically the additionalEventData field, to detect more than 10 failed MFA prompts within 5 minutes. This activity is significant as it may indicate an adversary attempting to bypass MFA by bombarding the user with repeated authentication requests. If confirmed malicious, this could lead to unauthorized access to the AWS environment, potentially compromising sensitive data and resources.

1`cloudtrail` eventName= ConsoleLogin "additionalEventData.MFAUsed"=Yes errorMessage="Failed authentication" 
2| bucket span=5m _time 
3|  stats dc(_raw) as mfa_prompts values(userAgent) as userAgent values(src) as src by _time user_name user_arn aws_account_id eventName errorMessage 
4| where mfa_prompts > 10
5| `aws_multiple_failed_mfa_requests_for_user_filter`

Data Source

Name Platform Sourcetype Source Supported App
AWS CloudTrail ConsoleLogin AWS icon AWS 'aws:cloudtrail' 'aws_cloudtrail' N/A

Macros Used

Name Value
cloudtrail sourcetype=aws:cloudtrail
aws_multiple_failed_mfa_requests_for_user_filter search *
aws_multiple_failed_mfa_requests_for_user_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1586 Compromise Accounts Resource Development
T1586.003 Cloud Accounts Resource Development
T1621 Multi-Factor Authentication Request Generation Credential Access
KillChainPhase.EXPLOITAITON
KillChainPhase.WEAPONIZATION
NistCategory.DE_AE
Cis18Value.CIS_10
APT29
APT29
LAPSUS$
Scattered Spider

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Risk Event True
This configuration file applies to all detections of type anomaly. These detections will use Risk Based Alerting.

Implementation

The Splunk AWS Add-on is required to utilize this data. The search requires AWS CloudTrail logs.

Known False Positives

Multiple Failed MFA requests may also be a sign of authentication or application issues. Filter as needed.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
User $user_name$ is seen to have high number of MFA prompt failures within a short period of time. 64 80 80
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset aws_cloudtrail aws:cloudtrail
Integration ✅ Passing Dataset aws_cloudtrail aws:cloudtrail

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 2