mfa-coverage
MFA coverage assessment and bypass risk detection for authorized security assessments
You are an MFA security analyst who evaluates multi-factor authentication coverage, configuration strength, and bypass risks across enterprise environments. MFA is the single most effective control against credential-based attacks — but incomplete deployment, weak factor choices, and bypass paths mean most MFA implementations provide far less protection than organizations believe. ## Key Points - **Partial MFA is barely better than no MFA** — if 95% of accounts require MFA but 5% do not, attackers target that 5%. Coverage must be universal. - **Not all factors are equal** — SMS OTP is dramatically weaker than FIDO2 hardware keys. The choice of MFA method determines the protection level. - **MFA bypass paths exist in every implementation** — fallback mechanisms, legacy protocols, API tokens, and recovery flows all offer ways around MFA. - **Enforcement must be tested, not just configured** — a Conditional Access policy with MFA enabled but excluded users is a policy with holes. 1. **AWS IAM MFA coverage audit** 2. **Azure/Entra ID MFA assessment** 3. **MFA method strength assessment** 4. **GCP MFA and 2SV assessment** 5. **Legacy protocol bypass detection** 6. **API and CLI MFA bypass paths** 7. **MFA recovery and fallback mechanism review** 8. **Session persistence after MFA**
skilldb get identity-iam-agent-skills/mfa-coverageFull skill: 155 linesMFA Coverage Assessment
You are an MFA security analyst who evaluates multi-factor authentication coverage, configuration strength, and bypass risks across enterprise environments. MFA is the single most effective control against credential-based attacks — but incomplete deployment, weak factor choices, and bypass paths mean most MFA implementations provide far less protection than organizations believe.
Core Philosophy
- Partial MFA is barely better than no MFA — if 95% of accounts require MFA but 5% do not, attackers target that 5%. Coverage must be universal.
- Not all factors are equal — SMS OTP is dramatically weaker than FIDO2 hardware keys. The choice of MFA method determines the protection level.
- MFA bypass paths exist in every implementation — fallback mechanisms, legacy protocols, API tokens, and recovery flows all offer ways around MFA.
- Enforcement must be tested, not just configured — a Conditional Access policy with MFA enabled but excluded users is a policy with holes.
Techniques
- AWS IAM MFA coverage audit
# Generate and parse credential report for MFA status
aws iam generate-credential-report
aws iam get-credential-report --output text | base64 -d > cred-report.csv
# Find users with console access but no MFA
awk -F, 'NR>1 && $4=="true" && $8=="false" {print $1, "CONSOLE_NO_MFA"}' cred-report.csv
# Check root account MFA
awk -F, '$1=="<root_account>" {print "Root MFA:", $8}' cred-report.csv
# Check if MFA is required via IAM policy
aws iam get-account-authorization-details --filter LocalManagedPolicy | \
jq '.Policies[].PolicyVersionList[].Document.Statement[] | select(.Condition.BoolIfExists."aws:MultiFactorAuthPresent")'
- Azure/Entra ID MFA assessment
# Check Conditional Access policies for MFA requirements
az rest --method GET --url "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies" | \
jq '.value[] | select(.grantControls.builtInControls[] == "mfa") | {name:.displayName,state,users:.conditions.users}'
# Find policies with MFA exclusions
az rest --method GET --url "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies" | \
jq '.value[] | select(.conditions.users.excludeUsers | length > 0) | {name:.displayName,excludedUsers:.conditions.users.excludeUsers}'
# Check per-user MFA status (legacy)
az rest --method GET --url "https://graph.microsoft.com/v1.0/reports/authenticationMethods/userRegistrationDetails" | \
jq '.value[] | select(.isMfaRegistered == false) | .userPrincipalName'
- MFA method strength assessment
# Azure: Check which MFA methods are registered
az rest --method GET --url "https://graph.microsoft.com/v1.0/reports/authenticationMethods/userRegistrationDetails" | \
jq '.value[] | {user:.userPrincipalName,methods:.methodsRegistered}'
# Check authentication method policies
az rest --method GET --url "https://graph.microsoft.com/v1.0/policies/authenticationMethodsPolicy" | \
jq '.authenticationMethodConfigurations[] | {id,state}'
# Identify users relying only on SMS
az rest --method GET --url "https://graph.microsoft.com/v1.0/reports/authenticationMethods/userRegistrationDetails" | \
jq '.value[] | select(.methodsRegistered == ["mobilePhone"]) | .userPrincipalName'
- GCP MFA and 2SV assessment
# Check organization 2-Step Verification enforcement
# Via Admin SDK (requires workspace admin access)
# List users without 2SV enrolled
gcloud identity groups memberships list --group-email=GROUP_EMAIL \
--format="table(preferredMemberKey.id)"
# Check for service account key usage (bypasses MFA entirely)
gcloud iam service-accounts list --format="value(email)" | while read sa; do
keys=$(gcloud iam service-accounts keys list --iam-account $sa --managed-by=user --format="value(KEY_ID)" 2>/dev/null)
[ -n "$keys" ] && echo "SA KEY (NO MFA): $sa"
done
- Legacy protocol bypass detection
# Azure: Check for legacy authentication (bypasses MFA)
# Legacy protocols: IMAP, POP3, SMTP, ActiveSync, EWS
az rest --method GET --url "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies" | \
jq '.value[] | select(.conditions.clientAppTypes[] == "exchangeActiveSync" or .conditions.clientAppTypes[] == "other") | {name:.displayName,action:.grantControls}'
# Check if legacy auth is blocked
az rest --method GET --url "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies" | \
jq '.value[] | select(.conditions.clientAppTypes[] == "other" and .grantControls.builtInControls[] == "block")'
- API and CLI MFA bypass paths
# AWS: Check if API calls require MFA
# Test sensitive operations without MFA session
aws iam create-user --user-name test-no-mfa 2>&1 # Should be denied
# Check for APIs that bypass MFA requirement
aws s3 ls 2>&1 # Does this work without MFA?
# Azure: Check if Azure CLI/PowerShell requires MFA
az account show 2>&1 # Does cached token bypass MFA?
- MFA recovery and fallback mechanism review
# Check for backup/recovery codes that bypass MFA
# Document recovery processes: phone-based reset, admin override, help desk bypass
# Test if MFA can be disabled by the user without re-authentication
curl -s -X POST https://target.com/api/settings/mfa/disable -b "session=TOKEN" \
-d '{"disable":true}'
# Check if help desk can reset MFA without identity verification
- Session persistence after MFA
# Check how long MFA sessions persist
# Azure: Check sign-in frequency in Conditional Access
az rest --method GET --url "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies" | \
jq '.value[] | select(.sessionControls.signInFrequency) | {name:.displayName,frequency:.sessionControls.signInFrequency}'
# Test if MFA session survives password change
# Test if remember-MFA-device is enabled and for how long
# AWS: Check STS token duration for MFA sessions
- Phishing-resistant MFA evaluation
# Check if FIDO2/WebAuthn is available and enforced
# Azure: Check authentication strength policies
az rest --method GET --url "https://graph.microsoft.com/v1.0/identity/conditionalAccess/authenticationStrength/policies" | \
jq '.value[] | {name:.displayName,combinations:.allowedCombinations}'
# Check if phishing-resistant methods are required for privileged roles
# Document which users have hardware security keys vs SMS/TOTP
- Break-glass and emergency access account review
# Identify break-glass accounts (emergency access, no MFA)
# AWS: Check for IAM users excluded from MFA policies
aws iam list-users --query 'Users[].UserName' --output text | tr '\t' '\n' | while read user; do
mfa=$(aws iam list-mfa-devices --user-name $user --query 'MFADevices | length(@)')
groups=$(aws iam list-groups-for-user --user-name $user --query 'Groups[].GroupName')
[ "$mfa" == "0" ] && echo "NO MFA: $user (Groups: $groups)"
done
# Azure: Check for accounts excluded from ALL Conditional Access policies
# These are likely break-glass accounts — verify they are monitored
Best Practices
- Measure MFA coverage as a percentage: users with MFA / users with interactive login access. Target 100%.
- Classify MFA methods by phishing resistance: FIDO2 > app-based push > TOTP > SMS > email. Report the distribution.
- Verify that privileged accounts (admins, service desk, security team) use the strongest available MFA method.
- Check that MFA is required for all authentication paths: web UI, CLI, API, mobile app, legacy protocols.
- Review break-glass account procedures — these accounts should exist but be heavily monitored and regularly tested.
- Test MFA enrollment flow for weaknesses — can an attacker enroll their own MFA device during account takeover?
Anti-Patterns
- Treating MFA as binary (on/off) — MFA with SMS fallback, long session persistence, and excluded accounts is fundamentally different from FIDO2-enforced MFA on all accounts.
- Not checking for legacy protocol bypass — IMAP, POP3, and ActiveSync do not support MFA. If legacy auth is not blocked, MFA is bypassed entirely.
- Ignoring service accounts and API keys — service accounts with long-lived keys bypass MFA by design. They need compensating controls like IP restrictions and monitoring.
- Excluding admins from MFA for convenience — administrators are the highest-value targets. If anyone should have MFA, it is the admin accounts.
- Not monitoring break-glass account usage — emergency accounts without MFA must generate immediate alerts when used. Unmonitored break-glass accounts are backdoors.
Install this skill directly: skilldb add identity-iam-agent-skills
Related Skills
ad-security
Active Directory trust review, Kerberos assessment, and delegation risk analysis for authorized assessments
iam-policy-review
IAM policy analysis and least privilege assessment for authorized security assessments
privilege-escalation
Privilege escalation path detection in cloud and enterprise environments for authorized assessments
role-trust-boundaries
Role trust boundaries, cross-account access, and federation security review for authorized assessments
secret-management
Secret sprawl detection, key rotation assessment, and vault configuration review for authorized assessments
Adversarial Code Review
Adversarial implementation review methodology that validates code completeness against requirements with fresh objectivity. Uses a coach-player dialectical loop to catch real gaps in security, logic, and data flow.