aws-cis-controls-assessment 1.0.9__py3-none-any.whl → 1.1.0__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 +94 -1
- aws_cis_assessment/config/rules/cis_controls_ig2.yaml +680 -1
- aws_cis_assessment/controls/ig1/__init__.py +17 -0
- aws_cis_assessment/controls/ig1/control_aws_backup_service.py +1276 -0
- aws_cis_assessment/controls/ig2/__init__.py +74 -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/controls/ig2/control_aws_backup_ig2.py +23 -0
- aws_cis_assessment/core/assessment_engine.py +74 -0
- aws_cis_assessment/reporters/html_reporter.py +197 -35
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.1.0.dist-info}/METADATA +163 -12
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.1.0.dist-info}/RECORD +26 -21
- docs/README.md +14 -3
- docs/adding-aws-backup-controls.md +562 -0
- docs/assessment-logic.md +291 -3
- docs/cli-reference.md +1 -1
- docs/config-rule-mappings.md +465 -7
- docs/developer-guide.md +312 -3
- docs/installation.md +2 -2
- docs/troubleshooting.md +211 -2
- docs/user-guide.md +47 -2
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.1.0.dist-info}/WHEEL +0 -0
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.1.0.dist-info}/entry_points.txt +0 -0
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.1.0.dist-info}/licenses/LICENSE +0 -0
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
implementation_group: IG2
|
|
2
|
-
total_rules:
|
|
2
|
+
total_rules: 82
|
|
3
3
|
description: Enhanced security for enterprises with regulatory compliance burdens
|
|
4
4
|
controls:
|
|
5
5
|
'11.4':
|
|
@@ -344,7 +344,515 @@ controls:
|
|
|
344
344
|
parameters: {}
|
|
345
345
|
description: Assessment for acm-certificate-expiration-check AWS Config rule.
|
|
346
346
|
remediation_guidance: Follow AWS Config rule guidance for acm-certificate-expiration-check
|
|
347
|
+
- name: iam-max-session-duration-check
|
|
348
|
+
resource_types:
|
|
349
|
+
- AWS::IAM::Role
|
|
350
|
+
parameters: {}
|
|
351
|
+
description: Validates that IAM role session duration does not exceed 12 hours to limit the window of exposure for compromised credentials.
|
|
352
|
+
remediation_guidance: |
|
|
353
|
+
Update IAM role to limit session duration to 12 hours or less:
|
|
354
|
+
1. Go to IAM console > Roles
|
|
355
|
+
2. Select the role
|
|
356
|
+
3. Edit Maximum session duration
|
|
357
|
+
4. Set to 12 hours (43200 seconds) or less
|
|
358
|
+
5. Save changes
|
|
359
|
+
|
|
360
|
+
AWS CLI example:
|
|
361
|
+
aws iam update-role --role-name <role-name> --max-session-duration 43200
|
|
362
|
+
control_id: '4.1'
|
|
363
|
+
ig_level: IG2
|
|
364
|
+
- name: security-group-default-rules-check
|
|
365
|
+
resource_types:
|
|
366
|
+
- AWS::EC2::SecurityGroup
|
|
367
|
+
parameters: {}
|
|
368
|
+
description: Ensures default security groups have no inbound or outbound rules to prevent unintended network access.
|
|
369
|
+
remediation_guidance: |
|
|
370
|
+
Remove all rules from default security group:
|
|
371
|
+
1. Go to EC2 console > Security Groups
|
|
372
|
+
2. Select the default security group
|
|
373
|
+
3. Remove all inbound rules
|
|
374
|
+
4. Remove all outbound rules
|
|
375
|
+
5. Create custom security groups for actual use
|
|
376
|
+
|
|
377
|
+
AWS CLI example:
|
|
378
|
+
aws ec2 revoke-security-group-ingress --group-id <sg-id> --ip-permissions <permissions>
|
|
379
|
+
aws ec2 revoke-security-group-egress --group-id <sg-id> --ip-permissions <permissions>
|
|
380
|
+
|
|
381
|
+
Note: Default security groups cannot be deleted, only restricted.
|
|
382
|
+
control_id: '4.2'
|
|
383
|
+
ig_level: IG2
|
|
384
|
+
- name: vpc-dns-resolution-enabled
|
|
385
|
+
resource_types:
|
|
386
|
+
- AWS::EC2::VPC
|
|
387
|
+
parameters: {}
|
|
388
|
+
description: Validates VPC DNS configuration (enableDnsHostnames and enableDnsSupport) to ensure proper name resolution within the VPC.
|
|
389
|
+
remediation_guidance: |
|
|
390
|
+
Enable DNS resolution for VPC:
|
|
391
|
+
1. Go to VPC console
|
|
392
|
+
2. Select the VPC
|
|
393
|
+
3. Actions > Edit DNS resolution
|
|
394
|
+
4. Enable DNS resolution (enableDnsSupport)
|
|
395
|
+
5. Actions > Edit DNS hostnames
|
|
396
|
+
6. Enable DNS hostnames (enableDnsHostnames)
|
|
397
|
+
|
|
398
|
+
AWS CLI example:
|
|
399
|
+
aws ec2 modify-vpc-attribute --vpc-id <vpc-id> --enable-dns-support
|
|
400
|
+
aws ec2 modify-vpc-attribute --vpc-id <vpc-id> --enable-dns-hostnames
|
|
401
|
+
control_id: '4.3'
|
|
402
|
+
ig_level: IG2
|
|
403
|
+
- name: rds-default-admin-check
|
|
404
|
+
resource_types:
|
|
405
|
+
- AWS::RDS::DBInstance
|
|
406
|
+
parameters: {}
|
|
407
|
+
description: Ensures RDS instances don't use default admin usernames (postgres, admin, root, mysql, administrator, sa) to reduce predictability for attackers.
|
|
408
|
+
remediation_guidance: |
|
|
409
|
+
RDS master username cannot be changed after creation. Remediation requires:
|
|
410
|
+
1. Create a snapshot of the existing RDS instance
|
|
411
|
+
2. Restore snapshot to a new instance with a custom master username
|
|
412
|
+
3. Update application connection strings
|
|
413
|
+
4. Test the new instance thoroughly
|
|
414
|
+
5. Delete the old instance after verification
|
|
415
|
+
|
|
416
|
+
AWS CLI example:
|
|
417
|
+
aws rds create-db-snapshot --db-instance-identifier <old-instance> --db-snapshot-identifier <snapshot-name>
|
|
418
|
+
aws rds restore-db-instance-from-db-snapshot --db-instance-identifier <new-instance> --db-snapshot-identifier <snapshot-name> --master-username <custom-username>
|
|
419
|
+
|
|
420
|
+
Note: This is a disruptive change requiring downtime. Plan accordingly.
|
|
421
|
+
control_id: '4.4'
|
|
422
|
+
ig_level: IG2
|
|
423
|
+
- name: ec2-instance-profile-least-privilege
|
|
424
|
+
resource_types:
|
|
425
|
+
- AWS::EC2::Instance
|
|
426
|
+
parameters: {}
|
|
427
|
+
description: Validates EC2 instance profile permissions follow least privilege principles by checking for overly permissive policies.
|
|
428
|
+
remediation_guidance: |
|
|
429
|
+
Apply least privilege to instance profile:
|
|
430
|
+
1. Review the instance profile's IAM role policies
|
|
431
|
+
2. Identify overly broad permissions (wildcards, full access)
|
|
432
|
+
3. Create new policies with specific actions and resources
|
|
433
|
+
4. Replace broad policies with specific policies
|
|
434
|
+
5. Test application functionality
|
|
435
|
+
6. Remove overly permissive policies
|
|
436
|
+
|
|
437
|
+
AWS CLI example:
|
|
438
|
+
aws iam create-policy --policy-name <specific-policy> --policy-document file://policy.json
|
|
439
|
+
aws iam attach-role-policy --role-name <role-name> --policy-arn <specific-policy-arn>
|
|
440
|
+
aws iam detach-role-policy --role-name <role-name> --policy-arn <broad-policy-arn>
|
|
441
|
+
|
|
442
|
+
Best practices:
|
|
443
|
+
- Grant only the permissions required for the instance's workload
|
|
444
|
+
- Use specific actions instead of wildcards
|
|
445
|
+
- Limit resources to specific ARNs when possible
|
|
446
|
+
- Regularly review and refine permissions
|
|
447
|
+
control_id: '4.5'
|
|
448
|
+
ig_level: IG2
|
|
449
|
+
'5.1':
|
|
450
|
+
title: Establish and Maintain an Inventory of Service Accounts
|
|
451
|
+
weight: 1.0
|
|
452
|
+
config_rules:
|
|
453
|
+
- name: iam-service-account-inventory-check
|
|
454
|
+
resource_types:
|
|
455
|
+
- AWS::IAM::User
|
|
456
|
+
- AWS::IAM::Role
|
|
457
|
+
parameters: {}
|
|
458
|
+
description: Validates service accounts have required documentation tags (Purpose, Owner, LastReviewed) for proper inventory management.
|
|
459
|
+
remediation_guidance: |
|
|
460
|
+
Add required documentation tags to service accounts:
|
|
461
|
+
1. Go to IAM console > Users or Roles
|
|
462
|
+
2. Select the service account
|
|
463
|
+
3. Tags tab > Manage tags
|
|
464
|
+
4. Add required tags:
|
|
465
|
+
- Purpose: Description of what the account is used for
|
|
466
|
+
- Owner: Team or individual responsible
|
|
467
|
+
- LastReviewed: Date of last access review (YYYY-MM-DD)
|
|
468
|
+
5. Save changes
|
|
469
|
+
|
|
470
|
+
AWS CLI example:
|
|
471
|
+
aws iam tag-user --user-name <service-account> --tags Key=Purpose,Value="API access for app" Key=Owner,Value="platform-team" Key=LastReviewed,Value="2024-01-15"
|
|
472
|
+
aws iam tag-role --role-name <service-role> --tags Key=Purpose,Value="Lambda execution" Key=Owner,Value="dev-team" Key=LastReviewed,Value="2024-01-15"
|
|
473
|
+
|
|
474
|
+
Best practices:
|
|
475
|
+
- Review service accounts quarterly
|
|
476
|
+
- Update LastReviewed tag after each review
|
|
477
|
+
- Remove unused service accounts
|
|
478
|
+
- Document service account inventory
|
|
479
|
+
control_id: '5.1'
|
|
480
|
+
ig_level: IG2
|
|
347
481
|
'5.2':
|
|
482
|
+
title: Centralize Account Management
|
|
483
|
+
weight: 1.0
|
|
484
|
+
config_rules:
|
|
485
|
+
- name: iam-admin-policy-attached-to-role-check
|
|
486
|
+
resource_types:
|
|
487
|
+
- AWS::IAM::User
|
|
488
|
+
parameters: {}
|
|
489
|
+
description: Ensures administrative policies are attached to roles, not users, to enable temporary credential usage and better audit trails.
|
|
490
|
+
remediation_guidance: |
|
|
491
|
+
Move administrative access from users to roles:
|
|
492
|
+
1. Create an IAM role for administrative access
|
|
493
|
+
2. Attach administrative policies to the role
|
|
494
|
+
3. Configure trust policy for the role (allow users to assume)
|
|
495
|
+
4. Remove administrative policies from IAM users
|
|
496
|
+
5. Users should assume the role when admin access is needed
|
|
497
|
+
|
|
498
|
+
AWS CLI example:
|
|
499
|
+
# Create admin role
|
|
500
|
+
aws iam create-role --role-name AdminRole --assume-role-policy-document file://trust-policy.json
|
|
501
|
+
aws iam attach-role-policy --role-name AdminRole --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
|
|
502
|
+
|
|
503
|
+
# Remove admin policy from user
|
|
504
|
+
aws iam detach-user-policy --user-name <user> --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
|
|
505
|
+
|
|
506
|
+
# User assumes role
|
|
507
|
+
aws sts assume-role --role-arn arn:aws:iam::<account>:role/AdminRole --role-session-name admin-session
|
|
508
|
+
|
|
509
|
+
Benefits:
|
|
510
|
+
- Temporary credentials with session limits
|
|
511
|
+
- Audit trail of role assumptions
|
|
512
|
+
- Centralized permission management
|
|
513
|
+
- Easier to revoke access
|
|
514
|
+
control_id: '5.2'
|
|
515
|
+
ig_level: IG2
|
|
516
|
+
- name: sso-enabled-check
|
|
517
|
+
resource_types:
|
|
518
|
+
- AWS::::Account
|
|
519
|
+
parameters: {}
|
|
520
|
+
description: Validates AWS IAM Identity Center (SSO) is configured for centralized identity management and single sign-on.
|
|
521
|
+
remediation_guidance: |
|
|
522
|
+
Enable AWS IAM Identity Center (SSO):
|
|
523
|
+
1. Go to IAM Identity Center console
|
|
524
|
+
2. Enable IAM Identity Center
|
|
525
|
+
3. Choose identity source:
|
|
526
|
+
- Identity Center directory (default)
|
|
527
|
+
- Active Directory
|
|
528
|
+
- External identity provider (SAML 2.0)
|
|
529
|
+
4. Configure users and groups
|
|
530
|
+
5. Assign users to AWS accounts and permission sets
|
|
531
|
+
6. Users access AWS via SSO portal
|
|
532
|
+
|
|
533
|
+
Benefits:
|
|
534
|
+
- Centralized user management
|
|
535
|
+
- Single sign-on experience
|
|
536
|
+
- Temporary credentials
|
|
537
|
+
- Integration with corporate identity providers
|
|
538
|
+
- Reduced IAM user sprawl
|
|
539
|
+
control_id: '5.3'
|
|
540
|
+
ig_level: IG2
|
|
541
|
+
- name: iam-user-no-inline-policies
|
|
542
|
+
resource_types:
|
|
543
|
+
- AWS::IAM::User
|
|
544
|
+
parameters: {}
|
|
545
|
+
description: Ensures IAM users don't have inline policies, promoting use of managed policies for better reusability and management.
|
|
546
|
+
remediation_guidance: |
|
|
547
|
+
Replace inline policies with managed policies or group memberships:
|
|
548
|
+
1. Review inline policy document
|
|
549
|
+
2. Create equivalent managed policy or identify existing managed policy
|
|
550
|
+
3. Attach managed policy to user or add user to appropriate group
|
|
551
|
+
4. Test that user still has required permissions
|
|
552
|
+
5. Delete inline policy
|
|
553
|
+
|
|
554
|
+
AWS CLI example:
|
|
555
|
+
# Get inline policy document
|
|
556
|
+
aws iam get-user-policy --user-name <user> --policy-name <inline-policy> > policy.json
|
|
557
|
+
|
|
558
|
+
# Create managed policy from document
|
|
559
|
+
aws iam create-policy --policy-name <policy-name> --policy-document file://policy.json
|
|
560
|
+
|
|
561
|
+
# Attach managed policy to user
|
|
562
|
+
aws iam attach-user-policy --user-name <user> --policy-arn <policy-arn>
|
|
563
|
+
|
|
564
|
+
# Delete inline policy
|
|
565
|
+
aws iam delete-user-policy --user-name <user> --policy-name <inline-policy>
|
|
566
|
+
|
|
567
|
+
Best practices:
|
|
568
|
+
- Use managed policies for reusability
|
|
569
|
+
- Use groups for common permission sets
|
|
570
|
+
- Avoid user-specific permissions when possible
|
|
571
|
+
- Managed policies are easier to audit and update
|
|
572
|
+
control_id: '5.4'
|
|
573
|
+
ig_level: IG2
|
|
574
|
+
'6.1':
|
|
575
|
+
title: Establish an Access Granting Process
|
|
576
|
+
weight: 1.0
|
|
577
|
+
config_rules:
|
|
578
|
+
- name: iam-access-analyzer-enabled
|
|
579
|
+
resource_types:
|
|
580
|
+
- AWS::AccessAnalyzer::Analyzer
|
|
581
|
+
parameters: {}
|
|
582
|
+
description: Ensures IAM Access Analyzer is enabled in all active regions to identify resources shared with external entities.
|
|
583
|
+
remediation_guidance: |
|
|
584
|
+
Enable IAM Access Analyzer in each region:
|
|
585
|
+
1. Go to IAM console > Access Analyzer
|
|
586
|
+
2. Create analyzer for each active region
|
|
587
|
+
3. Choose analyzer type:
|
|
588
|
+
- Account analyzer: Analyzes resources in the account
|
|
589
|
+
- Organization analyzer: Analyzes resources across organization
|
|
590
|
+
4. Review findings regularly
|
|
591
|
+
|
|
592
|
+
AWS CLI example:
|
|
593
|
+
aws accessanalyzer create-analyzer --analyzer-name account-analyzer --type ACCOUNT --region <region>
|
|
594
|
+
|
|
595
|
+
# Create in all regions
|
|
596
|
+
for region in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text); do
|
|
597
|
+
aws accessanalyzer create-analyzer --analyzer-name account-analyzer --type ACCOUNT --region $region
|
|
598
|
+
done
|
|
599
|
+
|
|
600
|
+
Benefits:
|
|
601
|
+
- Identifies resources shared with external entities
|
|
602
|
+
- Detects unintended access
|
|
603
|
+
- Continuous monitoring
|
|
604
|
+
- Compliance validation
|
|
605
|
+
control_id: '6.1'
|
|
606
|
+
ig_level: IG2
|
|
607
|
+
- name: iam-permission-boundaries-check
|
|
608
|
+
resource_types:
|
|
609
|
+
- AWS::IAM::Role
|
|
610
|
+
parameters: {}
|
|
611
|
+
description: Validates permission boundaries for roles with elevated privileges to prevent privilege escalation.
|
|
612
|
+
remediation_guidance: |
|
|
613
|
+
Configure permission boundaries for delegated administration:
|
|
614
|
+
1. Create a permission boundary policy that defines maximum permissions
|
|
615
|
+
2. Attach permission boundary to roles with elevated privileges
|
|
616
|
+
3. Permission boundary limits what the role can do, even with full access policies
|
|
617
|
+
|
|
618
|
+
AWS CLI example:
|
|
619
|
+
# Create permission boundary policy
|
|
620
|
+
aws iam create-policy --policy-name DelegatedAdminBoundary --policy-document file://boundary.json
|
|
621
|
+
|
|
622
|
+
# Attach boundary to role
|
|
623
|
+
aws iam put-role-permissions-boundary --role-name <role> --permissions-boundary arn:aws:iam::<account>:policy/DelegatedAdminBoundary
|
|
624
|
+
|
|
625
|
+
Example boundary policy (boundary.json):
|
|
626
|
+
{
|
|
627
|
+
"Version": "2012-10-17",
|
|
628
|
+
"Statement": [
|
|
629
|
+
{
|
|
630
|
+
"Effect": "Allow",
|
|
631
|
+
"Action": "*",
|
|
632
|
+
"Resource": "*"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"Effect": "Deny",
|
|
636
|
+
"Action": [
|
|
637
|
+
"iam:DeleteRole",
|
|
638
|
+
"iam:DeleteRolePermissionsBoundary",
|
|
639
|
+
"organizations:LeaveOrganization"
|
|
640
|
+
],
|
|
641
|
+
"Resource": "*"
|
|
642
|
+
}
|
|
643
|
+
]
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
Use cases:
|
|
647
|
+
- Delegated administration
|
|
648
|
+
- Developer self-service
|
|
649
|
+
- Prevent privilege escalation
|
|
650
|
+
- Enforce organizational policies
|
|
651
|
+
control_id: '6.2'
|
|
652
|
+
ig_level: IG2
|
|
653
|
+
- name: organizations-scp-enabled-check
|
|
654
|
+
resource_types:
|
|
655
|
+
- AWS::::Account
|
|
656
|
+
parameters: {}
|
|
657
|
+
description: Ensures Service Control Policies are enabled and in use to enforce organizational policies across AWS accounts.
|
|
658
|
+
remediation_guidance: |
|
|
659
|
+
Enable and configure Service Control Policies:
|
|
660
|
+
1. Ensure account is part of AWS Organizations
|
|
661
|
+
2. Enable all features in Organizations (includes SCPs)
|
|
662
|
+
3. Create custom SCPs to enforce organizational policies
|
|
663
|
+
4. Attach SCPs to OUs or accounts
|
|
664
|
+
|
|
665
|
+
AWS CLI example:
|
|
666
|
+
# Enable all features (if using consolidated billing only)
|
|
667
|
+
aws organizations enable-all-features
|
|
668
|
+
|
|
669
|
+
# Create custom SCP
|
|
670
|
+
aws organizations create-policy --name DenyRootUser --type SERVICE_CONTROL_POLICY --content file://scp.json
|
|
671
|
+
|
|
672
|
+
# Attach SCP to OU
|
|
673
|
+
aws organizations attach-policy --policy-id <policy-id> --target-id <ou-id>
|
|
674
|
+
|
|
675
|
+
Example SCP (scp.json) - Deny root user actions:
|
|
676
|
+
{
|
|
677
|
+
"Version": "2012-10-17",
|
|
678
|
+
"Statement": [
|
|
679
|
+
{
|
|
680
|
+
"Effect": "Deny",
|
|
681
|
+
"Action": "*",
|
|
682
|
+
"Resource": "*",
|
|
683
|
+
"Condition": {
|
|
684
|
+
"StringLike": {
|
|
685
|
+
"aws:PrincipalArn": "arn:aws:iam::*:root"
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
]
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
Common SCP use cases:
|
|
693
|
+
- Deny access to specific regions
|
|
694
|
+
- Deny root user actions
|
|
695
|
+
- Require MFA for sensitive operations
|
|
696
|
+
- Prevent disabling security services
|
|
697
|
+
- Enforce tagging requirements
|
|
698
|
+
control_id: '6.3'
|
|
699
|
+
ig_level: IG2
|
|
700
|
+
- name: cognito-user-pool-mfa-enabled
|
|
701
|
+
resource_types:
|
|
702
|
+
- AWS::Cognito::UserPool
|
|
703
|
+
parameters: {}
|
|
704
|
+
description: Validates Cognito user pools have MFA enabled to provide additional authentication security.
|
|
705
|
+
remediation_guidance: |
|
|
706
|
+
Enable MFA for Cognito user pools:
|
|
707
|
+
1. Go to Cognito console > User pools
|
|
708
|
+
2. Select the user pool
|
|
709
|
+
3. Sign-in experience tab > Multi-factor authentication
|
|
710
|
+
4. Configure MFA:
|
|
711
|
+
- Required: All users must use MFA
|
|
712
|
+
- Optional: Users can choose to enable MFA
|
|
713
|
+
5. Choose MFA methods:
|
|
714
|
+
- SMS text message
|
|
715
|
+
- Time-based one-time password (TOTP)
|
|
716
|
+
- Both
|
|
717
|
+
6. Save changes
|
|
718
|
+
|
|
719
|
+
AWS CLI example:
|
|
720
|
+
aws cognito-idp set-user-pool-mfa-config \
|
|
721
|
+
--user-pool-id <pool-id> \
|
|
722
|
+
--mfa-configuration ON \
|
|
723
|
+
--software-token-mfa-configuration Enabled=true \
|
|
724
|
+
--sms-mfa-configuration SmsConfiguration={SnsCallerArn=<sns-role-arn>}
|
|
725
|
+
|
|
726
|
+
Best practices:
|
|
727
|
+
- Use 'Required' for sensitive applications
|
|
728
|
+
- Support both SMS and TOTP for flexibility
|
|
729
|
+
- Configure SMS role with appropriate permissions
|
|
730
|
+
- Test MFA flow before enforcing
|
|
731
|
+
control_id: '6.4'
|
|
732
|
+
ig_level: IG2
|
|
733
|
+
- name: vpn-connection-mfa-enabled
|
|
734
|
+
resource_types:
|
|
735
|
+
- AWS::EC2::ClientVpnEndpoint
|
|
736
|
+
parameters: {}
|
|
737
|
+
description: Ensures Client VPN endpoints require MFA authentication to secure remote access.
|
|
738
|
+
remediation_guidance: |
|
|
739
|
+
Enable MFA for Client VPN endpoints:
|
|
740
|
+
|
|
741
|
+
For Active Directory authentication:
|
|
742
|
+
1. Go to VPC console > Client VPN Endpoints
|
|
743
|
+
2. Select the endpoint
|
|
744
|
+
3. Modify authentication
|
|
745
|
+
4. Enable MFA in Active Directory configuration
|
|
746
|
+
5. Apply changes
|
|
747
|
+
|
|
748
|
+
For SAML-based authentication:
|
|
749
|
+
1. Configure MFA in your identity provider (IdP)
|
|
750
|
+
2. Update SAML assertion to include MFA claim
|
|
751
|
+
3. Client VPN will enforce MFA through IdP
|
|
752
|
+
|
|
753
|
+
AWS CLI example:
|
|
754
|
+
# Create Client VPN endpoint with AD authentication and MFA
|
|
755
|
+
aws ec2 create-client-vpn-endpoint \
|
|
756
|
+
--client-cidr-block 10.0.0.0/16 \
|
|
757
|
+
--server-certificate-arn <cert-arn> \
|
|
758
|
+
--authentication-options Type=directory-service-authentication,ActiveDirectory={DirectoryId=<dir-id>} \
|
|
759
|
+
--connection-log-options Enabled=true,CloudwatchLogGroup=<log-group>
|
|
760
|
+
|
|
761
|
+
Note: MFA enforcement depends on the authentication method:
|
|
762
|
+
- Active Directory: Configure MFA in AD
|
|
763
|
+
- SAML: Configure MFA in IdP
|
|
764
|
+
- Mutual authentication: Use certificate + additional factor
|
|
765
|
+
|
|
766
|
+
Best practices:
|
|
767
|
+
- Always require MFA for VPN access
|
|
768
|
+
- Use strong MFA methods (TOTP, hardware tokens)
|
|
769
|
+
- Monitor VPN connection logs
|
|
770
|
+
- Regularly review VPN access
|
|
771
|
+
control_id: '6.5'
|
|
772
|
+
ig_level: IG2
|
|
773
|
+
'11.3':
|
|
774
|
+
title: Establish and Maintain Data Recovery Process - Advanced
|
|
775
|
+
weight: 1.0
|
|
776
|
+
config_rules:
|
|
777
|
+
- name: backup-vault-lock-check
|
|
778
|
+
resource_types:
|
|
779
|
+
- AWS::Backup::BackupVault
|
|
780
|
+
parameters: {}
|
|
781
|
+
description: Validates that AWS Backup vaults have Vault Lock enabled to prevent deletion of recovery points providing ransomware protection
|
|
782
|
+
remediation_guidance: |
|
|
783
|
+
Enable Vault Lock for critical backup vaults:
|
|
784
|
+
- Vault Lock provides immutable backups (WORM - Write Once Read Many)
|
|
785
|
+
- Protects against accidental or malicious deletion
|
|
786
|
+
- Compliance mode prevents even root user from deleting backups
|
|
787
|
+
|
|
788
|
+
To enable Vault Lock:
|
|
789
|
+
1. Go to AWS Backup console
|
|
790
|
+
2. Select your backup vault
|
|
791
|
+
3. Configure Vault Lock:
|
|
792
|
+
- Set minimum retention period
|
|
793
|
+
- Set maximum retention period (optional)
|
|
794
|
+
- Choose compliance mode for strictest protection
|
|
795
|
+
4. Test the configuration before finalizing
|
|
796
|
+
|
|
797
|
+
AWS CLI example:
|
|
798
|
+
aws backup put-backup-vault-lock-configuration \
|
|
799
|
+
--backup-vault-name MyVault \
|
|
800
|
+
--min-retention-days 35 \
|
|
801
|
+
--max-retention-days 365
|
|
802
|
+
- name: backup-report-plan-exists-check
|
|
803
|
+
resource_types:
|
|
804
|
+
- AWS::Backup::ReportPlan
|
|
805
|
+
parameters: {}
|
|
806
|
+
description: Validates that AWS Backup has report plans configured to monitor backup compliance and provide audit trails
|
|
807
|
+
remediation_guidance: |
|
|
808
|
+
Configure backup report plans for compliance monitoring:
|
|
809
|
+
- At least one report plan should exist
|
|
810
|
+
- Reports should cover backup job status and compliance
|
|
811
|
+
- Report delivery should be configured to S3
|
|
812
|
+
- Reports provide audit trails for compliance
|
|
813
|
+
|
|
814
|
+
To create a report plan:
|
|
815
|
+
1. Go to AWS Backup console
|
|
816
|
+
2. Navigate to Reports section
|
|
817
|
+
3. Create report plan:
|
|
818
|
+
- Choose report template (backup job report, compliance report, etc.)
|
|
819
|
+
- Configure S3 bucket for delivery
|
|
820
|
+
- Set report frequency
|
|
821
|
+
4. Review generated reports regularly
|
|
822
|
+
|
|
823
|
+
AWS CLI example:
|
|
824
|
+
aws backup create-report-plan \
|
|
825
|
+
--report-plan-name ComplianceReport \
|
|
826
|
+
--report-delivery-channel S3BucketName=my-backup-reports \
|
|
827
|
+
--report-setting ReportTemplate=BACKUP_JOB_REPORT
|
|
828
|
+
- name: backup-restore-testing-plan-exists-check
|
|
829
|
+
resource_types:
|
|
830
|
+
- AWS::Backup::RestoreTestingPlan
|
|
831
|
+
parameters: {}
|
|
832
|
+
description: Validates that AWS Backup has restore testing plans configured to ensure backups are actually recoverable and meet RTO/RPO requirements
|
|
833
|
+
remediation_guidance: |
|
|
834
|
+
Configure restore testing plans to validate backup recoverability:
|
|
835
|
+
- At least one restore testing plan should exist
|
|
836
|
+
- Testing plans should be actively running
|
|
837
|
+
- Critical backup vaults should be included in testing
|
|
838
|
+
- Testing frequency should be appropriate (weekly/monthly)
|
|
839
|
+
|
|
840
|
+
To create a restore testing plan:
|
|
841
|
+
1. Go to AWS Backup console
|
|
842
|
+
2. Navigate to Restore testing section
|
|
843
|
+
3. Create restore testing plan:
|
|
844
|
+
- Select backup vaults to test
|
|
845
|
+
- Configure testing schedule
|
|
846
|
+
- Define validation rules
|
|
847
|
+
- Set up notifications for test results
|
|
848
|
+
4. Monitor test execution and results
|
|
849
|
+
|
|
850
|
+
AWS CLI example:
|
|
851
|
+
aws backup create-restore-testing-plan \
|
|
852
|
+
--restore-testing-plan-name WeeklyRestoreTest \
|
|
853
|
+
--schedule-expression "cron(0 2 ? * SUN *)" \
|
|
854
|
+
--start-window-hours 2
|
|
855
|
+
'5.5':
|
|
348
856
|
title: Use Unique Passwords
|
|
349
857
|
weight: 1.0
|
|
350
858
|
config_rules:
|
|
@@ -410,3 +918,174 @@ controls:
|
|
|
410
918
|
description: Assessment for redshift-cluster-configuration-check AWS Config
|
|
411
919
|
rule.
|
|
412
920
|
remediation_guidance: Follow AWS Config rule guidance for redshift-cluster-configuration-check
|
|
921
|
+
- name: route53-query-logging-enabled
|
|
922
|
+
resource_types:
|
|
923
|
+
- AWS::Route53::HostedZone
|
|
924
|
+
parameters: {}
|
|
925
|
+
description: Validates that Route 53 hosted zones have query logging enabled
|
|
926
|
+
to track DNS queries for security investigations and compliance.
|
|
927
|
+
remediation_guidance: |
|
|
928
|
+
Enable Route 53 query logging for hosted zones:
|
|
929
|
+
1. Create a CloudWatch Logs log group to receive query logs
|
|
930
|
+
2. Go to Route 53 console and select your hosted zone
|
|
931
|
+
3. Configure query logging:
|
|
932
|
+
- Choose the CloudWatch Logs log group
|
|
933
|
+
- Grant Route 53 permissions to write to the log group
|
|
934
|
+
4. Query logs will capture DNS queries including query name, type, response code, and more
|
|
935
|
+
|
|
936
|
+
AWS CLI example:
|
|
937
|
+
aws route53 create-query-logging-config \
|
|
938
|
+
--hosted-zone-id Z1234567890ABC \
|
|
939
|
+
--cloud-watch-logs-log-group-arn arn:aws:logs:us-east-1:123456789012:log-group:/aws/route53/example.com
|
|
940
|
+
|
|
941
|
+
AWS Documentation: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html
|
|
942
|
+
- name: alb-access-logs-enabled
|
|
943
|
+
resource_types:
|
|
944
|
+
- AWS::ElasticLoadBalancingV2::LoadBalancer
|
|
945
|
+
parameters: {}
|
|
946
|
+
description: Ensures Application Load Balancers have access logging enabled
|
|
947
|
+
to analyze traffic patterns and investigate security incidents.
|
|
948
|
+
remediation_guidance: |
|
|
949
|
+
Enable access logging for Application Load Balancers:
|
|
950
|
+
1. Create or identify an S3 bucket to store access logs
|
|
951
|
+
2. Configure bucket policy to allow ELB service to write logs
|
|
952
|
+
3. Go to EC2 console > Load Balancers
|
|
953
|
+
4. Select your Application Load Balancer
|
|
954
|
+
5. Edit attributes and enable access logs:
|
|
955
|
+
- Enable access logs
|
|
956
|
+
- Specify S3 bucket name
|
|
957
|
+
- Optionally specify S3 prefix
|
|
958
|
+
|
|
959
|
+
AWS CLI example:
|
|
960
|
+
aws elbv2 modify-load-balancer-attributes \
|
|
961
|
+
--load-balancer-arn arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/my-alb/1234567890abcdef \
|
|
962
|
+
--attributes Key=access_logs.s3.enabled,Value=true Key=access_logs.s3.bucket,Value=my-alb-logs
|
|
963
|
+
|
|
964
|
+
AWS Documentation: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html
|
|
965
|
+
- name: cloudfront-access-logs-enabled
|
|
966
|
+
resource_types:
|
|
967
|
+
- AWS::CloudFront::Distribution
|
|
968
|
+
parameters: {}
|
|
969
|
+
description: Validates that CloudFront distributions have access logging enabled
|
|
970
|
+
to track content delivery requests and detect anomalous access patterns.
|
|
971
|
+
remediation_guidance: |
|
|
972
|
+
Enable access logging for CloudFront distributions:
|
|
973
|
+
1. Create or identify an S3 bucket to store access logs
|
|
974
|
+
2. Go to CloudFront console and select your distribution
|
|
975
|
+
3. Edit distribution settings:
|
|
976
|
+
- Enable logging
|
|
977
|
+
- Specify S3 bucket for logs
|
|
978
|
+
- Optionally specify log prefix
|
|
979
|
+
- Choose whether to include cookies in logs
|
|
980
|
+
4. CloudFront will deliver logs within 24 hours of request
|
|
981
|
+
|
|
982
|
+
AWS CLI example:
|
|
983
|
+
aws cloudfront update-distribution \
|
|
984
|
+
--id E1234567890ABC \
|
|
985
|
+
--distribution-config file://distribution-config.json
|
|
986
|
+
|
|
987
|
+
(distribution-config.json should include Logging.Enabled=true and Logging.Bucket)
|
|
988
|
+
|
|
989
|
+
AWS Documentation: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html
|
|
990
|
+
- name: cloudwatch-log-retention-check
|
|
991
|
+
resource_types:
|
|
992
|
+
- AWS::Logs::LogGroup
|
|
993
|
+
parameters:
|
|
994
|
+
minimumRetentionDays: 90
|
|
995
|
+
description: Ensures CloudWatch log groups have appropriate retention periods
|
|
996
|
+
so that logs are retained long enough for compliance and investigation purposes.
|
|
997
|
+
remediation_guidance: |
|
|
998
|
+
Set retention period for CloudWatch log groups:
|
|
999
|
+
1. Go to CloudWatch console > Log groups
|
|
1000
|
+
2. Select the log group
|
|
1001
|
+
3. Choose Actions > Edit retention setting
|
|
1002
|
+
4. Set retention period to at least 90 days (or as required by your compliance needs)
|
|
1003
|
+
5. Common retention periods: 90 days, 180 days, 1 year, 5 years, 10 years
|
|
1004
|
+
|
|
1005
|
+
Note: Indefinite retention (Never expire) is not recommended due to storage costs
|
|
1006
|
+
and compliance requirements for defined retention periods.
|
|
1007
|
+
|
|
1008
|
+
AWS CLI example:
|
|
1009
|
+
aws logs put-retention-policy \
|
|
1010
|
+
--log-group-name /aws/lambda/my-function \
|
|
1011
|
+
--retention-in-days 90
|
|
1012
|
+
|
|
1013
|
+
AWS Documentation: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html
|
|
1014
|
+
- name: cloudtrail-insights-enabled
|
|
1015
|
+
resource_types:
|
|
1016
|
+
- AWS::CloudTrail::Trail
|
|
1017
|
+
parameters: {}
|
|
1018
|
+
description: Validates that CloudTrail Insights is enabled for anomaly detection
|
|
1019
|
+
so that anomalous API activity can be automatically detected.
|
|
1020
|
+
remediation_guidance: |
|
|
1021
|
+
Enable CloudTrail Insights for anomaly detection:
|
|
1022
|
+
1. Go to CloudTrail console and select your trail
|
|
1023
|
+
2. Edit trail settings
|
|
1024
|
+
3. Enable Insights events:
|
|
1025
|
+
- Check "Enable Insights events"
|
|
1026
|
+
- Insights will analyze write management events
|
|
1027
|
+
- Anomalies are detected using machine learning
|
|
1028
|
+
4. CloudTrail Insights will generate events when unusual activity is detected
|
|
1029
|
+
5. Configure CloudWatch alarms or EventBridge rules to alert on Insights events
|
|
1030
|
+
|
|
1031
|
+
AWS CLI example:
|
|
1032
|
+
aws cloudtrail put-insight-selectors \
|
|
1033
|
+
--trail-name my-trail \
|
|
1034
|
+
--insight-selectors '[{"InsightType": "ApiCallRateInsight"}]'
|
|
1035
|
+
|
|
1036
|
+
Note: CloudTrail Insights incurs additional charges beyond standard CloudTrail logging.
|
|
1037
|
+
|
|
1038
|
+
AWS Documentation: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html
|
|
1039
|
+
- name: config-recording-all-resources
|
|
1040
|
+
resource_types:
|
|
1041
|
+
- AWS::Config::ConfigurationRecorder
|
|
1042
|
+
parameters: {}
|
|
1043
|
+
description: Ensures AWS Config is recording all resource types so that configuration
|
|
1044
|
+
changes are tracked for compliance and security analysis.
|
|
1045
|
+
remediation_guidance: |
|
|
1046
|
+
Configure AWS Config to record all resource types:
|
|
1047
|
+
1. Go to AWS Config console
|
|
1048
|
+
2. If Config is not set up, complete the setup wizard:
|
|
1049
|
+
- Choose "Record all resources supported in this region"
|
|
1050
|
+
- Include global resources (IAM, etc.) in one region
|
|
1051
|
+
- Create or select an S3 bucket for configuration history
|
|
1052
|
+
- Create or select an SNS topic for notifications
|
|
1053
|
+
- Create or select an IAM role for Config
|
|
1054
|
+
3. If Config is already set up, edit the configuration recorder:
|
|
1055
|
+
- Ensure "Record all resources supported in this region" is selected
|
|
1056
|
+
- Ensure the recorder is turned on (recording=true)
|
|
1057
|
+
|
|
1058
|
+
AWS CLI example:
|
|
1059
|
+
aws configservice put-configuration-recorder \
|
|
1060
|
+
--configuration-recorder name=default,roleARN=arn:aws:iam::123456789012:role/config-role \
|
|
1061
|
+
--recording-group allSupported=true,includeGlobalResourceTypes=true
|
|
1062
|
+
|
|
1063
|
+
aws configservice start-configuration-recorder --configuration-recorder-name default
|
|
1064
|
+
|
|
1065
|
+
AWS Documentation: https://docs.aws.amazon.com/config/latest/developerguide/select-resources.html
|
|
1066
|
+
- name: waf-logging-enabled
|
|
1067
|
+
resource_types:
|
|
1068
|
+
- AWS::WAFv2::WebACL
|
|
1069
|
+
parameters: {}
|
|
1070
|
+
description: Validates that WAF web ACLs have logging enabled so that web application
|
|
1071
|
+
firewall events are captured for security analysis.
|
|
1072
|
+
remediation_guidance: |
|
|
1073
|
+
Enable logging for WAF web ACLs:
|
|
1074
|
+
1. Choose a log destination:
|
|
1075
|
+
- Amazon Kinesis Data Firehose (recommended for analysis)
|
|
1076
|
+
- Amazon S3 bucket
|
|
1077
|
+
- CloudWatch Logs log group
|
|
1078
|
+
2. For Kinesis Data Firehose:
|
|
1079
|
+
- Create a Firehose delivery stream with prefix "aws-waf-logs-"
|
|
1080
|
+
- Configure destination (S3, Redshift, Elasticsearch, etc.)
|
|
1081
|
+
3. Go to WAF console and select your web ACL
|
|
1082
|
+
4. Enable logging:
|
|
1083
|
+
- Choose "Enable logging"
|
|
1084
|
+
- Select your log destination
|
|
1085
|
+
- Configure redacted fields if needed (to protect sensitive data)
|
|
1086
|
+
|
|
1087
|
+
AWS CLI example:
|
|
1088
|
+
aws wafv2 put-logging-configuration \
|
|
1089
|
+
--logging-configuration ResourceArn=arn:aws:wafv2:region:account-id:regional/webacl/name/id,LogDestinationConfigs=arn:aws:firehose:region:account-id:deliverystream/aws-waf-logs-stream
|
|
1090
|
+
|
|
1091
|
+
AWS Documentation: https://docs.aws.amazon.com/waf/latest/developerguide/logging.html
|