aws-cis-controls-assessment 1.0.10__py3-none-any.whl → 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aws_cis_assessment/__init__.py +2 -2
- aws_cis_assessment/config/rules/cis_controls_ig1.yaml +1 -1
- aws_cis_assessment/config/rules/cis_controls_ig2.yaml +599 -2
- aws_cis_assessment/controls/ig2/__init__.py +62 -1
- aws_cis_assessment/controls/ig2/control_4_5_6_access_configuration.py +2638 -0
- aws_cis_assessment/controls/ig2/control_8_audit_logging.py +984 -0
- aws_cis_assessment/core/assessment_engine.py +54 -0
- aws_cis_assessment/reporters/html_reporter.py +281 -129
- {aws_cis_controls_assessment-1.0.10.dist-info → aws_cis_controls_assessment-1.1.1.dist-info}/METADATA +160 -52
- {aws_cis_controls_assessment-1.0.10.dist-info → aws_cis_controls_assessment-1.1.1.dist-info}/RECORD +16 -14
- docs/cli-reference.md +1 -1
- docs/config-rule-mappings.md +423 -6
- {aws_cis_controls_assessment-1.0.10.dist-info → aws_cis_controls_assessment-1.1.1.dist-info}/WHEEL +0 -0
- {aws_cis_controls_assessment-1.0.10.dist-info → aws_cis_controls_assessment-1.1.1.dist-info}/entry_points.txt +0 -0
- {aws_cis_controls_assessment-1.0.10.dist-info → aws_cis_controls_assessment-1.1.1.dist-info}/licenses/LICENSE +0 -0
- {aws_cis_controls_assessment-1.0.10.dist-info → aws_cis_controls_assessment-1.1.1.dist-info}/top_level.txt +0 -0
docs/config-rule-mappings.md
CHANGED
|
@@ -16,7 +16,7 @@ This document provides a comprehensive mapping of CIS Controls to AWS Config rul
|
|
|
16
16
|
|
|
17
17
|
The AWS CIS Controls Compliance Assessment Framework uses AWS Config rule specifications as the foundation for evaluating compliance. Each CIS Control is mapped to one or more AWS Config rules that assess specific AWS resources and configurations.
|
|
18
18
|
|
|
19
|
-
**Production Status**: This framework has achieved 100% coverage of all CIS Controls requirements with
|
|
19
|
+
**Production Status**: This framework has achieved 100% coverage of all CIS Controls requirements with 163 implemented rules (147 CIS Controls + 9 bonus security enhancements + 7 audit logging controls).
|
|
20
20
|
|
|
21
21
|
### Mapping Methodology
|
|
22
22
|
|
|
@@ -28,10 +28,10 @@ The AWS CIS Controls Compliance Assessment Framework uses AWS Config rule specif
|
|
|
28
28
|
### Implementation Groups Hierarchy
|
|
29
29
|
|
|
30
30
|
- **IG1**: 96 Config rules covering essential cyber hygiene
|
|
31
|
-
- **IG2**: +
|
|
31
|
+
- **IG2**: +74 Config rules for enhanced security (includes all IG1 rules)
|
|
32
32
|
- **IG3**: +1 Config rule for advanced security (includes all IG1+IG2 rules)
|
|
33
|
-
- **Bonus**: +
|
|
34
|
-
- **Total**:
|
|
33
|
+
- **Bonus**: +9 additional security rules beyond CIS requirements
|
|
34
|
+
- **Total**: 163 Config rules implemented (151 CIS + 9 bonus + 7 audit logging)
|
|
35
35
|
|
|
36
36
|
## IG1 - Essential Cyber Hygiene
|
|
37
37
|
|
|
@@ -165,6 +165,379 @@ The AWS CIS Controls Compliance Assessment Framework uses AWS Config rule specif
|
|
|
165
165
|
|
|
166
166
|
## IG2 - Enhanced Security
|
|
167
167
|
|
|
168
|
+
### Control 4: Secure Configuration of Enterprise Assets and Software
|
|
169
|
+
|
|
170
|
+
**Purpose**: Establish and maintain the secure configuration of enterprise assets and software.
|
|
171
|
+
|
|
172
|
+
#### Control 4.1: IAM Role Session Duration Validation
|
|
173
|
+
|
|
174
|
+
| Config Rule | Resource Types | Description |
|
|
175
|
+
|-------------|----------------|-------------|
|
|
176
|
+
| `iam-max-session-duration-check` | AWS::IAM::Role | Validates IAM role session duration does not exceed 12 hours |
|
|
177
|
+
|
|
178
|
+
**Assessment Logic**:
|
|
179
|
+
- Discovers all IAM roles (global service, evaluated in us-east-1)
|
|
180
|
+
- Checks MaxSessionDuration property on each role
|
|
181
|
+
- COMPLIANT if MaxSessionDuration ≤ 43200 seconds (12 hours)
|
|
182
|
+
- NON_COMPLIANT if MaxSessionDuration > 43200 seconds
|
|
183
|
+
- Limits credential exposure window for temporary credentials
|
|
184
|
+
|
|
185
|
+
**Remediation Guidance**:
|
|
186
|
+
```bash
|
|
187
|
+
# Update IAM role to limit session duration
|
|
188
|
+
aws iam update-role --role-name <role-name> --max-session-duration 43200
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
#### Control 4.2: Default Security Group Restriction
|
|
192
|
+
|
|
193
|
+
| Config Rule | Resource Types | Description |
|
|
194
|
+
|-------------|----------------|-------------|
|
|
195
|
+
| `security-group-default-rules-check` | AWS::EC2::SecurityGroup | Ensures default security groups have no inbound or outbound rules |
|
|
196
|
+
|
|
197
|
+
**Assessment Logic**:
|
|
198
|
+
- Discovers all security groups with GroupName='default' (regional service)
|
|
199
|
+
- Checks IpPermissions (inbound rules) and IpPermissionsEgress (outbound rules)
|
|
200
|
+
- COMPLIANT if both rule lists are empty
|
|
201
|
+
- NON_COMPLIANT if any rules exist
|
|
202
|
+
- Prevents unintended access through default security groups
|
|
203
|
+
|
|
204
|
+
**Remediation Guidance**:
|
|
205
|
+
```bash
|
|
206
|
+
# Remove all inbound rules from default security group
|
|
207
|
+
aws ec2 revoke-security-group-ingress --group-id <sg-id> --ip-permissions <permissions>
|
|
208
|
+
|
|
209
|
+
# Remove all outbound rules from default security group
|
|
210
|
+
aws ec2 revoke-security-group-egress --group-id <sg-id> --ip-permissions <permissions>
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
#### Control 4.3: VPC DNS Configuration Validation
|
|
214
|
+
|
|
215
|
+
| Config Rule | Resource Types | Description |
|
|
216
|
+
|-------------|----------------|-------------|
|
|
217
|
+
| `vpc-dns-resolution-enabled` | AWS::EC2::VPC | Validates VPC DNS settings (enableDnsHostnames and enableDnsSupport) |
|
|
218
|
+
|
|
219
|
+
**Assessment Logic**:
|
|
220
|
+
- Discovers all VPCs (regional service)
|
|
221
|
+
- Checks enableDnsHostnames attribute via describe_vpc_attribute
|
|
222
|
+
- Checks enableDnsSupport attribute via describe_vpc_attribute
|
|
223
|
+
- COMPLIANT if both attributes are True
|
|
224
|
+
- NON_COMPLIANT if either attribute is False
|
|
225
|
+
- Required for many AWS services to function correctly
|
|
226
|
+
|
|
227
|
+
**Remediation Guidance**:
|
|
228
|
+
```bash
|
|
229
|
+
# Enable DNS resolution for VPC
|
|
230
|
+
aws ec2 modify-vpc-attribute --vpc-id <vpc-id> --enable-dns-support
|
|
231
|
+
|
|
232
|
+
# Enable DNS hostnames for VPC
|
|
233
|
+
aws ec2 modify-vpc-attribute --vpc-id <vpc-id> --enable-dns-hostnames
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
#### Control 4.4: RDS Default Admin Username Check
|
|
237
|
+
|
|
238
|
+
| Config Rule | Resource Types | Description |
|
|
239
|
+
|-------------|----------------|-------------|
|
|
240
|
+
| `rds-default-admin-check` | AWS::RDS::DBInstance | Ensures RDS instances don't use default admin usernames |
|
|
241
|
+
|
|
242
|
+
**Assessment Logic**:
|
|
243
|
+
- Discovers all RDS instances (regional service)
|
|
244
|
+
- Checks MasterUsername against default list (case-insensitive): postgres, admin, root, mysql, administrator, sa
|
|
245
|
+
- COMPLIANT if MasterUsername is not a default value
|
|
246
|
+
- NON_COMPLIANT if MasterUsername matches default list
|
|
247
|
+
- Reduces risk of credential guessing attacks
|
|
248
|
+
|
|
249
|
+
**Remediation Guidance**:
|
|
250
|
+
```bash
|
|
251
|
+
# RDS master username cannot be changed after creation
|
|
252
|
+
# Remediation requires snapshot and restore:
|
|
253
|
+
aws rds create-db-snapshot --db-instance-identifier <old-instance> --db-snapshot-identifier <snapshot-name>
|
|
254
|
+
aws rds restore-db-instance-from-db-snapshot --db-instance-identifier <new-instance> --db-snapshot-identifier <snapshot-name> --master-username <custom-username>
|
|
255
|
+
|
|
256
|
+
# Note: This is a disruptive change requiring downtime
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
#### Control 4.5: EC2 Instance Profile Least Privilege Validation
|
|
260
|
+
|
|
261
|
+
| Config Rule | Resource Types | Description |
|
|
262
|
+
|-------------|----------------|-------------|
|
|
263
|
+
| `ec2-instance-profile-least-privilege` | AWS::EC2::Instance | Validates EC2 instance profile permissions follow least privilege |
|
|
264
|
+
|
|
265
|
+
**Assessment Logic**:
|
|
266
|
+
- Discovers all EC2 instances with instance profiles (regional service)
|
|
267
|
+
- Gets IAM role from instance profile (IAM is global, queried in us-east-1)
|
|
268
|
+
- Lists attached managed policies and inline policies
|
|
269
|
+
- Checks for overly permissive policies:
|
|
270
|
+
- AdministratorAccess or PowerUserAccess managed policies
|
|
271
|
+
- Policies with Action: "*" and Resource: "*"
|
|
272
|
+
- COMPLIANT if no overly permissive policies found
|
|
273
|
+
- NON_COMPLIANT if overly permissive policies detected
|
|
274
|
+
|
|
275
|
+
**Remediation Guidance**:
|
|
276
|
+
```bash
|
|
277
|
+
# Create specific policy with limited permissions
|
|
278
|
+
aws iam create-policy --policy-name <specific-policy> --policy-document file://policy.json
|
|
279
|
+
|
|
280
|
+
# Attach specific policy to role
|
|
281
|
+
aws iam attach-role-policy --role-name <role-name> --policy-arn <specific-policy-arn>
|
|
282
|
+
|
|
283
|
+
# Detach overly permissive policy
|
|
284
|
+
aws iam detach-role-policy --role-name <role-name> --policy-arn <broad-policy-arn>
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Control 5: Account Management
|
|
288
|
+
|
|
289
|
+
**Purpose**: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
|
|
290
|
+
|
|
291
|
+
#### Control 5.1: Service Account Documentation Verification
|
|
292
|
+
|
|
293
|
+
| Config Rule | Resource Types | Description |
|
|
294
|
+
|-------------|----------------|-------------|
|
|
295
|
+
| `iam-service-account-inventory-check` | AWS::IAM::User, AWS::IAM::Role | Validates service accounts have required documentation tags |
|
|
296
|
+
|
|
297
|
+
**Assessment Logic**:
|
|
298
|
+
- Discovers all IAM users and roles (global service, evaluated in us-east-1)
|
|
299
|
+
- Identifies service accounts by:
|
|
300
|
+
- Naming convention (contains "service", "app", "application")
|
|
301
|
+
- ServiceAccount=true tag
|
|
302
|
+
- Checks for required tags: Purpose, Owner, LastReviewed
|
|
303
|
+
- COMPLIANT if all three tags present with non-empty values
|
|
304
|
+
- NON_COMPLIANT if any required tag missing or empty
|
|
305
|
+
- Supports compliance and access review processes
|
|
306
|
+
|
|
307
|
+
**Remediation Guidance**:
|
|
308
|
+
```bash
|
|
309
|
+
# Add required documentation tags to service account
|
|
310
|
+
aws iam tag-user --user-name <service-account> --tags \
|
|
311
|
+
Key=Purpose,Value="API access for application" \
|
|
312
|
+
Key=Owner,Value="platform-team" \
|
|
313
|
+
Key=LastReviewed,Value="2024-01-15"
|
|
314
|
+
|
|
315
|
+
# For roles
|
|
316
|
+
aws iam tag-role --role-name <service-role> --tags \
|
|
317
|
+
Key=Purpose,Value="Lambda execution" \
|
|
318
|
+
Key=Owner,Value="dev-team" \
|
|
319
|
+
Key=LastReviewed,Value="2024-01-15"
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
#### Control 5.2: Administrative Policy Attachment Validation
|
|
323
|
+
|
|
324
|
+
| Config Rule | Resource Types | Description |
|
|
325
|
+
|-------------|----------------|-------------|
|
|
326
|
+
| `iam-admin-policy-attached-to-role-check` | AWS::IAM::User | Ensures administrative policies are attached to roles, not users |
|
|
327
|
+
|
|
328
|
+
**Assessment Logic**:
|
|
329
|
+
- Discovers all IAM users (global service, evaluated in us-east-1)
|
|
330
|
+
- Lists attached managed policies and inline policies
|
|
331
|
+
- Checks for administrative policies:
|
|
332
|
+
- AdministratorAccess (arn:aws:iam::aws:policy/AdministratorAccess)
|
|
333
|
+
- PowerUserAccess
|
|
334
|
+
- Inline policies with Action: "*" and Resource: "*"
|
|
335
|
+
- COMPLIANT if no admin policies attached to user
|
|
336
|
+
- NON_COMPLIANT if admin policies found on user
|
|
337
|
+
- Encourages role-based access with temporary credentials
|
|
338
|
+
|
|
339
|
+
**Remediation Guidance**:
|
|
340
|
+
```bash
|
|
341
|
+
# Create admin role
|
|
342
|
+
aws iam create-role --role-name AdminRole --assume-role-policy-document file://trust-policy.json
|
|
343
|
+
|
|
344
|
+
# Attach admin policy to role
|
|
345
|
+
aws iam attach-role-policy --role-name AdminRole --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
|
|
346
|
+
|
|
347
|
+
# Remove admin policy from user
|
|
348
|
+
aws iam detach-user-policy --user-name <user> --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
|
|
349
|
+
|
|
350
|
+
# User assumes role for admin access
|
|
351
|
+
aws sts assume-role --role-arn arn:aws:iam::<account>:role/AdminRole --role-session-name admin-session
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
#### Control 5.3: AWS IAM Identity Center (SSO) Enablement Check
|
|
355
|
+
|
|
356
|
+
| Config Rule | Resource Types | Description |
|
|
357
|
+
|-------------|----------------|-------------|
|
|
358
|
+
| `sso-enabled-check` | AWS::::Account | Validates AWS IAM Identity Center is configured and enabled |
|
|
359
|
+
|
|
360
|
+
**Assessment Logic**:
|
|
361
|
+
- Account-level check (global service, evaluated in us-east-1)
|
|
362
|
+
- Calls sso-admin.list_instances() to check for SSO instances
|
|
363
|
+
- COMPLIANT if at least one SSO instance exists
|
|
364
|
+
- NON_COMPLIANT if no SSO instances found
|
|
365
|
+
- Encourages centralized identity management
|
|
366
|
+
|
|
367
|
+
**Remediation Guidance**:
|
|
368
|
+
```bash
|
|
369
|
+
# SSO must be enabled through console or Organizations API
|
|
370
|
+
# After enabling, configure permission sets:
|
|
371
|
+
aws sso-admin create-permission-set --instance-arn <instance-arn> --name ReadOnlyAccess
|
|
372
|
+
|
|
373
|
+
aws sso-admin attach-managed-policy-to-permission-set \
|
|
374
|
+
--instance-arn <instance-arn> \
|
|
375
|
+
--permission-set-arn <ps-arn> \
|
|
376
|
+
--managed-policy-arn arn:aws:iam::aws:policy/ReadOnlyAccess
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
#### Control 5.4: IAM User Inline Policy Restriction
|
|
380
|
+
|
|
381
|
+
| Config Rule | Resource Types | Description |
|
|
382
|
+
|-------------|----------------|-------------|
|
|
383
|
+
| `iam-user-no-inline-policies` | AWS::IAM::User | Ensures IAM users don't have inline policies |
|
|
384
|
+
|
|
385
|
+
**Assessment Logic**:
|
|
386
|
+
- Discovers all IAM users (global service, evaluated in us-east-1)
|
|
387
|
+
- Lists inline policies attached to each user
|
|
388
|
+
- COMPLIANT if inline policy list is empty
|
|
389
|
+
- NON_COMPLIANT if any inline policies exist
|
|
390
|
+
- Encourages use of managed policies for reusability
|
|
391
|
+
|
|
392
|
+
**Remediation Guidance**:
|
|
393
|
+
```bash
|
|
394
|
+
# Get inline policy document
|
|
395
|
+
aws iam get-user-policy --user-name <user> --policy-name <inline-policy> > policy.json
|
|
396
|
+
|
|
397
|
+
# Create managed policy from document
|
|
398
|
+
aws iam create-policy --policy-name <policy-name> --policy-document file://policy.json
|
|
399
|
+
|
|
400
|
+
# Attach managed policy to user
|
|
401
|
+
aws iam attach-user-policy --user-name <user> --policy-arn <policy-arn>
|
|
402
|
+
|
|
403
|
+
# Delete inline policy
|
|
404
|
+
aws iam delete-user-policy --user-name <user> --policy-name <inline-policy>
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### Control 6: Access Control Management
|
|
408
|
+
|
|
409
|
+
**Purpose**: Use processes and tools to create, assign, manage, and revoke access credentials and privileges for user, administrator, and service accounts for enterprise assets and software.
|
|
410
|
+
|
|
411
|
+
#### Control 6.1: IAM Access Analyzer Enablement Verification
|
|
412
|
+
|
|
413
|
+
| Config Rule | Resource Types | Description |
|
|
414
|
+
|-------------|----------------|-------------|
|
|
415
|
+
| `iam-access-analyzer-enabled` | AWS::AccessAnalyzer::Analyzer | Validates IAM Access Analyzer is enabled in all active regions |
|
|
416
|
+
|
|
417
|
+
**Assessment Logic**:
|
|
418
|
+
- Regional service, evaluated in all active regions
|
|
419
|
+
- Lists analyzers in each region
|
|
420
|
+
- Checks for at least one analyzer with status='ACTIVE'
|
|
421
|
+
- COMPLIANT if active analyzer found in region
|
|
422
|
+
- NON_COMPLIANT if no active analyzers in region
|
|
423
|
+
- Detects resources shared with external entities
|
|
424
|
+
|
|
425
|
+
**Remediation Guidance**:
|
|
426
|
+
```bash
|
|
427
|
+
# Create analyzer in each region
|
|
428
|
+
aws accessanalyzer create-analyzer --analyzer-name account-analyzer --type ACCOUNT --region <region>
|
|
429
|
+
|
|
430
|
+
# Create in all regions
|
|
431
|
+
for region in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text); do
|
|
432
|
+
aws accessanalyzer create-analyzer --analyzer-name account-analyzer --type ACCOUNT --region $region
|
|
433
|
+
done
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
#### Control 6.2: Permission Boundary Configuration Validation
|
|
437
|
+
|
|
438
|
+
| Config Rule | Resource Types | Description |
|
|
439
|
+
|-------------|----------------|-------------|
|
|
440
|
+
| `iam-permission-boundaries-check` | AWS::IAM::Role | Ensures permission boundaries are configured for roles with elevated privileges |
|
|
441
|
+
|
|
442
|
+
**Assessment Logic**:
|
|
443
|
+
- Discovers all IAM roles (global service, evaluated in us-east-1)
|
|
444
|
+
- Identifies roles with elevated privileges:
|
|
445
|
+
- Roles with AdministratorAccess or PowerUserAccess
|
|
446
|
+
- Roles with policies containing Action: "*"
|
|
447
|
+
- Roles with AssumeRole permissions
|
|
448
|
+
- Checks if PermissionsBoundary field is set
|
|
449
|
+
- COMPLIANT if permission boundary configured for elevated privilege roles
|
|
450
|
+
- NON_COMPLIANT if no permission boundary on elevated privilege roles
|
|
451
|
+
- Prevents privilege escalation in delegated administration
|
|
452
|
+
|
|
453
|
+
**Remediation Guidance**:
|
|
454
|
+
```bash
|
|
455
|
+
# Create permission boundary policy
|
|
456
|
+
aws iam create-policy --policy-name DelegatedAdminBoundary --policy-document file://boundary.json
|
|
457
|
+
|
|
458
|
+
# Attach boundary to role
|
|
459
|
+
aws iam put-role-permissions-boundary --role-name <role> --permissions-boundary arn:aws:iam::<account>:policy/DelegatedAdminBoundary
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
#### Control 6.3: Service Control Policy Enablement Check
|
|
463
|
+
|
|
464
|
+
| Config Rule | Resource Types | Description |
|
|
465
|
+
|-------------|----------------|-------------|
|
|
466
|
+
| `organizations-scp-enabled-check` | AWS::::Account | Validates AWS Organizations Service Control Policies are enabled and in use |
|
|
467
|
+
|
|
468
|
+
**Assessment Logic**:
|
|
469
|
+
- Account-level check (global service, evaluated in us-east-1)
|
|
470
|
+
- Calls organizations.describe_organization() to check if account is in organization
|
|
471
|
+
- Checks if FeatureSet includes ALL or SERVICE_CONTROL_POLICY
|
|
472
|
+
- Lists SCPs to verify custom SCPs exist (beyond default FullAWSAccess)
|
|
473
|
+
- COMPLIANT if organization exists, SCPs enabled, and custom SCPs in use
|
|
474
|
+
- NON_COMPLIANT if not in organization, SCPs not enabled, or only default SCP
|
|
475
|
+
- Enforces organizational policies and guardrails
|
|
476
|
+
|
|
477
|
+
**Remediation Guidance**:
|
|
478
|
+
```bash
|
|
479
|
+
# Enable all features in Organizations
|
|
480
|
+
aws organizations enable-all-features
|
|
481
|
+
|
|
482
|
+
# Create custom SCP
|
|
483
|
+
aws organizations create-policy --name DenyRootUser --type SERVICE_CONTROL_POLICY --content file://scp.json
|
|
484
|
+
|
|
485
|
+
# Attach SCP to OU
|
|
486
|
+
aws organizations attach-policy --policy-id <policy-id> --target-id <ou-id>
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
#### Control 6.4: Cognito User Pool MFA Validation
|
|
490
|
+
|
|
491
|
+
| Config Rule | Resource Types | Description |
|
|
492
|
+
|-------------|----------------|-------------|
|
|
493
|
+
| `cognito-user-pool-mfa-enabled` | AWS::Cognito::UserPool | Ensures Cognito user pools have MFA enabled |
|
|
494
|
+
|
|
495
|
+
**Assessment Logic**:
|
|
496
|
+
- Discovers all Cognito user pools (regional service)
|
|
497
|
+
- Calls cognito-idp.describe_user_pool() to get MfaConfiguration
|
|
498
|
+
- COMPLIANT if MfaConfiguration is 'ON' or 'OPTIONAL'
|
|
499
|
+
- NON_COMPLIANT if MfaConfiguration is 'OFF'
|
|
500
|
+
- Enhances authentication security for applications
|
|
501
|
+
|
|
502
|
+
**Remediation Guidance**:
|
|
503
|
+
```bash
|
|
504
|
+
# Enable MFA for Cognito user pool
|
|
505
|
+
aws cognito-idp set-user-pool-mfa-config \
|
|
506
|
+
--user-pool-id <pool-id> \
|
|
507
|
+
--mfa-configuration ON \
|
|
508
|
+
--software-token-mfa-configuration Enabled=true \
|
|
509
|
+
--sms-mfa-configuration SmsConfiguration={SnsCallerArn=<sns-role-arn>}
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
#### Control 6.5: VPN Connection MFA Requirement Verification
|
|
513
|
+
|
|
514
|
+
| Config Rule | Resource Types | Description |
|
|
515
|
+
|-------------|----------------|-------------|
|
|
516
|
+
| `vpn-connection-mfa-enabled` | AWS::EC2::ClientVpnEndpoint | Validates Client VPN endpoints require MFA authentication |
|
|
517
|
+
|
|
518
|
+
**Assessment Logic**:
|
|
519
|
+
- Discovers all Client VPN endpoints (regional service)
|
|
520
|
+
- Checks AuthenticationOptions for MFA requirement
|
|
521
|
+
- Looks for:
|
|
522
|
+
- directory-service-authentication with MFA
|
|
523
|
+
- federated-authentication with MFA requirement
|
|
524
|
+
- certificate-authentication with additional factor
|
|
525
|
+
- COMPLIANT if MFA is required for authentication
|
|
526
|
+
- NON_COMPLIANT if no MFA requirement found
|
|
527
|
+
- Ensures secure remote access to AWS resources
|
|
528
|
+
|
|
529
|
+
**Remediation Guidance**:
|
|
530
|
+
```bash
|
|
531
|
+
# Create Client VPN endpoint with AD authentication and MFA
|
|
532
|
+
aws ec2 create-client-vpn-endpoint \
|
|
533
|
+
--client-cidr-block 10.0.0.0/16 \
|
|
534
|
+
--server-certificate-arn <cert-arn> \
|
|
535
|
+
--authentication-options Type=directory-service-authentication,ActiveDirectory={DirectoryId=<dir-id>} \
|
|
536
|
+
--connection-log-options Enabled=true,CloudwatchLogGroup=<log-group>
|
|
537
|
+
|
|
538
|
+
# Note: MFA enforcement depends on authentication method (AD, SAML, or certificate)
|
|
539
|
+
```
|
|
540
|
+
|
|
168
541
|
### Control 3.10: Encrypt Sensitive Data in Transit
|
|
169
542
|
|
|
170
543
|
**Purpose**: Encrypt sensitive data in transit between network locations.
|
|
@@ -220,6 +593,46 @@ The AWS CIS Controls Compliance Assessment Framework uses AWS Config rule specif
|
|
|
220
593
|
- Checks for threat detection services
|
|
221
594
|
- Ensures patch management compliance
|
|
222
595
|
|
|
596
|
+
### Control 8.2: Collect Audit Logs
|
|
597
|
+
|
|
598
|
+
**Purpose**: Collect audit logs from enterprise assets and software to support security monitoring, incident response, and compliance requirements.
|
|
599
|
+
|
|
600
|
+
| Config Rule | Resource Types | Description |
|
|
601
|
+
|-------------|----------------|-------------|
|
|
602
|
+
| `route53-query-logging-enabled` | AWS::Route53::HostedZone | Validates Route 53 hosted zones have query logging enabled to track DNS queries for security investigations |
|
|
603
|
+
| `alb-access-logs-enabled` | AWS::ElasticLoadBalancingV2::LoadBalancer | Ensures Application Load Balancers have access logging enabled to analyze traffic patterns |
|
|
604
|
+
| `cloudfront-access-logs-enabled` | AWS::CloudFront::Distribution | Validates CloudFront distributions have access logging enabled to track content delivery requests |
|
|
605
|
+
| `cloudwatch-log-retention-check` | AWS::Logs::LogGroup | Ensures CloudWatch log groups have appropriate retention periods (minimum 90 days) for compliance |
|
|
606
|
+
| `cloudtrail-insights-enabled` | AWS::CloudTrail::Trail | Validates CloudTrail Insights is enabled for automatic anomaly detection of API activity |
|
|
607
|
+
| `config-recording-all-resources` | AWS::Config::ConfigurationRecorder | Ensures AWS Config records all resource types to track configuration changes |
|
|
608
|
+
| `waf-logging-enabled` | AWS::WAFv2::WebACL | Validates WAF web ACLs have logging enabled to capture web application firewall events |
|
|
609
|
+
| `elb-logging-enabled` | AWS::ElasticLoadBalancing::LoadBalancer | Ensures Classic Load Balancers have access logging enabled |
|
|
610
|
+
| `rds-logging-enabled` | AWS::RDS::DBInstance | Validates RDS instances have appropriate database logging enabled |
|
|
611
|
+
| `elasticsearch-logs-to-cloudwatch` | AWS::Elasticsearch::Domain | Ensures Elasticsearch domains send logs to CloudWatch |
|
|
612
|
+
| `codebuild-project-logging-enabled` | AWS::CodeBuild::Project | Validates CodeBuild projects capture build logs |
|
|
613
|
+
| `redshift-cluster-configuration-check` | AWS::Redshift::Cluster | Ensures Redshift clusters have audit logging enabled |
|
|
614
|
+
| `wafv2-logging-enabled` | AWS::WAFv2::WebACL | Ensures WAFv2 web ACLs have logging enabled |
|
|
615
|
+
|
|
616
|
+
**Assessment Logic**:
|
|
617
|
+
- **DNS Query Logging**: Validates Route 53 hosted zones have query logging configurations pointing to CloudWatch Logs
|
|
618
|
+
- **Load Balancer Logging**: Checks ALB and Classic ELB access_logs.s3.enabled attribute and validates S3 bucket configuration
|
|
619
|
+
- **CDN Logging**: Validates CloudFront distribution Logging.Enabled field and S3 bucket configuration
|
|
620
|
+
- **Log Retention**: Checks CloudWatch log groups have retentionInDays set to at least 90 days (configurable parameter)
|
|
621
|
+
- **CloudTrail Insights**: Validates at least one active trail has InsightSelectors configured for anomaly detection
|
|
622
|
+
- **Config Recording**: Ensures configuration recorders have allSupported=true and recording status is active
|
|
623
|
+
- **WAF Logging**: Validates WAF web ACLs (both REGIONAL and CLOUDFRONT scopes) have logging configurations with destination ARNs
|
|
624
|
+
- **Multi-Region Support**: Regional services (ALB, CloudWatch Logs, AWS Config, WAF) are evaluated in all active regions
|
|
625
|
+
- **Global Services**: Route 53 and CloudFront are evaluated in us-east-1 only
|
|
626
|
+
|
|
627
|
+
**Remediation Guidance**:
|
|
628
|
+
- Route 53: Create CloudWatch Logs log group and configure query logging for each hosted zone
|
|
629
|
+
- ALB/ELB: Enable access logs with S3 bucket destination and appropriate bucket policy
|
|
630
|
+
- CloudFront: Enable logging in distribution settings with S3 bucket and optional prefix
|
|
631
|
+
- CloudWatch Logs: Set retention policy using `put-retention-policy` API (recommended: 90-365 days)
|
|
632
|
+
- CloudTrail: Enable Insights using `put-insight-selectors` API (note: additional charges apply)
|
|
633
|
+
- AWS Config: Configure recorder with allSupported=true and start recording
|
|
634
|
+
- WAF: Create Kinesis Data Firehose delivery stream (prefix: "aws-waf-logs-") and configure logging
|
|
635
|
+
|
|
223
636
|
## IG3 - Advanced Security
|
|
224
637
|
|
|
225
638
|
### Control 3.14: Log Sensitive Data Access
|
|
@@ -275,12 +688,16 @@ The AWS CIS Controls Compliance Assessment Framework uses AWS Config rule specif
|
|
|
275
688
|
|
|
276
689
|
## Bonus Security Rules
|
|
277
690
|
|
|
278
|
-
Beyond the required 133 CIS Controls rules, the framework includes
|
|
691
|
+
Beyond the required 133 CIS Controls rules, the framework includes 9 additional security enhancements:
|
|
279
692
|
|
|
280
693
|
### Enhanced Logging Security
|
|
281
694
|
| Config Rule | Resource Types | Description |
|
|
282
695
|
|-------------|----------------|-------------|
|
|
283
696
|
| `cloudwatch-log-group-encrypted` | AWS::Logs::LogGroup | Ensures CloudWatch log groups are encrypted |
|
|
697
|
+
| `route53-query-logging-enabled` | AWS::Route53::HostedZone | Validates Route 53 DNS query logging is enabled |
|
|
698
|
+
| `alb-access-logs-enabled` | AWS::ElasticLoadBalancingV2::LoadBalancer | Ensures ALB access logging is enabled |
|
|
699
|
+
| `cloudfront-access-logs-enabled` | AWS::CloudFront::Distribution | Validates CloudFront access logging is enabled |
|
|
700
|
+
| `waf-logging-enabled` | AWS::WAFv2::WebACL | Ensures WAF web ACL logging is enabled |
|
|
284
701
|
|
|
285
702
|
### Network Security Enhancements
|
|
286
703
|
| Config Rule | Resource Types | Description |
|
|
@@ -294,7 +711,7 @@ Beyond the required 133 CIS Controls rules, the framework includes 5 additional
|
|
|
294
711
|
| `kinesis-stream-encrypted` | AWS::Kinesis::Stream | Ensures Kinesis streams are encrypted |
|
|
295
712
|
| `sqs-queue-encrypted-kms` | AWS::SQS::Queue | Ensures SQS queues use KMS encryption |
|
|
296
713
|
|
|
297
|
-
**Business Value**: These bonus rules provide additional security value beyond CIS Controls requirements, enhancing the overall security posture with minimal additional overhead.
|
|
714
|
+
**Business Value**: These bonus rules provide additional security value beyond CIS Controls requirements, enhancing the overall security posture with minimal additional overhead. The audit logging rules (Control 8.2) provide comprehensive visibility across AWS services for security investigations and compliance.
|
|
298
715
|
|
|
299
716
|
## Config Rule Details
|
|
300
717
|
|
{aws_cis_controls_assessment-1.0.10.dist-info → aws_cis_controls_assessment-1.1.1.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|