-
⭐️ 1/ Identify IAM Threat Vectors
- Root ID Compromise
-
Credential Leekage
- Credential theft
- Credentials (SAML, Keys (long term or sts)
-
Excessive Permissions
- Identify Excessive Permissions - (Access Advisor)
-
Insecure Configurations
- Not enforcing IMDSV2
- Storing API and Access Keys in Plain Text
- Stealing Instance Profile Credentials
-
Privilege Accumulation
- Employee Accumulating Permissions over time
-
Privilege Escelation
- Role Chaining
- Lateral Movement (Across Accounts / Environments)
-
Dormant Identities
- Employee Leaving Company
-
Confused Deputy Attack
- Service Provider end
-
Exploit Trust Configurations
- IAM Federation or Identity Center (SSO)
-
Backdoors
- Do you know your Identity Sources?
- Bypass External (primary) authentication system
-
Non Repudiation
- Generic IDs
-
Un-Monitored Logs and Events
- CloudTrail Logs
- GuardDuty alerts
-
2/ Know Identity Source (AuthN)
-
Identity of ?
- Human
- Machine
-
Identity Sources
- IAM Users
-
IAM Federation
- External - Via Trust
- AWS SSO - AWS Directory
- AWS SSO with External Identity - Via Trust
- Amazon Cognito (Web Identities)
- IAM Role (Trust + Permissions)
- API Gateway - Access Keys
- IAM Anywhere via Private CA
-
3/ Identify Entry Points (AuthZ)
-
Policies
- AWS Managed
- Customer Managed
- Inline
- Permission Sets
-
Group
- Container of Users
- Source of Permission via Association
-
4/ Adopt IAM Best practices
- Credential Leekage
- Compromised Password (No MFA)
-
Overly permissive Policies
- IAM *
- KMS*
- *.*
- Privilege Escalation
- Rouge Identity Source
- Hard coded Credentials
- ...
-
5/ IAM Visibility Aspects & Tools
- Identity
- Permission
-
Actual Usage
- Expected Usage
- Anomalous Usage
-
AWS Native & Open Source Tools
- AWS Config
- AWS Config Advance Queries
- Access Advisor
- Access Analyzer
- Prowler
- ScoutSuite
- Cloudtrail -> Athena
-
6/ Question one should ask to gain Visibility
- Root Users (MFA, Locked in case of Org , Access Keys)
- Do you know your Identity Sources?
- Password Policy and MFA
- Look for any identities trusted in ROLE (e.g arn::aws::iam:<account_id>:root) - EXTERNAL IDENTITY
- List all identities that have
sts:AssumeRole,
sts:AssumeRoleWithSAML,
sts:AssumeRoleWithOIDC
permission
- How many IAM Users / Roles
- Get list of lambda and Instance Profiles across all regions in a all accounts
- How many Access Keys Issued and Last Rotated
- How many Overly permissive Exist
- Identify Dangerous Permissions
- List of EC2 running IMDSv1
- List of API Gateways and API keys issued