LoFP LoFP / it is possible that some accounts do not have mfa enabled for the aws account however its agaisnt the best practices of securing aws.

Techniques

Sample rules

AWS Successful Single-Factor Authentication

Description

The following analytic identifies a successful Console Login authentication event for an AWS IAM user account without Multi-Factor Authentication (MFA) enabled. It leverages AWS CloudTrail logs to detect instances where MFA was not used during login. This activity is significant as it may indicate a misconfiguration, policy violation, or potential account takeover attempt. If confirmed malicious, an attacker could gain unauthorized access to the AWS environment, potentially leading to data exfiltration, resource manipulation, or further privilege escalation.

Detection logic

`cloudtrail` eventName= ConsoleLogin errorCode=success "additionalEventData.MFAUsed"=No 
| stats count min(_time) as firstTime max(_time) as lastTime by src eventName eventSource aws_account_id errorCode additionalEventData.MFAUsed userAgent eventID awsRegion user_name userIdentity.arn 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_successful_single_factor_authentication_filter`