diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.1/SKILL.md new file mode 100644 index 0000000000..7785370769 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.1/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-aws-compute-10.1 +description: "Ensure Managed Platform updates is configured" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, elastic-beanstalk, managed-updates, patching, platform] +cis_id: "10.1" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-10.2, cis-aws-compute-10.3, cis-aws-compute-10.4] +prerequisites: [] +severity_boost: {} +--- + +# 10.1 Ensure Managed Platform updates is configured (Manual) + +## Description + +AWS Elastic Beanstalk regularly releases platform updates to provide fixes, software updates, and new features. With managed platform updates, you can configure your environment to automatically upgrade to the latest version of a platform during a scheduled maintenance window. + +## Rationale + +Your application remains in service during the update process with no reduction in capacity. Managed updates are available on both single-instance and load-balanced environments. They also ensure you aren't introducing any vulnerabilities by running legacy systems that require updates and patches. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com/elasticbeanstalk +2. On the left hand side click `Environments` +3. Click on the `Environment name` that you want to review +4. Under the `environment_name-env` in the left column click `Configuration` +5. Scroll down under Configurations +6. Under category look for `Managed updates` +7. Confirm `Managed updates: enabled` +8. If status options reads `Managed updates: disabled` refer to the remediation below. +9. Repeat steps 3-8 for each environment within the current region. +10. Then repeat the Audit process for all other regions. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Expected Result + +`Managed updates: enabled` is displayed under the Managed updates category in the environment Configuration. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com/elasticbeanstalk +2. On the left hand side click `Environments` +3. Click on the `Environment name` that you want to update +4. Under the `environment_name-env` in the left column click `Configuration` +5. Scroll down under Configurations +6. Under category look for `Managed updates` +7. Click on Edit +8. On the Managed Platform Updates page: + +``` +Managed updates - click the Enable checkbox +Weekly update window - set preferred maintenance window +Update level- set it to Minor and patch +Instance replacement - click the Enabled checkbox +``` + +9. Click Apply +10. Repeat steps 3-8 for each environment within the current region that needs Managed updates set. +11. Then repeat the remediation process for all other regions identified in the Audit. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Default Value + +Managed platform updates are not enabled by default. + +## References + +1. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-platform-update-managed.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------- | ---- | ---- | ---- | +| v8 | 7.4 Perform Automated Application Patch Management | X | X | X | +| v7 | 3.5 Deploy Automated Software Patch Management Tools | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.2/SKILL.md new file mode 100644 index 0000000000..e55ae38d9c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.2/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-compute-10.2 +description: "Ensure Persistent logs is setup and configured to S3" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, elastic-beanstalk, logging, cloudwatch, s3, monitoring] +cis_id: "10.2" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-10.1, cis-aws-compute-10.3, cis-aws-compute-10.4] +prerequisites: [] +severity_boost: {} +--- + +# 10.2 Ensure Persistent logs is setup and configured to S3 (Manual) + +## Description + +Elastic Beanstalk can be configured to automatically stream logs to the CloudWatch service. + +## Rationale + +With CloudWatch Logs, you can monitor and archive your Elastic Beanstalk application, system, and custom log files from Amazon EC2 instances of your environments. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com/elasticbeanstalk +2. On the left hand side click `Environments` +3. Click on the `Environment name` that you want to review +4. Under the `environment_name-env` in the left column click `Configuration` +5. Scroll down under Configurations +6. Under category look for `Softwares` +7. Confirm `Log streaming: enabled` +8. If status options reads `Log streaming: disabled` refer to the remediation below. +9. Repeat steps 3-8 for each environment within the current region. +10. Then repeat the Audit process for all other regions. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Expected Result + +`Log streaming: enabled` is displayed under the Softwares category in the environment Configuration. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com/elasticbeanstalk +2. On the left hand side click `Environments` +3. Click on the `Environment name` that you want to update +4. Under the `environment_name-env` in the left column click `Configuration` +5. Scroll down under Configurations +6. Under category look for `Software` +7. Click on Edit +8. On the Modify software page: + +``` +Instance log streaming to CloudWatch Logs +Log streaming - click the Enabled checkbox +Set the required retention based on Organization requirements +Lifecycle - Keep logs after terminating environment +``` + +9. Click Apply +10. Repeat steps 3-8 for each environment within the current region that needs Managed updates set. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Default Value + +Log streaming to CloudWatch is not enabled by default. + +## References + +1. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.cloudwatchlogs.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | X | X | X | +| v7 | 6.2 Activate audit logging | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.3/SKILL.md new file mode 100644 index 0000000000..1307136dd6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.3/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-compute-10.3 +description: "Ensure access logs are enabled" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, elastic-beanstalk, access-logs, load-balancer, logging] +cis_id: "10.3" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-10.1, cis-aws-compute-10.2, cis-aws-compute-10.4] +prerequisites: [] +severity_boost: {} +--- + +# 10.3 Ensure access logs are enabled (Manual) + +## Description + +When you enable load balancing, your AWS Elastic Beanstalk environment is equipped with an Elastic Load Balancing load balancer to distribute traffic among the instances in your environment. + +## Rationale + +For security reasons it is important to have a record of all the access logs and this is enabled within the Load Balancer assigned to the Elastic Beanstalk environments. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com/ec2 +2. On the left hand scroll down to Load Balancing and click on `Load Balancers` +3. Click on the Load balancer associated with the Elastic Beanstalk Environment + +``` +Typically they have AWSEB in the name. +If you utilized Elastic Beanstalk to create the Load balancer the Source +Security Group listed in the Description will reference `Elastic Beanstalk` +``` + +4. Under the `Description` tab scroll down to the `Attributes` section +5. Confirm `Access logs` is set to Enabled. +6. If status options reads `Disabled` refer to the remediation below. +7. Repeat steps 3-8 for each environment within the current region. +8. Then repeat the Audit process for all other regions. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Expected Result + +`Access logs` is set to Enabled under the Attributes section on the Load Balancer Description tab. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com/ec2 +2. On the left hand scroll down to Load Balancing and click on `Load Balancers` +3. Click on the Load balancer associated with the Elastic Beanstalk Environment + +``` +Typically they have AWSEB in the name. +If you utilized Elastic Beanstalk to create the Load balancer the Source +Security Group listed in the Description will reference `Elastic Beanstalk~` +``` + +4. Under the `Description` tab scroll down to the `Attributes` section +5. Under Access logs - Disabled click on Configure access logs. +6. Click the check box next to `Enable access logs`. +7. Enter the S3 bucket name you have setup for the Elastic Beanstalk access logs. + \*\*Note - if you don't have a S3 bucket already created enter an organization name in accordance with policy and have it identify with Elastic Beanstalk. Then click the check box next to `Create this location for me` +8. Click `Save` +9. Scroll down under the description tab and confirm that the Access logs are set as described above. +10. Repeat steps 3-11 for each Load balancer created and used with Elastic Beanstalk environment within the current region. +11. Then repeat the remediation process for all other regions identified in the Audit. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Default Value + +Access logs are disabled by default on Load Balancers. + +## References + +1. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.elb.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | X | X | X | +| v7 | 6.2 Activate audit logging | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.4/SKILL.md new file mode 100644 index 0000000000..047db4a160 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-10.4/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-compute-10.4 +description: "Ensure that HTTPS is enabled on load balancer" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, elastic-beanstalk, https, tls, load-balancer, encryption] +cis_id: "10.4" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-10.1, cis-aws-compute-10.2, cis-aws-compute-10.3] +prerequisites: [] +severity_boost: {} +--- + +# 10.4 Ensure that HTTPS is enabled on load balancer (Manual) + +## Description + +The simplest way to use HTTPS with an Elastic Beanstalk environment is to assign a server certificate to your environment's load balancer. + +## Rationale + +When you configure your load balancer to terminate HTTPS, the connection between the client and the load balancer is secure. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com/elasticbeanstalk +2. On the left hand side click `Environments` +3. Click on the `Environment name` that you want to review +4. Under the "environment_name-env" click `Configuration` +5. Scroll down under Configurations +6. Under category look for `Load balancer` +7. Click `Edit` +8. Under the `Listeners` section +9. Check the Listeners section for any enabled listeners and make sure the Protocol is set to HTTPS and Enabled. +10. If the Listener is required for HTTP and is not set to HTTPS refer to the remediation below. +11. Repeat steps 3-10 for each environment within the current region. +12. Then repeat the Audit process for all other regions. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Expected Result + +All enabled Listeners under the Load balancer configuration have their Protocol set to HTTPS and are Enabled. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com/elasticbeanstalk +2. On the left hand side click `Environments` +3. Click on the `Environment name` that you want to review +4. Under the "environment_name-env" click `Configuration` +5. Scroll down under Configurations +6. Under category look for `Load balancer` +7. Click `Edit` +8. Under the `Listeners` section +9. Click `Add listener` + +``` +Set listener port +Set Listener protocol to HTTPS +Set Instance Port +Sent Instance protocol to HTTPS +Select your SSL certificate +``` + +10. Click `Add` +11. Make sure it is listed as enabled. If you have other listeners not using HTTPS make sure to turn off enabled +12. Click `Apply` to save the configuration changes. +13. Repeat steps 3-12 for each environment within the current region. +14. Then repeat the remediation for all other regions. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Default Value + +HTTPS is not configured on Elastic Beanstalk load balancers by default. + +## References + +1. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-11.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-11.1/SKILL.md new file mode 100644 index 0000000000..28e0c63ae8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-11.1/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-aws-compute-11.1 +description: "Ensure customer-managed keys are used to encrypt AWS Fargate ephemeral storage data for Amazon ECS" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, fargate, ecs, kms, encryption, ephemeral-storage] +cis_id: "11.1" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 11.1 Ensure customer-managed keys are used to encrypt AWS Fargate ephemeral storage data for Amazon ECS (Automated) + +## Description + +Use customer-managed AWS KMS keys to encrypt AWS Fargate ephemeral storage data for on Amazon ECS, ensuring that sensitive data remains protected during task execution. + +## Rationale + +Customer-managed KMS keys offer enhanced control over encryption, including key rotation, access policies, and audit trails. + +## Impact + +There are costs and configuration overhead associated with setting up and managing customer-managed keys. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. Click the name of a cluster. +4. Ensure that `Fargate ephemeral storage` is not set to `-`. +5. Repeat steps 1-4 for each ECS cluster. + +### Using AWS CLI + +Run the following command to list clusters: + +```bash +aws ecs list-clusters +``` + +Run the following command to view the Fargate ephemeral storage KMS key ID configured for a cluster: + +```bash +aws ecs describe-clusters --clusters --include CONFIGURATIONS --query 'clusters[*].configuration.managedStorageConfiguration.fargateEphemeralStorageKmsKeyId' +``` + +Ensure the command returns a customer-managed KMS key ARN. +Repeat for each cluster. + +## Expected Result + +Each ECS cluster returns a valid customer-managed KMS key ARN for the Fargate ephemeral storage configuration, rather than `-` or empty. + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. Click the name of a cluster. +4. Click `Update cluster`. +5. Expand the `Encryption` section. +6. Under `Fargate ephemeral storage`, select a customer-managed KMS key. + Note: Ensure the KMS key has appropriate Fargate service permissions. +7. Click `Update`. +8. Repeat steps 1-7 for each ECS cluster requiring remediation. + +### Using AWS CLI + +N/A - Remediation is console-based for this control. + +## Default Value + +AWS Fargate ephemeral storage data is encrypted by default. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-storage-encryption.html +2. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-create-storage-key.html +3. https://awscli.amazonaws.com/v2/documentation/api/2.0.33/reference/ecs/list-clusters.html +4. https://awscli.amazonaws.com/v2/documentation/api/2.0.33/reference/ecs/describe-clusters.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.1/SKILL.md new file mode 100644 index 0000000000..4b53bcb7d3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.1/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-aws-compute-12.1 +description: "Ensure AWS Config is Enabled for Lambda and Serverless" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, config, compliance, monitoring] +cis_id: "12.1" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.2, cis-aws-compute-12.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure AWS Config is Enabled for Lambda and Serverless + +## Description + +With AWS Config, you can track configuration changes to the Lambda functions (including deleted functions), runtime environments, tags, handler name, code size, memory allocation, timeout settings, and concurrency settings, along with Lambda IAM execution role, subnet, and security group associations. + +## Rationale + +This gives you a holistic view of the Lambda function's lifecycle and enables you to surface that data for potential audit and compliance requirements. + +## Impact + +Enabling AWS Config for Lambda may incur additional AWS Config costs depending on the number of configuration items recorded and the number of active rules. + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Config` under Management & Governance. +3. This will open up the Config dashboard. +4. Click `Conformance packs` +5. Review the list of conformance packs. +6. If `serverless` is listed or included in the conformance pack you built you meet this recommendation. +7. If `serverless` is not listed refer to the remediation below. +8. If none, see remediation section below. +9. Repeat steps 3-7 for all regions used. + +### Using AWS CLI + +N/A - This control is Console-based audit only. + +## Expected Result + +AWS Config conformance packs include `serverless` and Lambda security conformance packs for all regions in use. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Config` under Management & Governance. +3. This will open up the Config dashboard. +4. Click `Conformance packs` +5. Click on `Deploy conformance pack` +6. Click on `Use sample template` +7. Click the down arrow under Sample template +8. Scroll down and click on Operational Best Practices for Serverless +9. Click Next +10. Give it a Conformance pack name `Serverless`. +11. Click Next +12. Click `Deploy conformance pack` +13. Click on `Deploy conformance pack` +14. Click on `Use sample template` +15. Click the down arrow under Sample template +16. Scroll down and click on Security Best Practices for Lambda +17. Click Next +18. Give it a Conformance pack name `LambaSecurity`. +19. Click Next +20. Click `Deploy conformance pack` +21. Repeat steps 2-20 for all regions used. + +### Using AWS CLI + +N/A - This control is Console-based remediation only. + +## Default Value + +AWS Config is not enabled by default for Lambda and Serverless. + +## References + +1. https://docs.aws.amazon.com/lambda/latest/dg/welcome.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | x | x | x | +| v7 | 6.2 Activate audit logging - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.10/SKILL.md new file mode 100644 index 0000000000..5e03fdceee --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.10/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-aws-compute-12.10 +description: "Ensure Lambda functions do not allow unknown cross account access via permission policies" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, cross-account, access-control, resource-policy] +cis_id: "12.10" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.4, cis-aws-compute-12.6, cis-aws-compute-12.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Lambda functions do not allow unknown cross account access via permission policies + +## Description + +Ensure that all your Amazon Lambda functions are configured to allow access only to trusted AWS accounts in order to protect against unauthorized cross-account access. + +## Rationale + +Allowing unknown (unauthorized) AWS accounts to invoke your Amazon Lambda functions can lead to data exposure and data loss. To prevent any unauthorized invocation requests for your Lambda functions, restrict access only to trusted AWS accounts. + +## Impact + +Restricting cross-account access may break existing integrations with partner or trusted accounts. Ensure all legitimate cross-account relationships are documented before restricting access. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/lambda/. +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review +4. Click the Configuration tab +5. In the left column, click `Permissions`. +6. In the `Resource-based policy statements` section, click `View policy document` +7. Review the Resource-based policy document box. Find the "Principal" element and check the element value (ARN). +8. Confirm that each AWS account ARN is an approved AWS account. If one or more of the ARNs is not an AWS account defined within your organization, refer to the remediation below. +9. Repeat steps no. 2-8 for each Lambda function available within the current AWS region. +10. Repeat this Audit for all the other AWS regions. + +### Using AWS CLI + +1. Run `aws lambda list-functions` + +```bash +aws lambda list-functions --output table --query "Functions[*].FunctionName" +``` + +2. This command will provide a table titled ListFunctions + +3. Run `aws lambda get-policy` on the functions listed + +```bash +aws lambda get-policy --function-name "name_of_function" --output text --query "Policy" +``` + +4. This will provide an output of the policy assigned to that function. +5. Identify the "Principal" element for each function for the ARN. +6. Confirm that each AWS account ARN is an approved AWS account. If one or more of the ARNs is not an AWS account defined within your organization, refer to the remediation below. +7. Repeat steps 2-5 for each Lambda function available. +8. Run the Audit in the other AWS cloud regions. + +## Expected Result + +All Lambda function resource-based policies contain only Principal ARNs belonging to trusted and approved AWS accounts within the organization. + +## Remediation + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/lambda/. +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review +4. Click the Configuration tab +5. In the left column, click `Permissions`. +6. In the `Resource-based policy statements` section, select the policy statement that allows the unknown AWS Account cross-account access +7. Click Edit +8. On the `Edit permissions` page, replace or remove the AWS Account(s) ARN of the unauthorized principal in the Principal box +9. Click Save +10. Repeat steps for each Lambda function that failed the Audit + +### Using AWS CLI + +N/A - This control is Console-based remediation only. + +## Default Value + +Lambda functions do not allow cross-account access by default. Cross-account access requires explicit configuration of resource-based policies. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/index.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control - Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | x | +| v7 | 1.7 Deploy Port Level Access Control - Utilize port level access control, following 802.1x standards, to control which devices can authenticate to the network. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.11/SKILL.md new file mode 100644 index 0000000000..267ac2e94c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.11/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-aws-compute-12.11 +description: "Ensure that the runtime environment versions used for your Lambda functions do not have end of support dates" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, runtime, eol, patching, deprecation] +cis_id: "12.11" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.8, cis-aws-compute-12.12] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that the runtime environment versions used for your Lambda functions do not have end of support dates + +## Description + +Always using a recent version of the execution environment configured for your Amazon Lambda functions adheres to best practices for the newest software features, the latest security patches and bug fixes, and performance and reliability. + +## Rationale + +When you execute your Lambda functions using recent versions of the implemented runtime environment, you should benefit from new features and enhancements, better security, along with performance and reliability. + +## Impact + +Upgrading runtime versions may introduce breaking changes. Functions should be thoroughly tested with the new runtime before deployment. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/lambda/. +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review +4. Click Code tab +5. In the Runtime settings section, check the Runtime attribute value to determine the runtime version. +6. Compare the function runtime with the updated list of Amazon Lambda runtimes. Link is in the resource section. +7. If the version you are using is not the latest or is on the EOL list, the selected Amazon Lambda function is using an old and deprecated runtime environment. +8. Refer to the remediation below. +9. Repeat steps 2-6 for each Lambda function within the current region. + +Then repeat the Audit process for all other regions. + +### Using AWS CLI + +1. Run `aws lambda list-functions` + +```bash +aws lambda list-functions --output table --query 'Functions[*].FunctionName' +``` + +This command will provide a table titled ListFunctions + +2. Run `aws lambda get-function-configuration` using the Function names returned in the table. + +```bash +aws lambda get-function-configuration --function-name "name_of_fuunction" --query 'Runtime' +``` + +3. The command output should return the execution environment. +4. Compare the function runtime with the updated list of Amazon Lambda runtimes. Link is in the resource section. +5. If the version you are using is not the latest or is on the EOL list, the selected Amazon Lambda function is using an old and deprecated runtime environment. +6. Refer to the remediation below. + +## Expected Result + +All Lambda functions use supported runtime versions that are not deprecated or on the end-of-life (EOL) list. + +## Remediation + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/lambda/. +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review +4. Click Code tab +5. Go to the Runtime settings section. +6. Click Edit +7. On the Edit runtime settings page, select the latest supported version of the runtime environment from the dropdown list. + \*\*Note - make sure the correct architecture is also selected. +8. Click Save +9. Select the Code tab +10. Click Test from the Code source section. +11. Once the testing is completed, the execution result of your Lambda function will be listed +12. Repeat steps for each Lambda function that failed the Audit within the current region. + +### Using AWS CLI + +1. Run `aws lambda update-function-configuration` using the name of the Function you need to remediate + +```bash +aws lambda update-function-configuration --output table --query 'Functions[*].FunctionName' +``` + +This command will provide a table titled ListFunctions + +2. Run `aws lambda get-function-configuration` using the Function names returned in the table. + +```bash +aws lambda get-function-configuration --function-name "name_of_fuunction" --function-name "name_of_function" --runtime "python3.9" +``` + +3. The command output should return the metadata available for the reconfigured function. +4. Repeat steps 1-2 to upgrade the runtime environment for each Amazon Lambda function found in the Audit. + +## Default Value + +Lambda functions use the runtime version specified at creation time. AWS does not automatically upgrade runtimes. + +## References + +1. https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 7.4 Perform Automated Application Patch Management - Perform application updates on enterprise assets through automated patch management on a monthly, or more frequent, basis. | x | x | x | +| v7 | 3.5 Deploy Automated Software Patch Management Tools - Deploy automated software update tools in order to ensure that third-party software on all systems is running the most recent security updates provided by the software vendor. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.12/SKILL.md new file mode 100644 index 0000000000..a204861dfa --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.12/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-aws-compute-12.12 +description: "Ensure encryption in transit is enabled for Lambda environment variables" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, encryption, transit, environment-variables, kms] +cis_id: "12.12" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.3, cis-aws-compute-12.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure encryption in transit is enabled for Lambda environment variables + +## Description + +As you can set your own environmental variables for Lambda it is important to also encrypt them for in transit protection. + +## Rationale + +Lambda environment variables should be encrypted in transit for client-side protection as they can store sensitive information. + +## Impact + +Enabling encryption in transit adds encryption overhead and may require updates to Lambda function code to decrypt environment variables at runtime. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/lambda/. +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review +4. Click the Configuration tab +5. In the left column, click `Environment variables`. +6. In the `Environment variables` section, click `Edit` +7. On the Edit environment variables page, review the Values. If they are a long value that resembles this: + AQICAHhxbKJYcFAU16CbU4IVpzi5CwK + Encryption is in place for that Key. If the value is in plain text refer to the remediation below. +8. Repeat steps 2 - 7 for each Lambda function available in the current AWS region. +9. Repeat this Audit for all the other AWS regions. + +### Using AWS CLI + +1. Run `aws lambda list-functions` + +```bash +aws lambda list-functions --output table --query "Functions[*].FunctionName" +``` + +This command will provide a table titled ListFunctions + +2. Run `aws lambda get-function` + +```bash +aws lambda get-function --function-name "name_of_function" --query "Configuration.Environment" +``` + +This will provide an output of the environment variables created for that function. + +3. Review the Values in the table. If they contain a long value that resembles this: + AQICAHhxbKJYcFAU16CbU4IVpzi5CwK. Encryption is in place for that Key. If the value is in plain text refer to the remediation below. +4. Repeat steps 1 - 3 for each Lambda function listed in the current region. +5. Repeat this Audit for all the other AWS regions. + +## Expected Result + +All Lambda function environment variable values are encrypted in transit (values appear as encrypted ciphertext rather than plain text). + +## Remediation + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/lambda/. +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review +4. Click the Configuration tab +5. In the left column, click `Environment variables`. +6. In the `Environment variables` section, click `Edit` +7. Click the check box for `Enable helpers for encryption in transit` +8. Click the `Encrypt` option for all the variable that need to be encrypted. +9. Repeat steps 2 - 8 for each Lambda function identified in the Audit within the current AWS region. +10. Repeat this remediation for all the other AWS regions. + +### Using AWS CLI + +N/A - This control is Console-based remediation only. + +## Default Value + +Lambda environment variables are encrypted at rest by default using AWS managed keys, but encryption in transit (client-side encryption) is not enabled by default. + +## References + +1. https://docs.aws.amazon.com/lambda/latest/dg/welcome.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit - Encrypt sensitive data in transit. Example implementations can include: Transport Layer Security (TLS) and Open Secure Shell (OpenSSH). | | x | x | +| v8 | 3.11 Encrypt Sensitive Data at Rest - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data. | | x | x | +| v7 | 10.4 Ensure Protection of Backups - Ensure that backups are properly protected via physical security or encryption when they are stored, as well as when they are moved across the network. This includes remote backups and cloud services. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.2/SKILL.md new file mode 100644 index 0000000000..8e03ba164d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.2/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-aws-compute-12.2 +description: "Ensure Cloudwatch Lambda insights is enabled" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, cloudwatch, monitoring, insights] +cis_id: "12.2" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.1, cis-aws-compute-12.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Cloudwatch Lambda insights is enabled + +## Description + +Ensure that Amazon CloudWatch Lambda Insights is enabled for your Amazon Lambda functions for enhanced monitoring. + +## Rationale + +Amazon CloudWatch Lambda Insights allows you to monitor, troubleshoot, and optimize your Lambda functions. The service collects system-level metrics and summarizes diagnostic information to help you identify issues with your Lambda functions and resolve them as soon as possible. CloudWatch Lambda Insights collects system-level metrics and emits a single performance log event for every invocation of that Lambda function. + +## Impact + +Enabling CloudWatch Lambda Insights may incur additional CloudWatch costs. When you enable the feature using the AWS Management Console, Amazon Lambda adds the required permissions to your function's execution role. + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com/lambda/ +2. Click `Functions`. +3. Click on the name of the function. +4. Click on the `Configuration tab`. +5. Click on 'Monitoring and operations tools'. +6. In the Monitoring and operations tools section check the `Enhanced monitoring`. +7. If set to Not enabled, refer to the remediation below. +8. Repeat steps 2-7 for each Lambda function within the current region. +9. Then repeat the Audit process for all other regions. + +### Using AWS CLI + +1. Run `aws lambda list-functions` + +```bash +aws lambda list-functions --output table --query "Functions[*].FunctionName" +``` + +This command will provide a table titled ListFunction + +2. Run `aws lambda get-function` + +```bash +aws lambda get-function --function-name "name_of_function" --query "'Configuration.Layers[*].Arn" +``` + +This command should provide the requested ARN. + +3. If the list of ARNs does not contain the CloudWatch Lambda Insights extension ARN, i.e. `arn:aws:lambda::12345678910:layer:LambdaInsightsExtension:`, the Enhanced Monitoring feature is not enabled. Refer to the remediation below. + +## Expected Result + +Each Lambda function should have the CloudWatch Lambda Insights extension ARN listed in its layers, indicating Enhanced Monitoring is enabled. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com/lambda/ +2. Click `Functions`. +3. Click on the name of the function. +4. Click on the `Configuration tab` +5. Click on 'Monitoring and operations tools'. +6. In the Monitoring and operations tools section click `Edit` to update the monitoring configuration +7. In the CloudWatch Lambda Insights section click the `Enhanced monitoring` button to enable. + \*\*\*Note - When you enable the feature using the AWS Management Console, Amazon Lambda adds the required permissions to your function's execution role. +8. Click Save +9. Repeat steps 2-8 for each Lambda function within the current region that fails the Audit. +10. Then repeat the Audit process for all other regions. + +### Using AWS CLI + +N/A - This control is Console-based remediation only. + +## Default Value + +CloudWatch Lambda Insights is not enabled by default. + +## References + +1. https://docs.aws.amazon.com/lambda/latest/dg/welcome.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | x | x | x | +| v7 | 6.2 Activate audit logging - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.3/SKILL.md new file mode 100644 index 0000000000..0e02a27e8c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.3/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-aws-compute-12.3 +description: "Ensure AWS Secrets manager is configured and being used by Lambda for databases" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, secrets-manager, credentials, database] +cis_id: "12.3" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.4, cis-aws-compute-12.12] +prerequisites: [] +severity_boost: {} +--- + +# Ensure AWS Secrets manager is configured and being used by Lambda for databases + +## Description + +Lambda functions often have to access a database or other services within your environment. + +## Rationale + +Credentials used to access databases and other AWS Services need to be managed and regularly rotated to keep access into critical systems secure. Keeping any credentials and manually updating the passwords would be cumbersome, but AWS Secrets Manager allows you to manage and rotate passwords. + +## Impact + +Lambda code should be checked for correct configuration to get the credentials from AWS Secrets Manager. This audit and remediation is only to confirm you have the credentials in Secrets manager. + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Secrets Manager` under Security, Identity and Compliance. +3. Click on `Secrets`. +4. Review the secrets listed +5. Confirm that the secret required for Lambda functions is included in the list. +6. If it is, review your code and confirm that you are calling the credentials during runtime. +7. If the credentials are not listed refer to the remediation below. +8. Repeat steps 2-7 for all regions used. + +### Using AWS CLI + +N/A - This control is Console-based audit only. + +## Expected Result + +All database credentials used by Lambda functions are stored in AWS Secrets Manager and Lambda code retrieves credentials from Secrets Manager at runtime. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Secrets Manager` under Security, Identity and Compliance. +3. Click on `Secrets`. +4. Click on `Store a new secret` +5. Select the `Secret type` +6. Enter the information + +For the 3 db types listed enter the credentials and select the database. +For `other database` enter the credentials, select the db type and enter the connection parameters. + +For `Other type of secret` (Lambda) create the keys and values used. - example Username yepyep Password yepyep +Choose an encryption key or create a new one. If you add a new key it will take you to the KMS console. Once you create the new key you can then select it here. + +7. Click `Next` +8. Give the secret a name associated with your organization style and lambda +9. Click `Next` +10. Configure the auto rotation + +``` +Rotation schedule leave as default +Select the lambda function you use to rotate the key +``` + +11. Click `Next` +12. Review all the settings +13. Click `Store` + +### Using AWS CLI + +N/A - This control is Console-based remediation only. + +## Default Value + +AWS Secrets Manager is not configured by default for Lambda functions. + +## References + +1. https://aws.amazon.com/blogs/security/how-to-securely-provide-database-credentials-to-lambda-functions-by-using-aws-secrets-manager/ +2. https://docs.aws.amazon.com/lambda/latest/dg/welcome.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.5 Allowlist Authorized Software - Use technical controls, such as application allowlisting, to ensure that only authorized software can execute or be accessed. Reassess bi-annually, or more frequently. | | x | x | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 1.7 Deploy Port Level Access Control - Utilize port level access control, following 802.1x standards, to control which devices can authenticate to the network. | | x | x | +| v7 | 4.2 Change Default Passwords - Before deploying any new asset, change all default passwords to have values consistent with administrative level accounts. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.4/SKILL.md new file mode 100644 index 0000000000..d4ed644955 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.4/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-aws-compute-12.4 +description: "Ensure least privilege is used with Lambda function access" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, iam, least-privilege, access-control] +cis_id: "12.4" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.5, cis-aws-compute-12.6, cis-aws-compute-12.9, cis-aws-compute-12.10] +prerequisites: [] +severity_boost: {} +--- + +# Ensure least privilege is used with Lambda function access + +## Description + +Lambda is fully integrated with IAM, allowing you to control precisely what each Lambda function can do within the AWS Cloud. As you develop a Lambda function, you expand the scope of this policy to enable access to other resources. For example, for a function that processes objects put into an S3 bucket, it requires read access to objects stored in that bucket. Do not grant the function broader permissions to write or delete data, or operate in other buckets. + +## Rationale + +You can use AWS Identity and Access Management (IAM) to manage access to the Lambda API and resources like functions and layers. For users and applications in your account that use Lambda, you manage permissions in a permissions policy that you can apply to IAM users, groups, or roles. To grant permissions to other accounts or AWS services that use your Lambda resources, you use a policy that applies to the resource itself. + +## Impact + +Determining the exact permissions required is a manual process and can be challenging, since IAM permissions are very granular and they control access to both the data plane and control plane. + +## Audit Procedure + +### Using AWS Console + +Determining the exact permissions required is a manual process and can be challenging, since IAM permissions are very granular and they control access to both the data plane and control plane. +Please refer to the references section below for useful documentation on developing the correct IAM policies for Lambda. + +### Using AWS CLI + +N/A - This control requires manual review of IAM policies. + +## Expected Result + +Lambda functions have granular IAM permissions following the principle of least privilege, with access limited to only necessary resources and operations. + +## Remediation + +### Using AWS Console + +As building out the IAM permissions for Lambda here are some things to consider: + +- Set granular IAM permissions for Lambda functions. +- Limit user access via IAM permissions to only necessary resources and operations. +- Remove unused or outdated IAM Users, Roles and Permissions. +- Periodically review and adjust IAM permissions. +- Do not allow all-access permissions for Lambda functions as a short cut. + +### Using AWS CLI + +N/A - This control requires manual IAM policy review and adjustment. + +## Default Value + +Lambda functions are created with a basic execution role by default, but the exact permissions depend on the role configuration. + +## References + +1. https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html +2. https://awspolicygen.s3.amazonaws.com/policygen.html +3. https://policysim.aws.amazon.com/home/index.jsp?# +4. https://github.com/aws-samples/aws-iamctl/ +5. https://docs.aws.amazon.com/lambda/latest/operatorguide/least-privilege-iam.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v8 | 6.7 Centralize Access Control - Centralize access control for all enterprise assets through a directory service or SSO provider, where supported. | | x | x | +| v7 | 1.7 Deploy Port Level Access Control - Utilize port level access control, following 802.1x standards, to control which devices can authenticate to the network. | | x | x | +| v7 | 7.8 Implement DMARC and Enable Receiver-Side Verification - To lower the chance of spoofed or modified emails from valid domains, implement Domain-based Message Authentication, Reporting and Conformance (DMARC) policy and verification. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.5/SKILL.md new file mode 100644 index 0000000000..ba2836e67c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.5/SKILL.md @@ -0,0 +1,102 @@ +--- +name: cis-aws-compute-12.5 +description: "Ensure every Lambda function has its own IAM Role" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, iam, execution-role, least-privilege] +cis_id: "12.5" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.4, cis-aws-compute-12.7, cis-aws-compute-12.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure every Lambda function has its own IAM Role + +## Description + +Every Lambda function should have a one to one IAM execution role and the roles should not be shared between functions. + +## Rationale + +The Principle of Least Privilege means that any Lambda function should have the minimal amount of access required to perform its tasks. In order to accomplish this Lambda functions should not share IAM Execution roles. + +## Impact + +Creating unique IAM roles for each Lambda function increases the number of IAM roles to manage but provides better security isolation between functions. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS console using https://console.aws.amazon.com/lambda/ +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review. +4. Click the `Configuration` tab +5. Under General configuration on the left column, click `Permissions`. +6. Under the `Execution role` section, `Role name` not the name listed as this is the IAM is the role that defines the access permissions for the selected function. +7. Repeat steps 2 - 6 for all the Lambda functions listed within the AWS region. +8. If any Lambda functions share the same Execution role, refer to the remediation below. +9. Repeat this Audit for all the AWS Regions. + +### Using AWS CLI + +N/A - This control is Console-based audit only. + +## Expected Result + +Each Lambda function has a unique IAM execution role that is not shared with any other Lambda function. + +## Remediation + +### Using AWS Console + +1. Login to the AWS console using https://console.aws.amazon.com/lambda/ +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to change/update. +4. Click the `Configuration` tab +5. Under General configuration on the left column, click `Permissions`. +6. Under the `Execution role` section, click `Edit`. +7. Scroll down to `Execution role` + +**To use an existing IAM role:** + +- Click `Use an existing role` +- Select the role from the `Existing role` dropdown. +- The IAM role can't be associated with another Lambda function and must follow the Principle of Least Privilege. + +**To use a new IAM role:** + +- Click `Create a new role from AWS policy templates` +- Provide a unique name based on company policy in the `Role name` +- Select the policy templates from the `Policy templates` dropdown. + +8. Click `Save` +9. Repeat steps 2 - 8 for all the Lambda functions listed within the AWS region that do not have a unique IAM Execution Role. +10. Repeat this remediation process for all the AWS Regions. + +### Using AWS CLI + +N/A - This control is Console-based remediation only. + +## Default Value + +When creating a Lambda function, AWS creates a default execution role, but multiple functions can be configured to share the same role. + +## References + +1. https://docs.aws.amazon.com/lambda/latest/dg/welcome.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 8.3 Enable Operating System Anti-Exploitation Features/Deploy Anti-Exploit Technologies - Enable anti-exploitation features such as Data Execution Prevention (DEP) or Address Space Layout Randomization (ASLR) that are available in an operating system or deploy appropriate toolkits that can be configured to apply protection to a broader set of applications and executables. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.6/SKILL.md new file mode 100644 index 0000000000..4ec8327e16 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.6/SKILL.md @@ -0,0 +1,134 @@ +--- +name: cis-aws-compute-12.6 +description: "Ensure Lambda functions are not exposed to everyone" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, public-access, permissions, resource-policy] +cis_id: "12.6" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.4, cis-aws-compute-12.9, cis-aws-compute-12.10] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Lambda functions are not exposed to everyone + +## Description + +A publicly accessible Amazon Lambda function is open to the public and can be reviewed by anyone. To protect against unauthorized users that are sending requests to invoke these functions they need to be changed so they are not exposed to the public. + +## Rationale + +Allowing anyone to invoke and run your Amazon Lambda functions can lead to data exposure, data loss, and unexpected charges on your AWS bill. + +## Impact + +Restricting public access may break existing integrations that rely on anonymous invocation of Lambda functions. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/lambda/. +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review +4. Click the Configuration tab +5. In the left column, click `Permissions`. +6. In the `Resource-based policy` section, click `View policy document` +7. Review the Resource-based policy document box. Find the "Principal" element defined for each policy statement and check the element value. If the element has one of the following values: "" or { "AWS": "" }, it means it is set to "Allow", and if it does not contain a "Condition" clause to filter the access, the selected Amazon Lambda function is set to anonymous access. +8. If any of the Lambda functions have anonymous access set refer to the remediation below. +9. Repeat steps 2 - 7 for each Lambda function available within the current AWS region. +10. Repeat this Audit for all the other AWS regions. + +### Using AWS CLI + +1. Run `aws lambda list-functions` + +```bash +aws lambda list-functions --output table --query "Functions[*].FunctionName" +``` + +This command will provide a table titled ListFunctions + +2. Run `aws lambda get-policy` + +```bash +aws lambda get-policy --function-name "name_of_function" --output text --query "Policy" +``` + +This will provide an output of the policy assigned to that function. + +3. Find the "Principal" element defined for that function. If the element has one of the following values: "" or { "AWS": "" }, it means it is set to "Allow", and if it does not contain a "Condition" clause to filter the access, the selected Amazon Lambda function is set to anonymous access. +4. Make note of the Function name from step 1 and the Statement name from step 2 and refer to the remediation steps below. +5. Repeat steps 1 - 3 for each Lambda function listed within the current region. +6. Repeat this Audit for all the other AWS regions. + +## Expected Result + +No Lambda function has a resource-based policy that allows anonymous or public access (Principal set to "_" or {"AWS": "_"} without a Condition clause). + +## Remediation + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/lambda/. +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review +4. Click the Configuration tab +5. In the left column, click `Permissions`. +6. In the `Resource-based policy` section, perform the following actions: + - Under Policy statements + - Select the policy statement that allows anonymous access + - Click Delete to remove the non-compliant statement from the resource-based policy attached + - Within the Delete statement confirmation box, click Remove + - Click Add permissions to add a new policy statement that grants permissions to a trusted entity only. + - On the Add permissions page configure the new policy statement to grant access to another AWS account, IAM user, IAM role, or to another AWS service. + - Click Save +7. Repeat steps no. 2 - 6 for each Lambda function that fails the Audit above, within the current region. +8. Repeat this Audit for all the other AWS regions. + +### Using AWS CLI + +1. Run `aws lambda remove-permission` + +```bash +aws lambda remove-permission --function-name "name_of_function" --statement-id "SID_of_Statement" +``` + +This command will remove the access policy that is failing the audit for that function. + +2. Run `aws lambda add-permission` + +```bash +aws lambda add-permission --function-name "name_of_function" --statement-id "correctaccess" --principal "012345678910" --action lambda:InvokeFunction +``` + +This adds a new policy to the function. + +\*\*\*Note The --principal parameter can be the ID of the trusted AWS account, another AWS account, IAM user, IAM role, or another AWS service. + +3. The command output should display the new policy created. +4. Repeat steps 1-2 for each Lambda function from the audit for all regions. + +## Default Value + +Lambda functions are not publicly accessible by default. Public access requires explicit configuration of resource-based policies. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/index.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.2 Address Unauthorized Assets - Ensure that a process exists to address unauthorized assets on a weekly basis. The enterprise may choose to remove the asset from the network, deny the asset from connecting remotely to the network, or quarantine the asset. | x | x | x | +| v7 | 1.6 Address Unauthorized Assets - Ensure that unauthorized assets are either removed from the network, quarantined or the inventory is updated in a timely manner. | x | x | x | +| v7 | 2.6 Address unapproved software - Ensure that unauthorized software is either removed or the inventory is updated in a timely manner. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.7/SKILL.md new file mode 100644 index 0000000000..4bb109291f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.7/SKILL.md @@ -0,0 +1,140 @@ +--- +name: cis-aws-compute-12.7 +description: "Ensure Lambda functions are referencing active execution roles" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, iam, execution-role, active-role] +cis_id: "12.7" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.4, cis-aws-compute-12.5, cis-aws-compute-12.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Lambda functions are referencing active execution roles + +## Description + +In order to have the necessary permissions to access the AWS cloud services and resources Amazon Lambda functions should be associated with active(available) execution roles. + +## Rationale + +A Lambda function's execution role is an Identity and Access Management (IAM) role that grants the function permission to process and access specific AWS services and resources. When Amazon Lambda functions are not referencing active execution roles, the functions are losing the ability to perform critical operations securely. + +## Impact + +Functions referencing inactive or deleted execution roles will fail to execute properly, potentially causing service disruptions. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/lambda/. +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review +4. Click the Configuration tab +5. In the left column, click `Permissions`. +6. In the `Resource summary` section, if it reads "The role with name cannot be found. (Service: LambdaConsole; Status Code: 404; Error Code: NoSuchEntity; Request ID: e3f12a73-2988-4dd5-b2d1-237c800a27f4; Proxy: null) refer to the remediation below. +7. Repeat steps 2 - 6 for each Lambda function available within the current AWS region. +8. Repeat this Audit for all the other AWS regions. + +### Using AWS CLI + +1. Run `aws lambda list-functions` + +```bash +aws lambda list-functions --output table --query "Functions[*].FunctionName" +``` + +This command will provide a table titled ListFunctions + +2. Run `aws lambda get-function` + +```bash +aws lambda get-function --function-name "name_of_function" --query "Configuration.Role" +``` + +This will provide an output returning the role ARN assigned to that function. + +3. Run `aws iam get-role` + +```bash +aws iam get-role --role-name "name_of_role" +``` + +This will return the requested configuration information. + +4. The command output should return the requested configuration information. +5. If the command output returns a `An error occurred (NoSuchEntity) when calling the GetRole operation` error message instead of the role's configuration, the execution role associated with the selected Lambda function is no longer available. Refer to the remediation below. +6. Repeat steps 1-5 for each Lambda function available in the selected AWS region. + +Perform the Audit process for other regions. + +## Expected Result + +All Lambda functions reference active, existing IAM execution roles. The `aws iam get-role` command returns valid role configuration for each referenced role. + +## Remediation + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/lambda/. +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to update. +4. Click the Configuration tab +5. In the left column, click `Permissions`. +6. In the `Execution role` section, click Edit +7. In the `Edit basic settings` page, perform one of the following actions: + +**To use an existing role:** + +- Click Use an existing role if you already a execution role for the selected Lambda function. +- Select the IAM role from the `Existing role` dropdown list. +- Click Save. + +**Or to create a custom role:** + +- Click To create a custom role, go to the `IAM console`. +- Click AWS Service +- Click `Lambda`. +- Click `Next: Permissions` +- Attach the permission policies needed +- Click Next: Tags +- Add tags (optional) based on your Organizational policy +- Click Next: Review +- Enter a Role name and a Role description so you can attach the policy to the Lambda function +- Click `Create role` +- Refresh the Edit basic settings page +- Select the new IAM role you just created from the `Existing role` dropdown list. +- Click Save. + +8. Repeat steps 2 - 7 to update the execution role for each misconfigured Amazon Lambda function within the current AWS region. +9. Repeat this Audit for all the other AWS regions. + +### Using AWS CLI + +N/A - This control is Console-based remediation only. + +## Default Value + +Lambda functions are created with valid execution roles, but roles may be deleted independently of the function. + +## References + +1. https://docs.aws.amazon.com/lambda/latest/dg/welcome.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 1.7 Deploy Port Level Access Control - Utilize port level access control, following 802.1x standards, to control which devices can authenticate to the network. | | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. | x | x | x | +| v7 | 14.7 Enforce Access Control to Data through Automated Tools - Use an automated tool, such as host-based Data Loss Prevention, to enforce access controls to data even when data is copied off a system. | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.8/SKILL.md new file mode 100644 index 0000000000..62f4062d8f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.8/SKILL.md @@ -0,0 +1,142 @@ +--- +name: cis-aws-compute-12.8 +description: "Ensure that Code Signing is enabled for Lambda functions" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, code-signing, integrity, supply-chain] +cis_id: "12.8" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.9, cis-aws-compute-12.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Code Signing is enabled for Lambda functions + +## Description + +Ensure that all your Amazon Lambda functions are configured to use the Code Signing feature in order to restrict the deployment of unverified code. + +## Rationale + +Code Signing, ensures that the function code is signed by an approved (trusted) source, and that it has not been altered since signing, and that the code signature has not expired or been revoked. + +## Impact + +Enabling code signing adds an additional step to the deployment process. All code packages must be signed before deployment, which may slow down CI/CD pipelines. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS console using https://console.aws.amazon.com/lambda/ +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review. +4. Click the `Configuration` tab +5. Under General configuration on the left column, click `Code signing`. +6. Under the `Code signing configuration` section check for any code signing configurations created for the function. +7. If there are no code signing configurations available or listed is not enabled, refer to the remediation. +8. Repeat steps 2-7 for each Lambda function within the current region. +9. Then repeat the Audit process for all other regions. + +### Using AWS CLI + +1. Run `aws lambda list-functions` + +```bash +aws lambda list-functions --output table --query "Functions[*].FunctionName" +``` + +This command will provide a table titled ListFunctions + +2. Run `aws lambda get-function-code-signing-config` + +```bash +aws lambda get-function-code-signing-config --function-name "name_of_function" --query "CodeSigningConfigArn" +``` + +3. The command output should return an array with the requested ARN(s). +4. If the get-function-code-signing-config command output returns null, there are no code signing configurations for the Lambda function. +5. Refer to the remediation below. +6. Repeat step 2-5 for each Lambda function available in the selected AWS region. +7. Perform the Audit process for all other regions used. + +## Expected Result + +Each Lambda function has a code signing configuration with a valid CodeSigningConfigArn associated. + +## Remediation + +### Using AWS Console + +1. Login to the AWS console using https://console.aws.amazon.com/signer +2. Click on `Create Signing Profile` if none are set up. If you already have some created in the left panel click on `Signing Profiles`, `Create Signing Profile`. + \*\*\*Note a Signing Profile is a trusted publisher and is analogous to the use of a digital signing certificate to generate signatures for your application code. +3. On the `Create Signing Profile` setup page provide: + - Profile name + - Specify the Signature Validity period (6 months up to 12 months is recommended) +4. Click on `Create Profile` +5. Go to the Amazon Lambda console https://console.aws.amazon.com/lambda/. +6. In the left panel, under Additional resources, click on `Code signing configurations`. +7. Click on `Create configuration` +8. On the `Create code signing configuration` setup page: + - Description box - provide a short description to identify this configuration + - Click inside the `Signing profile version ARN` box and select the Signing Profile created above. + - For `Signature validation policy`, click the signature validation policy suitable for your Lambda function. + \*\*Note - A signature check can fail if the code is not signed by an allowed Signing Profile, or if the signature has expired or has been revoked. + - Click Enforce - blocking the deployment of the code and also issue a warning. + - Click `Create configuration` +9. Go to the Amazon Lambda console https://console.aws.amazon.com/lambda/. +10. Click Functions. +11. Under Function name click on the name of the function that you want to review +12. Click the Configuration tab +13. In the left menu click Code signing. +14. Click Edit +15. On the `Edit code signing`, select the code signing configuration created above from the drop down +16. Click `Save` + +The Lambda function is now configured to use code signing. + +17. Next Upload a signed .zip file or provide an S3 URL of a signed .zip made by a signing job in AWS Signer. +18. To start a signing job, go to AWS Signer console at https://console.aws.amazon.com/signer. +19. In the left panel, click on Signing Jobs. +20. Start a Signing Job to generate a signature for your code package and place the signed code package in the specified destination path. +21. Start Signing Job setup page: + - Select the Signing Profile created in dropdown list. + - Code asset source location, specify the Amazon S3 location of the code package (.zip file) to be signed. Only S3 buckets available in the current region are displayed and can be used. + - Signature destination path with prefix where the signed code package should be uploaded. + - Start Job to deploy your new Signing Job + - Job status reads Succeeded, you can find the signed .zip package in your assigned S3 bucket. +22. Publish the signed code package to the selected Lambda function. +23. Amazon Lambda will perform signature checks to verify that the code has not been altered since signing. + \*\*Note - The service verifies if the code is signed by one of the allowed signing profiles available. +24. Repeat steps for each Lambda function that was captured in the Audit. + +### Using AWS CLI + +N/A - This control is Console-based remediation only. + +## Default Value + +Code Signing is not enabled by default for Lambda functions. + +## References + +1. https://docs.aws.amazon.com/lambda/latest/dg/welcome.html +2. https://console.aws.amazon.com/signer + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.7 Allowlist Authorized Scripts - Use technical controls, such as digital signatures and version control, to ensure that only authorized scripts, such as specific .ps1, .py, etc., files, are allowed to execute. Block unauthorized scripts from executing. Reassess bi-annually, or more frequently. | | | x | +| v8 | 10.2 Configure Automatic Anti-Malware Signature Updates - Configure automatic updates for anti-malware signature files on all enterprise assets. | x | x | x | +| v7 | 5.3 Securely Store Master Images - Store the master images and templates on securely configured servers, validated with integrity monitoring tools, to ensure that only authorized changes to the images are possible. | | x | x | +| v7 | 8.2 Ensure Anti-Malware Software and Signatures are Updated - Ensure that the organization's anti-malware software updates its scanning engine and signature database on a regular basis. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.9/SKILL.md new file mode 100644 index 0000000000..040119f5ca --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.9/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-aws-compute-12.9 +description: "Ensure there are no Lambda functions with admin privileges within your AWS account" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lambda, serverless, iam, admin-privileges, least-privilege, over-permission] +cis_id: "12.9" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-12.4, cis-aws-compute-12.5, cis-aws-compute-12.10] +prerequisites: [] +severity_boost: {} +--- + +# Ensure there are no Lambda functions with admin privileges within your AWS account + +## Description + +Ensure that your Amazon Lambda functions don't have administrative permissions potentially giving the function access to all AWS cloud services and resources. + +## Rationale + +In order to promote the Principle of Least Privilege (POLP) and provide your functions the minimal amount of access required to perform their tasks the right IAM execution role associated with the function should be used. Instead of providing administrative permissions you should grant the role the necessary permissions that the function really needs. + +## Impact + +Removing admin privileges from Lambda execution roles may break functions that rely on broad permissions. Functions should be tested after permission changes. + +## Audit Procedure + +### Using AWS Console + +1. Login in to the AWS Console using https://console.aws.amazon.com/lambda/ +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function that you want to review +4. Click the Configuration tab +5. Click on `Permissions` in the left column. +6. In the Execution role section, click the `Role name` to access the IAM role details. + \*\*Note this will bring you to the IAM Console. +7. Select the Permissions tab to view the identity-based policies attached +8. In the Permissions policies section click on the Policy name. +9. Select the Permissions tab. + \*\*Note The policy summary should show below in JSON format. +10. Within the {} JSON policy, identify the "Action" element defined for each statement and check the value. +11. If any of the "Action" element values are set to "\*" and the "Effect" element is set to "Allow", the role policy provides access to all the supported AWS cloud services and resources. +12. Repeat this step for each IAM policy attached to the selected execution role. + +If one or more policies allow access to all AWS services and resources, the execution role provides administrative permissions. Refer to the remediation below. +Repeat steps for each Lambda function within the current region. +Then repeat the Audit process for all other regions. + +### Using AWS CLI + +N/A - This control requires manual review of IAM policies through the Console. + +## Expected Result + +No Lambda function execution role has policies with "Action": "\*" and "Effect": "Allow", ensuring no function has administrative privileges. + +## Remediation + +### Using AWS Console + +1. Login in to the AWS Console using https://console.aws.amazon.com/lambda/ +2. In the left column, under `AWS Lambda`, click `Functions`. +3. Under `Function name` click on the name of the function you want to remediate +4. Click the Configuration tab +5. Click on `Permissions` in the left column. +6. In the Execution role section, click the `Edit` +7. Edit basic settings configuration page: + +**Associate the function with an existing, compliant IAM role:** + +- click Use an existing role from the Execution role +- select the required role from the Existing role dropdown +- click Save + +**OR apply a new execution role to your Lambda function:** + +- click Create a new role from AWS policy templates +- Provide a name for the new role based on org policy +- select only the necessary permission set(s) from the Policy templates - optional dropdown list. +- click Save + +8. Repeat steps for each Lambda function within the current region that failed the Audit. + +### Using AWS CLI + +N/A - This control is Console-based remediation only. + +## Default Value + +Lambda functions are not created with administrative privileges by default, but users may attach overly permissive policies to execution roles. + +## References + +1. https://docs.aws.amazon.com/lambda/latest/dg/welcome.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control - Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | x | +| v7 | 1.7 Deploy Port Level Access Control - Utilize port level access control, following 802.1x standards, to control which devices can authenticate to the network. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-16.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-16.1/SKILL.md new file mode 100644 index 0000000000..3b146b0a9c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-16.1/SKILL.md @@ -0,0 +1,72 @@ +--- +name: cis-aws-compute-16.1 +description: "Ensure communications between your applications and clients is encrypted" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, simspace-weaver, encryption, tls, communication] +cis_id: "16.1" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 16.1 Ensure communications between your applications and clients is encrypted (Manual) + +## Description + +SimSpace Weaver doesn't manage communications between your apps and the clients. + +## Rationale + +Be sure to implement some form of authentication and encryption for all client sessions while using SimSpace Weaver. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +There is no setting for encryption setup for your clients and applications within SimSpace Weaver service. For this audit you have to confirm that the communication is configured in the app and the client with encryption to protect that traffic. + +### Using AWS CLI + +N/A - This control is manual. There are no AWS CLI commands specific to SimSpace Weaver encryption settings as the encryption must be configured at the application/client level. + +## Expected Result + +Communications between applications and clients running inside SimSpace Weaver are configured with encryption (e.g., TLS) to protect traffic. + +## Remediation + +### Using AWS Console + +Confirm that the communication you have configured between your application and clients that run inside of SimSpace Weaver are encrypted. + +### Using AWS CLI + +N/A - Remediation is application-level and not managed through AWS CLI. + +## Default Value + +SimSpace Weaver does not manage or enforce encryption between applications and clients by default. This is the responsibility of the application developer. + +## References + +1. https://docs.aws.amazon.com/simspaceweaver/latest/userguide/security_best-practices.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.1/SKILL.md new file mode 100644 index 0000000000..69de89ebfb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.1/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-compute-2.1.1 +description: "Ensure Consistent Naming Convention is used for Organizational AMI" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, ami, naming-convention, inventory] +cis_id: "2.1.1" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.1.2, cis-aws-compute-2.1.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Consistent Naming Convention is used for Organizational AMI + +## Description + +The naming convention for AMI (Amazon Machine Images) should be documented and followed for any AMI's created. + +## Rationale + +The majority of AWS resources can be named and tagged. Most organizations have already created standardize naming conventions, and have existing rules in effect. They simply need to extend that for all AWS cloud resources to include Amazon Machine Images (AMI). + +## Impact + +No significant operational impact. This is an organizational best practice that improves manageability and consistency of AMI resources. + +## Audit Procedure + +### Using AWS CLI + +1. Run aws ec2 describe-images. + +```bash +aws ec2 describe-images --owner self --region us-west-2 +``` + +2. Review the list of AMIs. +3. Confirm that the AMI Name matches the organizational image naming policy. + +If any of the AMI Name's do not match the Organization policy refer to the remediation below. + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane, under `Images`, click `AMIs`. +3. Review the list of AMIs. +4. Confirm that the AMI Name matches the organizational image naming policy. + +## Expected Result + +All AMI names should follow the organization's documented naming convention. The output of describe-images should show AMIs with consistent, policy-compliant names. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided. Use the console method to copy and rename AMIs that do not comply with the naming policy. + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane click `Images`, click `AMIs`. +3. Select the AMI that does not comply to the naming policy. +4. Click on `Actions`. +5. Click on `Copy AMI`. + +``` +Destination region - Select the region the AMI is in. +Name - `Enter the new Name` +Description - `Enter the new description` +Encryption - `Select` if it matches your image policy +``` + +6. Click on Copy AMI + +Once the AMI has finished copying: + +7. Select the AMI that does not comply to the naming policy. +8. Click on `Actions`. +9. Click on `Deregister`. + +## Default Value + +AWS does not enforce any default naming convention for AMIs. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-images.html +2. https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/AMIs.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.2/SKILL.md new file mode 100644 index 0000000000..77899257b2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.2/SKILL.md @@ -0,0 +1,118 @@ +--- +name: cis-aws-compute-2.1.2 +description: "Ensure Amazon Machine Images (AMIs) are encrypted" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, ami, encryption, ebs] +cis_id: "2.1.2" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.1.1, cis-aws-compute-2.2.1, cis-aws-compute-2.2.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Amazon Machine Images (AMIs) are encrypted + +## Description + +Amazon Machine Images should utilize EBS Encrypted snapshots. + +## Rationale + +AMIs backed by EBS snapshots should use EBS encryption. Snapshot volumes can be encrypted and attached to an AMI. + +## Impact + +Encrypting AMIs may add slight overhead to instance launch times and requires KMS key management. Existing unencrypted AMIs must be copied with encryption enabled and old ones deregistered. + +## Audit Procedure + +### Using AWS CLI + +1. Run the aws ec2 describe-images command to find unencrypted AMIs: + +```bash +aws ec2 describe-images --region us-east-1 --owner self --filter "Name=block-device-mapping.encrypted,Values=false" --query "Images[*].[ImageId]" +``` + +2. If this produces a list of AMI's make note as these are not encrypted, then refer to the remediation below. + +### Using AWS Console + +1. Login to the IAM console at https://console.aws.amazon.com/ec2/. +2. In the left pane click `Instances`, click `AMIs`. +3. In the `Details` tab. +4. Review the 'Block Devices'. +5. Confirm that it ends with `encrypted`. + +If it doesn't end with encrypted, refer to the remediation below. + +## Expected Result + +The CLI command should return an empty list, indicating all AMIs use encrypted EBS snapshots. In the console, all AMI block devices should show as `encrypted`. + +## Remediation + +### Using AWS CLI + +1. Run the aws ec2 copy-image command to copy AMI with encrypted block device: + +```bash +aws ec2 copy-image --name --source-image-id --source-region --encrypted +``` + +2. Run aws ec2 deregister-image to deregister older AMIs: + +```bash +aws ec2 deregister-image --image-id +``` + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane click on `AMIs`. +3. Select the AMI that does not comply to the encryption policy. +4. Click on `Actions`. +5. Click on `Copy AMI`. + +``` +Destination region - `Select the region the AMI is in`. +Name - `Enter the new Name` +Description - `Enter the new description` +Encryption - `Select` Encrypt target EBS snapshots +``` + +6. Click on Copy AMI. + +Once the AMI has finished copying: + +7. Select the AMI that does not have encrypted EBS snapshots. +8. Click on `Actions`. +9. Click on `Deregister`. + +## Default Value + +By default, AMIs are not encrypted. EBS encryption must be explicitly enabled when creating or copying AMIs. + +## References + +1. https://aws.amazon.com/premiumsupport/knowledge-center/view-ami-snapshot-encryption-details/ +2. https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/AMIEncryption.html +3. https://docs.aws.amazon.com/cli/latest/reference/ec2/copy-image.html +4. https://docs.aws.amazon.com/cli/latest/reference/ec2/deregister-image.html +5. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeregisterImage.html +6. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.3/SKILL.md new file mode 100644 index 0000000000..a905099376 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.3/SKILL.md @@ -0,0 +1,119 @@ +--- +name: cis-aws-compute-2.1.3 +description: "Ensure Only Approved Amazon Machine Images (AMIs) are Used" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, ami, approved-images, inventory] +cis_id: "2.1.3" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.1.1, cis-aws-compute-2.1.4, cis-aws-compute-2.1.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Only Approved Amazon Machine Images (AMIs) are Used + +## Description + +Ensure that all base AMIs utilized are approved for use by your organization. + +## Rationale + +An approved AMI is a base EC2 machine image that is a pre-configured OS configured to run your application. Using approved AMIs helps enforce consistency and security. + +## Impact + +Instances running on unapproved AMIs may need to be replaced with instances built from approved AMIs, which could cause temporary service disruption. + +## Audit Procedure + +### Using AWS CLI + +No specific CLI audit command is provided for this control. Use the console method to manually verify AMI approval status. + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane click on `Images`. +3. Then choose `AMIs`. +4. Confirm that `Owned by me` is selected. +5. Review the list of AMIs. +6. Confirm that the AMIs listed are all approved for use. +7. In the left pane click on `Instances`. +8. Then choose `Instances`. +9. Select the EC2 instance for review. +10. In the Details tab review: + +``` +AMI Name +AMI location +``` + +11. Confirm that the AMI name matches an approved AMI and the AMI location is within your account. +12. Repeat steps 9 - 11 to verify the AMI is approved. + +Repeat the process for all other regions. +If any of the AMIs are not approved refer to the remediation below. + +## Expected Result + +All EC2 instances should be running on organization-approved AMIs. The AMI Name and AMI location should match entries in the organization's approved AMI list. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided. Use the console method below. + +### Using AWS Console + +**Remove unauthorized AMIs:** + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane click on `Images`. +3. Then choose `AMIs`. +4. Confirm that `Owned by me` is selected. +5. Review the list of AMIs. +6. Confirm that the AMIs listed are all approved for use. +7. If an AMI is listed that is not approved select it. +8. Click on `Actions` and choose `Deregister`. + +**After all unauthorized AMIs have been De-registered review all EC2 instances:** + +1. Click on `Instances`. +2. Then choose `Instances`. +3. Select the `EC2 instance` for review. +4. In the `Details` tab review: + +``` +AMI Name +AMI location +``` + +5. If this information is listed as not available this instance was built with an unauthorized AMI. +6. Follow organization steps to secure this instance and replace it with an instance built from an approved AMI if applicable. +7. Repeat steps 3 - 6 to verify all instance have been created with approved AMIs. + +Repeat the process for all other regions. + +## Default Value + +AWS does not enforce any default AMI approval process. Any AMI can be used to launch instances. + +## References + +No specific references provided in the benchmark for this control. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.4/SKILL.md new file mode 100644 index 0000000000..1f1b914470 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.4/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-compute-2.1.4 +description: "Ensure Images (AMI) are not older than 90 days" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, ami, age, patching, lifecycle] +cis_id: "2.1.4" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.1.3, cis-aws-compute-2.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Images (AMI) are not older than 90 days + +## Description + +Ensure that your AMIs are not older than 90 days. + +## Rationale + +Using up-to-date AMIs will provide many benefits from OS updates and security patches helping to ensure reliability, security and compliance. + +## Impact + +Outdated AMIs must be replaced by creating new images from updated instances. This requires a refresh cycle that involves launching instances, applying updates, creating new AMIs, and deregistering old ones. + +## Audit Procedure + +### Using AWS CLI + +Run the aws ec2 describe-images command: + +```bash +aws ec2 describe-images \ + --region \ + --image-ids +``` + +Look for CreationDate in response. +If the age of the selected AMI is greater than 90 days, the AMI is considered outdated and it should be updated. + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane, under `Images`, click `AMIs`. +3. Select the AMI for review. +4. Under the `Details` tab. +5. Review the `Creation date`. + +If the age of the selected AMI is greater than 90 days, the AMI is considered outdated and it should be updated. + +6. Repeat steps no. 3 - 5 to verify the date of the other approved AMIs available. + +Repeat all steps for the other regions. + +## Expected Result + +All AMIs should have a CreationDate within the last 90 days. Any AMI older than 90 days is considered non-compliant and should be updated. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided. Follow the console steps below to update AMIs. + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane, under `Images`, click `AMIs`. +3. Select the AMI to be updated. +4. Click on Launch. +5. Go through the EC2 Instance creation process. +6. Apply all system, security and application updates that are applicable to the EC2 instance. +7. Once completed click on `Instance state`, Stop instance. +8. Click on `Actions, Image and templates, Create image`. +9. Once the image process has complete return to the AMI list but clicking on `Images, AMIs`. +10. Select the AMI that is older than 90 days. +11. Click on `Actions, Deregister`. + +Repeat these steps for any other AMIs older than 90 days. + +## Default Value + +AWS does not enforce any default age limit on AMIs. + +## References + +1. https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html +2. https://docs.aws.amazon.com/cli/latest/reference/ec2/deregister-image.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.2 Ensure Authorized Software is Currently Supported | x | x | x | +| v7 | 2.2 Ensure Software is Supported by Vendor | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.5/SKILL.md new file mode 100644 index 0000000000..b66fe2ce34 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.1.5/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-aws-compute-2.1.5 +description: "Ensure Images are not Publicly Available" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, ami, public-access, permissions] +cis_id: "2.1.5" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.1.3, cis-aws-compute-2.2.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Images are not Publicly Available + +## Description + +EC2 allows you to make an AMI public, sharing it with all AWS accounts. + +## Rationale + +Publicly sharing an AMI with all AWS accounts could expose organizational data and configuration information. + +## Impact + +Making an AMI private may affect other AWS accounts that depend on it. Ensure shared accounts are explicitly added if needed. + +## Audit Procedure + +### Using AWS CLI + +No specific CLI audit command is provided for this control. Use the console method below. + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane, under `Images`, click `AMIs`. +3. Confirm the `Owned by me` is set. +4. Select the AMI from the list. +5. Click on the `Permissions` Tab. +6. If this reads `This image is currently Public`, please refer to the remediation below. + +## Expected Result + +All AMIs should have their permissions set to Private. No AMI should display "This image is currently Public" in the Permissions tab. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided for this control. Use the console method below. + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane, under `Images`, click `AMIs`. +3. Confirm the `Owned by me` is set. +4. Select the AMI from the list. +5. Click on the `Permissions` Tab. +6. Click on `Edit`. +7. Click on the radio button `Private`. + +Add AWS Account Number if you have a need to share with other Internal AWS accounts that your Organization owns. + +## Default Value + +By default, AMIs are private when created. They must be explicitly made public. + +## References + +1. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharing-amis.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------- | ---- | ---- | ---- | +| v8 | 11.3 Protect Recovery Data | x | x | x | +| v7 | 5.3 Securely Store Master Images | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.10/SKILL.md new file mode 100644 index 0000000000..d3b2bce7c8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.10/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-aws-compute-2.10 +description: "Ensure unused ENIs are removed" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, eni, network-interfaces, unused, cleanup] +cis_id: "2.10" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.7, cis-aws-compute-2.2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure unused ENIs are removed + +## Description + +Identify and delete any unused Amazon AWS Elastic Network Interfaces in order to adhere to best practices and to avoid reaching the service limit. An AWS Elastic Network Interface (ENI) is pronounced unused when is not attached anymore to an EC2 instance. + +## Rationale + +Removing unused ENIs helps maintain a clean environment, reduces potential attack surface, and avoids reaching service limits. + +## Impact + +Deleting an ENI is permanent. Ensure the ENI is truly unused before removal. + +## Audit Procedure + +### Using AWS CLI + +1. Run describe-network-interfaces command: + +```bash +aws ec2 describe-network-interfaces --region us-east-1 --output json --filters Name=status,Values=available --query "NetworkInterfaces[*].{ENI:NetworkInterfaceId}" +``` + +2. The command output should return an empty list if no unused ENIs exist. +3. If there is a list of ENI IDs then refer to the remediation below. +4. Repeat steps 1 - 3 to determine the current status for any other `ENIs` within the current region. + +NOTE Repeat the audit process for all other regions used. + +### Using AWS Console + +1. Login to EC2 using https://console.aws.amazon.com/ec2/ +2. On the left Click `NETWORK & SECURITY`, click `Network Interfaces`. +3. Select the ENI that you want to review. +4. Go to the Details tab. +5. Check the value set for the Status attribute. +6. If it says `available`, refer to the remediation below. +7. Repeat steps 3 - 6 to determine the current status for any other `ENIs` within the current region. + +NOTE Repeat the audit process for all other regions used. + +## Expected Result + +The CLI command should return an empty list, indicating no ENIs are in the `available` (unattached) state. + +## Remediation + +### Using AWS CLI + +1. Run the delete-network-interface command with the ENI names collected above in the audit: + +```bash +aws ec2 delete-network-interface --region us-east-1 --network-interface-id eni-1234abcd +``` + +2. This will remove the ENI that is not being used. +3. Repeat steps 1 - 2 for any `ENIs` within the current region. + +NOTE Repeat the audit process for all other regions used. + +### Using AWS Console + +1. Login to EC2 using https://console.aws.amazon.com/ec2/ +2. On the left Click `NETWORK & SECURITY`, click `Network Interfaces`. +3. Select the ENI that you want to remove. +4. Click 'Actions', then 'delete'. +5. Click `Delete`. +6. Repeat steps 3 - 5 any other `ENIs` listed in the audit within the current region. + +NOTE Repeat the audit process for all other regions used. + +## Default Value + +ENIs are not automatically cleaned up when detached from instances. + +## References + +No specific references provided in the benchmark for this control. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 11.1 Maintain Standard Security Configurations for Network Devices | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.11/SKILL.md new file mode 100644 index 0000000000..db36c549d2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.11/SKILL.md @@ -0,0 +1,92 @@ +--- +name: cis-aws-compute-2.11 +description: "Ensure instances stopped for over 90 days are removed" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, stopped-instances, cleanup, lifecycle] +cis_id: "2.11" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.5, cis-aws-compute-2.12] +prerequisites: [] +severity_boost: {} +--- + +# Ensure instances stopped for over 90 days are removed + +## Description + +Enable this rule to help with the baseline configuration of Amazon Elastic Compute Cloud (Amazon EC2) instances by checking whether Amazon EC2 instances have been stopped for more than the allowed number of days, according to your organization's standards. + +## Rationale + +Stopped instances that are no longer needed consume resources and may contain outdated configurations or unpatched software. Removing them reduces the attack surface and management overhead. + +## Impact + +Terminating instances is irreversible. Ensure data on the instance is backed up or no longer needed before termination. + +## Audit Procedure + +### Using AWS CLI + +No specific CLI audit command is provided for this control. Use the console method below. + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane, click `Instances`, click `Instances`. +3. Select the Instance for review. +4. Under the `Details` tab. +5. Review the `Launch time`. + +If the `Launch time` of the selected Instance is greater than 90 days, the Instance has been offline and is considered outdated. + +6. Repeat steps no. 3 - 5 to verify the Launch date for the other instances. + +Repeat all steps for the other regions. +Refer to the remediation procedure below if any of the `Launch times` are over 90 days. + +## Expected Result + +No stopped instances should have a Launch time older than 90 days. All stopped instances beyond this threshold should be terminated. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided for this control. Use the console method below. + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane, click `Instances`, click `Instances`. +3. Select the Instance for that hasn't been used for over 90 days. +4. Under the `Details` tab. +5. Click `Instance state`, click `Terminate instance`. +6. Click `Terminate`. + +7. Repeat steps no. 3 - 6 the other instances with a launch date equal to or over 90 days. + +Repeat all steps for the other regions. + +## Default Value + +AWS does not automatically terminate stopped instances. They remain in the stopped state indefinitely unless terminated. + +## References + +1. https://docs.aws.amazon.com/config/latest/developerguide/ec2-stopped-instance.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.12/SKILL.md new file mode 100644 index 0000000000..d78ef2dd7c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.12/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-aws-compute-2.12 +description: "Ensure EBS volumes attached to an EC2 instance are marked for deletion upon instance termination" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, ebs, delete-on-termination, lifecycle] +cis_id: "2.12" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.2.4, cis-aws-compute-2.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure EBS volumes attached to an EC2 instance are marked for deletion upon instance termination + +## Description + +This rule ensures that Amazon Elastic Block Store volumes that are attached to Amazon Elastic Compute Cloud (Amazon EC2) instances are marked for deletion when an instance is terminated. If an Amazon EBS volume isn't deleted when the instance that it's attached to is terminated, it may violate the concept of least functionality. + +## Rationale + +Orphaned EBS volumes after instance termination can contain sensitive data and increase costs. Marking volumes for deletion on termination ensures cleanup. + +## Impact + +Data on the EBS volume will be permanently lost when the instance is terminated. Ensure important data is backed up before enabling this setting. + +## Audit Procedure + +### Using AWS CLI + +1. Run the describe-instances command: + +```bash +aws ec2 describe-instances --region us-east-1 --output json --filters "Name=block-device-mapping.delete-on-termination,Values=false" --query "Reservations[*].Instances[*].{Instance:InstanceId}" +``` + +2. The output should be a list of instances that have not set 'Delete on termination'. +3. Make note of the list of instance ids and refer to the remediation below. +4. Repeat steps no. 1 -3 with the other `AWS regions`. + +### Using AWS Console + +1. Login to EC2 using https://console.aws.amazon.com/ec2/ +2. On the left Click `INSTANCES`, click `Instances`. +3. Select the `EC2 instance` you want to review. +4. Select the `Storage` tab. +5. Scroll down until you reach the 'Volume ID' and review the setting for 'Delete on termination'. +6. If the value is set to `No` refer to the remediation below. +7. Repeat steps no. 3 - 6 to verify the setting. +8. Go through the other `AWS regions` and repeat the audit process for all instances. + +## Expected Result + +The CLI command should return an empty list, indicating all EBS volumes attached to instances have `DeleteOnTermination` set to `true`. + +## Remediation + +### Using AWS CLI + +1. Run the modify-instance-attribute command using the list of instances collected in the audit: + +```bash +aws ec2 modify-instance-attribute --instance-id i-123456abcdefghi0 --block-device-mappings "[{\"DeviceName\": \"/dev/sda\",\"Ebs\":{\"DeleteOnTermination\":true}}]" +``` + +2. Repeat steps no. 1 with the other instances discovered in all `AWS regions`. + +**Note:** If you get any errors running the modify-instance-attribute command confirm the instance id and the Device Name for that instance is correct. The above command is referencing the typical default device name. + +### Using AWS Console + +1. At this time the `delete on termination` setting for existing instances can only be changed using AWS CLI. + +## Default Value + +By default, the root EBS volume is marked for deletion on termination, but additional attached volumes are not. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/modify-instance-attribute.html +2. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.13/SKILL.md new file mode 100644 index 0000000000..ec721bb2d2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.13/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-aws-compute-2.13 +description: "Ensure Secrets and Sensitive Data are not stored directly in EC2 User Data" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, user-data, secrets, sensitive-data, secrets-manager] +cis_id: "2.13" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Secrets and Sensitive Data are not stored directly in EC2 User Data + +## Description + +User Data can be specified when launching an ec2 instance. Examples include specifying parameters for configuring the instance or including a simple script. + +## Rationale + +The user data is not protected by authentication or cryptographic methods. Therefore, sensitive data, such as passwords or long-lived encryption keys should not be stored as user data. + +## Impact + +Anyone who has access to the instance and configuration can view the user data. Removing secrets from user data may require changes to instance bootstrapping processes. + +## Audit Procedure + +### Using AWS CLI + +1. Run `aws ec2 describe-instances` to retrieve information about all instances in the AWS region. The output will include instance ids. + +2. Run `aws ec2 describe-instance-attribute` for each instance in AWS account: + +```bash +aws ec2 describe-instance-attribute --instance-id "ID of instance" --attribute userData +``` + +Note: User Data may be Base64 encoded. Decode the output as necessary. + +3. Review user data to ensure no secrets or sensitive information are stored. +4. Repeat the Audit for all the other AWS regions. + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services` and click `EC2` under Compute. +3. Click on `Instances`. +4. For each instance, click `Actions` -> `Instance Settings` -> `Edit user data`. +5. For each instance, review the user data to ensure there are no secrets or sensitive data stored. +6. If secrets or sensitive data is found, refer to the remediation below. +7. Repeat steps 2-7 for all regions used. + +## Expected Result + +No EC2 instance user data should contain secrets, passwords, API keys, or other sensitive information. User data should only contain non-sensitive configuration parameters or scripts that retrieve secrets from a secure source like AWS Secrets Manager. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided for this control. Use the console method below. + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services` and click `EC2` under Compute. +3. Click on `Instances`. +4. If the instance is currently running, stop the instance first. + +Note: ensure there is no negative impact from stopping the instance prior to stopping the instance. + +5. For each instance, click `Actions` -> `Instance Settings` -> `Edit user data`. +6. For each instance, edit the user data to ensure there are no secrets or sensitive data stored. A Secret Management solution such as AWS Secrets Manager can be used here as a more secure mechanism of storing necessary sensitive data. +7. Repeat this remediation for all the other AWS regions. + +Note: If the ec2 instances are created via automation or infrastructure-as-code, edit the user data in those pipelines and code. + +## Default Value + +EC2 user data is empty by default unless specified during instance launch. + +## References + +1. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.2 Establish and Maintain a Data Inventory | x | x | x | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 1.5 Maintain Asset Inventory Information | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.14/SKILL.md new file mode 100644 index 0000000000..08d7a9d37f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.14/SKILL.md @@ -0,0 +1,88 @@ +--- +name: cis-aws-compute-2.14 +description: "Ensure EC2 Auto Scaling Groups Propagate Tags to EC2 Instances that it launches" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, auto-scaling, tags, propagation, compliance] +cis_id: "2.14" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.3, cis-aws-compute-2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure EC2 Auto Scaling Groups Propagate Tags to EC2 Instances that it launches + +## Description + +Tags can help with managing, identifying, organizing, searching for, and filtering resources. Additionally, tags can help with security and compliance. Tags can be propagated from an Auto Scaling group to the EC2 instances that it launches. + +## Rationale + +Without tags, EC2 instances created via Auto Scaling can be without tags and could be out of compliance with security policy. + +## Impact + +No negative impact. Enabling tag propagation ensures all instances launched by Auto Scaling groups inherit the group's tags automatically. + +## Audit Procedure + +### Using AWS CLI + +1. Run `aws autoscaling describe-auto-scaling-groups`: + +```bash +aws autoscaling describe-auto-scaling-groups +``` + +2. Ensure `PropagateAtLaunch` is `true` under `Tags` for each Tag for the Auto Scaling Group. +3. Repeat Steps 1-2 for each AWS Region used. + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click All services and click EC2 under Compute. +3. Select Auto Scaling Groups. +4. For each Auto Scaling Group's Details, ensure that all tags have `Tag new instances` set to `Yes`. +5. Repeat Steps 1-4 for each AWS Region used. + +## Expected Result + +All tags in every Auto Scaling Group should have `PropagateAtLaunch` set to `true`. In the console, all tags should show `Tag new instances` set to `Yes`. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided for this control. Use the console method below. + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click All services and click EC2 under Compute. +3. Select Auto Scaling Groups. +4. Click `Edit` for each Auto Scaling Group. +5. Check the `Tag new instances` Box for the Auto Scaling Group. +6. Click `Update`. +7. Repeat Steps 1-6 for each AWS Region used. + +## Default Value + +By default, Auto Scaling group tags are not automatically propagated to launched instances unless `PropagateAtLaunch` is set to `true`. + +## References + +No specific references provided in the benchmark for this control. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v7 | 5.2 Maintain Secure Images | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.1/SKILL.md new file mode 100644 index 0000000000..593b3d6ba0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.1/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-compute-2.2.1 +description: "Ensure EBS volume encryption is enabled" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, ebs, encryption, volumes] +cis_id: "2.2.1" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.1.2, cis-aws-compute-2.2.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure EBS volume encryption is enabled + +## Description + +Elastic Compute Cloud (EC2) supports encryption at rest when using the Elastic Block Store (EBS) service. While disabled by default, forcing encryption at EBS volume creation is supported. + +## Rationale + +Encrypting data at rest reduces the likelihood that it is unintentionally exposed and can nullify the impact of disclosure if the encryption remains unbroken. + +## Impact + +Enabling EBS encryption by default applies to all new volumes. Existing unencrypted volumes are not affected. This is configured per region. + +## Audit Procedure + +### Using AWS CLI + +1. Run: + +```bash +aws --region ec2 get-ebs-encryption-by-default +``` + +2. Verify that `"EbsEncryptionByDefault": true` is displayed. +3. Review every region in-use. + +Note: EBS volume encryption is configured per region. + +### Using AWS Console + +1. Login to the EC2 console using https://console.aws.amazon.com/ec2/ +2. Under `Account attributes`, click `EBS encryption`. +3. Verify `Always encrypt new EBS volumes` displays `Enabled`. +4. Review every region in-use. + +Note: EBS volume encryption is configured per region. + +## Expected Result + +The CLI should return `"EbsEncryptionByDefault": true` for every region in use. In the console, `Always encrypt new EBS volumes` should display `Enabled`. + +## Remediation + +### Using AWS CLI + +1. Run: + +```bash +aws --region ec2 enable-ebs-encryption-by-default +``` + +2. Verify that `"EbsEncryptionByDefault": true` is displayed. +3. Repeat every region requiring the change. + +Note: EBS volume encryption is configured per region. + +### Using AWS Console + +1. Login to the EC2 console using https://console.aws.amazon.com/ec2/ +2. Under `Account attributes`, click `EBS encryption`. +3. Click `Manage`. +4. Click the `Enable` checkbox. +5. Click `Update EBS encryption`. +6. Repeat for every region requiring the change. + +Note: EBS volume encryption is configured per region. + +## Default Value + +EBS encryption by default is disabled. It must be explicitly enabled per region. + +## References + +1. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html +2. https://aws.amazon.com/blogs/aws/new-opt-in-to-default-encryption-for-new-ebs-volumes/ +3. AWS Config rule - ec2_ebs_encryption_by_default + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.2/SKILL.md new file mode 100644 index 0000000000..f57238c709 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.2/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-compute-2.2.2 +description: "Ensure Public Access to EBS Snapshots is Disabled" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, ebs, snapshots, public-access, permissions] +cis_id: "2.2.2" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.1.5, cis-aws-compute-2.2.3, cis-aws-compute-2.2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Public Access to EBS Snapshots is Disabled + +## Description + +To protect your data disable the public mode of EBS snapshots. + +## Rationale + +This protects your data so that it is not accessible to all AWS accounts preventing accidental access and leaks. + +## Impact + +Removing public access from EBS snapshots may affect other AWS accounts that rely on them. Ensure private sharing is configured for any authorized accounts. + +## Audit Procedure + +### Using AWS CLI + +1. For each snapshot, run: + +```bash +aws ec2 describe-snapshot-attribute \ + --snapshot-id \ + --attribute createVolumePermission +``` + +2. Validate `Group` is not set to all. + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane click `Snapshots`. +3. Select the `snapshot` then click `Actions, Modify Permissions`. +4. Confirm that the snapshot is set to `Private`. +5. Repeat for any additional Snapshots, Regions and AWS accounts. + +If the snapshot is set to public refer to the remediation below. + +## Expected Result + +The createVolumePermission attribute should not contain a Group set to "all". In the console, all snapshots should show as Private. + +## Remediation + +### Using AWS CLI + +1. For each snapshot, run: + +```bash +aws ec2 modify-snapshot-attribute \ + --snapshot-id \ + --attribute createVolumePermission \ + --operation remove --group-name all +``` + +### Using AWS Console + +1. Login to the EC2 console at https://console.aws.amazon.com/ec2/. +2. In the left pane click `Snapshots`. +3. Select the `snapshot` then click 'Actions, Modify Permissions'. +4. Click the radio button for `Private`. +5. Click `Save`. +6. Repeat for any additional Snapshots, Regions and AWS accounts. + +## Default Value + +By default, EBS snapshots are private when created. + +## References + +1. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-snapshot-attribute.html + +## Additional Information + +1. Snapshots are constrained to the Region in which they were created. To share a snapshot with another Region, copy the snapshot to that Region. +2. AWS prevents you from sharing snapshots that were encrypted with your default CMK. Snapshots that you intend to share must instead be encrypted with a customer managed CMK. +3. The public option is not valid for encrypted snapshots or snapshots with an AWS Marketplace product code. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.3/SKILL.md new file mode 100644 index 0000000000..3bff6f3c32 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.3/SKILL.md @@ -0,0 +1,156 @@ +--- +name: cis-aws-compute-2.2.3 +description: "Ensure EBS volume snapshots are encrypted" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, ebs, snapshots, encryption] +cis_id: "2.2.3" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.2.1, cis-aws-compute-2.2.2, cis-aws-compute-2.1.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure EBS volume snapshots are encrypted + +## Description + +Elastic Compute Cloud (EC2) supports encryption at rest when using the Elastic Block Store (EBS) service. + +## Rationale + +Encrypting data at rest reduces the likelihood that it is unintentionally exposed and can nullify the impact of disclosure if the encryption remains unbroken. + +## Impact + +Existing unencrypted snapshots must be copied with encryption enabled. The original unencrypted snapshots should then be deleted. EBS snapshot volume encryption is configured per snapshot. + +## Audit Procedure + +### Using AWS CLI + +1. Run describe-snapshots: + +```bash +aws ec2 describe-snapshots --owner-ids --filter Name=status,Values=completed --query "Snapshots[*].{ID:SnapshotId}" +``` + +2. This will provide a list of all the snapshots associated with that account in the region. + +3. For every snapshot listed - Run describe-snapshots: + +```bash +aws ec2 describe-snapshots --snapshot-id --query "Snapshots[*].{Encrypt:Encrypted}" +``` + +4. If the output reads `"Encrypt": true`, Encryption is set on the snapshot. + +If the output reads `"Encrypt": false` refer to the remediation below. + +Note: EBS snapshot volume encryption is configured per snapshot. + +### Using AWS Console + +1. Login to the EC2 console using https://console.aws.amazon.com/ec2/ +2. Under `Elastic Block Store`, click `Snapshots`. +3. Click the snapshot you want to review. +4. Select the `Description` tab. +5. Review the `Encryption` setting. +6. If it reads `encrypted` you are all set. + +If it is set to `Not Encrypted` refer to the remediation below. + +Note: EBS snapshot volume encryption is configured per snapshot. + +## Expected Result + +All snapshots should return `"Encrypt": true` from the CLI. In the console, all snapshots should show as `encrypted` in the Encryption field. + +## Remediation + +### Using AWS CLI + +Using the snapshot ids gathered from the Audit section: + +1. Run copy-snapshot: + +```bash +aws ec2 copy-snapshot --source-region --source-snapshot-id --description "Name of the new snapshot" --encrypted +``` + +2. This will copy the existing unencrypted snapshot and set it to encrypted. The output will show the new SnapshotId. + +3. Run describe-snapshots: + +```bash +aws ec2 describe-snapshots --owner-ids --filter Name=status,Values=completed --query "Snapshots[*].{ID:SnapshotId}" +``` + +Once the new Snapshot shows in the list confirm encryption is set: + +4. Run describe-snapshots: + +```bash +aws ec2 describe-snapshots --snapshot-id --query "Snapshots[*].{Encrypt:Encrypted}" +``` + +5. Repeat steps 1-4 for the snapshots that need to be encrypted. + +Delete snapshots that are no longer needed: + +6. Run delete-snapshot: + +```bash +aws ec2 delete-snapshot --snapshot-id +``` + +7. Repeat for all unencrypted snapshots that have been copied and encrypted. + +Note: EBS snapshot volume encryption is configured per snapshot. + +### Using AWS Console + +1. Login to the EC2 console using https://console.aws.amazon.com/ec2/ +2. Under `Elastic Block Store`, click `Snapshots`. +3. Select the snapshot you want to encrypt. +4. Click on `Actions` select `Copy`. + +``` +Confirm `Snapshot ID` +Set the `Destination Region` +Update the `Description` +Select the check box for `Encryption` +``` + +5. Check the box for `Encrypt this snapshot`. +6. Set the `Master Key`. +7. Click on `Copy`. +8. Repeat steps 3-7 for the snapshots that need to be encrypted. +9. Delete any of the unencrypted snapshots that are not longer needed. + +Note: EBS snapshot volume encryption is configured per snapshot. + +## Default Value + +By default, EBS snapshots are not encrypted. Encryption must be explicitly enabled when creating or copying snapshots. + +## References + +1. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-snapshots.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/delete-snapshot.html +4. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/copy-snapshot.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.4/SKILL.md new file mode 100644 index 0000000000..c8cb3d9596 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.2.4/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-aws-compute-2.2.4 +description: "Ensure unused EBS volumes are removed" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, ebs, volumes, unused, cleanup] +cis_id: "2.2.4" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.2.1, cis-aws-compute-2.12] +prerequisites: [] +severity_boost: {} +--- + +# Ensure unused EBS volumes are removed + +## Description + +Identify any unused Elastic Block Store (EBS) volumes in your AWS account and remove them. + +## Rationale + +Any Elastic Block Store volume created in your AWS account contains data, regardless of being used or not. If you have EBS volumes (other than root volumes) that are unattached to an EC2 instance they should be removed to prevent unauthorized access or data leak to any sensitive data on these volumes. + +## Impact + +Once a EBS volume is deleted, the data will be lost. If this is data that you need to archive, create an encrypted EBS snapshot before deleting them. + +## Audit Procedure + +### Using AWS CLI + +1. Run describe-volumes: + +```bash +aws ec2 describe-volumes --filter Name=status,Values=available --query "Volumes[*].{ID:VolumeId}" +``` + +2. This will provide a list of all the volumes not attached to an instance. + +Capture this list of volume names and refer to the remediation below. + +Note: EBS volumes can be in different regions. Make sure to review all the regions being utilized. + +### Using AWS Console + +1. Login to the EC2 console using https://console.aws.amazon.com/ec2/ +2. Under `Elastic Block Store`, click `Volumes`. +3. Find the `State` column. +4. Sort by `Available`. +5. Any `Volumes` listed as Available can be deleted as that is the indication the volume is not attached to an instance. + +Capture this list of volume names and refer to the remediation below. + +Note: EBS volumes can be in different regions. Make sure to review all the regions being utilized. + +## Expected Result + +The CLI command should return an empty list, indicating no unattached EBS volumes exist. In the console, no volumes should be in the `Available` state. + +## Remediation + +### Using AWS CLI + +Using the list of `available volumes` identified in the Audit above: + +1. Run the delete-volume command: + +```bash +aws ec2 delete-volume --volume-id +``` + +2. This will delete the volume identified. + +Note: Using this command will not prompt you for confirmation. It will delete the volume and you will not be able to recover it. Please make sure you have the correct volume and that you have created a snapshot if it is something that needs to be archived. + +Note: EBS volumes can be in different regions. Make sure to review all the regions being utilized. + +### Using AWS Console + +1. Login to the EC2 console using https://console.aws.amazon.com/ec2/ +2. Under `Elastic Block Store`, click `Volumes`. +3. Find the `State` column. +4. Sort by `Available`. +5. Select the Volume that you want to delete. +6. Click `Actions, Delete volume, Yes, Delete`. + +Note: EBS volumes can be in different regions. Make sure to review all the regions being utilized. + +## Default Value + +EBS volumes remain in the account after being detached from instances. AWS does not automatically clean up unused volumes. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-volumes.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/delete-volume.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.3/SKILL.md new file mode 100644 index 0000000000..48d619ea05 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.3/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-aws-compute-2.3 +description: "Ensure Tag Policies are Enabled" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, tag-policies, organizations, governance] +cis_id: "2.3" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.4, cis-aws-compute-2.1.1] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Tag Policies are Enabled + +## Description + +Tag policies help you standardize tags on all tagged resources across your organization. + +## Rationale + +You can use tag policies to define tag keys (including how they should be capitalized) and their allowed values. + +## Impact + +Enabling tag policies may require organizations to update their tagging practices to comply with the new policy. Non-compliant tags may be rejected if enforcement is enabled. + +## Audit Procedure + +### Using AWS CLI + +1. Run the `list-policies` command: + +```bash +aws organizations list-policies --filter TAG_POLICY +``` + +2. If information displays it means you have a tagging policy in place. +3. If empty brackets display `[]` refer to the remediation below. + +### Using AWS Console + +1. Login to AWS Organizations using https://console.aws.amazon.com/organizations/ +2. In the left pane click on `Policies`. +3. Confirm `Tag policies` status is `enabled`. + +If `Tag policies` status is disabled refer to the remediation below. + +## Expected Result + +The CLI should return tag policy information (not empty brackets). In the console, Tag policies status should display as `enabled`. + +## Remediation + +### Using AWS CLI + +You must use an IAM user, assume an IAM role, or sign in as the root user (not recommended) in the organization's management account. + +1. Run the `enable-policy-type` command: + +```bash +aws organizations enable-policy-type --root-id --policy-type TAG_POLICIES +``` + +The list of PolicyTypes in the output will now include the specified policy type with the Status of ENABLED. + +### Using AWS Console + +You must sign in as an IAM user, assume an IAM role, or sign in as the root user (not recommended) in the organization's management account. + +1. Login to AWS Organizations using https://console.aws.amazon.com/organizations/ +2. In the Left pane click on `Policies`. +3. Click on `Tag policies`. +4. Click on `Enable Tag Policies`. +5. The page is updated with a list of the Available policies and the ability to create one. + +## Default Value + +Tag policies are disabled by default in AWS Organizations. + +## References + +1. https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html#enable-policy-type + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.5 Maintain Asset Inventory Information | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.4/SKILL.md new file mode 100644 index 0000000000..1e72c6ccfe --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.4/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-aws-compute-2.4 +description: "Ensure an Organizational EC2 Tag Policy has been Created" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, tag-policy, organizations, compliance] +cis_id: "2.4" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.3, cis-aws-compute-2.14] +prerequisites: [] +severity_boost: {} +--- + +# Ensure an Organizational EC2 Tag Policy has been Created + +## Description + +A tag policy enables you to define tag compliance rules to help you maintain consistency in the tags attached to your organization's resources. + +## Rationale + +You can use an EC2 tag policy to enforce your tag strategy across all of your EC2 resources. + +## Impact + +Creating and enforcing tag policies may prevent resource creation if tags do not comply with the defined policy, potentially affecting automated deployments. + +## Audit Procedure + +### Using AWS CLI + +No specific CLI audit command is provided for this control. Use the console method below. + +### Using AWS Console + +1. Login to the AWS Organizations using https://console.aws.amazon.com/organizations/ +2. On the left click `Policies`. +3. Click on `Tag policies`. +4. Confirm that a policy name exists with a description. +5. Click on the policy for EC2 Tagging as indicated in the name, description or both. +6. Click on `Edit policy`. +7. Confirm that `Tag key capitalization compliance` is checked. +8. Confirm that `Prevent non-compliant operations for this tag` is checked. +9. Confirm that `ec2:image`, `ec2:instance` and `ec2:reserved-instances` are listed. + +If the tag policy does not exist with the settings listed above refer to the remediation below. + +## Expected Result + +An EC2 tag policy should exist with Tag key capitalization compliance enabled, non-compliant operations prevented, and ec2:image, ec2:instance, and ec2:reserved-instances resource types specified. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided for this control. Use the console method below. + +### Using AWS Console + +You must sign in as an IAM user, assume an IAM role, or sign in as the root user (not recommended) in the organization's management account. + +To create a tag policy: + +1. Login to the AWS Organizations using https://console.aws.amazon.com/organizations/ +2. Left hand side Click on `Policies`. +3. Under `Support policy types` click on `Tag policies`. +4. Under `Available policies` click on `Create policy`. +5. Enter policy name. +6. Enter policy description (Indicate this is the EC2 tag policy). +7. For New tag key 1, specify the name of a tag key to add. +8. For `Tag key capitalization compliance` select the box for Use the capitalization to enable this option mandating a specific capitalization for the tag key using this policy. +9. For `Resource types to enforce` check the box for `Prevent non-compliant operations for this tag`. +10. Click on `Specify resource types`. +11. Expand EC2. +12. Select ec2:image, ec2:instance, ec2:reserved-instances. +13. Click `Save changes`. +14. Click `Create policy`. + +## Default Value + +No EC2 tag policies exist by default. + +## References + +1. https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-create.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.5 Maintain Asset Inventory Information | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.5/SKILL.md new file mode 100644 index 0000000000..309f90a3c1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.5/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-aws-compute-2.5 +description: "Ensure no AWS EC2 Instances are Older than 180 days" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, instance-age, lifecycle, patching] +cis_id: "2.5" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.1.4, cis-aws-compute-2.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure no AWS EC2 Instances are Older than 180 days + +## Description + +Identify any running AWS EC2 instances older than 180 days. + +## Rationale + +An EC2 instance is not supposed to run indefinitely and having instance older than 180 days can increase the risk of problems and issues. + +## Impact + +Stopping and restarting instances will change the launch time and may cause temporary service disruption. Plan for maintenance windows when refreshing long-running instances. + +## Audit Procedure + +### Using AWS CLI + +1. Run the describe-instances command: + +```bash +aws ec2 describe-instances --region us-east-1 --output json --filters "Name=instance-state-code,Values=16" --query "Reservations[*].Instances[*].{Instance:InstanceId}" +``` + +2. The output should look like this: + +```json +[ + [ + { + "Instance": "i-1234567abcdefghi0" + } + ], + [ + { + "Instance": "i-1234567abcdefghi0" + } + ] +] +``` + +3. Run the describe-instances command for each instance ID listed: + +```bash +aws ec2 describe-instances --region us-east-1 --instance-ids i-1234567abcdefghi0 --query "Reservations[*].Instances[*].LaunchTime" +``` + +4. The command output should return the instance launch date in human readable format: + +``` +"2021-06-11T15:04:52+00:00" +``` + +5. If the selected instance was launched more than 180 days ago, refer to the remediation below. +6. Repeat steps 3 and 4 to verify the launch date for all instances listed. +7. Repeat steps 1 - 6 for the other AWS regions. + +### Using AWS Console + +1. Login to EC2 using https://console.aws.amazon.com/ec2/ +2. On the left Click `INSTANCES`, click `Instances`. +3. Select the `EC2 instance`. The Instance State must be 'running'. +4. Select the `Description` tab. +5. Check the `Launch time`. +6. Determine the `instance active age`. +7. If the selected EC2 instance active age is greater than 180 days, refer to the remediation below. +8. Repeat steps no. 3 - 7 to verify the launch date for all instances. +9. Go through the other `AWS regions` and repeat the audit process. + +## Expected Result + +No running EC2 instance should have a LaunchTime older than 180 days. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided. Use the console method below. + +### Using AWS Console + +1. Login to EC2 using https://console.aws.amazon.com/ec2/ +2. On the left Click `INSTANCES`, click `Instances`. +3. Select the `EC2 instance` identified above in the audit. The Instance State must be 'running'. +4. Click `Actions`, click `Instance State`, click `Stop`. +5. Wait for the Instance State to read 'stopped'. +6. Click 'Actions' click 'Instance State', click 'Start'. +7. Select the Description tab. +8. Check the Launch time. + +Confirm that the instance active age is now set to today's date and time. + +## Default Value + +AWS does not enforce any default age limit on running EC2 instances. + +## References + +No specific references provided in the benchmark for this control. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.6/SKILL.md new file mode 100644 index 0000000000..8de3644078 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.6/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-aws-compute-2.6 +description: "Ensure detailed monitoring is enabled for production EC2 Instances" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, monitoring, cloudwatch, detailed-monitoring] +cis_id: "2.6" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure detailed monitoring is enabled for production EC2 Instances + +## Description + +Ensure that detailed monitoring is enabled for your Amazon EC2 instances. + +## Rationale + +Monitoring is an important part of maintaining the reliability, availability, and performance of your Amazon EC2 instances. + +## Impact + +Data is available in 1-minute periods. For the instances where you've enabled detailed monitoring, you can also get aggregated data across groups of similar instances. You are charged per metric that is sent to CloudWatch. You are not charged for data storage. Due to this added cost it is recommended that you only enable this on critical instances. + +## Audit Procedure + +### Using AWS CLI + +1. Run the describe-instances command: + +```bash +aws ec2 describe-instances --region us-east-1 --output json --filters "Name=monitoring-state,Values=disabled" --query "Reservations[*].Instances[*].{Instance:InstanceId}" +``` + +2. The output should be a list of running instances that have enhanced monitoring disabled. +3. Based on this list of instance ids refer to the remediation below. + +### Using AWS Console + +1. Login to EC2 using https://console.aws.amazon.com/ec2/ +2. On the left Click `INSTANCES`, click `Instances`. +3. Select the `EC2 instance` you want to review. +4. Select the `Description` tab. +5. Check the `Launch time`. +6. Determine the level of monitoring by reviewing the 'Monitoring attribute'. +7. If the value is set to `basic` refer to the remediation below. +8. Repeat steps no. 3 - 7 to verify the monitoring level for all instances. +9. Go through the other `AWS regions` and repeat the audit process. + +## Expected Result + +The CLI command should return an empty list, indicating all production instances have detailed monitoring enabled. In the console, the Monitoring attribute should not show `basic` for production instances. + +## Remediation + +### Using AWS CLI + +1. Run the monitor-instances command using the list of instances collected in the audit: + +```bash +aws ec2 monitor-instances --instance-ids +``` + +2. The output will show 'state: pending'. +3. Wait a few minutes and run the same command again for that instance and it will show enabled. + +### Using AWS Console + +1. Login to EC2 using https://console.aws.amazon.com/ec2/ +2. On the left Click `INSTANCES`, click `Instances`. +3. Select the `EC2 instance` you want to review. +4. Select the `Monitoring` tab. +5. Click on 'Enable Detailed Monitoring'. +6. Click on `Yes, Enable`. +7. Repeat steps no. 3 - 6 for any other instances that require detailed monitoring to be enabled. + +## Default Value + +By default, EC2 instances use basic monitoring (5-minute intervals). Detailed monitoring (1-minute intervals) must be explicitly enabled. + +## References + +No specific references provided in the benchmark for this control. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.7/SKILL.md new file mode 100644 index 0000000000..88fcf969d4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.7/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-aws-compute-2.7 +description: "Ensure Default EC2 Security groups are not being used" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, security-groups, default, network-security] +cis_id: "2.7" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Default EC2 Security groups are not being used + +## Description + +When an EC2 instance is launched a specified custom security group should be assigned to the instance. + +## Rationale + +When an EC2 Instance is launched the default security group is automatically assigned. In error a lot of instances are launched in this way, and if the default security group is configured to allow unrestricted access, it will increase the attack footprint allowing the opportunity for malicious activity. + +## Impact + +Instances using the default security group must be migrated to custom security groups. This may require updating application configurations and testing connectivity. + +## Audit Procedure + +### Using AWS CLI + +1. Run the describe-instances command: + +```bash +aws ec2 describe-instances --region us-east-1 --output json --filters "Name=instance.group-name,Values=default" --query "Reservations[*].Instances[*].{Instance:InstanceId}" +``` + +2. The command output should return an empty list if the default security group is not being used. +3. If there is a list of instance IDs then the default security group is currently attached to those EC2 instances. +4. Refer to the remediation below using list of EC2 Instance ids captured. + +NOTE Repeat the audit process for all other regions used. + +### Using AWS Console + +1. Login to EC2 using https://console.aws.amazon.com/ec2/ +2. On the left Click `INSTANCES`, click `Instances`. +3. On the EC2 Instances page, click inside the attributes filter box. +4. Click the Security Group Name from the dropdown list. +5. Type `default` for the attribute value. (This filter will detect the EC2 instances currently associated with the default security group) +6. Refer to the remediation below using list of EC2 Instance ids captured. + +NOTE Repeat the audit process for all other regions used. + +## Expected Result + +The CLI command should return an empty list, indicating no EC2 instances are using the default security group. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided for this control. Use the console method below to remove inbound rules from default security groups. + +### Using AWS Console + +1. Login to EC2 using https://console.aws.amazon.com/ec2/ +2. On the left Click `Network & Security`, click `Security Groups`. +3. Select `Security Groups`. +4. Click on the `default Security Group` you want to review. +5. Click `Actions, View details`. +6. Select the `Inbound rules` tab. +7. Click on `Edit inbound rules`. +8. Click on `Delete` for all the rules listed. +9. Once there are no rules listed click on 'Save rules'. +10. Repeat steps no. 3 - 8 for any other default security groups listed. + +## Default Value + +AWS automatically creates a default security group for each VPC. The default security group allows all inbound traffic from other instances in the same security group and all outbound traffic. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-security-groups.html +2. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/default-custom-security-groups.html#default-security-group + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.8/SKILL.md new file mode 100644 index 0000000000..b722b88564 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.8/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-aws-compute-2.8 +description: "Ensure the Use of IMDSv2 is Enforced on All Existing Instances" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, imdsv2, metadata, ssrf, instance-metadata] +cis_id: "2.8" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.7, cis-aws-compute-2.13] +prerequisites: [] +severity_boost: {} +--- + +# Ensure the Use of IMDSv2 is Enforced on All Existing Instances + +## Description + +Ensure the Instance Metadata Service Version 2 (IMDSv2) method is enabled on all running instances. + +## Rationale + +The IMDSv2 method uses session-based controls to help protect access and control of Amazon Elastic Compute Cloud (Amazon EC2) instance metadata. With IMDSv2, controls can be implemented to restrict changes to instance metadata. + +## Impact + +Once you enforce IMDSv2, then IMDSv1 no longer works, and applications that use IMDSv1 might not function correctly. Before enforcing IMDSv2, verify that any applications that use Amazon EC2 metadata are upgraded to a version that supports IMDSv2. + +## Audit Procedure + +### Using AWS CLI + +1. Run the describe-instances command: + +```bash +aws ec2 describe-instances --region us-east-1 --output text --filter "Name=metadata-options.http-tokens,Values=optional" --query "Reservations[*].Instances[*].{Instance:InstanceId}" +``` + +2. The output should look like this: + +``` +i-1234567abcdefghi0 +i-1234567abcdefghi0 +i-1234567abcdefghi0 +``` + +The list above contains all the instances that have the metadata version set to optional which means either IMDSv1 or IMDSv2 can be used. Refer to the remediation below. + +Repeat steps 1 - 2 for the other AWS regions. + +### Using AWS Console + +1. At this time the instance metadata setting for existing instances can only be reviewed and confirmed using AWS CLI. + +## Expected Result + +The CLI command should return an empty list, indicating all instances have http-tokens set to `required` (enforcing IMDSv2). Any instances listed are using optional mode allowing IMDSv1. + +## Remediation + +### Using AWS CLI + +1. Run the modify-instance-metadata-options command using the list of Instances collected in the audit: + +```bash +aws ec2 modify-instance-metadata-options --instance-id i-1234567abcdefghi0 --http-tokens required --http-endpoint enabled +``` + +2. The output should show the information for the instance and the metadata changes: + +```json +{ + "InstanceId": "i-1234567abcdefghi0", + "InstanceMetadataOptions": { + "State": "pending", + "HttpTokens": "required", + "HttpPutResponseHopLimit": 1, + "HttpEndpoint": "enabled" + } +} +``` + +3. Repeat for the other instances and regions collected during the audit. + +### Using AWS Console + +1. At this time the instance metadata setting for existing instances can only be changed using AWS CLI. + +## Default Value + +By default, new EC2 instances may allow both IMDSv1 and IMDSv2 (http-tokens set to optional) depending on region and account settings. + +## References + +1. https://aws.amazon.com/premiumsupport/knowledge-center/ssm-ec2-enforce-imdsv2/ +2. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html +3. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html +4. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/launching-instance.html#configure_instance_details_step +5. https://docs.aws.amazon.com/config/latest/developerguide/ec2-imdsv2-check.html +6. https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-aws-enforce-ec2-imdsv2.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.9/SKILL.md new file mode 100644 index 0000000000..fe2c44ec31 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-2.9/SKILL.md @@ -0,0 +1,156 @@ +--- +name: cis-aws-compute-2.9 +description: "Ensure use of AWS Systems Manager to manage EC2 instances" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ec2, systems-manager, ssm, inventory, management] +cis_id: "2.9" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-2.6, cis-aws-compute-2.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure use of AWS Systems Manager to manage EC2 instances + +## Description + +An inventory and management of Amazon Elastic Compute Cloud (Amazon EC2) instances is made possible with AWS Systems Manager. + +## Rationale + +Use AWS Systems Manager to provide detailed system configurations, operating system patch levels, services name and type, software installations, application name, publisher and version, and other details about your environment. + +## Impact + +Setting up Systems Manager requires creating IAM users, groups, roles, and instance profiles. This adds administrative overhead but provides centralized management of EC2 instances. + +## Audit Procedure + +### Using AWS CLI + +No specific CLI audit command is provided for this control. Use the console method below. + +### Using AWS Console + +1. Login to EC2 using https://console.aws.amazon.com/systems-manager/ +2. On the left Click `Node Management`, click `Inventory`. +3. On the Dashboard confirm that all of your Instances are listed as part of your inventory. + +If any instances are missing or AWS Systems Manager is not configured, refer to the remediation below. + +## Expected Result + +All EC2 instances should appear in the AWS Systems Manager Inventory dashboard. + +## Remediation + +### Using AWS CLI + +No specific CLI remediation command is provided for this control. Use the console method below. + +### Using AWS Console + +These directions already assume your AWS account is setup. They will walk you through how to create non-Admin IAM users and groups for System Manager. + +**1. Create a user group:** + +a. Login to IAM using https://console.aws.amazon.com/iam/ +b. On the left Click `Access management`, click `User groups`, and then click `Create Group`. +c. On the `Create user group` page, enter a name for the group. +d. Select and add the users required to the Group. +e. Attach permissions policies by selecting `ResourceGroupsandTagEditorFullAccess` policy. +f. Then for Full access to Systems Manager console, click the `AmazonSSMFullAccess` policy. + +- OR + g. For access to view Systems Manager data, and not create or update resources, click the `AmazonSSMReadOnlyAccess` policy. + h. For access to the Built-In Insights and Dashboard by CloudWatch pages in the Systems Manager console, add these policies: +- AWSHealthFullAccess +- AWSConfigUserAccess +- CloudWatchReadOnlyAccess + i. Click `Create group`. + +**2. Create users and assign permissions:** + +a. Login to IAM using https://console.aws.amazon.com/iam/ +b. On the left Click `Access management`, click `Users`, and then click `Add users`. +c. `User name`, enter the name that the user will use to sign in to AWS Systems Manager. +d. To allow the user access to development tools, select the check box next to Access key - Programmatic access. +e. To allow user access to the AWS Management Console, select the check box next to AWS Management Console access. +f. Click `Next: Permissions`. +g. To Set permissions, click `Add user to group`. +h. In the `group list`, click the group you created in step 1. +i. Then click `Next: Tags`. +j. (Optional) Add one or more tags. +k. Click `Next: Review` to see the list of group memberships. +l. Click `Create user`. + +**3. To add permissions for an existing user:** + +a. In the IAM console, click `Users`. +b. Click the name of the user to add to a group. +c. Then click `Add permission`. +d. For `Add user to group`, select the box next to the group to add the user to. +e. Add any other available permission policies to assign to the user. +f. Click `Next: Review`. +g. Click `Add permissions`. + +**4. Create an IAM instance profile for Systems Manager:** + +a. Login to the IAM console at https://console.aws.amazon.com/iam/ +b. In the left, click `Roles`, and then click `Create role`. +c. Under `Select type of trusted entity`, click `AWS service`. +d. Click `EC2`, and then click `Next: Permissions`. +e. On the `Attach permissions policies` page, locate `AmazonSSMManagedInstanceCore`. Select the box next to it. +f. Click `Next: Tags`. +g. Add one or more tag-key value pairs. +h. Click `Next: Review`. +i. For `Role name`, enter a name for your new instance profile. +j. For `Role description`, enter a description for this instance profile. +k. Click `Create role`. + +**Note:** If you plan to join instances to an Active Directory managed by AWS Directory Service, search for AmazonSSMDirectoryServiceAccess and select the box next to its name. If you plan to use EventBridge or CloudWatch Logs, search for CloudWatchAgentServerPolicy and select the box next to its name. + +**5. Attach the Systems Manager instance profile to an existing instance:** + +a. Login to the EC2 console at https://console.aws.amazon.com/ec2/ +b. In the left pane, under `Instances`, click `Instances`. +c. Select the instance from the list. +d. In the `Actions menu`, click `Security, Modify IAM role`. +e. Select the instance profile you created in Step 4. +f. Click `Save`. + +**6. Attach an IAM instance profile to an Amazon EC2 instance at launch:** + +a. Login to the EC2 console at https://console.aws.amazon.com/ec2/ +b. Select or confirm the `AWS Region` for the instance. +c. Click `Launch Instance`. +d. Locate the AMI for the instance type you want to create, and then click `Select`. +e. Select the type of instance to launch, then click `Next: Configure Instance Details`. +f. On the `Configure Instance Details` page, in the `IAM role` dropdown list, select the instance profile you created in Step 4. +g. For other options on the page, make selections that meet your requirements for the instance. +h. Complete the `wizard`. + +If you create other instances that you want to configure using Systems Manager, specify the instance profile for each instance. + +## Default Value + +AWS Systems Manager is not configured by default for EC2 instances. It must be explicitly set up. + +## References + +1. https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.1/SKILL.md new file mode 100644 index 0000000000..01a01805da --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.1/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-aws-compute-3.1 +description: "Ensure Amazon ECS task definitions using 'host' network mode do not allow privileged or root user access to the host" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, task-definitions, networking, privilege-escalation, host-network] +cis_id: "3.1" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.3, cis-aws-compute-3.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Amazon ECS task definitions using 'host' network mode do not allow privileged or root user access to the host + +## Description + +Ensure that Amazon ECS task definitions using `host` network mode do not allow privileged or root user access. This protects the host container instance from unauthorized access and privilege escalation. + +Note: This recommendation assumes that only the latest active revision of a task definition is in use. If older revisions are in use, apply the audit and remediation procedures to those revisions as needed. + +## Rationale + +Combining host networking mode with privileged or root user access significantly increases the risk of container breakout, where a compromised container can gain control of the host system. + +## Impact + +There may be some administrative effort required to ensure Amazon ECS applications function as expected without privileged or root user access. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. If `Network mode` is set to `host`, click `JSON`. +6. For each element under `containerDefinitions`, ensure that `privileged` is set to `false` or is absent, and ensure that `user` is not set to `root` or is absent. +7. Repeat steps 1-6 for each task definition. + +### Using AWS CLI + +Run the following command to list task definitions: + +``` +aws ecs list-task-definitions +``` + +For the latest revision of a task definition, run the following command: + +``` +aws ecs describe-task-definition --task-definition +``` + +If `networkMode` is set to `host`, ensure that for each element under `containerDefinitions`, `privileged` is set to `false` or is absent, and ensure that `user` is not set to `root` or is absent. +Repeat for each task definition. + +## Expected Result + +For task definitions using `host` network mode, `privileged` should be `false` or absent, and `user` should not be `root` or should be absent in all `containerDefinitions`. + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `Create new revision`. +6. Click `Create new revision with JSON`. +7. For each element under `containerDefinitions`, set `privileged` to `false`, or remove `"privileged": true`. +8. For each element under `containerDefinitions`, set `user` to an appropriate non-root user, or remove `"user": "root"`. +9. Click `Create`. +10. Repeat steps 1-9 for each task definition requiring remediation. + +Note: When a task definition is updated, running tasks launched from the previous task definition remain unchanged. Updating a running task requires redeploying it with the new task definition. + +### Using AWS CLI + +No specific CLI remediation provided. Use the console steps above or register a new task definition revision with corrected settings using `aws ecs register-task-definition`. + +## Default Value + +When creating a task definition with `host` network mode, the `privileged` and `user` parameters are unset by default. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html +2. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-definition.html + +## Additional Information + +- AWS recommends using the `awsvpc` network mode unless you have a specific need to use a different network mode. +- The `privileged` parameter is not supported for Windows containers or tasks using the Fargate launch type. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.10/SKILL.md new file mode 100644 index 0000000000..4798a13f23 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.10/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-aws-compute-3.10 +description: "Ensure Amazon ECS services are tagged" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, services, tagging, asset-management, compliance] +cis_id: "3.10" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.11, cis-aws-compute-3.12] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Amazon ECS services are tagged + +## Description + +Ensure all Amazon ECS services have resource tags to facilitate asset management, tracking, and compliance. + +## Rationale + +Consistent tagging supports compliance and helps identify unauthorized or misconfigured resources. + +## Impact + +There is minimal administrative overhead associated with implementing and maintaining resource tags. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. Click the name of a cluster. +4. Under `Services`, click the name of a service. +5. Click `Tags`. +6. Ensure at least one tag is listed that does not begin with `aws:`. Tags prefixed with `aws:` are AWS-managed. +7. Repeat steps 1-6 for each ECS cluster and service. + +### Using AWS CLI + +Run the following command to list clusters: + +``` +aws ecs list-clusters +``` + +Run the following command to list services in a cluster: + +``` +aws ecs list-services --cluster +``` + +Run the following command to view the tags for a service: + +``` +aws ecs list-tags-for-resource --resource-arn +``` + +Ensure that tags are returned that do not begin with `aws:`. Tags prefixed with `aws:` are AWS-managed. +Repeat for each cluster and service. + +## Expected Result + +All ECS services should have at least one user-defined tag (not prefixed with `aws:`). + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. Click the name of a cluster. +4. Under `Services`, click the name of a service. +5. Click `Tags`. +6. Click `Manage tags`. +7. Click `Add tag`. +8. Provide a `Key` and optional `Value` for the tag. +9. Click `Save`. +10. Repeat steps 1-9 for each ECS cluster and service requiring remediation. + +### Using AWS CLI + +Use the `aws ecs tag-resource` command to add tags to a service: + +``` +aws ecs tag-resource --resource-arn --tags key=,value= +``` + +## Default Value + +By default, Amazon ECS services are not tagged. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-clusters.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-services.html +4. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-tags-for-resource.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.11/SKILL.md new file mode 100644 index 0000000000..b521f11525 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.11/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-compute-3.11 +description: "Ensure Amazon ECS clusters are tagged" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, clusters, tagging, asset-management, compliance] +cis_id: "3.11" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.10, cis-aws-compute-3.12] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Amazon ECS clusters are tagged + +## Description + +Ensure all Amazon ECS clusters have resource tags to facilitate asset management, tracking, and compliance. + +## Rationale + +Consistent tagging supports compliance and helps identify unauthorized or misconfigured resources. + +## Impact + +There is minimal administrative overhead associated with implementing and maintaining resource tags. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. Click the name of a cluster. +4. Click `Tags`. +5. Ensure at least one tag is listed that does not begin with `aws:`. Tags prefixed with `aws:` are AWS-managed. +6. Repeat steps 1-5 for each ECS cluster. + +### Using AWS CLI + +Run the following command to list clusters: + +``` +aws ecs list-clusters +``` + +Run the following command to view the tags for a cluster: + +``` +aws ecs list-tags-for-resource --resource-arn +``` + +Ensure that tags are returned that do not begin with `aws:`. Tags prefixed with `aws:` are AWS-managed. +Repeat for each cluster. + +## Expected Result + +All ECS clusters should have at least one user-defined tag (not prefixed with `aws:`). + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. Click the name of a cluster. +4. Click `Tags`. +5. Click `Manage tags`. +6. Click `Add tag`. +7. Provide a `Key` and optional `Value` for the tag. +8. Click `Save`. +9. Repeat steps 1-8 for each ECS cluster requiring remediation. + +### Using AWS CLI + +Use the `aws ecs tag-resource` command to add tags to a cluster: + +``` +aws ecs tag-resource --resource-arn --tags key=,value= +``` + +## Default Value + +By default, Amazon ECS clusters have only AWS-managed tags. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-clusters.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-tags-for-resource.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.12/SKILL.md new file mode 100644 index 0000000000..028712f86a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.12/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-aws-compute-3.12 +description: "Ensure Amazon ECS task definitions are tagged" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, task-definitions, tagging, asset-management, compliance] +cis_id: "3.12" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.10, cis-aws-compute-3.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Amazon ECS task definitions are tagged + +## Description + +Ensure all Amazon ECS task definitions have resource tags to facilitate asset management, tracking, and compliance. + +Note: This recommendation assumes that only the latest active revision of a task definition is in use. If older revisions are in use, apply the audit and remediation procedures to those revisions as needed. + +## Rationale + +Consistent tagging supports compliance and helps identify unauthorized or misconfigured resources. + +## Impact + +There is minimal administrative overhead associated with implementing and maintaining resource tags. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `Tags`. +6. Ensure at least one tag is listed that does not begin with `aws:`. Tags prefixed with `aws:` are AWS-managed. +7. Repeat steps 1-6 for each ECS task definition. + +### Using AWS CLI + +Run the following command to list task definitions: + +``` +aws ecs list-task-definitions +``` + +For the latest revision, run the following command to view the tags: + +``` +aws ecs list-tags-for-resource --resource-arn +``` + +Ensure that tags are returned that do not begin with `aws:`. Tags prefixed with `aws:` are AWS-managed. +Repeat for each task definition. + +## Expected Result + +All ECS task definitions should have at least one user-defined tag (not prefixed with `aws:`). + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `Create new revision`. +6. Click `Create new revision` again. +7. Expand the `Tags` section. +8. Click `Add tag`. +9. Provide a `Key` and `Value` for the tag. +10. Click `Create`. +11. Repeat steps 1-10 for each task definition requiring remediation. + +Note: When a task definition is updated, running tasks launched from the previous task definition remain unchanged. Updating a running task requires redeploying it with the new task definition. + +### Using AWS CLI + +Use the `aws ecs tag-resource` command to add tags to a task definition: + +``` +aws ecs tag-resource --resource-arn --tags key=,value= +``` + +## Default Value + +By default, Amazon ECS task definitions are not tagged. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-task-definitions.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-tags-for-resource.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.13/SKILL.md new file mode 100644 index 0000000000..058cb6cf8f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.13/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-compute-3.13 +description: "Ensure only trusted images are used with Amazon ECS" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, task-definitions, trusted-images, supply-chain, container-security] +cis_id: "3.13" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.4, cis-aws-compute-3.5, cis-aws-compute-3.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure only trusted images are used with Amazon ECS + +## Description + +Ensure that only trusted container images from verified sources or private repositories are used with Amazon ECS to maintain the integrity and security of workloads. + +Note: This recommendation assumes that only the latest active revision of a task definition is in use. If older revisions are in use, apply the audit and remediation procedures to those revisions as needed. + +## Rationale + +Using trusted images reduces the risk of vulnerabilities, malware, or unauthorized modifications compromising ECS tasks. + +## Impact + +Minor costs for scanning, storage, and administrative effort to enforce policies and manage approved images. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `JSON`. +6. For each element under `containerDefinitions`, ensure that `image` is set to an image trusted by your organization. +7. Repeat steps 1-6 for each task definition. + +### Using AWS CLI + +Run the following command to list task definitions: + +``` +aws ecs list-task-definitions +``` + +For the latest revision of a task definition, run the following command: + +``` +aws ecs describe-task-definition --task-definition --query 'taskDefinition.containerDefinitions[*].image' +``` + +Ensure that the command returns only images trusted by your organization. +Repeat for each task definition. + +## Expected Result + +All container images referenced in task definitions should be from trusted sources (e.g., private ECR repositories, verified Docker Hub images, or organization-approved registries). + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `Create new revision`. +6. Click `Create new revision with JSON`. +7. For each element under `containerDefinitions`, set `image` to an appropriate image trusted by your organization. +8. Repeat steps 1-7 for each task definition requiring remediation. + +Note: When a task definition is updated, running tasks launched from the previous task definition remain unchanged. Updating a running task requires redeploying it with the new task definition. + +### Using AWS CLI + +No specific CLI remediation provided. Register a new task definition revision with trusted images using `aws ecs register-task-definition`. + +## Default Value + +No default value. The image must be specified when creating a task definition. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-considerations.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-task-definitions.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-definition.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.2 Ensure Authorized Software is Currently Supported | x | x | x | +| v7 | 2.2 Ensure Software is Supported by Vendor | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.14/SKILL.md new file mode 100644 index 0000000000..544bde88bd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.14/SKILL.md @@ -0,0 +1,92 @@ +--- +name: cis-aws-compute-3.14 +description: "Ensure 'assignPublicIp' is set to 'DISABLED' for Amazon ECS task sets" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, task-sets, networking, public-ip] +cis_id: "3.14" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'assignPublicIp' is set to 'DISABLED' for Amazon ECS task sets + +## Description + +Ensure that `assignPublicIp` is set to `DISABLED` for Amazon ECS task sets, to prevent task sets from being publicly accessible. + +## Rationale + +Enabling public IP assignment could expose task sets to unintended or unauthorized access. + +## Impact + +Disabling `assignPublicIp` introduces administrative, operational, and potential cost overhead due to the need to configure and maintain private networking and associated resources. + +## Audit Procedure + +### Using AWS Console + +No specific console audit steps provided. Use the CLI audit procedure below. + +### Using AWS CLI + +Run the following command to list clusters: + +``` +aws ecs list-clusters +``` + +Run the following command to list services in a cluster: + +``` +aws ecs list-services --cluster +``` + +Run the following command to view the task sets for a service: + +``` +aws ecs describe-task-sets --cluster --service +``` + +For each task set, under `networkConfiguration` > `awsvpcConfiguration`, ensure `assignPublicIp` is set to `DISABLED`. +Repeat for each cluster and service. + +## Expected Result + +`assignPublicIp` should be set to `DISABLED` under `networkConfiguration` > `awsvpcConfiguration` for all ECS task sets. + +## Remediation + +### Using AWS Console + +No specific console remediation steps provided. Use the CLI or update the service/task set configuration directly. + +### Using AWS CLI + +No specific CLI remediation command provided. Task sets are typically managed through service deployments. Update the service configuration to ensure new task sets use `assignPublicIp` set to `DISABLED`. + +## Default Value + +By default, `assignPublicIp` is set to `ENABLED`. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-sets.html +2. https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskSet.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.2/SKILL.md new file mode 100644 index 0000000000..4a618d09c1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.2/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-compute-3.2 +description: "Ensure 'assignPublicIp' is set to 'DISABLED' for Amazon ECS services" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, networking, public-ip, services] +cis_id: "3.2" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.14] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'assignPublicIp' is set to 'DISABLED' for Amazon ECS services + +## Description + +Ensure that `assignPublicIp` is set to `DISABLED` for Amazon ECS services, to restrict direct exposure of containers to the public internet. + +## Rationale + +Enabling public IP assignment could expose container application servers to unintended or unauthorized access. + +## Impact + +Disabling `assignPublicIp` introduces administrative, operational, and potential cost overhead due to the need to configure and maintain private networking and associated resources. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. Click the name of a cluster. +4. Under `Services`, click the name of a service. +5. Click `Configuration and networking`. +6. Under `Network configuration`, ensure `Auto-assign public IP` is set to `Turned off`. +7. Repeat steps 1-6 for each ECS cluster and service. + +### Using AWS CLI + +Run the following command to list clusters: + +``` +aws ecs list-clusters +``` + +Run the following command to list services in a cluster: + +``` +aws ecs list-services --cluster +``` + +Run the following command to view the details of a service: + +``` +aws ecs describe-services --cluster --services +``` + +Under `networkConfiguration` > `awsvpcConfiguration`, ensure `assignPublicIp` is set to `DISABLED`. +Repeat for each cluster and service. + +## Expected Result + +`assignPublicIp` should be set to `DISABLED` under `networkConfiguration` > `awsvpcConfiguration` for all ECS services. + +## Remediation + +### Using AWS Console + +No specific console remediation steps provided. Use the CLI remediation below. + +### Using AWS CLI + +For each service requiring remediation, run the following command to set `assignPublicIp` to `DISABLED`: + +``` +aws ecs update-service --cluster --service --network-configuration '{"awsvpcConfiguration":{"subnets":[""],"securityGroups":[""],"assignPublicIp":"DISABLED"}}' +``` + +## Default Value + +By default, `assignPublicIp` is set to `ENABLED`. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-clusters.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-services.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-services.html +4. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/update-service.html +5. https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_AwsVpcConfiguration.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.3/SKILL.md new file mode 100644 index 0000000000..01e7f7fabb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.3/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-compute-3.3 +description: "Ensure Amazon ECS task definitions do not have 'pidMode' set to 'host'" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, task-definitions, pid-namespace, isolation] +cis_id: "3.3" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.1, cis-aws-compute-3.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Amazon ECS task definitions do not have 'pidMode' set to 'host' + +## Description + +A process ID (PID) namespace isolates processes, preventing system processes from being visible to containers and allowing for PID reuse. Ensure that Amazon ECS task definitions are not configured to share a host's process namespace with their containers. + +Note: This recommendation assumes that only the latest active revision of a task definition is in use. If older revisions are in use, apply the audit and remediation procedures to those revisions as needed. + +## Rationale + +Setting the `pidMode` parameter to `host` shares the host's PID namespace with containers, allowing them to view and interact with all host processes. This reduces isolation and may lead to unauthorized access and manipulation of host processes by malicious or compromised containers. + +## Impact + +There may be some administrative effort required to ensure Amazon ECS applications function as expected without host PID mode. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `JSON`. +6. If the `pidMode` parameter is present, ensure it is not set to `host`. +7. Repeat steps 1-6 for each task definition. + +### Using AWS CLI + +Run the following command to list task definitions: + +``` +aws ecs list-task-definitions +``` + +For the latest revision of a task definition, run the following command: + +``` +aws ecs describe-task-definition --task-definition --query 'taskDefinition.pidMode' +``` + +Ensure that the command does not return `"host"`. +Repeat for each task definition. + +## Expected Result + +The `pidMode` parameter should not be set to `host` for any task definition. + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `Create new revision`. +6. Click `Create new revision with JSON`. +7. Set `pidMode` to `task`, or remove the `pidMode` parameter as appropriate. +8. Click `Create`. +9. Repeat steps 1-8 for each task definition requiring remediation. + +Note: When a task definition is updated, running tasks launched from the previous task definition remain unchanged. Updating a running task requires redeploying it with the new task definition. + +### Using AWS CLI + +No specific CLI remediation provided. Register a new task definition revision with corrected `pidMode` setting using `aws ecs register-task-definition`. + +## Default Value + +If no value is specified, the default is a private namespace for each container. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-task-definitions.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-definition.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.1 Establish and Maintain a Secure Configuration Process | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.4/SKILL.md new file mode 100644 index 0000000000..da227c7f3f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.4/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-compute-3.4 +description: "Ensure Amazon ECS task definitions do not have 'privileged' set to 'true'" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, task-definitions, privileged, isolation] +cis_id: "3.4" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.1, cis-aws-compute-3.3, cis-aws-compute-3.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Amazon ECS task definitions do not have 'privileged' set to 'true' + +## Description + +Ensure that Amazon ECS task definitions do not grant privileged access to the host container instance. + +Note: This recommendation assumes that only the latest active revision of a task definition is in use. If older revisions are in use, apply the audit and remediation procedures to those revisions as needed. + +## Rationale + +Restricting privileged access enhances security of the host container instance by maintaining isolation and reducing the risk of privilege escalation. + +## Impact + +There may be some administrative effort required to ensure Amazon ECS applications function as expected without privileged access. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `JSON`. +6. For each element under `containerDefinitions`, ensure that `privileged` is set to `false` or is absent. +7. Repeat steps 1-6 for each task definition. + +### Using AWS CLI + +Run the following command to list task definitions: + +``` +aws ecs list-task-definitions +``` + +For the latest revision of a task definition, run the following command: + +``` +aws ecs describe-task-definition --task-definition --query 'taskDefinition.containerDefinitions[*].privileged' +``` + +Ensure that the command does not return `true`. +Repeat for each task definition. + +## Expected Result + +The `privileged` parameter should be `false` or absent for all containers in all task definitions. + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `Create new revision`. +6. Click `Create new revision with JSON`. +7. For each element under `containerDefinitions`, set `privileged` to `false`, or remove `"privileged": true`. +8. Click `Create`. +9. Repeat steps 1-8 for each task definition requiring remediation. + +Note: When a task definition is updated, running tasks launched from the previous task definition remain unchanged. Updating a running task requires redeploying it with the new task definition. + +### Using AWS CLI + +No specific CLI remediation provided. Register a new task definition revision with corrected `privileged` setting using `aws ecs register-task-definition`. + +## Default Value + +By default, `privileged` is set to `false`. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-task-definitions.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-definition.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.5/SKILL.md new file mode 100644 index 0000000000..de09903348 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.5/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-compute-3.5 +description: "Ensure 'readonlyRootFilesystem' is set to 'true' for Amazon ECS task definitions" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, task-definitions, filesystem, read-only] +cis_id: "3.5" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.4, cis-aws-compute-3.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'readonlyRootFilesystem' is set to 'true' for Amazon ECS task definitions + +## Description + +Ensure the `readonlyRootFilesystem` parameter is enabled in Amazon ECS task definitions to restrict write access to the filesystem. + +Note: This recommendation assumes that only the latest active revision of a task definition is in use. If older revisions are in use, apply the audit and remediation procedures to those revisions as needed. + +## Rationale + +Enabling `readonlyRootFilesystem` minimizes security risks by ensuring the container's filesystem cannot be altered unless specific read-write permissions are granted. + +## Impact + +There may be some administrative effort required to ensure Amazon ECS applications function as expected with a read-only root filesystem. Applications that need to write to the filesystem will require volume mounts or tmpfs mounts. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `JSON`. +6. For each element under `containerDefinitions`, ensure `readonlyRootFilesystem` is set to `true`. +7. Repeat steps 1-6 for each task definition. + +### Using AWS CLI + +Run the following command to list task definitions: + +``` +aws ecs list-task-definitions +``` + +For the latest revision of a task definition, run the following command: + +``` +aws ecs describe-task-definition --task-definition --query 'taskDefinition.containerDefinitions[*].readonlyRootFilesystem' +``` + +Ensure that the command returns only `true`. +Repeat for each task definition. + +## Expected Result + +The `readonlyRootFilesystem` parameter should be set to `true` for all containers in all task definitions. + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `Create new revision`. +6. Click `Create new revision with JSON`. +7. For each element under `containerDefinitions`, set `readonlyRootFilesystem` to `true`. +8. Click Create. +9. Repeat steps 1-8 for each task definition requiring remediation. + +Note: When a task definition is updated, running tasks launched from the previous task definition remain unchanged. Updating a running task requires redeploying it with the new task definition. + +### Using AWS CLI + +No specific CLI remediation provided. Register a new task definition revision with corrected `readonlyRootFilesystem` setting using `aws ecs register-task-definition`. + +## Default Value + +By default, `readonlyRootFilesystem` is set to `false`. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-task-definitions.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-definition.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.1 Establish and Maintain a Secure Configuration Process | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.6/SKILL.md new file mode 100644 index 0000000000..ada2a93dff --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.6/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-aws-compute-3.6 +description: "Ensure secrets are not passed as container environment variables in Amazon ECS task definitions" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, task-definitions, secrets, environment-variables, credentials] +cis_id: "3.6" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.5, cis-aws-compute-3.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure secrets are not passed as container environment variables in Amazon ECS task definitions + +## Description + +Ensure that sensitive secrets, such as `AWS_ACCESS_KEY_ID`, are not passed as environment variables in Amazon ECS task definitions. Use more secure methods, such as secrets management services like AWS Secrets Manager or AWS Systems Manager Parameter Store, to inject these credentials into containers. + +Note: This recommendation assumes that only the latest active revision of a task definition is in use. If older revisions are in use, apply the audit and remediation procedures to those revisions as needed. + +## Rationale + +Passing secrets as environment variables exposes them to potential compromise, as they can be easily accessed by any process running within the container or by unauthorized users. This practice can lead to the unintended leakage of sensitive information. + +## Impact + +There is some administrative overhead involved in configuring and integrating secrets management solutions. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `JSON`. +6. For each element under `containerDefinitions`, ensure that the `environment` parameter does not contain `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `ECS_ENGINE_AUTH_DATA`. +7. Repeat steps 1-6 for each task definition. + +### Using AWS CLI + +Run the following command to list task definitions: + +``` +aws ecs list-task-definitions +``` + +For the latest revision of a task definition, run the following command: + +``` +aws ecs describe-task-definition --task-definition --query 'taskDefinition.containerDefinitions[*].environment[*].name' +``` + +Ensure that the command does not contain `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `ECS_ENGINE_AUTH_DATA`. +Repeat for each task definition. + +## Expected Result + +No container environment variables should contain `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `ECS_ENGINE_AUTH_DATA`. + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `Create new revision`. +6. Click `Create new revision with JSON`. +7. For each element under `containerDefinitions`, in the `environment` parameter, remove any objects with a `name` matching `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or `ECS_ENGINE_AUTH_DATA`. +8. Click `Create`. +9. Repeat steps 1-8 for each task definition requiring remediation. + +Note: When a task definition is updated, running tasks launched from the previous task definition remain unchanged. Updating a running task requires redeploying it with the new task definition. + +### Using AWS CLI + +No specific CLI remediation provided. Register a new task definition revision with secrets removed from environment variables using `aws ecs register-task-definition`. + +## Default Value + +By default, secrets are not present as container environment variables in task definitions. + +## References + +1. https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html +2. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-task-definitions.html +4. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-definition.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.1 Establish and Maintain a Data Management Process | | x | x | +| v8 | 3.2 Establish and Maintain a Data Inventory | x | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | +| v7 | 16.5 Encrypt Transmittal of Username and Authentication Credentials | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.7/SKILL.md new file mode 100644 index 0000000000..51f26d96b5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.7/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-compute-3.7 +description: "Ensure logging is configured for Amazon ECS task definitions" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, task-definitions, logging, monitoring] +cis_id: "3.7" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure logging is configured for Amazon ECS task definitions + +## Description + +Configure logging for Amazon ECS task definitions to capture detailed application and container activity. + +Note: This recommendation assumes that only the latest active revision of a task definition is in use. If older revisions are in use, apply the audit and remediation procedures to those revisions as needed. + +## Rationale + +Logging facilitates effective monitoring, troubleshooting, and incident response, improving security and enabling rapid threat detection. + +## Impact + +Logging can incur costs for storage and processing, along with initial configuration and ongoing management. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `JSON`. +6. Ensure that at least one element under `containerDefinitions` has a `logConfiguration` property defined, and that the value for `logDriver` is not `null`. +7. Repeat steps 1-6 for each task definition. + +### Using AWS CLI + +Run the following command to list task definitions: + +``` +aws ecs list-task-definitions +``` + +For the latest revision of a task definition, run the following command: + +``` +aws ecs describe-task-definition --task-definition --query 'taskDefinition.containerDefinitions[*].logConfiguration' +``` + +Ensure that the command returns at least one `logConfiguration` object, and that the value for `logDriver` is not `null`. +Repeat for each task definition. + +## Expected Result + +At least one container in each task definition should have a `logConfiguration` with a valid `logDriver` configured. + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Task definitions`. +3. Click the name of a task definition. +4. Click on the latest active revision of the task definition. +5. Click `Create new revision`. +6. Click `Create new revision` again. +7. For at least one container, under `Logging` > `Log collection`, check the box next to `Use log collection` and further configure the log collection options as needed. +8. Click Create. +9. Repeat steps 1-8 for each task definition requiring remediation. + +Note: When a task definition is updated, running tasks launched from the previous task definition remain unchanged. Updating a running task requires redeploying it with the new task definition. + +### Using AWS CLI + +No specific CLI remediation provided. Register a new task definition revision with `logConfiguration` configured using `aws ecs register-task-definition`. + +## Default Value + +Logging is enabled by default when a task definition is created via the console. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.htm +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-task-definitions.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-definition.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.8/SKILL.md new file mode 100644 index 0000000000..2688e88283 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.8/SKILL.md @@ -0,0 +1,115 @@ +--- +name: cis-aws-compute-3.8 +description: "Ensure Amazon ECS Fargate services are using the latest Fargate platform version" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, fargate, platform-version, patching] +cis_id: "3.8" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.2, cis-aws-compute-3.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Amazon ECS Fargate services are using the latest Fargate platform version + +## Description + +Ensure that Amazon ECS Fargate services use the latest Fargate platform version to benefit from the latest security enhancements, performance improvements, and feature updates. + +## Rationale + +Using the latest Fargate platform version ensures services benefit from up-to-date security patches and features. + +## Impact + +Updating to the latest Fargate platform version may require minor operational effort. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. Click the name of a cluster. +4. Under `Services`, from the `Filter launch type` drop-down menu, select `FARGATE`. +5. Click the name of a service. +6. Click `Configuration and networking`. +7. Under `Service configuration`, ensure `Platform version` is set to `1.4.0` or `LATEST` for Linux, or `1.0.0` or `LATEST` for Windows. +8. Repeat steps 1-7 for each ECS cluster and Fargate service. + +### Using AWS CLI + +Run the following command to list clusters: + +``` +aws ecs list-clusters +``` + +Run the following command to list services in a cluster: + +``` +aws ecs list-services --cluster +``` + +Run the following command to view the details of a service: + +``` +aws ecs describe-services --cluster --services --query 'services[*].[platformFamily,platformVersion]' --output table +``` + +Where `platformFamily` is `Linux`, ensure `platformVersion` is `1.4.0` or `LATEST`. +Where `platformFamily` is `Windows`, ensure `platformVersion` is `1.0.0` or `LATEST`. +Repeat for each cluster and service. + +## Expected Result + +All Fargate services should be using platform version `1.4.0`/`LATEST` (Linux) or `1.0.0`/`LATEST` (Windows). + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. Click the name of a cluster. +4. Under `Services`, from the `Filter launch type` drop-down menu, select `FARGATE`. +5. Click the name of a service. +6. Click `Update service`. +7. Expand the `Compute configuration (advanced)` section. +8. Under `Platform version`, select `LATEST` from the drop-down menu. +9. Click `Update`. +10. Repeat steps 1-9 for each ECS cluster and Fargate service requiring remediation. + +### Using AWS CLI + +For each service requiring remediation, run the following command to set `platformVersion` to `LATEST`: + +``` +aws ecs update-service --cluster --service --platform-version LATEST +``` + +## Default Value + +The platform version for Fargate services is `LATEST` by default. + +## References + +1. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform-fargate.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-clusters.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-services.html +4. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-services.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.2 Ensure Authorized Software is Currently Supported | x | x | x | +| v7 | 2.2 Ensure Software is Supported by Vendor | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.9/SKILL.md new file mode 100644 index 0000000000..aaaec8dac8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-3.9/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-aws-compute-3.9 +description: "Ensure monitoring is enabled for Amazon ECS clusters" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, ecs, containers, monitoring, cloudwatch, container-insights, clusters] +cis_id: "3.9" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-3.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure monitoring is enabled for Amazon ECS clusters + +## Description + +Enable AWS CloudWatch Container Insights for Amazon ECS clusters to monitor resource usage, performance, and application health through metrics and logs. + +## Rationale + +Monitoring ECS clusters with Container Insights improves visibility, supports faster issue detection, and enhances security by identifying anomalies and resource bottlenecks. + +## Impact + +Enabling AWS CloudWatch Container Insights for ECS clusters incurs costs for metrics, log ingestion, storage, and alarms. + +## Audit Procedure + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. For each cluster listed in the `CloudWatch monitoring` column, ensure that `Container Insights` is displayed. + +### Using AWS CLI + +Run the following command to list clusters: + +``` +aws ecs list-clusters +``` + +Run the following command to view the settings for a cluster: + +``` +aws ecs describe-clusters --clusters --include SETTINGS --query 'clusters[*].settings' +``` + +Ensure `containerInsights` is set to `enabled` or `enhanced`. + +## Expected Result + +`containerInsights` should be set to `enabled` or `enhanced` for all ECS clusters. + +## Remediation + +### Using AWS Console + +1. Login to the ECS console using https://console.aws.amazon.com/ecs/. +2. In the left panel, click `Clusters`. +3. Click the name of a cluster. +4. Click `Update cluster`. +5. Under `Monitoring`, select the radio button next to `Container Insights` or `Container Insights with enhanced observability`. +6. Click `Update`. +7. Repeat steps 1-6 for each ECS cluster requiring remediation. + +### Using AWS CLI + +For each cluster requiring remediation, run the following command to enable `containerInsights`: + +``` +aws ecs update-cluster-settings --cluster --settings name=containerInsights,value=enabled +``` + +## Default Value + +Monitoring is disabled by default for Amazon ECS clusters. + +## References + +1. https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContainerInsights.html +2. https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/container-insights-detailed-ecs-metrics.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.1/SKILL.md new file mode 100644 index 0000000000..623aa637c4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.1/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-compute-5.1 +description: "Apply updates to any apps running in Lightsail" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, patching, updates, applications] +cis_id: "5.1" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.11] +prerequisites: [] +severity_boost: {} +--- + +# 5.1 Apply updates to any apps running in Lightsail (Manual) + +## Description + +Amazon Lightsail is a virtual private server (VPS) provider and is the easiest way to get started with AWS for developers, small businesses, students, and other users who need a solution to build and host their applications on cloud. + +## Rationale + +Lightsail offers a range of operating system and application templates that are automatically installed when you create a new Lightsail instance. Application templates include WordPress, Drupal, Joomla!, Ghost, Magento, Redmine, LAMP, Nginx (LEMP), MEAN, Node.js, Django, and more. You can install additional software on your instances by using the in-browser SSH or your own SSH client. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +To confirm that you are running the latest version of the application you are using is a manual process. Often dependent on the application itself and the operating system you are utilizing for the Lightsail instance. + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Instance` you want to review. +5. Make sure the instance status is `running`. +6. Connect to the `instance`. +7. Depending on the instance OS and the application you are running determine what version it is and if there are any updates. +8. If there are updates refer to the remediation below. +9. Repeat steps no. 4 - 8 to verify if any Lightsail instances require application updates. + +### Using AWS CLI + +N/A - This is a manual process dependent on the application and OS. + +## Expected Result + +All applications running on Lightsail instances should be running the latest stable version with all security patches applied. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Instance` you want to update. +5. Make sure the instance status is `running`. +6. Click on `Snapshots` +7. Under `Manual snapshots` click on `+ Create snapshot` +8. Give it a name you will recognize +9. Click on `create` + +While in process it will show 'Snapshotting...' + +10. Once the date and time and snapshot name appears it is completed. +11. Click on `Connect` +12. Run the updates for the application discovered above in the Audit. +13. Repeat steps no. 4 - 12 to apply any application updates required on the Lightsail instances that you are running. + +### Using AWS CLI + +N/A - This is a manual process dependent on the application and OS. + +## Default Value + +Applications are installed with the version available at instance creation time. Updates are not applied automatically. + +## References + +1. https://lightsail.aws.amazon.com/ls/docs/en_us/overview +2. https://aws.amazon.com/lightsail/features/?opdp2=features/?pg=ln&sec=hs + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 7.4 Perform Automated Application Patch Management - Perform application updates on enterprise assets through automated patch management on a monthly, or more frequent, basis. | x | x | x | +| v7 | 3.5 Deploy Automated Software Patch Management Tools - Deploy automated software update tools in order to ensure that third-party software on all systems is running the most recent security updates provided by the software vendor. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.10/SKILL.md new file mode 100644 index 0000000000..ea9d122811 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.10/SKILL.md @@ -0,0 +1,91 @@ +--- +name: cis-aws-compute-5.10 +description: "Enable storage bucket access logging" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, buckets, logging, access-logs, monitoring] +cis_id: "5.10" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.8, cis-aws-compute-5.9] +prerequisites: [] +severity_boost: {} +--- + +# 5.10 Enable storage bucket access logging (Manual) + +## Description + +Access logging provides detailed records for the requests that are made to this bucket. This information can include the request type, the resources that are specified in the request, and the time and date that the request was processed. Access logs are useful for many applications. + +## Rationale + +Access log information is useful in security and access audits. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select `Storage`. +5. All Lightsail buckets are listed here. +6. Click on a bucket name +7. Click `Logging`. +8. Confirm that Access logging is set to active. If it is set to inactive refer to the remediation below. + +### Using AWS CLI + +N/A - Bucket access logging status is managed through the AWS Console. + +## Expected Result + +Access logging should be set to active for all Lightsail storage buckets. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select `Storage`. +5. All Lightsail buckets are listed here. +6. Click on a bucket name +7. Click `Logging`. +8. Click on the X next to `Access logging is inactive` +9. Select a different bucket specific to store the logging information. +10. Note the path or create a path that matches your organization style. +11. Click save +12. Click OK +13. Repeat steps 6-12 for all Lightsail buckets. + +### Using AWS CLI + +N/A - Bucket access logging is managed through the AWS Console. + +## Default Value + +Access logging is inactive by default for Lightsail storage buckets. + +## References + +1. https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-enabling-bucket-access-logs + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | x | x | x | +| v7 | 6.2 Activate audit logging - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.11/SKILL.md new file mode 100644 index 0000000000..15ca3955c3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.11/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-aws-compute-5.11 +description: "Ensure your Windows Server based lightsail instances are updated with the latest security patches" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, windows, patching, security-updates, windows-update] +cis_id: "5.11" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.1, cis-aws-compute-5.12] +prerequisites: [] +severity_boost: {} +--- + +# 5.11 Ensure your Windows Server based lightsail instances are updated with the latest security patches (Manual) + +## Description + +Windows server based Lightsail instances are still managed by the consumer and any security updates or patches have to be installed and maintained by the user. + +## Rationale + +Windows Server-based Lightsail instances need to be updated with the latest security patches so they are not vulnerable to attacks. Be sure your server is configured to download and install updates. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Windows Instance` you want to review. +5. Make sure the instance status is `running`. +6. Connect to the `instance` using `Connect using RDP`. +7. Log in using the credentials you have set for this instance. +8. Open a command prompt +9. Type sconfig, and then press Enter. + +``` +Windows Update Settings are at number 5 and by default are set to Automatic. +``` + +If this is the current setting continue with step 10. If this is not the current setting refer to the remediation below and start at step 10. + +10. To determine if any updates are required, type 6, and then press Enter. +11. Type A to search for (A)ll updates in the new command window, and then press Enter. + +If any updates are required refer to the remediation below and start at step 14. + +### Using AWS CLI + +N/A - This is a manual process requiring RDP connection to the Windows instance. + +## Expected Result + +Windows Update Settings should be set to Automatic (number 5 in sconfig), and all available security patches should be installed. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Windows Instance` you want to review. +5. Make sure the instance status is `running`. +6. Connect to the `instance` using `Connect using RDP`. +7. Log in using the credentials you have set for this instance. +8. Open a command prompt +9. Type sconfig, and then press Enter. + +``` +Windows Update Settings are at number 5 and by default are set to Automatic. +``` + +If this is not the current setting continue with step 10. If this is the current setting skip to step 12 + +10. Type 5, and then press Enter. +11. Type A for `Automatic` and then press Enter. Wait until the setting is saved and you return back to the server configuration menu. +12. Type 6, and then press Enter. +13. Type A to search for (A)ll updates in the new command window, and then press Enter. +14. Type A again to install (A)ll updates, and then press Enter. + +When finished, you see a message with the installation results and more instructions (if those apply). + +### Using AWS CLI + +N/A - This is a manual process requiring RDP connection to the Windows instance. + +## Default Value + +Windows Update Settings are at number 5 and by default are set to Automatic. + +## References + +N/A + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 7.4 Perform Automated Application Patch Management - Perform application updates on enterprise assets through automated patch management on a monthly, or more frequent, basis. | x | x | x | +| v7 | 3.5 Deploy Automated Software Patch Management Tools - Deploy automated software update tools in order to ensure that third-party software on all systems is running the most recent security updates provided by the software vendor. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.12/SKILL.md new file mode 100644 index 0000000000..0ff4afe8b7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.12/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-aws-compute-5.12 +description: "Change the auto-generated password for Windows based instances" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, windows, passwords, rdp, authentication, credentials] +cis_id: "5.12" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.2, cis-aws-compute-5.5, cis-aws-compute-5.11] +prerequisites: [] +severity_boost: {} +--- + +# 5.12 Change the auto-generated password for Windows based instances (Manual) + +## Description + +When you create a Windows Server-based instance, Lightsail randomly generates a long password that is hard to guess. You use this password uniquely with your new instance. You can use the default password to connect quickly to your instance using remote desktop (RDP). You are always logged in as the Administrator on your Lightsail instance. + +## Rationale + +Like any password it should be changed from the default and over time. The randomly generated password can be hard to remember and if anyone gains access to your AWS Lightsail environment they can utilize that to access your instances. For this reason you should change the password to something you can remember. + +## Impact + +If you change your password from the unique, default password, be sure to use a strong password. You should avoid passwords that are based on names or dictionary words, or repeating sequences of characters. + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Windows Instance` you want to review. +5. Make sure the instance status is `running`. +6. Connect to the `instance` using `Connect using RDP`. +7. Log in using the credentials provided within the Lightsail console set for this instance. +8. If you are successful and based on your password change policy it is required that you change/update the password refer to the remediation below. + +### Using AWS CLI + +N/A - This is a manual process requiring RDP connection to the Windows instance. + +## Expected Result + +The auto-generated default password should be changed to a strong custom password that complies with the organization's password policy. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Windows Instance` you want to review. +5. Make sure the instance status is `running`. +6. Connect to the `instance` using `Connect using RDP`. +7. Log in using the credentials provided within the Lightsail console set for this instance. +8. Use the Windows Server password manager to change your password securely by press `Ctrl + Alt + Del` +9. Then choose `Change a password`. + \*\* Be sure to keep a record of your password, because Lightsail doesn't store the new password you are setting. +10. Type in the `New Password` +11. Click `Save` + +### Using AWS CLI + +N/A - This is a manual process requiring RDP connection to the Windows instance. + +## Additional Information + +You can use either the Lightsail-generated password or your own custom password with the browser-based RDP client in Lightsail. If you use a custom password, you will be prompted for your password every time you log in. It can be easier but not necessarily more secure to use the Lightsail-generated default password with the browser-based RDP client if you want quick access to your instance. + +## Default Value + +Lightsail randomly generates a long, unique password for each Windows Server-based instance at creation time. + +## References + +N/A + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v7 | 4.2 Change Default Passwords - Before deploying any new asset, change all default passwords to have values consistent with administrative level accounts. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.2/SKILL.md new file mode 100644 index 0000000000..ee2e31bf18 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.2/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-aws-compute-5.2 +description: "Change default Administrator login names and passwords for applications" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, passwords, default-credentials, authentication] +cis_id: "5.2" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.12] +prerequisites: [] +severity_boost: {} +--- + +# 5.2 Change default Administrator login names and passwords for applications (Manual) + +## Description + +Change the default settings for the administrator login names and passwords of the application software that you install on Lightsail instances. + +## Rationale + +Default administrator login names and passwords for applications used on Lightsail instances can be used by hackers and individuals to break into your servers. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +To confirm that you have updated or changed the default administrator name and password for any application you are using is a manual process. Often dependent on the application itself and the operating system you are utilizing for the Lightsail instance. + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Instance` you want to review. +5. Make sure the instance status is `running`. +6. Connect to the `instance`. +7. Depending on the instance OS and the application you are running determine what the default administrator name is set to and what the password is. +8. If the `default administrator` username and or password is still at the default settings please refer to the remediation below. +9. Repeat steps no. 4 - 8 to verify if any Lightsail instances require application updates. + +### Using AWS CLI + +N/A - This is a manual process dependent on the application and OS. + +## Expected Result + +All applications running on Lightsail instances should have their default administrator login names and passwords changed from the defaults. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Instance` you want to update the `default administrator` settings. +5. Make sure the instance status is `running`. +6. Click on `Snapshots` +7. Under `Manual snapshots` click on `+ Create snapshot` +8. Give it a name you will recognize +9. Click on `create` + +While in process it will show Snapshotting... + +10. Once the date and time and snapshot name appears it is completed. +11. Click on `Connect` +12. Run the process to change either the `default administrator` name or password or both. +13. Repeat steps no. 4 - 12 to apply any application `default administrator` changes required on the Lightsail instances that you are running. + +### Using AWS CLI + +N/A - This is a manual process dependent on the application and OS. + +## Default Value + +Applications are installed with default administrator credentials. + +## References + +1. https://lightsail.aws.amazon.com/ls/docs/en_us/all + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v7 | 4.2 Change Default Passwords - Before deploying any new asset, change all default passwords to have values consistent with administrative level accounts. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.3/SKILL.md new file mode 100644 index 0000000000..07ed40caed --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.3/SKILL.md @@ -0,0 +1,166 @@ +--- +name: cis-aws-compute-5.3 +description: "Disable SSH and RDP ports for Lightsail instances when not needed" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, ssh, rdp, ports, firewall, networking] +cis_id: "5.3" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.4, cis-aws-compute-5.5, cis-aws-compute-5.6] +prerequisites: [] +severity_boost: {} +--- + +# 5.3 Disable SSH and RDP ports for Lightsail instances when not needed (Manual) + +## Description + +Any ports enable within Lightsail by default are open and exposed to the world. For SSH and RDP access you should remove and disable these ports when not is use. + +## Rationale + +Any ports enable within Lightsail by default are open and exposed to the world. This can result in outside traffic trying to access or even deny access to the Lightsail instances. Removing and disabling a protocol when not in use even if restricted by IP address is the safest solution especially when it is not required for access. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Windows or Linux Instance` you want to review. +5. Go to the Networking section. +6. If it is a Windows instance confirm that SSH has been removed. If it is a Linux instance confirm RDP has been removed. +7. If either still exists in the IPV4 Firewall list refer to the remediation below. +8. If the server needs HTTP, TCP Port 80 confirm that the application forwards Port 80 to HTTPS, TCP Port 443. +9. If the server does not need HTTP refer to the remediation below. +10. Confirm that there are no other unused or unneeded ports. +11. If the system has other ports that are not required or in use refer to the remediation below. + +### Using AWS CLI + +1. Run `aws lightsail get-instances` + +```bash +aws lightsail get-instances --query "instances[*].name" +``` + +This command will provide a list of Instance names. + +2. Run `aws lightsail get-instance-port-states` for each instance listed above + +```bash +aws lightsail get-instance-port-states --instance-name +``` + +This command will provide a list of available Ports for the Instance name. + +Example output: + +```json +"portStates": [ + { + "fromPort": 80, + "toPort": 80, + "protocol": "tcp", + "state": "open", + "cidrs": [ + "0.0.0.0/0" + ], + "cidrListAliases": [] + }, + { + "fromPort": 22, + "toPort": 22, + "protocol": "tcp", + "state": "open", + "cidrs": [ + "0.0.0.0/0" + ], + "cidrListAliases": [] + }, + { + "fromPort": 443, + "toPort": 443, + "protocol": "tcp", + "state": "open", + "cidrs": [ + "0.0.0.0/0" + ], + "cidrListAliases": [] + } +] +``` + +If it is a Linux host and has Port 3398 listed, HTTP Port 80 listed or any other ports listed that are not required refer to the remediation below. +If it is a Windows host and has Port 22 listed, HTTP Port 80 listed or any other ports listed that are not required refer to the remediation below. + +## Expected Result + +Only required ports should be open. SSH (22) should not be open on Windows instances, RDP (3389) should not be open on Linux instances, and HTTP (80) should only be open if properly forwarding to HTTPS (443). + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Windows or Linux Instance` you want to review. +5. Go to the Networking section. +6. If it is a Windows instance confirm that SSH has been removed. If it is a Linux instance confirm RDP has been removed. +7. If either ssh(Port 22) is in the Windows system and RDP(Port 3389) is in the Linux system click the bucket icon to delete it. +8. If the server needs HTTP, TCP Port 80 confirm that the application forwards Port 80 to HTTPS, TCP Port 443. +9. If the server does not need HTTP click the bucket icon to delete it. +10. Confirm that there are no other unused or unneeded ports. +11. If the system has other ports that are not required or in use click the bucket icon to delete it. + +### Using AWS CLI + +1. Run `aws lightsail close-instance-public-ports` + +For Windows: + +```bash +aws lightsail close-instance-public-ports --instance-name --port-info fromPort=22,protocol=TCP,toPort=22 +``` + +For Linux: + +```bash +aws lightsail close-instance-public-ports --instance-name --port-info fromPort=3389,protocol=TCP,toPort=3389 +``` + +For HTTP: + +```bash +aws lightsail close-instance-public-ports --instance-name --port-info fromPort=80,protocol=TCP,toPort=80 +``` + +2. Repeat for all instance names identified in the audit that have SSH, RDP or HTTP's open and are not required based on the OS or the use of the system. + +## Default Value + +Lightsail instances are created with SSH (Port 22) and HTTP (Port 80) open by default for Linux instances, and RDP (Port 3389) and HTTP (Port 80) open by default for Windows instances. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lightsail/index.html#cli-aws-lightsail + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software - Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function. | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running - Ensure that only network ports, protocols, and services listening on a system with validated business needs, are running on each system. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.4/SKILL.md new file mode 100644 index 0000000000..2985e18cb5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.4/SKILL.md @@ -0,0 +1,157 @@ +--- +name: cis-aws-compute-5.4 +description: "Ensure SSH is restricted to only IP address that should have this access" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, ssh, ip-restriction, access-control, firewall] +cis_id: "5.4" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.3, cis-aws-compute-5.5, cis-aws-compute-5.6] +prerequisites: [] +severity_boost: {} +--- + +# 5.4 Ensure SSH is restricted to only IP address that should have this access (Manual) + +## Description + +Any ports enable within Lightsail by default are open and exposed to the world. For SSH and RDP access you should identify which IP address need access. + +## Rationale + +Any ports enable within Lightsail by default are open and exposed to the world. This can result in outside traffic trying to access or even deny access to the Lightsail instances. Removing and adding approved IP address required for access. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Linux Instance` you want to review. +5. Go to the Networking section. +6. Confirm that the SSH Port is restricted to an IP address + +| Application | Protocol | Port or range / Code | Restricted to | +| ----------- | -------- | -------------------- | ------------- | +| SSH | TCP | 22 | 101.221.11.11 | + +7. If SSH is needed and it is open to `Any IPv4 address` refer to the remediation below. + +### Using AWS CLI + +1. Run `aws lightsail get-instances` + +```bash +aws lightsail get-instances --query "instances[*].name" +``` + +This command will provide a list of Instance names. + +2. Run `aws lightsail get-instance-port-states` for any Linux instances listed + +```bash +aws lightsail get-instance-port-states --instance-name +``` + +This command will provide a list of available Ports for the Instance name. + +```json +{ + "fromPort": 22, + "toPort": 22, + "protocol": "tcp", + "state": "open", + "cidrs": [ + "0.0.0.0/0" + "101.221.11.11/32" + ], + "cidrListAliases": [] +}, +``` + +3. Review the Port 22 settings and confirm that the only IP Addresses that should have access to the instance are listed in the cidrs as shown above. +4. If it is open to all ports (0.0.0.0/0) of there is an IP address listed that shouldn't have access refer to the remediation below. + +## Expected Result + +SSH (Port 22) should be restricted to specific IP addresses that require access. The CIDR should not contain `0.0.0.0/0` (open to all). + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Linux Instance` you want to review. +5. Go to the Networking section. +6. Under IPv4 networking find the SSH rule as shown below. + +| Application | Protocol | Port or range / Code | Restricted to | +| ----------- | -------- | -------------------- | ---------------- | +| SSH | TCP | 22 | Any IPv4 address | + +7. Click on the edit icon +8. Click on the check box next to Restrict to IP address +9. Under `Source IP address (192.0.2.0) or range (192.0.2.0-192.0.2.255 or 192.0.2.0/24)` type the IP address' you want. + +### Using AWS CLI + +1. Run `aws lightsail put-instance-public-ports` + +```bash +aws lightsail put-instance-public-ports --instance-name --port-info fromPort=22,protocol=TCP,toPort=22,cidrs=110.111.221.100/32,110.111.221.202/32 +``` + +This command will enter the IP addresses that should have access to the instances identified above in the Audit. + +2. Run `aws lightsail get-instance-port-states` for the Linux instance to confirm the new setting. + +```bash +aws lightsail get-instance-port-states --instance-name +``` + +This command will provide a list of available Ports and show how the cidr value for Port 22 is now set. + +```json +{ + "fromPort": 22, + "toPort": 22, + "protocol": "tcp", + "state": "open", + "cidrs": [ + "110.111.221.100/32", + "110.111.221.202/32" + ], + "cidrListAliases": [] +}, +``` + +3. Repeat the remediation below for all other instances identified in the Audit. + +## Default Value + +SSH (Port 22) is open to all IPv4 addresses (0.0.0.0/0) by default on Linux Lightsail instances. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lightsail/index.html#cli-aws-lightsail + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.5/SKILL.md new file mode 100644 index 0000000000..8f3b8c5139 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.5/SKILL.md @@ -0,0 +1,158 @@ +--- +name: cis-aws-compute-5.5 +description: "Ensure RDP is restricted to only IP address that should have this access" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, rdp, ip-restriction, access-control, windows, firewall] +cis_id: "5.5" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.3, cis-aws-compute-5.4, cis-aws-compute-5.6] +prerequisites: [] +severity_boost: {} +--- + +# 5.5 Ensure RDP is restricted to only IP address that should have this access (Manual) + +## Description + +Any ports enable within Lightsail by default are open and exposed to the world. For SSH and RDP access you should identify which IP address need access. + +## Rationale + +Any ports enable within Lightsail by default are open and exposed to the world. This can result in outside traffic trying to access or even deny access to the Lightsail instances. Removing and adding approved IP address required for access. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Windows Instance` you want to review. +5. Go to the Networking section. +6. Confirm that the RDP Port is restricted to an IP address + +| Application | Protocol | Port or range / Code | Restricted to | +| ----------- | -------- | -------------------- | ------------- | +| RDP | TCP | 3389 | 101.221.11.11 | + +7. If RDP is needed and it is open to `Any IPv4 address` refer to the remediation below. + +### Using AWS CLI + +1. Run `aws lightsail get-instances` + +```bash +aws lightsail get-instances --query "instances[*].name" +``` + +This command will provide a list of Instance names. + +2. Run `aws lightsail get-instance-port-states` for any Windows instances listed + +```bash +aws lightsail get-instance-port-states --instance-name +``` + +This command will provide a list of available Ports for the Instance name. + +```json +{ + "fromPort": 3389, + "toPort": 3389, + "protocol": "tcp", + "state": "open", + "cidrs": [ + "0.0.0.0/0" + ], + "cidrListAliases": [] +}, +``` + +3. Review the Port 22 settings and confirm that the only IP Addresses that should have access to the instance are listed in the cidrs as shown above. +4. If it is open to all ports (0.0.0.0/0) of there is an IP address listed that shouldn't have access refer to the remediation below. + +## Expected Result + +RDP (Port 3389) should be restricted to specific IP addresses that require access. The CIDR should not contain `0.0.0.0/0` (open to all). + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Windows Instance` you want to review. +5. Go to the Networking section. +6. Under IPv4 networking find the SSH rule as shown below. + +| Application | Protocol | Port or range / Code | Restricted to | +| ----------- | -------- | -------------------- | ---------------- | +| RDP | TCP | 3389 | Any IPv4 address | + +7. Click on the edit icon +8. Click on the check box next to Restrict to IP address +9. Under `Source IP address (192.0.2.0) or range (192.0.2.0-192.0.2.255 or 192.0.2.0/24)` type the IP address' you want. + +### Using AWS CLI + +1. Run `aws lightsail put-instance-public-ports` + +```bash +aws lightsail put-instance-public-ports --instance-name --port-info fromPort=3389,protocol=TCP,toPort=3389,cidrs=110.111.221.100/32,110.111.221.202/32 +``` + +This command will enter the IP addresses that should have access to the instances identified above in the Audit. + +2. Run `aws lightsail get-instance-port-states` for the Windows instance to confirm the new setting. + +```bash +aws lightsail get-instance-port-states --instance-name +``` + +This command will provide a list of available Ports and show how the cidr value for Port 3389 is now set. + +```json +"portStates": [ + { + "fromPort": 3389, + "toPort": 3389, + "protocol": "tcp", + "state": "open", + "cidrs": [ + "110.111.221.100/32", + "110.111.221.202/32" + ], + "cidrListAliases": [] + } +] +``` + +3. Repeat the remediation below for all other Windows instances identified in the Audit. + +## Default Value + +RDP (Port 3389) is open to all IPv4 addresses (0.0.0.0/0) by default on Windows Lightsail instances. + +## References + +1. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lightsail/index.html#cli-aws-lightsail + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.6/SKILL.md new file mode 100644 index 0000000000..255af1cf23 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.6/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-aws-compute-5.6 +description: "Disable IPv6 Networking if not in use within your organization" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, ipv6, networking, attack-surface] +cis_id: "5.6" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.3, cis-aws-compute-5.4, cis-aws-compute-5.5] +prerequisites: [] +severity_boost: {} +--- + +# 5.6 Disable IPv6 Networking if not in use within your organization (Manual) + +## Description + +Any protocols enable within Lightsail by default that aren't being used should be disabled. + +## Rationale + +Any ports enable within Lightsail by default are open and exposed to the world. This can result in outside traffic trying to access or even deny access to the Lightsail instances. Removing and disabling a protocol when not in use even if restricted by IP address is the safest solution especially when it is not required for access. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Windows or Linux Instance` you want to review. +5. Go to the Networking section. +6. Under IPv6 networking confirm that it reads `IPv6 networking is disabled`. +7. If it reads `IPv6 networking is enabled` refer to the remediation below. + +### Using AWS CLI + +N/A - This setting is managed through the AWS Console. + +## Expected Result + +IPv6 networking should be disabled on Lightsail instances when not in use within the organization. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select the `Windows or Linux Instance` you want to review. +5. Go to the Networking section. +6. Under IPv6 networking click on the check mark next to `IPv6 networking is enabled`. +7. In the `Disable IPv6 for this instance?` +8. Click on `Yes, disable` + +### Using AWS CLI + +N/A - This setting is managed through the AWS Console. + +## Default Value + +IPv6 networking is enabled by default on new Lightsail instances. + +## References + +N/A + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software - Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function. | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running - Ensure that only network ports, protocols, and services listening on a system with validated business needs, are running on each system. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.7/SKILL.md new file mode 100644 index 0000000000..1083c9d976 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.7/SKILL.md @@ -0,0 +1,143 @@ +--- +name: cis-aws-compute-5.7 +description: "Ensure you are using an IAM policy to manage access to buckets in Lightsail" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, iam, buckets, policy, access-control, s3] +cis_id: "5.7" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.8, cis-aws-compute-5.9] +prerequisites: [] +severity_boost: {} +--- + +# 5.7 Ensure you are using an IAM policy to manage access to buckets in Lightsail (Manual) + +## Description + +The following policy grants a user access to manage a specific bucket in the Amazon Lightsail object storage service. + +## Rationale + +This policy grants access to buckets through the Lightsail console, the AWS Command Line Interface (AWS CLI), AWS API, and AWS SDKs. + +## Impact + +Users who don't have this policy will experience errors when viewing the Objects tab of the bucket management page in the Lightsail console. + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `IAM` under Security, Identity, & Compliance. +3. Click `Policies` +4. Click in the `Filter policies by property or policy name and press enter` +5. Type `Lightsail` and press enter +6. Click on the policy that contains lightsail in the name +7. Make sure the `Permissions` tab is selected. +8. Confirm the policy looks like this + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "LightsailAccess", + "Effect": "Allow", + "Action": "lightsail:*", + "Resource": "*" + }, + { + "Sid": "S3BucketAccess", + "Effect": "Allow", + "Action": "s3:*", + "Resource": ["arn:aws:s3:::/*", "arn:aws:s3:::"] + } + ] +} +``` + +9. If this policy is in place move to the next step. If it is not in any of the policies listed for `lightsail` refer to the remediation below. +10. Click on the `Policy usage` tab +11. Confirm that the correct Group and/or User is listed under Permissions. If there is no one listed here refer to the remediation below. + +### Using AWS CLI + +N/A - This is managed through the AWS Console IAM Policies. + +## Expected Result + +An IAM policy should exist that grants Lightsail and S3 bucket access, and it should be attached to the appropriate users or groups. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `IAM` under Security, Identity, & Compliance. +3. Click `Policies` +4. Click `Create policy` +5. Click on the `JSON` tab +6. Copy and paste the policy below into the JSON editor replacing the text in there and filling in the Lightsail bucket names. + \*\*You can find the Lightsail bucket name in the Lightsail console, Storage, Under buckets. + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "LightsailAccess", + "Effect": "Allow", + "Action": "lightsail:*", + "Resource": "*" + }, + { + "Sid": "S3BucketAccess", + "Effect": "Allow", + "Action": "s3:*", + "Resource": ["arn:aws:s3:::/*", "arn:aws:s3:::"] + } + ] +} +``` + +7. Click `Next tags` +8. Add tags based on your companies outlined Tagging policy that should be in place based on the AWS Foundations Benchmark. +9. Click `Next review` +10. Click in `Name*` and give it a name that contains "Lightsail" +11. Review the summary. +12. Click `Create policy` +13. Click in the `Filter policies by property or policy name and press enter` +14. Type `Lightsail` and press enter +15. Click on the Policy name that you just created. +16. Click on the `Policy usage` tab +17. Click `Attach` +18. Add in the Users or Group that should have this permission. +19. Click `Attach policy` + +### Using AWS CLI + +N/A - This is managed through the AWS Console IAM Policies. + +## Default Value + +No IAM policy for Lightsail bucket access exists by default. Access must be explicitly configured. + +## References + +1. https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-bucket-management-policies + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.8/SKILL.md new file mode 100644 index 0000000000..5ce6968994 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.8/SKILL.md @@ -0,0 +1,149 @@ +--- +name: cis-aws-compute-5.8 +description: "Ensure Lightsail instances are attached to the buckets" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, buckets, storage, resource-access, instances] +cis_id: "5.8" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.7, cis-aws-compute-5.9, cis-aws-compute-5.10] +prerequisites: [] +severity_boost: {} +--- + +# 5.8 Ensure Lightsail instances are attached to the buckets (Manual) + +## Description + +Attaching an Amazon Lightsail instance to a Lightsail storage bucket gives it full programmatic access to the bucket and its objects. + +## Rationale + +When you attach instances to buckets, you don't have to manage credentials like access keys. Resource access is ideal if you're configuring software or a plugin on your instance to upload files directly to your bucket. For example, if you want to configure a WordPress instance to store media files on a bucket configuration with bucket storage resource access allows for that securely. + +## Impact + +You can attach instances that are in a running state only. Additionally, the instances have to be in the same AWS Region as the bucket or the buckets have to be in the same region as the instances. + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select `Storage`. +5. All Lightsail buckets are listed here. +6. Click on a bucket name +7. Click `Permissions`. +8. Scroll down to `Resource access` and confirm that your instance is attached. +9. If the instance using this Storage bucket is not attached refer to the remediation below. + +### Using AWS CLI + +1. Run `aws lightsail get-buckets` + +```bash +aws lightsail get-buckets +``` + +This command will provide a list of Buckets tied to Lightsail. + +2. If there are no buckets listed then refer to the remediation below. + +## Expected Result + +Lightsail instances that need bucket access should be attached to their respective storage buckets via resource access, eliminating the need for access key management. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Confirm that the `instance` you want to connect to the Storage bucket is in a `running` state +5. If it is move on to Step 6. If it is not click on the instance name, then click on `Start`. Wait for the status to read `Running` +6. Select `Storage`. +7. All Lightsail buckets are listed here. +8. Click on the bucket you want to associate with the instances. +9. Click `Permissions`. +10. Scroll down to `Resource access`. +11. Click on `Attach instance` +12. Click on `Choose an instance` +13. Select the instance +14. Click Attach +15. Repeat this for any other instances and buckets that need to be attached. + +### Using AWS CLI + +1. Run `aws lightsail create-bucket` + +```bash +aws lightsail create-bucket --bucket-name test-cli-bucket2 --bundle-id small_1_0 +``` + +This command will create a bucket. +If you want to review the bundle size ids run this command. + +```bash +aws lightsail get-bucket-bundles +``` + +Example output: + +```json +"bundles": [ + { + "bundleId": "small_1_0", + "name": "Object Storage 5GB", + "price": 1.0, + "storagePerMonthInGb": 5, + "transferPerMonthInGb": 25, + "isActive": true + }, + { + "bundleId": "medium_1_0", + "name": "Object Storage 100GB", + "price": 3.0, + "storagePerMonthInGb": 100, + "transferPerMonthInGb": 250, + "isActive": true + }, + { + "bundleId": "large_1_0", + "name": "Object Storage 250GB", + "price": 5.0, + "storagePerMonthInGb": 250, + "transferPerMonthInGb": 500, + "isActive": true + } +] +``` + +Change the "bundleId" to the size of storage you need. +Repeat and create all the S3 buckets that you need for Lightsail. + +## Default Value + +Lightsail instances are not attached to buckets by default. Bucket attachment must be configured manually. + +## References + +1. https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-bucket-resource-access + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v8 | 3.11 Encrypt Sensitive Data at Rest - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data. | | x | x | +| v7 | 1.7 Deploy Port Level Access Control - Utilize port level access control, following 802.1x standards, to control which devices can authenticate to the network. The authentication system shall be tied into the hardware asset inventory data to ensure only authorized devices can connect to the network. | | x | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts - Ensure that all users with administrative account access use a dedicated or secondary account for elevated activities. This account should only be used for administrative activities and not internet browsing, email, or similar activities. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.9/SKILL.md new file mode 100644 index 0000000000..28f3f0c509 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-5.9/SKILL.md @@ -0,0 +1,120 @@ +--- +name: cis-aws-compute-5.9 +description: "Ensure that your Lightsail buckets are not publicly accessible" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, lightsail, buckets, public-access, permissions, storage] +cis_id: "5.9" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-5.7, cis-aws-compute-5.8, cis-aws-compute-5.10] +prerequisites: [] +severity_boost: {} +--- + +# 5.9 Ensure that your Lightsail buckets are not publicly accessible (Manual) + +## Description + +You can make all objects private, public (read-only) or private while making individual objects public (read-only). By default when creating a bucket the permissions are set to "All objects are private". + +## Rationale + +When the Bucket access permissions are set to All objects are public (read-only) - All objects in the bucket are readable by anyone on the internet through the URL of the bucket. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select `Storage`. +5. All Lightsail buckets are listed here. +6. Underneath the bucket name and size there are 3 possible statements: + +``` +All objects are private +All objects are public (read-Only) +Individual objects can be public +``` + +7. If any buckets are set to `All objects are public (read-Only)` and or 'Individual objects can be public' refer to the remediation below. + +### Using AWS CLI + +1. Run `aws lightsail get-buckets` + +```bash +aws lightsail get-buckets +``` + +This command will provide a list of Buckets tied to Lightsail. + +2. Review the accessRules, getobject and allowPublicOverrides. + +```json +"accessRules": { + "getObject": "private", + "allowPublicOverrides": false +} +``` + +4. If it reads "getObject": "public" or "allowPublicOverrides": true please make note "name" of the bucket also listed in the output. +5. Then refer to the remediation below. + +## Expected Result + +All Lightsail buckets should have access rules set to `"getObject": "private"` and `"allowPublicOverrides": false`, meaning all objects are private. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console using https://console.aws.amazon.com +2. Click `All services`, click `Lightsail` under Compute. +3. This will open up the Lightsail console. +4. Select `Storage`. +5. All Lightsail buckets are listed here. +6. Click on the bucket name that has `All objects are public (read-Only)` listed. +7. Click on `Permissions` +8. Click on `Change permissions` +9. Select `All objects are private` +10. Click `Save` +11. Repeat for any other Buckets within Lightsail that are set with `All objects are public (read-Only)` and/or `Individual objects can be made public and read only` + +### Using AWS CLI + +1. Run `aws lightsail update-bucket` + +```bash +aws lightsail update-bucket --bucket-name --access-rules getObject="private",allowPublicOverrides=false +``` + +2. The confirmation that the change was made will print out after running that command. +3. Repeat for any other buckets listed in the audit. + +## Default Value + +By default when creating a bucket the permissions are set to "All objects are private". + +## References + +1. https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-understanding-bucket-permissions + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-6.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-6.1/SKILL.md new file mode 100644 index 0000000000..6dd11e7d17 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-6.1/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-aws-compute-6.1 +description: "Ensure you are using VPC Endpoints for source code access" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, app-runner, vpc-endpoint, encryption, privatelink] +cis_id: "6.1" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1 Ensure you are using VPC Endpoints for source code access (Manual) + +## Description + +App Runner needs access to your application source, so it can't be encrypted. Therefore, be sure to secure the connection between your development or deployment environment and App Runner. + +## Rationale + +Client-side encryption isn't a valid method for protecting the source image or code that you provide to App Runner for deployment. Using a VPC endpoint, you can privately connect your VPC to supported AWS services and VPC endpoint services that are powered by AWS PrivateLink. + +Note that this isn't required if you are deploying your app runner directly from an ECR image as ECR images can be independently encrypted. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/vpc/ +2. On the left hand side, click Endpoints. +3. On the `Endpoints` page. +4. Review all the endpoints listed under name. +5. Locate the Endpoint assigned and configured for App Runner. +6. If there is no Endpoint set for App Runner refer to the remediation below. +7. Either click the check box, Actions, View Details or click on the VPC endpoint ID. +8. Confirm these settings: + +``` +1. Service name - `com.amazonaws."region".apprunner` +**Note - "Region" will reflect the region that you are operating in. +2. Status - Available +3. VPC ID - correctly associated for use with the service +4. Subnets tab - correctly associated for use with the service +5. Security Groups tab - correctly associated for use with the service +6. Policy tab - correctly configured for use with the service +``` + +9. If the settings listed above are not correct refer to the remediation below. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Expected Result + +A VPC endpoint for App Runner exists with service name `com.amazonaws."region".apprunner`, status is Available, and VPC ID, Subnets, Security Groups, and Policy are correctly configured. + +## Remediation + +### Using AWS Console + +To create an interface endpoint for an App Runner: + +1. Login to the AWS Console using https://console.aws.amazon.com/vpc/ +2. On the left hand side, click Endpoints. +3. Click `Create endpoint`. +4. Under Service category, choose AWS services. +5. For Service name, select `com.amazonaws."region".apprunner`. "Region" will reflect the region that your are operating in. +6. For VPC, select the VPC from which you'll access App Runner. +7. For Subnets, select one subnet per Availability Zone. +8. For Security group, select the security groups to associate with the App Runner endpoint network interfaces. +9. For Policy, select Custom to attach a VPC endpoint policy that controls the permissions that principals have for performing actions on resources over the VPC endpoint. +10. Click `Create endpoint`. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Default Value + +No VPC endpoint is configured for App Runner by default. + +## References + +- https://docs.aws.amazon.com/apprunner/latest/dg/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v8 | 3.12 Segment Data Processing and Storage Based on Sensitivity | | X | X | +| v7 | 5.2 Maintain Secure Images | | X | X | +| v7 | 10.4 Ensure Protection of Backups | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-8.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-8.1/SKILL.md new file mode 100644 index 0000000000..08ad0c6675 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-8.1/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-aws-compute-8.1 +description: "Ensure AWS Batch is configured with AWS CloudWatch Logs" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, batch, cloudwatch, logging, monitoring] +cis_id: "8.1" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-8.2] +prerequisites: [] +severity_boost: {} +--- + +# 8.1 Ensure AWS Batch is configured with AWS CloudWatch Logs (Manual) + +## Description + +You can configure Batch jobs to send log information to CloudWatch Logs. + +## Rationale + +This enables you to view different logs from all your jobs in one convenient location. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/batch/ +2. On the left hand side under `Console settings`, Click on `Permissions` +3. Under `Job logs` section +4. Confirm that `Authorize Batch to use Cloudwatch` is set with a green check. +5. If it is showing a red X refer to the remediation below. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Expected Result + +`Authorize Batch to use Cloudwatch` is enabled (green check) in the Batch Console settings under Permissions > Job logs. + +## Remediation + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/batch/. +2. In the left column under Console settings, Click on `Permissions` +3. In the Job logs section click on `Edit` +4. Click the `Authorize Batch to use CloudWatch` +5. Click Save + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Default Value + +AWS Batch is not configured with CloudWatch Logs by default. + +## References + +- https://docs.aws.amazon.com/batch/latest/userguide/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | X | X | X | +| v7 | 6.2 Activate audit logging | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-8.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-8.2/SKILL.md new file mode 100644 index 0000000000..cb42df5f7b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-8.2/SKILL.md @@ -0,0 +1,155 @@ +--- +name: cis-aws-compute-8.2 +description: "Ensure Batch roles are configured for cross-service confused deputy prevention" +category: cis-compute +version: "1.1.0" +author: cyberstrike-official +tags: [cis, aws, compute, batch, iam, confused-deputy, cross-service, access-control] +cis_id: "8.2" +cis_benchmark: "CIS AWS Compute Services Benchmark v1.1.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-compute-8.1] +prerequisites: [] +severity_boost: {} +--- + +# 8.2 Ensure Batch roles are configured for cross-service confused deputy prevention (Manual) + +## Description + +The Cross-service confused deputy problem is a security issue where an entity that doesn't have permission to perform an action can coerce a more-privileged entity to perform the action. + +## Rationale + +Cross-service impersonation can result in the confused deputy problem. Cross-service impersonation can occur when one service (the calling service) calls another service (the called service). The calling service can be manipulated to use its permissions to act on another customer's resources in a way it should not otherwise have permission to access. + +## Impact + +An IAM role is an identity you can create that has specific permissions with credentials that are valid for short durations. Roles can be assumed by entities that you trust. IAM Roles are often organization named and organization based. Searching for and reviewing the roles for this recommendation is a manual process. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/iam/ +2. On the left hand side under Access management, Click on `Roles` +3. Search for any roles related to `Batch` +4. Click on the role and the Assume Role Policy Document and confirm that the AssumeRole Action has a `aws:SourceArn` key that contains the full ARN of the Batch resource + +Example of a compliant policy with `aws:SourceArn` condition: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "batch.amazonaws.com" + }, + "Action": "sts:AssumeRole", + "Condition": { + "ArnLike": { + "aws:SourceArn": ["arn:aws:batch:us-east-1:123456789012:compute-environment/testCE"] + } + } + } + ] +} +``` + +5. If it is showing an `*` within the ARN or does not have this condition key specified, then the Batch process has access to all of the resources defined in that environment. + +Example of a non-compliant policy (missing `aws:SourceArn` condition): + +```json +"arn:aws:batch:us-east-1:123456789012:compute-environment/*", +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "batch.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} +``` + +6. Repeat for any roles assigned to Batch that have AssumeRole +7. Refer to the remediation below + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Expected Result + +All IAM roles associated with AWS Batch have an `aws:SourceArn` condition key in the AssumeRole policy document that contains the full ARN of the specific Batch resource (not a wildcard `*`). + +## Remediation + +### Using AWS Console + +1. Login to the AWS Console using https://console.aws.amazon.com/iam/ +2. On the left hand side under Access management, Click on `Roles` +3. Search for any roles identified above in the audit. +4. Click on the role and update the Action AssumeRole, `aws:SourceArn` to contain the full ARN of the resource + +```json +"aws:SourceArn": [ + "arn:aws:batch:us-east-1:123456789012:compute-environment/testCE", +``` + +5. Repeat for any roles defined in the Audit. + +### Using AWS CLI + +N/A - This control is manual and console-based. + +## Additional Information + +Note: Usage of the `aws:SourceAccount` condition key can be used to prevent cross service confused deputy impersonation from external accounts. This condition key is not as specific as using `aws:SourceArn` which can be used to limit access of the IAM Role for specific resources or a group of specific resources. + +Example using `aws:SourceAccount`: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "batch.amazonaws.com" + }, + "Action": "sts:AssumeRole", + "Condition": { + "StringEquals": { + "aws:SourceAccount": "123456789012" + } + } + } + ] +} +``` + +## Default Value + +By default, IAM roles for Batch do not include the `aws:SourceArn` condition key. + +## References + +1. https://docs.aws.amazon.com/batch/latest/userguide/cross-service-confused-deputy-prevention.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.1/SKILL.md new file mode 100644 index 0000000000..c3e6228572 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.1/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-aws-database-10.1 +description: "Ensure Data Ingestion is Secure" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, timestream, time-series, data-ingestion, security] +cis_id: "10.1" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-10.2, cis-aws-database-10.3, cis-aws-database-10.4] +prerequisites: [] +severity_boost: {} +--- + +# 10.1 Ensure Data Ingestion is Secure (Manual) + +## Description + +Ensure that data ingestion into Amazon Timestream is performed securely, with proper authentication, encryption, and validation mechanisms in place. + +## Rationale + +This helps ensure that the system is updated with any potential vulnerabilities that might pose a threat to the organization. Helps authenticate the sources that are coming to the database and ensures that only authorized users have the credential to access the data. + +## Impact + +Secure data ingestion protects the integrity and confidentiality of time-series data being stored in Timestream. + +## Audit Procedure + +### Using AWS Console + +1. Secure Data Sources: + - Ensure that your data sources are protected with appropriate security measures. Implement secure network configurations, access controls, and authentication mechanisms for your data sources. Apply security patches and updates to your data source systems to prevent vulnerabilities. +2. Use HTTPS or AWS Direct Connect: + - When ingesting data into Timestream, use secure communication protocols such as HTTPS. Encrypt data in transit to protect it from unauthorized interception. Consider using AWS Direct Connect for a dedicated private network connection to Timestream, ensuring data privacy. +3. Implement Client-Side Encryption: + - Encrypt your data before sending it to Timestream using client-side encryption. Use industry-standard encryption algorithms and strong encryption keys to protect the confidentiality of your data. Store and manage the encryption keys securely using AWS Key Management Service (KMS). +4. Authenticate Data Sources: + - Implement authentication mechanisms for your data sources to ensure only authorized sources can ingest data into Timestream. Use mechanisms such as API keys, access tokens, or client certificates to verify the authenticity of the data source. Consider integrating with AWS Identity and Access Management (IAM) for centralized authentication and access control. +5. Validate and Sanitize Data: + - Implement data validation and sanitization mechanisms to prevent injection attacks or malformed data from being ingested into Timestream. Use input validation techniques and enforce data format requirements to ensure the integrity of the ingested data. Implement data quality checks to identify and handle anomalies or outliers. +6. Monitor Data Ingestion: + - Implement monitoring and logging for data ingestion processes. Regularly review logs and metrics related to data ingestion to detect anomalies or suspicious activities. Set up alarms and notifications for data ingestion failures or unexpected patterns. +7. Regularly Update Data Ingestion Components: + - Keep your data ingestion components, such as APIs, scripts, or connectors, up to date with the latest security patches and updates. Follow safe coding practices and stay informed about security vulnerabilities and fixes specific to your data ingestion tools. +8. Implement Network Security Controls: + - Use network security controls such as security groups, network ACLs, and VPC configurations to restrict access to your Timestream resources. Configure inbound and outbound traffic rules to allow only necessary network connections for data ingestion. Follow the principle of least privilege, granting access only to the required IPs or networks. + +## Expected Result + +Data ingestion should use HTTPS/TLS, client-side encryption, proper authentication, input validation, and network security controls. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to implement secure data ingestion practices for your Amazon Timestream environment. + +## Default Value + +No default secure ingestion configuration. Users must implement security controls for data ingestion. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------ | ---- | ---- | ---- | +| v8 | 3 Data Protection | | | | +| v7 | 13 Data Protection | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.10/SKILL.md new file mode 100644 index 0000000000..83602d1363 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.10/SKILL.md @@ -0,0 +1,135 @@ +--- +name: cis-aws-database-10.10 +description: "Ensure Database has automated Backups enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, timestream, time-series, backup, aws-backup, recovery] +cis_id: "10.10" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-10.8, cis-aws-database-10.9] +prerequisites: [] +severity_boost: {} +--- + +# 10.10 Ensure Database has automated Backups enabled (Manual) + +## Description + +Ensure that Amazon Timestream tables have automated backups enabled through AWS Backup with a defined backup schedule and retention policy. AWS Backup provides scheduled, automated backup functionality for Timestream tables, creating regular point-in-time snapshots that are retained according to a configurable lifecycle policy. + +## Rationale + +Amazon Timestream stores critical time-series data that is often mission-critical for monitoring, analytics, and operational intelligence. Automated backups through AWS Backup ensure that Timestream tables are continuously protected without requiring manual intervention, and can be rapidly restored in the event of accidental deletion, data corruption, misconfiguration, or application errors. + +## Impact + +Enabling automated backups for Timestream ensures that time-series data is regularly captured in durable backups and recoverable to any point within the configured retention window, providing strong protection against accidental loss and data corruption. + +## Audit Procedure + +### Using AWS CLI + +Important Note: Amazon Timestream does not have a native automated backup feature built into the service. Instead, backups are managed through AWS Backup, which provides scheduled, on-demand, and lifecycle-managed backup functionality for Timestream tables. + +Check if automated backups are enabled via AWS Backup Service: + +1. Check if Timestream Database is Assigned to a Backup Plan: + +List backup plans: + +```bash +aws backup list-backup-plans --query "BackupPlansList[].BackupPlanName" --output table +``` + +For each backup plan, list all backup selections (resource assignments): + +```bash +aws backup list-backup-selections --backup-plan-id --query "BackupSelections[].SelectionId" --output text +``` + +For each selection, list assigned resources and search for your database: + +```bash +aws backup get-backup-selection --backup-plan-id --selection-id --query "BackupSelection.Resources" --output text +``` + +- If your table ARN appears in any selection, it is protected by the backup plan. + +2. Verify Backup Plan Configuration: + +```bash +aws backup get-backup-plan --backup-plan-id +``` + +Look for the "Lifecycle" fields in each backup rule: + +- "DeleteAfterDays" is the retention period. +- "ScheduleExpression" sets the backup schedule (cron format). +- "BackupVaultName" is the name of the vault (where backups are stored). + +## Expected Result + +Timestream tables should be assigned to an AWS Backup plan with appropriate schedule and retention policies configured. + +## Remediation + +### Using AWS CLI + +1. Create Backup Plan for on-demand snapshots: + +```bash +aws backup create-backup-plan --backup-plan '{ + "BackupPlanName": "", + "Rules": [ + { + "RuleName": "Scheduled-OnDemand-Snapshots", + "TargetBackupVaultName": "Default", + "ScheduleExpression": "cron(0 3 ? * SUN *)", + "StartWindowMinutes": 120, + "CompletionWindowMinutes": 360, + "Lifecycle": { "DeleteAfterDays": 90 }, + "RecoveryPointTags": { "BackupType": "OnDemand" } + } + ] +}' +``` + +- Replace "BackupPlanName" with your backup plan name +- Replace "Default" with your actual backup vault name if different +- Update the "ScheduleExpression", "StartWindowMinutes" based on your unique backup schedule. +- Replace "35" with your retention time for PITR if shorter +- Replace "90" with your retention time for Snapshots if different + +This command outputs the BackupPlanId necessary for the next step. + +2. Assign Timestream Database to the Backup Plan: + +Replace with the ID from Step 1 and with your Timestream table ARN. + +```bash +aws backup create-backup-selection --backup-plan-id --backup-selection '{ "SelectionName": "timestream-tables", "IamRoleArn": "arn:aws:iam:::role/AWSBackupServiceRolePolicyForBackup", "Resources": [""] }' +``` + +- Make sure the IAM role has the necessary AWS Backup permissions. +- These commands create a centralized backup plan with scheduled snapshot backups, then assign your Timestream database as a resource for backup. + +## Default Value + +Amazon Timestream does not have native automated backups. Backups must be configured through AWS Backup. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------- | ---- | ---- | ---- | +| v8 | 11 Data Recovery | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.2/SKILL.md new file mode 100644 index 0000000000..29b8d5df72 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.2/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-aws-database-10.2 +description: "Ensure Data at Rest is Encrypted" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, timestream, time-series, encryption, kms] +cis_id: "10.2" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-10.1, cis-aws-database-10.3, cis-aws-database-10.4] +prerequisites: [] +severity_boost: {} +--- + +# 10.2 Ensure Data at Rest is Encrypted (Manual) + +## Description + +Enable encryption at rest for Amazon Timestream to protect your data while it is stored. Utilize AWS Key Management Service (KMS) to manage and control the encryption keys used for data encryption. Configure Timestream to encrypt your data using AWS-managed keys or customer-managed keys. + +## Rationale + +This helps ensure that the data is kept secure and protected when at rest. The user must choose from two key options which then determine when the data is encrypted at rest. + +## Impact + +Encryption at rest ensures that Timestream data remains protected even if the underlying storage media is compromised. + +## Audit Procedure + +### Using AWS Console + +1. Understand Encryption at Rest in Timestream: + - Familiarize yourself with the concept of encryption at rest and its importance in securing your data in Timestream. Understand that encryption at rest ensures that your data remains protected even if the underlying storage media is compromised. +2. Create an AWS Key Management Service (KMS) Key: + - Open the AWS Management Console and navigate to the AWS Key Management Service (KMS) service. Create a new KMS customer master key (CMK) or use an existing one to manage the encryption keys for Timestream. Follow the AWS documentation and best practices for creating and managing KMS keys. +3. Enable Encryption at Rest in Timestream: + - Open the Amazon Timestream console. Select the Timestream database or table you want to enable encryption at rest. Click on the "Encryption" tab or section. Choose the option to enable encryption at rest. Select the KMS key that you created earlier to be used for encryption. +4. Verify Encryption at Rest: + - Confirm that encryption at rest is enabled for the selected Timestream database or table. Review the encryption settings in the Timestream console to ensure the correct KMS key is associated. +5. Monitor and Audit Encryption at Rest: + - Regularly monitor the encryption at rest status in the Timestream console. Leverage AWS CloudTrail and AWS CloudWatch to monitor and track encryption-related activities or events. Set up appropriate alerts and notifications to detect any issues or unauthorized changes to the encryption settings. +6. Test Data Access and Decryption: + - Access the Timestream data that is encrypted at rest. Verify that you can retrieve and decrypt the data using the appropriate access controls and KMS key permissions. Perform thorough testing to ensure data access and decryption functions as expected. +7. Review and Update Encryption Configuration: + - Regularly review your encryption configuration and settings for Timestream. Ensure that the appropriate KMS key is still associated with the Timestream resources. Update the encryption settings if necessary, such as rotating encryption keys or modifying key policies. + +## Expected Result + +Encryption at rest should be enabled for all Timestream databases and tables using either AWS-managed or customer-managed KMS keys. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable encryption at rest for your Amazon Timestream resources. + +## Default Value + +Amazon Timestream encrypts all data at rest by default using AWS-managed keys. Customer-managed KMS keys can be configured for additional control. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.3/SKILL.md new file mode 100644 index 0000000000..a5ce6abd29 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.3/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-aws-database-10.3 +description: "Ensure Encryption in Transit is Configured" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, timestream, time-series, encryption, tls, https] +cis_id: "10.3" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-10.1, cis-aws-database-10.2, cis-aws-database-10.4] +prerequisites: [] +severity_boost: {} +--- + +# 10.3 Ensure Encryption in Transit is Configured (Manual) + +## Description + +Configure your applications or tools to use secure communication protocols when interacting with Amazon Timestream. Utilize endpoints to establish private and secure connections to Timestream. + +## Rationale + +The database uses HTTPS/TLS to encrypt data during transit. To secure your data in transit the individual should identify their client application and what is supported by HTTPS/TLS in order to configure it correctly. Also has an option for leverage, which creates a private connection between virtual private code (VPC) without interfering with public networks. + +## Impact + +If the client does not have the code configured correctly it would not be able to connect to the server. + +## Audit Procedure + +### Using AWS Console + +1. Understand Encryption in Transit in Timestream: + - Familiarize yourself with the concept of encryption in transit and its importance in securing data communication. Understand that encryption in transit ensures that data transmitted between clients and Timestream remains confidential and protected from interception. +2. Use HTTPS for Communication: + - Configure your client applications or tools to communicate with Amazon Timestream over HTTPS. Utilize the HTTPS protocol to establish secure encrypted connections between clients and the Timestream service. Ensure your client applications support the TLS (Transport Layer Security) protocol versions AWS recommends. +3. Leverage AWS PrivateLink (Optional): + - Consider using AWS PrivateLink to establish private and secure connections between your VPC and Timestream. Configure a VPC endpoint for Timestream to securely access the service without traversing the public internet. +4. Enable SSL/TLS Certificates: + - Obtain and configure valid SSL/TLS certificates for your client applications or tools. Install the SSL/TLS certificates on your client systems or load balancers. Use the configured certificates to establish secure connections with Timestream. +5. Verify Encryption in Transit: + - Validate that your client applications or tools are using secure communication channels. Verify that HTTPS is being utilized for communication with Timestream. Confirm that SSL/TLS certificates are properly configured and used in communication. +6. Monitor Encryption in Transit: + - Utilize Amazon CloudWatch to monitor the metrics and logs related to your Timestream resources. Set up appropriate alarms and notifications to alert you of any potential security incidents or anomalies in the encryption in transit process. Regularly review the CloudWatch logs and metrics to ensure the integrity and security of the data in transit. +7. Regularly Update Encryption Configuration: + - Stay informed about the latest encryption standards, protocols, and best practices. Regularly review and update your encryption configurations and settings to align with industry standards and security recommendations. Apply any necessary updates or patches to client applications or tools to maintain strong encryption in transit. + +## Expected Result + +All communications with Timestream should use HTTPS/TLS with valid SSL/TLS certificates. VPC endpoints should be considered for private connectivity. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to configure encryption in transit for your Amazon Timestream environment. + +## Default Value + +Amazon Timestream requires HTTPS for all API calls. TLS encryption in transit is enforced by default. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.4/SKILL.md new file mode 100644 index 0000000000..d64d4ab126 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.4/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-aws-database-10.4 +description: "Ensure Access Control and Authentication is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, timestream, time-series, iam, authentication, access-control, mfa] +cis_id: "10.4" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-10.1, cis-aws-database-10.5, cis-aws-database-10.6] +prerequisites: [] +severity_boost: {} +--- + +# 10.4 Ensure Access Control and Authentication is Enabled (Manual) + +## Description + +Utilize AWS Identity and Access Management (IAM) to control access to your Amazon Timestream resources. Define IAM policies that grant or deny permissions for specific Timestream actions and resources. + +## Rationale + +Users should select whether they like to enable authentication. If they want to authenticate the user would be required to implement IAM roles would grant or deny permissions within that database. Users also have an option to enable multi-factor authentication, which adds an extra layer of security restricting access to unauthorized users. + +## Impact + +Allowing authentication verifies the identity of the person and who has appropriate access to a company's data. + +## Audit Procedure + +### Using AWS Console + +1. Understand AWS Identity and Access Management (IAM): + - Familiarize yourself with IAM, the AWS service used to manage access to AWS resources. Understand IAM users, groups, roles, policies, and permissions, essential for access control in Timestream. +2. Create IAM Users, Groups, and Roles: + - Access the AWS Management Console and navigate to the IAM service. Create IAM users, groups, and roles based on your organization's access control requirements for Timestream. Define appropriate permissions for these entities, limiting access to specific Timestream actions and resources. +3. Assign IAM Policies: + - Create IAM policies that define the desired level of access to Timestream. Associate these policies with the respective IAM users, groups, and roles created earlier. Ensure that the policies provide the necessary permissions for users to interact with Timestream resources. +4. Use IAM Roles for External Applications: + - If you have external applications or services accessing Timestream, create IAM roles specific to those applications. Define the necessary permissions in the IAM roles and grant them to the respective applications or services. Configure the applications or services to assume these IAM roles when accessing Timestream. +5. Enable Multi-Factor Authentication (MFA): + - Enable MFA for IAM users who require access to Timestream. Configure MFA devices and enforce MFA usage for these users. MFA adds an extra layer of security by requiring an additional authentication factor during the login process. +6. Implement AWS Identity Federation (Optional): + - Consider implementing AWS Identity Federation if you need to grant access to Timestream to users from external identity providers. Configure the necessary trust relationships and establish a federation between the external identity provider and AWS. Ensure that the federated users have the appropriate IAM policies and permissions for Timestream. +7. Regularly Review and Update Access Controls: + - Periodically review and update the IAM policies and permissions for Timestream. Remove unnecessary access permissions and ensure access controls align with your organization's security requirements. Monitor IAM activity logs and AWS CloudTrail to identify unauthorized access attempts or unusual activities. + +## Expected Result + +IAM users, groups, roles, and policies should be properly configured with appropriate permissions for Timestream access. MFA should be enabled for users accessing Timestream. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to configure IAM access controls and authentication for your Amazon Timestream resources. + +## Default Value + +Access to Timestream is controlled through IAM. No default IAM policies are configured for Timestream access beyond the root account. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.5/SKILL.md new file mode 100644 index 0000000000..ee582c8525 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.5/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-aws-database-10.5 +description: "Ensure Fine-Grained Access Control is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, timestream, time-series, access-control, iam, fine-grained] +cis_id: "10.5" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-10.4, cis-aws-database-10.6, cis-aws-database-10.7] +prerequisites: [] +severity_boost: {} +--- + +# 10.5 Ensure Fine-Grained Access Control is Enabled (Manual) + +## Description + +Leverage Timestream's fine-grained access control capabilities to control table or row level access. Define access policies that limit access to specific tables, columns, or rows based on user roles or conditions. Implement data filtering and row-level security to restrict access to sensitive information. + +## Rationale + +This helps by having specific permissions which can be denied due to multiple conditions of the database. This allows the user to control certain aspects of the database. + +## Impact + +This adds an extra layer for users to sign into with their credentials to the database. + +## Audit Procedure + +### Using AWS Console + +1. Understand Fine-Grained Access Control in Timestream: + - Familiarize yourself with the concept of fine-grained access control and its benefits in Timestream. Understand that fine-grained access control allows you to control access to specific tables, columns, or rows within Timestream databases. +2. Define Timestream Database and Tables: + - Create the necessary Timestream databases and tables that will be used for fine-grained access control. Design your database schema and define the tables, columns, and rows that need granular access control. +3. Create IAM Policies for Fine-Grained Access: + - Access the AWS Management Console and navigate to the IAM service. Define IAM policies that grant or deny permissions for specific Timestream actions, databases, tables, columns, or rows. Leverage Timestream's fine-grained access control policy language to specify the conditions and restrictions for access. +4. Assign IAM Policies to IAM Users, Groups, or Roles: + - Associate the IAM policies created earlier with the respective IAM users, groups, or roles. Assign the appropriate policies to grant access to specific Timestream databases, tables, columns, or rows. Follow the principle of least privilege and provide only the necessary permissions to users based on their requirements. +5. Test Fine-Grained Access Control: + - Validate the fine-grained access control settings by attempting different actions on Timestream databases, tables, columns, or rows. Verify that the defined policies accurately restrict or allow access based on the specified conditions. Perform thorough testing to enforce the expected granularity and security level. +6. Regularly Review and Update Access Policies: + - Periodically review the fine-grained access control policies to ensure they align with your organization's security requirements. Remove any unnecessary or outdated policies. Regularly monitor IAM activity logs and AWS CloudTrail to identify any unauthorized access attempts or unusual activities related to fine-grained access control. + +## Expected Result + +Fine-grained IAM policies should be configured to control access to specific Timestream databases, tables, columns, and rows based on the principle of least privilege. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to implement fine-grained access control for your Amazon Timestream resources. + +## Default Value + +No fine-grained access control policies are configured by default. IAM policies must be manually created and assigned. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.6/SKILL.md new file mode 100644 index 0000000000..ea33d716bd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.6/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-aws-database-10.6 +description: "Ensure Audit Logging is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, timestream, time-series, audit-logging, cloudtrail] +cis_id: "10.6" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-10.5, cis-aws-database-10.7, cis-aws-database-10.8] +prerequisites: [] +severity_boost: {} +--- + +# 10.6 Ensure Audit Logging is Enabled (Manual) + +## Description + +Enable AWS CloudTrail to capture and log API calls and activities related to Amazon Timestream. Configure CloudTrail to store the logs in a secure location and regularly review the logs for any unauthorized or suspicious activities. + +## Rationale + +This captures and saves logs of activities that took place in the database. + +## Impact + +This reduces risks of any fraud since worker activity is being monitored and tracked. + +## Audit Procedure + +### Using AWS Console + +1. Understand Audit Logging in Timestream: + - Familiarize yourself with audit logging and its importance in monitoring and tracking activities in Timestream. Understand that audit logs capture API calls and events related to Timestream actions and resources. +2. Enable AWS CloudTrail: + - Access the AWS Management Console and navigate to the AWS CloudTrail service. Create a new CloudTrail trail or use an existing one to capture Timestream audit logs. Configure the trail to include Timestream as a data source for logging. +3. Configure CloudTrail Logging Options: + - Specify the desired settings for the CloudTrail trail, such as the S3 bucket to store the audit logs and the log file encryption options. Enable logging of management and data events related to Timestream. Configure the trail to capture the necessary information for your audit and compliance requirements. +4. Set Up CloudTrail Notifications and Alerts: + - Configure CloudTrail to send notifications or trigger actions based on specific events or conditions. Set up CloudWatch Alarms to monitor and receive notifications for critical Timestream audit events. Define the appropriate alert thresholds and actions to respond to specific events. +5. Access and Review Audit Logs: + - Access the configured S3 bucket where the Timestream audit logs are stored. Retrieve and review the logs using AWS Management Console, AWS CLI, or any preferred log analysis tools. Analyze the audit logs to track Timestream activities, detect anomalies, and investigate security incidents. +6. Retention and Compliance Considerations: + - Determine the appropriate retention period for your Timestream audit logs based on compliance and regulatory requirements. Implement appropriate data lifecycle management policies for your audit logs stored in the S3 bucket. Ensure compliance with data protection and privacy regulations applicable to your organization. +7. Regularly Review and Monitor Audit Logs: + - Establish a regular review process for your Timestream audit logs. Monitor the logs for unauthorized access attempts, unusual activities, or policy violations. Respond promptly to any identified security incidents or anomalies. + +## Expected Result + +AWS CloudTrail should be enabled and configured to capture all Timestream API calls and events, with logs stored securely in S3 with appropriate retention policies. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable and configure AWS CloudTrail for Amazon Timestream audit logging. + +## Default Value + +CloudTrail can capture Timestream events but must be explicitly configured with a trail that includes Timestream as a data source. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.7/SKILL.md new file mode 100644 index 0000000000..aedc0e18ca --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.7/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-aws-database-10.7 +description: "Ensure Regular Updates and Patches are Installed" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, timestream, time-series, patching, vulnerability-management] +cis_id: "10.7" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-10.6, cis-aws-database-10.8, cis-aws-database-10.9] +prerequisites: [] +severity_boost: {} +--- + +# 10.7 Ensure Regular Updates and Patches are Installed (Manual) + +## Description + +Stay updated with the latest security patches and updates provided by AWS for Amazon Timestream. Follow AWS security best practices and recommendations to ensure your Timestream implementation remains secure. + +## Rationale + +Regular updates and patches address known vulnerabilities and security weaknesses in the service. + +## Impact + +This helps the organization reduce their security risk by regularly updating and patching their database and database engine. Regularly updating and scanning for any weaknesses in the company can bring up possible vulnerabilities that could have led to potential cyber-attack. + +## Audit Procedure + +### Using AWS Console + +1. Stay Informed about Updates: + - Stay updated with the latest announcements and releases related to Amazon Timestream. Subscribe to AWS notifications, blogs, and forums to learn about new features, enhancements, and security patches. +2. Review AWS Documentation: + - Regularly review the official AWS documentation for Amazon Timestream. Pay attention to any updates or recommendations related to security, performance, and best practices. +3. Implement a Patch Management Process: + - Establish a patch management process specific to Amazon Timestream within your organization. Define roles and responsibilities for managing patches, including testing and deployment procedures. +4. Test Patches in a Non-Production Environment: + - Before deploying patches in production, create a non-production environment to test the patches. Set up a replica or a sandbox environment that resembles your production environment. Test the patches thoroughly to ensure they do not introduce compatibility issues or adverse effects. +5. Schedule Patching Maintenance Windows: + - Identify suitable maintenance windows to apply patches to your Timestream resources. Consider the impact on system availability and plan the maintenance window accordingly. Coordinate with relevant teams and stakeholders to ensure minimal disruption during the patching process. +6. Apply Patches: + - Once you have successfully tested the patches in the non-production environment and scheduled a maintenance window. Apply the patches to your production Timestream resources. Follow the recommended patching procedures provided by AWS in the documentation. Ensure you follow any specific instructions or requirements for applying patches to Timestream. +7. Verify Patch Deployment: + - After applying patches, monitor the Timestream resources to ensure they function as expected. Conduct thorough testing to validate that the patched resources operate correctly and have not introduced any issues. +8. Regularly Monitor for Updates: + - Continuously monitor for new updates, patches, and security bulletins related to Amazon Timestream. Stay informed about any vulnerabilities or critical patches that require immediate attention. Adjust your patch management process and schedule to incorporate new updates and releases. +9. Automate Patch Management (Optional): + - Consider automating the patch management process using AWS tools or third-party solutions. Implement automation scripts or systems that handle patch deployments, testing, and monitoring. + +## Expected Result + +A patch management process should be established and regularly followed, with all Timestream-related components kept up to date with the latest security patches. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to establish and maintain a patch management process for your Amazon Timestream environment. + +## Default Value + +Amazon Timestream is a fully managed service; AWS handles underlying infrastructure patching. Client-side components and SDK updates are the user's responsibility. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------- | ---- | ---- | ---- | +| v8 | 7 Continuous Vulnerability Management | | | | +| v7 | 3 Continuous Vulnerability Management | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.8/SKILL.md new file mode 100644 index 0000000000..06e780f242 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.8/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-aws-database-10.8 +description: "Ensure Monitoring and Alerting is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, timestream, time-series, monitoring, cloudwatch, alerting] +cis_id: "10.8" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-10.6, cis-aws-database-10.7, cis-aws-database-10.9] +prerequisites: [] +severity_boost: {} +--- + +# 10.8 Ensure Monitoring and Alerting is Enabled (Manual) + +## Description + +Utilize Amazon CloudWatch to monitor key metrics, events, and logs related to Amazon Timestream. Set up appropriate alarms and notifications to detect security incidents or abnormal behavior proactively. + +## Rationale + +This helps the individual know what is being logged within the activity and determine what next step should be if they spot any anomalies. + +## Impact + +Proper monitoring and alerting enables proactive detection of performance issues, security incidents, and operational anomalies in Timestream. + +## Audit Procedure + +### Using AWS Console + +1. Define Monitoring Objectives: + - Determine the key metrics, events, and logs you want to monitor in Amazon Timestream. Identify the specific monitoring requirements based on your use case, workload, and business needs. +2. Choose Monitoring Tools: + - Evaluate the available monitoring tools for Amazon Timestream, such as AWS CloudWatch, third-party monitoring solutions, or custom-built monitoring systems. Select the monitoring tool that best aligns with your monitoring objectives and requirements. +3. Configure CloudWatch Metrics: + - Utilize Amazon CloudWatch to monitor key performance metrics of Timestream. Enable and configure CloudWatch metrics such as database CPU utilization, storage usage, query latency, and other relevant metrics. Set appropriate thresholds for these metrics to trigger alarms and notifications. +4. Create CloudWatch Alarms: + - Set up CloudWatch alarms based on your defined thresholds and monitoring objectives. Define the conditions that trigger the alarms, such as CPU utilization exceeding a certain percentage or query latency exceeding a specific threshold. Configure the notification actions for the alarms, such as sending notifications via email, SMS, or triggering automated actions. +5. Enable Enhanced Monitoring (Optional): + - Consider enabling enhanced monitoring for Timestream, which provides more detailed performance metrics. Configure the enhanced monitoring settings to collect additional metrics that provide deeper insights into the health and performance of Timestream. +6. Configure Log Streams and Filters: + - Enable Timestream's integration with AWS CloudWatch Logs. Configure log streams and filters to capture and centralize Timestream logs into CloudWatch Logs. Define relevant log filters to extract and track specific log events for monitoring purposes. +7. Regularly Review and Analyze Monitoring Data: + - Continuously review the monitoring data and metrics CloudWatch provides or your chosen monitoring tool. Analyze the data to identify performance bottlenecks, anomalies, or issues in your Timestream implementation. Take necessary actions based on the monitoring insights to optimize performance, improve resource utilization, or troubleshoot issues. +8. Periodically Review and Adjust Monitoring Configuration: + - Regularly review your monitoring configuration to ensure it aligns with your evolving requirements and workload. Adjust your monitoring setup, such as adding or modifying metrics, updating alarm thresholds, or incorporating new log filters. + +## Expected Result + +CloudWatch metrics, alarms, and log streams should be properly configured to provide comprehensive monitoring and alerting for Timestream resources. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to configure CloudWatch monitoring and alerting for your Amazon Timestream resources. + +## Default Value + +Basic CloudWatch metrics are available for Timestream. Alarms, enhanced monitoring, and log integrations must be manually configured. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.9/SKILL.md new file mode 100644 index 0000000000..88e8b204c2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-10.9/SKILL.md @@ -0,0 +1,83 @@ +--- +name: cis-aws-database-10.9 +description: "Ensure to Review and Update the Security Configuration" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, timestream, time-series, security-review, compliance] +cis_id: "10.9" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-10.7, cis-aws-database-10.8, cis-aws-database-10.10] +prerequisites: [] +severity_boost: {} +--- + +# 10.9 Ensure to Review and Update the Security Configuration (Manual) + +## Description + +Conduct regular security reviews and assessments of your Amazon Timestream implementation. Evaluate access permissions, encryption settings, and security controls to ensure they align with your organization's security requirements. + +## Rationale + +By regularly reviewing security configuration it helps the businesses to detect any threat they might be hindering and address the threat in a timely manner. + +## Impact + +This helps by reviewing the database factors from database engine, review instance details, security networks, encryption settings, audit logging, and authentication. By updating or removing a few things from these lists it helps tighten security and ensures that the users do not have excessive permissions. + +## Audit Procedure + +### Using AWS Console + +1. Understand Security Best Practices: + - Familiarize yourself with the security best practices and recommendations provided by AWS for Timestream. Stay updated with the latest security guidelines and recommendations from AWS. +2. Review IAM Policies: + - Regularly review the IAM policies associated with Timestream resources. Ensure that the assigned IAM policies provide the necessary permissions for users and roles while adhering to the principle of least privilege. +3. Audit User Access: + - Periodically review the list of users and roles that have access to Timestream. Remove any unnecessary or unused accounts or permissions to minimize the attack surface. +4. Monitor Access Patterns: + - Utilize AWS CloudTrail and Amazon CloudWatch logs to monitor access patterns and activities related to Timestream. Set up alerts and notifications to detect any suspicious or unauthorized access attempts. +5. Implement Security Controls: + - Continuously assess and evaluate the security controls in place for Timestream. Implement additional security measures, such as VPC peering, security groups, or network ACLs, to further secure access to Timestream resources. +6. Regularly Review Security Group Rules: + - Regularly review the security group rules associated with Timestream instances. Remove any unnecessary open ports or protocols to minimize potential attack vectors. +7. Stay Informed about Security Updates: + - Keep track of security updates, patches, and new features released by AWS for Timestream. Stay informed about any security vulnerabilities or fixes related to Timestream. +8. Conduct Security Assessments: + - Perform periodic security assessments on your Timestream implementation, including vulnerability and penetration testing. Identify and remediate any security vulnerabilities or weaknesses discovered during the assessments. +9. Stay Compliant: + - Regularly review and update your security configurations to meet compliance requirements and industry standards. Stay informed about any changes in compliance regulations that may impact your Timestream environment. +10. Educate and Train: + - Provide regular security awareness training to users and administrators working with Timestream. Ensure that everyone involved understands their security responsibilities and follows security best practices. + +## Expected Result + +Regular security reviews should be conducted with documented findings and remediation actions. All security configurations should be current and aligned with organizational security policies. + +## Remediation + +### Using AWS Console + +Establish a regular security review schedule and follow the audit steps above to review and update all security configurations for your Timestream environment. + +## Default Value + +No automatic security review is configured. This is a manual process that must be established by the organization. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5 Account Management | | | | +| v7 | 5 Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.1/SKILL.md new file mode 100644 index 0000000000..79efa3cbd7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.1/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-database-11.1 +description: "Ensure to Implement Identity and Access Management (IAM)" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, qldb, ledger, iam, authentication, access-control] +cis_id: "11.1" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-11.2, cis-aws-database-11.3, cis-aws-database-11.5] +prerequisites: [] +severity_boost: {} +--- + +# 11.1 Ensure to Implement Identity and Access Management (IAM) (Manual) + +## Description + +This control is important because by having IAM roles implemented in the database it only allows certain people who are authenticated into the database to modify the database and would not give access to unauthorized personnel. This ensures that the data is being protected from any threat actor. + +## Rationale + +IAM provides centralized authentication and authorization for QLDB resources, ensuring only authorized users and services can access the ledger database. + +## Impact + +Only authorized personnel can access the database and configure the applications by using their IAM credentials. If the user credentials are compromised by an unauthorized user, it would limit them to access specific areas within the database due to the leverage IAM roles established. + +## Audit Procedure + +### Using AWS Console + +1. Understand IAM and QLDB Integration: + - Familiarize yourself with IAM and its role in controlling access to AWS services, including QLDB. + - Understand how IAM policies define permissions and access control rules for QLDB resources. +2. Define IAM Users and Groups: + - Identify the users and groups that will need access to QLDB. + - Create IAM user accounts for individuals who require direct access to QLDB. + - Create IAM groups to organize users based on their roles or responsibilities logically. +3. Define IAM Policies: + - Determine the permissions and actions users and groups need to perform on QLDB resources. + - Create custom IAM policies or leverage existing IAM-managed policies to define these permissions. + - Consider the principle of least privilege and grant only the necessary permissions for each user or group. +4. Attach IAM Policies to Users and Groups: + - Associate the appropriate IAM policies with the IAM users and groups. + - Ensure that each user or group has the necessary permissions to perform their tasks on QLDB. + - Regularly review and update the assigned policies as access requirements evolve. +5. Leverage IAM Roles: + - Identify AWS services or applications that require access to QLDB. + - Create IAM roles to provide temporary credentials and permissions for these services. + - Define trust relationships and establish the necessary permissions in the IAM role policies. +6. Enable IAM Database Authentication: + - Configure IAM database authentication for QLDB to allow users to authenticate using their IAM credentials. + - Enable the appropriate IAM authentication option in the QLDB configuration. + - Configure your applications or clients to use IAM credentials when connecting to QLDB. +7. Test IAM Access: + - Use IAM user credentials to log in and test the access to QLDB. + - Verify that users can perform their intended actions based on their assigned IAM policies. + - Test IAM roles and authentication for applications or services requiring access to QLDB. +8. Monitor and Audit IAM Activity: + - Monitor IAM activity logs using AWS CloudTrail. + - Set up appropriate CloudTrail trails to capture IAM-related events and API calls. + - Regularly review IAM logs for any unauthorized access attempts or suspicious activities. +9. Regularly Review and Update IAM Configuration: + - Periodically review the IAM policies, users, groups, and roles associated with QLDB. + - Ensure access is granted based on business requirements and follows the principle of least privilege. + - Remove or update IAM configurations when users or roles are no longer required. + +## Expected Result + +IAM users, groups, roles, and policies should be properly configured for QLDB access with the principle of least privilege applied. IAM database authentication should be enabled. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to implement IAM for your Amazon QLDB environment. + +## Default Value + +Access to QLDB is controlled through IAM. No default IAM policies are configured for QLDB access beyond the root account. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.2/SKILL.md new file mode 100644 index 0000000000..ae32aac080 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.2/SKILL.md @@ -0,0 +1,91 @@ +--- +name: cis-aws-database-11.2 +description: "Ensure Network Access is Secure" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, qldb, ledger, network-security, vpc, privatelink] +cis_id: "11.2" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-11.1, cis-aws-database-11.3, cis-aws-database-11.4] +prerequisites: [] +severity_boost: {} +--- + +# 11.2 Ensure Network Access is Secure (Manual) + +## Description + +By applying certain network access such as Virtual Private Cloud (VPC) it protects the private network that has been established from any external networks from interfering. It allows internal networks to communicate with one another with the network that has been established. The Access Control List (ACLs) allows only specific individuals to access the resources. Also, by monitoring and logging the activity within the database it helps the individual know what is being logged within the activity and determine what next step they should take to address it. + +## Rationale + +Network security controls protect QLDB resources from unauthorized network access and provide defense-in-depth through VPC isolation, security groups, and network ACLs. + +## Impact + +Setting these certain rules in your network provides a strong security and prevents the organization suffering a ransomware attack. + +## Audit Procedure + +### Using AWS Console + +1. Deploy QLDB in a VPC: + - Create a Virtual Private Cloud (VPC) to isolate your QLDB resources. + - Define the network CIDR blocks, subnets, and routing configurations for the VPC. + - Ensure that the VPC is correctly configured with appropriate network access controls. +2. Configure Security Groups: + - Create security groups within your VPC to control inbound and outbound traffic to QLDB. + - Determine the necessary protocols and ports for QLDB access. + - Configure security group rules to allow access from trusted sources, such as specific IP ranges or other security groups within your VPC. +3. Set Up Network ACLs: + - Configure Network Access Control Lists (ACLs) within your VPC to provide an additional layer of network security. + - Define inbound and outbound rules in the ACLs to allow or deny specific traffic based on IP addresses, ports, or protocols. + - Review and adjust the ACL rules to align with your organization's security policies and requirements. +4. Use VPC Endpoints or PrivateLink: + - Consider using VPC endpoints or AWS PrivateLink to securely access QLDB without traversing the public internet. + - Set up a VPC endpoint for QLDB to allow private connectivity within your VPC. + - Configure the routing and security group rules to enable traffic flow through the VPC endpoint or PrivateLink. +5. Secure External Connections: + - If external connections to QLDB are required, implement secure access methods such as Virtual Private Network (VPN) or AWS Direct Connect. + - Configure VPN connections or Direct Connect links to establish encrypted and private connectivity between your on-premises network and the VPC hosting QLDB. + - Apply appropriate security measures, such as strong authentication and encryption, to protect data transmitted over external connections. +6. Enable Logging and Monitoring: + - Enable logging for QLDB to capture important system events and database activity. + - Utilize services like Amazon CloudWatch Logs to centralize and analyze QLDB logs. + - Set up appropriate alarms and notifications to alert you of any suspicious network activity or potential security incidents. +7. Regularly Review and Update Network Security: + - Regularly review your VPC configurations, security groups, and network ACLs. + - Stay informed about AWS security best practices and recommendations. + - Update your network security measures as needed to address emerging threats or changes in your security requirements. + +## Expected Result + +QLDB should be accessed through VPC endpoints or PrivateLink, with properly configured security groups and network ACLs restricting access to authorized sources only. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to configure network security for your Amazon QLDB environment. + +## Default Value + +QLDB is accessed via HTTPS API calls. VPC endpoints and PrivateLink must be manually configured for private network access. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 11.7 Manage Network Infrastructure Through a Dedicated Network | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.3/SKILL.md new file mode 100644 index 0000000000..c2b595346a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.3/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-aws-database-11.3 +description: "Ensure Data at Rest is Encrypted" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, qldb, ledger, encryption, kms] +cis_id: "11.3" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-11.1, cis-aws-database-11.2, cis-aws-database-11.4] +prerequisites: [] +severity_boost: {} +--- + +# 11.3 Ensure Data at Rest is Encrypted (Manual) + +## Description + +This helps ensure that the data is kept secure and protected when at rest. The user must choose from two key options which then determine when the data is encrypted at rest. + +## Rationale + +Encryption at rest protects QLDB ledger data from unauthorized access even if the underlying storage media is compromised. + +## Impact + +If an unauthorized user steals the data, it would be unreadable for them because a key would be required to decrypt the message into plaintext. + +## Audit Procedure + +### Using AWS Console + +1. Create an AWS Key Management Service (KMS) Key: + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + - Open the AWS Key Management Service (KMS) console. + - Create a new KMS key or select an existing one to encrypt your QLDB data at rest. + - Configure the key policy to grant the appropriate IAM users or role permissions. +2. Enable Encryption for QLDB: + - Open the Amazon QLDB console. + - Choose the QLDB ledger for which you want to enable encryption at rest. + - Click on the `Configuration` tab. + - Under the `Encryption` section. + - Click on the `Edit` button or `Modify` option. + - Enable encryption for the ledger. + - Select the KMS key you created or chose in the first step for encrypting the QLDB data. + - Save the changes to enable encryption at rest for the QLDB ledger. +3. Verify Encryption Status: + - Once the encryption at rest is enabled, the QLDB console will indicate the encryption status as `Enabled` for the selected ledger. + - Ensure that the KMS key specified for encryption is the correct key you intended to use. +4. Testing and Verification: + - Perform read and write operations on your QLDB ledger to validate that the data is encrypted at rest. + - Verify that you can access and query the encrypted data using appropriate authentication and authorization methods. +5. Key Management and Rotation: + - Follow AWS best practices for key management, including securely storing and managing the KMS key used for QLDB encryption. + - Implement a key rotation policy, following AWS recommendations and compliance requirements if required. +6. Backup and Disaster Recovery: + - Ensure you have appropriate backup and disaster recovery mechanisms for your QLDB data. + - Consider backing up the KMS key used for encryption to prevent data loss in case of a key compromise or accidental deletion. + +## Expected Result + +Encryption at rest should be enabled for all QLDB ledgers using either AWS-managed or customer-managed KMS keys, with the encryption status showing as `Enabled`. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable encryption at rest for your Amazon QLDB ledgers. + +## Default Value + +QLDB encrypts all data at rest by default using an AWS-owned KMS key. Customer-managed KMS keys can be configured for additional control. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.4/SKILL.md new file mode 100644 index 0000000000..ab2429218d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.4/SKILL.md @@ -0,0 +1,91 @@ +--- +name: cis-aws-database-11.4 +description: "Ensure Data in Transit is Encrypted" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, qldb, ledger, encryption, tls, https] +cis_id: "11.4" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-11.2, cis-aws-database-11.3, cis-aws-database-11.5] +prerequisites: [] +severity_boost: {} +--- + +# 11.4 Ensure Data in Transit is Encrypted (Manual) + +## Description + +Use Transport Layer Security (TLS) to encrypt communications between clients and your QLDB instance. QLDB provides TLS support by default, allowing secure communication over the network. Configure your client applications to use TLS when connecting to QLDB. + +## Rationale + +Amazon Quantum Ledger Database (QLDB), uses TLS to encrypt data during transit. To secure your data in transit the individual should identify their client application and what is supported by TLS in order to configure it correctly. + +## Impact + +If the user does not have the code configured correctly it would not be able to connect to the server. + +## Audit Procedure + +### Using AWS Console + +1. Understand TLS Encryption for QLDB: + - Learn about Transport Layer Security (TLS) and its role in securing data during transit. + - Understand how TLS works to establish secure communication channels between clients and QLDB. +2. Configure Clients for TLS Encryption: + - Ensure that your client applications support TLS encryption for communication with QLDB. + - Use the appropriate AWS SDK or QLDB driver that provides TLS encryption support. + - Update your application code or configurations to enable TLS encryption. +3. Obtain the QLDB Endpoint: + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + - Open the Amazon QLDB console. + - Locate the QLDB ledger for which you want to enable encryption in transit. + - Note down the QLDB endpoint for your ledger. +4. Establish TLS Connection: + - Use the QLDB endpoint obtained earlier to establish a TLS connection between your client application and QLDB. + - Configure your client application to connect to QLDB using the secure HTTPS protocol. + - Provide the necessary authentication credentials or tokens required to establish the connection. +5. Verify TLS Encryption: + - Once the TLS connection is established, verify that the connection is secured using TLS by checking for a valid TLS certificate. + - Ensure that your client application can communicate securely with QLDB without any errors or warnings related to encryption. +6. Regularly Update Client Applications: + - Stay updated with the latest versions of the AWS SDKs or QLDB drivers used by your client applications. + - Regularly update your client applications to leverage the latest TLS encryption features and security enhancements. +7. Monitor and Review TLS Connections: + - Utilize AWS CloudTrail and Amazon CloudWatch to monitor and log TLS-related events and errors. + - Review the logs and alerts to identify potential security issues or anomalies related to TLS connections. +8. Secure Other Communication Channels: + - Ensure that other communication channels your client applications use, such as APIs or data transfers, also utilize TLS encryption. + - Implement appropriate encryption and security measures to protect sensitive data during transit in all communication channels. + +## Expected Result + +All client connections to QLDB should use TLS/HTTPS encryption, with valid TLS certificates properly configured. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to configure and verify TLS encryption in transit for your Amazon QLDB environment. + +## Default Value + +QLDB enforces TLS encryption for all API calls by default. All communication with QLDB is over HTTPS. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.5/SKILL.md new file mode 100644 index 0000000000..9eb725ddd7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.5/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-aws-database-11.5 +description: "Ensure to Implement Access Control and Authentication" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, qldb, ledger, access-control, iam, authentication] +cis_id: "11.5" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-11.1, cis-aws-database-11.4, cis-aws-database-11.6] +prerequisites: [] +severity_boost: {} +--- + +# 11.5 Ensure to Implement Access Control and Authentication (Manual) + +## Description + +Utilize QLDB's built-in authentication and access control mechanisms. Define IAM policies to control which users or roles can perform specific actions on QLDB resources. Leverage IAM roles for cross-service access, securely integrating QLDB with other AWS services. + +## Rationale + +Users should select whether they like to enable authentication. If they want to authenticate the user would be required to implement IAM roles would grant or deny permissions within that database. + +## Impact + +Allowing authentication verifies the identity of the person and who has appropriate access to a company's data. + +## Audit Procedure + +### Using AWS Console + +1. Understand QLDB Authentication and Access Control: + - Familiarize yourself with the authentication and access control mechanisms provided by QLDB. + - Understand the concepts of users, permissions, and roles in QLDB's access control model. +2. Configure IAM for QLDB: + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + - Open the Amazon QLDB console. + - Go to the `Ledgers` section. + - Select the QLDB ledger for which you want to configure access control. + - Under the `Configuration` tab. + - Click on `Edit` or `Modify` to make changes. + - Enable IAM-based authentication by selecting the appropriate option. + - Define the IAM policies that grant or deny permissions for specific QLDB actions. + - Configure fine-grained access control by associating IAM policies with IAM users or roles. +3. Create IAM Users or Roles: + - Identify the individuals or services that require access to QLDB. + - Create IAM user accounts for individuals or IAM roles for services. + - Assign appropriate IAM policies to these users or roles based on their required access levels. +4. Grant Required Permissions: + - Define IAM policies that grant the necessary permissions for QLDB operations. + - Consider the principle of least privilege and only provide the minimum permissions required for each user or role. + - Assign IAM policies to IAM users or roles to allow access to specific QLDB resources. +5. Test Access Control: + - Use IAM user credentials or IAM role credentials to test access to QLDB resources. + - Verify that users or services can perform the expected actions based on their assigned IAM policies. + - Test both read and write operations to ensure appropriate access permissions. +6. Monitor and Audit Access: + - Enable AWS CloudTrail for QLDB to capture and log all API calls and activities. + - Use Amazon CloudWatch to monitor and analyze the logs for unauthorized access attempts or suspicious activities. + - Implement additional logging and auditing mechanisms as per your organization's security requirements. +7. Regularly Review and Update Access Control: + - Conduct periodic reviews of IAM policies, users, and roles associated with QLDB. + - Remove or update access for users or roles that no longer require QLDB access. + - Stay updated with AWS security best practices and IAM and access control recommendations. + +## Expected Result + +IAM-based authentication should be enabled for QLDB with properly configured IAM policies, users, and roles following the principle of least privilege. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to implement access control and authentication for your Amazon QLDB ledgers. + +## Default Value + +QLDB access is controlled through IAM. Fine-grained access control policies must be manually configured. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.6/SKILL.md new file mode 100644 index 0000000000..86865c33f5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.6/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-aws-database-11.6 +description: "Ensure Monitoring and Logging is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, qldb, ledger, monitoring, logging, cloudwatch, cloudtrail] +cis_id: "11.6" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-11.1, cis-aws-database-11.5, cis-aws-database-11.7] +prerequisites: [] +severity_boost: {} +--- + +# 11.6 Ensure Monitoring and Logging is Enabled (Manual) + +## Description + +Enable QLDB's built-in logging to capture important system events and database activity. Monitor the logs for any suspicious activities or errors. Leverage Amazon CloudWatch to collect and analyze logs, set up alarms, and receive notifications for potential security incidents. + +## Rationale + +This helps the individual know what is being logged within the activity and determine what next step they should take to address it. + +## Impact + +Monitoring and logging provides visibility into QLDB operations, enabling detection of unauthorized access, performance issues, and security incidents. + +## Audit Procedure + +### Using AWS Console + +1. Enable AWS CloudTrail: + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + - Open the AWS CloudTrail console. + - Create a new trail or select an existing trail. + - Configure the trail to capture QLDB API calls and relevant events. + - Specify the Amazon S3 bucket where the CloudTrail logs will be stored. + - Enable the trail to start capturing QLDB events. +2. Enable Amazon CloudWatch Logs: + - Open the Amazon CloudWatch console. + - Create a new log group or select an existing log group. + - Configure the log group to receive QLDB logs from CloudTrail. + - Define the log retention period to retain the logs for the desired duration. + - Enable CloudWatch Logs to start receiving and storing QLDB logs. +3. Configure Log Metric Filters: + - In the CloudWatch console, go to the log group that contains the QLDB logs. + - Define log metric filters to extract specific information or patterns from the logs. + - Create metric filters based on your monitoring and alerting requirements. + - Specify the target metric and define the filter patterns to match the desired log events. +4. Create CloudWatch Dashboards and Alarms: + - Create CloudWatch dashboards to visualize and monitor important QLDB metrics. + - Customize the dashboard widgets to display relevant log metrics, such as API calls or errors. + - Set up CloudWatch alarms to trigger notifications or automated actions based on specific thresholds or conditions. + - Configure alarm actions, such as sending email notifications or invoking AWS Lambda functions, to respond to critical events. +5. Enable EventBridge Integration (Optional): + - Open the Amazon EventBridge console. + - Create a new rule or select an existing rule. + - Configure the rule to match specific QLDB events or patterns. + - Define targets for the rule, such as invoking Lambda functions or sending notifications to other AWS services. +6. Monitor and Analyze Logs and Metrics: + - Regularly review the CloudWatch logs and metrics for QLDB. + - Monitor key metrics and performance indicators to identify any issues or anomalies. + - Use CloudWatch Logs Insights to query and analyze log data for troubleshooting. +7. Integrate with AWS Monitoring and Alerting Tools: + - Leverage other AWS monitoring and alerting services like AWS X-Ray or AWS ServiceLens to gain deeper insights into QLDB performance and behavior. + - Configure additional alerts or notifications using AWS services like Amazon SNS or AWS Chatbot. +8. Regularly Review and Update Logging and Monitoring Configuration: + - Periodically review and update your CloudTrail, CloudWatch, and EventBridge configurations to align with changes in your monitoring requirements. + - Stay informed about AWS security best practices and new features. + +## Expected Result + +CloudTrail, CloudWatch Logs, metric filters, dashboards, and alarms should be properly configured to provide comprehensive monitoring and logging for QLDB. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable and configure monitoring and logging for your Amazon QLDB environment. + +## Default Value + +QLDB API calls can be captured by CloudTrail. CloudWatch Logs integration and alarms must be manually configured. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.7/SKILL.md new file mode 100644 index 0000000000..e7cbcaeb5c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-11.7/SKILL.md @@ -0,0 +1,102 @@ +--- +name: cis-aws-database-11.7 +description: "Ensure to Enable Backup and Recovery" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, qldb, ledger, backup, recovery, disaster-recovery] +cis_id: "11.7" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-11.5, cis-aws-database-11.6] +prerequisites: [] +severity_boost: {} +--- + +# 11.7 Ensure to Enable Backup and Recovery (Manual) + +## Description + +Having the data backed up ensures that all the crucial information is stored securely it defends against any human errors and system errors that resulted in data loss. An organization that has a disaster recovery plan is prepared for any disruption that would impact business operations. + +## Rationale + +Backup and recovery ensures business continuity and data protection for QLDB ledger data against accidental deletion, corruption, and system failures. + +## Impact + +If a business does not have a backup and recovery plan it would have a negative impact on the business, which would result in less productivity, suffer data loss that cannot be restored, and loss of revenue. + +## Audit Procedure + +### Using AWS Console + +1. Understand QLDB Backup and Recovery Features: + - Familiarize yourself with the built-in backup and recovery capabilities provided by QLDB. + - Understand the concepts of ledgers, revisions, and journal export for backup and restore operations. +2. Determine Backup and Recovery Requirements: + - Assess your organization's backup and recovery requirements for QLDB. + - Define the recovery point objective (RPO) and recovery time objective (RTO) that align with your business needs. + - Determine the desired backup frequency and retention period for your QLDB data. +3. Enable Automatic Backups: + - Open the Amazon QLDB console. + - Select the QLDB ledger for which you want to enable automatic backups. + - Click on the `Configuration` tab. + - Under the `Backup` section, enable automatic backups. + - Specify the desired backup retention period for the automatic backups. +4. Perform Manual Backups (Optional): + - If you need additional backups or want to perform on-demand backups, initiate manual backups. + - Open the Amazon QLDB console. + - Select the QLDB ledger you want to back up. + - Click on the `Backups` tab. + - Choose the `Create Backup` option. + - Provide a meaningful backup name and initiate the backup process. +5. Restore QLDB from Backups: + - Open the Amazon QLDB console. + - Go to the `Backups` tab. + - Select the backup from which you want to restore the QLDB ledger. + - Click on the `Restore` option. + - Specify the desired restoration name and initiate the restoration process. +6. Regularly Test Restore Process: + - Periodically test the restore process to ensure that backups are working correctly. + - Select a backup and initiate the restoration to a separate QLDB ledger. + - Verify that the restored ledger contains the expected data and is accessible. +7. Implement Data Archiving (Optional): + - If you require long-term data retention or compliance with specific data retention policies, consider implementing data archiving strategies. + - Leverage AWS services like Amazon S3 for long-term storage of QLDB journal exports or backups. +8. Disaster Recovery Planning: + - Develop a comprehensive disaster recovery plan for QLDB to mitigate the impact of catastrophic events. + - Consider implementing cross-region replication or multi-region deployments to provide geographic redundancy. + - Test the disaster recovery plan periodically to validate its effectiveness. +9. Monitor Backup and Recovery Operations: + - Regularly monitor backup and recovery operations using Amazon CloudWatch and AWS CloudTrail. + - Set up appropriate alarms and notifications to ensure timely identification of any backup or recovery issues. + +## Expected Result + +Automatic backups should be enabled for QLDB ledgers with appropriate retention periods. The restore process should be regularly tested to ensure data recoverability. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable backup and recovery for your Amazon QLDB ledgers. + +## Default Value + +QLDB provides an immutable journal by design. Export to S3 and backup features must be manually configured. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------- | ---- | ---- | ---- | +| v8 | 11 Data Recovery | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.1/SKILL.md new file mode 100644 index 0000000000..703f02f0ea --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.1/SKILL.md @@ -0,0 +1,95 @@ +--- +name: cis-aws-database-2.1 +description: "Ensure the Use of Security Groups" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, security-groups, vpc, network, firewall] +cis_id: "2.1" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.9] +prerequisites: [] +severity_boost: {} +--- + +# 2.1 Ensure the Use of Security Groups (Manual) + +## Description + +Security groups act as a firewall for associated Amazon RDS DB instances, controlling both inbound and outbound traffic. + +## Rationale + +Creating your severity group either inbound or outbound rules. Inbound rules allow an individual to create a rule that permits the traffic to go to a specific port depending on which source it's coming from. Outbound rules enable your instances to connect with one another allow them to connect to the internet. If needed, you can limit the outgoing traffic. + +## Impact + +Without properly configured security groups, the Aurora database instance may be accessible from unintended sources or may not be able to communicate with required services. + +## Audit Procedure + +### Using AWS Console + +1. Open the Amazon Console +2. Go to Aurora and RDS (https://console.aws.amazon.com/rds/) +3. Click on Databases +4. For each database instance click the name of the instance and check that there is at least one VPC security group under Connectivity & security -> Security -> VPC security groups + +## Expected Result + +Each Aurora DB instance should have at least one VPC security group associated with it, with appropriate inbound and outbound rules configured. + +## Remediation + +### Using AWS Console + +Here is a step-by-step guide on how to create and use Security Groups for an Amazon Aurora instance: + +1. **Sign in to AWS Management Console** + - If you do not already have an AWS account, you'll need to create one at https://aws.amazon.com. + +2. **Navigate to Amazon EC2 Dashboard** + - Once you have logged in to the AWS Management Console, navigate to the EC2 service. You can find this under the `Compute` category. + +3. **Create a New Security Group** + - In the EC2 Dashboard, find the `Network & Security` section on the left-side navigation pane, then click `Security Groups`. + - Click on the `Create Security Group` button. + +4. **Configure the New Security Group** + - In the `Create Security Group` panel, give your new security group a name and a description. + - Select the VPC in which your Amazon Aurora instance will be deployed. + - Then click `Create`. + +5. **Add Rules to the Security Group** + - After creating the Security Group, you can add inbound and outbound rules. + - For Inbound Rules: + - Click on the `Inbound rules` tab, then click `Edit inbound rules`. + - Click `Add Rule`. For the type, select MYSQL/Aurora. For the source, you can specify the IP addresses allowed to access your Amazon Aurora instance. + - For Outbound Rules: + - Click on the `Outbound rules` tab, then click `Edit outbound rules`. Outbound rules allow your instances to communicate with other instances or access the internet. You can restrict outbound traffic if necessary. In most cases, you can leave the default setting, which allows all outbound traffic. + +6. **Assign the Security Group to Amazon Aurora** + - When launching a new Amazon Aurora instance (in the Amazon RDS dashboard), you can select your new security group in the `Configure advanced settings` step. + - If your Aurora instance has already been launched, you can modify it to use the new security group by selecting the instance. + - Click `Modify`, and then select the new security group. + +## Default Value + +When an Aurora DB instance is created, it is associated with the default VPC security group unless a custom security group is specified. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.10/SKILL.md new file mode 100644 index 0000000000..c670fa36b2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.10/SKILL.md @@ -0,0 +1,177 @@ +--- +name: cis-aws-database-2.10 +description: "Ensure Database has IAM Auth is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, iam-auth, authentication, identity, access-control] +cis_id: "2.10" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.4, cis-aws-database-2.7] +prerequisites: [] +severity_boost: {} +--- + +# 2.10 Ensure Database has IAM Auth is Enabled (Manual) + +## Description + +AuroraDB clusters should be configured to leverage AWS IAM authentication for database connections. This ensures that users authenticate using temporary IAM-based tokens rather than static long-lived passwords. + +## Rationale + +Enabling IAM authentication for AuroraDB centralizes and strengthens access control by integrating database authentication with broader AWS IAM identity management. This approach eliminates the risks associated with hard-coded credentials, reduces administrative overhead for password rotation, and allows precise access management using IAM identities and policies. + +## Impact + +With the usage of IAM database authentication instead of static passwords, AuroraDB clusters are protected against credential leakage and weak password practices, making unauthorized access significantly more difficult. This reduces the attack surface, supports audit and compliance, and ensures that database access is tightly aligned with enterprise identity governance and cloud security standards. + +## Audit Procedure + +### Using AWS CLI + +1. List AuroraDB clusters and check IAM authentication status: + +```bash +aws rds describe-db-clusters \ + --query "DBClusters[*].{DBClusterIdentifier:DBClusterIdentifier,IAMDatabaseAuthenticationEnabled:IAMDatabaseAuthenticationEnabled}" \ + --output table +``` + +2. List database users enabled for IAM authentication (Aurora MySQL): + +- For MySQL, connect to the cluster and run below command to ensure that required database users exist for IAM token logins. + +```sql +SELECT user, plugin FROM mysql.user WHERE plugin='AWSAuthenticationPlugin'; +``` + +- For Postgres, connect to the cluster and run below command to verify that necessary users are granted the rds_iam role. + +```sql +SELECT r.rolname +FROM pg_roles AS r +JOIN pg_auth_members AS m ON r.oid = m.member +JOIN pg_roles AS g ON m.roleid = g.oid +WHERE g.rolname = 'rds_iam'; +``` + +The cluster must have IAM database authentication enabled and users intended for IAM authentication must exist in the database engine with appropriate privileges. + +## Expected Result + +- `IAMDatabaseAuthenticationEnabled` should be `true` for all Aurora clusters. +- Database users configured for IAM authentication should exist (using `AWSAuthenticationPlugin` for MySQL or `rds_iam` role for PostgreSQL). + +## Remediation + +### Using AWS CLI + +1. **Enable IAM Database Authentication on the Aurora Cluster** + +Use the AWS CLI to enable IAM authentication for an existing Aurora cluster: + +```bash +aws rds modify-db-cluster \ + --db-cluster-identifier \ + --enable-iam-database-authentication \ + --apply-immediately +``` + +2. **Create Local Database Users Configured for IAM Authentication** + +- For Aurora MySQL: Connect to the database and create or alter users as follows: + +```sql +CREATE USER 'jane_doe' IDENTIFIED WITH AWSAuthenticationPlugin as 'RDS'; +``` + +or + +```sql +ALTER USER 'jane_doe' IDENTIFIED WITH AWSAuthenticationPlugin as 'RDS'; +``` + +- For Aurora PostgreSQL: + +Grant the rds_iam role to eligible users: + +```sql +GRANT rds_iam TO jane_doe; +``` + +3. **Grant Necessary Privileges to the Database Users** + +- Assign required permissions and roles to the users within your DB engine via standard SQL GRANT commands. + +4. **Ensure IAM Users/Roles Have Required AWS Permissions** + +The IAM principal that connects needs the following AWS permission in their policy: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": ["rds-db:connect"], + "Resource": ["arn:aws:rds-db:region:account-id:dbuser:DbClusterResourceId/db-user-name"] + } + ] +} +``` + +- `region` is the AWS Region for the DB cluster +- `account-id` is the AWS account number for the DB cluster. +- `DbClusterResourceId` is the identifier for the DB cluster. This identifier is unique to an AWS Region and never changes. To find a DB cluster resource ID in the AWS Management Console for Amazon Aurora, choose the DB cluster to see its details. Then choose the Configuration tab. The Resource ID is shown in the Configuration section. + +5. **Test the Configuration** + +Use the AWS CLI to generate an authentication token: + +```bash +aws rds generate-db-auth-token \ + --hostname \ + --port 3306 \ + --region \ + --username +``` + +Use the generated token to authenticate to the database, confirming successful login. + +For mysql: + +```bash +mysql --host= \ + --port=3306 \ + --ssl-mode=REQUIRED \ + --enable-cleartext-plugin \ + --user= \ + --password= '' +``` + +For postgres: + +```bash +psql "host= port=5432 dbname= user=<>db_user_name password='' sslmode=require" +``` + +## Default Value + +IAM database authentication is not enabled by default on Aurora clusters. + +## References + +- https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control - Centralize access control for all enterprise assets through a directory service or SSO provider, where supported. | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.11/SKILL.md new file mode 100644 index 0000000000..42747a545f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.11/SKILL.md @@ -0,0 +1,84 @@ +--- +name: cis-aws-database-2.11 +description: "Ensure Database has delete protection enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, deletion-protection, data-protection, availability] +cis_id: "2.11" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.8] +prerequisites: [] +severity_boost: {} +--- + +# 2.11 Ensure Database has delete protection enabled (Manual) + +## Description + +Ensure that delete protection is enabled on database instances to prevent accidental or unauthorized deletion. This setting safeguards critical databases by requiring explicit disabling of delete protection before deletion, reducing the risk of data loss through human error or malicious activity. + +## Rationale + +Delete protection provides a safeguard against inadvertent or malicious deletion of critical databases. By requiring deliberate action to disable deletion protection, organizations mitigate risks associated with accidental data deletion and enhance the overall resilience of their data storage platform. + +## Impact + +Failure to enable delete protection increases the risk of irreversible data loss, potential service disruption, and operational downtime. + +## Audit Procedure + +### Using AWS CLI + +Run the following command to check if deletion protection is enabled on your Aurora DB cluster(s): + +```bash +aws rds describe-db-clusters \ + --query "DBClusters[*].{DBClusterIdentifier:DBClusterIdentifier,DeletionProtection:DeletionProtection}" \ + --output table +``` + +- Review each cluster's DeletionProtection status. +- Clusters marked as true have deletion protection enabled. +- Identify any clusters with deletion protection disabled for remediation. + +## Expected Result + +The `DeletionProtection` field should be `true` for all Aurora DB clusters. + +## Remediation + +### Using AWS CLI + +1. To enable deletion protection on an existing Aurora DB cluster: + +```bash +aws rds modify-db-cluster \ + --db-cluster-identifier \ + --deletion-protection \ + --apply-immediately +``` + +- Replace with your Aurora cluster ID. +- This change is applied immediately without downtime. +- Once enabled, the cluster cannot be deleted without first disabling deletion protection. + +## Default Value + +Deletion protection is enabled by default when creating a new Aurora DB cluster through the AWS Console, but it may not be enabled by default when using the AWS CLI or CloudFormation. + +## References + +- https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4 Secure Configuration of Enterprise Assets and Software - Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications). | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.2/SKILL.md new file mode 100644 index 0000000000..863649c15f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.2/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-aws-database-2.2 +description: "Ensure Data at Rest is Encrypted" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, encryption, kms, data-at-rest] +cis_id: "2.2" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.3] +prerequisites: [] +severity_boost: {} +--- + +# 2.2 Ensure Data at Rest is Encrypted (Manual) + +## Description + +Amazon Aurora allows you to encrypt your databases using keys you manage through AWS Key Management Service (KMS). + +## Rationale + +Databases are likely to hold sensitive and critical data; therefore, it is highly recommended to implement encryption to protect your data from unauthorized access or disclosure. + +## Impact + +Unauthorized users cannot access the data because it is protected by an encryption key that only authorized users can use. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console where the Aurora database cluster you are auditing resides. +2. Navigate to the Amazon Aurora and RDS Dashboard: + - You can find this under the Database category. +3. Select the DB cluster name you wish to audit: + - This opens the details page for your specific Aurora cluster. +4. Check the encryption status under the Configuration section. + - Confirm that the field Encryption is marked as Enabled. +5. Verify KMS key usage (if your organization's standards require a customer-managed key): + - In the Encryption section, identify the AWS KMS key associated with the cluster. Click the key link to open its details page. Confirm that it is a customer-managed KMS key, not an AWS-managed key. + - Review additional key attributes to ensure compliance, including Key policy, Key rotation status, etc. + +## Expected Result + +The Encryption field should be marked as "Enabled" under the Configuration section of the Aurora cluster. If organization standards require it, a customer-managed KMS key should be in use rather than an AWS-managed key. + +## Remediation + +### Using AWS Console + +For existing Aurora databases: In order to encrypt an existing Aurora instance that was not initially created with encryption enabled, you will need to create a snapshot of the instance, make a copy of the snapshot with encryption enabled, and then restore the DB instance from the copied snapshot. + +For creating new Aurora databases with encryption at rest enabled: + +1. **Sign in to AWS Management Console** + - If you do not already have an AWS account, you'll need to create one at https://aws.amazon.com + +2. **Navigate to the Amazon Aurora and RDS Dashboard:** + - You can find this under the Database category. + +3. Click on `Create Database` and choose Aurora as your engine option. + +4. In the `Additional Configuration` section, you will see an option labeled `Enable encryption`. Check this box to enable encryption for data at rest. + - You will also need to select a master key to use for encryption. You can choose the default AWS managed key for RDS or a pre-created customer-managed AWS Key Management Service (KMS) that aligns with your organization's key management policies. + +5. **Launch the DB Instance** + - After you have selected the appropriate encryption settings, click `Create database`. + - Review your settings on the following page, and if everything looks correct, click `Launch DB Instance`. + +## Default Value + +Encryption at rest can be enabled when creating a new Aurora DB cluster. Once created, encryption cannot be changed. By default, encryption is not enabled unless specified during creation. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data. | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest - Encrypt all sensitive information at rest using a tool that requires a secondary authentication mechanism not integrated into the operating system, in order to access the information. | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.3/SKILL.md new file mode 100644 index 0000000000..78901eeb69 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.3/SKILL.md @@ -0,0 +1,120 @@ +--- +name: cis-aws-database-2.3 +description: "Ensure Data in Transit Encryption is Enforced" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, encryption, tls, ssl, data-in-transit] +cis_id: "2.3" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.2] +prerequisites: [] +severity_boost: {} +--- + +# 2.3 Ensure Data in Transit Encryption is Enforced (Manual) + +## Description + +Use TLS (Transport Layer Security) to secure data in transit. Aurora supports TLS-encrypted connections between your application and your DB instance, and this configuration can be enforced so non-TLS connections are prohibited. + +## Rationale + +Encrypting data in transit protects sensitive information from interception and tampering by unauthorized parties. Aurora supports TLS for securing client connections, however it is essential to ensure that client applications are properly configured to use TLS and that the database enforces encrypted connections. + +## Impact + +Disabling or failing to properly configure TLS can expose the data to be compromised by malicious actors, potentially resulting in data breaches, credential theft, or other security compromises. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console where the Aurora database cluster you are auditing resides. +2. Navigate to the Amazon Aurora and RDS Dashboard: + - You can find this under the Database category. +3. Select the DB cluster name you wish to audit: + - This opens the details page for your specific Aurora cluster. +4. Under Configuration, locate the DB cluster parameter group attached to this cluster: + - Click on the parameter group name to review its parameters. +5. Verify the following engine-specific parameters to confirm encryption in transit is enforced: + - **PostgreSQL:** Confirm that `rds.force_ssl = 1` + - **MySQL:** Confirm that `require_secure_transport = ON` (Only applicable for Aurora MySQL versions 2 and 3) + +**Notes:** + +- Make sure the parameter changes are applied and the cluster has been rebooted if necessary for the parameters to take effect. + +## Expected Result + +- For PostgreSQL Aurora clusters: `rds.force_ssl` should be set to `1` +- For MySQL Aurora clusters: `require_secure_transport` should be set to `ON` + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console where the Aurora database cluster you are remediating resides. +2. Navigate to the Amazon Aurora and RDS Dashboard: + - You can find this under the Database category. +3. Select the DB cluster name you wish to remediate: + - This opens the details page for your specific Aurora cluster. +4. Under Configuration, locate the DB cluster parameter group attached to this cluster: + - Click on the parameter group name to remediate its parameters. +5. Update the following engine-specific parameters to enforce encryption in transit at the database level: + - **PostgreSQL:** Set `rds.force_ssl = 1` + - **MySQL:** Set `require_secure_transport = ON` (applicable to Aurora MySQL versions 2 and 3 only). +6. Reboot the database cluster to apply the parameter changes. +7. Configure your client application for SSL/TLS connections: + - Download the appropriate AWS-provided SSL/TLS certificates. + +For MySQL-compatible Aurora, Amazon provides an SSL certificate that you can download from their documentation. PostgreSQL-compatible Aurora uses the default PostgreSQL SSL certificate. + +Once you have the appropriate certificate, you must configure your client application to use SSL/TLS. For example, in MySQL, you might use a command like this: + +```bash +mysql -h --ssl-ca= --ssl-mode=VERIFY_IDENTITY +``` + +For PostgreSQL, you might use a command like this: + +```bash +psql "host= sslmode=verify-ca sslrootcert=" +``` + +Replace `` with the endpoint for your DB instance, and replace `` with the path to the SSL certificate on your local machine. + +8. **Verify Encryption** After configuring your client to use SSL/TLS, you should verify that encryption in transit is working correctly. You can do this by checking the status of the SSL connection from within the database itself. For example, in MySQL, you can run the following command: + +```sql +SHOW STATUS LIKE 'Ssl_cipher'; +``` + +In PostgreSQL, you can run the following command: + +```sql +SHOW ssl; +``` + +In both cases, if SSL is enabled, you should see a non-empty cipher suite or on as a result. + +## Default Value + +Aurora supports TLS connections by default, but enforcement of TLS-only connections requires explicit configuration of the cluster parameter group. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit - Encrypt sensitive data in transit. Example implementations can include: Transport Layer Security (TLS) and Open Secure Shell (OpenSSH). | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit - Encrypt all sensitive information in transit. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.4/SKILL.md new file mode 100644 index 0000000000..db033f2cbf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.4/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-database-2.4 +description: "Ensure IAM Roles and Policies are Created" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, iam, roles, policies, access-management] +cis_id: "2.4" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.7, cis-aws-database-2.10] +prerequisites: [] +severity_boost: {} +--- + +# 2.4 Ensure IAM Roles and Policies are Created (Manual) + +## Description + +AWS Identity and Access Management (IAM) helps manage access to AWS resources. While you cannot directly associate IAM roles with Amazon Aurora instances, you can use IAM roles and policies to define which AWS IAM users and groups have management permissions for Amazon RDS resources and what actions they can perform. Here is a guide: + +## Rationale + +Individual creates IAM roles and polices that define specific permission given to that role. This determines what the identity or instance can and cannot do. + +## Impact + +If an IAM Role is not created, then it would be challenging to access AWS resources. + +## Audit Procedure + +### Using AWS Console + +1. **Sign in to AWS Management Console** + - If you do not already have an AWS account, you will need to create one at https://aws.amazon.com. + +2. **Navigate to IAM Dashboard** + - Navigate to the IAM service once logged in to the AWS Management Console. + - This is under the `Security, Identity, & Compliance` category. + +3. **Create a New IAM Role** + - In the IAM Dashboard, find the `Roles` section on the left-side navigation pane and click on it. Then, click on the `Create Role` button. + +4. **Select the Service that will Use the Role** + - Choose `RDS` as the AWS service that will use this new role, then click `Next: Permissions`. + +5. **Attach Policy** + - In the next screen, you can attach policies defining this role's permissions. You can use the filter to find existing policies like `AmazonRDSFullAccess` or `AmazonRDSReadOnlyAccess`. + - Select the appropriate policy and then click `Next: Tags`. + +6. **Add Tags (Optional)** + - You can add metadata to the role by attaching tags as key-value pairs. This is optional, and you can proceed to the next step if you do not wish to add tags. + +7. **Review** + - Provide a name and a description for the role. Review the role and then click `Create Role`. + +8. **Creating IAM Policy (Optional)** + - You can create a custom IAM policy if the predefined policies do not meet your requirements. + - Navigate to `Policies` in the IAM dashboard and click `Create Policy`. + - Use the visual editor or JSON editor to define the permissions. + - Once done, click `Review Policy`, give it a name and a description, and click `Create Policy`. + - You can then attach this custom policy to the IAM role. + +9. **Assign the IAM Role to an IAM User or Group** + - To assign the newly created role to an IAM User or Group: + - Navigate to the user or group in the IAM dashboard. + - Click `Add permissions`. + - Then `Attach existing policies directly`. + - Use the filter to find your new role and select it. + - Click `Next: Review` and then `Add permissions`. + +## Expected Result + +IAM roles with appropriate policies should exist for managing Amazon Aurora/RDS resources. Users and groups should have the necessary IAM roles attached. + +## Remediation + +Follow the audit procedure steps above to create IAM roles and policies for Amazon Aurora access management. + +## Default Value + +No Aurora-specific IAM roles are created by default. Users must create and configure IAM roles and policies according to their access management requirements. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.5/SKILL.md new file mode 100644 index 0000000000..e6dfb50c06 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.5/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-aws-database-2.5 +description: "Ensure Database Audit Logging is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, logging, audit, cloudtrail, activity-streams] +cis_id: "2.5" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.4] +prerequisites: [] +severity_boost: {} +--- + +# 2.5 Ensure Database Audit Logging is Enabled (Manual) + +## Description + +Amazon Aurora provides advanced auditing capabilities through AWS CloudTrail and Amazon RDS Database Activity Streams. Here is a step-by-step guide on how to enable and use these features: + +## Rationale + +Allows individuals to access and retrieve their old logs, log their new events, and store their log. + +## Impact + +Without audit logging enabled, it becomes difficult to track database access, detect unauthorized activities, and meet compliance requirements. + +## Audit Procedure + +### Using AWS Console + +**Enabling logging through AWS CloudTrail:** + +1. **Sign in to AWS Management Console** + - If you do not already have an AWS account, you will need to create one at https://aws.amazon.com. + +2. **Navigate to CloudTrail Dashboard** + - Navigate to the CloudTrail service. + - You can find this under the `Management & Governance` category. + +3. **Create a new trail** + - In the CloudTrail Dashboard, click on `Create trail`. + - Provide a name for the trail, and specify the S3 bucket where you want the logs to be stored. + +4. **Configure trail settings** + - Choose the settings that meet your requirements. For instance, you can log events for all regions, or you can log management events, data events, or both. + +5. **Create the trail** + - After specifying the trail settings, click `Create`. + +**Enabling logging through Amazon Database Activity Streams:** + +1. **Navigate to Amazon RDS Dashboard** + - In the AWS Management Console, navigate to the RDS service. + - You can find this under the `Database` category. + +2. **Choose your Aurora DB instance** + - In the RDS Dashboard, click on `Databases`, and then click on the name of your Aurora DB instance. + +3. **Enable Database Activity Streams** + - In the `Connectivity & Security` tab, find the `Database Activity Streams` section. Click `Create stream`. + - In the `Create Stream` panel, choose the settings that meet your requirements and click `Create`. + +**Note**: Enabling Database Activity Streams can impact the performance of your DB instance, so you should test this feature in a non-production environment before enabling it in production. + +4. **View the Database Activity Stream** + - You can view the Database Activity Stream using Amazon Kinesis Data Streams. + - In the Kinesis Data Streams dashboard, click on the stream's name and then click `View data`. + +## Expected Result + +- A CloudTrail trail should be configured to log Aurora/RDS API events. +- Database Activity Streams should be enabled for Aurora clusters requiring detailed database-level audit logging. + +## Remediation + +Follow the audit procedure steps above to enable CloudTrail logging and/or Database Activity Streams for Aurora clusters. + +## Default Value + +CloudTrail logs management events by default, but a trail must be created to store and retain logs. Database Activity Streams are not enabled by default. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process - Establish and maintain an audit log management process that defines the enterprise's logging requirements. At a minimum, address the collection, review, and retention of audit logs for enterprise assets. Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard. | x | x | x | +| v7 | 6.2 Activate audit logging - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.6/SKILL.md new file mode 100644 index 0000000000..e4b23c267a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.6/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-aws-database-2.6 +description: "Ensure Passwords are Regularly Rotated" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, passwords, rotation, credentials, access-management] +cis_id: "2.6" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.4, cis-aws-database-2.7] +prerequisites: [] +severity_boost: {} +--- + +# 2.6 Ensure Passwords are Regularly Rotated (Manual) + +## Description + +Regularly rotating your Aurora passwords is critical to access management, contributing to maintaining system security. The database password can be rotated in Amazon Aurora, but the access keys refer to the rotation of AWS IAM User access keys. + +## Rationale + +Updating your password is critical to access AWS resources. This also ensures that your account is being kept safe from a potential threat. + +## Impact + +Having the passwords updated frequently allows only the authorized individual to access the AWS resources. + +## Audit Procedure + +### Using AWS Console + +1. **Sign in to AWS Management Console** + - If you do not already have an AWS account, you will need to create one at https://aws.amazon.com. + +2. **Navigate to Amazon RDS Dashboard** + - Navigate to the RDS service once logged in to the AWS Management Console. You can find this under the `Database` category. + +3. **Choose your Aurora DB instance** + - In the RDS Dashboard, click on `Databases`, and then click on the name of your Aurora DB instance. + +4. **Modify the instance** + - Click `Modify`. + - In the `Settings` section, enter a new password in the `Master password` and `Confirm password` fields. + +5. **Apply the changes** + - Scroll to the bottom and choose when to apply the changes. You can apply them immediately or schedule them for the next maintenance window. + - Then, click `Continue` and `Modify DB Instance`. + +**Note**: Changing the master password will reboot the DB instance if you apply the change immediately. + +## Expected Result + +The Aurora DB instance master password should be rotated on a regular schedule according to organizational password policies. + +## Remediation + +Follow the audit procedure steps above to rotate Aurora database passwords. Consider using AWS Secrets Manager for automated password rotation. + +## Default Value + +AWS does not enforce automatic password rotation for Aurora database master passwords by default. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.2 Use Unique Passwords - Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA. | x | x | x | +| v7 | 4.4 Use Unique Passwords - Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.7/SKILL.md new file mode 100644 index 0000000000..030462fd5a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.7/SKILL.md @@ -0,0 +1,114 @@ +--- +name: cis-aws-database-2.7 +description: "Ensure Least Privilege Access" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, least-privilege, iam, polp, access-control] +cis_id: "2.7" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.4, cis-aws-database-2.10] +prerequisites: [] +severity_boost: {} +--- + +# 2.7 Ensure Least Privilege Access (Manual) + +## Description + +Use the principle of least privilege when granting access to your Amazon Aurora resources. This principle of least privilege (POLP) is a computer security concept where users are given the minimum access levels necessary to complete their job functions. + +In Amazon Aurora, this can be implemented at various levels, including AWS IAM for managing AWS resources and within the database for managing database users and roles. + +Here is a step-by-step guide for each: + +## Rationale + +POLP limits the user interaction on the database, and it only gives the database permission to complete the necessary or mandatory task. AWS IAM gives permission for what the entity can and cannot do. Incorporating both POLP and AWS IAM in a database gives limited permission to the user to complete the tasks. + +## Impact + +Users would need to create a IAM role to implement POLP into their database. + +## Audit Procedure + +### Implementing POLP with AWS IAM + +#### Using AWS Console + +1. **Sign in to AWS Management Console** + - If you do not already have an AWS account, you will need to create one at https://aws.amazon.com. + +2. **Navigate to IAM Dashboard** + - Navigate to the IAM service once logged in to the AWS Management Console. + - You can find this under the `Security, Identity, & Compliance` category. + +3. **Create a new IAM role or user** + - If creating a new IAM role or user, click `Roles` or `Users`. + - Then `Create role` or `Create user`. + +4. **Attach minimum necessary permissions** + - When attaching policies, give only the permissions necessary to perform the intended tasks. + - AWS provides many predefined policies designed following the POLP. You can create a custom policy with precise permissions if none suits your needs. + +### Implementing POLP within Amazon Aurora + +1. **Log into your Aurora Database** + - Depending on your Aurora database engine, you can log in through the terminal using a MySQL or PostgreSQL client. You'll need your host endpoint, username, and password to log in. + +2. **Create a new user** + - You can create a new user with the CREATE USER command in SQL. + +For example: + +```sql +CREATE USER ''@'' IDENTIFIED BY 'password'; +``` + +3. **Grant minimal necessary privileges** + - After creating the user, you can grant privileges using the GRANT command. The privileges should be as limited as possible for the user to perform their necessary functions. + +For example: + +```sql +GRANT SELECT, INSERT ON TO ''@''; +``` + +4. **Regularly review permissions** + - It is essential to regularly review and update permissions to make sure they adhere to the principle of least privilege. You can view a user's permissions with the SHOW GRANTS command; for example: + +```sql +SHOW GRANTS FOR ''@''; +``` + +## Expected Result + +- IAM roles and users should have only the minimum permissions necessary for their function. +- Database users should have only the specific privileges required for their tasks, not broad or administrative access. + +## Remediation + +This is important because it reduces and secures any possible threat that an unauthorized user can gain by hacking into the system. + +Follow the audit procedure steps above to implement least privilege access at both the AWS IAM level and within the Aurora database. + +## Default Value + +By default, newly created IAM users have no permissions. Database master users created during Aurora cluster setup have full administrative privileges. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.8/SKILL.md new file mode 100644 index 0000000000..7fc039fd17 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.8/SKILL.md @@ -0,0 +1,84 @@ +--- +name: cis-aws-database-2.8 +description: "Ensure Automatic Backups and Retention Policies are configured" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, backup, retention, disaster-recovery, data-protection] +cis_id: "2.8" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.11] +prerequisites: [] +severity_boost: {} +--- + +# 2.8 Ensure Automatic Backups and Retention Policies are configured (Manual) + +## Description + +Backups help protect your data from accidental loss or database failure. With Amazon Aurora, you can turn on automatic backups and specify a retention period. The backups include a daily snapshot of the entire DB instance and transaction logs. + +## Rationale + +The individual logs into their account and chooses their database once selected they can modify the backup settings. To have the database being backed up automatically the individual is encouraged to select from 1 to 35 days. This ensures that the file is being saved automatically and can prevent it from accidental loss. This ensures that the individual can restore their files quickly in the event of a data loss. + +## Impact + +It would result in having the files protected and being able to retrieve those files in the event of an accidental loss. + +## Audit Procedure + +### Using AWS Console + +1. **Sign in to AWS Management Console** + - If you do not already have an AWS account, you will need to create one at https://aws.amazon.com. + +2. **Navigate to Amazon RDS Dashboard** + - Navigate to the RDS service once logged in to the AWS Management Console. + - You can find this under the `Database` category. + +3. **Choose your Aurora DB instance** + - In the RDS Dashboard, click on `Databases`. + - Then click on the name of your Aurora DB instance. + +4. **Check or modify the backup settings** + - In the `Details` section, find the `Backup` section. + - Here, you can see if automatic backups are enabled (the `Backup retention period` is more than 0 days) and when the backup window is. + - To modify these settings, click `Modify`. + - In the `Backup` section of the `Modify DB instance` screen, you can change the `Backup retention period` and the `Backup window`. + - The retention period can be between 1 and 35 days. To disable automatic backups, set the retention period to 0 days. + +5. **Apply the changes** + - Scroll to the bottom and choose when to apply the changes. You can apply them immediately or schedule them for the next maintenance window. + - Then, click `Continue` and `Modify DB Instance`. + +## Expected Result + +Automatic backups should be enabled with a `Backup retention period` greater than 0 days. The retention period should align with organizational data retention and recovery requirements (recommended: 7-35 days). + +## Remediation + +This is important because it would allow the user to automatically save their files and instantly have access to their files when needed. + +Follow the audit procedure steps above to configure automatic backups and set an appropriate retention period. + +## Default Value + +Amazon Aurora automatically enables backups with a default retention period of 1 day. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 11 Data Recovery - Establish and maintain data recovery practices sufficient to restore in-scope enterprise assets to a pre-incident and trusted state. | | | | +| v7 | 10 Data Recovery Capabilities - Data Recovery Capabilities | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.9/SKILL.md new file mode 100644 index 0000000000..6d74a7e643 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-2.9/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-aws-database-2.9 +description: "Ensure Database is not Publicly accessible" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, aurora, public-access, network, vpc, security] +cis_id: "2.9" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-2.1, cis-aws-database-2.11] +prerequisites: [] +severity_boost: {} +--- + +# 2.9 Ensure Database is not Publicly accessible (Manual) + +## Description + +AuroraDB databases must not be publicly accessible. This means the database's network configuration should prevent assignment of public IP addresses or exposure to the public internet, ensuring that connections are only permitted from trusted internal networks. + +## Rationale + +Restricting public access to databases greatly reduces the attack surface for malicious actors. Publicly accessible databases are highly vulnerable to unauthorized login attempts, exploitation of software vulnerabilities and data breaches. Enforcing private access restricts connectivity and enforces the principle of least privilege and network segmentation. + +## Impact + +If public access is not properly restricted on databases, data stored in the database is at risk of exposure to the internet, increasing the likelihood of data loss and service disruption. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console where the Aurora database cluster you are auditing resides. +2. Navigate to the Amazon Aurora and RDS Dashboard. + - You can find this under the Database category. +3. Select the DB instance name you wish to audit. + - This opens the details page for your specific Aurora DB instance. +4. Under the Connectivity & security tab, check the value of Publicly accessible: + - If Set to No, the instance is not publicly accessible; no further network verification is needed. + - If Set to Yes, continue with additional steps to fully assess exposure. +5. In the Networking section under Connectivity & security, locate the Subnets for the database: + - Right-click on the subnet link and open it in a new tab for further inspection. +6. With the subnet selected, review the attached Route Table: + - Check for routes with Destination: 0.0.0.0/0 and Target: an Internet Gateway (ID starts with igw-). + - If such a route exists, it enables access to the database from the public internet. + +If the database is marked as "Publicly accessible: Yes" and the subnets contain a route to 0.0.0.0/0 via an Internet Gateway, the instance is exposed to the public internet. + +### Using AWS CLI + +1. List your Aurora cluster's DB instances with: + +```bash +aws rds describe-db-instances --query "DBInstances[?DBClusterIdentifier==''].DBInstanceIdentifier" +``` + +Replace with your actual Aurora cluster identifier. + +2. For each DB instance, check public accessibility: + +```bash +aws rds describe-db-instances --db-instance-identifier --query "DBInstances[0].PubliclyAccessible" +``` + +## Expected Result + +The `PubliclyAccessible` field should be set to `No` (or `false` via CLI) for all Aurora DB instances. No subnets associated with the database should have routes to an Internet Gateway (0.0.0.0/0 via igw-). + +## Remediation + +### Using AWS CLI + +Remediation Instructions: Make Aurora DB Instance Non-Publicly Accessible (AWS CLI) Identify all DB instances in the Aurora cluster: + +1. List your Aurora cluster's DB instances with: + +```bash +aws rds describe-db-instances --query "DBInstances[?DBClusterIdentifier==''].DBInstanceIdentifier" +``` + +Replace with your actual Aurora cluster identifier. + +2. For each DB instance, run the following command: + +```bash +aws rds modify-db-instance --db-instance-identifier --no-publicly-accessible --apply-immediately +``` + +Replace with the name of your DB instance. The --apply-immediately flag ensures the change is applied right away. + +3. Verify changes - confirm that "Publicly Accessible" is now set to "No" for each DB instance: + +```bash +aws rds describe-db-instances --db-instance-identifier --query "DBInstances[0].PubliclyAccessible" +``` + +## Default Value + +When creating an Aurora DB instance, the "Publicly accessible" setting defaults to "No" unless explicitly set to "Yes" during creation. + +## References + +- https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.12 Segment Data Processing and Storage Based on Sensitivity - Segment data processing and storage based on the sensitivity of the data. Do not process sensitive data on enterprise assets intended for lower sensitivity data. | | x | x | +| v8 | 4 Secure Configuration of Enterprise Assets and Software - Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications). | | | | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.1/SKILL.md new file mode 100644 index 0000000000..6938a1c2fe --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.1/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-database-3.1 +description: "Ensure to Choose the Appropriate Database Engine" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, engine-selection, architecture] +cis_id: "3.1" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.2, cis-aws-database-3.3] +prerequisites: [] +severity_boost: {} +--- + +# 3.1 Ensure to Choose the Appropriate Database Engine (Manual) + +## Description + +This control ensures that the appropriate database engine is selected for the application's requirements on Amazon RDS. + +## Rationale + +Choosing the right database engine is critical for application performance, scalability, and security. Amazon RDS supports several popular relational database engines, including MySQL, PostgreSQL, MariaDB, Oracle Database, and Microsoft SQL Server. + +## Impact + +Selecting an inappropriate database engine may lead to performance issues, compatibility problems, higher costs, and security vulnerabilities. + +## Audit Procedure + +### Using AWS Console + +1. Evaluate Your Requirements + - Understand your application's specific requirements, such as performance, scalability, data volume, and compatibility with existing systems. + - Consider factors like data structure, workload type (OLTP or OLAP), and specific features required by your application. + +2. Research Available Database Engines + - Familiarize yourself with the available database engine options supported by Amazon RDS. + - Research each database engine's capabilities, features, performance characteristics, and licensing models. + +3. Compare Features and Compatibility + - Compare the features and capabilities of each database engine with your application's requirements. + - Evaluate data types, indexing options, query optimization, high availability, replication, and backup and restore capabilities. + - Consider compatibility with your existing applications, frameworks, and tools. + +4. Evaluate Performance and Scalability + - Consider the performance characteristics of each database engine, including throughput, latency, and concurrency capabilities. + - Evaluate scalability options, such as horizontal scaling or vertical scaling. + - Analyze benchmarks, customer reviews, and case studies to gain insights into the performance of each database engine. + +5. Consider Managed Database Services + - Assess the benefits of Amazon RDS managed database services, such as Amazon Aurora, which offers high performance, scalability, and built-in fault tolerance. + - Evaluate the additional features and optimizations Amazon Aurora provides compared to traditional database engines. + +6. Evaluate Licensing and Costs + - Consider the licensing models and costs associated with each database engine, including license fees and support costs. + - Evaluate the pricing structure of the database engines in terms of instance types, storage, data transfer, and other factors. + +7. Determine Vendor Support + - Evaluate the level of support the database engine vendors provide, including documentation, forums, community support, and enterprise support options. + - Consider the vendor's reputation, track record, and commitment to security and compliance. + +8. Make an Informed Decision + - Select the database engine that best aligns with your application requirements, performance needs, scalability goals, compatibility, and budget based on your evaluation and analysis. + - Consider long-term considerations such as potential future growth, flexibility, and ease of migration to other database engines if needed. + +## Expected Result + +The selected database engine should align with the application's specific requirements for performance, scalability, compatibility, and cost. + +## Remediation + +Review and evaluate the current database engine selection against the audit criteria above. If the current engine does not meet requirements, plan a migration to a more appropriate engine. + +### Using AWS Console + +Follow the audit steps above to evaluate and select the appropriate database engine. Create a new RDS instance with the chosen engine or plan migration from the existing engine. + +## Default Value + +No default database engine is pre-selected; users must choose during RDS instance creation. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.2 Ensure Authorized Software is Currently Supported | x | x | x | +| v7 | 2.2 Ensure Software is Supported by Vendor | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.10/SKILL.md new file mode 100644 index 0000000000..9d7a2a406c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.10/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-aws-database-3.10 +description: "Ensure to Enable Backup and Recovery" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, backup, recovery, snapshot, point-in-time] +cis_id: "3.10" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.2, cis-aws-database-3.14] +prerequisites: [] +severity_boost: {} +--- + +# 3.10 Ensure to Enable Backup and Recovery (Manual) + +## Description + +The individual logs into their AWS account and chooses their Amazon relational database that they want to backup. To have the database being backed up automatically the individual is encouraged to enable backup. This ensures that the file is being saved automatically and can prevent it from accidental loss. This ensures that the individual can restore their files quickly in the event of a data loss. + +## Rationale + +Backups are essential for data protection, disaster recovery, and business continuity. Enabling automated backups ensures data can be restored in the event of accidental deletion, corruption, or system failure. + +## Impact + +It would result in having the files protected and being able to retrieve those files in the event of an accidental loss. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon RDS Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/rds/. + +3. Select the RDS Instance + - Choose the Amazon RDS instance you want to implement backup and recovery. + - Click on the instance name to access its details page. + - In the instance details page, navigate to the `Backup & Restore` or `Backup` section. + +4. Configure Automated Backups + - Under the `Backup` section. + - Click the `Modify` or `Edit` option to configure automated backups. + - Enable automated backups by selecting the desired backup retention period. + - Specify the preferred backup window during which automated backups can occur. + - Choose whether to enable Multi-AZ backups for enhanced durability and availability. + - Click `Continue` or `Save` to apply the changes. + +5. Restore from Backups + - In the Amazon RDS console, click on `Snapshots` or `Instances` in the left-side menu. + - Select the snapshot or instance from which you want to perform a restore. + - Click `Restore snapshot` or `Restore to point in time` to initiate restoration. + - Configure the parameters for the restored instance, such as instance identifier, instance class, storage type, and VPC settings. + - Specify the desired option for creating a new DB instance or restoring to an existing DB instance. + - Configure additional settings, such as enabling Multi-AZ deployment or enabling encryption. + - Click "Restore" or "Create" to initiate the restore process. + +6. Test and Validate the Restored Instance + - After completing the restore process, test the restored RDS instance to ensure it functions as expected. + - Verify the data, configuration, and connectivity of the restored instance. + +7. Monitor and Manage Backups + - Regularly monitor the status and health of your automated backups and manual snapshots. + - Review the backup retention policy and adjust it to align with your business requirements. + - Manage and delete older backups or snapshots to free up storage and reduce costs. + +8. Perform Point-in-Time Recovery (Optional) + - In the Amazon RDS console, click on "Snapshots" or `Instances` in the left-side menu. + - Select the instance for which you want to perform point-in-time recovery. + - Click on `Restore to point in time` to initiate the point-in-time recovery process. + - Specify the desired timestamp or time range to restore to. + - Configure the parameters for the restored instance, similar to the restore from the backup process. + - Click `Restore` or "Create" to initiate the point-in-time recovery process. + +## Expected Result + +Automated backups should be enabled with an appropriate retention period (minimum 7 days recommended), and the backup window should be configured during low-traffic periods. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable automated backups. Set the backup retention period to at least 7 days and configure a preferred backup window. + +## Default Value + +Automated backups are enabled by default with a 1-day retention period when creating a new RDS instance. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------- | ---- | ---- | ---- | +| v8 | 11 Data Recovery | | | | +| v7 | 10 Data Recovery Capabilities | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.11/SKILL.md new file mode 100644 index 0000000000..80598f6860 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.11/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-aws-database-3.11 +description: "Ensure to Regularly Review Security Configuration" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, security-review, configuration, hardening] +cis_id: "3.11" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: + [cis-aws-database-3.4, cis-aws-database-3.5, cis-aws-database-3.6, cis-aws-database-3.7, cis-aws-database-3.9] +prerequisites: [] +severity_boost: {} +--- + +# 3.11 Ensure to Regularly Review Security Configuration (Manual) + +## Description + +This helps by reviewing the database factors from database engine, review instance details, security networks, encryption settings, audit logging, and authentication. By updating or removing a few things from these lists it helps tighten security and ensures that the users do not have excessive permissions. + +## Rationale + +Regular security configuration reviews ensure that security controls remain effective and aligned with organizational security policies and best practices. + +## Impact + +Updating the system and being updated with security configurations keeps everything secure and prevents it from an attack. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon RDS Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/rds/. + +3. Select the RDS Instance + - Choose the Amazon RDS instance you want to review the security configuration. + - Click on the instance name to access its details page. + +4. Review the Database Engine Documentation + - Refer to the documentation provided by the database engine vendor (e.g., MySQL, PostgreSQL, Oracle, SQL Server) to understand the security best practices and configuration options specific to the database engine you use on Amazon RDS. + - Review the vendor's guidelines for securing the database engine and associated components. + +5. Review the Instance Details + - In the instance details page, review the configuration settings related to security. + - Security group associations: Ensure the appropriate security groups are assigned to the RDS instance to control inbound and outbound traffic. + - IAM database authentication: Verify if IAM database authentication is enabled for enhanced security. + - Encryption at rest: Confirm if encryption at rest is enabled using either AWS-managed keys or customer-managed keys. + - Encryption in transit: Check if SSL/TLS encryption is enabled for secure data transmission. + - Backup and retention: Review the automated backup settings and retention period to ensure data recovery capability. + +6. Review Database User Privileges + - Click `Users` in the Amazon RDS console menu. + - Review the privileges assigned to database users. + - Ensure that the least privileged access is implemented, granting only necessary privileges to each user or role. + +7. Review Audit and Logging Configuration + - In the Amazon RDS console, navigate to the `Configuration` or `Monitoring & Logs` section. + - Review the settings related to database audit logging and logging. + - Ensure appropriate logs are enabled and configured to capture necessary information for security analysis and monitoring. + +8. Review Network Security + - In the Amazon RDS console, navigate to the `Connectivity & Security` or `Security` section. + - Review the network security settings, including the associated security groups and their rules. + - Verify that only necessary ports are open, and access is restricted to trusted sources. + +9. Review and Address Security Recommendations + - Periodically review the security recommendations provided by AWS through the Amazon RDS console or the AWS Trusted Advisor service. + - Address any security recommendations promptly to ensure a secure configuration. + +10. Document and Update + - Document the security configuration settings and any changes made during the review process. + - Maintain an up-to-date inventory of the security controls and configurations implemented for your RDS instances. + +## Expected Result + +All security configurations should be reviewed and documented. Security groups, encryption, authentication, logging, and backup settings should align with organizational security policies. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to review and address any security configuration gaps. Create a regular schedule for security configuration reviews (e.g., quarterly). + +## Default Value + +No automatic security configuration review is provided. This is a manual process that must be established by the organization. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5 Account Management | | | | +| v7 | 5 Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.12/SKILL.md new file mode 100644 index 0000000000..14b521a86f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.12/SKILL.md @@ -0,0 +1,122 @@ +--- +name: cis-aws-database-3.12 +description: "Ensure Database is not Publicly accessible" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, public-access, network-security, exposure] +cis_id: "3.12" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.3, cis-aws-database-3.4] +prerequisites: [] +severity_boost: {} +--- + +# 3.12 Ensure Database is not Publicly accessible (Manual) + +## Description + +RDS databases must not be publicly accessible. This means the database's network configuration should prevent assignment of public IP addresses or exposure to the public internet, ensuring that connections are only permitted from trusted internal networks. + +## Rationale + +Restricting public access to databases greatly reduces the attack surface for malicious actors. Publicly accessible databases are highly vulnerable to unauthorized login attempts, exploitation of software vulnerabilities and data breaches. Enforcing private access restricts connectivity and enforces the principle of least privilege and network segmentation. + +## Impact + +If public access is not properly restricted on databases, data stored in the database is at risk of exposure to the internet, increasing the likelihood of data loss and service disruption. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console where the RDS database cluster you are auditing resides. + +2. Navigate to the Amazon Aurora and RDS Dashboard. + - You can find this under the Database category. + +3. Select the DB instance name you wish to audit. + - This opens the details page for your specific RDS DB instance. + +4. Under the Connectivity & security tab, check the value of Publicly accessible: + - If Set to No, the instance is not publicly accessible; no further network verification is needed. + - If Set to Yes, continue with additional steps to fully assess exposure. + +5. In the Networking section under Connectivity & security, locate the Subnets for the database: + - Right-click on the subnet link and open it in a new tab for further inspection. + +6. With the subnet selected, review the attached Route Table: + - Check for routes with Destination: 0.0.0.0/0 and Target: an Internet Gateway (ID starts with igw-). + - If such a route exists, it enables access to the database from the public internet. + +If the database is marked as "Publicly accessible: Yes" and the subnets contain a route to 0.0.0.0/0 via an Internet Gateway, the instance is exposed to the public internet. + +### Using AWS CLI + +List your RDS cluster's DB instances with: + +```bash +aws rds describe-db-instances --query "DBInstances[?DBClusterIdentifier==''].DBInstanceIdentifier" +``` + +For each DB instance, verify the PubliclyAccessible setting: + +```bash +aws rds describe-db-instances --db-instance-identifier --query "DBInstances[0].PubliclyAccessible" +``` + +## Expected Result + +All RDS instances should have `PubliclyAccessible` set to `No` (false). Subnets associated with RDS instances should not have routes to the internet via an Internet Gateway. + +## Remediation + +### Using AWS CLI + +1. List your RDS cluster's DB instances with: + +```bash +aws rds describe-db-instances --query "DBInstances[?DBClusterIdentifier==''].DBInstanceIdentifier" +``` + +- Replace with your actual RDS cluster identifier. + +2. For each DB instance, run the following command: + +```bash +aws rds modify-db-instance --db-instance-identifier --no-publicly-accessible --apply-immediately +``` + +- Replace with the name of your DB instance. The --apply-immediately flag ensures the change is applied right away. + +3. Verify changes - confirm that "Publicly Accessible" is now set to "No" for each DB instance: + +```bash +aws rds describe-db-instances --db-instance-identifier --query "DBInstances[0].PubliclyAccessible" +``` + +### Using AWS Console + +Navigate to the RDS instance, click Modify, set "Publicly accessible" to "No", and apply the change immediately. + +## Default Value + +When creating an RDS instance, the default value for "Publicly accessible" depends on the subnet group configuration. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.12 Segment Data Processing and Storage Based on Sensitivity | | x | x | +| v8 | 4 Secure Configuration of Enterprise Assets and Software | | | | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.13/SKILL.md new file mode 100644 index 0000000000..5b0294b07c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.13/SKILL.md @@ -0,0 +1,191 @@ +--- +name: cis-aws-database-3.13 +description: "Ensure Database has IAM Auth is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, iam, authentication, token-based] +cis_id: "3.13" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.7] +prerequisites: [] +severity_boost: {} +--- + +# 3.13 Ensure Database has IAM Auth is Enabled (Manual) + +## Description + +RDS clusters should be configured to leverage AWS IAM authentication for database connections. This ensures that users authenticate using temporary IAM-based tokens rather than static long-lived passwords. + +## Rationale + +Enabling IAM authentication for RDS centralizes and strengthens access control by integrating database authentication with broader AWS IAM identity management. This approach eliminates the risks associated with hard-coded credentials, reduces administrative overhead for password rotation, and allows precise access management using IAM identities and policies. + +## Impact + +With the usage of IAM database authentication instead of static passwords, RDS clusters are protected against credential leakage and weak password practices, making unauthorized access significantly more difficult. This reduces the attack surface, supports audit and compliance, and ensures that database access is tightly aligned with enterprise identity governance and cloud security standards. + +## Audit Procedure + +### Using AWS CLI + +1. List RDS clusters and check IAM authentication status: + +```bash +aws rds describe-db-clusters \ + --query "DBClusters[*].{DBClusterIdentifier:DBClusterIdentifier,IAMDatabaseAuthenticationEnabled:IAMDatabaseAuthenticationEnabled}" \ + --output table +``` + +2. List database users enabled for IAM authentication (RDS MySQL): + +- For MySQL, connect to the cluster and run below command to ensure that required database users exist for IAM token logins. + +```sql +SELECT user, plugin FROM mysql.user WHERE plugin='AWSAuthenticationPlugin'; +``` + +- For Postgres, connect to the cluster and run below command to verify that necessary users are granted the rds_iam role. + +```sql +SELECT r.rolname +FROM pg_roles AS r +JOIN pg_auth_members AS m ON r.oid = m.member +JOIN pg_roles AS g ON m.roleid = g.oid +WHERE g.rolname = 'rds_iam'; +``` + +The cluster must have IAM database authentication enabled and users intended for IAM authentication must exist in the database engine with appropriate privileges. + +### Using AWS Console + +1. Navigate to the Amazon RDS console. +2. Select the DB cluster. +3. Under the Configuration tab, verify that IAM DB Authentication is set to Enabled. + +## Expected Result + +All RDS clusters should have IAM Database Authentication enabled, and database users intended for IAM authentication should be properly configured within the database engine. + +## Remediation + +### Using AWS CLI + +1. Enable IAM Database Authentication on the RDS Cluster + +- Use the AWS CLI to enable IAM authentication for an existing RDS cluster: + +```bash +aws rds modify-db-cluster \ + --db-cluster-identifier \ + --enable-iam-database-authentication \ + --apply-immediately +``` + +2. Create Local Database Users Configured for IAM Authentication + +- For RDS MySQL: Connect to the database and create or alter users as follows: + +```sql +CREATE USER 'jane_doe' IDENTIFIED WITH AWSAuthenticationPlugin as 'RDS'; +``` + +or + +```sql +ALTER USER 'jane_doe' IDENTIFIED WITH AWSAuthenticationPlugin as 'RDS'; +``` + +- For RDS PostgreSQL: + +Grant the rds_iam role to eligible users: + +```sql +GRANT rds_iam TO jane_doe; +``` + +3. Grant Necessary Privileges to the Database Users + +- Assign required permissions and roles to the users within your DB engine via standard SQL GRANT commands. + +4. Ensure IAM Users/Roles Have Required AWS Permissions + +- The IAM principal that connects needs the following AWS permission in their policy: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": ["rds-db:connect"], + "Resource": ["arn:aws:rds-db:region:account-id:dbuser:DbClusterResourceId/db-user-name"] + } + ] +} +``` + +- region is the AWS Region for the DB cluster +- account-id is the AWS account number for the DB cluster. +- DbClusterResourceId is the identifier for the DB cluster. This identifier is unique to an AWS Region and never changes. To find a DB cluster resource ID in the AWS Management Console for Amazon RDS, choose the DB cluster to see its details. Then choose the Configuration tab. The Resource ID is shown in the Configuration section. + +5. Test the Configuration + +- Use the AWS CLI to generate an authentication token: + +```bash +aws rds generate-db-auth-token \ + --hostname \ + --port 3306 \ + --region \ + --username +``` + +- Use the generated token to authenticate to the database, confirming successful login. + +For mysql: + +```bash +mysql --host= \ + --port=3306 \ + --ssl-mode=REQUIRED \ + --enable-cleartext-plugin \ + --user= \ + --password= '' +``` + +For postgres: + +```bash +psql "host= port=5432 dbname= user=<>db_user_name password='' sslmode=require" +``` + +### Using AWS Console + +1. Navigate to the Amazon RDS console. +2. Select the DB cluster. +3. Click Modify. +4. Under Database authentication, select IAM database authentication. +5. Click Continue and apply the changes. + +## Default Value + +IAM Database Authentication is disabled by default on RDS clusters. + +## References + +1. https://aws.amazon.com/products/databases/ +2. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------- | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.14/SKILL.md new file mode 100644 index 0000000000..5b9bb634dc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.14/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-aws-database-3.14 +description: "Ensure Database has delete protection enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, deletion-protection, data-protection, resilience] +cis_id: "3.14" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.10] +prerequisites: [] +severity_boost: {} +--- + +# 3.14 Ensure Database has delete protection enabled (Manual) + +## Description + +Ensure that delete protection is enabled on database instances to prevent accidental or unauthorized deletion. This setting safeguards critical databases by requiring explicit disabling of delete protection before deletion, reducing the risk of data loss through human error or malicious activity. + +## Rationale + +Delete protection provides a safeguard against inadvertent or malicious deletion of critical databases. By requiring deliberate action to disable deletion protection, organizations mitigate risks associated with accidental data deletion and enhance the overall resilience of their data storage platform. + +## Impact + +Failure to enable delete protection increases the risk of irreversible data loss, potential service disruption, and operational downtime. + +## Audit Procedure + +### Using AWS CLI + +Run the following command to check if deletion protection is enabled on your RDS DB cluster(s): + +```bash +aws rds describe-db-clusters \ + --query "DBClusters[*].{DBClusterIdentifier:DBClusterIdentifier,DeletionProtection:DeletionProtection}" \ + --output table +``` + +- Review each cluster's DeletionProtection status. +- Clusters marked as true have deletion protection enabled. +- Identify any clusters with deletion protection disabled for remediation. + +### Using AWS Console + +1. Navigate to the Amazon RDS console. +2. Select the DB cluster. +3. Under the Configuration tab, check the value of Deletion protection. +4. Verify it is set to Enabled. + +## Expected Result + +All production RDS DB clusters should have `DeletionProtection` set to `true`. + +## Remediation + +### Using AWS CLI + +To enable deletion protection on an existing RDS DB cluster: + +```bash +aws rds modify-db-cluster \ + --db-cluster-identifier \ + --deletion-protection \ + --apply-immediately +``` + +- Replace with your RDS cluster ID. +- This change is applied immediately without downtime. +- Once enabled, the cluster cannot be deleted without first disabling deletion protection. + +### Using AWS Console + +1. Navigate to the Amazon RDS console. +2. Select the DB cluster. +3. Click Modify. +4. Under Deletion protection, enable the option. +5. Click Continue and apply the changes immediately. + +## Default Value + +Deletion protection is disabled by default when creating a new RDS DB cluster. + +## References + +1. https://aws.amazon.com/products/databases/ +2. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4 Secure Configuration of Enterprise Assets and Software | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.2/SKILL.md new file mode 100644 index 0000000000..62e8b4761d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.2/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-database-3.2 +description: "Ensure to Create The Appropriate Deployment Configuration" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, deployment, multi-az, high-availability] +cis_id: "3.2" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.1, cis-aws-database-3.3, cis-aws-database-3.10] +prerequisites: [] +severity_boost: {} +--- + +# 3.2 Ensure to Create The Appropriate Deployment Configuration (Manual) + +## Description + +This control is important and helps businesses to choose from two deployment options, either single or multi-AZ deployment. Depending on the business factor and their security needs the organization is then encouraged to make a decision that would benefit them. + +## Rationale + +Selecting the appropriate deployment configuration ensures high availability, data durability, and minimal downtime based on business requirements. + +## Impact + +Choosing the wrong deployment configuration could lead to unnecessary downtime, data loss during failures, or excessive costs for over-provisioned infrastructure. + +## Audit Procedure + +### Using AWS Console + +1. Evaluate High Availability Requirements + - Assess the high availability needs of your application. Consider factors such as uptime requirements, business continuity, and disaster recovery. + - Determine if your application requires automatic failover, data durability, and minimal downtime during maintenance or outages. + +2. Understand RDS Deployment Options + - Familiarize yourself with the deployment options available on Amazon RDS. These include single-AZ (Availability Zone) and multi-AZ deployments. + - Understand the differences between these options regarding availability, durability, and cost. + +3. Single-AZ Deployment + - Consider a single-AZ deployment if high availability is not a critical requirement for your application. + - In a single-AZ deployment, your database runs in a single Availability Zone, providing basic durability and availability. + +4. Multi-AZ Deployment + - Choose a multi-AZ deployment if high availability and automatic failover are crucial for your application. + - In a multi-AZ deployment, your database is replicated synchronously to a standby replica in a different Availability Zone, providing automatic failover in the event of a primary database failure. + - Multi-AZ deployments provide enhanced availability and durability, ensuring minimal downtime during maintenance or outages. + +5. Evaluate Cost Implications + - Consider the cost implications of your deployment choice. + - Multi-AZ deployments incur additional costs than single-AZ deployments due to the replication and standby infrastructure. + +6. Make a Deployment Decision + - Based on your evaluation of high availability requirements, consider the trade-offs between single-AZ and multi-AZ deployments. + - Choose the appropriate deployment configuration that meets your application's availability, durability, and cost requirements. + +7. Configure RDS Deployment + - Once you have determined the deployment configuration, go to the Amazon RDS console. + - Create a new database instance or modify an existing one to match your chosen deployment configuration. + - Follow the prompts and configure the deployment options, selecting the desired AZs and replication settings. + - Adjust other configuration settings, such as instance type, storage, and backup options, based on your application's needs. + +8. Test and Monitor + - After the deployment is set up, thoroughly test your application's functionality and performance. + - Monitor the RDS instance and replication status using the Amazon RDS console or CloudWatch metrics. + - Ensure that the database failover and automatic maintenance operations work as expected. + +## Expected Result + +The deployment configuration should match the application's high availability and durability requirements. Production databases handling critical workloads should use multi-AZ deployments. + +## Remediation + +### Using AWS Console + +Review the current deployment configuration and modify to multi-AZ if high availability is required. In the Amazon RDS console, select the instance, click Modify, and enable Multi-AZ deployment. + +## Default Value + +Single-AZ deployment is the default when creating a new RDS instance. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------- | ---- | ---- | ---- | +| v8 | 0.0 Explicitly Not Mapped | | | | +| v7 | 0.0 Explicitly Not Mapped | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.3/SKILL.md new file mode 100644 index 0000000000..2944aa1f2f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.3/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-aws-database-3.3 +description: "Ensure to Create a Virtual Private Cloud (VPC)" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, vpc, network-security, segmentation] +cis_id: "3.3" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.4, cis-aws-database-3.12] +prerequisites: [] +severity_boost: {} +--- + +# 3.3 Ensure to Create a Virtual Private Cloud (VPC) (Manual) + +## Description + +Setting up a Virtual Private Cloud (VPC) protects the private network that has been established from any external networks from interfering. It allows internal networks to communicate with one another with the network that has been established. + +## Rationale + +A VPC provides network isolation and segmentation for RDS instances, ensuring that database traffic is contained within a private network boundary. + +## Impact + +Builds a strong connection between internal networks, and the internet, and it secures your data from getting into the hand of an unauthorized party. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon VPC Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/vpc/. + +3. Create a VPC + - In the Amazon VPC console, click `Your VPCs` in the left-side menu. + - Click on `Create VPC` to begin creating a new VPC. + - Provide a name and the desired IPv4 CIDR block for your VPC. + - Configure additional settings, such as IPv6 CIDR block, tenancy, and DNS resolution. + - Click `Create` to create the VPC. + +4. Create Subnets + - In the Amazon VPC console, click `Subnets` in the left-side menu. + - Click on `Create subnet` to create a subnet within the VPC. + - Select the VPC you created in the previous step. + - Provide a name, choose an availability zone, and specify the IPv4 CIDR block for the subnet. + - Configure additional settings, such as IPv6 CIDR block and availability zone. + - Click `Create` to create the subnet. + +5. Configure Route Tables + - In the Amazon VPC console, click on `Route Tables` in the left-side menu. + - Click on `Create route table` to create a new route table. + - Provide a name for the route table and select the VPC you created earlier. + - Click `Create` to create the route table. + - Associate the route table with the desired subnets by selecting the route table and clicking on the `Subnet associations` tab. + - Click `Edit subnet associations` and select the desired subnets to associate them with the route table. + +6. Configure Security Groups + - In the Amazon VPC console, click `Security Groups` in the left-side menu. + - Click on `Create security group` to create a new security group. + - Provide a name and description for the security group. + - Select the VPC you created earlier. + - Configure inbound and outbound rules to control network traffic to and from your RDS instances. + - Click `Create` to create the security group. + +7. Configure Network Access Control Lists (ACLs) + - In the Amazon VPC console, click on `Network ACLs` in the left-side menu. + - Click on `Create network ACL` to create a new network ACL. + - Provide a name for the network ACL and select the VPC you created earlier. + - Configure inbound and outbound rules to allow or deny specific types of traffic. + - Associate the network ACL with the desired subnets by selecting the network ACL and clicking on the `Subnet associations` tab. + - Click `Edit subnet associations` and select the desired subnets to associate them with the network ACL. + +8. Use the VPC with Amazon RDS + - Select the appropriate VPC, subnets, and security groups when creating an RDS instance. + - Configure the database instance with the desired network and security settings within the chosen VPC. + +## Expected Result + +All RDS instances should be deployed within a properly configured VPC with appropriate subnets, route tables, security groups, and network ACLs. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to create and configure a VPC. For existing RDS instances not in a VPC, create a snapshot, then restore it into the desired VPC. + +## Default Value + +AWS creates a default VPC in each region, but custom VPCs should be created for production RDS deployments. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 11.7 Manage Network Infrastructure Through a Dedicated Network | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.4/SKILL.md new file mode 100644 index 0000000000..d7822165b6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.4/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-database-3.4 +description: "Ensure to Configure Security Groups" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, security-groups, network-security, firewall] +cis_id: "3.4" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.3, cis-aws-database-3.12] +prerequisites: [] +severity_boost: {} +--- + +# 3.4 Ensure to Configure Security Groups (Manual) + +## Description + +Configuring security groups benefits the user because it helps manage networks within the database and gives only certain permission for traffic that leaves and enters the database. + +## Rationale + +Security groups act as virtual firewalls that control inbound and outbound traffic to RDS instances. Proper configuration ensures only authorized access. + +## Impact + +Allows certain users to access the instance and it only allows them to work within that network. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon RDS Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/rds/. + +3. Select the RDS Instance + - Choose the Amazon RDS instance for which you want to configure security groups. Click on the instance name to access its details page. + +4. Navigate to the `Connectivity & Security` Section + - In the instance details page, navigate to the `Connectivity & Security` or "Security" section. + +5. View and Modify Existing Security Groups + - Under the `Security` section, you will see the existing security groups associated with the RDS instance. + - Take note of the existing security groups and their inbound and outbound rules. + +6. Create a New Security Group + - If you need to create a new security group for the RDS instance + - Click the `Create New Security Group` button. + - Provide a name and description for the new security group. + - Configure the inbound and outbound rules to control network traffic to and from the RDS instance. + - Click "Create" to create the new security group. + +7. Modify Security Group Rules + - To modify the rules of an existing security group, click on the security group name or the `Modify` button next to it. + - You can add, edit, or delete inbound and outbound rules on the security group details page. + - Specify each rule's source IP addresses, port ranges, and protocols. + - Click `Save` or `Apply Changes` to update the security group rules. + +8. Associate Security Groups + - To associate a security group with the RDS instance, navigate to the `Connectivity & Security` or `Security` section of the instance details page. + - Click `Modify` next to the `VPC security groups` option. + - Select the desired security groups from the list. + - Click `Save` or `Apply Changes` to associate them with the RDS instance. + +9. Verify and Test Security Group Configuration + - Review the security group settings to match your network access requirements. + - Test the connectivity to the RDS instance by attempting to access it from authorized IP addresses or applications. + +10. Monitor and Update Security Groups + - Regularly monitor the network traffic and access patterns to your RDS instance. + - Update the security group rules as needed to reflect changes in your network access requirements. + +## Expected Result + +Security groups should be configured with the principle of least privilege, allowing only necessary inbound traffic from trusted sources on required ports. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to review and configure security groups. Remove overly permissive rules (e.g., 0.0.0.0/0) and restrict access to specific IP ranges and ports. + +## Default Value + +The default security group allows all outbound traffic and restricts inbound traffic to the same security group. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.5/SKILL.md new file mode 100644 index 0000000000..e189190372 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.5/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-aws-database-3.5 +description: "Enable Encryption at Rest" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, encryption, encryption-at-rest, kms] +cis_id: "3.5" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.6] +prerequisites: [] +severity_boost: {} +--- + +# 3.5 Enable Encryption at Rest (Manual) + +## Description + +This helps ensure that the data is kept secure and protected when at rest. The user must choose from two key options which then determine when the data is encrypted at rest. + +## Rationale + +Encryption at rest protects data stored on disk from unauthorized access, ensuring that even if physical storage media is compromised, the data remains unreadable. + +## Impact + +If an unauthorized user steals the data, it would be unreadable for them because a key would be required to decrypt the message into plaintext. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon RDS Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/rds/. + +3. Select the RDS Instance + - Choose the Amazon RDS instance you want to enable encryption at rest. + - Click on the instance name to access its details page. + - In the instance details page, navigate to the `Configuration` or `Encryption & Security` section. + +4. Enable Encryption at Rest + - Under the `Encryption` or `Encryption at Rest` section + - Click on the `Modify` button or the `Enable` option to enable encryption at rest. + - Choose the desired encryption option, either `AWS managed keys (default)` or `Customer managed keys using AWS Key Management Service (KMS)`. + - If selecting `AWS managed keys`, you do not need to perform additional configuration steps. + - If selecting `Customer managed keys` you will need to specify the KMS key you want to use for encryption. + - Select the appropriate KMS key or create a new KMS key if necessary. + - Click `Continue` or `Save` to apply the changes. + +5. Monitor the Encryption Status + - After enabling encryption at rest, monitor the encryption status of your RDS instance. + - In the RDS console, check the `Encryption` or `Encryption at Rest` section to ensure that encryption is enabled, and the status is `In Progress` or `Enabled`. + +6. Verify Encryption at Rest + - Validate that data at rest is encrypted by accessing the RDS instance and examining the database files. + - Confirm that the data is stored in an encrypted format. + +## Expected Result + +All RDS instances should have encryption at rest enabled, using either AWS managed keys or customer managed keys (KMS). + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable encryption at rest. Note that encryption cannot be enabled on an existing unencrypted RDS instance. You must create an encrypted snapshot and restore from it. + +## Default Value + +Encryption at rest is not enabled by default for RDS instances. It must be enabled during instance creation or by restoring from an encrypted snapshot. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.6/SKILL.md new file mode 100644 index 0000000000..87cf464fbd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.6/SKILL.md @@ -0,0 +1,95 @@ +--- +name: cis-aws-database-3.6 +description: "Enable Encryption in Transit" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, encryption, encryption-in-transit, ssl, tls] +cis_id: "3.6" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.5] +prerequisites: [] +severity_boost: {} +--- + +# 3.6 Enable Encryption in Transit (Manual) + +## Description + +Amazon Relational Database uses SSL/TLS to encrypt data during transit. To secure your data in transit the individual should identify their client application and what is supported by SSL/TLS to configure it correctly. + +## Rationale + +Encrypting data in transit prevents eavesdropping, man-in-the-middle attacks, and data interception between the application and the database. + +## Impact + +Enabling encryption in transit ensures data confidentiality during transmission between the client application and the RDS instance. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon RDS Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/rds/. + +3. Select the RDS Instance + - Choose the Amazon RDS instance you want to implement encryption in transit. + - Click on the instance name to access its details page. + - In the instance details page, navigate to the `Configuration` or `Encryption & Security` section. + +4. Enable SSL/TLS + - Under the `Connectivity` or `Encryption in Transit` section + - Click the `Modify` or `Edit` option to enable SSL/TLS encryption. + - Select the option to enable SSL/TLS encryption. + - Choose the SSL/TLS certificate authority (CA) certificate option that best suits your needs: + - If you have an existing certificate, select `Use a certificate from ACM (AWS Certificate Manager)` or `Use a certificate from AWS Secrets Manager`. + - If you do not have a certificate, select `Generate a new certificate`. + - Click `Continue` or `Save` to apply the changes. + +5. Verify SSL/TLS Encryption + - After enabling SSL/TLS encryption, monitor the encryption status of your RDS instance. + - In the RDS console, check the `Connectivity` or "Encryption in Transit" section to ensure that SSL/TLS encryption is enabled, and the status is "In Progress" or "Enabled." + +6. Test SSL/TLS Encryption + - Connect to your RDS instance using a database client or application that supports SSL/TLS encryption. + - Configure the client or application to use SSL/TLS encryption by specifying the SSL/TLS certificate details. + - Verify that the connection is established successfully with SSL/TLS encryption. + +7. Monitor and Manage SSL/TLS Certificates + - Regularly monitor the SSL/TLS certificates associated with your RDS instances. + - Manage certificate expiration and renewal to ensure uninterrupted SSL/TLS encryption. + +## Expected Result + +All RDS instances should have SSL/TLS encryption enabled for connections, and clients should be configured to require encrypted connections. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable SSL/TLS encryption on the RDS instance. Configure the database parameter group to enforce SSL connections (e.g., `rds.force_ssl=1` for PostgreSQL). + +## Default Value + +SSL/TLS is supported by default on RDS instances, but enforcement of SSL-only connections must be configured manually. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.7/SKILL.md new file mode 100644 index 0000000000..f296f228c9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.7/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-database-3.7 +description: "Ensure to Implement Access Control and Authentication" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, access-control, authentication, iam] +cis_id: "3.7" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.4, cis-aws-database-3.13] +prerequisites: [] +severity_boost: {} +--- + +# 3.7 Ensure to Implement Access Control and Authentication (Manual) + +## Description + +Users should select whether they like to enable authentication. If they want to authenticate a password would be required, which would only allow the authorized person to access the database. Defining access control allows specific workers in a business access to the database. + +## Rationale + +Implementing proper access control and authentication ensures that only authorized users can access the database, reducing the risk of unauthorized data access or modification. + +## Impact + +Proper access control restricts database access to authorized users only, preventing unauthorized access and potential data breaches. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon RDS Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/rds/. + +3. Select the RDS Instance + - Choose the Amazon RDS instance you want to implement access control and authentication. + - Click on the instance name to access its details page. + - In the instance details page, navigate to the `Configuration` or `Connectivity & Security` section. + +4. Enable IAM Database Authentication + - Under the `Connectivity` or `Connectivity & Security` section. + - Click the `Modify` or `Edit` option to enable IAM Database Authentication. + - Select the option to enable IAM Database Authentication. + - Click `Continue` or `Save` to apply the changes. + +5. Create and Configure IAM Database Users + - Click `Users` in the left-side menu in the Amazon RDS console. + - Click `Create database user` to create a new IAM database user. + - Provide a username and select the IAM role or IAM user that will be associated with the database user. + - Configure the authentication type, either `Password-based` or `IAM authentication`. + - Set the desired password or leave it blank for IAM authentication. + - Configure the database user's privileges and permissions based on your application's requirements. + - Click `Create` to create the IAM database user. + +6. Configure Database User Privileges + - Click `Users` in the left-side menu in the Amazon RDS console. + - Select the database user you created in the previous step. + - Click on `Modify` to modify the user's settings and permissions. + - Configure the user's access privileges, including database access, object permissions, and privileges. + - Click `Save` or `Apply Changes` to update the user's privileges. + +7. Test Access and Authentication + - Test the access and authentication by connecting to the RDS instance using the IAM database user's credentials or IAM role. + - Verify that the authentication and access control mechanisms are functioning correctly. + +8. Monitor and Manage IAM Database Users + - Regularly monitor and review the IAM database users and their access privileges. + - Adjust user privileges as needed based on changes in your application requirements. + - Remove or disable database users when they are no longer needed. + +## Expected Result + +IAM Database Authentication should be enabled, and database users should have properly configured access privileges following the principle of least privilege. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable IAM Database Authentication and configure proper user privileges. Review and remove any unnecessary database users or excessive privileges. + +## Default Value + +IAM Database Authentication is disabled by default. Password-based authentication is the default authentication method. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.8/SKILL.md new file mode 100644 index 0000000000..d1f7cd6836 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.8/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-database-3.8 +description: "Ensure to Regularly Patch Systems" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, patching, maintenance, updates] +cis_id: "3.8" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.1, cis-aws-database-3.11] +prerequisites: [] +severity_boost: {} +--- + +# 3.8 Ensure to Regularly Patch Systems (Manual) + +## Description + +This control ensures that RDS database instances and their database engines are regularly updated and patched to address security vulnerabilities and maintain system integrity. + +## Rationale + +Regular patching addresses known security vulnerabilities, bug fixes, and performance improvements, reducing the attack surface and maintaining compliance. + +## Impact + +Helps the organization reduce their security risk by regularly updating and patching their database and database engine. Regularly updating and scanning for any weaknesses in the company can bring up possible vulnerabilities that could have led to potential cyber-attack. + +## Audit Procedure + +### Using AWS Console + +1. Stay Informed about Database Engine Updates + - Stay up-to-date with the latest information regarding database engine updates and patches provided by the respective database engine vendors (e.g., MySQL, PostgreSQL, Oracle, SQL Server). + - Subscribe to release announcements, security bulletins, and updates from the database engine vendor or AWS. + +2. Review the Database Engine Documentation + - Refer to the documentation provided by the database engine vendor to understand the recommended patching and update processes specific to the database engine you use on Amazon RDS. + - Review the vendor's guidelines and best practices for applying updates and patches. + +3. Plan for Maintenance Windows + - Determine regular maintenance windows during which you can schedule updates and patches for your RDS instances. + - Coordinate with your team to ensure minimal disruption to your applications and users during the maintenance window. + +4. Enable Automated Minor Version Upgrades + - In the Amazon RDS console, select the RDS instance you want to enable automated upgrades. + - Under the `Maintenance & backups` or `Maintenance` section. + - Enable the `Auto minor version upgrade` option. + - This allows Amazon RDS to automatically apply eligible minor version upgrades to your RDS instances during the maintenance window. + +5. Monitor Available Updates + - Regularly monitor the `Pending Maintenance` section in the Amazon RDS console for any updates or patches for your RDS instances. + - Pay attention to notifications and alerts from AWS about pending updates. + +6. Schedule Updates and Patches + - Review the available updates and patches and their associated release notes and security advisories. + - Please select the appropriate updates based on their impact, criticality, and compatibility with your applications. + - Schedule the updates and patches to be applied during the designated maintenance window. + +7. Apply Updates and Patches + - During the scheduled maintenance window, Amazon RDS automatically applies the eligible updates and patches to your RDS instances. + - Monitor the progress of the updates and patches through the Amazon RDS console. + +8. Test and Validate + - After the updates and patches are applied, thoroughly test your applications to ensure they function as expected. + - Validate the database performance, data integrity, and application functionality. + +9. Monitor for Issues + - Monitor the performance and behavior of your RDS instances after the updates and patches are applied. + - Keep an eye out for any issues or anomalies and address them promptly. + +10. Review and Document + - Review the release notes and documentation of the applied updates and patches to understand the changes and improvements they bring. + - Document the update and patching process, including the applied versions, dates, and any issues encountered. + +## Expected Result + +Auto minor version upgrades should be enabled, and RDS instances should be running supported and up-to-date engine versions with no pending critical patches. + +## Remediation + +### Using AWS Console + +Enable Auto minor version upgrade in the RDS instance settings. Schedule and apply any pending maintenance actions. Review and apply major version upgrades as needed following proper testing. + +## Default Value + +Auto minor version upgrade is enabled by default for new RDS instances. Maintenance windows are assigned automatically but can be customized. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------- | ---- | ---- | ---- | +| v8 | 7 Continuous Vulnerability Management | | | | +| v7 | 3 Continuous Vulnerability Management | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.9/SKILL.md new file mode 100644 index 0000000000..48f68d096a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-3.9/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-aws-database-3.9 +description: "Ensure Monitoring and Logging is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, rds, monitoring, logging, cloudwatch, audit] +cis_id: "3.9" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-3.11] +prerequisites: [] +severity_boost: {} +--- + +# 3.9 Ensure Monitoring and Logging is Enabled (Manual) + +## Description + +This control ensures that monitoring and logging are enabled for Amazon RDS instances to detect, investigate, and respond to security events and operational issues. + +## Rationale + +Monitoring and logging provide visibility into database activity, enabling detection of unauthorized access, performance issues, and security incidents. + +## Impact + +If the individual is not monitoring and logging their activity it allows the attacker to attack the system and extract or destroy data. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon RDS Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/rds/. + +3. Select the RDS Instance + - Choose the Amazon RDS instance you want to enable monitoring and logging. + - Click on the instance name to access its details page. + - In the instance details page, navigate to the `Configuration` or `Monitoring & Logs` section. + +4. Enable Enhanced Monitoring + - Under the `Monitoring` section. + - Click on the `Modify` button or `Edit` option to enable enhanced monitoring. + - Choose the desired monitoring granularity (1-minute or 5-minute intervals) and the retention period for the monitoring data. + - Click `Continue` or `Save` to apply the changes. + +5. Enable Enhanced Logging + - Under the `Logs` or `Monitoring & Logs` section. + - Click on the `Modify` button or `Edit` option to enable enhanced logging. + - Choose the desired log types to enable, such as general, error, slow query, or audit logs. + - Configure the log file retention period based on your needs. + - Select the destination for the logs, such as Amazon CloudWatch Logs or an Amazon S3 bucket. + - Configure the log format and other settings if applicable. + - Click `Continue` or `Save` to apply the changes. + +6. Configure CloudWatch Alarms (Optional) + - Click `Alarms` in the Amazon RDS console menu. + - Click `Create alarm` to create a CloudWatch alarm to monitor specific metrics or log events. + - Configure the alarm threshold, actions to take when the threshold is breached, and notification settings. + - Click `Create` to create the CloudWatch alarm. + +7. Monitor and Analyze the Metrics and Logs + - Monitor the metrics and logs in the Amazon RDS console or by accessing CloudWatch or the configured log destination. + - Use the metrics and logs to gain insights into your RDS instance's performance, behavior, and issues. + - Analyze the metrics and logs to identify areas for optimization, troubleshoot problems, or detect anomalies. + +8. Set Up Automated Actions (Optional) + - In the Amazon RDS console, click on `Event subscriptions` in the left-side menu. + - Click `Create event subscription` to set up automated actions based on specific events or log entries. + - Configure the event pattern, target actions, and notification settings. + - Click `Create` to create the event subscription. + +9. Monitor and Respond to Alerts + - Monitor the CloudWatch alarms and event notifications for any alerts or triggers based on the configured thresholds. + - Respond to alerts promptly by investigating and resolving the underlying issues or taking appropriate actions. + +## Expected Result + +Enhanced Monitoring should be enabled, and appropriate log types (general, error, slow query, audit) should be configured and published to CloudWatch Logs or S3. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable Enhanced Monitoring and configure logging. Set up CloudWatch alarms for critical metrics and event subscriptions for automated alerting. + +## Default Value + +Enhanced Monitoring is disabled by default. Basic monitoring with 1-minute CloudWatch metrics is available by default. Database engine logs must be explicitly enabled and published. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8 Audit Log Management | | | | +| v7 | 6 Maintenance, Monitoring and Analysis of Audit Logs | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.1/SKILL.md new file mode 100644 index 0000000000..7f299316c2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.1/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-database-4.1 +description: "Ensure AWS Identity and Access Management (IAM) is in use" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, dynamodb, iam, access-control] +cis_id: "4.1" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-4.2] +prerequisites: [] +severity_boost: {} +--- + +# 4.1 Ensure AWS Identity and Access Management (IAM) is in use + +## Description + +AWS Identity and Access Management (IAM) lets you securely control your users' access to AWS services and resources. To manage access control for Amazon DynamoDB, you can create IAM policies that control access to tables and data. + +## Rationale + +IAM policies help you control and maintain access to Amazon DynamoDB as needed. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Open IAM Console + - Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/. + +2. Navigate to Policies + - In the IAM console, in the navigation pane, choose `Policies`. + +3. Create Policy + - Choose `Create policy`. + - You will be taken to the `Create policy` page. + +4. Choose Service + - Click on `Choose a service`. + - Type `DynamoDB` in the search box and select it. + +5. Configure Actions + - Under the `Actions` section, select the actions you want to allow the user to perform. + - For instance, you can select `Read` to allow read actions like GetItem, Scan, Query, etc. + +6. Set Resources + - Under the `Resources` section, you can specify which tables this policy applies to. + - You can choose "All resources" or specify the ARN (Amazon Resource Name) of specific tables. + +7. Review Policy + - Click on `Review policy`. + - Give your policy a name and description. + - Then click `Create policy`. + - Now, you have an IAM policy. + +8. Attach Policy + - Navigate to the `Users`, `Groups`, or `Roles` section in the IAM console. + - Choose an existing user, group, or role, or create a new one. + - Once you've selected a user, group, or role, click `Add permissions`. + - Choose `Attach existing policies directly`. + - Search for your created policy, select it, and click `Attach policy`. + - With these steps, you have attached an IAM policy that controls access to DynamoDB resources. + +## Expected Result + +IAM policies are in place that control access to DynamoDB tables and data, following the principle of least privilege. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to create and attach IAM policies for DynamoDB access control. + +## Default Value + +By default, no IAM policies are created for DynamoDB access. Users with AWS account root credentials have full access. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.2/SKILL.md new file mode 100644 index 0000000000..53e2611735 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.2/SKILL.md @@ -0,0 +1,124 @@ +--- +name: cis-aws-database-4.2 +description: "Ensure Fine-Grained Access Control is implemented" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, dynamodb, iam, fgac, access-control] +cis_id: "4.2" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-4.1] +prerequisites: [] +severity_boost: {} +--- + +# 4.2 Ensure Fine-Grained Access Control is implemented + +## Description + +Fine-Grained Access Control (FGAC) on Amazon DynamoDB allows you to control access to data at the row level. Using IAM policies, you can restrict access based on the content within the request. Here is how you can implement FGAC: + +## Rationale + +Fine-Grained access control helps users to create and allow specific permission within that DB. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Create an IAM Role + - Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/. + - In the navigation pane, choose `Roles` and select `Create role`. + - Choose `AWS service` as the type of trusted entity. + - Choose `DynamoDB` as the service that will use this role, then click `Next: Permissions`. + - On the `Attach permissions policies` page, choose `Next: Tags`. You do not need to attach a policy to this role yet. + - On the `Add tags` page, choose `Next: Review`. + - On the `Review` page, for `Role name`, enter a name for your role, such as DynamoDBFineGrainedAccessRole. + - Choose `Create role`. + +2. Create an IAM Policy for Fine-Grained Access Control + - In the navigation pane, choose `Policies` and select `Create policy`. + - Choose the `JSON` tab. + - Paste the following policy into the policy document field, replacing `us-west-2`, `123456789012`, `myddbtable`, `HK`, and `RANGEK` with your own values: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "dynamodb:GetItem", + "dynamodb:BatchGetItem", + "dynamodb:Query", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem" + ], + "Resource": "arn:aws:dynamodb:", + "Condition": { + "ForAllValues:StringEquals": { + "dynamodb:LeadingKeys": ["${www.amazon.com:user_id}"], + "dynamodb:Attributes": ["", ""] + }, + "StringEqualsIfExists": { + "dynamodb:Select": "SPECIFIC_ATTRIBUTES" + } + } + } + ] +} +``` + +In this policy: + +- `dynamodb:LeadingKeys` restrict access to only the items where the hash key value is the same as the user's ID. +- `dynamodb:Attributes` restrict access to only the "HK" and "RANGEK" attributes of the items. +- `dynamodb:Select` only allows the `SPECIFIC_ATTRIBUTES` operator. +- Choose `Next: Tags`, add any tags if needed, and then choose `Next: Review`. +- For `Name`, enter a name for your policy, such as DynamoDBFineGrainedAccessPolicy. +- Choose `Create policy`. + +3. Attach the Policy to the Role + - In the navigation pane, choose `Roles`. + - Choose the role that you created in the previous step. + - On the `Permissions` tab, choose `Attach policies`. + - In the `Filter policies` search box, enter the policy name you created before. + - Select the check box for your policy, then choose `Attach policy`. + +**Note**: Fine-grained access control is a powerful feature but can be complex to configure. Be sure to test your setup to ensure it works as expected thoroughly. + +## Expected Result + +Fine-Grained Access Control policies are in place restricting DynamoDB access at the row level based on user identity. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to create IAM roles and policies for Fine-Grained Access Control. + +## Default Value + +By default, Fine-Grained Access Control is not implemented. IAM policies grant table-level access. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.3/SKILL.md new file mode 100644 index 0000000000..af0e09bb4b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.3/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-aws-database-4.3 +description: "Ensure DynamoDB Encryption at Rest" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, dynamodb, encryption, kms, encryption-at-rest] +cis_id: "4.3" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-4.4] +prerequisites: [] +severity_boost: {} +--- + +# 4.3 Ensure DynamoDB Encryption at Rest + +## Description + +Encryption at rest in Amazon DynamoDB enhances the security of your data by encrypting it using AWS Key Management Service (AWS KMS) keys. Here is how to enable encryption at rest while creating a DynamoDB table. + +## Rationale + +Once the user is in their AWS account, they should open the DynamoDB to create the table and enable encryption. A key would be required to be created to enable encryption. Only the authorized user would always have access to this key. Enabling encryption would keep the user's data private and stored securely, which would only allow them to access it with their key. + +## Impact + +Add an additional layer of security by preventing any unauthorized personnel from accessing the data since both IAM access to the data and access to the encryption key would be required. + +## Audit Procedure + +### Using AWS Console + +1. Open DynamoDB Console + - Sign in to the AWS Management Console and open the DynamoDB console at https://console.aws.amazon.com/dynamodb/. + +2. Create DynamoDB Table + - Click `Create table`. This will bring you to the `Create DynamoDB table` page. + +3. Specify Table Details + - Enter a `Table name` and `Primary key`. + - The primary key consists of a partition key and, optionally, a sort key. + - Fill in these details according to your requirements. + +4. Enable Encryption + - Under the `Settings` section, check the `Enable encryption at rest`. + - By default, DynamoDB uses an AWS-owned CMK to encrypt your data. + - To use an AWS-managed CMK or a customer-managed CMK instead, select `AWS-managed CMK` or `Customer-managed CMK` from the dropdown menu, then choose the desired CMK. + +5. Create a Table + - Click `Create`. + - This will create your DynamoDB table with encryption at rest enabled. + +**Note:** + +1. The setting for encryption at rest applies to all DynamoDB data associated with the table, including primary key data and indexes. +2. If you need to apply encryption at rest to an existing table, you can modify the table settings. However, modifying settings on large tables could take time and impact performance during the transition. +3. Ensure you have the necessary permissions in AWS KMS when choosing an AWS-managed CMK or a customer-managed CMK. + +## Expected Result + +DynamoDB tables have encryption at rest enabled using AWS KMS keys (AWS-owned, AWS-managed, or customer-managed CMK). + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to enable encryption at rest for DynamoDB tables. For existing tables, modify the table settings to enable encryption. + +## Default Value + +By default, DynamoDB uses an AWS-owned CMK to encrypt data at rest. Encryption at rest is enabled by default for all DynamoDB tables. + +## References + +1. https://aws.amazon.com/products/databases/ +2. https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.4/SKILL.md new file mode 100644 index 0000000000..eb01a4d066 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.4/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-aws-database-4.4 +description: "Ensure DynamoDB Encryption in Transit" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, dynamodb, encryption, tls, encryption-in-transit] +cis_id: "4.4" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-4.3] +prerequisites: [] +severity_boost: {} +--- + +# 4.4 Ensure DynamoDB Encryption in Transit + +## Description + +Use the SSL/TLS protocol to encrypt data in transit between your applications and DynamoDB. Amazon DynamoDB encrypts data in transit by default using Transport Layer Security (TLS) encryption. Here is a step-by-step guide on how to ensure encryption in transit for your DynamoDB: + +## Rationale + +Amazon DynamoDB uses TLS to encrypt data during transit. To secure your data in transit the individual should identify their client application and what is supported by TLS to configure it correctly. + +## Impact + +If the user does not have the code configured correctly it would not be able to connect to the DynamoDB. + +## Audit Procedure + +### Using AWS Console + +1. Access the DynamoDB Console + - Sign in to the AWS Management Console and open the DynamoDB console at https://console.aws.amazon.com/dynamodb/. + +2. Create or Select a DynamoDB Table + - You can create a new DynamoDB table or select an existing one to configure encryption in transit. + +3. Verify Encryption Settings + - By default, DynamoDB encrypts data in transit using TLS. To ensure that encryption in transit is enabled: + - In the DynamoDB console, select your table. + - In the table details, navigate to the `Overview` tab. + - Under the `Encryption` section, verify that "Encryption at rest" is enabled. This indicates that data is encrypted at rest. + - Confirm that `Encryption in transit` is enabled. It should be enabled by default. + +4. Use SSL/TLS Endpoints for API Calls + - To ensure that your API calls to DynamoDB are encrypted in transit, use SSL/TLS endpoints: + - Use the appropriate SDK or AWS CLI in your application or code that interacts with DynamoDB. + - By default, the SDKs and AWS CLI use the SSL/TLS endpoints provided by DynamoDB. + - Verify that your code is configured to connect to DynamoDB using the appropriate SSL/TLS endpoint. + +## Expected Result + +All data in transit between applications and DynamoDB is encrypted using TLS. SSL/TLS endpoints are used for all API calls. + +## Remediation + +### Using AWS Console + +Ensure that your applications use the SSL/TLS endpoints provided by DynamoDB. By default, the AWS SDKs and CLI use SSL/TLS. Verify your application code connects using HTTPS endpoints. + +## Default Value + +By default, DynamoDB encrypts data in transit using TLS. The AWS SDKs and CLI use SSL/TLS endpoints. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.5/SKILL.md new file mode 100644 index 0000000000..b76b6bf50c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.5/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-aws-database-4.5 +description: "Ensure VPC Endpoints are configured" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, dynamodb, vpc, endpoint, network-security] +cis_id: "4.5" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-4.4] +prerequisites: [] +severity_boost: {} +--- + +# 4.5 Ensure VPC Endpoints are configured + +## Description + +Using VPC endpoints with Amazon DynamoDB allows you to securely access DynamoDB resources within your Amazon Virtual Private Cloud (VPC). This keeps your traffic off the public internet. + +## Rationale + +Using VPC endpoint in the DynamoDB helps ensure that the data is secured and that no external networks would have access to the network. It is a private network where the user has access to their desired availability zones and subnets. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Open Amazon VPC Console + - Sign in to the AWS Management Console and open the Amazon VPC console at https://console.aws.amazon.com/vpc/. + +2. Create a VPC Endpoint + - In the Amazon VPC console, navigate to the `Endpoints` section in the left-side menu. + - Click `Create Endpoint`. + - Select your desired VPC in the `VPC` dropdown menu. + - In the `Service category` section, choose `AWS services`. + - In the `Filter Services` search box, enter `DynamoDB` and select `DynamoDB` from the results. + - Choose your desired availability zone(s) and subnet(s). + - Leave the default settings for other options or customize them according to your requirements. + - Click `Create endpoint`. + +3. Update Route Tables + - In the Amazon VPC console, navigate to the `Route Tables` section in the left-side menu. + - Find the route table associated with your VPC or subnet from which you want to access DynamoDB. + - Edit the route table and add a route for the DynamoDB VPC endpoint. + - Destination: Enter the CIDR block of the DynamoDB VPC endpoint, typically in the form of `vpce-xxxxxx-xxxxxxx-xxxxxxx-xxxxxxx.vpce.amazonaws.com/32`. + - Target: Select the VPC endpoint ID from the dropdown menu. + - Save the changes to update the route table. + +4. Verify Connectivity + - To ensure that your VPC endpoint for DynamoDB is functioning correctly: + - Launch an Amazon EC2 instance within your VPC or use an existing one. + - Connect to the EC2 instance using SSH or other remote access methods. + - From the EC2 instance, try to access DynamoDB using the SDK or CLI. + - Ensure that the access to DynamoDB is successful and that data can be retrieved or modified. + +## Expected Result + +A VPC Gateway Endpoint for DynamoDB is configured, and route tables are updated to route DynamoDB traffic through the VPC endpoint instead of the public internet. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to create a VPC endpoint for DynamoDB and update route tables accordingly. + +## Default Value + +By default, no VPC endpoints are configured. DynamoDB traffic goes through the public internet. + +## Additional Information + +Amazon DynamoDB uses Gateway VPC Endpoints, unlike other services that may offer Interface VPC Endpoints. There are some differences such as Gateway VPC Endpoints do not permit cross-region communication. See AWS's Documentation for more information. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 11.7 Manage Network Infrastructure Through a Dedicated Network | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.6/SKILL.md new file mode 100644 index 0000000000..be00202808 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.6/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-database-4.6 +description: "Ensure DynamoDB Streams and AWS Lambda for Automated Compliance Checking is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, dynamodb, streams, lambda, compliance, automation] +cis_id: "4.6" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-4.7] +prerequisites: [] +severity_boost: {} +--- + +# 4.6 Ensure DynamoDB Streams and AWS Lambda for Automated Compliance Checking is Enabled + +## Description + +Enabling DynamoDB Streams and integrating AWS Lambda allows you to automate compliance checking and perform actions based on changes made to your DynamoDB data. + +## Rationale + +Enabling the DynamoDB with AWS Lambda allows the individual to either use an existing or create a new execution role that allows Lambda to access DynamoDB and write logs. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Open DynamoDB Console + - Sign in to the AWS Management Console and open the DynamoDB console at https://console.aws.amazon.com/dynamodb/. + +2. Create or Select a DynamoDB Table + - You can create a new DynamoDB table or select an existing one to enable DynamoDB Streams. + +3. Enable DynamoDB Streams + - In the DynamoDB console, select your table. + - Click on the `Overview` tab. + - Under the `DynamoDB Streams` section, click on `Manage stream`. + - In the `Manage stream` dialog, choose `Enable` and select the desired view type (e.g., `New and old images`). + - Click `Enable`. + +4. Create an AWS Lambda Function + - Open the AWS Management Console and navigate to the Lambda service at https://console.aws.amazon.com/lambda/. + - Click `Create function` to create a new Lambda function. + - Choose a function name, runtime (e.g., Node.js, Python), and other basic settings. + - Under `Permissions`, choose an existing or create a new execution role that allows Lambda to access DynamoDB and write logs. + - Click `Create function` to create the Lambda function. + +5. Configure AWS Lambda with DynamoDB Stream + - Scroll down to the `Designer` section in the Lambda function editor. + - Click on `Add trigger`. + - Select `DynamoDB` from the trigger list. + - In the `Configure triggers` dialog, choose the DynamoDB table and the stream that you enabled in the previous step. + - Define the batch size and starting position, if applicable. + - Click "Add". + +6. Write Lambda Function Code for Compliance Checking + - In the Lambda function editor, scroll up to the code editor section. + - Write your compliance-checking logic in the selected runtime language (e.g., Node.js, Python). + - The code should handle the incoming DynamoDB stream records and perform the necessary compliance checks. + - If needed, you can use the AWS SDKs or other libraries to interact with DynamoDB or other AWS services. + +7. Configure Lambda Function Settings + - Scroll down to the `Function overview` section. + - Configure the memory, timeout, and other settings as per your requirements. + - Click `Save` to save the Lambda function. + +8. Test the Compliance Checking + - You can test the compliance checking by changing the DynamoDB table and observing the Lambda function's behavior through the CloudWatch logs or other desired actions performed by the function. + +## Expected Result + +DynamoDB Streams are enabled and an AWS Lambda function is configured to process stream records for automated compliance checking. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to enable DynamoDB Streams and create a Lambda function for automated compliance checking. + +## Default Value + +By default, DynamoDB Streams are not enabled and no Lambda triggers are configured. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------ | ---- | ---- | ---- | +| v8 | 3 Data Protection | | | | +| v7 | 13 Data Protection | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.7/SKILL.md new file mode 100644 index 0000000000..c541f09425 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.7/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-database-4.7 +description: "Ensure Monitor and Audit Activity is enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, dynamodb, monitoring, cloudtrail, cloudwatch, audit] +cis_id: "4.7" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-4.6] +prerequisites: [] +severity_boost: {} +--- + +# 4.7 Ensure Monitor and Audit Activity is enabled + +## Description + +Regular monitoring and auditing of activity in Amazon DynamoDB help ensure your database's security, performance, and compliance. + +## Rationale + +This keeps track and ensures who has recently modified a document and monitors all activity within the database. This information allows the individual to use the details provided for auditing purposes and to address any compliance requirements. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Enable CloudTrail Logging for DynamoDB + - Sign in to the AWS Management Console and open the CloudTrail console at https://console.aws.amazon.com/cloudtrail/. + - Choose `Trails` from the left-side menu. + - Click `Create trail` or select an existing trail. + - Specify a trail name, choose an S3 bucket for storing logs, and configure other trail settings. + - Under `Data events`, select the checkbox for `DynamoDB` to enable logging of DynamoDB data events. + - Click `Create trail` or `Save changes` to save the CloudTrail configuration. + +2. Enable DynamoDB Streams + - Sign in to the AWS Management Console and open the DynamoDB console at https://console.aws.amazon.com/dynamodb/. + - Select the DynamoDB table you want to monitor. + - Click on the `Overview` tab. + - Under the `DynamoDB Streams` section, click `Manage stream`. + - Enable DynamoDB Streams with the desired view type (e.g., `New and old images`). + - Click `Enable`. + +3. Configure Amazon CloudWatch Alarms + - Sign in to the AWS Management Console and open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. + - In the left-side menu, click on `Alarms`. + - Click `Create alarm`. + - Select a DynamoDB metric to monitor (e.g., Read or Write capacity units). + - Configure the threshold, conditions, and actions for the alarm. + - Choose the actions to take when the alarm state is triggered (e.g., send notifications, auto-scaling actions, etc.). + - Click `Create alarm` to save the configuration. + +4. Analyze and Review Logs and Metrics + - Sign in to the AWS Management Console and open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. + - In the left-side menu, click `Logs` to access CloudWatch Logs. + - Select the appropriate log group for DynamoDB (e.g., `/aws/dynamodb/TableName`). + - Review the logs to monitor activities, errors, and any unusual behavior. + - Navigate to the CloudWatch console and click `Metrics` in the left-side menu. + - Select the DynamoDB namespace and the desired metrics (e.g., ConsumedReadCapacityUnits, ConsumedWriteCapacityUnits). + - Analyze the metrics to identify trends, capacity needs, and potential issues. + +5. Enable AWS Config for DynamoDB + - Sign in to the AWS Management Console and open the AWS Config console at https://console.aws.amazon.com/config/. + - Click on `Rules` in the left-side menu. + - Click `Add rule`. + - Configure a rule for DynamoDB compliance checks, such as checking for unencrypted tables or insecure IAM policies. + - Customize the rule settings and scope based on your requirements. + - Click `Save` to create the AWS Config rule. + +## Expected Result + +CloudTrail logging is enabled for DynamoDB data events, DynamoDB Streams are enabled, CloudWatch alarms are configured, and AWS Config rules are in place for compliance monitoring. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to enable monitoring and auditing for DynamoDB. + +## Default Value + +By default, CloudTrail logs management events but not DynamoDB data events. DynamoDB Streams are disabled by default. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.8/SKILL.md new file mode 100644 index 0000000000..c6cbcf8a0f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.8/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-aws-database-4.8 +description: "Ensure Database has delete protection enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, dynamodb, delete-protection, data-protection] +cis_id: "4.8" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-4.9] +prerequisites: [] +severity_boost: {} +--- + +# 4.8 Ensure Database has delete protection enabled + +## Description + +Ensure that delete protection is enabled on database instances to prevent accidental or unauthorized deletion. This setting safeguards critical databases by requiring explicit disabling of delete protection before deletion, reducing the risk of data loss through human error or malicious activity. + +## Rationale + +Delete protection provides a safeguard against inadvertent or malicious deletion of critical databases. By requiring deliberate action to disable deletion protection, organizations mitigate risks associated with accidental data deletion and enhance the overall resilience of their data storage platform. + +## Impact + +Failure to enable delete protection increases the risk of irreversible data loss, potential service disruption, and operational downtime. + +## Audit Procedure + +### Using AWS CLI + +To check whether delete protection is enabled on your DynamoDB tables, use the following command for each table: + +```bash +aws dynamodb describe-table --table-name \ + --query "{TableName: Table.TableName, DeleteProtectionEnabled: Table.DeletionProtectionEnabled}" \ + --output table +``` + +- Replace with your DynamoDB table name. +- This will return True if delete protection is enabled, False otherwise. + +## Expected Result + +DeleteProtectionEnabled returns `True` for all critical DynamoDB tables. + +## Remediation + +### Using AWS CLI + +To enable delete protection on an existing DynamoDB table, use the following command: + +```bash +aws dynamodb update-table \ + --table-name my-table \ + --deletion-protection-enabled +``` + +- Replace with your DynamoDB table name. +- Delete protection prevents the table from being deleted until the protection is disabled explicitly. + +## Default Value + +By default, delete protection is not enabled on DynamoDB tables. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4 Secure Configuration of Enterprise Assets and Software | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.9/SKILL.md new file mode 100644 index 0000000000..3c75e9e272 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-4.9/SKILL.md @@ -0,0 +1,170 @@ +--- +name: cis-aws-database-4.9 +description: "Ensure Database has Backup enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, dynamodb, backup, pitr, disaster-recovery] +cis_id: "4.9" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-4.8] +prerequisites: [] +severity_boost: {} +--- + +# 4.9 Ensure Database has Backup enabled + +## Description + +Ensure your DynamoDB tables have backups enabled to protect against accidental data loss or corruption. This can be achieved in two ways: by enabling Point-in-Time Recovery (PITR), which provides continuous backups for up to 35 days, and by configuring on-demand backups that can be automated using the AWS Backup service. + +## Rationale + +Backups are essential for restoring data after accidental deletions, application errors or malicious events. Enabling both continuous and scheduled backups maximizes data resilience while meeting recovery point objectives (RPO) and compliance mandates. + +## Impact + +Without backups, data loss can be permanent which can lead to business disruption and potential regulatory penalties. Enabling backup provides assurance of data availability and accelerates recovery from incidents, supporting overall system reliability. + +## Audit Procedure + +### Using AWS Console + +**1. Check if Point-in-Time Recovery (PITR) is enabled** + +1.1 Log in to the AWS Management Console. +1.2 Navigate to DynamoDB in the AWS Services menu. + +- Select "Tables" from the left sidebar. + 1.3 Click on the specific table name that you want to audit. + 1.4 Go to the "Backups" tab in the table's navigation bar. + 1.5 Under the "Point-in-time recovery (PITR)" section: +- Verify that "Status" is "On", which means PITR is enabled. +- Check the "Backup recovery period" value, this displays the configured retention period in days. +- Optionally, review the Earliest restore point and Latest restore point timestamps to confirm the exact window for recovery. + +### Using AWS CLI + +**2. Check if automated backups are enabled via AWS Backup Service** + +2.1 Check if Table is Assigned to a Backup Plan + +- List backup plans: + +```bash +aws backup list-backup-plans --query "BackupPlansList[].BackupPlanName" --output table +``` + +- For each backup plan, list all backup selections (resource assignments): + +```bash +aws backup list-backup-selections --backup-plan-id --query "BackupSelections[].SelectionId" --output text +``` + +- For each selection, list assigned resources and search for your table: + +```bash +aws backup get-backup-selection --backup-plan-id --selection-id --query "BackupSelection.Resources" --output text +``` + +- If your table ARN appears in any selection, it is protected by the backup plan. + + 2.2 Verify Backup Plan Configuration + +```bash +aws backup get-backup-plan --backup-plan-id +``` + +Look for the "Lifecycle" fields in each backup rule: + +- "DeleteAfterDays" is the retention period. +- "ScheduleExpression" sets the backup schedule (cron format). +- "BackupVaultName" is the name of the vault (where backups are stored). + +**Summary:** + +1. Confirm PITR is enabled for the table and note its retention period (up to 35 days). +2. Confirm if AWS Backup plans exist and are actively creating recovery points for your DynamoDB tables. + +## Expected Result + +PITR is enabled on all critical DynamoDB tables and AWS Backup plans are configured with appropriate retention periods and schedules. + +## Remediation + +### Using AWS CLI + +**1. Create Backup Plan with 2 Rules (Continuous and Scheduled Snapshots)** + +```bash +aws backup create-backup-plan --backup-plan '{ + "BackupPlanName": "", + "Rules": [ + { + "RuleName": "Continuous-PITR", + "TargetBackupVaultName": "Default", + "ScheduleExpression": "cron(0 * * * ? *)", + "StartWindowMinutes": 60, + "CompletionWindowMinutes": 180, + "Lifecycle": { "DeleteAfterDays": 35 }, + "RecoveryPointTags": { "BackupType": "Continuous" }, + "EnableContinuousBackup": true + }, + { + "RuleName": "Scheduled-OnDemand-Snapshots", + "TargetBackupVaultName": "Default", + "ScheduleExpression": "cron(0 3 ? * SUN *)", + "StartWindowMinutes": 120, + "CompletionWindowMinutes": 360, + "Lifecycle": { "DeleteAfterDays": 90 }, + "RecoveryPointTags": { "BackupType": "OnDemand" } + } + ] +}' +``` + +- Replace "BackupPlanName" with your backup plan name +- Replace "Default" with your actual backup vault name if different +- Update the "ScheduleExpression", "StartWindowMinutes" based on your unique backup schedule. Note, this schedule is ignored for PITR as that is continuous backup. +- Replace "35" with your retention time for PITR if shorter +- Replace "90" with your retention time for Snapshots if different + +This command outputs the BackupPlanId necessary for the next step. + +**2. Assign DynamoDB Table to the Backup Plan** + +Replace with the ID from Step 1 and with your DynamoDB table ARN. + +```bash +aws backup create-backup-selection \ + --backup-plan-id \ + --backup-selection '{ + "SelectionName": "DynamoDBTableSelection", + "IamRoleArn": "arn:aws:iam:::role/AWSBackupServiceRolePolicyForBackup", + "Resources": [""] + }' +``` + +- Make sure the IAM role has the necessary AWS Backup permissions. + +These commands create a centralized backup plan with continuous and scheduled snapshot backups, then assign your DynamoDB table as a resource for backup. + +## Default Value + +By default, PITR is not enabled on DynamoDB tables and no AWS Backup plans are configured. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------ | ---- | ---- | ---- | +| v8 | 11.2 Perform Automated Backups | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.1/SKILL.md new file mode 100644 index 0000000000..816cd2e242 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.1/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-aws-database-5.1 +description: "Ensure Secure Access to ElastiCache" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, iam, access-control, security] +cis_id: "5.1" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.2, cis-aws-database-5.8] +prerequisites: [] +severity_boost: {} +--- + +# 5.1 Ensure Secure Access to ElastiCache + +## Description + +Securing access to Amazon ElastiCache involves implementing appropriate authentication and authorization mechanisms. + +## Rationale + +N/A + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Use AWS Identity and Access Management (IAM) + - Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/. + - Create IAM users or roles for individuals or applications needing ElastiCache access. + - Define fine-grained permissions using IAM policies to allow only necessary actions on ElastiCache resources. + - Assign IAM policies to the IAM users or roles to grant access. + +2. Implement Secure Network Access + - Place your ElastiCache cluster within a Virtual Private Cloud (VPC) to control network access. + - Create and configure security groups to allow access only from trusted networks or specific IP ranges. + - Ensure your VPC's network ACLs (Access Control Lists) are properly configured to restrict inbound and outbound traffic. + +3. Enable Encryption in Transit + - Configure your ElastiCache cluster to use SSL/TLS encryption for client connections. + - Use the `--transit-encryption-enabled` parameter when creating or modifying the cluster to enable encryption in transit. + - Update your client applications to connect to the ElastiCache cluster using SSL/TLS. + +4. Protect ElastiCache Credentials + - Avoid sharing access keys, secret keys, or IAM user credentials between individuals. + - Use IAM roles for Amazon EC2 instances or other AWS services to securely access ElastiCache without needing credentials. + - Rotate your access keys regularly and disable or remove unnecessary IAM users or roles. + +5. Enable Event Logging and Monitoring + - Enable CloudWatch Logs for your ElastiCache clusters to capture logs and monitor activities. + - Configure CloudWatch Alarms to be notified of any unusual or suspicious behavior. + - Set up CloudTrail to log API calls made to ElastiCache for auditing and compliance purposes. + +6. Regularly Review and Update Access Controls + - Perform regular reviews of IAM policies, security groups, and network ACLs to ensure they align with your security requirements. + - Remove any unnecessary or excessive privileges from IAM policies. + - Stay updated with AWS security best practices and recommendations to improve access controls. + +## Expected Result + +IAM policies are configured with least privilege access, ElastiCache clusters are in VPCs with proper security groups, encryption in transit is enabled, and logging/monitoring is active. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to secure access to ElastiCache clusters. + +## Default Value + +By default, ElastiCache clusters are accessible within the VPC they are created in, but detailed IAM policies, encryption in transit, and monitoring need to be configured. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.10/SKILL.md new file mode 100644 index 0000000000..2be21bfa5a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.10/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-aws-database-5.10 +description: "Ensure Security Configurations are Reviewed Regularly" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, security-review, keyspaces, compliance] +cis_id: "5.10" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.7, cis-aws-database-5.8] +prerequisites: [] +severity_boost: {} +--- + +# 5.10 Ensure Security Configurations are Reviewed Regularly + +## Description + +Regularly updating and reviewing the security configuration of your Amazon Keyspaces environment helps ensure that your database is protected against potential vulnerabilities and aligned with your security requirements. + +## Rationale + +N/A + +## Impact + +If you are not updating these regularly, your database would most likely become susceptible to a vulnerable attack. Not updating your IAM permission, network, and encryption setting, and controlling audit logging, would lead to the attacker getting into the system which would result in data loss. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon Keyspaces Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/keyspaces/. + +3. Select the Keyspace + - Choose the Keyspace (database) for which you want to update and review the security configuration. + - Click on the Keyspace name to access its details page. + +4. Review IAM Roles and Permissions + - In the Keyspace details page, click on the `Configuration` tab. + - Under the `Authentication and access control` section, review the IAM roles and permissions associated with the Keyspace. + - Ensure that the IAM roles have appropriate permissions and follow the principle of least privilege. + - Review the IAM policies and make any necessary updates to align with your security requirements. + +5. Review Network Security + - In the Keyspace details page, click on the `Configuration` tab. + - Under the `Network & Security` section, review the VPC, subnets, security groups, and network ACLs associated with the Keyspace. + - Ensure that the VPC and subnet configurations align with your security requirements. + - Review the security group rules and network ACL rules to ensure they restrict access to necessary ports, IP ranges, and protocols. + - Make any necessary updates to tighten the network security settings. + +6. Review Encryption Settings + - In the Keyspace details page, click on the `Configuration` tab. + - Under the `Encryption` section, review the encryption settings for the Keyspace. + - Ensure that encryption at rest and in transit are enabled and the appropriate encryption options are chosen. + - Review any customer-managed keys used for encryption and verify their configurations. + +7. Review Access Control + - In the Keyspace details page, click on the `Configuration` tab. + - Under the `Authentication and access control` section, review the Access Control Lists (ACLs) for the Keyspace. + - Ensure the ACLs define appropriate access permissions at the table and row levels. + - Review the ACL rules and make any necessary updates to align with your security policies and access requirements. + +8. Review Audit Logging + - In the Keyspace details page, click on the `Configuration` tab. + - Review the Keyspace's logging configuration under the `Logging` section. + - Ensure the logs are captured and stored in CloudWatch Logs as expected. + - Please review the log retention settings and y that they comply with your retention policies. + +9. Regularly Monitor Security Bulletins + - Stay updated with AWS security bulletins, advisories, and best practices. + - Monitor AWS security announcements and subscribe to relevant security notifications. + - Regularly review and apply security patches, updates, and recommended configuration changes for Amazon Keyspaces. + +## Expected Result + +All security configurations for Keyspaces (IAM, network, encryption, access control, audit logging) are regularly reviewed and updated to align with security requirements. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to review and update security configurations for Amazon Keyspaces on a regular schedule. + +## Default Value + +N/A - This is a procedural control that requires regular manual review. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5 Account Management | | | | +| v7 | 5 Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.11/SKILL.md new file mode 100644 index 0000000000..ff8de003c1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.11/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-aws-database-5.11 +description: "Ensure ElastiCache has Cluster Mode Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, cluster-mode, high-availability, scaling] +cis_id: "5.11" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.12] +prerequisites: [] +severity_boost: {} +--- + +# 5.11 Ensure ElastiCache has Cluster Mode Enabled + +## Description + +Cluster Mode Enabled for ElastiCache distributes data across multiple shards, enabling horizontal scaling, higher availability, and isolating potential failures or resource exhaustion to a subset of the data set, rather than the entire cluster. + +## Rationale + +Enabling Cluster Mode reduces the risk of service outage from node failures, hardware limits, or scaling bottlenecks. Data partitioning across shards allows zero-downtime horizontal scaling, automated failover, and better resource utilization in production workloads, especially under high load or large data sets. + +## Impact + +Enabling Cluster Mode transforms ElastiCache from a single fault domain into a distributed, highly available system. + +## Audit Procedure + +### Using AWS CLI + +List Cluster Mode Status for All Replication Groups: + +```bash +aws elasticache describe-replication-groups \ + --query "ReplicationGroups[*].{ReplicationGroupId:ReplicationGroupId,ClusterModeEnabled:ClusterEnabled}" +``` + +- This will output a concise list showing each cluster's ID and whether Cluster Mode is enabled (true) or not (false). +- Review and flag any replication group entries where "ClusterModeEnabled": false. + +## Expected Result + +All replication groups show `ClusterModeEnabled: true`. + +## Remediation + +### Using AWS CLI + +Migration from Cluster Mode Disabled (CMD) to Cluster Mode Enabled (CME) is possible via the cluster mode compatible feature provided by AWS. + +**1. Pre-requisites:** + +- The cluster may only have keys in database 0 only. +- Applications must use a Valkey or Redis OSS client that is capable of using Cluster protocol and use a configuration endpoint. +- Auto-failover must be enabled on the cluster with a minimum of 1 replica. +- The minimum engine version required for migration is Valkey 7.2 and above, or Redis OSS 7.0 and above. + +**2. Modify Cluster Mode to Compatible** + +Change the existing replication group cluster mode from disabled to Compatible: + +```bash +aws elasticache modify-replication-group \ + --replication-group-id \ + --cluster-mode compatible \ + --apply-immediately +``` + +- In this mode, ElastiCache behaves as a single shard cluster but supports both cluster mode enabled and disabled client connections. + +**3. Migrate All Clients to Cluster Mode Enabled** + +- Update your application clients to support the cluster protocol using the cluster configuration endpoint. +- Validate application behavior in this intermediate compatible mode. +- This allows your client applications to start transitioning to the cluster-aware mode while maintaining backward compatibility. + +**4. Complete Cluster Mode Configuration** + +Once all client applications have been migrated and validated, finalize the cluster mode by switching from Compatible to Enabled: + +```bash +aws elasticache modify-replication-group \ + --replication-group-id \ + --cluster-mode enabled \ + --apply-immediately +``` + +- This enforces cluster mode fully, allowing scaling and other cluster features to be enabled. + +## Default Value + +By default, Cluster Mode may not be enabled for ElastiCache replication groups. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4 Secure Configuration of Enterprise Assets and Software | | | | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.12/SKILL.md new file mode 100644 index 0000000000..78b17a5c1e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.12/SKILL.md @@ -0,0 +1,86 @@ +--- +name: cis-aws-database-5.12 +description: "Ensure ElastiCache is deployed across multiple Availability Zones (AZs)" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, multi-az, high-availability, failover] +cis_id: "5.12" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.11] +prerequisites: [] +severity_boost: {} +--- + +# 5.12 Ensure ElastiCache is deployed across multiple Availability Zones (AZs) + +## Description + +Deploying Amazon ElastiCache across multiple Availability Zones means configuring the cache cluster nodes (primary and replicas) to be distributed in different AZs within the same AWS region. This multi-AZ deployment improves fault tolerance and availability by mitigating risks associated with failure or degradation in a single Availability Zone. If the primary node or an AZ becomes unavailable, ElastiCache can automatically fail over to a replica in a different AZ, minimizing downtime and data unavailability. + +## Rationale + +Distributing ElastiCache nodes across multiple AZs protects the caching layer from localized infrastructure failures, such as power outages, networking disruptions, or hardware faults in a single AZ. + +## Impact + +Enabling multi-AZ deployment for ElastiCache clusters enhances system availability and resiliency, significantly reducing the risk of cache service interruptions due to an AZ failure or node disruption. + +## Audit Procedure + +### Using AWS CLI + +Audit All Replication Groups for Multi-AZ Status: + +```bash +aws elasticache describe-replication-groups --query "ReplicationGroups[*].{ID:ReplicationGroupId,MultiAZ:MultiAZ}" +``` + +This returns true if Multi-AZ with automatic failover is enabled, otherwise false. + +## Expected Result + +All replication groups show `MultiAZ: enabled`. + +## Remediation + +### Using AWS CLI + +**1. Prerequisites for Enabling Multi-AZ on ElastiCache:** + +- VPC with Subnets in Multiple Availability Zones: The VPC associated with your ElastiCache replication group must have at least two subnets in different Availability Zones within the same AWS Region. +- Cache Subnet Group Configuration: The cache subnet group used by the replication group must include multiple subnets spanning the desired AZs to support node placement. +- Replication Group with At Least One Replica: Multi-AZ requires a primary node and at least one read replica that can be deployed in a different AZ to support automatic failover. +- Automatic Failover Enabled: Failover between primary and replicas is automatic with Multi-AZ, so automatic failover must be enabled on the replication group (can be set at creation or modified later). + +**2. Modify the Replication Group to Enable Multi-AZ:** + +```bash +aws elasticache modify-replication-group \ + --replication-group-id \ + --multi-az-enabled \ + --apply-immediately +``` + +- This command enables Multi-AZ with automatic failover for the specified replication group. +- The --apply-immediately flag ensures the change happens without waiting for the next maintenance window. Use with caution in production. + +## Default Value + +By default, Multi-AZ is not enabled for ElastiCache replication groups. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4 Secure Configuration of Enterprise Assets and Software | | | | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.13/SKILL.md new file mode 100644 index 0000000000..58755c3ed0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.13/SKILL.md @@ -0,0 +1,102 @@ +--- +name: cis-aws-database-5.13 +description: "Ensure ElastiCache has automatic backups enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, backup, snapshots, disaster-recovery] +cis_id: "5.13" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.11, cis-aws-database-5.12] +prerequisites: [] +severity_boost: {} +--- + +# 5.13 Ensure ElastiCache has automatic backups enabled + +## Description + +Ensure that Amazon ElastiCache clusters that store critical or stateful data have automatic backups enabled with a non-zero retention period. This setting configures ElastiCache to take daily snapshots of caches and retain them for a defined number of days, allowing restoration of data in case of corruption, accidental deletion, or infrastructure failure. + +## Rationale + +Automatic backups provide a simple and reliable way to recover ElastiCache data without relying solely on application-level safeguards. In the event of node failure, misconfiguration, or data corruption, a recent backup snapshot can be used to create a new cache or replication group, significantly reducing recovery time and impact on dependent applications. + +## Impact + +Enabling automatic backups for ElastiCache ensures that cache data is regularly captured in snapshots, keeping it protected and readily recoverable in case of accidental deletion, corruption, or node failure. As a result, organizations can quickly recreate cache clusters from recent backups and restore access to the cached data, minimizing downtime and business impact from unexpected data loss events. + +## Audit Procedure + +### Using AWS CLI + +**1. List backup settings for all cache clusters (node-based):** + +```bash +aws elasticache describe-cache-clusters \ + --show-cache-node-info \ + --query "CacheClusters[*].{Id:CacheClusterId,Engine:Engine,SnapshotRetentionLimit:SnapshotRetentionLimit}" +``` + +- SnapshotRetentionLimit > 0 => automatic backups enabled. +- SnapshotRetentionLimit = 0 or null => automatic backups disabled. + +**2. List backup settings for all replication groups (Redis/Valkey):** + +```bash +aws elasticache describe-replication-groups \ + --query "ReplicationGroups[*].{Id:ReplicationGroupId,Engine:Engine,SnapshotRetentionLimit:SnapshotRetentionLimit}" +``` + +- Again, treat SnapshotRetentionLimit = 0 as non-compliant for this control. + +## Expected Result + +All cache clusters and replication groups storing critical data have SnapshotRetentionLimit > 0. + +## Remediation + +### Using AWS CLI + +Enable backups on a replication group (Redis/Valkey): + +```bash +aws elasticache modify-replication-group \ + --replication-group-id \ + --snapshot-retention-limit 7 \ + --snapshotting-cluster-id \ + --apply-immediately +``` + +- replication-group-id is your replication group (e.g., my-redis-rg). +- primary-cache-cluster-id is the cache cluster ID that should be used as the daily snapshot source (often the primary node, like my-redis-rg-001). +- snapshot-retention-limit 7 sets a 7-day retention; choose a value (1-35 days) per your policy. +- Optionally set or adjust --preferred-maintenance-window or a specific --snapshot-window if supported for your engine/version. +- Use --apply-immediately for immediate effect; omit it to apply in the next maintenance window. +- You can find the cluster IDs with: + +```bash +aws elasticache describe-cache-clusters \ + --show-cache-node-info \ + --query "CacheClusters[*].{Id:CacheClusterId,ReplicationGroupId:ReplicationGroupId}" +``` + +## Default Value + +By default, SnapshotRetentionLimit is 0 (automatic backups disabled) for ElastiCache clusters. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------- | ---- | ---- | ---- | +| v8 | 11 Data Recovery | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.2/SKILL.md new file mode 100644 index 0000000000..0977d225ce --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.2/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-database-5.2 +description: "Ensure Network Security is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, vpc, security-groups, network-security] +cis_id: "5.2" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.1, cis-aws-database-5.5] +prerequisites: [] +severity_boost: {} +--- + +# 5.2 Ensure Network Security is Enabled + +## Description + +Implementing network security for Amazon ElastiCache involves configuring your Virtual Private Cloud (VPC), security groups, and network access controls to control access to your ElastiCache clusters. + +## Rationale + +This helps ensure that the data is safe and protected from any threats and or misconfigurations within the network. This helps to keep a potential hacker getting into the system and compromising the data. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Create or Select a VPC + - Sign in to the AWS Management Console and open the Amazon VPC console at https://console.aws.amazon.com/vpc/. + - Create a new VPC or select an existing VPC where you want to deploy your ElastiCache cluster. + +2. Create Subnets + - In the VPC console, navigate to `Subnets` in the left-side menu. + - Create or select the desired subnets within your VPC where you want to deploy your ElastiCache cluster. + +3. Configure Security Groups + - In the VPC console, navigate to `Security Groups` in the left-side menu. + - Create a new security group or select an existing one to configure the security settings for your ElastiCache cluster. + - Define inbound and outbound rules to control the traffic flow to and from your ElastiCache cluster. + - Allow inbound traffic from trusted sources (e.g., specific IP ranges or security groups) on the necessary ports used by your ElastiCache cluster. + - Define outbound rules based on your requirements, such as allowing outbound traffic to specific destinations or ports. + - Associate the security group with the ElastiCache cluster when creating or modifying it. + +4. Set up Network Access Control Lists (ACLs) + - In the VPC console, navigate to `Network ACLs` in the left-side menu. + - Create or select the appropriate network ACL associated with the subnets used by your ElastiCache cluster. + - Configure inbound and outbound rules in the network ACL to allow or deny traffic to and from your ElastiCache cluster. + - Define rules based on your security requirements, allowing only necessary protocols, ports, and IP ranges. + - Associate the network ACL with the subnets used by your ElastiCache cluster. + +5. Configure Route Tables + - In the VPC console, navigate to `Route Tables` in the left-side menu. + - Create or select the route table associated with the subnets used by your ElastiCache cluster. + - Add or modify routes to ensure traffic to and from your ElastiCache cluster flows correctly. + - Ensure that the route table has an appropriate route to the internet gateway or virtual private gateway if external connectivity is required. + - Associate the route table with the subnets used by your ElastiCache cluster. + +6. Verify Connectivity and Test + - Launch an Amazon EC2 instance within the same VPC and subnet as your ElastiCache cluster or use an existing one. + - Connect to the EC2 instance using SSH or other remote access methods. + - Test the connectivity to your ElastiCache cluster by trying to connect to it using the appropriate client or utility. + - Verify that the network security settings allow the necessary traffic and deny unauthorized access. + +## Expected Result + +ElastiCache clusters are deployed within a VPC with properly configured security groups, network ACLs, and route tables that restrict access to trusted sources only. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to configure network security for ElastiCache clusters. + +## Default Value + +By default, ElastiCache clusters are created within a VPC but security groups, network ACLs, and route tables may need manual configuration for proper security. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 11.7 Manage Network Infrastructure Through a Dedicated Network | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.3/SKILL.md new file mode 100644 index 0000000000..b580b3b86a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.3/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-aws-database-5.3 +description: "Ensure Encryption at Rest and in Transit is configured" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, encryption, tls, kms, encryption-at-rest, encryption-in-transit] +cis_id: "5.3" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.1, cis-aws-database-5.2] +prerequisites: [] +severity_boost: {} +--- + +# 5.3 Ensure Encryption at Rest and in Transit is configured + +## Description + +Enabling encryption at rest and in transit for Amazon ElastiCache helps protect your data when it is stored and transmitted. + +## Rationale + +Enabling encryption at rest secured the users data where it is stored. Enabling encryption in transit helps that the data is protected when it is moving from one location to another. + +## Impact + +If the user didn't enable encryption and rest and during transit, there is a possibility of the data being vulnerable to a ransomware attack. + +## Audit Procedure + +### Using AWS Console + +1. Enable Encryption at Rest + - Sign in to the AWS Management Console and open the Amazon ElastiCache console at https://console.aws.amazon.com/elasticache/. + - Create a new ElastiCache cluster or select an existing cluster. + - On the cluster details page, click the `Encryption` tab. + - Select the option to enable encryption Under the `Encryption at Rest` section. + - Choose the desired encryption type: + - Default Encryption: Select this option to use the default AWS-managed key for encryption. + - Customer Managed Key (CMK): Select this option to use your own AWS Key Management Service (KMS) customer-managed key for encryption. + - If you selected `Customer Managed Key (CMK)`, choose the appropriate KMS key from the dropdown menu. + - Click "Save changes" to enable encryption at rest for the ElastiCache cluster. + +2. Enable Encryption in Transit + - On the ElastiCache cluster details page, click the `Encryption` tab. + - Select the option to enable encryption Under the "Encryption in Transit" section. + - Choose the desired encryption type: + - Transit encryption enabled with SSL/TLS: Select this option to enable encryption in transit using SSL/TLS encryption. + - Transit encryption disabled: Select this option if you do not require encryption in transit. + - Click `Save changes` to enable encryption in transit for the ElastiCache cluster. + +3. Verify the Encryption Status + - Wait a few minutes for the changes to propagate and the encryption to take effect. + - Refresh the ElastiCache console and navigate to the cluster details page. + - Verify that the encryption status is now enabled for both encryptions at rest and in transit. + +## Expected Result + +Both encryption at rest and encryption in transit are enabled on all ElastiCache clusters. + +## Remediation + +The user has two options when it comes to encryption at rest and in transit to choose from. Depending on what actions the user selects from it determines how their data is going to be protected. + +### Using AWS Console + +Follow the same steps as the audit procedure to enable encryption at rest and in transit for ElastiCache clusters. + +## Default Value + +By default, encryption at rest and encryption in transit are not enabled for ElastiCache clusters. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.4/SKILL.md new file mode 100644 index 0000000000..2bf287655a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.4/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-aws-database-5.4 +description: "Ensure Automatic Updates and Patching are Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, patching, updates, vulnerability-management] +cis_id: "5.4" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.7] +prerequisites: [] +severity_boost: {} +--- + +# 5.4 Ensure Automatic Updates and Patching are Enabled + +## Description + +Enabling automatic updates and patching for Amazon ElastiCache ensures that your ElastiCache clusters run the latest software versions with important security fixes and enhancements. + +## Rationale + +Automatic updates help the software be updated and address any vulnerabilities within the software that can help business with any potential exists that can impact the business and prevent any unauthorized access. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the ElastiCache Console + - Open the Amazon ElastiCache console by navigating to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/elasticache/. + +3. Select the ElastiCache Cluster + - Choose the ElastiCache cluster you want to enable automatic updates and patching. + - Click on the cluster name to access its details page. + +4. Enable Automatic Updates + - Click on the `Configuration` tab on the cluster details page. + - Scroll down to the `Cluster details` section. + - Under `Cluster maintenance and updates`, click `Modify`. + - In the `Maintenance and updates` dialog, find the `Auto minor version upgrade` option and select `Enable`. + - Leave other settings unchanged or adjust them according to your requirements. + - Click `Save` to apply the changes. + +5. Verify Automatic Updates Status + - Wait a few moments for the changes to take effect. + - Refresh the cluster details page to see the updated configuration. + - Verify that the "Auto minor version upgrade" setting is now enabled for the ElastiCache cluster. + +## Expected Result + +Auto minor version upgrade is enabled for all ElastiCache clusters. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to enable automatic updates and patching for ElastiCache clusters. + +## Default Value + +By default, auto minor version upgrade may not be enabled for ElastiCache clusters. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------- | ---- | ---- | ---- | +| v8 | 7 Continuous Vulnerability Management | | | | +| v7 | 3 Continuous Vulnerability Management | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.5/SKILL.md new file mode 100644 index 0000000000..bd3e57daec --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.5/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-aws-database-5.5 +description: "Ensure Virtual Private Cloud (VPC) is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, vpc, network-security, subnets] +cis_id: "5.5" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.2] +prerequisites: [] +severity_boost: {} +--- + +# 5.5 Ensure Virtual Private Cloud (VPC) is Enabled + +## Description + +Implementing VPC security best practices for Amazon ElastiCache involves configuring your Virtual Private Cloud (VPC) and associated resources to enhance the security of your ElastiCache clusters. + +## Rationale + +This ensures that only authorized users can access their platforms and prevents any mistakes that can lead to a data breach due to the level of security. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Create or Select a VPC + - Sign in to the AWS Management Console and open the Amazon VPC console at https://console.aws.amazon.com/vpc/. + - Create a new VPC or select an existing VPC to host your ElastiCache clusters. + +2. Configure Subnets + - In the VPC console, navigate to `Subnets` in the left-side menu. + - Create or select the subnets within your VPC where you want to deploy your ElastiCache clusters. + - Ensure you have private subnets for your ElastiCache clusters to avoid exposing them to the public internet. + +3. Define Security Groups + - In the VPC console, navigate to `Security Groups` in the left-side menu. + - Create a new security group or select an existing one for your ElastiCache clusters. + - Configure inbound and outbound rules in the security group to control traffic access. + - Allow inbound access only from trusted sources or specific IP ranges required for your applications. + - Restrict outbound access to necessary destinations and protocols. + - Associate the security group with your ElastiCache clusters. + +4. Configure Network Access Control Lists (ACLs) + - In the VPC console, navigate to `Network ACLs` in the left-side menu. + - Create or select the network ACLs associated with the subnets used by your ElastiCache clusters. + - Configure inbound and outbound rules in the network ACLs to control traffic access. + - Define rules based on your security requirements, allowing only necessary protocols, ports, and IP ranges. + - Deny unnecessary or unwanted traffic. + - Associate the network ACLs with the subnets used by your ElastiCache clusters. + +5. Configure Routing + - In the VPC console, navigate to `Route Tables` in the left-side menu. + - Create or select the route table associated with the subnets used by your ElastiCache clusters. + - Add or modify routes to ensure traffic flows correctly to and from your ElastiCache clusters. + - Ensure that the route table has appropriate routes to the internet gateway or virtual private gateway if external connectivity is required. + - Associate the route table with the subnets used by your ElastiCache clusters. + +6. Review and Update Network Security Settings + - Regularly review and update your VPC security configurations, including security groups, network ACLs, and routing, to align with your security requirements. + - Remove any unnecessary or excessive permissions from security groups and tighten inbound and outbound access as needed. + - Stay informed about AWS security best practices and recommendations to enhance your network security. + +## Expected Result + +ElastiCache clusters are deployed in a VPC with private subnets, properly configured security groups, network ACLs, and route tables. + +## Remediation + +The individual is required to create a subnet and configure their inbound and outbound access. Individuals are supposed to configure their ACL and routing ensuring the traffic is flowing smoothly without any interference. This control is important because it only allows authorized user to access their resources as they prefer. + +### Using AWS Console + +Follow the same steps as the audit procedure to configure VPC security for ElastiCache clusters. + +## Default Value + +By default, ElastiCache clusters are created within a VPC, but proper subnet, security group, and ACL configuration requires manual setup. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 11.7 Manage Network Infrastructure Through a Dedicated Network | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.6/SKILL.md new file mode 100644 index 0000000000..b580624311 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.6/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-aws-database-5.6 +description: "Ensure Monitoring and Logging is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, monitoring, logging, cloudwatch] +cis_id: "5.6" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.9] +prerequisites: [] +severity_boost: {} +--- + +# 5.6 Ensure Monitoring and Logging is Enabled + +## Description + +Implementing monitoring and logging for Amazon ElastiCache allows you to gain visibility into the performance, health, and behavior of your ElastiCache clusters. + +## Rationale + +This helps the individual know what is being logged within the activity and determine what next step they should take to address any suspicious activity. + +## Impact + +If the individual is not monitoring and logging their activity it allows the attacker to attack the system and extract or destroy data. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the ElastiCache Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/elasticache/. + +3. Select the ElastiCache Cluster + - Choose the ElastiCache cluster for which you want to implement monitoring and logging. + - Click on the cluster name to access its details page. + +4. Enable Enhanced Monitoring + - Click on the `Monitoring` tab on the cluster details page. + - Under the `Monitoring` section, click on the `Enable Enhanced Monitoring` button. + - Select the desired monitoring granularity (1 minute, 5 minutes, or 60 minutes) to capture detailed metrics. + - Choose the desired CloudWatch namespace to store the metrics. + - Click `Save changes` to enable enhanced monitoring for the ElastiCache cluster. + +5. Set Up CloudWatch Alarms + - In the CloudWatch console, navigate to `Alarms` in the left-side menu. + - Click `Create alarm` to create a new alarm. + - Select the appropriate ElastiCache metrics from the available options. + - Configure the threshold, conditions, and actions for the alarm. + - Choose the actions to take when the alarm state is triggered (e.g., send notifications, auto-scaling actions, etc.). + - Click `Create alarm` to save the alarm configuration. + +6. Configure CloudWatch Logs + - In the CloudWatch console, navigate to `Logs` in the left-side menu. + - Click `Create log group` to create a new one. + - Provide a unique name for the log group and optionally specify a retention period for log data. + - Click `Create log group` to create the log group. + - On the ElastiCache cluster details page, click the `Logging` tab. + - Enable the `CloudWatch Logs` option and select the desired log group from the dropdown menu. + - Click `Save changes` to enable CloudWatch Logs for the ElastiCache cluster. + +7. Verify Monitoring and Logging + - Wait a few minutes for the monitoring and logging configurations to take effect. + - Refresh the cluster details page for the updated monitoring and logging status. + - Navigate to the CloudWatch console to view metrics, alarms, and logs related to your ElastiCache cluster. + +## Expected Result + +Enhanced monitoring is enabled, CloudWatch alarms are configured, and CloudWatch Logs are enabled for all ElastiCache clusters. + +## Remediation + +The individual can understand the health, performance, and behavior of their clusters which allows them to address any unusual activity that takes place. + +### Using AWS Console + +Follow the same steps as the audit procedure to enable monitoring and logging for ElastiCache clusters. + +## Default Value + +By default, basic monitoring is enabled but enhanced monitoring and CloudWatch Logs require manual configuration. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.7/SKILL.md new file mode 100644 index 0000000000..136d4087a8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.7/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-aws-database-5.7 +description: "Ensure Security Configurations are Reviewed Regularly" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, security-review, configuration, compliance] +cis_id: "5.7" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.1, cis-aws-database-5.3, cis-aws-database-5.5] +prerequisites: [] +severity_boost: {} +--- + +# 5.7 Ensure Security Configurations are Reviewed Regularly + +## Description + +Regularly updating and reviewing the security configuration of your Amazon ElastiCache clusters helps ensure that your clusters are protected against potential vulnerabilities and aligned with your security requirements. + +## Rationale + +This ensures that the clusters are being regularly updated and protected from any potential vulnerabilities as well as meeting the security requirements. + +## Impact + +Updating the system and being updated with security configurations keeps everything secure and prevents it from an attack. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the ElastiCache Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/elasticache/. + +3. Select the ElastiCache Cluster + - Choose the ElastiCache cluster you want to update and review the security configuration. Click on the cluster name to access its details page. + +4. Review IAM Policies + - Navigate to the `Configuration` tab on the cluster details page. + - Click on the `IAM Access` tab. + - Review the IAM policies associated with the ElastiCache cluster and its resources. + - Ensure that the IAM policies provide the least privileged access, granting only the necessary permissions to users and roles. + - Update the IAM policies as required based on changes in access requirements or security best practices. + +5. Review Security Groups + - Navigate to the `Configuration` tab on the cluster details page. + - Click on the `Security Groups` tab. + - Review the security groups associated with the ElastiCache cluster. + - Ensure that the inbound and outbound rules of the security groups are configured correctly and restrict access to necessary ports and IP ranges. + - Update the security group rules as needed to align with your security requirements. + +6. Review Encryption Settings + - Navigate to the `Configuration` tab on the cluster details page. + - Click on the `Encryption at Rest` tab. + - Verify the encryption settings for the ElastiCache cluster. + - Ensure that encryption at rest is enabled and using the appropriate encryption type (default AWS-managed key or customer-managed key). + - Update the encryption settings if necessary to comply with your security policies. + +7. Review Network Security + - Navigate to the `Configuration` tab on the cluster details page. + - Click on the `Network & Security` tab. + - Review the VPC, subnets, security groups, and network ACLs associated with the ElastiCache cluster. + - Ensure that the VPC and subnet configurations align with your security requirements. + - Update the network security settings as needed to maintain a secure network architecture. + +8. Review Access Control + - Navigate to the `Configuration` tab on the cluster details page. + - Click on the `Security` tab. + - Review the authentication and access control settings for the ElastiCache cluster. + - Ensure that the authentication method (no password, transit encryption, or encryption in transit) meets your security standards. + - Update the access control settings as required to align with your security policies. + +9. Regularly Monitor Security Bulletins + - Stay updated with AWS security bulletins, advisories, and best practices. + - Regularly review security-related announcements from AWS. + - Take necessary actions based on security recommendations, such as applying patches or configuration changes. + +## Expected Result + +All ElastiCache security configurations (IAM policies, security groups, encryption settings, network security, access control) are regularly reviewed and aligned with security requirements. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to review and update security configurations for ElastiCache clusters on a regular schedule. + +## Default Value + +N/A - This is a procedural control that requires regular manual review. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5 Account Management | | | | +| v7 | 5 Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.8/SKILL.md new file mode 100644 index 0000000000..b8231f9bf9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.8/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-aws-database-5.8 +description: "Ensure Authentication and Access Control is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, authentication, access-control, iam, acl] +cis_id: "5.8" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.1, cis-aws-database-5.7] +prerequisites: [] +severity_boost: {} +--- + +# 5.8 Ensure Authentication and Access Control is Enabled + +## Description + +Individual creates IAM roles that would give specific permission to what the user can and cannot do within that database. The Access Control List (ACLs) allows only specific individuals to access the resources. + +## Rationale + +N/A + +## Impact + +Use specific client's applications or tools that allow the authorized personnel to connect to the database. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon Keyspaces Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/keyspaces/. + +3. Select the Keyspace + - Choose the Keyspace (database) for which you want to implement authentication and access control. + - Click on the Keyspace name to access its details page. + +4. Enable IAM for Cassandra + - In the Keyspace details page, click on the `Configuration` tab. + - Under the `Authentication and access control` section, locate the "IAM for Cassandra" option. + - Click on `Edit`. + - Select the `Enable` option to enable IAM for Cassandra authentication and authorization. + - Choose the IAM role(s) that can access the Keyspace. + - Click `Save` to enable IAM for Cassandra. + +5. Define IAM Roles and Permissions + - Open the IAM console by navigating to `Identity and Access Management (IAM)` in the AWS Management Console. + - Create IAM roles with appropriate policies defining the desired access level to your Amazon Keyspaces resources. + - You may create different roles for different user groups or applications. + - Ensure that the IAM policies associated with these roles allow the necessary permissions for interacting with Keyspaces. + - Attach the IAM roles to the appropriate AWS identities, such as IAM users or AWS Identity and Access Management roles. + +6. Review and Update Access Control + - In the Keyspace details page, click on the `Configuration` tab. + - Under the `Authentication and access control` section, click on `Access Control Lists` (ACLs). + - Review the ACLs to define fine-grained access control at the table and row level. + - Define rules that allow or deny access based on specific conditions, such as IP addresses or IAM roles. + - Ensure that the ACL rules align with your security requirements and restrict access to sensitive data if necessary. + - Update the ACLs as needed to accommodate changes. + +7. Verify Authentication and Access Control + - Test the authentication and access control mechanisms using client applications or tools that connect to your Amazon Keyspaces resources. + - Verify that only authorized users or applications can access the Keyspaces resources based on the defined IAM roles and ACL rules. + - Monitor the access logs and perform periodic reviews to ensure the authentication and access control measures function as intended. + +## Expected Result + +IAM authentication is enabled for ElastiCache/Keyspaces, IAM roles have least-privilege access, and ACLs are properly configured to restrict access to authorized users only. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to enable authentication and configure access control for ElastiCache clusters. + +## Default Value + +By default, IAM for Cassandra authentication is not enabled and ACLs are not configured. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.9/SKILL.md new file mode 100644 index 0000000000..7954f2e6bd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-5.9/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-aws-database-5.9 +description: "Ensure Audit Logging is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, elasticache, redis, audit, logging, cloudwatch] +cis_id: "5.9" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-5.6] +prerequisites: [] +severity_boost: {} +--- + +# 5.9 Ensure Audit Logging is Enabled + +## Description + +To manage your enterprise caching solution, it is important that you know how your clusters are performing and the resources they are consuming. It's also important that you know the events that are being generated and the costs of your deployment. + +Amazon CloudWatch provides metrics for monitoring your cache performance. In addition, cost allocation tags help you monitor and manage costs. + +## Rationale + +N/A + +## Impact + +Reduce the risk of any fraud or inconsistency within the database because only authorized user has access to it. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon Keyspaces Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/keyspaces/. + +3. Select Keyspace + - Choose the Keyspace (database) for which you want to enable audit logging. + - Click on the Keyspace name to access its details page. + +4. Enable Amazon CloudWatch Logs + - In the Keyspace details page, click on the `Configuration` tab. + - Under the `Logging` section, locate the `CloudWatch Logs` option. + - Click on `Edit`. + - Select the `Enable` option to enable logging for the Keyspace. + - Choose an existing CloudWatch Logs log group or create a new one to store the logs generated by the Keyspace activities. + - Click `Save` to enable CloudWatch Logs for the Keyspace. + +5. Configure CloudWatch Logs + - Open the CloudWatch console by navigating to `CloudWatch` in the AWS Management Console. + - In the left-side menu, click on `Logs`. + - Create a new log group or select an existing log group that will store the Keyspaces logs. + - Configure log retention settings based on your retention requirements. Logs can be stored for a specific number of days or indefinitely. + - Define any necessary log group permissions to control access to the logs. + - Optionally, set up log exports or alarms for specific log events or patterns if needed. + +6. Verify the Logging Status + - Wait a few minutes for the changes to propagate and the logging configuration to take effect. + - Refresh the Keyspace details page to see the updated logging status. + - Verify that CloudWatch Logs is enabled for the Keyspace. + +7. Monitor and Analyze Logs + - Navigate to the CloudWatch console and select the log group that stores the Keyspaces logs. + - Monitor the logs to gain insights into the activities and operations performed on your Keyspace. + - Use CloudWatch Logs features, such as log searching, filtering, and visualization, to analyze the logs and identify any security or operational issues. + - Establish appropriate log monitoring and alerting mechanisms to proactively identify and respond to potential security incidents or operational anomalies. + +## Expected Result + +CloudWatch Logs is enabled for ElastiCache/Keyspaces, log groups are configured with appropriate retention periods, and logs are being actively monitored. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to enable audit logging for ElastiCache clusters. + +## Default Value + +By default, audit logging is not enabled for ElastiCache/Keyspaces. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.1/SKILL.md new file mode 100644 index 0000000000..f8a80f7b4b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.1/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-aws-database-6.1 +description: "Ensure Network Security is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, memorydb, redis, network, vpc, security-groups] +cis_id: "6.1" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-6.2, cis-aws-database-6.3, cis-aws-database-6.5] +prerequisites: [] +severity_boost: {} +--- + +# 6.1 Ensure Network Security is Enabled (Manual) + +## Description + +Ensure network security is enabled for Amazon MemoryDB for Redis clusters by deploying them within a secure Virtual Private Cloud (VPC), configuring appropriate security groups, network ACLs, and VPC endpoints. + +## Rationale + +Network security controls are essential to isolate Amazon MemoryDB clusters from unauthorized access and ensure that only trusted sources can communicate with the clusters. + +## Impact + +Properly configured network security settings ensure that MemoryDB clusters are protected from unauthorized network access while allowing legitimate traffic. + +## Audit Procedure + +### Using AWS Console + +1. Create or Select a Virtual Private Cloud (VPC) + - Sign in to the AWS Management Console and open the Amazon VPC console at https://console.aws.amazon.com/vpc/. + - Create a new VPC or select an existing VPC where you want to deploy your Amazon MemoryDB clusters. + +2. Configure Subnets + - In the VPC console, navigate to `Subnets` in the left-side menu. + - Create or select the subnets within your VPC where you want to deploy your Amazon MemoryDB clusters. + - Ensure you have private subnets to isolate your MemoryDB clusters from the public internet. + +3. Define Security Groups + - In the VPC console, navigate to `Security Groups` in the left-side menu. + - Create a new security group or select an existing one for your Amazon MemoryDB clusters. + - Configure inbound and outbound rules in the security group to control traffic access. + - Allow inbound access only from trusted sources, such as specific IP ranges or security groups, on the necessary ports used by MemoryDB. + - Define outbound rules based on your requirements, allowing outbound traffic to necessary destinations or ports. + - Associate the security group with your Amazon MemoryDB clusters. + +4. Configure Network Access Control Lists (ACLs) + - In the VPC console, navigate to `Network ACLs` in the left-side menu. + - Create or select the network ACLs associated with the subnets used by your Amazon MemoryDB clusters. + - Configure inbound and outbound rules in the network ACLs to control traffic access. + - Define rules based on your security requirements, allowing only necessary protocols, ports, and IP ranges. + - Deny unnecessary or unwanted traffic. + - Associate the network ACLs with the subnets used by your Amazon MemoryDB clusters. + +5. Configure VPC Endpoints + - In the VPC console, navigate to `Endpoints` in the left-side menu. + - Create or select the VPC endpoints required for Amazon MemoryDB. + - If you need to access MemoryDB from within your VPC, create a VPC endpoint for Amazon MemoryDB to connect your applications securely. + - If you need to access MemoryDB from another VPC or on-premises network, set up VPC peering or a transit gateway to establish a secure connection. + +6. Verify Connectivity and Test + - Launch an Amazon EC2 instance within the same VPC and subnet as your Amazon MemoryDB clusters or use an existing one. + - Connect to the EC2 instance using SSH or other remote access methods. + - Test the connectivity to your Amazon MemoryDB clusters by trying to connect to them using the appropriate client or utility. + - Verify that the network security settings allow the necessary traffic and deny unauthorized access. + +## Expected Result + +MemoryDB clusters are deployed in private subnets within a VPC, with security groups restricting access to only trusted sources and necessary ports. + +## Remediation + +### Using AWS Console + +Follow the same steps as the audit procedure to configure VPC, subnets, security groups, network ACLs, and VPC endpoints for your Amazon MemoryDB clusters. + +## Default Value + +Amazon MemoryDB clusters must be deployed within a VPC. Default security group rules may allow all outbound traffic. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | X | X | +| v7 | 11.7 Manage Network Infrastructure Through a Dedicated Network | | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.2/SKILL.md new file mode 100644 index 0000000000..473d08a842 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.2/SKILL.md @@ -0,0 +1,95 @@ +--- +name: cis-aws-database-6.2 +description: "Ensure Data at Rest and in Transit is Encrypted" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, memorydb, redis, encryption, kms, tls] +cis_id: "6.2" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-6.1, cis-aws-database-6.3, cis-aws-database-6.5] +prerequisites: [] +severity_boost: {} +--- + +# 6.2 Ensure Data at Rest and in Transit is Encrypted (Manual) + +## Description + +Ensure that encryption at rest and encryption in transit are both enabled for Amazon MemoryDB for Redis clusters to protect data confidentiality. + +## Rationale + +Encrypting data at rest and in transit protects sensitive information from unauthorized access. Encryption at rest ensures stored data cannot be read even if underlying storage is compromised. Encryption in transit (TLS) protects data as it moves between clients and the MemoryDB cluster. + +## Impact + +Enabling encryption may have a minor performance impact due to cryptographic operations. Applications must support TLS connections when encryption in transit is enabled. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console + - Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon MemoryDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/memorydb/. + +3. Select the Cluster + - Choose the MemoryDB cluster for which you want to enable encryption at rest and in transit. + - Click on the cluster name to access its details page. + +4. Enable Encryption at Rest + - In the cluster details page, navigate to the `Encryption at Rest` section. + - Click on `Modify` to edit the encryption settings. + - Select the desired encryption option: + - AWS Managed Key (Default): Choose this option to use the default AWS managed key for encryption at rest. Amazon MemoryDB automatically encrypts your data using this key. + - Customer Managed Key (CMK): Choose this option if you want to use your own AWS Key Management Service (KMS) customer-managed key for encryption. Select the appropriate CMK from the dropdown menu. + - Click "Apply Changes" to enable encryption at rest for the MemoryDB cluster. + +5. Enable Encryption in Transit + - In the cluster details page, navigate to the `Encryption in Transit` section. + - Click on `Modify` to edit the encryption settings. + - Select the desired encryption option: + - Encryption in Transit Enabled: Choose this option to enable encryption in transit for data transmitted between your client applications and MemoryDB. MemoryDB uses SSL/TLS encryption to secure the communication channel. + - Encryption in Transit Disabled: Choose this option if you do not require encryption in transit. + - Click `Apply Changes` to enable encryption in transit for the MemoryDB cluster. + +6. Verify Encryption Status + - Wait a few minutes for the changes to propagate and the encryption settings to take effect. + - Refresh the cluster details page to see the updated encryption status. + - Verify that encryption at rest and in transit are enabled for the MemoryDB cluster. + +## Expected Result + +Both encryption at rest and encryption in transit are enabled for all MemoryDB clusters. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to enable encryption at rest and in transit for each MemoryDB cluster. + +## Default Value + +Amazon MemoryDB for Redis encrypts data at rest by default using AWS managed keys. Encryption in transit (TLS) is enabled by default. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.3/SKILL.md new file mode 100644 index 0000000000..cb7e29e6cc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.3/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-database-6.3 +description: "Ensure Authentication and Access Control is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, memorydb, redis, authentication, acl, access-control] +cis_id: "6.3" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-6.1, cis-aws-database-6.2, cis-aws-database-6.5] +prerequisites: [] +severity_boost: {} +--- + +# 6.3 Ensure Authentication and Access Control is Enabled (Manual) + +## Description + +Ensure that authentication and access control are enabled for Amazon MemoryDB for Redis clusters to restrict access to authorized users only. + +## Rationale + +Users should select whether they like to enable authentication. If they want to authenticate a password would be required, which would only allow the authorized person to access the cluster. Defining access control allows specific workers in a business access to the database. + +## Impact + +Allowing authentication verifies the identity of the person and who has appropriate access to a company's data. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon MemoryDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/memorydb/. + +3. Select the Cluster + - Choose the Amazon MemoryDB cluster on which you want to implement authentication and access control. + - Click on the cluster name to access its details page. + +4. Enable Authentication + - In the cluster details page, navigate to the `Authentication` section. + - Click on `Modify` to edit the authentication settings. + - Select the desired authentication option: + - No Authentication: This option allows unauthenticated access to your MemoryDB cluster. + - Password Authentication: Choose this option to enable password-based authentication. Enter the desired password for the cluster. + - Click `Apply Changes` to enable authentication for the MemoryDB cluster. + +5. Define Access Control Policies + - In the cluster details page, navigate to the "Access Control" section. + - Click on `Modify` to edit the access control settings. + - Define the access control policies based on your requirements: + - For Redis-based clusters, you can use Redis Access Control Lists (ACLs) to control access at the Redis command level. + - Use the Redis commands to create, modify, or delete ACL rules as needed. + - You can define rules based on IP addresses, users, or patterns to allow or deny specific commands or operations. + - Click `Apply Changes` to save the access control policies for the MemoryDB cluster. + +6. Test Authentication and Access Control + - Use a Redis client or utility to connect to your Amazon MemoryDB cluster. + - Provide the necessary authentication credentials, such as the password, if password-based authentication is enabled. + - Test the connection and verify that you can access the MemoryDB cluster based on the defined access control policies. + +7. Regularly Review and Update Access Control + - Periodically review the access control policies to ensure they align with your security requirements. + - Update the ACL rules, passwords, or other authentication mechanisms to adapt to changing access requirements or security policies. + +## Expected Result + +Authentication is enabled (password or ACL-based) and access control policies are properly configured for all MemoryDB clusters. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to enable authentication and configure access control policies for each MemoryDB cluster. + +## Default Value + +Amazon MemoryDB for Redis requires authentication by default using Access Control Lists (ACLs). + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | X | X | X | +| v7 | 14.6 Protect Information through Access Control Lists | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.4/SKILL.md new file mode 100644 index 0000000000..e81f01cec1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.4/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-database-6.4 +description: "Ensure Audit Logging is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, memorydb, redis, logging, cloudwatch, audit] +cis_id: "6.4" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-6.5, cis-aws-database-6.6] +prerequisites: [] +severity_boost: {} +--- + +# 6.4 Ensure Audit Logging is Enabled (Manual) + +## Description + +Enabling audit logging on Amazon MemoryDB allows you to capture and store logs of activities performed on your clusters. + +## Rationale + +It captures and saves logs of activities that took place in the cluster. + +## Impact + +Reduces risks of any fraud since worker activity is being monitored and tracked. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon MemoryDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/memorydb/. + +3. Select the Cluster + - Choose the MemoryDB cluster for which you want to enable audit logging. Click on the cluster name to access its details page. + +4. Enable Amazon CloudWatch Logs + - In the cluster details page, navigate to the `Logging` section. + - Click on `Modify` to edit the logging settings. + - Select the option to enable CloudWatch Logs. + - Choose an existing CloudWatch log group or create a new one to store the logs generated by the MemoryDB cluster activities. + - Optionally, you can specify a log retention period to define how long the logs will be stored. + - Click `Apply Changes` to enable CloudWatch Logs for the MemoryDB cluster. + +5. Configure CloudWatch Logs + - Open the CloudWatch console by navigating to `CloudWatch` in the AWS Management Console. + - In the left-side menu, click on `Logs`. + - Create a new log group or select an existing log group that will store the MemoryDB logs. + - Configure log retention settings based on your retention requirements. Logs can be stored for a specific number of days or indefinitely. + - Define any necessary log group permissions to control access to the logs. + - Optionally, set up log exports or alarms for specific log events or patterns if needed. + +6. Verify Logging Status + - Wait a few minutes for the changes to propagate and the logging configuration to take effect. + - Refresh the cluster details page to see the updated logging status. + - Verify that CloudWatch Logs is enabled for the MemoryDB cluster. + +7. Monitor and Analyze Logs + - Navigate to the CloudWatch console and select the log group that stores the MemoryDB logs. + - Monitor the logs to gain insights into the activities and operations performed on your MemoryDB cluster. + - Use CloudWatch Logs features, such as log searching, filtering, and visualization, to analyze the logs and identify any security or operational issues. + - Establish appropriate log monitoring and alerting mechanisms to proactively identify and respond to potential security incidents or operational anomalies. + +## Expected Result + +CloudWatch Logs is enabled for all MemoryDB clusters with appropriate log groups and retention periods configured. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to enable CloudWatch Logs for each MemoryDB cluster and configure appropriate log retention and monitoring. + +## Default Value + +Audit logging is not enabled by default for Amazon MemoryDB for Redis. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | X | X | X | +| v7 | 6.2 Activate audit logging | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.5/SKILL.md new file mode 100644 index 0000000000..85e987d38f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.5/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-aws-database-6.5 +description: "Ensure Security Configurations are Reviewed Regularly" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, memorydb, redis, security-review, iam, configuration] +cis_id: "6.5" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: + [cis-aws-database-6.1, cis-aws-database-6.2, cis-aws-database-6.3, cis-aws-database-6.4, cis-aws-database-6.6] +prerequisites: [] +severity_boost: {} +--- + +# 6.5 Ensure Security Configurations are Reviewed Regularly (Manual) + +## Description + +This helps by removing or updating any IAM roles, security networks, encryption settings, audit logging, and authentication. By updating or removing a few things from these lists it helps tighten security and ensures that the users do not have excessive permissions. + +## Rationale + +Regular review of security configurations ensures that the MemoryDB cluster maintains a strong security posture and adapts to changing requirements. + +## Impact + +By regularly checking these settings in the database the user is preventing the database from a cyber threat. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon MemoryDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/memorydb/. + +3. Select the Cluster + - Choose the Amazon MemoryDB cluster for which you want to update and review the security configuration. + - Click on the cluster name to access its details page. + +4. Review IAM Roles and Permissions + - In the cluster details page, navigate to the `Security` or `Access Control` section. + - Review the IAM roles and permissions associated with the cluster. + - Ensure that the IAM roles have appropriate permissions and follow the principle of least privilege. + - Review the IAM policies and make any necessary updates to align with your security requirements. + +5. Review Network Security + - In the cluster details page, navigate to the `Security` or `Network & Security` section. + - Review the Virtual Private Cloud (VPC), subnets, security groups, and network ACLs associated with the cluster. + - Ensure that the VPC and subnet configurations align with your security requirements. + - Review the security group rules and network ACL rules to ensure they restrict access to necessary ports, IP ranges, and protocols. + - Make any necessary updates to tighten the network security settings. + +6. Review Encryption Settings + - In the cluster details page, navigate to the `Security` or `Encryption` section. + - Review the encryption settings for the cluster. + - Ensure that encryption at rest and in transit are enabled and the appropriate encryption options are chosen. + - Review any customer-managed keys used for encryption and verify their configurations. + +7. Review Authentication and Access Control + - In the cluster details page, navigate to the `Security` or `Access Control` section. + - Review the authentication options and access control policies in place for the cluster. + - Ensure that the authentication mechanisms and access control policies align with your security requirements. + - Make any necessary updates to adapt to changing access requirements or security policies. + +8. Review Audit Logging + - In the cluster details page, navigate to the `Monitoring` or `Logging` section. + - Review the logging configuration for the cluster. + - Ensure that the logs are captured and stored as expected. + - Please review the log retention settings and verify that they comply with your retention policies. + +9. Regularly Monitor Security Bulletins + - Stay updated with AWS security bulletins, advisories, and best practices. + - Monitor AWS security announcements and subscribe to relevant security notifications. + - Regularly review and apply security patches, updates, and recommended configuration changes for Amazon MemoryDB. + +## Expected Result + +All security configurations (IAM, network, encryption, authentication, logging) are reviewed and aligned with organizational security requirements. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to review and update all security configurations for each MemoryDB cluster on a regular schedule. + +## Default Value + +There is no automatic security review mechanism. Organizations must establish their own review cadence. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5 Account Management | | | | +| v7 | 5 Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.6/SKILL.md new file mode 100644 index 0000000000..bd62a86049 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.6/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-database-6.6 +description: "Ensure Monitoring and Alerting is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, memorydb, redis, monitoring, cloudwatch, alerting, eventbridge] +cis_id: "6.6" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-6.4, cis-aws-database-6.5] +prerequisites: [] +severity_boost: {} +--- + +# 6.6 Ensure Monitoring and Alerting is Enabled (Manual) + +## Description + +Implementing monitoring and alerting on Amazon MemoryDB allows you to proactively detect and respond to any performance issues, security events, or operational anomalies. + +## Rationale + +This helps in ensuring that everything in the system is secure and if there is an unusual activity that takes place it addresses the issues quickly and efficiently. + +## Impact + +Enabling monitoring and alerting has a positive impact in the business operations when the issue is identified and addressed accordingly. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon MemoryDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/memorydb/. + +3. Select the Cluster + - Choose the Amazon MemoryDB cluster for which you want to implement monitoring and alerting. Click on the cluster name to access its details page. + +4. Enable Amazon CloudWatch + - In the cluster details page, navigate to the `Monitoring` or `CloudWatch` section. + - Click on `Enable` to enable CloudWatch monitoring for the cluster. + - Select the appropriate CloudWatch metric categories to monitor, such as CPU utilization, memory utilization, network traffic, and storage capacity. + - Configure the desired granularity and period for metric collection. + - Click `Enable` or `Save` to enable CloudWatch monitoring for the cluster. + +5. Set Up CloudWatch Alarms + - In the CloudWatch console, navigate to `Alarms` in the left-side menu. + - Click on `Create Alarm` to set up a new alarm. + - Select the CloudWatch metric related to the aspect you want to monitor, such as CPU utilization or memory utilization. + - Configure the alarm threshold based on your desired criteria, such as setting CPU utilization above a certain percentage. + - Define the actions to be taken when the alarm is triggered. + - Click `Create Alarm` to create the CloudWatch alarm. + +6. Configure Amazon EventBridge Rules (Optional) + - In the Amazon EventBridge console, navigate to `Rules` in the left-side menu. + - Click on `Create rule` to set up a new rule. + - Define the event pattern or source that should trigger the rule, such as specific MemoryDB events or errors. + - Configure the target actions, such as sending notifications, executing AWS Lambda functions, or invoking AWS Step Functions. + - Click `Create` to create the EventBridge rule. + +7. Configure Auto Scaling (Optional) + - In the MemoryDB cluster details page, navigate to the `Auto Scaling` section. + - Configure auto-scaling settings based on your workload and performance requirements. + - Define the scaling policies, such as increasing or decreasing the number of replica nodes based on CPU utilization or other metrics. + - Set the desired minimum and maximum number of replica nodes for the cluster. + - Click `Save` or `Apply Changes` to apply the auto-scaling configuration. + +8. Regularly Review and Adjust Monitoring and Alarms + - Periodically review the CloudWatch metrics and alarms to ensure they align with your monitoring needs and performance expectations. + - Adjust the thresholds and actions based on changing workload patterns or performance requirements. + - Stay informed about new CloudWatch features and best practices to optimize your monitoring setup. + +## Expected Result + +CloudWatch monitoring is enabled with appropriate metrics, alarms are configured for critical thresholds, and alerting mechanisms are in place for all MemoryDB clusters. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to enable CloudWatch monitoring, create alarms, and configure EventBridge rules for each MemoryDB cluster. + +## Default Value + +Amazon MemoryDB publishes metrics to CloudWatch automatically. CloudWatch alarms and EventBridge rules must be configured manually. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | X | X | X | +| v7 | 6.2 Activate audit logging | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.7/SKILL.md new file mode 100644 index 0000000000..2494c3fe95 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-6.7/SKILL.md @@ -0,0 +1,82 @@ +--- +name: cis-aws-database-6.7 +description: "Ensure MemoryDB has automatic backups enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, memorydb, redis, backup, snapshot, disaster-recovery] +cis_id: "6.7" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-6.5] +prerequisites: [] +severity_boost: {} +--- + +# 6.7 Ensure MemoryDB has automatic backups enabled (Manual) + +## Description + +Ensure that Amazon MemoryDB clusters that store critical or stateful data have automatic backups enabled with a non-zero retention period. This setting configures MemoryDB to take snapshots of database and retain them for a defined number of days, allowing restoration of data in case of corruption, accidental deletion, or infrastructure failure. + +## Rationale + +Automatic backups provide a simple and reliable way to recover MemoryDB data without relying solely on application-level safeguards. In the event of node failure, misconfiguration, or data corruption, a recent backup snapshot can be used to create a new database, significantly reducing recovery time and impact on dependent applications. + +## Impact + +Enabling automatic backups for MemoryDB ensures that cluster data is regularly captured in snapshots, keeping it protected and readily recoverable in case of accidental deletion, corruption, or node failure. As a result, organizations can quickly recreate clusters from recent backups and restore access to the data, minimizing downtime and business impact from unexpected data loss events. + +## Audit Procedure + +### Using AWS CLI + +List snapshot settings for all MemoryDB clusters: + +```bash +aws memorydb describe-clusters \ + --query "Clusters[*].{Name:Name,SnapshotRetentionLimit:SnapshotRetentionLimit}" +``` + +- SnapshotRetentionLimit > 0 => automatic snapshots enabled. +- SnapshotRetentionLimit = 0 or missing/null => automatic snapshots disabled. + +## Expected Result + +All MemoryDB clusters should have `SnapshotRetentionLimit` greater than 0, indicating automatic backups are enabled. + +## Remediation + +### Using AWS CLI + +Enable automatic snapshots on a specific cluster: + +```bash +aws memorydb update-cluster \ + --cluster-name \ + --snapshot-retention-limit 7 \ + --snapshot-window "03:00-04:00" +``` + +- `--snapshot-retention-limit 7` configures a 7-day retention; use a value aligned with your policy (for example 7, 14, or 30 days). +- `--snapshot-window "03:00-04:00"` (optional) sets the daily snapshot window in UTC. Choose an off-peak period to minimize performance impact. +- MemoryDB applies these changes immediately for the cluster configuration. + +## Default Value + +Amazon MemoryDB for Redis has automatic backups enabled by default with a retention period of 1 day. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------- | ---- | ---- | ---- | +| v8 | 11 Data Recovery | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.1/SKILL.md new file mode 100644 index 0000000000..6e0f30469f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.1/SKILL.md @@ -0,0 +1,102 @@ +--- +name: cis-aws-database-7.1 +description: "Ensure Network Architecture Planning" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, network, vpc, architecture] +cis_id: "7.1" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.2, cis-aws-database-7.5] +prerequisites: [] +severity_boost: {} +--- + +# 7.1 Ensure Network Architecture Planning (Manual) + +## Description + +Plan the network architecture to isolate your DocumentDB instances within a secure Virtual Private Cloud (VPC). Configure appropriate security groups and network access control lists (ACLs) to control inbound and outbound traffic to your DocumentDB instances. + +## Rationale + +Depending on how the network is established between devices, which then helps secure data when transferring it from one server to another. + +## Impact + +The way the users design their network sets the performance for the system and how it would interact with servers. + +## Audit Procedure + +### Using AWS Console + +1. Understand Amazon VPC Basics + - Familiarize yourself with Amazon Virtual Private Cloud (VPC) and its concepts. + - Learn about VPC components, including subnets, route tables, and security groups. + +2. Determine VPC Requirements for DocumentDB + - Identify the specific networking requirements for your Amazon DocumentDB deployment. + - Consider factors such as network availability, fault tolerance, and security requirements. + +3. Create a New VPC or Use an Existing VPC + - Decide whether to create a new VPC dedicated to Amazon DocumentDB or use an existing VPC. + - If creating a new VPC, follow the steps to create a VPC in the AWS Management Console. + +4. Configure Subnets + - Determine the number and size of subnets needed for your DocumentDB deployment. + - Create the required subnets within your VPC, ensuring proper availability zone distribution. + +5. Set Up Routing + - Configure the route tables associated with your subnets. + - Ensure that the route tables have the necessary routes for proper network connectivity. + +6. Configure Security Groups + - Create or configure security groups to control inbound and outbound traffic to your DocumentDB instances. + - Define the necessary inbound rules to allow access from authorized sources. + +7. Plan Connectivity Options + - Decide how your DocumentDB instances will connect to your VPC and other resources. + - Determine if you need to set up VPC peering, VPN connections, or AWS Direct Connect for connectivity. + +8. Consider High Availability and Fault Tolerance + - Evaluate your requirements for high availability and fault tolerance. + - Design your network architecture to ensure that DocumentDB instances are deployed across multiple availability zones for resilience. + +9. Implement Network Access Control + - Consider using network access control lists (ACLs) to provide an additional layer of security. + - Configure the ACLs to allow only necessary traffic and block unauthorized access. + +10. Test and Validate the Network Architecture + - Ensure that your network architecture is correctly configured and meets your requirements. + - Test connectivity and verify that DocumentDB instances can be accessed securely. + +## Expected Result + +DocumentDB instances are deployed within a properly planned VPC with appropriate subnets, security groups, route tables, and network ACLs configured. + +## Remediation + +### Using AWS Console + +To establish connection, the users would need to factor in their virtual private cloud (VPC), create subnet, configure routing, and implement ACLs. + +## Default Value + +Amazon DocumentDB requires deployment within a VPC. No default network architecture planning is provided. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | X | X | +| v7 | 11.7 Manage Network Infrastructure Through a Dedicated Network | | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.10/SKILL.md new file mode 100644 index 0000000000..e6e7c7feac --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.10/SKILL.md @@ -0,0 +1,82 @@ +--- +name: cis-aws-database-7.10 +description: "Ensure to Configure Backup Window" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, backup, backup-window, restore] +cis_id: "7.10" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.9, cis-aws-database-7.11] +prerequisites: [] +severity_boost: {} +--- + +# 7.10 Ensure to Configure Backup Window (Manual) + +## Description + +Configure backup windows for Amazon DocumentDB clusters to ensure regular backups are performed during appropriate time periods, and validate backup and restore procedures. + +## Rationale + +Properly configured backup windows ensure that backups are taken during off-peak hours to minimize performance impact, and regular testing of restore procedures validates data recoverability. + +## Impact + +Properly configured backup windows minimize the impact on production workloads while ensuring data protection. + +## Audit Procedure + +### Using AWS Console + +1. Perform Manual Backups (Optional) + - If desired, you can also create manual backups of your DocumentDB cluster. + - In the cluster details page, navigate to the `Backup` section. + - Click on the `Create backup` button. + - Provide a name for the backup and confirm the action. + +2. Restore from Backups (Optional) + - If a disaster occurs or you need to restore your DocumentDB cluster to a previous state, you can restore it from the available backups. + - In the cluster details page, navigate to the `Backup` section. + - Choose the backup from which you want to restore. + - Follow the prompts and provide the necessary information to initiate the restore process. + +3. Test Backup and Restore Procedures + - Periodically test the backup and restore procedures to ensure they work as expected. + - Perform test restores on non-production environments to validate the integrity and completeness of the backup data. + +4. Regularly Monitor and Validate Backups + - Regularly monitor the backup status and validate that the backups are completed successfully. + - Monitor backup storage usage to ensure it is within the desired limits and plan for additional storage as needed. + +## Expected Result + +Backup windows are configured during off-peak hours, manual backups can be created on demand, and restore procedures have been tested and validated. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to configure backup windows, perform manual backups, and test restore procedures for each DocumentDB cluster. + +## Default Value + +Amazon DocumentDB configures an automatic backup window when the cluster is created. The default backup retention period is 1 day. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 11.1 Establish and Maintain a Data Recovery Process | X | X | X | +| v7 | 10.2 Perform Complete System Backups | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.11/SKILL.md new file mode 100644 index 0000000000..0d043988c8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.11/SKILL.md @@ -0,0 +1,119 @@ +--- +name: cis-aws-database-7.11 +description: "Ensure to Conduct Security Assessments" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, security-assessment, penetration-testing, vulnerability] +cis_id: "7.11" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: + [ + cis-aws-database-7.1, + cis-aws-database-7.2, + cis-aws-database-7.3, + cis-aws-database-7.4, + cis-aws-database-7.5, + cis-aws-database-7.6, + ] +prerequisites: [] +severity_boost: {} +--- + +# 7.11 Ensure to Conduct Security Assessments (Manual) + +## Description + +Periodically perform security assessments, including vulnerability assessments and penetration testing, to identify and address any security weaknesses. Review your security configuration against best practices and industry standards. + +## Rationale + +This helps ensure that any vulnerabilities that might lie dormant be addressed promptly, which would reduce the risk of a malicious attack. Reviewing and making sure the security policies are authentic ensures the safety of the organization data. + +## Impact + +Regular security assessments help identify and remediate security weaknesses before they can be exploited by attackers. + +## Audit Procedure + +### Using AWS Console + +1. Define the Scope of the Security Assessment + - Clearly define the scope of the security assessment for your Amazon DocumentDB cluster. + - Determine the objectives, areas of focus, and any specific compliance or security standards you must adhere to. + +2. Review Security Documentation + - Familiarize yourself with the AWS security best practices and documentation related to Amazon DocumentDB. + - Review the AWS Shared Responsibility Model and understand the security controls provided by AWS. + +3. Assess Network Security + - Review the network security configuration of your Amazon DocumentDB cluster. + - Ensure it is deployed within a secure Virtual Private Cloud (VPC) with appropriate security groups and network access control lists (ACLs). + - Validate that the network traffic to and from the cluster is appropriately restricted based on your security requirements. + +4. Evaluate Encryption Configuration + - Assess the encryption settings for your Amazon DocumentDB cluster. + - Verify that encryption at rest is enabled and that the data stored in the cluster is encrypted. + - Validate that encryption in transit is enforced, ensuring that all client connections to the cluster are encrypted using SSL/TLS. + +5. Review Access Control Mechanisms + - Evaluate the access control mechanisms implemented for your Amazon DocumentDB cluster. + - Ensure that appropriate Identity and Access Management (IAM) policies and roles are in place to control access to the cluster. + - Review user accounts and their privileges, and validate that multi-factor authentication (MFA) is enforced for administrative access. + +6. Examine Audit Logging and Monitoring + - Review the audit logging and monitoring configuration for your Amazon DocumentDB cluster. + - Verify that audit logging is enabled, capturing relevant database activities and events. + - Evaluate the monitoring setup using Amazon CloudWatch or other tools to detect unusual or suspicious activities. + +7. Assess Backup and Disaster Recovery + - Evaluate the backup and disaster recovery mechanisms in place for your Amazon DocumentDB cluster. + - Verify that automated backups are enabled and configured with an appropriate retention period. + - Validate that manual backups can be performed and restored successfully. + +8. Perform Vulnerability Scanning and Penetration Testing (If Applicable) + - If allowed and within the terms of service, perform vulnerability scanning and penetration testing on your Amazon DocumentDB cluster. + - Conduct security assessments to identify any vulnerabilities or weaknesses that could be exploited. + +9. Document Findings and Remediation Plan + - Document the findings of your security assessment, including any identified vulnerabilities or areas of improvement. + - Develop a remediation plan that addresses the identified issues and outlines the necessary actions to enhance the security posture of your DocumentDB cluster. + +10. Implement Remediation Measures + - Implement the necessary remediation measures based on your remediation plan. + - Apply security patches, adjust configuration settings, and strengthen access controls as required. + +11. Regularly Repeat the Security Assessment + - Conduct regular security assessments on your Amazon DocumentDB cluster to ensure ongoing compliance and identify new risks or vulnerabilities. + - Stay updated with security best practices and apply any relevant updates or patches to your cluster. + +## Expected Result + +Regular security assessments are conducted covering network security, encryption, access control, audit logging, and backup/disaster recovery configurations. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to conduct comprehensive security assessments. Implement remediation measures for any identified vulnerabilities and establish a schedule for regular assessments. + +## Default Value + +No automatic security assessment mechanism is provided. Organizations must establish their own assessment processes and schedules. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 18.1 Establish and Maintain a Penetration Testing Program | | X | X | +| v7 | 20.1 Establish a Penetration Testing Program | | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.12/SKILL.md new file mode 100644 index 0000000000..160e220cc9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.12/SKILL.md @@ -0,0 +1,82 @@ +--- +name: cis-aws-database-7.12 +description: "Ensure DocumentDB has delete protection enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, delete-protection, data-protection] +cis_id: "7.12" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.9, cis-aws-database-7.10] +prerequisites: [] +severity_boost: {} +--- + +# 7.12 Ensure DocumentDB has delete protection enabled (Manual) + +## Description + +Ensure that delete protection is enabled on database instances to prevent accidental or unauthorized deletion. This setting safeguards critical databases by requiring explicit disabling of delete protection before deletion, reducing the risk of data loss through human error or malicious activity. + +## Rationale + +Delete protection provides a safeguard against inadvertent or malicious deletion of critical databases. By requiring deliberate action to disable deletion protection, organizations mitigate risks associated with accidental data deletion and enhance the overall resilience of their data storage platform. + +## Impact + +Failure to enable delete protection increases the risk of irreversible data loss, potential service disruption, and operational downtime. + +## Audit Procedure + +### Using AWS CLI + +List deletion protection status for all DocumentDB clusters: + +```bash +aws docdb describe-db-clusters \ + --query "DBClusters[*].{DBClusterIdentifier:DBClusterIdentifier,DeletionProtection:DeletionProtection}" +``` + +- DeletionProtection: true => Deletion protection is enabled. +- DeletionProtection: false => Deletion protection is not enabled (non-compliant). + +## Expected Result + +All DocumentDB clusters should have `DeletionProtection` set to `true`. + +## Remediation + +### Using AWS CLI + +Enable deletion protection on a specific cluster: + +```bash +aws docdb modify-db-cluster \ + --db-cluster-identifier \ + --deletion-protection \ + --apply-immediately +``` + +- Replace with your DocDB cluster ID. +- This change is applied immediately without downtime. +- Once enabled, the cluster cannot be deleted without first disabling deletion protection. + +## Default Value + +Deletion protection is disabled by default when creating a new Amazon DocumentDB cluster. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------- | ---- | ---- | ---- | +| v8 | 11 Data Recovery | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.2/SKILL.md new file mode 100644 index 0000000000..d2b553ce09 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.2/SKILL.md @@ -0,0 +1,102 @@ +--- +name: cis-aws-database-7.2 +description: "Ensure VPC Security is Configured" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, vpc, security-groups, subnets] +cis_id: "7.2" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.1, cis-aws-database-7.3, cis-aws-database-7.5] +prerequisites: [] +severity_boost: {} +--- + +# 7.2 Ensure VPC Security is Configured (Manual) + +## Description + +Creating a VPC, configuring subnets, and creating security groups help isolate your DocumentDB instances within your virtual network and control inbound and outbound traffic. + +## Rationale + +Setting up a Virtual Private Cloud (VPC) protects the private network that has been established from any external networks from interfering. It allows internal networks to communicate with one another with the network that has been established. + +## Impact + +Builds a strong connection between internal networks, has a strong connection with the internet, and it secures your data from getting into the hands of an unauthorized party. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon VPC Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/vpc/. + +3. Create a VPC (Virtual Private Cloud) + - Click on the `Create VPC` button to create a new VPC. + - Provide the necessary details, such as VPC name, CIDR block, and additional configuration options. + - Click on `Create` to create the VPC. + +4. Configure VPC Subnets + - Once the VPC is created, navigate to the `Subnets` section in the VPC console. + - Click on the `Create subnet` button to create a new subnet. + - Provide the necessary details, such as subnet name, VPC selection, and subnet CIDR block. + - Repeat this step to create multiple subnets within your VPC, if required. + +5. Create Security Groups + - Navigate to the `Security Groups` section in the VPC console. + - Click the `Create security group` button to create a new security group. + - Provide a name and description for the security group. + - Configure inbound and outbound rules to allow the necessary traffic to and from the DocumentDB instances. + - Repeat this step to create additional security groups if needed. + +6. Launch Amazon DocumentDB Cluster in VPC + - Navigate to the service using the "Find Services" search bar or by directly accessing the console at https://console.aws.amazon.com/docdb/. + - Click on `Create database` to create a new DocumentDB cluster. + - Configure the necessary parameters, such as cluster name, instance specifications, and storage options. + - In the `Network & Security` section, select the VPC and subnets you created earlier. + - Choose the appropriate security group(s) to apply to the DocumentDB cluster. + - Click `Create` to launch the DocumentDB cluster in the configured VPC. + +7. Test Connectivity + - Once the DocumentDB cluster is launched, validate that you can connect to it from authorized sources. + - Use the appropriate database client or tools to establish a connection and verify connectivity. + +8. Monitor and Update Security Groups + - Regularly monitor and update the security groups associated with the DocumentDB cluster. + - Modify the inbound and outbound rules to ensure appropriate access control and security. + +## Expected Result + +DocumentDB clusters are deployed within a VPC with properly configured subnets and security groups that restrict access to authorized sources only. + +## Remediation + +### Using AWS Console + +The individual is required to create a subnet and configure their inbound and outbound access. Individuals are supposed to configure and route, ensuring the traffic is flowing smoothly without any interference. This control is important because it only allows authorized users to access their resources as they prefer. + +## Default Value + +Amazon DocumentDB must be deployed within a VPC. Default security groups may allow broader access than necessary. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | X | X | +| v7 | 11.7 Manage Network Infrastructure Through a Dedicated Network | | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.3/SKILL.md new file mode 100644 index 0000000000..a108b4b510 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.3/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-aws-database-7.3 +description: "Ensure Encryption at Rest is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, encryption, kms, at-rest] +cis_id: "7.3" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.4, cis-aws-database-7.11] +prerequisites: [] +severity_boost: {} +--- + +# 7.3 Ensure Encryption at Rest is Enabled (Manual) + +## Description + +Ensure that encryption at rest is enabled for Amazon DocumentDB clusters to protect stored data from unauthorized access. + +## Rationale + +This helps ensure that the data is kept secure and protected when at rest. The user must choose from two key options which then determine when the data is encrypted at rest. + +## Impact + +If an unauthorized user steals the data, it would be unreadable for them because a key would be required to decrypt the message into plaintext. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon DocumentDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/docdb/. + +3. Select the DocumentDB Cluster + - Choose the Amazon DocumentDB cluster for which you want to enable encryption at rest. + - Click on the cluster name to access its details page. + - In the cluster details page, navigate to the "Configuration" section. + +4. Enable Encryption at Rest + - Under the `Storage` section. + - Click on the "Edit" button or "Modify" option to configure the encryption settings. + - Choose the option to enable encryption at rest for the cluster. + +5. Choose the Encryption Key + - Select the AWS Key Management Service (KMS) key that you want to use for encrypting your DocumentDB data. + - You can choose an existing KMS key or create a new one. + - Ensure that the KMS key you select has appropriate permissions for DocumentDB to use it. + +6. Save the Configuration + - Click the `Save` button to apply the encryption at rest configuration. + - DocumentDB will start the process of encrypting the existing data and all new data written to the cluster. + +7. Verify Encryption Status + - Monitor the cluster status to ensure that the encryption process is completed successfully. + - Once the encryption is enabled, the cluster status will reflect the updated encryption status. + +8. Test Connectivity + - Validate that you can still connect to the DocumentDB cluster after enabling encryption at rest. + - Ensure that your applications and authorized users can access the encrypted data. + +9. Monitor and Manage Encryption + - Regularly monitor the encryption status of your DocumentDB cluster. + - Ensure that the encryption remains enabled and that no unauthorized modifications are made. + +## Expected Result + +Encryption at rest is enabled for all DocumentDB clusters using either AWS managed keys or customer-managed KMS keys. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to enable encryption at rest for each DocumentDB cluster. Note that encryption at rest can only be enabled when creating a new cluster. Existing unencrypted clusters must be migrated to new encrypted clusters. + +## Default Value + +Amazon DocumentDB encrypts data at rest by default using AWS managed keys. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.4/SKILL.md new file mode 100644 index 0000000000..289a19ffa5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.4/SKILL.md @@ -0,0 +1,92 @@ +--- +name: cis-aws-database-7.4 +description: "Ensure Encryption in Transit is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, encryption, tls, ssl, in-transit] +cis_id: "7.4" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.3, cis-aws-database-7.11] +prerequisites: [] +severity_boost: {} +--- + +# 7.4 Ensure Encryption in Transit is Enabled (Manual) + +## Description + +Ensure that encryption in transit is enabled for Amazon DocumentDB clusters to protect data as it moves between clients and the database. + +## Rationale + +Amazon Database DB uses SSL/TLS to encrypt data during transit. To secure your data in transit the individual should identify their client application and what is supported by TLS to configure it correctly. + +## Impact + +Enabling encryption in transit ensures that all communications between client applications and the DocumentDB cluster are secured using SSL/TLS, preventing data interception. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon DocumentDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/docdb/. + +3. Select the DocumentDB Cluster + - Choose the Amazon DocumentDB cluster for which you want to enable encryption in transit. + - Click on the cluster name to access its details page. + - In the cluster details page, navigate to the "Configuration" section. + +4. Enable Encryption in Transit + - Under the `Network & Security` section. + - Click on the `Edit` button or `Modify` option to configure the encryption settings. + - Enable the option for encryption in transit by choosing the appropriate setting. + - Note that encryption in transit uses SSL/TLS to secure communications between your applications and the DocumentDB cluster. + +5. Save the Configuration + - Click on the "Save" button to apply the encryption in transit configuration. + - DocumentDB will automatically handle the SSL/TLS encryption for network traffic between clients and the cluster. + +6. Validate Encryption in Transit + - Test the connectivity to your DocumentDB cluster from your applications or clients. + - Ensure that the communication is established securely using SSL/TLS encryption. + +7. Monitor and Maintain Encryption in Transit + - Regularly monitor the encryption in transit configuration for your DocumentDB cluster. + - Stay informed about updates or changes in SSL/TLS protocols and encryption standards. + - Keep your client applications current to ensure they support the latest encryption protocols. + +## Expected Result + +Encryption in transit (TLS) is enabled for all DocumentDB clusters, and all client connections use SSL/TLS. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to enable encryption in transit for each DocumentDB cluster. Configure the cluster parameter group to set `tls` to `enabled`. + +## Default Value + +Amazon DocumentDB enables encryption in transit (TLS) by default. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.5/SKILL.md new file mode 100644 index 0000000000..ff0f160716 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.5/SKILL.md @@ -0,0 +1,102 @@ +--- +name: cis-aws-database-7.5 +description: "Ensure to Implement Access Control and Authentication" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, authentication, iam, access-control, users] +cis_id: "7.5" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.1, cis-aws-database-7.2, cis-aws-database-7.11] +prerequisites: [] +severity_boost: {} +--- + +# 7.5 Ensure to Implement Access Control and Authentication (Manual) + +## Description + +Configure authentication mechanisms for your DocumentDB instances, such as using AWS Identity and Access Management (IAM) users or database users. Define appropriate user roles and permissions to control access to the DocumentDB instances and databases. + +## Rationale + +Proper authentication and access control mechanisms are essential to ensure that only authorized users and applications can access the DocumentDB cluster and its data. + +## Impact + +Implementing access control ensures that the principle of least privilege is followed, reducing the risk of unauthorized data access or modifications. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon DocumentDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/docdb/. + +3. Select the DocumentDB Cluster + - Choose the Amazon DocumentDB cluster for which you want to implement access control and authentication. + - Click on the cluster name to access its details page. + - In the cluster details page, navigate to the "Configuration" section. + +4. Enable Authentication + - Under the `Network & Security` section. + - Click on the `Edit` button or `Modify` option to configure the authentication settings. + - Enable the option for authentication by choosing the appropriate setting. + - DocumentDB supports authentication through username and password or through AWS Identity and Access Management (IAM) roles. + +5. Configure Database Users + - In the cluster details page, navigate to the `Users` or `Database users` section. + - Click the `Add user` button to create a new database user. + - Enter the username and password for the database user. + - Assign appropriate permissions to the user, such as read-only or read-write access to specific databases or collections. + +6. Save the Configuration + - Click on `Save` button to apply the authentication and access control configuration. + - DocumentDB will enforce authentication for connections to the cluster. + +7. Test Authentication + - Validate that your client applications or tools can connect to the DocumentDB cluster using the configured authentication credentials. + - Ensure that the authentication process is successfully completed. + +8. Monitor and Manage Access Control + - Regularly monitor and manage the access control configuration for your DocumentDB cluster. + - Review and update the permissions assigned to database users as needed. + - Remove any unnecessary or unused database users to minimize security risks. + +9. Consider IAM Authentication (Optional) + - If desired, you can also configure IAM authentication for your DocumentDB cluster. + - Follow the AWS documentation to set up IAM authentication for DocumentDB, if applicable. + +## Expected Result + +Authentication is enforced for all DocumentDB clusters with properly configured database users and appropriate role-based permissions. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to enable authentication, create database users with appropriate permissions, and optionally configure IAM authentication for each DocumentDB cluster. + +## Default Value + +Amazon DocumentDB requires authentication by default. A master username and password are required when creating a cluster. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | X | X | X | +| v7 | 14.6 Protect Information through Access Control Lists | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.6/SKILL.md new file mode 100644 index 0000000000..13e738c7d2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.6/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-aws-database-7.6 +description: "Ensure Audit Logging is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, logging, audit, cloudwatch] +cis_id: "7.6" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.8, cis-aws-database-7.11] +prerequisites: [] +severity_boost: {} +--- + +# 7.6 Ensure Audit Logging is Enabled (Manual) + +## Description + +Enable audit logging to capture database activities, including login attempts, queries, and modifications. Send the logs to Amazon CloudWatch or a centralized log management system for analysis and monitoring. + +## Rationale + +It captures and saves logs of activities that took place in the cluster, by recording login attempts, queries, and any changes within the database. + +## Impact + +Enabling audit logging provides visibility into database activities, helping detect unauthorized access attempts, compliance violations, and security incidents. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon DocumentDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/docdb/. + +3. Select the DocumentDB Cluster + - Choose the Amazon DocumentDB cluster for which you want to enable audit logging. + - Click on the cluster name to access its details page. + - In the cluster details page, navigate to the "Configuration" section. + +4. Enable Audit Logging + - Under the `Database options` or `Database features` section. + - Click on the `Edit` button or `Modify` option to configure the audit logging settings. + - Enable the option for audit logging by choosing the appropriate setting. + - Specify the destination for the audit logs, which can be an Amazon CloudWatch Logs group or an Amazon S3 bucket. + +5. Configure Audit Log Destination + - If you choose to send audit logs to an Amazon CloudWatch Logs group, select the existing group or create a new one. + - If you choose to send audit logs to an Amazon S3 bucket, select the existing bucket or create a new one. Provide the necessary permissions for DocumentDB to write logs to the bucket. + +6. Set Audit Log Retention Period + - Specify the retention period for the audit logs, indicating how long the logs should be retained in the selected destination. + - Consider your compliance and regulatory requirements when determining the retention period. + +7. Save the Configuration + - Click on the `Save` button to apply the audit logging configuration. DocumentDB will start recording audit logs according to the configured settings. + +8. Validate Audit Logging + - Perform operations on your DocumentDB cluster to generate audit log events. + - Verify that the audit logs are recorded and sent to the specified destination. + - Review the logs to ensure they contain the expected information and events. + +9. Monitor and Analyze Audit Logs + - Use Amazon CloudWatch Logs or other log analysis tools to monitor and analyze the audit logs generated by DocumentDB. + - Set up log metrics, alarms, and notifications to detect unusual activities or security incidents. + - Review audit logs regularly to identify potential security threats, compliance violations, or unauthorized access attempts. + +## Expected Result + +Audit logging is enabled for all DocumentDB clusters with logs being sent to CloudWatch Logs or S3, with appropriate retention periods configured. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to enable audit logging for each DocumentDB cluster. Configure the cluster parameter group to enable audit logging by setting `audit_logs` to `enabled`. + +## Default Value + +Audit logging is not enabled by default for Amazon DocumentDB. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | X | X | X | +| v7 | 6.2 Activate audit logging | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.7/SKILL.md new file mode 100644 index 0000000000..424c2984ab --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.7/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-aws-database-7.7 +description: "Ensure Regular Updates and Patches" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, patching, updates, maintenance] +cis_id: "7.7" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.11] +prerequisites: [] +severity_boost: {} +--- + +# 7.7 Ensure Regular Updates and Patches (Manual) + +## Description + +Stay informed about the latest security updates and patches released by Amazon for DocumentDB. Regularly apply updates and patches to your DocumentDB instances to protect against known vulnerabilities. + +## Rationale + +Regular patching and updates are essential to protect DocumentDB instances from known security vulnerabilities and ensure the database engine is running with the latest security fixes. + +## Impact + +Helps the organization reduce their security risk by regularly updating and patching their database and database engine. Regularly updating and scanning for any weaknesses in the company can bring up possible vulnerabilities that could have led to potential cyber-attack. + +## Audit Procedure + +### Using AWS Console + +1. Stay Informed + - Stay updated with Amazon DocumentDB announcements, release notes, and security bulletins. + - Subscribe to AWS newsletters, forums, and notifications to receive timely updates regarding updates and patches. + +2. Plan for Maintenance Windows + - Determine a suitable maintenance window to apply updates and patches to your DocumentDB cluster. + - Consider the impact on your applications and users when scheduling the maintenance window. + +3. Monitor the AWS Management Console + - Regularly check the AWS Management Console for notifications related to available updates and patches for your DocumentDB cluster. + - The console will provide information on new versions and available patches. + +4. Review the Release Notes and Changelog + - Before applying any updates or patches, review the release notes and changelog for the new version or patch. + - Pay attention to any compatibility or breaking changes that may require application adjustments. + +5. Create a Test Environment (Optional) + - If feasible, create a separate test environment that closely resembles your production environment. + - Deploy a copy of your DocumentDB cluster in the test environment to test the updates and patches before applying them to production. + +6. Apply Updates and Patches + - During the scheduled maintenance window, initiate the process to apply updates and patches to your DocumentDB cluster. + - Follow the recommended procedure provided by AWS, which may involve a few simple clicks in the AWS Management Console. + - Ensure that you select the appropriate version or patch to apply. + +7. Monitor the Update Process + - Monitor the progress of the update or patch application for your DocumentDB cluster. + - AWS will provide status updates during the process to keep you informed. + +8. Verify Post-Update Functionality + - After the update or patch is applied, test the functionality of your applications that rely on the DocumentDB cluster. + - Verify that your applications are working as expected and that any integration or dependencies are intact. + +9. Review and Update Documentation + - Update your documentation, including standard operating procedures (SOPs), to reflect the new version or patch applied to the DocumentDB cluster. + - Document any changes or considerations specific to the update or patch. + +10. Monitor for New Updates + - Continuously monitor for new updates and patches released by AWS for DocumentDB. + - Repeat the update process regularly to ensure your DocumentDB cluster remains up to date with the latest security enhancements and bug fixes. + +## Expected Result + +DocumentDB clusters are running the latest available engine version with all applicable security patches applied. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to identify available updates and apply them during scheduled maintenance windows. Use the AWS Management Console to modify the DocumentDB cluster and apply the latest engine version. + +## Default Value + +Amazon DocumentDB applies minor patches automatically during the configured maintenance window. Major version upgrades require manual action. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------- | ---- | ---- | ---- | +| v8 | 7 Continuous Vulnerability Management | | | | +| v7 | 3 Continuous Vulnerability Management | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.8/SKILL.md new file mode 100644 index 0000000000..5b9abba4c2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.8/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-aws-database-7.8 +description: "Ensure to Implement Monitoring and Alerting" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, monitoring, cloudwatch, alerting, metrics] +cis_id: "7.8" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.6, cis-aws-database-7.11] +prerequisites: [] +severity_boost: {} +--- + +# 7.8 Ensure to Implement Monitoring and Alerting (Manual) + +## Description + +This helps by alerting the system if any unusual event has occurred or if a particular threshold has been achieved because the user is able to set a desired interval or the cluster. This then allows system administrators to swiftly correct the situation and avoid subsequent complications if something unusual is happening. + +## Rationale + +Monitoring and alerting mechanisms are essential for detecting performance issues, security events, and operational anomalies in a timely manner. + +## Impact + +Has a positive impact in the business operations when the issue is identified and addressed accordingly. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon DocumentDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/docdb/. + +3. Select the DocumentDB Cluster + - Choose the Amazon DocumentDB cluster for which you want to implement monitoring and alerting. + - Click on the cluster name to access its details page. + - In the cluster details page, navigate to the "Monitoring" section. + +4. Enable Enhanced Monitoring + - Under the `Enhanced Monitoring` section. + - Click on the `Edit` button or `Modify` option to configure enhanced monitoring settings. + - Enable the desired metrics and set the desired monitoring interval for the cluster. + - Enhanced monitoring provides additional insights into the performance and health of your DocumentDB cluster. + +5. Set Up CloudWatch Alarms + - Scroll down to the `CloudWatch Alarms` section. + - Click on the `Create alarm` button. + - Configure the CloudWatch alarm based on the metrics you want to monitor and the thresholds you want to set. + - Specify the actions to be taken when the alarm is triggered, such as sending notifications or executing automated actions. + +6. Customize Metrics and Dashboards (Optional) + - If desired, you can customize the metrics and dashboards in Amazon CloudWatch to suit your specific monitoring requirements. + - Create custom metrics, build personalized dashboards, and set up alarms based on your application's unique needs. + +7. Test Monitoring and Alerting + - Perform operations on your DocumentDB cluster to generate metric data and trigger the configured alarms. + - Verify that CloudWatch is capturing the metrics and triggering the appropriate actions based on your alarm settings. + +8. Regularly Review and Fine-Tune + - Regularly review the monitoring metrics, CloudWatch alarms, and any event-driven actions triggered by DocumentDB events. + - Fine-tune the monitoring settings, alarms, and notifications based on the observed patterns and requirements of your application. + +## Expected Result + +Enhanced monitoring is enabled, CloudWatch alarms are configured for critical metrics (CPU, memory, connections, replication lag), and alerting mechanisms are in place for all DocumentDB clusters. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to enable enhanced monitoring, create CloudWatch alarms, and configure alerting for each DocumentDB cluster. + +## Default Value + +Amazon DocumentDB publishes basic metrics to CloudWatch automatically. Enhanced monitoring and CloudWatch alarms must be configured manually. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | X | X | X | +| v7 | 6.2 Activate audit logging | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.9/SKILL.md new file mode 100644 index 0000000000..0524867246 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-7.9/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-aws-database-7.9 +description: "Ensure to Implement Backup and Disaster Recovery" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, documentdb, backup, disaster-recovery, automated-backups] +cis_id: "7.9" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-7.10, cis-aws-database-7.11] +prerequisites: [] +severity_boost: {} +--- + +# 7.9 Ensure to Implement Backup and Disaster Recovery (Manual) + +## Description + +Set up automated backups for your DocumentDB instances to ensure data durability and recoverability. Consider implementing a disaster recovery plan that includes data replication across different availability zones or regions. + +## Rationale + +Having the data backed up ensures that all the crucial information is stored securely it defends against any human errors and system errors that resulted in data loss. An organization that has a disaster recovery plan is prepared for any disruption that would impact business operations. + +## Impact + +If a business does not have a backup and recovery plan it would have a negative impact on the business, which would result in less productivity, suffer data loss that cannot be restored, and loss of revenue. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console + - Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. + +2. Open the Amazon DocumentDB Console + - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/docdb/. + +3. Select the DocumentDB Cluster + - Choose the Amazon DocumentDB cluster for which you want to implement backup and disaster recovery. + - Click on the cluster name to access its details page. + - In the cluster details page, navigate to the "Backup" section. + +4. Enable Automated Backups + - Under the `Automated backups` section. + - Click on the `Edit` button or `Modify` option to configure automated backup settings. + - Enable automated backups by choosing the desired backup retention period. + - Specify the number of days for which automated backups should be retained. + +## Expected Result + +Automated backups are enabled for all DocumentDB clusters with an appropriate retention period configured, and a disaster recovery plan is in place. + +## Remediation + +### Using AWS Console + +Follow the audit procedure steps to enable automated backups for each DocumentDB cluster. Configure an appropriate backup retention period and consider cross-region replication for disaster recovery. + +## Default Value + +Amazon DocumentDB enables automated backups by default with a 1-day retention period. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------- | ---- | ---- | ---- | +| v8 | 11 Data Recovery | | | | +| v7 | 10 Data Recovery Capabilities | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.1/SKILL.md new file mode 100644 index 0000000000..cc461d913b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.1/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-aws-database-8.1 +description: "Ensure Keyspace Security is Configured" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, keyspaces, cassandra, security-configuration] +cis_id: "8.1" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-8.2, cis-aws-database-8.3, cis-aws-database-8.4] +prerequisites: [] +severity_boost: {} +--- + +# 8.1 Ensure Keyspace Security is Configured (Manual) + +## Description + +To access Amazon Keyspaces, the user would be required to log in with their AWS credentials. Once logged in the user can access the AWS resources and can explore the resources that Amazon Keyspaces offers. Amazon Keyspaces offers a lot of security that can mitigate a potential attack. + +## Rationale + +Ensuring keyspace security is configured helps protect Amazon Keyspaces resources by leveraging built-in security features including encryption at rest, encryption in transit, VPC support, authentication via IAM, access control via ACLs, and audit logging. + +## Impact + +Proper security configuration ensures that Amazon Keyspaces resources are protected from unauthorized access and potential attacks. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. +2. Open the Amazon Keyspaces Console - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/keyspaces/. +3. Explore Amazon Keyspaces Security Features: + - In the Amazon Keyspaces console, navigate to the `Features` or `Security` section to explore the available security features. + - Take note of the following critical security features: + - Encryption at Rest: Understand how Amazon Keyspaces provides encryption at rest for your data. It uses server-side encryption by default, ensuring that data stored in Keyspaces is encrypted. + - Encryption in Transit: Learn how to configure encryption in transit for data transmitted between your client applications and Amazon Keyspaces. Amazon Keyspaces supports Transport Layer Security (TLS) encryption to secure the communication channel. + - Virtual Private Cloud (VPC) Support: Explore the VPC support options Amazon Keyspaces provides. It allows you to deploy your Keyspaces resources within your VPC for enhanced network isolation and control. + - Authentication Options: Understand the authentication mechanisms available in Amazon Keyspaces. IAM for Cassandra allows you to use AWS Identity and Access Management (IAM) to authenticate and authorize client connections to Keyspaces. + - Access Control: Learn about access control options in Amazon Keyspaces. It supports fine-grained access control using Access Control Lists (ACLs) at the table and row level to manage access permissions for different users or roles. + - Audit Logging: Explore how to enable audit logging for Amazon Keyspaces. Amazon CloudWatch Logs can capture and store logs from your Keyspaces resources, providing visibility into activities for security and compliance purposes. +4. Documentation and Resources: + - Access the official Amazon Keyspaces documentation by navigating to the `Documentation` or `Learn` section in the Amazon Keyspaces console. + - Review the comprehensive documentation to gain in-depth knowledge about each security feature, including best practices, configuration options, and implementation details. + - Utilize other AWS resources such as whitepapers, blogs, and security-related documentation further to enhance your understanding of Amazon Keyspaces security features. + +## Expected Result + +All security features (encryption at rest, encryption in transit, VPC support, IAM authentication, ACLs, audit logging) should be properly configured for the Amazon Keyspaces environment. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to review and configure each security feature in the Amazon Keyspaces console. Ensure all security features are properly enabled and configured according to your organization's security requirements. + +## Default Value + +Amazon Keyspaces provides server-side encryption at rest by default. Other security features require manual configuration. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.2/SKILL.md new file mode 100644 index 0000000000..a09fe7d9c2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.2/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-aws-database-8.2 +description: "Ensure Network Security is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, keyspaces, cassandra, network-security, vpc] +cis_id: "8.2" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-8.1, cis-aws-database-8.3, cis-aws-database-8.4] +prerequisites: [] +severity_boost: {} +--- + +# 8.2 Ensure Network Security is Enabled (Manual) + +## Description + +In order to access Amazon Keyspaces the user is required to set specific networking parameters and security measurements without these extra steps they will not be able to access it. Users are required to create or select a virtual private cloud (VPC) and define their inbound and outbound rules accordingly. + +## Rationale + +Proper network security configuration ensures that only authorized users have access to the database, limiting the risk of attacks through network isolation and access controls. + +## Impact + +Only authorized users have access to the database which limits and controls any risk of an attack. This ensures better performance of the system to a private network and better security. + +## Audit Procedure + +### Using AWS Console + +1. Create or Select a Virtual Private Cloud (VPC): + - Sign in to the AWS Management Console and open the Amazon VPC console at https://console.aws.amazon.com/vpc/. + - Create a new VPC or select an existing VPC where you want to deploy your Amazon Keyspaces resources. +2. Configure Subnets: + - In the VPC console, navigate to `Subnets` in the left-side menu. + - Create or select the subnets within your VPC where you want to deploy your Amazon Keyspaces resources. + - Ensure you have private subnets to isolate your Keyspaces resources from the public internet. +3. Define Security Groups: + - In the VPC console, navigate to `Security Groups` in the left-side menu. + - Create a new security group or select an existing one for your Amazon Keyspaces resources. + - Configure inbound and outbound rules in the security group to control traffic access. + - Allow inbound access only from trusted sources, such as specific IP ranges or security groups, on the necessary ports used by Amazon Keyspaces. + - Define outbound rules based on your requirements, allowing outbound traffic to necessary destinations or ports. + - Associate the security group with your Amazon Keyspaces resources. +4. Configure Network Access Control Lists (ACLs): + - In the VPC console, navigate to `Network ACLs` in the left-side menu. + - Create or select the network ACLs associated with the subnets used by your Amazon Keyspaces resources. + - Configure inbound and outbound rules in the network ACLs to control traffic access. + - Define rules based on your security requirements, allowing only necessary protocols, ports, and IP ranges. + - Deny unnecessary or unwanted traffic. + - Associate the network ACLs with the subnets used by your Amazon Keyspaces resources. +5. Configure VPC Endpoints: + - In the VPC console, navigate to `Endpoints` in the left-side menu. + - Create or select the VPC endpoints required for Amazon Keyspaces. + - If you need to access Keyspaces from within your VPC, create a VPC endpoint for Amazon Keyspaces to connect your applications securely. + - If you need to access Keyspaces from another VPC or on-premises network, set up VPC peering or a transit gateway to establish a secure connection. +6. Verify Connectivity and Test: + - Launch an Amazon EC2 instance within the same VPC and subnet as your Amazon Keyspaces resources or use an existing one. + - Connect to the EC2 instance using SSH or other remote access methods. + - Test the connectivity to your Amazon Keyspaces resources by trying to connect to them using the appropriate client or utility. + - Verify that the network security settings allow the necessary traffic and deny unauthorized access. + +## Expected Result + +VPC, subnets, security groups, network ACLs, and VPC endpoints should be properly configured to isolate and protect Amazon Keyspaces resources. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to configure VPC, subnets, security groups, network ACLs, and VPC endpoints for your Amazon Keyspaces resources. + +## Default Value + +No default network security configuration is applied. Users must manually configure VPC and related network security settings. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 11.7 Manage Network Infrastructure Through a Dedicated Network | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.3/SKILL.md new file mode 100644 index 0000000000..2408c693cb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.3/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-aws-database-8.3 +description: "Ensure Data at Rest and in Transit is Encrypted" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, keyspaces, cassandra, encryption, kms, tls] +cis_id: "8.3" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-8.1, cis-aws-database-8.2, cis-aws-database-8.4] +prerequisites: [] +severity_boost: {} +--- + +# 8.3 Ensure Data at Rest and in Transit is Encrypted (Manual) + +## Description + +Once a user is logged in to their AWS account and has access to their Amazon Keyspaces they are encouraged to choose from the following two options to encrypt their data. Depending on which key they select for encryption at rest would store the data according to their preference. For encryption in transit the user is also encouraged to choose from two options depending on if the data needs to be encrypted during transit. + +## Rationale + +Encryption at rest and in transit protects data from unauthorized access whether stored or being transferred between locations. + +## Impact + +Prevents any unauthorized user from accessing the database and provides security when transferring the data from one location to another. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. +2. Open the Amazon Keyspaces Console - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/keyspaces/. +3. Select the Keyspace: + - Choose the Keyspace (database) for which you want to enable encryption at rest and in transit. + - Click on the Keyspace name to access its details page. +4. Enable Encryption at Rest: + - In the Keyspace details page, click on the `Configuration` tab. + - Under the `Encryption` section, locate the "Encryption at Rest" option. + - Click on `Edit`. + - Select the desired encryption setting: + - Default Encryption: Choose this option to use the default AWS-managed key for encryption at rest. Amazon Keyspaces automatically encrypts your data using this default key. + - Customer Managed Key (CMK): Choose this option if you want to use your own AWS Key Management Service (KMS) customer-managed key for encryption. Select the appropriate CMK from the dropdown menu. + - Click "Save" to enable encryption at rest for the Keyspace. +5. Enable Encryption in Transit: + - In the Keyspace details page, click on the `Configuration` tab. + - Under the `Encryption` section, locate the "Encryption in Transit" option. + - Click on `Edit`. + - Select the desired encryption setting: + - Encryption in Transit Enabled: Choose this option to enable encryption in transit for data transmitted between your client applications and Amazon Keyspaces. Keyspaces support Transport Layer Security (TLS) encryption for secure communication. + - Encryption in Transit Disabled: Choose this option if you do not require encryption in transit. + - Click "Save" to enable encryption in transit for the Keyspace. +6. Verify Encryption Status: + - Wait a few minutes for the changes to propagate and the encryption settings to take effect. + - Refresh the Keyspace details page to see the updated encryption status. + - Verify that encryption at rest and in transit are enabled for the Keyspace. + +## Expected Result + +Encryption at rest should be enabled (using either AWS-managed or customer-managed KMS key) and encryption in transit should be enabled with TLS. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable encryption at rest and in transit for your Amazon Keyspaces. + +## Default Value + +Amazon Keyspaces encrypts data at rest by default using AWS-managed keys. Encryption in transit via TLS is supported but requires client configuration. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.4/SKILL.md new file mode 100644 index 0000000000..e798116e29 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-8.4/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-aws-database-8.4 +description: "Ensure Amazon Keyspaces tables have Point-in-Time Recovery (PITR) enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, keyspaces, cassandra, backup, pitr, recovery] +cis_id: "8.4" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-8.1, cis-aws-database-8.2, cis-aws-database-8.3] +prerequisites: [] +severity_boost: {} +--- + +# 8.4 Ensure Amazon Keyspaces tables have Point-in-Time Recovery (PITR) enabled (Manual) + +## Description + +Ensure that Amazon Keyspaces tables have Point-in-Time Recovery (PITR) enabled. When PITR is enabled, Amazon Keyspaces automatically creates continuous backups of table data, allowing tables to be restored to any point in time within the last 35 days. This protection is applied at the table level and provides defense against accidental writes, deletions, and other data loss scenarios. + +## Rationale + +Enabling PITR on Amazon Keyspaces tables provides continuous, automatic backup protection without requiring manual snapshot management or impacting table performance or availability. In the event of accidental data corruption, malicious writes, or system failures, PITR allows rapid recovery to any second within the last 35 days, significantly reducing data loss exposure and recovery time. + +## Impact + +Enabling PITR for Amazon Keyspaces ensures that table data is continuously protected and recoverable to any point within 35 days, providing strong defense against accidental loss and corruption while maintaining full table performance and availability. + +## Audit Procedure + +### Using AWS CLI + +List PITR status for all tables in a keyspace: + +```bash +aws keyspaces get-table \ + --keyspace-name \ + --table-name +``` + +- If the value of pointInTimeRecovery = DISABLED, this means PITR is turned off + +## Expected Result + +The `pointInTimeRecovery` value should be `ENABLED` for all tables. + +## Remediation + +### Using AWS CLI + +Enable PITR on a specific table: + +```bash +aws keyspaces update-table \ + --keyspace-name \ + --table-name \ + --point-in-time-recovery status=ENABLED +``` + +- This command enables PITR on the specified table in the keyspace. +- The change takes effect immediately with no performance impact. + +## Default Value + +PITR is disabled by default on Amazon Keyspaces tables. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------- | ---- | ---- | ---- | +| v8 | 11 Data Recovery | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.1/SKILL.md new file mode 100644 index 0000000000..816ceb0e63 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.1/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-aws-database-9.1 +description: "Ensure Network Security is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, network-security, vpc] +cis_id: "9.1" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.2, cis-aws-database-9.3, cis-aws-database-9.4, cis-aws-database-9.5] +prerequisites: [] +severity_boost: {} +--- + +# 9.1 Ensure Network Security is Enabled (Manual) + +## Description + +This helps ensure that all the necessary security measurements are taken to prevent a cyber-attack. Such as utilizing VPC, creating certain inbound and outbound rules, and ACLs. + +## Rationale + +Network security is fundamental to protecting Neptune database clusters from unauthorized access and network-based attacks. + +## Impact + +Provides privacy and lets the user customize their security preferences. Prevents private network from interfering with public networks. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. +2. Open the Amazon Neptune Console - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/neptune/. +3. Select the Neptune Cluster: + - Choose the Amazon Neptune cluster for which you want to configure network security. + - Click on the cluster name to access its details page. +4. Configure Security Groups: + - In the cluster details page, navigate to the `Connectivity & Security` or `Network & Security` section. + - Under `Security Groups`, click on `Manage security groups`. + - Click on `Create new security group` or select an existing security group associated with your Neptune cluster. + - Configure inbound and outbound rules within the security group to control network traffic. + - For inbound rules, specify the allowed source IP addresses or security groups and the necessary ports for accessing the Neptune cluster. + - For outbound rules, define the allowed destination IP addresses or security groups and the required ports for outbound connections from the Neptune cluster. + - Save the security group settings. +5. Configure Network Access Control Lists (ACLs): + - In the cluster details page, navigate to the `Connectivity & Security` or `Network & Security` section. + - Under `Network Access Control Lists (ACLs)`, click on `Manage network ACLs`. + - Create a new network ACL or select an existing one associated with your Amazon Neptune cluster. + - Configure inbound and outbound rules within the network ACL to control network traffic at the subnet level. + - Define rules based on IP address ranges, protocols, and ports to allow or deny specific traffic. + - Consider security best practices and compliance requirements when configuring the network ACL rules. + - Save the network ACL settings. +6. Verify Network Security Configuration: + - Review the security group and network ACL settings to ensure they align with your security requirements. + - Confirm that the inbound and outbound rules only allow necessary traffic and deny unauthorized access. + - Verify that your Neptune cluster's security groups and network ACLs are correctly configured. +7. Test Network Connectivity: + - Launch an Amazon EC2 instance within the same VPC and subnet as your Neptune cluster, or use an existing one. + - Connect to the EC2 instance using SSH or other remote access methods. + - Test the network connectivity to your Neptune cluster by attempting to connect to it using the appropriate client or utility. + - Ensure that the network security settings allow the necessary traffic and deny unauthorized access. + +## Expected Result + +Security groups and network ACLs should be properly configured to allow only authorized traffic to and from the Neptune cluster. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to configure security groups and network ACLs for your Neptune cluster. + +## Default Value + +Neptune clusters are deployed within a VPC. Security groups and network ACLs require manual configuration. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 11.7 Manage Network Infrastructure Through a Dedicated Network | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.10/SKILL.md new file mode 100644 index 0000000000..b7ae8a7d5d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.10/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-aws-database-9.10 +description: "Ensure Database has delete protection enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, delete-protection, data-protection] +cis_id: "9.10" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.8, cis-aws-database-9.9, cis-aws-database-9.11] +prerequisites: [] +severity_boost: {} +--- + +# 9.10 Ensure Database has delete protection enabled (Manual) + +## Description + +Ensure that delete protection is enabled on database instances to prevent accidental or unauthorized deletion. This setting safeguards critical databases by requiring explicit disabling of delete protection before deletion, reducing the risk of data loss through human error or malicious activity. + +## Rationale + +Delete protection provides a safeguard against inadvertent or malicious deletion of critical databases. By requiring deliberate action to disable deletion protection, organizations mitigate risks associated with accidental data deletion and enhance the overall resilience of their data storage platform. + +## Impact + +Failure to enable delete protection increases the risk of irreversible data loss, potential service disruption, and operational downtime. + +## Audit Procedure + +### Using AWS CLI + +List deletion protection status for all Neptune DB clusters: + +```bash +aws neptune describe-db-clusters \ + --query "DBClusters[*].{DBClusterIdentifier:DBClusterIdentifier,Engine:Engine,DeletionProtection:DeletionProtection}" +``` + +- DeletionProtection: true => Deletion protection is enabled (compliant). +- DeletionProtection: false => Deletion protection is not enabled (non-compliant). + +## Expected Result + +All Neptune DB clusters should have `DeletionProtection` set to `true`. + +## Remediation + +### Using AWS CLI + +Enable deletion protection on a specific Neptune cluster: + +```bash +aws neptune modify-db-cluster \ + --db-cluster-identifier \ + --deletion-protection \ + --apply-immediately +``` + +- `--deletion-protection` enables the deletion protection feature. +- `--apply-immediately` applies the change without waiting for the next maintenance window. + +## Default Value + +Deletion protection is not enabled by default on Neptune DB clusters. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4 Secure Configuration of Enterprise Assets and Software | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.11/SKILL.md new file mode 100644 index 0000000000..39f9faac3b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.11/SKILL.md @@ -0,0 +1,87 @@ +--- +name: cis-aws-database-9.11 +description: "Ensure Neptune DB instances are deployed across multiple Availability Zones (AZs)" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, multi-az, high-availability] +cis_id: "9.11" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.8, cis-aws-database-9.9, cis-aws-database-9.10] +prerequisites: [] +severity_boost: {} +--- + +# 9.11 Ensure Neptune DB instances are deployed across multiple Availability Zones (AZs) (Manual) + +## Description + +Deploying Amazon Neptune across multiple Availability Zones means configuring the database cluster nodes (primary and replicas) to be distributed in different AZs within the same AWS region. This multi-AZ deployment improves fault tolerance and availability by mitigating risks associated with failure or degradation in a single Availability Zone. If the primary node or an AZ becomes unavailable, Neptune can automatically fail over to a replica in a different AZ, minimizing downtime and data unavailability. + +## Rationale + +Distributing Neptune DBs across multiple AZs protects the database from localized infrastructure failures, such as power outages, networking disruptions, or hardware faults in a single AZ. + +## Impact + +Enabling multi-AZ deployment for Neptune DBs enhances system availability and resiliency, significantly reducing the risk of cache service interruptions due to an AZ failure or node disruption. + +## Audit Procedure + +### Using AWS CLI + +List Multi-AZ status for all Neptune DB clusters: + +```bash +aws neptune describe-db-clusters \ + --query "DBClusters[*].{DBClusterIdentifier:DBClusterIdentifier,Engine:Engine,MultiAZ:MultiAZ}" +``` + +- MultiAZ: true => Multi-AZ is enabled (compliant). +- MultiAZ: false => Multi-AZ is not enabled (non-compliant). + +## Expected Result + +All Neptune DB clusters should have `MultiAZ` set to `true`. + +## Remediation + +### Using AWS Console + +Enable Multi-AZ on Neptune DB clusters by adding a reader replica in a different Availability Zone: + +1. Sign in to the AWS Management Console where the Aurora database cluster you are auditing resides. +2. Navigate to the Neptune Dashboard. You can find this under the Database category. +3. Select the DB cluster where you want to create the reader instance. +4. Choose Actions, and then choose Add reader. +5. Configure the replica DB instance. On the Create replica DB instance page, specify the following options: + - DB instance class: Choose a DB instance class that matches or aligns with your primary instance (e.g., db.r5.large). This defines the processing and memory requirements for the Neptune replica. + - Availability zone: Specify a different Availability Zone than the primary DB instance. This is critical for Multi-AZ deployment. The list shows only AZs that are mapped by the DB subnet group for the cluster. + - Encryption: Enable or disable encryption (recommended: enable if primary has encryption enabled). + - Read replica source: Choose the identifier of the primary instance to create the Neptune replica for. + - DB instance identifier: Enter a unique name for the instance in your region. Consider including the AZ in the name (e.g., neptune-replica-us-east-1b). + - Database port: Specify the port number on which the database accepts connections (default: 8182 for Neptune). + - DB parameter group: Select the parameter group for this instance (typically the same as the primary). + - Log exports: Choose any logs you want to publish (audit, slowquery, etc.). + - Auto Minor Version Upgrade: Choose Yes to enable automatic minor version upgrades for the replica. +6. Choose Create read replica to create the Neptune replica instance. + +## Default Value + +Neptune clusters are not deployed in multi-AZ configuration by default. A reader replica must be manually added in a different AZ. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4 Secure Configuration of Enterprise Assets and Software | | | | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.2/SKILL.md new file mode 100644 index 0000000000..6f69bb3e26 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.2/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-aws-database-9.2 +description: "Ensure Data at Rest is Encrypted" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, encryption, kms] +cis_id: "9.2" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.1, cis-aws-database-9.3, cis-aws-database-9.4] +prerequisites: [] +severity_boost: {} +--- + +# 9.2 Ensure Data at Rest is Encrypted (Manual) + +## Description + +This helps ensure that the data is kept secure and protected when at rest. The user must choose from two key options which then determine when the data is encrypted at rest. + +## Rationale + +Encryption at rest protects data stored in Neptune from unauthorized access even if the underlying storage media is compromised. + +## Impact + +If an unauthorized user steals the data, it would be unreadable for them because a key would be required to decrypt the message into plaintext. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. +2. Open the Amazon Neptune Console - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/neptune/. +3. Select the Neptune Cluster: + - Choose the Amazon Neptune cluster for which you want to enable encryption at rest. + - Click on the cluster name to access its details page. +4. Enable Encryption at Rest: + - In the cluster details page, navigate to the `Configuration` or `Encryption at Rest` section. + - Under `Encryption at Rest`, click on `Modify`. + - In the `Encryption at Rest` dialog box, select the encryption option you prefer: + - AWS managed key (default): Choose this option to use the default AWS managed key for encryption. + - Customer-managed key (CMK): Choose this option if you want to use your own AWS Key Management Service (KMS) customer-managed key for encryption. Select the appropriate CMK from the dropdown menu. + - Click `Apply Changes` to enable encryption at rest for the Neptune cluster. +5. Verify Encryption Status: + - Wait a few minutes for the changes and configuration to take effect. + - Refresh the cluster details page to see the updated encryption status. + - Verify that encryption at rest is enabled for the Neptune cluster. + +## Expected Result + +Encryption at rest should be enabled for the Neptune cluster, using either AWS-managed key or a customer-managed KMS key. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable encryption at rest for your Neptune cluster. Note that encryption at rest can only be enabled when creating a new Neptune cluster; existing unencrypted clusters must be migrated to new encrypted clusters. + +## Default Value + +Encryption at rest is not enabled by default for Neptune clusters. It must be configured during cluster creation. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.3/SKILL.md new file mode 100644 index 0000000000..ebccc02478 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.3/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-aws-database-9.3 +description: "Ensure Data in Transit is Encrypted" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, encryption, tls, ssl] +cis_id: "9.3" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.1, cis-aws-database-9.2, cis-aws-database-9.4] +prerequisites: [] +severity_boost: {} +--- + +# 9.3 Ensure Data in Transit is Encrypted (Manual) + +## Description + +Enabling encryption in transit helps that the data is protected when it is moving from one location to another. + +## Rationale + +Encryption in transit ensures data transmitted between clients and Neptune remains confidential and protected from interception. + +## Impact + +If an unauthorized user steals the data, it would be unreadable for them because a key would be required to decrypt the message into plaintext. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. +2. Open the Amazon Neptune Console - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/neptune/. +3. Select the Neptune Cluster: + - Choose the Amazon Neptune cluster for which you want to implement encryption in transit. + - Click on the cluster name to access its details page. +4. Enable SSL/TLS Encryption: + - In the cluster details page, navigate to the `Configuration` or `Encryption in Transit` section. + - Under `Encryption in Transit`, ensure that the `Enable` option is selected. + - Optionally, you can also select the `Enforce` option to require SSL/TLS encryption for all client connections to the Neptune cluster. + - Click `Apply Changes` to enable SSL/TLS encryption for the Neptune cluster. +5. Update Client Applications: + - When connecting to the Neptune cluster, update your client applications to establish an SSL/TLS-encrypted connection. + - Consult your client drivers or libraries documentation or configuration settings to enable SSL/TLS encryption. + - Configure the necessary SSL/TLS settings, such as specifying the SSL/TLS certificate to use. +6. Verify Encryption in Transit: + - Test the connection to the Neptune cluster from your client application. + - Ensure that the connection is established using SSL/TLS encryption. + - Verify that all data transmitted between your client applications and the Neptune cluster is encrypted in transit. + +## Expected Result + +SSL/TLS encryption in transit should be enabled (and preferably enforced) for all connections to the Neptune cluster. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable and enforce SSL/TLS encryption in transit for your Neptune cluster. + +## Default Value + +Neptune supports SSL/TLS encryption in transit. It should be explicitly enabled and enforced for all client connections. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.4/SKILL.md new file mode 100644 index 0000000000..f1ecb5660d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.4/SKILL.md @@ -0,0 +1,86 @@ +--- +name: cis-aws-database-9.4 +description: "Ensure Authentication and Access Control is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, iam, authentication, access-control] +cis_id: "9.4" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.1, cis-aws-database-9.5, cis-aws-database-9.6] +prerequisites: [] +severity_boost: {} +--- + +# 9.4 Ensure Authentication and Access Control is Enabled (Manual) + +## Description + +This helps ensure that there are specific IAM roles and policies that are given the necessary information within a Neptune DB cluster to operate as needed. + +## Rationale + +IAM authentication and access control verifies the identity of users and services, ensuring only authorized entities can access Neptune resources. + +## Impact + +Allowing authentication verifies the identity of the person and who has appropriate access to a company's data. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. +2. Open the Amazon Neptune Console - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/neptune/. +3. Select the Neptune Cluster: + - Choose the Amazon Neptune cluster on which you want to implement authentication and access control. + - Click on the cluster name to access its details page. +4. Enable IAM Database Authentication: + - In the cluster details page, navigate to the `Configuration` or `Database Authentication` section. + - Under `Database Authentication`, select the option to enable IAM database authentication. + - Click `Apply Changes` to enable IAM database authentication for the Neptune cluster. +5. Configure IAM Roles and Policies: + - Open the AWS Identity and Access Management (IAM) console by navigating to `IAM` in the AWS Management Console. + - Create IAM roles and policies that define the desired access control for your Neptune resources. + - Assign the necessary permissions to the IAM roles to allow specific actions on the Neptune cluster, such as read, write, or manage operations. + - Associate the IAM roles with the appropriate users, groups, or AWS services that need access to the Neptune cluster. +6. Test IAM Database Authentication: + - Update your client applications or tools to use IAM database authentication when connecting to the Neptune cluster. + - Configure your applications to assume the necessary IAM roles before establishing a connection to Neptune. + - Test the connection from your client application to the Neptune cluster to verify that IAM database authentication is working as expected. + - Ensure that users or services are authenticated and authorized based on the IAM roles and policies defined. +7. Regularly Review and Update IAM Roles and Policies: + - Periodically review your IAM roles and policies to ensure they align with your security requirements and access control needs. + - Make necessary updates to IAM roles and policies to adapt to changes in user access requirements or organizational security policies. + - Follow the principle of least privilege and ensure that users or services have only the necessary permissions to perform their required actions on the Neptune cluster. + +## Expected Result + +IAM database authentication should be enabled for the Neptune cluster, with properly configured IAM roles and policies following the principle of least privilege. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable IAM database authentication and configure appropriate IAM roles and policies for your Neptune cluster. + +## Default Value + +IAM database authentication is not enabled by default for Neptune clusters. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.5/SKILL.md new file mode 100644 index 0000000000..149087ab63 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.5/SKILL.md @@ -0,0 +1,92 @@ +--- +name: cis-aws-database-9.5 +description: "Ensure Audit Logging is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, audit-logging, cloudwatch] +cis_id: "9.5" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.4, cis-aws-database-9.6, cis-aws-database-9.7] +prerequisites: [] +severity_boost: {} +--- + +# 9.5 Ensure Audit Logging is Enabled (Manual) + +## Description + +This control is important because it helps ensure activity within the cluster and identifies who has last modified the document and who has access to it, in case of breaches. It also ensures compliance with regulation requirements. + +## Rationale + +Audit logging captures and records all activities within the Neptune cluster, enabling detection of unauthorized access, compliance verification, and forensic analysis. + +## Impact + +Reduces risks of any fraud since worker activity is being monitored and tracked. + +## Audit Procedure + +### Using AWS Console + +1. Sign into the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. +2. Open the Amazon Neptune Console - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/neptune/. +3. Select the Neptune Cluster: + - Choose the Amazon Neptune cluster on which you want to enable audit logging. Click on the cluster name to access its details page. +4. Enable Amazon CloudWatch Logs: + - In the cluster details page, navigate to the `Monitoring` or `Logging` section. + - Under `CloudWatch Logs`, click `Enable` to enable logging for the Neptune cluster. + - Select an existing CloudWatch Logs group or create a new one to store the logs. + - Choose the appropriate retention period for the logs, considering your compliance and retention requirements. + - Click `Save` or `Apply Changes` to enable CloudWatch Logs for the Neptune cluster. +5. Configure Log Levels (Optional): + - In the cluster details page, navigate to the `Configuration` or `Logging` section. + - Under `Logging`, you may have the option to configure log levels for different components of Neptune, such as query logs or error logs. + - Adjust the log levels according to your logging and troubleshooting needs. + - Click `Apply Changes` to save the log level configuration. +6. Review and Analyze Logs: + - Access the Amazon CloudWatch console by navigating to `CloudWatch` in the AWS Management Console. + - Go to the CloudWatch Logs section and locate the log group associated with your Neptune cluster. + - Select the log group and review the logs generated by Neptune. + - Analyze the logs for troubleshooting, performance monitoring, or auditing purposes. +7. Set Up Log Metric Filters and Alarms (Optional): + - In the CloudWatch console, navigate to `Metric Filters` in the left-side menu. + - Click on `Create metric filter` to set up filters to extract specific information from the Neptune logs. + - Define the filter patterns to capture the desired log events and extract the required metrics. + - Configure alarms based on the extracted metrics to trigger notifications or automated actions when specific conditions are met. +8. Regularly Monitor Logs: + - Continuously monitor the logs generated by Neptune using the CloudWatch Logs console or programmatically using the CloudWatch APIs. + - Review the logs regularly to identify any abnormal or suspicious activities. + - Set up appropriate notifications or alerts to proactively respond to critical log events. + +## Expected Result + +CloudWatch Logs should be enabled for the Neptune cluster with appropriate log levels, retention periods, and monitoring alarms configured. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to enable CloudWatch Logs and configure audit logging for your Neptune cluster. + +## Default Value + +Audit logging is not enabled by default for Neptune clusters. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.6/SKILL.md new file mode 100644 index 0000000000..a6d64e56b4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.6/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-aws-database-9.6 +description: "Ensure Security Configurations are Reviewed Regularly" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, security-review, compliance] +cis_id: "9.6" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.1, cis-aws-database-9.4, cis-aws-database-9.5] +prerequisites: [] +severity_boost: {} +--- + +# 9.6 Ensure Security Configurations are Reviewed Regularly (Manual) + +## Description + +This helps by removing or updating any IAM roles, security networks, encryption settings, audit logging, and authentication. By updating or removing a few things from these lists it helps tighten security and ensures that the users do not have excessive permissions. + +## Rationale + +Regular security reviews ensure that configurations remain aligned with current security requirements and best practices, preventing configuration drift and excessive permissions. + +## Impact + +By updating and revising the control within our Amazon Neptune cluster it would keep the system as secure as possible. + +## Audit Procedure + +### Using AWS Console + +1. Establish a Security Review Schedule: + - Determine a regular schedule for reviewing and updating the security configuration of your Amazon Neptune environment. + - Consider factors such as the frequency of changes, compliance requirements, and industry best practices to determine the appropriate review interval. +2. Monitor AWS Security Bulletins: + - Stay informed about AWS security updates and announcements related to Amazon Neptune. + - Regularly review AWS security bulletins and notifications to identify any security patches, updates, or new features relevant to your Neptune environment. + - Take note of any security recommendations or best practices provided by AWS. +3. Review IAM Roles and Policies: + - Access the AWS Identity and Access Management (IAM) console by navigating to `IAM` in the AWS Management Console. + - Review the IAM roles and policies associated with your Neptune resources. + - Ensure that the assigned permissions align with the principle of least privilege and reflect the current access requirements. + - Update the IAM roles and policies as needed to adapt to changes in user access or security requirements. +4. Review Security Groups and Network ACLs: + - Access the Amazon Neptune console by navigating to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/neptune/. + - In the Neptune console, navigate to the `Connectivity & Security` or `Network & Security` section. + - Review the security groups and network ACLs associated with your Neptune clusters. + - Ensure that the inbound and outbound rules are up to date and aligned with your security requirements. + - Remove any unnecessary or outdated rules and add new rules if required. +5. Review Encryption Settings: + - Navigate to the `Configuration` section or relevant encryption settings in the Neptune console. + - Review the encryption settings for both encryption at rest and encryption in transit. + - Ensure that the appropriate encryption options and key management strategies are in place. + - Consider rotating encryption keys periodically, following best practices and compliance requirements. +6. Review VPC Configuration: + - Access the Amazon VPC console by navigating to `VPC` in the AWS Management Console. + - Review the VPC configuration associated with your Neptune clusters. + - Ensure the subnets, routing tables, and VPC peering settings are configured correctly. + - Verify that the network architecture provides your Neptune resources' desired isolation and connectivity. +7. Conduct Security Assessments: + - Periodically conduct security assessments and penetration testing on your Neptune environment. + - Engage security experts or use appropriate security tools to identify vulnerabilities, weaknesses, or misconfigurations. + - Analyze the assessment results and take necessary actions to remediate any security issues or risks. +8. Stay Up to Date with Best Practices: + - Continuously educate yourself and your team on the latest security best practices for Amazon Neptune. + - Stay informed about emerging security threats and vulnerabilities. + - Regularly review AWS documentation, security blogs, and other relevant resources to enhance your understanding and implementation of security practices. + +## Expected Result + +All security configurations (IAM, security groups, network ACLs, encryption, VPC) should be reviewed and updated regularly according to an established schedule. + +## Remediation + +### Using AWS Console + +Establish a regular security review schedule and follow the audit steps above to review and update all security configurations for your Neptune environment. + +## Default Value + +No automatic security review is configured. This is a manual process that must be established by the organization. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5 Account Management | | | | +| v7 | 5 Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers | | | | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.7/SKILL.md new file mode 100644 index 0000000000..4eae6c08c6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.7/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-aws-database-9.7 +description: "Ensure Monitoring and Alerting is Enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, monitoring, cloudwatch, alerting] +cis_id: "9.7" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.5, cis-aws-database-9.6, cis-aws-database-9.8] +prerequisites: [] +severity_boost: {} +--- + +# 9.7 Ensure Monitoring and Alerting is Enabled (Manual) + +## Description + +Ensure that monitoring and alerting is enabled for Amazon Neptune clusters to detect performance issues, security incidents, and operational anomalies proactively. + +## Rationale + +Monitoring and alerting provides visibility into Neptune cluster operations, enabling proactive detection of performance issues, security incidents, and abnormal behavior. + +## Impact + +Proper monitoring and alerting enables timely response to critical conditions and helps maintain the security and performance of Neptune clusters. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console at https://console.aws.amazon.com/ with your AWS account credentials. +2. Open the Amazon Neptune Console - Navigate to the service using the `Find Services` search bar or by directly accessing the console at https://console.aws.amazon.com/neptune/. +3. Select the Neptune Cluster: + - Choose the Amazon Neptune cluster on which you want to implement monitoring and alerting. + - Click on the cluster name to access its details page. +4. Set Up Amazon CloudWatch Metrics: + - In the cluster details page, navigate to the `Monitoring` or `Metrics` section. + - Enable CloudWatch metrics for the Neptune cluster by clicking `Enable` or `Configure`. + - Select the desired metrics to monitor, such as CPU utilization, storage usage, or network throughput. + - Choose the appropriate granularity and sampling intervals for the metrics. + - Click `Save` or `Apply Changes` to enable CloudWatch metrics for the Neptune cluster. +5. Configure CloudWatch Alarms: + - In the CloudWatch console, navigate to `Alarms` in the left-side menu. + - Click `Create alarm` to configure alarms based on specific metric thresholds. + - Select the desired metric to monitor and set the threshold values for triggering an alarm. + - Define the actions to be taken when the alarm state changes, such as sending notifications or triggering automated actions. + - Configure the alarm settings, including alarm name, description, and notification recipients. + - Click `Create alarm` to save the alarm configuration. +6. Set Up Amazon EventBridge Rules: + - In the Amazon EventBridge console, navigate to `Rules` in the left-side menu. + - Click on `Create rule` to set up rules for specific events or log entries related to Neptune. + - Define the event pattern or log filter to match the desired events. + - Configure the target actions to be taken when the rule matches an event, such as sending notifications or invoking AWS Lambda functions. + - Specify the rule settings, including rule name, description, and event source. + - Click `Create` to save the rule configuration. +7. Review and Customize Metrics and Alarms: + - Periodically review the metrics and alarms configured for your Neptune cluster. + - Adjust the metric thresholds and alarm settings based on your performance and alerting requirements. + - Consider adding more metrics or alarms as needed to monitor additional aspects of your Neptune environment. +8. Regularly Monitor and Respond to Alerts: + - Continuously monitor the CloudWatch metrics and alarm states for your Neptune cluster. + - Respond promptly to any alarms triggered by critical or abnormal conditions. + - Investigate the root causes of the alerts and take appropriate actions to mitigate issues. +9. Utilize Additional Monitoring Tools: + - Explore and leverage additional monitoring and observability tools available in the AWS ecosystem, such as Amazon CloudWatch Logs Insights, AWS X-Ray, or third-party monitoring solutions. + - Configure these tools to gather insights and detect any performance or security issues in your Neptune environment. + +## Expected Result + +CloudWatch metrics, alarms, and EventBridge rules should be properly configured to provide comprehensive monitoring and alerting for the Neptune cluster. + +## Remediation + +### Using AWS Console + +Follow the audit steps above to set up CloudWatch metrics, alarms, and EventBridge rules for your Neptune cluster. + +## Default Value + +Basic CloudWatch metrics are available for Neptune clusters, but alarms and EventBridge rules must be manually configured. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.8/SKILL.md new file mode 100644 index 0000000000..2ffbda844a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.8/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-aws-database-9.8 +description: "Ensure Neptune Database is not Publicly accessible" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, public-access, network-security] +cis_id: "9.8" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.1, cis-aws-database-9.9, cis-aws-database-9.10] +prerequisites: [] +severity_boost: {} +--- + +# 9.8 Ensure Neptune Database is not Publicly accessible (Manual) + +## Description + +Neptune databases must not be publicly accessible. This means the database's network configuration should prevent assignment of public IP addresses or exposure to the public internet, ensuring that connections are only permitted from trusted internal networks. + +## Rationale + +Restricting public access to databases greatly reduces the attack surface for malicious actors. Publicly accessible databases are highly vulnerable to unauthorized login attempts, exploitation of software vulnerabilities and data breaches. Enforcing private access restricts connectivity and enforces the principle of least privilege and network segmentation. + +## Impact + +If public access is not properly restricted on databases, data stored in the database is at risk of exposure to the internet, increasing the likelihood of data loss and service disruption. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console where the Aurora database cluster you are auditing resides. +2. Navigate to the Neptune Dashboard. You can find this under the Database category. +3. Select the DB instance name you wish to audit. This opens the details page for your specific Neptune DB instance. +4. Under the Connectivity & Security tab, check the value of Publicly accessible: + - If Set to No, the instance is not publicly accessible; no further network verification is needed. + - If Set to Yes, continue with additional steps to fully assess exposure. +5. In the Networking section under Connectivity & security, locate the Subnets for the database: + - Right-click on the subnet link and open it in a new tab for further inspection. +6. With the subnet selected, review the attached Route Table: + - Check for routes with Destination: 0.0.0.0/0 and Target: an Internet Gateway (ID starts with igw-). + - If such a route exists, it enables access to the database from the public internet. + +If the database is marked as "Publicly accessible: Yes" and the subnets contain a route to 0.0.0.0/0 via an Internet Gateway, the instance is exposed to the public internet. + +### Using AWS CLI + +Verify that public accessibility has been disabled: + +```bash +aws neptune describe-db-instances \ + --db-instance-identifier \ + --query "DBInstances[0].{DBInstanceIdentifier:DBInstanceIdentifier,PubliclyAccessible:PubliclyAccessible}" +``` + +- Confirm PubliclyAccessible is now false. + +## Expected Result + +The `PubliclyAccessible` value should be `false` for all Neptune DB instances. + +## Remediation + +### Using AWS CLI + +1. Disable public accessibility on a specific Neptune instance: + +```bash +aws neptune modify-db-instance \ + --db-instance-identifier \ + --no-publicly-accessible \ + --apply-immediately +``` + +- `--no-publicly-accessible` disables public accessibility for the instance. +- `--apply-immediately` applies the change without waiting for the next maintenance window. + +2. Verify that public accessibility has been disabled: + +```bash +aws neptune describe-db-instances \ + --db-instance-identifier \ + --query "DBInstances[0].{DBInstanceIdentifier:DBInstanceIdentifier,PubliclyAccessible:PubliclyAccessible}" +``` + +- Confirm PubliclyAccessible is now false. + +## Default Value + +Neptune DB instances should not be publicly accessible by default when deployed within a VPC. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.12 Segment Data Processing and Storage Based on Sensitivity | | x | x | +| v8 | 4 Secure Configuration of Enterprise Assets and Software | | | | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.9/SKILL.md new file mode 100644 index 0000000000..f9c6d54cdc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Database_Services_Benchmark_v2.0.0/cis-aws-database-9.9/SKILL.md @@ -0,0 +1,83 @@ +--- +name: cis-aws-database-9.9 +description: "Ensure Neptune Database has automatic backups enabled" +category: cis-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, aws, database, neptune, graph-database, backup, recovery, pitr] +cis_id: "9.9" +cis_benchmark: "CIS AWS Database Services Benchmark v2.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-database-9.8, cis-aws-database-9.10, cis-aws-database-9.11] +prerequisites: [] +severity_boost: {} +--- + +# 9.9 Ensure Neptune Database has automatic backups enabled (Manual) + +## Description + +Ensure that Amazon Neptune DB clusters have automated backups enabled with a non-zero backup retention period (for example, 7 to 35 days). Neptune automatically creates continuous, incremental backups of cluster data and retains them for the configured retention period, allowing point-in-time recovery to any second within the backup window. + +## Rationale + +Enabling automated backups with a sufficient retention period ensures that Neptune cluster data can be quickly recovered to any point within the retention window, protecting against accidental deletions, data corruption, application errors, and infrastructure failures. Neptune backups are continuous and incremental, providing robust disaster recovery and business continuity capabilities with minimal storage overhead. + +## Impact + +Enabling automated backups for Neptune ensures that cluster data is continuously protected and recoverable to any point within the configured retention period (1-35 days), significantly reducing exposure to data loss and enabling rapid recovery from operational incidents. + +## Audit Procedure + +### Using AWS CLI + +List backup retention status for all Neptune DB clusters: + +```bash +aws neptune describe-db-clusters \ + --query "DBClusters[*].{DBClusterIdentifier:DBClusterIdentifier,Engine:Engine,BackupRetentionPeriod:BackupRetentionPeriod}" +``` + +- BackupRetentionPeriod > 0 => Automated backups are enabled (compliant). +- BackupRetentionPeriod = 0 or missing/null => Automated backups are not enabled (non-compliant). + +## Expected Result + +All Neptune DB clusters should have `BackupRetentionPeriod` greater than 0 (recommended: 7 or more days). + +## Remediation + +### Using AWS CLI + +Enable automated backups on a specific Neptune cluster: + +```bash +aws neptune modify-db-cluster \ + --db-cluster-identifier \ + --backup-retention-period 7 \ + --preferred-backup-window "03:00-04:00" \ + --apply-immediately +``` + +- `--backup-retention-period 7` sets a 7-day retention; use a value between 1 and 35 days aligned with your policy. +- `--preferred-backup-window "03:00-04:00"` (optional) sets the daily UTC backup window during off-peak hours to minimize performance impact. +- `--apply-immediately` applies the change without waiting for the next maintenance window. + +## Default Value + +Neptune clusters have a default backup retention period of 1 day. + +## References + +1. https://aws.amazon.com/products/databases/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------- | ---- | ---- | ---- | +| v8 | 11 Data Recovery | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/README.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/README.md new file mode 100644 index 0000000000..d238953574 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/README.md @@ -0,0 +1,77 @@ +# CIS AWS End User Compute Services Benchmark v1.2.0 - Skills + +This directory contains CyberStrike skills for the CIS AWS End User Compute Services Benchmark v1.2.0. + +## Coverage Summary + +### Section 2: WorkSpaces (18 controls) + +- 2.1 - 2.18: WorkSpaces configuration and security controls + +### Section 3: WorkSpaces Web (1 control) + +- 3.1: User Access Logging + +### Section 4: WorkDocs (8 controls) + +- 4.1: Ensure Administrators of WorkDocs is defined using IAM (Automated) +- 4.2: Ensure MFA is enabled for WorkDoc users (Manual) +- 4.3: Ensure Workdocs access is limited to a range of allowable IP addresses (Manual) +- 4.4: Utilize site wide activity feed for monitoring (Manual) +- 4.5: Ensure new users can only be invited from allowed domains (Manual) +- 4.6: Ensure only specific users are allowed to invite external users (Manual) +- 4.7: Ensure publicly shareable links is not allowed in WorkDocs (Manual) +- 4.8: Ensure any user that has not accessed WorkDocs in 30 days is set to inactive (Manual) + +### Section 5: AppStream 2.0 (7 controls) + +- 5.1: Ensure AppStream is utilizing its own virtual private cloud (VPC) (Manual) +- 5.2: Ensure a VPC Endpoint is set for AppStream (Manual) +- 5.3: Ensure maximum session duration is no longer than 10 hours (Automated) +- 5.4: Ensure session disconnect timeout is set to 5 minutes or less (Automated) +- 5.5: Ensure session Idle disconnect timeout is set to 10 minutes or less (Automated) +- 5.6: Ensure internet access is granted and managed through your VPC (Automated) +- 5.7: Ensure Operating system updates are applied to your base image every 30 days (Manual) + +## Total Controls: 34 + +## Skill Directory Structure + +``` +CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/ +├── cis-aws-euc-2.1/SKILL.md +├── cis-aws-euc-2.2/SKILL.md +├── ... +├── cis-aws-euc-4.1/SKILL.md ← WorkDocs controls +├── cis-aws-euc-4.2/SKILL.md +├── ... +├── cis-aws-euc-4.8/SKILL.md +├── cis-aws-euc-5.1/SKILL.md ← AppStream 2.0 controls +├── cis-aws-euc-5.2/SKILL.md +├── ... +└── cis-aws-euc-5.7/SKILL.md +``` + +## Usage + +Each skill can be invoked individually via CyberStrike CLI: + +```bash +cyberstrike run cis-aws-euc-4.1 # WorkDocs IAM admin control +cyberstrike run cis-aws-euc-5.1 # AppStream VPC control +``` + +## Metadata + +- **Benchmark:** CIS AWS End User Compute Services Benchmark +- **Version:** 1.2.0 +- **Author:** cyberstrike-official +- **Category:** cis-end-user-compute +- **Tech Stack:** aws +- **Services Covered:** WorkSpaces, WorkDocs, AppStream 2.0, WorkSpaces Web + +## References + +- [CIS AWS End User Compute Services Benchmark](https://www.cisecurity.org/benchmark/amazon_web_services) +- [AWS WorkDocs Documentation](https://docs.aws.amazon.com/workdocs/) +- [AWS AppStream 2.0 Documentation](https://docs.aws.amazon.com/appstream2/) diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.1/SKILL.md new file mode 100644 index 0000000000..6d7642d12e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.1/SKILL.md @@ -0,0 +1,133 @@ +--- +name: cis-aws-euc-2.1 +description: "Ensure Administration of WorkSpaces is defined using IAM" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, iam, authorization] +cis_id: "2.1" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-euc-2.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Administration of WorkSpaces is defined using IAM (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +To allow users to administer Amazon WorkSpaces, IAM policies must be created and attached with the required permissions to an IAM Principal used for administration of Amazon WorkSpaces. An IAM Principal may be a IAM Role or an IAM User, or an IAM User Group with Users within the User Group. + +AWS has an AWS Managed Policy, `AmazonWorkSpacesAdmin` that grants permissions to administer Amazon WorkSpaces. A custom managed policy or inline policy may be used to grant WorkSpaces permissions to the IAM Principal. + +## Rationale + +Creating and managing Workspaces specific users is not done in AWS IAM. Creating and managing Workspaces specific users is done within the Workspace service console. In order to properly administer Workspaces specific users, an IAM Principal with proper permissions must be created. + +## Impact + +None specified in the benchmark. + +## Audit Procedure + +### Using AWS Console + +1. Login in and open the IAM console at https://console.aws.amazon.com/iam/ +2. In the left pane click on **User Groups**, **Users**, or **Roles** +3. Click on the IAM Principal (User, Group, or Role) that is to be used to administer Workspaces +4. Click on **Permissions** and confirm that the AmazonWorkSpacesAdmin policy or the proper permissions are attached + +### Using AWS CLI + +Run the appropriate command to determine permissions for the IAM Principal: + +```bash +# For attached managed policies +aws iam list-attached-role-policies --role-name + +# For inline policies +aws iam get-role-policy --role-name --policy-name +``` + +## Expected Result + +The AWS managed policy AmazonWorkSpacesAdmin or a custom WorkSpaces Admin policy should be attached to the IAM Principal for administration of WorkSpaces. + +## Remediation + +### Using AWS Console + +**If the IAM Principal for WorkSpaces Administration exists but does not have the policy attached:** + +1. Login to the IAM console at https://console.aws.amazon.com/iam/ +2. In the left pane click on either **User Groups**, **Users**, or **Roles** +3. Click the proper IAM Principal +4. Click on the **Permissions** tab +5. Click on **Attach Policy** +6. Select the **AmazonWorkSpacesAdmin** Policy or attach the desired Managed Policy +7. Click **Attach Policy** + +**For Groups:** + +1. Login to the IAM console at https://console.aws.amazon.com/iam/ +2. In the left pane click on **Groups** +3. Select the **Group** +4. Click on the **Permissions** tab +5. Click on **Attach Policy** +6. Select the **AmazonWorkSpacesAdmin** Policy +7. Click **Attach Policy** + +### Using AWS CLI + +Attach the AmazonWorkSpacesAdmin policy by running the `aws iam attach-role-policy` command: + +```bash +aws iam attach-role-policy --policy-arn arn:aws:iam::aws:policy/AmazonWorkSpacesAdmin --role-name +``` + +## Default Value + +By default, Policy: AmazonWorkSpacesAdmin Function: Provides access to Amazon WorkSpaces administrative actions via AWS SDK and CLI. The default policy includes extensive permissions for managing WorkSpaces resources including: + +- kms:DescribeKey, kms:ListAliases, kms:ListKeys +- workspaces:CreateTags, workspaces:CreateWorkspaceImage, workspaces:CreateWorkspaces, workspaces:CreateWorkspacesPool +- workspaces:DeleteTags, workspaces:DeregisterWorkspaceDirectory, workspaces:DescribeTags +- workspaces:DescribeWorkspaceBundles, workspaces:DescribeWorkspaceDirectories, workspaces:DescribeWorkspaces +- workspaces:DescribeWorkspacesPools, workspaces:DescribeWorkspacesPoolSessions +- workspaces:DescribeWorkspacesConnectionStatus, workspaces:ModifyCertificateBasedAuthProperties +- workspaces:ModifySamlProperties, workspaces:ModifyStreamingProperties, workspaces:ModifyWorkspaceCreationProperties +- workspaces:ModifyWorkspaceProperties, workspaces:RebootWorkspaces, workspaces:RebuildWorkspaces +- workspaces:RegisterWorkspaceDirectory, workspaces:RestoreWorkspace, workspaces:StartWorkspaces +- workspaces:StartWorkspacesPool, workspaces:StopWorkspaces, workspaces:StopWorkspacesPool +- workspaces:TerminateWorkspaces, workspaces:TerminateWorkspacesPool, workspaces:TerminateWorkspacesPoolSession +- workspaces:UpdateWorkspacesPool +- And several other managed policies for application management, PCA access, pool service access, secure browser access, thin client access, and web service access + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-access-control.html +2. https://docs.aws.amazon.com/workspaces/latest/adminguide/manage-workspaces-users.html +3. https://docs.aws.amazon.com/IAM/latest/UserGuide/id.html + +## Additional Information + +AWS provides guidance on the usage of IAM Roles, IAM Users, IAM Groups, and the root user. AWS recommends not using the root user for everyday tasks. +https://docs.aws.amazon.com/IAM/latest/UserGuide/id.html + +## CIS Controls + +**v8:** + +- 3.3 Configure Data Access Control Lists + - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. + +**v7:** + +- 14.6 Protect Information through Access Control Lists + - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.10/SKILL.md new file mode 100644 index 0000000000..7a5197dc72 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.10/SKILL.md @@ -0,0 +1,120 @@ +--- +name: cis-aws-euc-2.10 +description: "Ensure that patches and updates are performed on the operating system for Workstations" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, patching, updates, maintenance-mode] +cis_id: "2.10" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-euc-2.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that patches and updates are performed on the operating system for Workstations (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +In order for Windows updates to occur auto-stop WorkSpaces must be utilized and the default for maintenance mode must be set to enabled. + +## Rationale + +Windows Operating systems updates can be a high security vulnerability and normal updates and patches can help eliminate these vulnerabilities. + +## Impact + +None specified in the benchmark. + +## Audit Procedure + +### Using AWS Console + +Perform the steps to check maintenance mode for your WorkSpaces: + +1. Login to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, click **Directories** +3. Select your directory id link +4. Scroll to the **Maintenance mode** section and ensure maintenance mode is set to **Enabled** + +If it is set to **Enabled** you are meeting this recommendation. + +If it is set to **Disabled**, refer to the remediation below. + +### Using AWS CLI + +1. Run the workspaces command `describe-workspace-directories`: + +```bash +aws workspaces describe-workspace-directories +``` + +2. Review the output under "WorkspaceCreationProperties" for "EnableMaintenanceMode": true + +## Expected Result + +The output should show `"EnableMaintenanceMode": true` in the WorkspaceCreationProperties section. + +Example output: + +```json +"WorkspaceCreationProperties": { + "EnableInternetAccess": false, + "EnableWorkDocs": true, + "UserEnabledAsLocalAdministrator": true, + "EnableMaintenanceMode": true +} +``` + +## Remediation + +### Using AWS Console + +Perform the following steps to enable maintenance mode: + +1. Login to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, click **Directories** +3. Select your directory id link +4. Scroll to the **Maintenance mode** section and click **Edit** +5. Select **Enable maintenance mode** +6. Click **Save** + +**Note:** +If you prefer to manage updates manually or with another tool document usage of that, and choose Disabled. + +### Using AWS CLI + +1. Run the WorkSpaces modify-workspace-creation-property command: + +```bash +aws workspaces modify-workspace-creation-property --resource-id --workspace-creation-properties EnableMaintenanceMode=true +``` + +## Default Value + +By default, your Windows WorkSpaces are configured to receive updates from Windows Update. To configure your own automatic update mechanisms for Windows, see the documentation for Windows Server Update Services (WSUS) and Configuration Manager. + +https://docs.aws.amazon.com/workspaces/latest/adminguide/workspace-maintenance.html + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/workspace-maintenance.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/workspaces/modify-workspace-creation-properties.html + +## CIS Controls + +**v8:** + +- 2.2 Ensure Authorized Software is Currently Supported + - Ensure that only currently supported software is designated as authorized in the software inventory for enterprise assets. If software is unsupported, yet necessary for the fulfillment of the enterprise's mission, document an exception detailing mitigating controls and residual risk acceptance. For any unsupported software without an exception documentation, designate as unauthorized. Review the software list to verify software support at least monthly, or more frequently. + +**v7:** + +- 2.2 Ensure Software is Supported by Vendor + - Ensure that only software applications or operating systems currently supported by the software's vendor are added to the organization's authorized software inventory. Unsupported software should be tagged as unsupported in the inventory system. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.11/SKILL.md new file mode 100644 index 0000000000..835df5c6be --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.11/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-aws-euc-2.11 +description: "Ensure your WorkSpaces image has the appropriate CIS Operating System Benchmark applied" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, os-hardening, compliance] +cis_id: "2.11" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure your WorkSpaces image has the appropriate CIS Operating System Benchmark applied (Manual) + +## Description + +Utilize the CIS Benchmark to secure the Operating system image that you are utilizing for your WorkSpaces. + +## Rationale + +Securing the Operating system with a CIS Benchmark ensures all systems remain in a secure, compliant and hardened state. + +## Impact + +None + +## Audit Procedure + +### Using AWS Console + +Spin up a WorkSpaces instance and run a manual assessment by confirming the CIS Operating System Benchmark recommendations for the applicable operating system are applied. You can also utilize a 3rd Party Assessment tool that has been certified for the specific CIS Operating System Benchmark to automate this process. + +### Expected Result + +The WorkSpaces image should have the appropriate CIS Operating System Benchmark applied. + +## Remediation + +### Using AWS Console + +Perform the steps below using the downloaded free version of the applicable CIS Operating System Benchmark and manually apply the recommendations for the WorkSpaces instance. Or Utilize a 3rd Party tool to assess and apply the CIS Operating System Benchmark. + +1. Launch a WorkSpaces Bundle +2. Access that WorkSpace as an Administrator utilize SSH or RDP. +3. Apply the Benchmark: + - Manually + - Using Active Directory by creating a GPO that matches the Benchmark. + - Or using a Third Party tool that will apply the Benchmark recommendations. +4. Assess the WorkSpaces instance manually or with a 3rd Party tool. +5. Create a workspace bundle that can then be used to launch your production WorkSpaces instances. + +## Default Value + +By default, this feature is not native to AWS and therefore is not enabled by default. + +## References + +1. https://www.cisecurity.org/partners-vendor/ +2. https://docs.aws.amazon.com/workspaces/latest/adminguide/create-custom-bundle.html +3. https://docs.aws.amazon.com/workspaces/latest/adminguide/update-custom-bundle.html + +## CIS Controls + +**Controls Version v8:** + +- 4.1 Establish and Maintain a Secure Configuration Process + +**Controls Version v7:** + +- 5.1 Establish Secure Configurations + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.12/SKILL.md new file mode 100644 index 0000000000..6d3a3c93ce --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.12/SKILL.md @@ -0,0 +1,149 @@ +--- +name: cis-aws-euc-2.12 +description: "Restrict WorkSpaces Bundle options to organization approved versions" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, bundle-management, compliance] +cis_id: "2.12" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Restrict WorkSpaces Bundle options to organization approved versions (Manual) + +## Description + +Limit the existing WorkSpaces bundles that can be utilized and provisioned within your AWS account. + +## Rationale + +Limiting the type of AWS WorkSpaces bundle that can be utilized can address internal security and compliance requirements. + +## Impact + +None + +## Audit Procedure + +### Using AWS Console + +Perform the following to ensure available workspace bundles are set. + +1. Login to the WorkSpaces dashboard at https://console.aws.amazon.com/workspaces/ +2. In the left pane click WorkSpaces to access the instances listing page. +3. Check the bundle type value for each Amazon WorkSpaces instance available in the current AWS region, listed in Bundle column, e.g. +4. If the value listed in the Bundle column is not the same for all listed resources, the WorkSpaces instances were launched using the approved bundle type. +5. Change the AWS region from the navigation bar and repeat step no. 4 for all other regions. + +If the value listed in the Bundle column is not the same for all listed resources, the WorkSpaces instances were not launched using the approved bundle type, refer to the remediation procedure below. + +### Using AWS CLI + +1. Run describe-workspaces command available within the selected region: + +```bash +aws workspaces describe-workspaces \ + --region us-east-1 \ + --output table \ + --query 'Workspaces[*].WorkspaceId' +``` + +2. The command output should return a table with the requested WorkSpaces IDs: + +``` ++-------------------+ +|DescribeWorkspaces| ++-------------------+ +| ws-bbbdddeee | +| ws-aaabbbccc | +| ws-ccceeefff | ++-------------------+ +``` + +3. Run describe-workspaces command again using the name of the WorkSpaces instance as identifier and custom query filters get the ID of the bundle used by the selected instance: + +```bash +aws workspaces describe-workspaces \ + --region us-east-1 \ + --workspace-ids ws-bbbdddeee \ + --query 'Workspaces[*].BundleId' +``` + +4. The command output should return the requested WorkSpaces bundle ID: + +``` +[ "wsb-ccc333fff" ] +``` + +5. Run describe-workspace-bundles command to describe the type of the bundle utilized by the selected AWS WorkSpaces instance: + +```bash +aws workspaces describe-workspace-bundles \ + --region us-east-1 \ + --bundle-ids wsb-ccc333fff \ + --query 'Bundles[*].ComputeType.Name' +``` + +6. The command output should return the selected WorkSpaces bundle type: + +``` +[ + "PERFORMANCE" +] +``` + +7. Repeat steps no. 3 – 6 to verify the bundle type used by the rest of the AWS WorkSpaces instances created in the current region. +8. If the value listed for the Bundle is the same for all listed resources, the WorkSpaces instances were launched using the approved bundle type. +9. Repeat steps 1 – 8 to perform the entire audit process for all other AWS regions. + +If the value listed in the Bundle output is not the same for all listed resources, the WorkSpaces instances were not launched using the approved bundle type, refer to the remediation procedure below. + +### Expected Result + +All WorkSpaces instances use the same approved bundle type. + +## Remediation + +### Using AWS Console + +Preform the following to limit the bundle type. Create the required AWS support case: + +1. Login in to AWS Support Center dashboard at https://console.aws.amazon.com/support/ +2. Click Create a case. +3. For Case details: + - Type, choose `Account` + - Category, choose `Other Account Issues` + - Subject, "Limit AWS WorkSpaces instances launch to approved bundle types". + - Description textbox, explain that security and compliance requires the need to limit the provisioning of WorkSpaces instances to an approved bundle type. + - Contact options, leave as default or change as needed. +4. Click Submit + +## Default Value + +By default, there is no bundle restriction. This is a manual decision that must be made by technology stakeholders in your organization. + +## References + +1. https://aws.amazon.com/workspaces/faqs/ +2. https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-bundles.html +3. https://aws.amazon.com/workspaces/features/ +4. https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html + +## CIS Controls + +**Controls Version v8:** + +- 2.3 Address Unauthorized Software + +**Controls Version v7:** + +- 2.6 Address unapproved software + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.13/SKILL.md new file mode 100644 index 0000000000..468eb7cba3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.13/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-aws-euc-2.13 +description: "Ensure Workspaces images are not older than 90 days" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, image-management, patching] +cis_id: "2.13" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Workspaces images are not older than 90 days (Manual) + +## Description + +WorkSpaces images should not have a creation time stamp over 90 days. + +## Rationale + +WorkSpaces images require Operating system patches to be applied and updated and by confirming the creation date is not over 90 days old can help ensure that updates are being applied. + +## Impact + +None + +## Audit Procedure + +### Using AWS Console + +Perform the following to determine the age of WorkSpaces images. + +1. Login to the WorkSpaces dashboard at https://console.aws.amazon.com/workspaces/ +2. In the left pane click Images. +3. Review the Created date and confirm that all images are newer than 90 days. + +If any images are older than 90 days refer to the remediation procedure below. + +### Expected Result + +All WorkSpaces images have a creation date within the last 90 days. + +## Remediation + +### Using AWS Console + +To create a custom image: + +**Note:** If you are still connected to the WorkSpace, disconnect. + +1. Log in to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, choose WorkSpaces. +3. Select the WorkSpace and choose Actions, Create Image. + +A message displays, prompting you to restart your WorkSpace before continuing. Restarting your WorkSpace updates your Amazon WorkSpaces software to the latest version. + +Once you have restarted your WorkSpace, repeat Step 4 of this procedure. + +5. Click Next. +6. Enter an image name and a description. +7. Click Create Image. While the image is being created, the status of the WorkSpace is Suspended and the WorkSpace is unavailable. + +In the left pane, click Images. The image is complete when the status of the WorkSpace changes to Available. + +## Default Value + +By default, images can exist for indefinite time. + +## CIS Controls + +**Controls Version v8:** + +- 2.3 Address Unauthorized Software + +**Controls Version v7:** + +- 2.6 Address unapproved software + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.14/SKILL.md new file mode 100644 index 0000000000..9650a89df6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.14/SKILL.md @@ -0,0 +1,157 @@ +--- +name: cis-aws-euc-2.14 +description: "Ensure WorkSpaces that are not being utilized are removed" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, resource-management, unused-resources] +cis_id: "2.14" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure WorkSpaces that are not being utilized are removed (Automated) + +## Description + +Identify and remove any WorkSpace instances available within your AWS account that are not being utilized. + +## Rationale + +An AWS WorkSpaces instance is considered unused if has 0 (zero) known user connections registered within the past 30 days. + +## Impact + +None + +## Audit Procedure + +### Using AWS Console + +Perform the following to ensure WorkSpaces not being utilized have been removed. + +1. Log in to the WorkSpaces dashboard at https://console.aws.amazon.com/workspaces/ +2. In the left panel click WorkSpaces +3. Choose the WorkSpaces instance that you want to examine. +4. Click on WorkSpace id link. + - Verify the User Last Active attribute value is less than 30 days old +5. Repeat step 4 to verify the last user login, returned by the User Last Active attribute value, for all WorkSpaces. +6. Change the AWS region and repeat the audit process for other regions. + +If the User Last Active was registered more than 30 days ago (e.g. Feb 16, 2017 10:32:54 UTC), the selected WorkSpaces instance is not in use anymore and can be safely removed from your AWS account. Refer to the remediation procedure below. + +### Using AWS CLI + +1. Run the describe-workspaces command to list the IDs of all WorkSpaces instances available within the selected region: + +```bash +aws workspaces describe-workspaces \ + --region us-east-1 \ + --output table \ + --query 'Workspaces[*].WorkspaceId' +``` + +2. The command should return a table with the requested WorkSpaces IDs: + +``` ++-------------------+ +|DescribeWorkspaces| ++-------------------+ +| ws-7cgsl2k65 | +| ws-8d6il5kr3 | +| ws-2dtyllq47 | ++-------------------+ +``` + +3. Run the describe-workspaces-connection-status command using the ID of the WorkSpaces instance in the table output: + +```bash +aws workspaces describe-workspaces-connection-status \ + --region us-east-1 \ + --workspace-ids ws-7cgsl2k65 \ + --query \ +'WorkspacesConnectionStatus[*].LastKnownUserConnectionTimestamp' +``` + +4. The command should return the timestamp of the User last active for the selected instance: + +``` +[ + 1489139777.721 +] +``` + +5. Run the date command using the timestamp value returned at the previous step to convert it to a human readable date value: + +```bash +date -d @1489139777.721 +``` + +6. Verify the User Last Active attribute value is less than 30 days old: + +``` +Fri Mar 10 09:56:17 UTC 2017 +``` + +If the User last active date returned is more than 30 days ago, the selected WorkSpaces instance is not utilized anymore and can be safely removed from your AWS account. Refer to the remediation procedure below to remove the WorkSpaces. + +7. Repeat steps 3 – 6 to verify the User Last active date for the other WorkSpaces instances listed in the current region. +8. Change the AWS region by updating the --region command parameter value and repeat steps no. 1 – 7 to perform the entire audit process for other regions. + +### Expected Result + +All WorkSpaces instances have been accessed within the last 30 days. + +## Remediation + +### Using AWS Console + +Perform the following to remove unused WorkSpaces based on the output collected from the audit procedure. + +1. Log in to WorkSpaces dashboard at https://console.aws.amazon.com/workspaces/ +2. In the left panel click WorkSpaces +3. Select the WorkSpace ID that you have identified as not being used. +4. Click Actions, Remove WorkSpaces +5. Confirm using the Audit that this is the WorkSpaces ID you should remove. +6. Click Remove WorkSpaces + +### Using AWS CLI + +**Note that running this command does not prompt you to confirm that you are removing the correct WorkSpaces ID.** + +1. Run terminate-workspaces command using the ID of the WorkSpaces instance from the Audit that you want to delete: + +```bash +aws workspaces terminate-workspaces \ + --region us-east-1 \ + --terminate-workspace-requests ws-0cgsl1k23 +``` + +## Default Value + +By default, Workspaces are not deleted after a defined period of inactivity. + +## References + +1. https://aws.amazon.com/workspaces/faqs/ +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/workspaces/index.html#cli-aws-workspaces + +## CIS Controls + +**Controls Version v8:** + +- 1.1 Establish and Maintain Detailed Enterprise Asset Inventory +- 3.5 Securely Dispose of Data + +**Controls Version v7:** + +- 1.4 Maintain Detailed Asset Inventory +- 13.2 Remove Sensitive Data or Systems Not Regularly Accessed by Organization + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.15/SKILL.md new file mode 100644 index 0000000000..8f3c5bb932 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.15/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-euc-2.15 +description: "Ensure primary interface ports for Workspaces are not open to all inbound traffic" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, network-security, security-groups] +cis_id: "2.15" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure primary interface ports for Workspaces are not open to all inbound traffic (Automated) + +## Description + +Ensure that the inbound traffic of the primary network interface for all WorkSpaces is not open to all connections 0.0.0.0/0. + +## Rationale + +Attached security groups to the primary elastic network interface (ENI) to manage ports and network communication should not be open to all communication. They should be restricted to what is required by WorkSpaces, the Organization and other services. + +## Impact + +None + +## Audit Procedure + +### Using AWS Console + +Perform the steps below to confirm security groups are configured correctly. + +1. Login to the VPC console at https://console.aws.amazon.com/vpc/ +2. In the left pane, click Your VPCs +3. Note the VPC Id for WorkSpaces +4. In the left pane, click Security Groups +5. In the Filter security groups enter the name of the WorkSpaces VPC +6. Select the WorkSpaces Security Group +7. Click on Inbound rules +8. Confirm that there is no rule for All traffic, All, All, 0.0.0.0/0, - + +If there is a rule for Inbound traffic that is open to all traffic and all ip addresses refer to the remediation below. + +### Expected Result + +No security group rules allow unrestricted inbound access (0.0.0.0/0) to all ports. + +## Remediation + +### Using AWS Console + +Perform the steps below to remove Inbound rule that allows all traffic from all IP addresses. + +1. Login to the VPC console at https://console.aws.amazon.com/vpc/ +2. In the left pane, click Your VPCs +3. Note the VPC Id for WorkSpaces +4. In the left pane, click Security Groups +5. In the Filter security groups enter the name of the WorkSpaces VPC +6. Select the WorkSpaces Security Group +7. Click on Inbound rules +8. Click on Edit inbound rules +9. Click on Delete for the rule that shows + - All traffic, All, All, 0.0.0.0/0, - +10. Click on Save rules + +**Note:** Make sure you have all the required ports add to Inbound rules as listed in the WorkSpaces documentation outlined in the references so that connectivity to WorkSpaces is not impacted. + +## Default Value + +By default, the following open inbound ports are open: + +- Inbound TCP on port 4172. This is used for establishment of the streaming connection on the PCoIP protocol. +- Inbound UDP on port 4172. This is used for streaming user input on the PCoIP protocol. +- Inbound TCP on port 4489. This is used for access using the web client. +- Inbound TCP on port 8200. This is used for management and configuration of the WorkSpace. +- Inbound TCP on ports 8201-8250. These ports are used for establishment of the streaming connection and for streaming user input on the DCV protocol. + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-port-requirements.html#gateway_IP +2. https://aws.amazon.com/workspaces/resources/?workspaces-whats-new.sort-by=item.additionalFields.postDateTime&workspaces-whats-new.sort-order=desc +3. https://d1.awsstatic.com/whitepapers/workspaces/Best_Practices_for_Deploying_Amazon_WorkSpaces.pdf +4. https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-port-requirements.html + +## CIS Controls + +**Controls Version v8:** + +- 3.3 Configure Data Access Control Lists + +**Controls Version v7:** + +- 4.4 Implement and Manage a Firewall on Servers +- 4.5 Implement and Manage a Firewall on End-User Devices +- 12.4 Deny Communication over Unauthorized Ports +- 14.6 Protect Information through Access Control Lists + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.16/SKILL.md new file mode 100644 index 0000000000..9dc1f2cee9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.16/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-aws-euc-2.16 +description: "Ensure FIPS Endpoint encryption is enabled for WorkSpaces" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, encryption, fips, compliance] +cis_id: "2.16" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure FIPS Endpoint encryption is enabled for WorkSpaces (Manual) + +## Description + +To meet a high level of security and comply with different compliance standards, you must use Federal Information Processing Standards (FIPS) endpoint encryption at the directory level with WorkSpaces. + +## Rationale + +You must also use an AWS Region that is authorized for the same compliance standard that you are trying to achieve. + +## Impact + +None + +## Audit Procedure + +### Using AWS Console + +Perform the steps below to determine if FIPS endpoint encryption is enabled. + +1. Log in to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, click Directories. +3. Select the directory id link. +4. Scroll to the Endpoint encryption section. +5. Endpoint Encryption should read: + - FIPS 140-2 Validated Mode. + +If Endpoint Encryption is not listed as FIPS 140-2 Validated Mode refer to the remediation procedure below. + +### Expected Result + +FIPS 140-2 endpoint encryption is enabled for the WorkSpaces directory. + +## Remediation + +### Using AWS Console + +Perform the steps below to enable FIPS endpoint encryption at the directory level. + +1. Log in to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, click Directories. +3. Verify that the directory does not have any existing WorkSpaces associated with it. +4. Select the directory id link. +5. Click Actions, Update Details. +6. Scroll to the Endpoint encryption section and select Edit +7. For Endpoint Encryption, choose FIPS 140-2 Validated Mode. +8. Click Save. + +You can now create WorkSpaces from this directory that utilize FIPS endpoint encryption modules. + +## Default Value + +By default, FIPS is disabled. TLS 1.2 is the default encryption standard for AWS Workspaces. + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/fips-encryption.html +2. https://aws.amazon.com/compliance/services-in-scope/ +3. https://docs.aws.amazon.com/workspaces-web/latest/adminguide/fips-endpoints.html + +## CIS Controls + +**Controls Version v8:** + +- 3.11 Encrypt Sensitive Data at Rest + +**Controls Version v7:** + +- 14.8 Encrypt Sensitive Information at Rest + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.17/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.17/SKILL.md new file mode 100644 index 0000000000..22c2b898b3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.17/SKILL.md @@ -0,0 +1,121 @@ +--- +name: cis-aws-euc-2.17 +description: "Ensure WorkSpaces API requests flow through a VPC Endpoint" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, vpc-endpoint, network-security] +cis_id: "2.17" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure WorkSpaces API requests flow through a VPC Endpoint (Automated) + +## Description + +For any WorkSpaces API requests setup the connection through an interface endpoint in your VPC. + +## Rationale + +Utilizing a VPC interface endpoint for WorkSpaces API requests keeps the communication within the AWS network. + +## Impact + +This feature can only be used for connecting to WorkSpaces API endpoints. + +## Audit Procedure + +### Using AWS CLI + +Perform the steps to determine if WorkSpaces is using a VPC endpoint for API: + +1. Run the WorkSpaces `describe-workspace-budles` command: + +```bash +aws workspaces describe-workspace-bundles --endpoint-url +VPC_Endpoint_ID.workspaces.Region.vpce.amazonaws.com +``` + +2. Example output of that command: + +``` +--endpoint-name Endpoint_Name +--body "Endpoint_Body" +--content-type "Content_Type" +Output_File +``` + +Confirm the --endpoint-name is equal to the VPC Endpoint that you have created. If the endpoint name does not match what you created or is blank, refer to the remediation below. + +### Expected Result + +WorkSpaces API requests are routed through the configured VPC endpoint. + +## Remediation + +### Using AWS Console + +Perform the steps below if you need to create a VPC interface endpoint. + +1. Log in to the VPC console at https://console.aws.amazon.com/vpc/ +2. In the left pane, click Endpoints +3. Click Create Endpoint. +4. For Service category, ensure that AWS services is selected. +5. For Service Name, choose Workspaces. For Type, ensure that it indicates Interface. +6. Complete the following information: + - For VEC, select a VPC in which to create the endpoint. + - For Subnets, select the subnets (Availability Zones) in which to create the endpoint network interfaces. Not all Availability Zones may be supported for all AWS services. + - To enable private DNS for the interface endpoint, for Enable Private DNS Name, select the check box. + - For Security group, select the security groups to associate with the endpoint network interfaces. +7. Click Create endpoint + +### Using AWS CLI + +1. Run the create-vpc-endpoint command: + +```bash +aws ec2 create-vpc-endpoint --vpc-id vpc-ec43eb89 --vpc-endpoint-type +interface --service-name com.amazonaws.us-east-1.elasticloadbalancing -- +subnet-id subnet-abababab --security-group-id sg-1a2b3c4d +``` + +In the output that's returned, take note of the DnsName fields. You can use these DNS names to access the AWS service. + +**Next perform the steps to add the Endpoint to the WorkSpace image** + +### Using AWS CLI + +1. Run the copy-workspace-image command including the endpoint url you just created. + +```bash +aws workspaces copy-workspace-image --endpoint-url +VPC_Endpoint_ID.workspaces.Region.vpce.amazonaws.com +``` + +## Default Value + +By default, this feature is not enabled and must be configured in the VPC console. + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/infrastructure-security.html +2. https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html#create-interface-endpoint + +## CIS Controls + +**Controls Version v8:** + +- 3.13 Deploy a Data Loss Prevention Solution + +**Controls Version v7:** + +- 13.3 Monitor and Block Unauthorized Network Traffic + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.18/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.18/SKILL.md new file mode 100644 index 0000000000..b1bfe528c6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.18/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-aws-euc-2.18 +description: "Ensure Radius server is using the recommended security protocol" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, radius, mfa, authentication] +cis_id: "2.18" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Radius server is using the recommended security protocol (Automated) + +## Description + +The authentication protocol between the Microsoft AD DCs and the RADIUS server supported are PAP, CHAP, MS-CHAPv1, and MS-CHAPv2. + +## Rationale + +MS-CHAPv2 provides the strongest security of the options supported. + +## Impact + +None + +## Audit Procedure + +### Using AWS Console - For AWS Managed AD based environments + +Perform the steps to check multi-factor authentication using the radius server protocol is set to MS-CHAP v2. + +1. Log in to the Directory Service console at https://console.aws.amazon.com/directoryservicev2 +2. In the left pane select Directories. +3. Choose the directory ID link for your AWS Managed Microsoft AD directory. +4. On the Directory details page, select the Networking & security tab. +5. In the Multi-factor authentication section, confirm that the Protocol is set to MS-CHAPv2. + +### Using AWS Console - For directory connector / self-managed AD environments + +1. Log in to the AWS Workspaces console at https://console.aws.amazon.com/workspaces +2. In the left pane select Directories. +3. Select the directory ID link for your AWS Managed Microsoft AD directory. +4. On the Directories page, scroll to the Multi-factor authentication section and select Edit. +5. In the Multi-factor authentication section confirm that, in the Protocol field MS-CHAPv2 is selected from the dropdown list. + +If it is not set to MS-CHAPv2 refer to the remediation steps below. + +### Expected Result + +The RADIUS server protocol is configured to use MS-CHAPv2 for multi-factor authentication. + +## Remediation + +### Using AWS Console - For AWS Managed AD based environments + +Perform the steps below to set the protocol to MS-CHAPv2 for multi-factor authentication. + +1. Log in to the Directory Service console at https://console.aws.amazon.com/directoryservicev2 +2. In the left pane select Directories. +3. On the Directory details page, select the Networking & security tab. +4. In the Multi-factor authentication section, choose Actions, and then choose Edit. +5. On the Enable multi-factor authentication (MFA) page change the following value: +6. Protocol - MS-CHAPv2 +7. Click Save. + +### Using AWS Console - For directory connector / self-managed AD environments + +1. Log in to the AWS Workspaces console at https://console.aws.amazon.com/workspaces +2. In the left pane select Directories. +3. Select the directory ID link for your AWS Managed Microsoft AD directory. +4. On the Directories page, scroll to the Multi-factor authentication section and select Edit. +5. In the Multi-factor authentication section modify the protocol using the dropdown menu to be MS-CHAPv2 from the currently selected option. +6. Click Save once settings are as desired. + +## Default Value + +By default, this is dependent on your RADIUS server. + +## References + +1. https://aws.amazon.com/blogs/security/how-to-enable-multi-factor-authentication-for-amazon-workspaces-and-amazon-quicksight-by-using-microsoft-ad-and-on-premises-credentials/ +2. https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_mfa.html + +## CIS Controls + +**Controls Version v8:** + +- 5.6 Centralize Account Management + +**Controls Version v7:** + +- 16.2 Configure Centralized Point of Authentication + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.2/SKILL.md new file mode 100644 index 0000000000..9231a15d4b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.2/SKILL.md @@ -0,0 +1,121 @@ +--- +name: cis-aws-euc-2.2 +description: "Ensure MFA is enabled for WorkSpaces users" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, mfa, authentication, radius] +cis_id: "2.2" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-euc-2.1] +prerequisites: [] +severity_boost: {} +--- + +# Ensure MFA is enabled for WorkSpaces users (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Multi-Factor Authentication (MFA) adds an extra layer of authentication assurance beyond traditional username and password. With MFA enabled, when a user signs in to Amazon WorkSpaces, they will be prompted for their user name and password as well as for an authentication code from their physical or virtual MFA token. It is recommended that MFA be enabled for all accounts that utilize WorkSpaces. + +## Rationale + +Enabling MFA provides increased security to a username and password as it requires the user to have a virtual or physical hardware solution that displays a time-sensitive code. + +## Impact + +To enable MFA for Amazon WorkSpaces you require a RADIUS server or a plugin to a RADIUS server already in use in your environment. + +Multi-factor authentication is not available for Simple AD. + +## Audit Procedure + +### Using AWS Console + +**For AWS Managed AD Authenticated Amazon Workspaces Environments:** + +1. Identify the IP address of your **RADIUS MFA server** and your **AWS Managed Microsoft AD directory** +2. In the AWS Directory Service console navigation pane, select **Directories** +3. Choose the directory ID link for your AWS Managed Microsoft AD directory +4. On the Directories page, scroll to the **Multi-factor authentication** section +5. In the **Multi-factor authentication** section, confirm that it is **enabled** and that Radius Status is completed + +**For Self-Managed AD (with AD Connector) Amazon Workspaces Environments:** + +1. Identify the IP address and port of your **RADIUS MFA server** and your **AWS Managed Microsoft AD Connector Identifier** +2. In the AWS Workspaces console navigation pane, select **Directories** +3. Choose the **directory ID link** for your **AWS Managed Microsoft AD connector** +4. On the Directories page, select the **Actions > Update Details** +5. In the **Multi-factor authentication** section, confirm that it is enabled and that Radius Status is completed, **Enable Multi-Factor Authentication** is checked and the IP Address of your **Radius MFA server** matches that of the **RADIUS server IP address(es)** field + +If it is not enabled or the Radius status is in another state refer to the remediation steps below. + +## Remediation + +### Using AWS Console + +**For AWS Managed Microsoft AD based Workspaces Environments:** + +1. Identify the IP address of your RADIUS MFA server and your AWS Managed Microsoft AD directory +2. In the AWS Directory Service console navigation pane, select **Directories** +3. Choose the directory ID link for your AWS Managed Microsoft AD directory +4. On the Directories page, scroll to the **Multi-factor authentication** section +5. In the Multi-factor authentication section, click **Actions**, and then click **Enable** +6. On the **Enable multi-factor authentication (MFA)** page, provide the following values: + - Display label - Provide a label name + - RADIUS server DNS name or IP addresses + - Note - AWS Directory Service does not support RADIUS Challenge/Response authentication + - Port - default 1812 + - Shared secret code + - Confirm shared secret code + - Protocol - MS-CHAPv2 + - Server timeout (in seconds) - 20 + - Max RADIUS request retries - 3 +7. Click **Enable** + +**Multi-factor authentication is available when the RADIUS Status changes to Enabled.** + +**For AD Connector based Workspaces Environments:** + +1. Identify the IP address and port of your **RADIUS MFA server** and, your **AWS Managed Microsoft AD Connector Identifier** +2. In the AWS Workspaces console navigation pane, select **Directories** +3. Choose the **directory ID link** for your **AWS Managed Microsoft AD directory connector** +4. On the Directories page, scroll to the **Multi-factor authentication** section and select **Edit** +5. In the Multi-factor authentication section, select **Enable Multi-factor authentication** +6. On the Multi-Factor Authentication section, provide the following values: + - RADIUS server DNS name (s) or IP address (s) + - Port - default 1812 + - Shared secret code + - Confirm shared secret code + - Protocol - MS-CHAPv2 + - Server timeout (in seconds) - 20 + - Max RADIUS request retries - 3 +7. Click **Save** + +## Default Value + +By default, MFA is not enabled on AWS Workspaces. It requires a RADIUS server and an Active Directory environment. + +## References + +1. https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ad_connector_mfa.html +2. https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_mfa.html +3. https://aws.amazon.com/blogs/security/how-to-enable-multi-factor-authentication-for-amazon-workspaces-and-amazon-quicksight-by-using-microsoft-ad-and-on-premises-credentials/ + +## CIS Controls + +**v8:** + +- 6.3 Require MFA for Externally-Exposed Applications + - Require all externally-exposed enterprise or third-party applications to enforce MFA, where supported. Enforcing MFA through a directory service or SSO provider is a satisfactory implementation of this Safeguard. + +**v7:** + +- 16.3 Require Multi-factor Authentication + - Require multi-factor authentication for all user accounts, on all systems, whether managed onsite or by a third-party provider. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.3/SKILL.md new file mode 100644 index 0000000000..375e6311f2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.3/SKILL.md @@ -0,0 +1,155 @@ +--- +name: cis-aws-euc-2.3 +description: "Ensure WorkSpace volumes are encrypted" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, encryption, kms, data-protection] +cis_id: "2.3" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-euc-2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure WorkSpace volumes are encrypted (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Encrypt WorkSpaces root volume (C:drive for Windows and root for Amazon Linux) and user volume (D:drive for Windows and /home for Amazon Linux). + +## Rationale + +When you launch a WorkSpace, you can encrypt the root volume and the user volume. This ensures that the data stored at rest for WorkSpaces is encrypted. + +## Impact + +You must encrypt a WorkSpace when it is launched. You cannot create a custom image from an encrypted WorkSpace. You cannot disable encryption once encryption is enabled for a WorkSpace. You must enable to AWS KMS CMK prior to rebuilding/rebooting an encrypted WorkSpace or it becomes unusable. + +## Audit Procedure + +### Using AWS Console + +1. Login to the WorkSpaces dashboard at https://console.aws.amazon.com/workspaces/ +2. In the left pane click **WorkSpaces** to access the instances listing page +3. Check the storage volume(s) encryption status for each Amazon WorkSpaces instance available in the current AWS region + - It will be listed in the Volume Encryption column + +If the value listed in the Volume Encryption column is Disabled, the selected AWS WorkSpaces instance volumes are not encrypted. + +4. Change the AWS region from the navigation bar and repeat step 3 for all other regions + +### Using AWS CLI + +1. Run describe-workspaces command (OSX/Linux/UNIX) using custom query filters to list the IDs of all AWS WorkSpaces instances available within the selected region: + +```bash +aws workspaces describe-workspaces --region us-east-1 --output table --query 'Workspaces[*].WorkspaceId' +``` + +2. The command output should return a table with the requested WorkSpaces IDs: + +``` +-------------------- +|DescribeWorkspaces| ++------------------+ +| ws-aaabbbccc | +| ws-ccceeefff | ++------------------+ +``` + +3. Execute again describe-workspaces command (OSX/Linux/UNIX) using the name of the WorkSpaces instance as identifier and custom query filters to get the encryption status for both root and user storage volumes: + +```bash +aws workspaces describe-workspaces --region us-east-1 --workspace-ids ws-aaabbbccc --query 'Workspaces[*].[RootVolumeEncryptionEnabled,UserVolumeEncryptionEnabled]' +``` + +4. The command output should return the encryption status (flag) for both root and user instance volumes (true for enabled, false for disabled): + +``` +[ + [ + false, + false + ] +] +``` + +If the returned flag value for both root and user volumes is false (as shown in the output example above), the selected AWS WorkSpaces instance volumes are not encrypted. + +5. Repeat step 3 and 4 to verify the storage volumes encryption status for other AWS WorkSpaces instances provisioned in the current region +6. Change the AWS region by updating the --region command parameter value and repeat steps 1 - 5 to perform the audit process for other regions + +If the selected AWS WorkSpaces instance volumes are not encrypted, refer to the remediation procedure below. + +## Expected Result + +Both `RootVolumeEncryptionEnabled` and `UserVolumeEncryptionEnabled` should return `true`. + +## Remediation + +### Using AWS Console + +1. Login to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. Click **Launch WorkSpaces** and complete the first three steps +3. For the WorkSpaces Configuration step, do the following: + - Select the volumes to encrypt: Root Volume, User Volume, or both volumes + - For Encryption Key, select an AWS KMS CMK. The CMK that you select must be symmetric + +4. Click **Next Step** +5. Click **Launch WorkSpaces** + +**NOTE:** +To encrypt existing AWS WorkSpaces data you must re-create the necessary WorkSpaces instances with the volumes encryption feature enabled as outlined above. + +### Using AWS CLI + +1. Run the `create-workspaces` command: + +```bash +aws workspaces create-workspaces --workspaces DirectoryId='your_directoryID', +UserName='user_for_workspace', +BundleId='workspace_bundle_ID', +VolumeEncryptionKey='AWS_KMS_customer_master_key_(CMK)', +UserVolumeEncryptionEnabled='true', +RootVolumeEncryptionEnabled='true', +WorkspaceProperties={RunningMode='AUTO_STOP', +RunningModeAutoStopTimeoutInMinutes='10', RootVolumeSizeGib='root_GB', +UserVolumeSizeGib='user_GB', ComputeTypeName='STANDARD'} +``` + +2. You will receive output highlighting: + - FailedRequests - Will contain information about the WorkSpaces that could not be created, and the reason they failed + - PendingRequests - Will contain information about the WorkSpaces that were created and the command was successful + +## Default Value + +By default, AWS Workspaces utilize **Elastic Block Store (AWS EBS)** by default to encrypt data at rest (https://docs.aws.amazon.com/workspaces/latest/adminguide/data-protection.html) + +AWS Workspaces utilizes **TLS 1.2 encryption and SigV4 request signing** by default to encrypt data in transit. **DCV**, streaming and control data in-transit is encrypted using **TLS 1.3 encryption for UDP traffic** and **TLS 1.2 encryption for TCP traffic, with AES-256 ciphers**. + +For DCV, streaming and control data in-transit is encrypted using TLS 1.3 encryption for UDP traffic and TLS 1.2 encryption for TCP traffic, with AES-256 ciphers. + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/encrypt-workspaces.html +2. https://docs.aws.amazon.com/workspaces/latest/adminguide/data-protection.html +3. https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys-console.html#viewing-console-details + +## CIS Controls + +**v8:** + +- 3.11 Encrypt Sensitive Data at Rest + - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data. + +**v7:** + +- 14.8 Encrypt Sensitive Information at Rest + - Encrypt all sensitive information at rest using a tool that requires a secondary authentication mechanism not integrated into the operating system, in order to access the information. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.4/SKILL.md new file mode 100644 index 0000000000..d0945ac4c9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.4/SKILL.md @@ -0,0 +1,152 @@ +--- +name: cis-aws-euc-2.4 +description: "Ensure WorkSpaces are deployed in their own virtual private cloud (VPC)" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, vpc, network-segmentation, nat-gateway] +cis_id: "2.4" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-euc-2.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure WorkSpaces are deployed in their own virtual private cloud (VPC) (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Amazon WorkSpaces VPC should be created with two private subnets for your WorkSpaces and a NAT gateway in a public subnet. + +## Rationale + +The NAT gateway will provide WorkSpaces access to the internet for updates to the operating system and so that applications can be deployed using Amazon WorkSpaces Application Manager if that is applicable for your environment. + +## Impact + +Your VPC's subnets must be in different Availability Zones in the Region where you're launching WorkSpaces. + +## Audit Procedure + +### Using AWS Console + +Perform the following steps to confirm that a VPC exists for WorkSpaces and is configured correctly: + +1. Login to the VPC console at https://console.aws.amazon.com/vpc/ +2. In the left pane, click **Your VPC's** +3. Select the VPC for WorkSpaces +4. Confirm the IPv4 settings are using a CIDR block from the private (non-publicly routable) IP address ranges. For example, 10.0.0.0/16. For more information, see the references below +5. Confirm the IPv6 CIDR Block, set to **No** +6. Confirm the IPv4 CIDR block for the public subnet (example - WorkSpaces Public Subnet) + - Availability Zone, set to **No Preference** +7. Confirm the IPv4 CIDR block for the first private subnet (example - WorkSpaces Private Subnet 1) + - Availability Zone, set for Amazon WorkSpaces + - Elastic IP Allocation ID + - Service endpoints - `Blank` + - Enable DNS hostnames, set to `Yes` + - Hardware tenancy, Default +8. Confirm the IPv4 CIDR block for the first private subnet (example - WorkSpaces Private Subnet 2) + - Availability Zone set for Amazon WorkSpaces + - NOTE: Make sure you select a different Availability zone from the one you selected for the Workspaces Private Subnet 1 + - Elastic IP Allocation ID + - Service endpoints - Blank + - Enable DNS hostnames, set to `Yes` + - Hardware tenancy, Default + +If this is not set as referenced above refer to the remediation procedure below. + +## Remediation + +### Using AWS Console + +**Allocate an Elastic IP Address** + +1. Login in to the VPC console at https://console.aws.amazon.com/vpc/ +2. In the left pane, click **Elastic IPs** +3. Click **Allocate new address** +4. On the Allocate new address page, for IPv4 address pool, click **Amazon pool or Owned by me** +5. Click **Allocate** +6. Make a note of the Elastic IP address, click **Close** + +**Create a VPC with one public subnet and two private subnets as follows:** + +1. Login in to the VPC console at https://console.aws.amazon.com/vpc/ +2. In the left pane, click **VPC Dashboard** in the upper-left corner +3. Click **Launch VPC Wizard** +4. Click **VPC with Public and Private Subnets** +5. Click **Select** +6. Configure the VPC as follows: + - For IPv4 CIDR block, enter the CIDR block from the private (non-publicly routable) IP address ranges. For example 10.0.0.0/16 + - For IPv6 CIDR block, keep `No IPv6 CIDR Block` + - For VPC name, enter a `name for the VPC` (example: WorkspacesVPC) + - For Public subnet's IPv4 CIDR - enter a CIDR block from the private (non-publicly routable) IP address ranges. For example - 10.0.0.0/24 + - For Availability Zone, keep `No Preference` + - For Public subnet name, enter a `name for the subnet` (example: WorkSpaces Public Subnet) + - For Private subnet's IPv4 CIDR, enter the CIDR block for the subnet + - `Availability Zone` - Accept the default value = `No Preference` + - For Private subnet name, enter a `name for the subnet` (example: WorkSpaces Private Subnet 1) + - For Elastic IP Allocation ID, enter the Elastic IP address that you created + - For Service endpoints, `do nothing` + - For Enable DNS hostnames, keep `Yes` + - For Hardware tenancy, keep `Default` + +7. Click Create VPC. Note that it takes several minutes to set up your VPC. After the VPC is created +8. Click **OK** + +**Create a Second Private Subnet** + +1. In the left pane, click **Subnets** +2. Click **Create Subnet** + - For Name tag, enter a `name for the private subnet` (example: WorkSpaces Private Subnet 2) + - For VPC, `select the VPC` that you created + - For Availability Zone. Make sure you select a different Availability Zone from the one you used in WorkSpaces Private Subnet 1 + - For IPv4 CIDR block, enter the CIDR block for the subnet +3. Click **Create** + +**Verify and Name the Route Tables for Public** + +1. In the left pane, click **Subnets** +2. Click the **public** subnet that you created. (example: WorkSpaces Public Subnet) +3. On the Route Table tab, choose the ID of the route table (example: rtb-12345678) +4. Click the route table +5. Under Name, choose the edit icon, **enter a name** (example: workspaces-public-routetable) +6. Click the check mark to save the name + +**Verify and Name the Route Tables for Private** + +1. In the left pane, click **Subnets** +2. Click the **private subnet 1** that you created. (example: WorkSpaces Private Subnet 1) +3. On the Route Table tab, choose the ID of the route table (example: rtb-12345678) +4. Click the route table +5. Under Name, choose the edit icon, **enter a name** (example: workspaces-private-routetable) +6. Click the check mark to save the name +7. On the Routes tab, verify that there is one route for local traffic and another route that sends all other traffic to the internet gateway for the VPC +8. Repeat steps 1-7 under **Verify and Name the Route Tables for Private** `for` WorkSpaces Private Subnet 2' + +## Default Value + +By default, AWS Workspaces does not create its own VPC. A VPC must be created to run an AWS Workspace environment. + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-vpc.html +2. https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#vpc-sizing-ipv4 +3. https://docs.aws.amazon.com/workspaces/latest/adminguide/azs-workspaces.html + +## CIS Controls + +**v8:** + +- 3.12 Segment Data Processing and Storage Based on Sensitivity + - Segment data processing and storage based on the sensitivity of the data. Do not process sensitive data on enterprise assets intended for lower sensitivity data. + +**v7:** + +- 14.1 Segment the Network Based on Sensitivity + - Segment the network based on the label or classification level of the information stored on the servers, locate all sensitive information on separated Virtual Local Area Networks (VLANs). diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.5/SKILL.md new file mode 100644 index 0000000000..e94303f9a4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.5/SKILL.md @@ -0,0 +1,116 @@ +--- +name: cis-aws-euc-2.5 +description: "Ensure WorkSpaces traffic is controlled and routed through a NAT Gateway" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, nat-gateway, routing, network-traffic] +cis_id: "2.5" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-euc-2.4, cis-aws-euc-2.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure WorkSpaces traffic is controlled and routed through a NAT Gateway (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +A network address translation (NAT) gateway enables instances in a private subnet to connect to the internet or other AWS services, but prevents the internet from initiating a direct connection with those instances. + +## Rationale + +WorkSpaces must have access to the internet so that you can install updates to the operating system and deploy applications. + +## Impact + +None specified in the benchmark. + +## Audit Procedure + +### Using AWS Console + +Perform the following steps to verify a NAT Gateway is configured and utilized: + +1. Login to the VPC console at https://console.aws.amazon.com/vpc/ +2. In the left pane, click **Route Tables** +3. On the Route Table tab +4. Select the public route table set for WorkSpaces +5. Click the **Subnet Associations** Tab +6. Confirm that the Subnet ID is set to the WorkSpaces Public subnet +7. De-select the public route table and select the WorkSpaces Private route table +8. Click the **Subnet Associations** Tab +9. Confirm that the Subnet ID is set to the 2 WorkSpaces Private subnet + +If the Route tables aren't set for one route for local traffic and another route that sends all other traffic to the internet gateway for the VPC refer to the remediation procedure below. + +## Remediation + +### Using AWS Console + +Perform the following steps to create a NAT gateway: + +1. Login to the VPC console at https://console.aws.amazon.com/vpc/ +2. In the left pane, click **NAT Gateways** +3. Click **Create NAT Gateway** +4. For NAT Gateway settings: + - Name - although optional use something to identify it with WorkSpaces + - Specify the subnet in which to create the NAT gateway + - Select the Elastic IP Allocation ID + +5. Click **Create a NAT Gateway** + +The NAT gateway will display in the console and after a few moments, its status will change to Available. + +If the NAT gateway goes to a status of Failed, there was an error during creation. + +After you've created your NAT gateway, you must update your route tables for your private subnets to point internet traffic to the NAT gateway. + +**To create a route for a NAT gateway:** + +1. Log in to the VPC console at https://console.aws.amazon.com/vpc/ +2. In the left pane, Click **Route Tables** +3. Select the route table associated with your private subnet +4. Click **Routes** tab +5. Click **Edit routes** +6. Click **Add route** +7. For Edit routes: + - Destination, enter 0.0.0.0/0 + - Target, select the ID of your NAT gateway + +8. Click **Save routes** + +## Default Value + +By default, No NAT Gateways are created for a VPC. + +## References + +1. https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html +2. https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-vpc.html + +## Additional Information + +**Note:** In some multi-account AWS architectures organizations may choose to leverage a centralized internet egress pattern. This could be due to appliances running in the centralized pattern which are being used to enforce controls and could include DLP or category filtering on internet egress traffic. In this case the relevant audit procedure is ensuring the workspaces VPC has a route to the internet (either via proxy server configuration on the workspace instances themselves or the default route on the workspace instance VPC subnet) + +## CIS Controls + +**v8:** + +- 3.12 Segment Data Processing and Storage Based on Sensitivity + - Segment data processing and storage based on the sensitivity of the data. Do not process sensitive data on enterprise assets intended for lower sensitivity data. +- 13.4 Perform Traffic Filtering Between Network Segments + - Perform traffic filtering between network segments, where appropriate. + +**v7:** + +- 14.1 Segment the Network Based on Sensitivity + - Segment the network based on the label or classification level of the information stored on the servers, locate all sensitive information on separated Virtual Local Area Networks (VLANs). +- 14.2 Enable Firewall Filtering Between VLANs + - Enable firewall filtering between VLANs to ensure that only authorized systems are able to communicate with other systems necessary to fulfill their specific responsibilities. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.6/SKILL.md new file mode 100644 index 0000000000..a95e1c2967 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.6/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-aws-euc-2.6 +description: "Ensure Web Access to Workspaces is Disabled" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, web-access, access-control] +cis_id: "2.6" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-euc-2.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Web Access to Workspaces is Disabled (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +WorkSpaces access should be restricted to trusted operating systems and clients. + +## Rationale + +WorkSpaces access is supported from a variety of clients and operating systems, including HTML5 based browsers. Disabling Web Access prevents access to the Workspace from HTML5 based browsers, ensuring access can only occur from known operating systems. + +## Impact + +None specified in the benchmark. + +## Audit Procedure + +### Using AWS Console + +Perform the following steps to confirm that Web Access is disabled: + +1. Log in to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, click **Directories** +3. Select the directory id link you wish to view +4. Scroll to the **Other platforms** section +5. Confirm that **Web Access** is denied + +If everything is not configured as above refer to the remediation below. + +## Remediation + +### Using AWS Console + +Perform the following steps to disable Web Access: + +1. Log in to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, click **Directories** +3. Select the directory id link +4. Scroll to the **Other platforms** section +5. Uncheck **Web Access** +6. Click **Save** + +## Default Value + +By default, web access is disabled. + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/web-access.html + +## CIS Controls + +**v8:** + +- 13.5 Manage Access Control for Remote Assets + - Manage access control for assets remotely connecting to enterprise resources. Determine amount of access to enterprise resources based on: up-to-date anti-malware software installed, configuration compliance with the enterprise's secure configuration process, and ensuring the operating system and applications are up-to-date. + +**v7:** + +- 12.12 Manage All Devices Remotely Logging into Internal Network + - Scan all enterprise devices remotely logging into the organization's network prior to accessing the network to ensure that each of the organization's security policies has been enforced in the same manner as local network devices. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.7/SKILL.md new file mode 100644 index 0000000000..22a5c45e45 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.7/SKILL.md @@ -0,0 +1,124 @@ +--- +name: cis-aws-euc-2.7 +description: "Ensure access is limited to trusted devices" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, trusted-devices, certificate-authentication, device-trust] +cis_id: "2.7" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-euc-2.6, cis-aws-euc-2.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure access is limited to trusted devices (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +WorkSpaces access should be restricted to trusted devices with valid certificates. + +## Rationale + +WorkSpaces is accessible from any supported device that is connected to the internet. When you enable access to trusted devices, Amazon WorkSpaces uses certificate-based authentication to determine whether a device is trusted. + +## Impact + +For each directory, you can import up to two root certificates and Amazon WorkSpaces will present them both to the client. + +**Note:** Certificates for trusted devices only applies to the Amazon WorkSpaces OS clients. This feature does not apply to the Amazon WorkSpaces Web Access client, or any third-party clients. + +## Audit Procedure + +### Using AWS Console + +Perform the following steps to confirm that Allow Trusted Devices is set: + +1. Log in to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, click **Directories** +3. Select the directory id link +4. Scroll to the **Access Control Options** section +5. Confirm that the correct **Allow** settings are in place +6. Confirm that certificates have been imported +7. Confirm that the correct device types have been enabled + +If everything is not configured as above refer to the remediation below. + +## Remediation + +### Using AWS Console + +Perform the following steps to set the restriction Allow Trusted Devices: + +**Create the Certificates** + +**Note:** It requires root certificates generated by an internal Certificate Authority (CA) and client certificates that chain up to a root certificate. + +Requirements: + +- Certificates must be Base64-encoded certificate files in CRT, CERT, or PEM format +- Certificates must include a Common Name +- The maximum length of certificate chain supported is 4 +- Use a strong encryption algorithm. Minimum ECDSA-2 with RSA, SHA256 with ECDSA. Other options SHA381 with ECDSA, or SHA512 with ECDSA +- Make sure "key usage: Digital signature" is present on the public key +- For macOS, if the device certificate is in the system keychain, authorize the WorkSpaces client application to access those certificates + +**Deploy Client Certificates to the Trusted Devices** + +- Client certificates must be installed on the trusted devices for your users +- Utilize a third party tool to install the certificates or have the certificates installed locally by an administrator +- On Windows, the WorkSpaces client application searches for client certificates in both the user and root certificate stores +- On macOS, the WorkSpaces client application searches for client certificates in the entire keychain + +**Configure the Restriction** + +1. Login to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, click **Directories** +3. Select the directory id link +4. Scroll to the **Access Control Options** section and click **Edit** + +``` +[Windows] Choose Only Allow Trusted Windows Devices to Access WorkSpaces. +[macOS] Choose Only Allow Trusted macOS Devices to Access WorkSpaces. +``` + +5. Import up to two root certificates. For each root certificate, do the following: + - Choose Import + - Copy the body of the certificate to the form + - Choose Import + - (Optional) Specify whether other types of devices have access to WorkSpaces + +6. Scroll down to the **Trusted devices** section +7. Select the device types allowed to **Trusted devices** +8. To block access from all selected device types, click **Deny All** +9. Click **Save** + +## Default Value + +By default, users can access their WorkSpaces from any supported device that is connected to the internet. + +https://docs.aws.amazon.com/workspaces/latest/adminguide/trusted-devices.html + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/trusted-devices.html +2. https://docs.aws.amazon.com/acm/latest/userguide/gs.html +3. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html + +## CIS Controls + +**v8:** + +- 3.3 Configure Data Access Control Lists + - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. + +**v7:** + +- 14.6 Protect Information through Access Control Lists + - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.8/SKILL.md new file mode 100644 index 0000000000..77470ee0eb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.8/SKILL.md @@ -0,0 +1,135 @@ +--- +name: cis-aws-euc-2.8 +description: "Ensure the default IP access control group is disassociated" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, ip-access-control, firewall, network-security] +cis_id: "2.8" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-euc-2.7, cis-aws-euc-2.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure the default IP access control group is disassociated (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +The default IP Access Control group allows all traffic. Once you create and attach an IP Access Control Group the default is disassociated. + +## Rationale + +IP Access Control group acts as a virtual firewall for your WorkSpaces allowing you to add your trusted networks. + +## Impact + +IP access control groups do not allow the use of dynamic IP addresses when using a NAT gateway and additional configuration has to be considered. + +## Audit Procedure + +### Using AWS Console + +Perform the following steps to review your Directory: + +1. Login to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, click **Directories** +3. Select your directory id link +4. Scroll to the **IP access control groups** section and click **Edit** +5. Confirm that you have an IP Access Control Group Associated with this Directory +6. Make note of the **name(s)** of the IP Access Control Group +7. Next review the IP Access Control Group +8. In the navigation pane, click **IP Access Controls** +9. Select the name of the **IP Access Control Group(s)** you record from the Directory +10. For each IP Access Control Group confirm the source IP address or IP address range, and the Description + +If an IP Access Control group doesn't exist follow the remediation below. + +### Using AWS CLI + +Run the `describe-ip-groups` command: + +```bash +aws workspaces describe-ip-groups +``` + +Review the output for the name and the IP Access controls. + +If an IP Access Control group doesn't exist refer to the remediation below. + +## Remediation + +### Using AWS Console + +Perform the steps below to create an IP Access control group: + +1. Login to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, Click **IP Access Controls** +3. Click **Create IP Group** +4. In the **Create IP Group** dialog box, enter a name and description for the group +5. Click **Create** +6. Select the group +7. Click **Edit** +8. For each IP address, click **Add Rule** +9. For Source, enter the IP address or IP address range +10. For Description, enter a description + +When you are done adding rules, + +11. Click **Save** + +**Next Associate an IP Access Control Group with a Directory** + +1. Login to the WorkSpaces console at https://console.aws.amazon.com/workspaces/ +2. In the left pane, click **Directories** +3. Select the directory id link +4. Scroll to the **IP access control groups** section and click **Edit** +5. Select the IP access control group and click **Associate** + +**Note:** If you associate an IP access control group that has no rules with a directory, this blocks all access to all WorkSpaces. + +### Using AWS CLI + +Run the `create-ip-group` command: + +```bash +aws workspaces create-ip-group --group-name name-of-group --user-rules ipRule=ipaddress_list +``` + +Associate an IP Access Control Group with a Directory + +Run the 'associate-ip-groups' command: + +```bash +aws workspaces associate-ip-groups --directory-id directory_ID --group-ids IDs_of_IP_access_ctrl_group +``` + +## Default Value + +By default, this default group includes a default rule that allows users to access their WorkSpaces from anywhere. You cannot modify the default IP access control group for your directory. If you don't associate an IP access control group with your directory, the default group is used. If you associate an IP access control group with a directory, the default IP access control group is disassociated. + +https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-ip-access-control-groups.html + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-ip-access-control-groups.html +2. https://docs.aws.amazon.com/cli/latest/reference/workspaces/create-ip-group.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/workspaces/index.html#cli-aws-workspaces + +## CIS Controls + +**v8:** + +- 3.3 Configure Data Access Control Lists + - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. + +**v7:** + +- 14.6 Protect Information through Access Control Lists + - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.9/SKILL.md new file mode 100644 index 0000000000..fc7b40898e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-2.9/SKILL.md @@ -0,0 +1,130 @@ +--- +name: cis-aws-euc-2.9 +description: "Ensure CloudWatch is set up for WorkSpaces" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces, cloudwatch, monitoring, logging] +cis_id: "2.9" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-euc-2.8, cis-aws-euc-2.10] +prerequisites: [] +severity_boost: {} +--- + +# Ensure CloudWatch is set up for WorkSpaces (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Set up and utilize Amazon CloudWatch Events for successful logins to WorkSpaces. + +## Rationale + +Use Cloudwatch to store/archive WorkSpaces login events for future reference, analysis, and action based on the patterns. Utilize the IP address collected to figure out where users are logged in from, and then build policies to allow access only to files or data from those WorkSpaces that meet company access criteria. With this information you can also use policy controls to block access from unauthorized IP addresses. + +## Impact + +None specified in the benchmark. + +## Audit Procedure + +### Using AWS Console + +Perform the following steps to review the rules for CloudWatch and WorkSpaces Events: + +1. Login to the CloudWatch console at https://console.aws.amazon.com/cloudwatch/ +2. In the left pane click **Rules** +3. Click **Rules** +4. Click on the Rule Name for your WorkSpaces Access Events +5. Confirm the **Event Pattern**: + +```json +{ + "source": ["aws.workspaces"], + "detail-type": ["WorkSpaces Access"] +} +``` + +6. Confirm Status is **Enabled** +7. Confirm at least one Target is created for **CloudWatch Log Group** + +If there is no CloudWatch Event created with the rule as outlined above refer to the remediation below. + +## Remediation + +### Using AWS Console + +Perform the following steps to create a Rule for CloudWatch WorkSpaces Events: + +1. Login to the CloudWatch console at https://console.aws.amazon.com/cloudwatch/ +2. In the left pane click **Rules** +3. Click **Create rule** +4. For Event Source, do the following: + +``` +- Click `Event Pattern` and Build event pattern to match events by service (the default). +``` + +5. For Service Name, click **WorkSpaces** +6. For Event Type, click **WorkSpaces Access** +7. For Targets, click **Add target** + +``` +- Click and Change the Lambda Function to `CloudWatch log group` +``` + +8. For Log Group, enter /aws/events/workspaces_access + +**Note:** You can add additional targets for other services to act when a WorkSpaces Access event is detected. + +9. Click **Configure details** +10. For Rule definition, **enter a name and description** +11. Click `Create rule` +12. Click **Create rule** + +## Default Value + +By default, The CloudWatch dashboard is automatically created when you use your AWS account to configure your WorkSpaces. + +The dashboard consists of the following features: View historical data using time and date range controls. + +Add customized dashboard view to the CloudWatch custom dashboards. + +Monitor the overall health and utilization status of your WorkSpaces by doing the following: + +- View the total number of provisioned WorkSpaces, number of users connected, number of unhealthy and healthy WorkSpace instances +- View unhealthy WorkSpaces and their different variables, such as protocol and compute mode +- Hover over the line chart to view the number of healthy or unhealthy WorkSpace instances for a specific protocol and running mode over a period of time +- Choose the ellipsis menu, then choose View in metrics to view the metrics on a time scale chart +- View your connection metrics and their different variables, such as number of connection attempts, successful connections, and failed connections in your WorkSpaces environment at any given time +- View InSession latencies that impact your user's experience, such as round trip time (RTT), to determine connection health and packet loss to monitor network health +- View host performance and resource utilization to identify and troubleshoot potential performance issues + +https://docs.aws.amazon.com/workspaces/latest/adminguide/cloudwatch-dashboard.html + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-monitoring.html +2. https://docs.aws.amazon.com/workspaces/latest/adminguide/cloudwatch-events.html + +## CIS Controls + +**v8:** + +- 8.2 Collect Audit Logs + - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. +- 8.9 Centralize Audit Logs + - Centralize, to the extent possible, audit log collection and retention across enterprise assets. + +**v7:** + +- 6.2 Activate audit logging + - Ensure that local logging has been enabled on all systems and networking devices. +- 6.5 Central Log Management + - Ensure that appropriate logs are being aggregated to a central log management system for analysis and review. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-3.1/SKILL.md new file mode 100644 index 0000000000..73282f3524 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-3.1/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-euc-3.1 +description: "Ensure User Access Logging is enabled" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workspaces-web, logging, audit] +cis_id: "3.1" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure User Access Logging is enabled (Manual) + +## Description + +User Access Logging can record the following user events: + +- Session Start - when a WorkSpaces Web sessions begins. +- Session End - when a WorkSpaces Web session ends. +- URL Navigation - when a user loads a URL. + +User Access logging can be setup to record user events. + +## Rationale + +Logging user activity will assist in event correlation if response to an incident is needed. + +## Impact + +None + +## Audit Procedure + +### Using AWS Console + +1. Log in to the WorkSpaces console at https://console.aws.amazon.com/workspaces-web/ +2. In the left pane, click Web portals. +3. Click the link for correspoinidng web portal. +4. Scroll to the User access logging section +5. Verify the Kinesis data stream arn is set. + +If no Kinesis data streams are listed are defined then user access logging is not enabled. + +### Using AWS CLI + +1. From the command line run the list-user-access-logging-settings: + +```bash +aws workspaces-web list-user-access-logging-settings --output table +``` + +2. The command should output a table with the listed settings. + +If no settings are defined then user access logging is not enabled. + +### Expected Result + +A Kinesis data stream is configured for user access logging. + +## Remediation + +### Using AWS Console + +1. Log in to the Amazon Kinesis console at https://console.aws.amazon.com/kinesis/home +2. In the left pane, click Data Streams then Create data stream. +3. Enter a name for your data stream. The name must be prefixed with amazon-workspaces-web +4. Select the desired data stream capacity and click Create data stream +5. Log into the Amazon WorkSpaces console at https://console.aws.amazon.com/workspaces/v2/home +6. In the left pane click Web Portals +7. Click the link for the web portal you wish to edit. +8. Click Edit +9. Scroll to User access logging and select the Kinesis data stream you created above. +10. Click Save + +### Using AWS CLI + +1. Run the create-user-access-logging-settings command: + +```bash +aws workspaces-web create-user-access-logging-settings --kinesis-stream-arn +. --output table +``` + +2. The output will return a list of settings + +## Default Value + +By default, user access logging is not enabled. + +## References + +1. https://docs.aws.amazon.com/workspaces-web/latest/adminguide/data-protection-logging.html + +## CIS Controls + +This control does not have explicit CIS Controls mappings in the PDF. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.1/SKILL.md new file mode 100644 index 0000000000..4573e66351 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.1/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-aws-euc-4.1 +description: "Ensure Administrators of WorkDocs is defined using IAM" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workdocs, iam, access-control] +cis_id: "4.1" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Administrators of WorkDocs is defined using IAM (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Administration of AWS WorkDocs should be defined using AWS Identity and Access Management (IAM). + +## Rationale + +By default, IAM users and roles don't have permission to create or modify Amazon WorkDocs resources. Using IAM to manage WorkDocs administrators ensures proper access control and follows the principle of least privilege. + +## Impact + +None - this is a security best practice. + +## Audit Procedure + +### Using AWS Console + +1. Log in to the IAM console at `https://console.aws.amazon.com/iam/` +2. In the left pane, click **Groups** and then click **Create New Group** +3. In the Group Name box, type the name of the group and then click **Next Step** +4. In the list of policies, select the check box for **AmazonWorkDocsFullAccess** +5. Click **Next Step** +6. Click **Create Group** + +Add users to the Amazon WorkDocs Full Access group: + +1. Log in to the IAM console at `https://console.aws.amazon.com/iam/` +2. In the left pane, click **Groups** +3. Select the group you created above +4. Click **Add Users To Group** +5. Select the users to be added to the group +6. Click **Add Users** + +### Using AWS CLI + +Not applicable for this control - must be configured via Console. + +## Expected Result + +IAM group with AmazonWorkDocsFullAccess policy exists and WorkDocs administrators are members of this group. + +## Remediation + +### Using AWS Console + +Perform the following to create an IAM group and assign the Amazon WorkDocs Full Access policy to it: + +1. Log in to the IAM console at `https://console.aws.amazon.com/iam/` +2. In the left pane, click **Groups** and then click **Create New Group** +3. In the Group Name box, type the name of the group and then click **Next Step** +4. In the list of policies, select the check box for **AmazonWorkDocsFullAccess** +5. Click **Next Step** +6. Click **Create Group** + +Perform the following to add a user to a Amazon WorkDocs Full Access group: + +1. Log in to the IAM console at `https://console.aws.amazon.com/iam/` +2. In the left pane, click **Groups** +3. Select the group you created above +4. Click **Add Users To Group** +5. Select the users to be added to the group +6. Click **Add Users** + +### Using AWS CLI + +Not applicable - must be configured via Console. + +## Default Value + +By default, IAM users and roles don't have permission to create or modify Amazon WorkDocs resources. + +## References + +1. https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-access-control.html +2. https://docs.aws.amazon.com/workspaces/latest/adminguide/manage-workspaces-users.html +3. https://docs.aws.amazon.com/workdocs/latest/adminguide/security_iam_id-based-policy-examples.html + +## CIS Controls + +**v8:** + +- 5.1 Establish and Maintain an Inventory of Accounts + - Establish and maintain an inventory of all accounts managed in the enterprise. The inventory must include both user and administrator accounts. The inventory, at a minimum, should contain the person's name, username, start/stop dates, and department. Validate that all active accounts are authorized, on a recurring schedule at a minimum quarterly, or more frequently. + +**v7:** + +- 4.1 Maintain Inventory of Administrative Accounts + - Use automated tools to inventory all administrative accounts, including domain and local accounts, to ensure that only authorized individuals have elevated privileges. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.2/SKILL.md new file mode 100644 index 0000000000..4c356f1cce --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.2/SKILL.md @@ -0,0 +1,181 @@ +--- +name: cis-aws-euc-4.2 +description: "Ensure MFA is enabled for WorkDoc users" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workdocs, mfa, authentication] +cis_id: "4.2" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [CWE-308] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure MFA is enabled for WorkDoc users (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Multi-Factor Authentication (MFA) adds an extra layer of authentication assurance beyond traditional username and password. With MFA enabled, when a user signs in to Amazon WorkDocs, they will be prompted for their user name and password as well as for an authentication code from their MFA token. + +## Rationale + +Enabling MFA provides increased security to a user name and password as it requires the user to possess a solution that displays a time-sensitive authentication code. + +## Impact + +To enable MFA for Amazon WorkDocs you require a RADIUS server or a plugin to a RADIUS server already implemented in your environment. + +Multi-factor authentication is not available for Simple AD. + +You can enable multi-factor authentication for AD Connector if you have Active Directory running on-premises or in EC2 instances. + +## Audit Procedure + +Perform the steps below to confirm MFA setup and configuration. + +### Using AWS Console + +1. Log in to the Directory Service console at `https://console.aws.amazon.com/directoryservicev2` +2. Select **Directories** +3. Choose the directory ID link for your AWS Managed Microsoft AD directory +4. On the Directory details page, select the **Networking & security tab** +5. In the Multi-factor authentication section, Confirm Radius status is set to **Enabled** +6. Open the WorkDocs console at `https://console.aws.amazon.com/zocalo/` +7. In the Manage Your WorkDocs Sites page, select the desired site and choose **Actions** and **Manage MFA** +8. Confirm the values are set correctly + +Multi-factor authentication is available when the RADIUS Status reads Enabled. + +### Using AWS CLI + +1. Run describe-directories command to list the identifiers of all the Active Directory (AD) Connector directories, available in the selected AWS region: + +```bash +aws ds describe-directories \ + --region us-east-1 \ + --output table \ + --query 'DirectoryDescriptions[*].DirectoryId' +``` + +2. The command output should return a table with the requested resource IDs: + +``` +-------------------- +|DescribeDirectories| ++------------------+ +| d-12345abcde | +| d-abcd012345 | +| d-aabbcc1234 | ++------------------+ +``` + +3. Run describe-directories command using the ID of the AD Connector directory to get the status of the RADIUS MFA server connection: + +```bash +aws ds describe-directories \ + --region us-east-1 \ + --directory-ids d-12345abcde \ + --query 'DirectoryDescriptions[*].RadiusStatus' +``` + +4. The command output should return the requested status information: + +``` +[] +``` + +5. Repeat steps 3 and 4 to determine the MFA status for other AD Connector directories +6. Change the AWS region by updating the --region command parameter value and repeat steps 1 – 5 to perform the audit process for other regions + +If describe-directories command output returns an empty array, as shown in the example above, there is no RADIUS MFA server configured for the selected AD Directory, therefore the resource does not have Multi-Factor Authentication (MFA) protection enabled. Refer to the remediation below. + +## Expected Result + +RADIUS MFA is enabled for WorkDocs directories in Directory Service, and WorkDocs sites have MFA configured. + +## Remediation + +### Using AWS Console + +Perform the following steps to setup MFA on the server and in WorkDocs: + +1. Identify the IP address of your RADIUS MFA server and your AWS Managed Microsoft AD directory +2. In the AWS Directory Service console navigation pane, select **Directories** +3. Choose the directory ID link for your AWS Managed Microsoft AD directory +4. On the Directory details page, select the **Networking & security tab** +5. In the Multi-factor authentication section, choose **Actions**, and then choose **Enable** +6. On the Enable multi-factor authentication (MFA) page, provide the following values: + - Display label - Provide a label name + - RADIUS server DNS name or IP addresses + - Port - default 1812 + - Shared secret code + - Confirm shared secret code + - Protocol - MS-CHAPv2 + - Server timeout - (in seconds) - 20 + - Max retries - 3 + +**To enable multi-factor authentication in WorkDocs:** + +1. Open WorkDocs console at `https://console.aws.amazon.com/zocalo/` +2. In the Manage Your WorkDocs Sites page, select the desired site and choose **Actions** and **Manage MFA** +3. Enter the following values: + - Enable Multi-Factor Authentication + - Check to enable multi-factor authentication + - RADIUS server IP address(es) - The IP addresses of your RADIUS server endpoints + - Port - The port that your RADIUS server is using for communications. Default RADIUS server port (1812) + - Shared secret code - The shared secret code that was specified when your RADIUS endpoints were created + - Confirm shared secret code + - Protocol - MS-CHAPv2 + - Server timeout - (in seconds) - 20 + - Max retries - 3 +4. Choose **Enable** + +### Using AWS CLI + +Multi-factor authentication is available when the RADIUS Status changes to Enabled. To enable RADIUS-based MFA protection for your Active Directory (AD) Connector directories, perform the following actions: + +**Note:** Enabling Multi-Factor authentication for AD Connector directories using the AWS Management Console is not currently supported. + +1. Run the enable-radius command: + +```bash +aws ds enable-radius \ + --region us-east-1 \ + --directory-id \ + --radius-settings { "RadiusServers": [".com"],"RadiusPort": 1812,"RadiusTimeout": 20,"RadiusRetries": 3,"SharedSecret": "radiusmfa","AuthenticationProtocol": "MS-CHAPv2","DisplayLabel": "RADIUS Multi-Factor Authentication","UseSameUsername": true } +``` + +2. Repeat step 1 for other AD Connectors and the Selected regions + +## Default Value + +By default, MFA is not enabled in AWS Workdocs. + +## References + +1. https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ad_connector_mfa.html +2. https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_mfa.html +3. https://aws.amazon.com/blogs/security/how-to-enable-multi-factor-authentication-for-amazon-workspaces-and-amazon-quicksight-by-using-microsoft-ad-and-on-premises-credentials/ + +## CIS Controls + +**v8:** + +- 6.3 Require MFA for Externally-Exposed Applications + - Require all externally-exposed enterprise or third-party applications to enforce MFA, where supported. Enforcing MFA through a directory service or SSO provider is a satisfactory implementation of this Safeguard. + +**v7:** + +- 16.3 Require Multi-factor Authentication + - Require multi-factor authentication for all user accounts, on all systems, whether managed onsite or by a third-party provider. + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.3/SKILL.md new file mode 100644 index 0000000000..3d589a836d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.3/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-aws-euc-4.3 +description: "Ensure Workdocs access is limited to a range of allowable IP addresses" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workdocs, network-security, ip-filtering] +cis_id: "4.3" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [CWE-284] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Workdocs access is limited to a range of allowable IP addresses (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Access to WorkDocs can be limited to an allowed range of IP addresses. + +## Rationale + +Using IP address allow lists, you define and permit access to your WorkDocs site from trusted networks. + +## Impact + +IP Lists currently only work for IPv4 addresses and denying access through an IP list is not supported. + +## Audit Procedure + +Perform these steps to review the list of IP addresses allowed to access WorkDocs. + +### Using AWS Console + +1. Log into the AWS console +2. Navigate to WorkDocs or go to WorkDocs Console at `https://console.aws.amazon.com/zocalo/` +3. Under My Account, choose **Open admin control panel** +4. For IP Allow List, choose **Change** +5. Review the IP address ranges and any single IP addresses +6. Click **Cancel** + +If the IP address ranges do not match trusted networks refer to the remediation below to create or edit the IP Allow list. + +### Using AWS CLI + +Not applicable - must be audited via Console. + +## Expected Result + +IP Allow List is configured with trusted IP ranges only. + +## Remediation + +### Using AWS Console + +Perform the steps below to create or edit the IP Allow list for WorkDocs: + +1. Log into the AWS console +2. Navigate to WorkDocs or go to WorkDocs Console at `https://console.aws.amazon.com/zocalo/` +3. Under My Account, choose **Open admin control panel** +4. For IP Allow List, choose **Change** +5. For Enter CIDR value, enter the IP address ranges to **allowlist**. To allow access from a single IP address, specify /32 as the CIDR prefix +6. Click **Add** +7. Click **Save Changes** + +### Using AWS CLI + +Not applicable - must be configured via Console. + +## Default Value + +By default, no IP addresses are allowed. + +## References + +1. https://docs.aws.amazon.com/workdocs/latest/adminguide/prereqs.html +2. https://aws.amazon.com/about-aws/whats-new/2018/10/amazon-workdocs-control-ip-address-access/ +3. https://docs.aws.amazon.com/workdocs/latest/adminguide/workdocs-ag.pdf +4. https://docs.aws.amazon.com/workdocs/latest/adminguide/manage-sites.html + +## CIS Controls + +**v8:** + +- 3.3 Configure Data Access Control Lists + - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. + +**v7:** + +- 14.6 Protect Information through Access Control Lists + - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.4/SKILL.md new file mode 100644 index 0000000000..b8fe28e172 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.4/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-aws-euc-4.4 +description: "Utilize site wide activity feed for monitoring" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workdocs, monitoring, logging, audit] +cis_id: "4.4" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Utilize site wide activity feed for monitoring (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Admins can view and export the activity feed for an entire WorkDocs site. + +## Rationale + +WorkDoc admins should monitor and export activity feeds for the site as record of activity. These activity reports should be reviewed every month for any abnormalities and rotated every 90 days. + +## Impact + +To use this feature, you must first install the Amazon WorkDocs Companion. + +## Audit Procedure + +Perform the steps below to view site-wide activity feed. + +### Using WorkDocs Web Application + +1. Click **Activity feed** +2. Click Filter, then Click **Site-wide activity** +3. Select Activity Type filters and choose **Date Modified** settings as needed, then click **Apply** +4. When the filtered activity feed results appear, search by file, folder, or user name to narrow your results. You can also add or remove filters as needed + +### Using AWS Console + +Not applicable - must be accessed via WorkDocs web application. + +## Expected Result + +Site-wide activity feed is being monitored and exported regularly. + +## Remediation + +### Using WorkDocs Web Application + +Perform the following steps to Export site-wide activity feed: + +1. Click **Activity feed** +2. Click Filter, then Click **Site-wide activity** +3. Select Activity Type filters and choose **Date Modified** settings as needed, then click **Apply** +4. When the filtered activity feed results appear, search by file, folder, or user name to narrow your results. You can also add or remove filters as needed +5. Click **Export** +6. Export the activity feed as a .csv or .json file. Any filters you applied are reflected in the exported file + +### Using AWS CLI + +Not applicable - must be configured via WorkDocs web application. + +## Default Value + +By default, site wide monitoring is not enabled and requires additional configuration to enable the feature. + +## References + +1. https://docs.aws.amazon.com/workdocs/latest/adminguide/site-activity.html +2. https://amazonworkdocs.com/apps.html +3. https://docs.aws.amazon.com/workdocs/latest/userguide/activity_feed.html +4. https://docs.aws.amazon.com/workdocs/latest/adminguide/site-activity.html + +## CIS Controls + +**v8:** + +- 8.2 Collect Audit Logs + - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. + +**v7:** + +- 6.2 Activate audit logging + - Ensure that local logging has been enabled on all systems and networking devices. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.5/SKILL.md new file mode 100644 index 0000000000..865ea3ca21 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.5/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-aws-euc-4.5 +description: "Ensure new users can only be invited from allowed domains" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workdocs, access-control, domain-restriction] +cis_id: "4.5" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [CWE-284] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure new users can only be invited from allowed domains (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Users that are allowed access to shared files or folders in WorkDocs should be limited to specific domains. + +## Rationale + +To control who should be allowed to join your WorkDocs site, users should be limited on who they can invite sharing files or folders with new people from the specified domains. + +## Audit Procedure + +Perform the steps to confirm WorkDocs file and sharing folders is controlled by specified domains. + +### Using WorkDocs Admin Control Panel + +1. Log in to WorkDocs as an Administrator +2. Click **Security** +3. Under **Invite settings** +4. Confirm that only: + +**Users can invite new people from a few specific domains by sharing files or folders with them** + +5. Confirm the listed **Domains** is accurate + +If the setting is not set to "Users can invite new people from a few specific domains by sharing files or folders with them" or the domains listed is not accurate refer to the remediation below. + +### Using AWS Console + +Not applicable - must be audited via WorkDocs Admin control panel. + +## Expected Result + +WorkDocs invite settings restrict user invitations to approved domains only. + +## Remediation + +### Using WorkDocs Admin Control Panel + +Perform the steps to set WorkDocs file and sharing folders to be controlled by specified domains: + +1. Log in to WorkDocs as an Administrator +2. Click **Security** +3. Under **Invite settings** +4. Select: + +**Users can invite new people from a few specific domains by sharing files or folders with them** + +5. Add in or edit the listed allowed Domains + +### Using AWS CLI + +Not applicable - must be configured via WorkDocs Admin control panel. + +## Default Value + +By default, this setting is disabled. + +## References + +1. https://docs.aws.amazon.com/workdocs/latest/adminguide/manage-sites.html + +## CIS Controls + +**v8:** + +- 3.3 Configure Data Access Control Lists + - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. + +**v7:** + +- 14.6 Protect Information through Access Control Lists + - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.6/SKILL.md new file mode 100644 index 0000000000..c06c50a395 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.6/SKILL.md @@ -0,0 +1,95 @@ +--- +name: cis-aws-euc-4.6 +description: "Ensure only specific users are allowed to invite external users" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workdocs, access-control, external-sharing] +cis_id: "4.6" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [CWE-284] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure only specific users are allowed to invite external users (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +The organization should only allow administrators the ability to invite external users to the WorkDocs site. + +## Rationale + +If anyone can invite a user outside of the organization it could potentially lead to security or information leak. + +## Audit Procedure + +Perform the steps to confirm Only Administrators can invite new external users for WorkDocs. + +### Using WorkDocs Admin Control Panel + +1. Log in to WorkDocs as an Administrator +2. Click **Security** +3. Under **external invites** +4. Confirm that only: + +**Only administrators can invite new external users** + +If this is not set to "Only administrators can invite new external users" refer to the remediation below. + +### Using AWS Console + +Not applicable - must be audited via WorkDocs Admin control panel. + +## Expected Result + +External invite settings are configured so only administrators can invite external users. + +## Remediation + +### Using WorkDocs Admin Control Panel + +Perform the steps to Set Only Administrators can invite new external users for WorkDocs: + +1. Log in to WorkDocs as an Administrator +2. Click **Security** +3. Under **external invites** +4. Select: + +**Only administrators can invite new external users** + +- Only administrators can invite external users to use Amazon WorkDocs. + +### Using AWS CLI + +Not applicable - must be configured via WorkDocs Admin control panel. + +## Default Value + +By default, this is dependent on the policies assigned. + +## References + +1. https://docs.aws.amazon.com/workdocs/latest/adminguide/manage-sites.html + +## CIS Controls + +**v8:** + +- 3.3 Configure Data Access Control Lists + - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. + +**v7:** + +- 14.6 Protect Information through Access Control Lists + - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.7/SKILL.md new file mode 100644 index 0000000000..3f22731d2d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.7/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-aws-euc-4.7 +description: "Ensure publicly shareable links is not allowed in WorkDocs" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workdocs, data-protection, public-sharing] +cis_id: "4.7" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [CWE-732] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure publicly shareable links is not allowed in WorkDocs (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +The organization should not allow publicly shareable links for WorkDocs. + +## Rationale + +If a user can create and send a publicly shareable links allowing a file to be viewed by people outside of the organization it could potentially lead to an security or information leak. + +## Audit Procedure + +Perform the steps to confirm publicly shareable links for WorkDocs is not allowed. + +### Using WorkDocs Admin Control Panel + +1. Log in to WorkDocs as an Administrator +2. Click **Security** +3. Under **public share settings** +4. Confirm that **No public sharing is selected** + +If this is not selected choice refer to the remediation below. + +### Using AWS Console + +Not applicable - must be audited via WorkDocs Admin control panel. + +## Expected Result + +Public share settings are configured to disallow public sharing. + +## Remediation + +### Using WorkDocs Admin Control Panel + +Perform the steps to set set publicly shareable links for WorkDocs to not allowed: + +1. Log in to WorkDocs as an Administrator +2. Click **Security** +3. Under **public share settings** +4. Select **No public sharing** - Users cannot send view links to anyone outside the organization + +### Using AWS CLI + +Not applicable - must be configured via WorkDocs Admin control panel. + +## Default Value + +By default, publicly shareable links are disabled. + +## References + +1. https://docs.aws.amazon.com/workdocs/latest/adminguide/manage-sites.html +2. https://docs.aws.amazon.com/workdocs/latest/userguide/web_share_link.html + +## CIS Controls + +**v8:** + +- 3.3 Configure Data Access Control Lists + - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. + +**v7:** + +- 14.6 Protect Information through Access Control Lists + - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.8/SKILL.md new file mode 100644 index 0000000000..9fc310cb54 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-4.8/SKILL.md @@ -0,0 +1,102 @@ +--- +name: cis-aws-euc-4.8 +description: "Ensure any user that has not accessed WorkDocs in 30 days is set to inactive" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, workdocs, user-management, account-lifecycle] +cis_id: "4.8" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [CWE-263] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure any user that has not accessed WorkDocs in 30 days is set to inactive (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +User accounts that are not actively using the WorkDocs service should be set to inactive after a period of 30 days. + +## Rationale + +Inactive accounts may appear to not pose a problem but they can provide unauthorized access to files within WorkDocs. + +## Impact + +Changing a user to Inactive status does not delete their files, folders, or feedback from your Amazon WorkDocs site. + +## Audit Procedure + +Perform the following steps to review list of users. + +### Using WorkDocs Admin Control Panel + +1. Log in to WorkDocs as an Administrator +2. Under **My Account**, choose **Open admin control panel** +3. Under **Manage Users**, choose **Download user** +4. For Download user, choose **All users** +5. Review the file to determine if any users have not accessed WorkDocs in the past 30 days + +If you find any users that have not accessed WorkDocs in the past 30 days refer to the remediation below. + +### Using AWS Console + +Not applicable - must be audited via WorkDocs Admin control panel. + +## Expected Result + +All users who have not accessed WorkDocs in 30+ days are set to inactive status. + +## Remediation + +### Using WorkDocs Admin Control Panel + +Perform the steps below to disable a user's access by changing their status to Inactive: + +1. Log in to WorkDocs as an Administrator +2. Under **My Account**, click **Open admin control panel** +3. Under **Manage Users**, choose the pencil icon next to the user's name that needs to be set as inactive +4. Choose **Inactive**, and Click Save Changes + +The inactivated user no longer has access to your Amazon WorkDocs site. + +### Using AWS CLI + +Not applicable - must be configured via WorkDocs Admin control panel. + +## Default Value + +By default, there is no setting to manage inactive users. + +## References + +1. https://docs.aws.amazon.com/workdocs/latest/adminguide/inactive-user.html + +## CIS Controls + +**v8:** + +- 5.1 Establish and Maintain an Inventory of Accounts + - Establish and maintain an inventory of all accounts managed in the enterprise. The inventory must include both user and administrator accounts. The inventory, at a minimum, should contain the person's name, username, start/stop dates, and department. Validate that all active accounts are authorized, on a recurring schedule at a minimum quarterly, or more frequently. + +- 6.2 Establish an Access Revoking Process + - Establish and follow a process, preferably automated, for revoking access to enterprise assets, through disabling accounts immediately upon termination, rights revocation, or role change of a user. Disabling accounts, instead of deleting accounts, may be necessary to preserve audit trails. + +**v7:** + +- 16.6 Maintain an Inventory of Accounts + - Maintain an inventory of all accounts organized by authentication system. + +- 16.7 Establish Process for Revoking Access + - Establish and follow an automated process for revoking system access by disabling accounts immediately upon termination or change of responsibilities of an employee or contractor. Disabling these accounts, instead of deleting accounts, allows preservation of audit trails. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.1/SKILL.md new file mode 100644 index 0000000000..c3162241be --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.1/SKILL.md @@ -0,0 +1,174 @@ +--- +name: cis-aws-euc-5.1 +description: "Ensure AppStream is utilizing its own virtual private cloud (VPC)" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, appstream, vpc, network-isolation] +cis_id: "5.1" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [CWE-668] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure AppStream is utilizing its own virtual private cloud (VPC) (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +AppStream 2.0 should be configured using a VPC with Private subnets and a NAT Gateway. + +## Rationale + +For AppStream 2.0 the public subnet will have direct access to the internet through the NAT gateway. This setup allows the streaming instances in your private subnets to connect to the internet or other AWS services. + +## Impact + +None - this is a security best practice. + +## Audit Procedure + +Perform the following to determine if a VPC is setup for AppStream 2.0 correctly. + +### Using AWS Console + +1. Login to the VPC console at `https://console.aws.amazon.com/vpc/` +2. In the left pane, click **Your VPCs** +3. Select the VPC for AppStream 2.0 and take note of the name and the VPC ID +4. In the left pane, click **Subnets** +5. Confirm you have 3 subnets labeled and associated with the VPC: + - 1 AppStream Public Subnet and 2 AppStream Private Subnets +6. Confirm the **AppStream Public Subnet** is configured correctly: + - Select AppStream Public subnet + - Description tab - VPC matches `AppStream ID and name` + - Route Table tab - verify contains rules: + - `Example` - Destination - 10.0.0.0/20, Target - local + - `Example` - Destination - 0.0.0.0/0, Target - internet_gateway_ID + +7. Confirm the **2 AppStream Private Subnets** are configured correctly: + - Select AppStream Private subnet 1 + - Description Tab - VPC matches `AppStream ID and name` and note Availability zone + - Route Table tab - verify contains routes: + - `Example` - Destination - 10.0.0.0/20, Target - local + - `Example` - Destination - 0.0.0.0/0, Target - nat_gateway_ID + - `Example- optional` - Destination - S3bucket_enpoint_ID, Target - storage_vpce_ID + - Select AppStream Private subnet 2 + - Description Tab - VPC matches `AppStream ID and name` and Availability zone is set to something different than Private subnet 1 + - Route Table tab - verify contains routes: + - `Example` - Destination - 10.0.0.0/20, Target - local + - `Example` - Destination - 0.0.0.0/0, Target - nat_gateway_ID + - `Example- optional` - Destination - S3bucket_enpoint_ID, Target - storage_vpce_ID + +If The AppStream VPC, subnets and route tables are not configured correctly refer to the remediation procedure below. + +### Using AWS CLI + +Not applicable - must be audited via Console. + +## Expected Result + +AppStream has a dedicated VPC with 1 public subnet and 2 private subnets with proper route tables configured. + +## Remediation + +### Using AWS Console + +Perform the steps below to create a VPC, subnets and routing table for AppStream 2.0. + +**Allocate an Elastic IP address:** + +1. Login in to the Amazon VPC console at `https://console.aws.amazon.com/vpc/` +2. In the left pane, click **Elastic IPs** +3. Click **Allocate new address** +4. Then click on **Allocate** +5. Make a note of the Elastic IP address +6. Click **Close** + +**Create a New VPC with one public subnet and two private subnets:** + +1. Login to the VPC console at `https://console.aws.amazon.com/vpc/` +2. Click **Launch VPC Wizard** +3. Choose VPC with Public and Private Subnet's **and then click Select** +4. Configure the VPC as follows: + - `IPv4 CIDR block` - enter a CIDR block from the private (non-publicly routable) IP address range i.e. 10.0.0.0/16 + - `IPv6 CIDR block` - Accept the default value - No IPv6 CIDR Block + - `VPC name` enter a name for the VPC (example, AppStream VPC) + - `Public subnet's IPv4 CIDR` - enter a CIDR block from the private (non-publicly routable) IP address range i.e. 10.0.0.0/24 + - `Availability Zone` - Accept the default value - No Preference + - `Public subnet name` - enter a name for the subnet (example, AppStream Public Subnet) + - `Private subnet's IPv4 CIDR` - enter the CIDR block for the subnet + - `Availability Zone` - Accept the default value - No Preference + - `Private subnet name` - enter a name for the subnet (example, AppStream Private Subnet 1) + - `Elastic IP Allocation ID` - enter the Elastic IP address that you created + - `Service Endpoints` - Accept the default value - Blank + - `Enable DNS hostnames` - Accept the default value - Yes + - `Hardware tenancy` - Accept the default value - Default + +5. Click on **Create VPC** + +**Note:** It takes several minutes to set up your VPC. After the VPC is created, choose OK. + +**Create the Second Private subnet to the VPC:** + +1. In the left pane, choose **Subnets** +2. Click Create subnet + + **Name tag** - enter a name for the private subnet (example, AppStream Private subnet 2) + - `VPC` - select the VPC that you created for AppStream 2.0 + - `Availability Zone` - select a different one than you are using for AppStream2 Private subnet 1 + - `IPv4 CIDR block` - enter the CIDR block for the subnet + +3. Click Create + +**Verify and Name the Route Tables:** + +1. In the left pane, choose **Subnets** +2. Select the public subnet that you created (example, AppStream Public subnet) +3. On the Route Table tab, click the ID of the route table (example, rtb-12345678) +4. Select the route table. Under Name, choose the edit icon (the pencil), enter a name (for example, appstream-public-routetable), then click the check mark to save +5. On the Routes tab, confirm one destination and target for local traffic and another destination and target that sends all other traffic to the internet gateway (example, igw-0518a307898725db2) +6. In the left pane, choose **Subnets** +7. Select the first private subnet that you created (example, AppStream Private subnet 1) +8. On the Route Table tab, click the ID of the route table (example, rtb-12345678) +9. Select the route table. Under Name, choose the edit icon (the pencil), enter a name (for example, appstream-private-routetable1), then click the check mark to save +10. On the Routes tab, confirm one destination and target for local traffic and another destination and target that sends all other traffic to the NAT gateway (example, nat-06ea352539b2fddfc) +11. In the left pane, choose **Subnets** +12. Select the second private subnet that you created (example, AppStream Private subnet 2) +13. On the Route Table tab, click the ID of the route table (example, rtb-12345678) +14. Select the route table. Under Name, choose the edit icon (the pencil), enter a name (for example, appstream-private-routetable2), then click the check mark to save +15. On the Routes tab, confirm one destination and target for local traffic and another destination and target that sends all other traffic to the NAT gateway (example, nat-06ea352539b2fddfc) + +### Using AWS CLI + +Not applicable - must be configured via Console. + +## Default Value + +By default, there is no VPC tied to the Appstream 2.0 service. + +## References + +1. https://docs.aws.amazon.com/appstream2/latest/developerguide/vpc-setup-recommendations.html +2. https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#vpc-sizing-ipv4 + +## CIS Controls + +**v8:** + +- 3.12 Segment Data Processing and Storage Based on Sensitivity + - Segment data processing and storage based on the sensitivity of the data. Do not process sensitive data on enterprise assets intended for lower sensitivity data. + +**v7:** + +- 14.1 Segment the Network Based on Sensitivity + - Segment the network based on the label or classification level of the information stored on the servers, locate all sensitive information on separated Virtual Local Area Networks (VLANs). + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.2/SKILL.md new file mode 100644 index 0000000000..ca6f026c8a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.2/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-aws-euc-5.2 +description: "Ensure a VPC Endpoint is set for AppStream" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, appstream, vpc-endpoint, network-security] +cis_id: "5.2" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [CWE-668] +chains_with: [cis-aws-euc-5.1] +prerequisites: [cis-aws-euc-5.1] +severity_boost: {} +--- + +# Ensure a VPC Endpoint is set for AppStream (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +When you select Using a VPC endpoint, this allows users to only stream from this AppStream 2.0 stack when they have network access to the VPC. + +## Rationale + +Virtual Private Cloud (VPC) endpoints allow your users to stream from AppStream 2.0 through your VPC. You can create a VPC endpoint in the VPC of your choosing, then use the endpoint with AppStream 2.0 VPC to maintain the streaming traffic within the VPC. + +## Impact + +None - this is a security best practice. + +## Audit Procedure + +Perform the steps to review the interface endpoint set for AppStream 2.0. + +### Using AWS Console + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane, click **Stacks**, click the link for the stack you wish to view +3. Scroll to the **VPC Endpoints** section +4. Confirm the Streaming Endpoint listed is the endpoint through which to stream traffic + +If there is no Streaming endpoint pointing to a specific VPC Endpoint and it is labeled as Internet refer to the remediation below. + +### Using AWS CLI + +Not applicable - must be audited via Console. + +## Expected Result + +AppStream stack has a VPC Endpoint configured for streaming traffic. + +## Remediation + +### Using AWS Console + +Perform the following steps to create an interface endpoint: + +1. Log in to the VPC console at `https://console.aws.amazon.com/vpc/` +2. In the left pane, click **Endpoints**, **Create Endpoint** +3. Click **Create Endpoint** +4. Configure the endpoint: + - For Service category, ensure that **AWS services** is selected + - For Service Name, choose `com.amazonaws..appstream.streaming` + - For VPC, choose a VPC in which to create the interface endpoint + - For Subnets, choose the subnet (Availability Zone) in which to create the endpoint network interfaces + - Ensure that the **Enable Private DNS Name** check box is selected + - For Security group, select the security group for AppStream +5. Click **Create endpoint** + +**To update a stack to use a new interface endpoint:** + +1. Log in to AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane, click **Stacks**, and click the link of the stack name wish to edit +3. Scroll to the **VPC Endpoints**, and then choose **Edit** +4. In the Edit VPC Endpoint dialog box, for Streaming Endpoint, choose the endpoint you just created +5. Click **Save Changes** + +Traffic for new streaming sessions will be routed through this endpoint. However, traffic for current streaming sessions continues to be routed through the previously specified endpoint. + +### Using AWS CLI + +Not applicable - must be configured via Console. + +## Default Value + +By default, VPC endpoints must be manually configured. + +## References + +1. https://docs.aws.amazon.com/appstream2/latest/developerguide/creating-streaming-from-interface-vpc-endpoints.html + +## CIS Controls + +**v8:** + +- 3.12 Segment Data Processing and Storage Based on Sensitivity + - Segment data processing and storage based on the sensitivity of the data. Do not process sensitive data on enterprise assets intended for lower sensitivity data. + +**v7:** + +- 14.1 Segment the Network Based on Sensitivity + - Segment the network based on the label or classification level of the information stored on the servers, locate all sensitive information on separated Virtual Local Area Networks (VLANs). + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.3/SKILL.md new file mode 100644 index 0000000000..206566dd81 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.3/SKILL.md @@ -0,0 +1,95 @@ +--- +name: cis-aws-euc-5.3 +description: "Ensure maximum session duration is no longer than 10 hours" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, appstream, session-management, timeout] +cis_id: "5.3" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure maximum session duration is no longer than 10 hours (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +When creating a fleet for AppStream 2.0 configure the Maximum session duration in minutes to be no greater than 600. + +## Rationale + +Having a session duration lasting longer than 10 hours should not be necessary and if running for any malicious reasons provides a greater time for usage than should be allowed. + +## Impact + +None - this is a security best practice. + +## Audit Procedure + +Perform the following steps to view the Fleet settings in AppStream. + +### Using AWS Console + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane click on **Fleets** +3. Select the link for the fleet name you wish to view +4. On the **Fleet configuration** section confirm that Maximum session duration is set to **600** minutes or less + +If Maximum session duration is set to anything greater than 600 minutes refer to the remediation below. + +### Using AWS CLI + +Not applicable - must be audited via Console. + +## Expected Result + +Maximum session duration is set to 600 minutes (10 hours) or less. + +## Remediation + +### Using AWS Console + +Perform the following steps to edit the Fleet settings in AppStream: + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane click on **Fleets** +3. Select the link for the fleet name you wish to edit +4. Click **Actions**, **Stop** +5. Scroll to the **Fleet configuration** section and click **Edit** +6. Change the Maximum session duration is set to **600** minutes or less and click **Save Changes** +7. Click **Actions**, **Start** + +### Using AWS CLI + +Not applicable - must be configured via Console. + +## Default Value + +By default, AWS Appstream 2.0 maximum session time is 960 minutes. + +## References + +1. https://docs.aws.amazon.com/appstream2/latest/developerguide/set-up-stacks-fleets.html +2. https://us-east-1.console.aws.amazon.com/appstream2/home?region=us-east-1#/create-fleet + +## CIS Controls + +**v8:** + +- 0.0 Explicitly Not Mapped + +**v7:** + +- 0.0 Explicitly Not Mapped + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.4/SKILL.md new file mode 100644 index 0000000000..2e27478e08 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.4/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-aws-euc-5.4 +description: "Ensure session disconnect timeout is set to 5 minutes or less" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, appstream, session-management, timeout] +cis_id: "5.4" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure session disconnect timeout is set to 5 minutes or less (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Disconnect timeout in minutes, is the amount of of time that a streaming session remains active after users disconnect. + +## Rationale + +If users try to reconnect to the streaming session after a disconnection or network interruption within the 5 minutes, they are connected to their previous session. Otherwise, they are connected to a new session with a new streaming instance and that instance isn't sitting out there not being used. + +## Impact + +None - this is a security best practice. + +## Audit Procedure + +Perform the following steps to view the Fleet settings in AppStream. + +### Using AWS Console + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane click on **Fleets** +3. Select the link for the fleet name you wish to view +4. On the **Fleet configuration** section confirm that Disconnect timeout is set to **5** minutes or less + +If Disconnect timeout is set to anything greater than 5 minutes refer to the remediation below. + +### Using AWS CLI + +Not applicable - must be audited via Console. + +## Expected Result + +Disconnect timeout is set to 5 minutes or less. + +## Remediation + +### Using AWS Console + +Perform the following steps to update the Fleet settings in AppStream: + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane click on **Fleets** +3. Select the link for the fleet name you wish to edit +4. Scroll to the **Fleet configuration** section and click **Edit** +5. Change the Disconnect timeout to **5** minutes or less + +### Using AWS CLI + +Not applicable - must be configured via Console. + +## Default Value + +By default, AWS Appstream 2.0 session disconnect time is set to 15 minutes. + +## References + +1. https://docs.aws.amazon.com/appstream2/latest/developerguide/set-up-stacks-fleets.html +2. https://us-east-1.console.aws.amazon.com/appstream2/home?region=us-east-1#/create-fleet + +## CIS Controls + +**v8:** + +- 0.0 Explicitly Not Mapped + +**v7:** + +- 0.0 Explicitly Not Mapped + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.5/SKILL.md new file mode 100644 index 0000000000..5172801d37 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.5/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-aws-euc-5.5 +description: "Ensure session Idle disconnect timeout is set to 10 minutes or less" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, appstream, session-management, timeout, idle] +cis_id: "5.5" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure session Idle disconnect timeout is set to 10 minutes or less (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Idle disconnect timeout in minutes is the amount of time that users can be inactive before they are disconnected from their streaming session and the Disconnect timeout in minutes time begins. + +## Rationale + +Users are considered idle when they stop providing keyboard or mouse input during their streaming session. File uploads and downloads, audio in, audio out, and pixels changing do not qualify as user activity. Once disconnected from their streaming session the Disconnect timeout begins. + +## Impact + +None - this is a security best practice. + +## Audit Procedure + +Perform the following steps to view the Fleet settings in AppStream. + +### Using AWS Console + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane click on **Fleets** +3. Select the link for the fleet name you wish to view +4. Scroll to the **Fleet configuration** section and confirm that Idle disconnect timeout is set to **10** minutes or less + +If Idle disconnect timeout is set to anything greater than 10 minutes refer to the remediation below. + +### Using AWS CLI + +Not applicable - must be audited via Console. + +## Expected Result + +Idle disconnect timeout is set to 10 minutes or less. + +## Remediation + +### Using AWS Console + +Perform the following steps to view the Fleet settings in AppStream: + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane click on **Fleets** +3. Select the link for the fleet name you wish to view +4. Scroll to the **Fleet configuration** section and click **Edit** +5. Change the Idle disconnect timeout to **10** minutes or less and click **Save changes** + +### Using AWS CLI + +Not applicable - must be configured via Console. + +## Default Value + +By default, AWS Appstream 2.0 idle disconnect time is 15 minutes. + +## References + +1. https://docs.aws.amazon.com/appstream2/latest/developerguide/set-up-stacks-fleets.html +2. https://us-east-1.console.aws.amazon.com/appstream2/home?region=us-east-1#/create-fleet + +## CIS Controls + +**v8:** + +- 0.0 Explicitly Not Mapped + +**v7:** + +- 0.0 Explicitly Not Mapped + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.6/SKILL.md new file mode 100644 index 0000000000..04cc3b9334 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.6/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-euc-5.6 +description: "Ensure internet access is granted and managed through your VPC" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, appstream, network-security, vpc] +cis_id: "5.6" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [CWE-668] +chains_with: [cis-aws-euc-5.1] +prerequisites: [cis-aws-euc-5.1] +severity_boost: {} +--- + +# Ensure internet access is granted and managed through your VPC (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Default Internet Access from your fleet streaming instances should remain unchecked. + +## Rationale + +When Default Internet Access is enabled, AppStream 2.0 uses the internet gateway in the VPC public subnet to connect to the public internet. The streaming instances are then assigned public IP addresses that are directly accessible from the internet. + +Internet Access from fleet streaming instances should be controlled using a NAT gateway in the VPC. When Default Internet Access is not enabled, streaming instances are assigned a private IP address that are not directly accessible from the internet. + +## Impact + +None - this is a security best practice. + +## Audit Procedure + +Perform the following steps to view the Fleet settings in AppStream. + +### Using AWS Console + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane click on **Fleets** +3. Select the link for the fleet name you wish to view +4. On the **Network details** section confirm that Default Internet Access is set to **Disabled** + +If Default internet access is not set to disabled refer to the remediation below. + +### Using AWS CLI + +Not applicable - must be audited via Console. + +## Expected Result + +Default Internet Access is disabled for the fleet. + +## Remediation + +### Using AWS Console + +Perform the following steps to view the Fleet settings in AppStream: + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane click on **Fleets** +3. Select the link for the fleet name you wish to edit +4. Click **Actions**, **Stop** +5. Scroll to the **Network details** section and click **Edit** +6. Deselect **Default Internet Access** +7. Click **Save changes** + +### Using AWS CLI + +Not applicable - must be configured via Console. + +## Default Value + +By default, internet access is not enabled; the box is "unchecked" in the management console. + +## References + +1. https://docs.aws.amazon.com/appstream2/latest/developerguide/set-up-stacks-fleets.html + +## CIS Controls + +**v8:** + +- 3.3 Configure Data Access Control Lists + - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. + +**v7:** + +- 14.6 Protect Information through Access Control Lists + - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.7/SKILL.md new file mode 100644 index 0000000000..58a11e5614 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_End_User_Compute_Services_Benchmark_v1.2.0/cis-aws-euc-5.7/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-aws-euc-5.7 +description: "Ensure Operating system updates are applied to your base image every 30 days" +category: cis-end-user-compute +version: "1.2.0" +author: cyberstrike-official +tags: [cis, aws, end-user-compute, appstream, patch-management, image-management] +cis_id: "5.7" +cis_benchmark: "CIS AWS End User Compute Services Benchmark v1.2.0" +tech_stack: [aws] +cwe_ids: [CWE-1357] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Operating system updates are applied to your base image every 30 days (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +To ensure that your fleet instances have the latest Windows updates installed, we recommend that you install Windows updates on your image builder, create a new image, and then update your fleet with the new image once a month. + +## Rationale + +All fleet instances used in user streaming sessions have only the Windows and application updates that were installed on the underlying image when it was created. In addition, any updates made to Windows or to applications on the instance during the streaming session will not persist to future sessions by the same user or other users. + +## Impact + +None - this is a security best practice. + +## Audit Procedure + +Perform the following steps to review the Image date. + +### Using AWS Console + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. In the left pane click on **Images** +3. Select the **Image Builder** tab +4. Select the link for the Image builder name you wish to view +5. In the **Image builder details** tab review the **Created at date** and the **AppStream agent version** + +If the created at date is over 30 days old refer to the remediation below. + +### Using AWS CLI + +Not applicable - must be audited via Console. + +## Expected Result + +AppStream image builder is less than 30 days old. + +## Remediation + +### Using AWS Console + +Perform the steps below to create an image and update it: + +1. Log in to the AppStream 2.0 console at `https://console.aws.amazon.com/appstream2` +2. Click **Images** in the left pane, then Click the **Image Builder** tab, and Click **Launch Image Builder** +3. Choose a base image. The latest base images released by AWS is recommended and selected by default +4. Click **Next** +5. Configure **Image Builder**, by doing the following: + - **Name:** Type a unique name identifier for the image builder + - **Display name (optional):** Type a name to display for the image builder (maximum of 100 characters) + - **Tags (optional):** Choose Add Tag, and type the key and value for the tag. To add more tags, repeat this step + - **Instance Type:** Select the instance type for the image builder + - **Network Access Points (Optional):** You can create a private link, which is an interface VPC endpoint (interface endpoint), in your virtual private cloud (VPC). To start creating the interface endpoint, select **Create PrivateLink** + - After you create the interface endpoint, you can use it to keep streaming traffic within your VPC + - **AppStream 2.0 Agent:** This section displays only if you are not using the latest version of the agent + - If you are not using the latest AppStream 2.0 agent always select the option to launch your image builder with the latest agent + - **IAM role (Advanced):** Use existing or create a new IAM role +6. Click **Next** +7. Configure Network, do the following: + - Leave **Default Internet Access** unselected + - For **VPC and Subnet 1**, choose a VPC and two subnets in different Availability Zones + - For **Security group(s)**, choose up to five security groups to associate with this image builder + - For **Active Directory Domain (Optional)**, expand this section to choose the Active Directory configuration and organizational unit in which to place your streaming instance computer objects. Ensure that the selected network access settings enable DNS resolvability and communication with your directory + - **Choose Review** and confirm the details for the image builder +8. Click **Launch** +9. **Next Steps** + +Install Operating system updates and install, configure and update your applications for streaming, and then create an image by creating a snapshot of the image builder instance. + +### Using AWS CLI + +Not applicable - must be configured via Console. + +## Default Value + +By default, Windows Operating systems are set to update automatically utilizing Windows update services. Linux operating systems do not update automatically by default. + +## References + +1. https://docs.aws.amazon.com/appstream2/latest/developerguide/tutorial-image-builder.html#tutorial-image-builder-install +2. https://docs.aws.amazon.com/appstream2/latest/developerguide/programmatically-create-image.html +3. https://docs.aws.amazon.com/appstream2/latest/developerguide/managing-image-builders.html + +## CIS Controls + +**v8:** + +- 4.1 Establish and Maintain a Secure Configuration Process + - Establish and maintain a secure configuration process for enterprise assets (end-user devices, including portable and mobile, non-computing/IoT devices, and servers) and software (operating systems and applications). Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard. + +**v7:** + +- 5.1 Establish Secure Configurations + - Maintain documented, standard security configuration standards for all authorized operating systems and software. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/README.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/README.md new file mode 100644 index 0000000000..bb323bfd66 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/README.md @@ -0,0 +1,67 @@ +# CIS AWS Storage Services Benchmark v1.0.0 - Skills + +This directory contains CyberStrike skills for CIS AWS Storage Services Benchmark v1.0.0, Section 1 (AWS Backup) and Section 2 (EBS) controls. + +## Created Skills + +### Section 1: AWS Backup (Controls 1.1-1.6) + +- **1.1** - AWS Storage Backups +- **1.2** - Ensure securing AWS Backups +- **1.3** - Ensure to create backup template and name +- **1.4** - Ensure to create AWS IAM Policies +- **1.5** - Ensure to create IAM roles for Backup +- **1.6** - Ensure AWS Backup with Service Linked Roles + +### Section 2: Elastic Block Store (EBS) (Controls 2.1-2.13) + +- **2.1** - Ensure creating EC2 instance with EBS +- **2.2** - Ensure configuring Security Groups +- **2.3** - Ensure the proper configuration of EBS storage +- **2.4** - Ensure the creation of a new volume +- **2.5** - Ensure creating snapshots of EBS volumes +- **2.6** - Ensure Proper IAM Configuration for EC2 Instances +- **2.7** - Ensure creating IAM User +- **2.8** - Ensure the Creation of IAM Groups +- **2.9** - Ensure Granular Policy Creation +- **2.10** - Ensure Resource Access via Tag-based Policies +- **2.11** - Ensure Secure Password Policy Implementation +- **2.12** - Ensure Monitoring EC2 and EBS with CloudWatch +- **2.13** - Ensure creating an SNS subscription + +## Total: 19 Controls + +All controls are **Manual** (Level 2) requiring human verification and configuration. + +## Source + +CIS AWS Storage Services Benchmark v1.0.0 + +- PDF Location: `/Users/orhanyildirim/Desktop/CIS benchmarks/CIS_AWS_Storage_Services_Benchmark_v1.0.0.pdf` +- Pages: 12-56 + +## Structure + +Each control is in a separate directory: + +``` +cis-aws-storage-{id}/ + └── SKILL.md +``` + +## Usage + +These skills can be used in CyberStrike for: + +- AWS security assessments +- Compliance audits +- Security posture validation +- Automated testing workflows + +## Author + +cyberstrike-official + +## Created + +2026-04-12 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/Section-6-Summary.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/Section-6-Summary.md new file mode 100644 index 0000000000..1ab816261e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/Section-6-Summary.md @@ -0,0 +1,107 @@ +# CIS AWS Storage Services Benchmark v1.0.0 - Section 6 Summary + +## Section 6: Elastic Disaster Recovery (EDR) + +**Total Controls:** 13 (6.1 - 6.13) +**Profile Level:** All Level 2 +**Status:** ✅ Complete + +### Control List + +| Control | Title | Tags | +| ------- | ----------------------------------------------------------------- | ------------------------------------------------------------- | +| 6.1 | Ensure Elastic Disaster Recovery is Configured | backup, resilience, business-continuity | +| 6.2 | Ensure AWS Disaster Recovery Configuration | network, architecture, vpc, replication | +| 6.3 | Ensure functionality of Endpoint Detection and Response (EDR) | endpoint-detection, security, threat-detection, malware | +| 6.4 | Ensure configuration of replication settings | replication, data-duplication, bandwidth, rto, rpo | +| 6.5 | Ensure proper IAM configuration for AWS Elastic Disaster Recovery | iam, access-control, mfa, least-privilege, authentication | +| 6.6 | Ensure installation of the AWS Replication Agent | replication-agent, installation, agent-deployment | +| 6.7 | Ensure proper configuration of the Launch Settings | launch-settings, ec2, configuration, startup | +| 6.8 | Ensure execution of a recovery drill | disaster-recovery, drill, testing, recovery-testing, rto, rpo | +| 6.9 | Ensure Continuous Disaster Recovery Operations | continuous-operations, monitoring, backup, replication | +| 6.10 | Ensure execution of a Disaster Recovery Failover | failover, recovery, business-continuity | +| 6.11 | Ensure execution of a failback | failback, recovery, restoration | +| 6.12 | Ensure CloudWatch Metrics for AWS EDR | cloudwatch, monitoring, metrics, logging, alerting | +| 6.13 | Ensure working of EDR | verification, testing, functionality | + +### Key Themes + +1. **EDR Configuration** (6.1, 6.2, 6.13) + - Initial setup and network architecture + - Complete EDR functionality verification + +2. **IAM & Security** (6.5) + - Least-privilege access + - MFA enforcement + - Role-based access control + +3. **Agent & Replication** (6.3, 6.4, 6.6) + - Replication agent installation + - Replication settings configuration + - Network connectivity + +4. **Launch & Recovery** (6.7, 6.8, 6.10, 6.11) + - Launch settings configuration + - Recovery drill execution + - Failover procedures + - Failback processes + +5. **Continuous Operations** (6.9, 6.12) + - Ongoing DR operations + - CloudWatch monitoring + - Metrics and alerting + +### Common CIS Controls Mappings + +- **v8 11.2** - Perform Automated Backups +- **v8 11.4** - Establish and Maintain an Isolated Instance of Recovery Data +- **v8 11.5** - Test Data Recovery +- **v7 10.2** - Perform Complete System Backups +- **v7 10.4** - Ensure Protection of Backups + +### Network Requirements + +All EDR controls require proper network configuration: + +- **TCP 443** - HTTPS access to EDR, S3, EC2 endpoints +- **TCP 1500** - Replication traffic between source and staging area + +### Files Created + +``` +CIS_AWS_Storage_Services_Benchmark_v1.0.0/ +├── cis-aws-storage-6.1/SKILL.md +├── cis-aws-storage-6.2/SKILL.md +├── cis-aws-storage-6.3/SKILL.md +├── cis-aws-storage-6.4/SKILL.md +├── cis-aws-storage-6.5/SKILL.md +├── cis-aws-storage-6.6/SKILL.md +├── cis-aws-storage-6.7/SKILL.md +├── cis-aws-storage-6.8/SKILL.md +├── cis-aws-storage-6.9/SKILL.md +├── cis-aws-storage-6.10/SKILL.md +├── cis-aws-storage-6.11/SKILL.md +├── cis-aws-storage-6.12/SKILL.md +└── cis-aws-storage-6.13/SKILL.md +``` + +### Usage in CyberStrike + +These skills can be invoked in CyberStrike to audit AWS EDR configurations: + +```bash +# Audit all Section 6 controls +cyberstrike run "Audit CIS AWS Storage Section 6 controls" + +# Audit specific control +cyberstrike run "Check CIS 6.1 - EDR Configuration" + +# Remediate specific control +cyberstrike run "Remediate CIS 6.5 - IAM for EDR" +``` + +--- + +**Generated:** 2026-04-12 +**Source:** CIS AWS Storage Services Benchmark v1.0.0 (Pages 111-141) +**Author:** cyberstrike-official diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.1/SKILL.md new file mode 100644 index 0000000000..59d87bce92 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.1/SKILL.md @@ -0,0 +1,118 @@ +--- +name: cis-aws-storage-1.1 +description: "AWS Storage Backups" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, backup, aws-backup, disaster-recovery, resilience] +cis_id: "1.1" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-1.2, cis-aws-storage-1.3, cis-aws-storage-1.4, cis-aws-storage-1.5, cis-aws-storage-1.6] +prerequisites: [] +severity_boost: {} +--- + +# CIS Control 1.1: AWS Storage Backups (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +AWS Storage Backups is a managed AWS Service that establishes high resiliency to your cloud resources. AWS Storage Backups are like making extra copies of your important stuff on Amazon's computers. It is an excellent strategy to ensure that the data and resources you use remain available in the event of unrecoverable damage or loss to your resources. + +## Rationale + +AWS Backups enable you to back up and restore all data lost during the attack. While AWS Storage Backups provide a level of security, there are numerous methods to fortify your backups, ensuring the protection of your data and services. + +## Impact + +Not implementing AWS Backups can lead to: + +- Permanent data loss during security incidents or system failures +- Extended recovery time in disaster scenarios +- Non-compliance with data retention and disaster recovery requirements +- Business continuity disruption + +## Audit Procedure + +### Via AWS Management Console + +This control requires manual verification of: + +1. Whether AWS Backup service is enabled and configured +2. Backup plans exist for critical storage resources +3. Backup schedules are defined according to organizational requirements +4. Backup retention policies align with compliance requirements + +### Via AWS CLI + +Check if AWS Backup is being used in your account: + +```bash +# List backup plans +aws backup list-backup-plans + +# List backup vaults +aws backup list-backup-vaults + +# List protected resources +aws backup list-protected-resources +``` + +## Expected Result + +- AWS Backup service is enabled +- Backup plans are configured for critical resources +- Backup vaults exist with appropriate access controls +- Protected resources list includes all critical storage assets + +## Remediation + +### Via AWS Management Console + +1. **Sign into AWS Console** + - Navigate to `https://console.aws.amazon.com/billing/home#/` + - Enter your credentials + +2. **Access AWS Backup Service** + - In the AWS Management Console, type "Backup" or navigate through the services menu to find the "Storage" category where AWS Backup is listed + +3. **Create Backup Plan** + - Choose "Create backup plan" from the options provided + - You can either create a custom plan tailored to your requirements or select a pre-defined template offered by AWS + +### Via AWS CLI + +```bash +# Create a backup vault +aws backup create-backup-vault \ + --backup-vault-name my-backup-vault + +# Create a backup plan from a template +aws backup create-backup-plan \ + --backup-plan '{"BackupPlanName":"MyBackupPlan","Rules":[{"RuleName":"DailyBackups","TargetBackupVaultName":"my-backup-vault","ScheduleExpression":"cron(0 5 ? * * *)","StartWindowMinutes":60,"CompletionWindowMinutes":120,"Lifecycle":{"DeleteAfterDays":30}}]}' +``` + +## Default Value + +AWS Backup is not enabled by default. Organizations must manually configure backup plans, vaults, and resource assignments. + +## References + +1. [AWS Backup - What is Backup](https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html) +2. [AWS Backup Documentation](https://docs.aws.amazon.com/aws-backup/) + +## CIS Controls + +Not mapped to specific CIS Controls v7 or v8 in the provided documentation. + +## Notes + +- This is a **manual** control requiring human verification +- AWS Backup should be part of a comprehensive disaster recovery strategy +- Consider cross-region backup replication for critical resources +- Regularly test backup restoration procedures diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.2/SKILL.md new file mode 100644 index 0000000000..e7cef8272e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.2/SKILL.md @@ -0,0 +1,152 @@ +--- +name: cis-aws-storage-1.2 +description: "Ensure securing AWS Backups" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, backup, aws-backup, security, disaster-recovery, iam] +cis_id: "1.2" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-1.1, cis-aws-storage-1.3, cis-aws-storage-1.4, cis-aws-storage-1.5] +prerequisites: [cis-aws-storage-1.1] +severity_boost: {} +--- + +# CIS Control 1.2: Ensure securing AWS Backups (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +As an AWS administrator, it's important to know what you're responsible for. You're responsible for keeping things safe in the cloud, which means taking care of the resources and data on AWS. Here's what you need to secure, according to AWS documentation: + +1. Responsible for alert communication with AWS +2. Managing access credentials for AWS resources +3. Configuring backup plans according to organization policies +4. Ensuring backup recovery capability +5. Including AWS Backups in the organization's disaster recovery procedures +6. Ensuring user awareness and familiarity with AWS Backups platform usage + +## Rationale + +AWS will send periodic emails regarding the status of your backups and any service issues. The administrator must address any communicated issues from AWS, such as billing problems or backup inactivity, and take necessary steps to resolve them. + +## Impact + +Failure to secure AWS Backups properly can result in: + +- Inability to recover from data loss incidents +- Unauthorized access to backup data +- Non-compliance with regulatory requirements +- Backup tampering or deletion by malicious actors +- Increased recovery time during disasters + +## Audit Procedure + +### Via AWS Management Console + +**CREATING AN AWS BACKUP:** + +Creating an AWS Backup involves selecting the desired data, specifying backup frequency, and choosing storage options. Below we'll walk through how to create and configure an AWS Backup instance. + +1. **Sign into AWS Console** + - To sign into the AWS Console `https://console.aws.amazon.com/billing/home#/`, users navigate to the AWS Management Console website and enter their credentials, including their username and password + +2. **Access the AWS Backup Service Dashboard in the AWS Management Console** + - AWS Management Console and type "Backup" or navigate through the services menu to find the "Storage" category, where AWS Backup is listed + +3. **Create Backup Plan** + - Choose "Create backup plan" from the options provided. You can either create a custom plan tailored to your requirements or option for a pre-defined template offered by AWS + +### Via AWS CLI + +```bash +# List backup plans to verify they exist +aws backup list-backup-plans + +# Describe a specific backup plan +aws backup get-backup-plan --backup-plan-id + +# List backup vaults +aws backup list-backup-vaults + +# Check backup vault access policy +aws backup get-backup-vault-access-policy --backup-vault-name +``` + +## Expected Result + +- Backup plans are configured and active +- Access credentials are properly managed through IAM +- Backup recovery has been tested +- AWS Backups are integrated into disaster recovery procedures +- Users are trained on AWS Backup usage +- Alert communication channels are established + +## Remediation + +### Via AWS Management Console + +1. **Configure Backup Plans** + - Navigate to AWS Backup service + - Create or update backup plans according to organizational policies + - Define backup frequency, retention, and lifecycle policies + +2. **Secure Access Credentials** + - Use IAM roles instead of long-term credentials where possible + - Enable MFA for backup administration activities + - Implement least privilege access + +3. **Test Backup Recovery** + - Regularly perform restore tests + - Document recovery procedures + - Validate recovered data integrity + +4. **Integrate with Disaster Recovery** + - Include backup restoration in DR runbooks + - Define RPO (Recovery Point Objective) and RTO (Recovery Time Objective) + - Establish escalation procedures + +5. **User Training** + - Conduct regular training on AWS Backup features + - Document backup and restore procedures + - Maintain runbooks for common scenarios + +### Via AWS CLI + +```bash +# Create backup vault with encryption +aws backup create-backup-vault \ + --backup-vault-name secure-vault \ + --encryption-key-arn arn:aws:kms:region:account:key/key-id + +# Set backup vault access policy (restrict access) +aws backup put-backup-vault-access-policy \ + --backup-vault-name secure-vault \ + --policy file://vault-policy.json +``` + +## Default Value + +AWS Backup has no default security configurations. All security measures must be explicitly configured by the administrator. + +## References + +1. [AWS Backup - What is Backup](https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html) +2. [AWS Backup Security](https://docs.aws.amazon.com/aws-backup/latest/devguide/security.html) + +## CIS Controls + +Not mapped to specific CIS Controls v7 or v8 in the provided documentation. + +## Notes + +- This is a **manual** control requiring administrative procedures and processes +- Establish regular communication channels with AWS support +- Monitor AWS Health Dashboard for backup service status +- Implement automated alerting for backup failures +- Consider cross-account backup for additional protection diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.3/SKILL.md new file mode 100644 index 0000000000..de468cadfb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.3/SKILL.md @@ -0,0 +1,156 @@ +--- +name: cis-aws-storage-1.3 +description: "Ensure to create backup template and name" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, backup, aws-backup, backup-plan, s3, elastic-beanstalk] +cis_id: "1.3" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-1.1, cis-aws-storage-1.2, cis-aws-storage-1.4] +prerequisites: [cis-aws-storage-1.1] +severity_boost: {} +--- + +# CIS Control 1.3: Ensure to create backup template and name (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +To create a backup plan, select a template and specify a name for the plan. Additionally, define backup rules according to your requirements and then click on create backup option. + +## Rationale + +Creating well-named backup templates ensures consistency, improves manageability, and helps teams understand backup configurations at a glance. Backup plans define the schedule, retention, and lifecycle policies for your backups. + +## Impact + +Not properly creating and naming backup templates can lead to: + +- Inconsistent backup configurations across resources +- Difficulty identifying which resources are protected +- Confusion during disaster recovery scenarios +- Inability to meet compliance requirements for data retention + +## Audit Procedure + +### Via AWS Management Console + +**Backup Resources:** + +Once you've made your backup plan, it's time to put it into action and start backing up your stuff. + +Let's start by backing up an S3 storage bucket. + +To back up Elastic Beanstalk instance stored on AWS S3, we'll need to tag its Amazon Resource Name (ARN) with a backup plan. In S3, go to "properties" to attach the backup plan to the resource: + +1. **Copy the ARN from the console** + - From the AWS Management Console, copy the ARN (Amazon Resource Name) associated with the Elastic Beanstalk instance. This unique identifier will be used to tag the resource for backup + +2. **Assign the resource** + - After copying the ARN, return to the AWS Management Console and access Amazon Backup + - Choose the backup plan recently created, then proceed to assign the resource you wish to backup, such as the S3 bucket containing the Elastic Beanstalk resource + - Finally, navigate to "Resource Assignments" to complete the process. Choose "Assign Resources" and provide a name for the assignment. For now, maintain the role as Default. In subsequent sections, we'll explore implementing custom IAM roles and policies for your backup operations + +Select the resource(s) that you want to backup. You have the option to backup all your resources, but we're just going to back up the specific Elastic Beanstalk resource for now. + +The resources are now being backed up according to the schedule established by your organization. + +### Via AWS CLI + +```bash +# List all backup plans +aws backup list-backup-plans + +# Get details of a specific backup plan +aws backup get-backup-plan --backup-plan-id + +# List backup selections (resource assignments) +aws backup list-backup-selections --backup-plan-id + +# Get backup selection details +aws backup get-backup-selection \ + --backup-plan-id \ + --selection-id +``` + +## Expected Result + +- Backup plans have clear, descriptive names following organizational naming conventions +- Backup rules are configured with appropriate schedules +- Resources are tagged and assigned to backup plans +- Backup vault is specified for each backup plan + +## Remediation + +### Via AWS Management Console + +1. **Create Backup Plan with Proper Name** + - Navigate to AWS Backup → Backup plans + - Click "Create backup plan" + - Choose template or build new plan + - Provide a descriptive name (e.g., `prod-daily-30day-retention`) + - Define backup rules with schedule and retention + +2. **Assign Resources** + - Navigate to "Resource assignments" in your backup plan + - Click "Assign resources" + - Provide assignment name + - Select resources by tags or resource IDs + - Choose IAM role for backup operations + +### Via AWS CLI + +```bash +# Create a backup plan with proper naming +aws backup create-backup-plan --backup-plan '{ + "BackupPlanName": "prod-s3-daily-backups", + "Rules": [{ + "RuleName": "daily-backup-rule", + "TargetBackupVaultName": "production-vault", + "ScheduleExpression": "cron(0 5 ? * * *)", + "StartWindowMinutes": 60, + "CompletionWindowMinutes": 120, + "Lifecycle": { + "DeleteAfterDays": 30 + } + }] +}' + +# Assign resources to backup plan +aws backup create-backup-selection \ + --backup-plan-id \ + --backup-selection '{ + "SelectionName": "s3-prod-resources", + "IamRoleArn": "arn:aws:iam::ACCOUNT:role/service-role/AWSBackupDefaultServiceRole", + "Resources": [ + "arn:aws:s3:::my-bucket-name" + ] + }' +``` + +## Default Value + +The AWS backup vault serves as the storage location for your backups. It's crucial to manage access to these backups to prevent unauthorized access and ensure data security. + +## References + +1. [AWS Backup - How it works](https://docs.aws.amazon.com/aws-backup/latest/devguide/how-it-works.html) +2. [AWS Backup Plans](https://docs.aws.amazon.com/aws-backup/latest/devguide/creating-a-backup-plan.html) + +## CIS Controls + +Not mapped to specific CIS Controls v7 or v8 in the provided documentation. + +## Notes + +- This is a **manual** control requiring review of backup plan configurations +- Use consistent naming conventions across all backup plans +- Include environment identifiers in plan names (e.g., prod, dev, staging) +- Document backup plan purposes and resource assignments +- Consider using tags for dynamic resource assignment to backup plans diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.4/SKILL.md new file mode 100644 index 0000000000..90d4a46a5a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.4/SKILL.md @@ -0,0 +1,172 @@ +--- +name: cis-aws-storage-1.4 +description: "Ensure to create AWS IAM Policies" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, backup, iam, iam-policy, access-control, least-privilege] +cis_id: "1.4" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [CWE-284] +chains_with: [cis-aws-storage-1.2, cis-aws-storage-1.5, cis-aws-storage-1.6] +prerequisites: [cis-aws-storage-1.1] +severity_boost: {} +--- + +# CIS Control 1.4: Ensure to create AWS IAM Policies (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +AWS IAM policies specify the desired permissions for accessing AWS resources and define the conditions under which those permissions are granted. Configure the appropriate policies to keep your resources secure. + +## Rationale + +Managing AWS IAM policies is crucial to safeguard your backups from unauthorized access, ensuring that only approved users can manipulate or view sensitive data. + +Properly configured IAM policies implement the principle of least privilege, granting only the minimum permissions necessary for users and services to perform their designated tasks. This minimizes the risk of accidental or malicious data exposure and unauthorized backup modifications. + +## Impact + +Not implementing proper IAM policies for AWS Backup can lead to: + +- Unauthorized access to backup data +- Backup tampering or deletion by unauthorized users +- Non-compliance with regulatory requirements +- Inability to track who accessed or modified backups +- Privilege escalation vulnerabilities + +## Audit Procedure + +### Via AWS Management Console + +To create a role for AWS Backup, follow these steps: + +1. Navigate to the "IAM Dashboard" in the AWS Console +2. Select "Roles" from the left-hand menu +3. Click on the "Create Role" button +4. Choose "AWS Service" as the trusted entity +5. Select "AWS Backup" as the service that will use this role +6. Choose a policy to apply to the role or create a custom policy +7. Review the role details and provide a meaningful name for the role +8. Click on "Create Role" to finalize the creation of the role for AWS Backup + +### Via AWS CLI + +```bash +# List IAM policies related to backups +aws iam list-policies --scope Local | grep -i backup + +# Get a specific policy document +aws iam get-policy --policy-arn + +# Get policy version details +aws iam get-policy-version \ + --policy-arn \ + --version-id + +# List roles and their attached policies +aws iam list-roles | grep -i backup + +# List policies attached to a specific role +aws iam list-attached-role-policies --role-name +``` + +## Expected Result + +- IAM policies for AWS Backup follow least privilege principle +- Backup-specific policies are created and properly scoped +- Policies clearly define permissions for backup operations (create, delete, restore) +- Access to backup vaults is restricted through IAM policies + +## Remediation + +### Via AWS Management Console + +1. **Navigate to IAM Dashboard** + - Go to IAM service in AWS Console + +2. **Create Custom Policy** + - Click "Policies" → "Create policy" + - Use JSON editor or visual editor + - Define permissions for backup operations + - Add conditions for additional security + +3. **Example Policy Structure** + - Allow backup creation and management + - Restrict backup deletion to specific roles + - Enable restore operations for authorized users + - Limit access to specific backup vaults + +4. **Apply Policy to Roles/Users** + - Attach policy to IAM roles used by AWS Backup + - Assign to users who need backup management access + +### Via AWS CLI + +```bash +# Create an IAM policy for backup operations +aws iam create-policy \ + --policy-name BackupAdministratorPolicy \ + --policy-document '{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "backup:CreateBackupPlan", + "backup:CreateBackupSelection", + "backup:StartBackupJob", + "backup:ListBackupPlans", + "backup:ListBackupVaults", + "backup:DescribeBackupVault" + ], + "Resource": "*" + }, + { + "Effect": "Deny", + "Action": [ + "backup:DeleteBackupPlan", + "backup:DeleteBackupVault" + ], + "Resource": "*", + "Condition": { + "StringNotEquals": { + "aws:PrincipalArn": "arn:aws:iam::ACCOUNT:role/BackupAdministrator" + } + } + } + ] + }' + +# Attach policy to a role +aws iam attach-role-policy \ + --role-name BackupServiceRole \ + --policy-arn arn:aws:iam::ACCOUNT:policy/BackupAdministratorPolicy +``` + +## Default Value + +AWS provides managed policies like `AWSBackupServiceRolePolicyForBackup` and `AWSBackupServiceRolePolicyForRestores`, but custom policies should be created for granular control. + +## References + +1. [AWS IAM Policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) +2. [AWS Backup IAM Policies](https://docs.aws.amazon.com/aws-backup/latest/devguide/security-iam.html) + +## CIS Controls + +Not mapped to specific CIS Controls v7 or v8 in the provided documentation. + +## Notes + +- This is a **manual** control requiring policy review and configuration +- Implement least privilege for all backup-related IAM policies +- Separate backup creation permissions from deletion permissions +- Use IAM conditions to restrict access based on tags, time, or source IP +- Regularly audit IAM policies for over-permissive access +- Consider using AWS Organizations SCPs for additional backup protection diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.5/SKILL.md new file mode 100644 index 0000000000..b967c53c52 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-1.5/SKILL.md @@ -0,0 +1,171 @@ +--- +name: cis-aws-storage-1.5 +description: "Ensure to create IAM roles for Backup" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, backup, iam, iam-role, service-role, least-privilege] +cis_id: "1.5" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [CWE-284] +chains_with: [cis-aws-storage-1.4, cis-aws-storage-1.6] +prerequisites: [cis-aws-storage-1.1, cis-aws-storage-1.4] +severity_boost: {} +--- + +# CIS Control 1.5: Ensure to create IAM roles for Backup (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +An AWS Identity and Access Management (IAM) role is similar to a user, in that it is an AWS identity with permissions policies that determine what the identity can and cannot do in AWS. However, instead of being uniquely associated with one person, a role is intended to be assumable by anyone who needs it. + +## Rationale + +While Service Linked Roles offer quick deployment, using default configurations isn't recommended for security best practices. + +Creating custom IAM roles for AWS Backup allows you to: + +- Implement principle of least privilege +- Control exactly which services and resources the backup service can access +- Audit and track backup operations more effectively +- Separate backup permissions from other administrative functions + +## Impact + +Not properly configuring IAM roles for AWS Backup can result in: + +- Over-permissive backup access using default service roles +- Inability to track which role performed backup operations +- Difficulty implementing fine-grained access controls +- Compliance violations related to access management +- Potential for backup service to access resources beyond what's necessary + +## Audit Procedure + +### Via AWS Management Console + +To create a role for AWS Backup, follow these steps: + +1. Navigate to the "IAM Dashboard" in the AWS Console +2. Select "Roles" from the left-hand menu +3. Click on the "Create Role" button +4. Choose "AWS Service" as the trusted entity +5. Select "AWS Backup" as the service that will use this role +6. Choose a policy to apply to the role or create a custom policy +7. Review the role details and provide a meaningful name for the role +8. Click on "Create Role" to finalize the creation of the role for AWS Backup + +### Via AWS CLI + +```bash +# List IAM roles related to backup +aws iam list-roles | grep -i backup + +# Get details of a specific backup role +aws iam get-role --role-name + +# List policies attached to the backup role +aws iam list-attached-role-policies --role-name + +# Get the trust relationship (assume role policy) +aws iam get-role --role-name \ + --query 'Role.AssumeRolePolicyDocument' +``` + +## Expected Result + +- Custom IAM roles exist for AWS Backup operations +- Roles follow least privilege principle +- Trust relationships only allow AWS Backup service to assume the role +- Roles have clear, descriptive names indicating their purpose +- Role policies are scoped to necessary resources only + +## Remediation + +### Via AWS Management Console + +1. **Create Custom IAM Role for Backup** + - Navigate to IAM → Roles → Create role + - Select "AWS service" as trusted entity type + - Choose "Backup" from the service list + - Select use case (e.g., "Backup") + +2. **Attach Appropriate Policies** + - Use AWS managed policies as a baseline: + - `AWSBackupServiceRolePolicyForBackup` + - `AWSBackupServiceRolePolicyForRestores` + - Or create custom policies for tighter control + +3. **Configure Trust Relationship** + - Ensure only AWS Backup service can assume the role + - Verify no overly permissive trust policies + +4. **Name the Role Appropriately** + - Use descriptive names like `CustomBackupServiceRole` or `ProdBackupRole` + - Add tags for organization and tracking + +### Via AWS CLI + +```bash +# Create trust policy document for AWS Backup service +cat > backup-trust-policy.json < \ + --version-id | grep -i "aws:ResourceTag" +\`\`\` + +## Remediation + +Review existing IAM policies associated with EC2 resources to ensure they include tag-based conditions. Modify policies to incorporate tag-based conditions for granular access control. + +## References + +1. [Tag-based IAM Policies](https://docs.aws.amazon.com/tag-editor/latest/userguide/tags-in-iam-policies.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control | | ● | ● | +| v7 | 14.7 Enforce Access Control to Data through Automated Tools | | | ● | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.11/SKILL.md new file mode 100644 index 0000000000..5bbeaae52c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.11/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-aws-storage-2.11 +description: "Ensure Secure Password Policy Implementation" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, iam, password-policy, mfa, authentication] +cis_id: "2.11" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [CWE-521] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# CIS Control 2.11: Ensure Secure Password Policy Implementation (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +Password policies outline the appropriate parameters for password configuration within an organization. + +## Rationale + +Clear password policies provide essential guidelines for maintaining strong authentication practices, reducing the risk of unauthorized access and data breaches within an organization. By enforcing requirements for complex passwords and regular updates, these policies help bolster cybersecurity defenses and ensure compliance with industry standards and regulations. + +## Audit Procedure + +### Via AWS CLI + +\`\`\`bash + +# Get account password policy + +aws iam get-account-password-policy +\`\`\` + +## Remediation + +### Via AWS CLI + +\`\`\`bash + +# Set account password policy + +aws iam update-account-password-policy \ + --minimum-password-length 14 \ + --require-symbols \ + --require-numbers \ + --require-uppercase-characters \ + --require-lowercase-characters \ + --allow-users-to-change-password \ + --max-password-age 90 \ + --password-reuse-prevention 24 +\`\`\` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control | | ● | ● | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | ● | +| v7 | 4.2 Change Default Passwords | ● | ● | ● | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | ● | ● | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.12/SKILL.md new file mode 100644 index 0000000000..006c9182ff --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.12/SKILL.md @@ -0,0 +1,56 @@ +--- +name: cis-aws-storage-2.12 +description: "Ensure Monitoring EC2 and EBS with CloudWatch" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, ebs, ec2, cloudwatch, monitoring, logging, alerting] +cis_id: "2.12" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-2.13] +prerequisites: [] +severity_boost: {} +--- + +# CIS Control 2.12: Ensure Monitoring EC2 and EBS with CloudWatch (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +CloudWatch is an AWS monitoring service that allows you to keep an eye on your AWS resources. You can track metrics via files or worldclass data visuals. AWS CloudWatch allows the administrator to keep an eye on his/her AWS resources. You can set up alarms, monitor activity, and analyze log data. CloudWatch is a must to keep your AWS EBS and EC2 resources secure. + +## Rationale + +Using CloudWatch to monitor EC2 instances and EBS volumes is essential for enhancing operational oversight and ensuring optimal performance within the AWS environment. This approach provides real-time insights into resource usage and system health, enabling proactive adjustments and timely responses to potential issues, thereby maintaining high availability and efficiency. + +## Impact + +Failing to monitor EC2 instances and EBS volumes with CloudWatch can lead to delayed detection of performance issues and resource bottlenecks, potentially causing system outages and degraded user experiences. Without this monitoring, organizations also miss opportunities for proactive optimizations, increasing the risk of unexpected downtime and higher operational costs. + +## Audit Procedure + +Creating an AWS CloudWatch Dashboard - see pages 53-54 of CIS AWS Storage Services Benchmark v1.0.0. + +## Remediation + +1. Enable CloudWatch Monitoring +2. Configure CloudWatch Alarms +3. Establish Baselines +4. Automate Responses + +## References + +1. [CloudWatch Embedded Metric Format](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_View.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | ● | ● | ● | +| v7 | 6.2 Activate audit logging | ● | ● | ● | +| v7 | 6.5 Central Log Management | | ● | ● | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.13/SKILL.md new file mode 100644 index 0000000000..a7b39c6197 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.13/SKILL.md @@ -0,0 +1,133 @@ +--- +name: cis-aws-storage-2.13 +description: "Ensure creating an SNS subscription" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, sns, alerting, notification, monitoring, incident-response] +cis_id: "2.13" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-2.12] +prerequisites: [cis-aws-storage-2.12] +severity_boost: {} +--- + +# CIS Control 2.13: Ensure creating an SNS subscription (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +SNS (Simple Notification Service) subscriptions enable real-time alerts and notifications for AWS CloudWatch alarms and events, ensuring administrators are immediately informed of critical issues with EC2 instances and EBS volumes. + +## Rationale + +Creating SNS subscriptions is essential for timely incident response and proactive monitoring. By receiving immediate notifications about CloudWatch alarms, administrators can quickly address performance issues, security events, or resource failures before they impact operations. + +## Impact + +Without SNS subscriptions, CloudWatch alarms may go unnoticed, leading to delayed incident response, prolonged downtime, and potential data loss. Real-time notifications ensure that critical issues are addressed promptly, minimizing operational disruptions and maintaining service availability. + +## Audit Procedure + +### Via AWS Management Console + +1. Navigate to SNS → Subscriptions +2. Verify subscriptions exist for critical CloudWatch alarms +3. Confirm subscription endpoints (email, SMS, Lambda) are active +4. Test notification delivery + +### Via AWS CLI + +\`\`\`bash + +# List SNS topics + +aws sns list-topics + +# List subscriptions + +aws sns list-subscriptions + +# Get topic attributes + +aws sns get-topic-attributes --topic-arn + +# List subscriptions for specific topic + +aws sns list-subscriptions-by-topic --topic-arn +\`\`\` + +## Expected Result + +- SNS topics exist for critical alarm categories +- Subscriptions are configured for appropriate notification channels +- Subscription endpoints are confirmed and active +- Test notifications are successfully delivered + +## Remediation + +### Via AWS Management Console + +1. Navigate to SNS → Create Topic +2. Provide topic name and display name +3. Create subscription to the topic +4. Choose protocol (Email, SMS, HTTPS, Lambda, SQS) +5. Enter endpoint details +6. Confirm subscription +7. Link topic to CloudWatch alarms + +### Via AWS CLI + +\`\`\`bash + +# Create SNS topic + +aws sns create-topic --name CloudWatchAlerts + +# Create email subscription + +aws sns subscribe \ + --topic-arn arn:aws:sns:region:account:CloudWatchAlerts \ + --protocol email \ + --notification-endpoint admin@example.com + +# Confirm subscription (check email for confirmation link) + +# Associate CloudWatch alarm with SNS topic + +aws cloudwatch put-metric-alarm \ + --alarm-name HighCPUUtilization \ + --alarm-actions arn:aws:sns:region:account:CloudWatchAlerts \ + --metric-name CPUUtilization \ + --namespace AWS/EC2 \ + --statistic Average \ + --period 300 \ + --threshold 80 \ + --comparison-operator GreaterThanThreshold +\`\`\` + +## Default Value + +No SNS topics or subscriptions are created by default. + +## References + +1. [Amazon SNS](https://docs.aws.amazon.com/sns/latest/dg/welcome.html) +2. [CloudWatch Alarms with SNS](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html) + +## CIS Controls + +Not explicitly mapped in the provided documentation. + +## Notes + +- This is a **manual** control requiring SNS configuration verification +- Configure multiple notification channels for redundancy +- Use SNS message filtering to reduce notification noise +- Regularly test SNS subscriptions to ensure delivery +- Consider integrating with incident management systems (PagerDuty, OpsGenie) diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.2/SKILL.md new file mode 100644 index 0000000000..a08e142ad7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.2/SKILL.md @@ -0,0 +1,155 @@ +--- +name: cis-aws-storage-2.2 +description: "Ensure configuring Security Groups" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, ebs, ec2, security-group, firewall, network-security] +cis_id: "2.2" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [CWE-284, CWE-923] +chains_with: [cis-aws-storage-2.1, cis-aws-storage-2.3] +prerequisites: [cis-aws-storage-2.1] +severity_boost: {} +--- + +# CIS Control 2.2: Ensure configuring Security Groups (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +Security groups are your first line of defense for the EC2 instance. A security group is a firewall that controls inbound and outbound traffic. + +## Rationale + +Security groups play a critical role in maintaining the security of your AWS resources. It is advisable to restrict traffic to only what is necessary for accessing your instance, thereby minimizing potential security risks. + +Properly configured security groups: + +- Implement network-level access control +- Reduce attack surface by limiting exposed ports +- Enforce principle of least privilege for network access +- Provide stateful firewall protection + +## Impact + +Improperly configured security groups can lead to: + +- Unauthorized network access to EC2 instances +- Exposure of management ports (SSH, RDP) to the internet +- Data exfiltration through unrestricted outbound rules +- Lateral movement within VPC if rules are too permissive +- Compliance violations + +## Audit Procedure + +### Via AWS Management Console + +Open traffic for SSH, HTTP, and HTTPS. Make sure to allow traffic from anywhere, unless you will be accessing the instance from a secure workstation or server with a static IP address. + +1. Navigate to EC2 Dashboard → Security Groups +2. Review inbound rules for each security group +3. Check for overly permissive rules (0.0.0.0/0 on sensitive ports) +4. Verify outbound rules follow least privilege + +### Via AWS CLI + +```bash +# List all security groups +aws ec2 describe-security-groups \ + --query 'SecurityGroups[].[GroupId,GroupName,VpcId]' \ + --output table + +# Find security groups with SSH (22) open to the world +aws ec2 describe-security-groups \ + --filters Name=ip-permission.from-port,Values=22 \ + --query 'SecurityGroups[?IpPermissions[?IpRanges[?CidrIp==`0.0.0.0/0`]]].[GroupId,GroupName]' \ + --output table + +# Find security groups with RDP (3389) open to the world +aws ec2 describe-security-groups \ + --filters Name=ip-permission.from-port,Values=3389 \ + --query 'SecurityGroups[?IpPermissions[?IpRanges[?CidrIp==`0.0.0.0/0`]]].[GroupId,GroupName]' \ + --output table + +# Get detailed security group rules +aws ec2 describe-security-groups \ + --group-ids sg-xxxxxxxxx +``` + +## Expected Result + +- SSH (port 22) and RDP (port 3389) are not open to 0.0.0.0/0 +- Only necessary ports are open +- Source IPs are restricted to known, trusted ranges +- Outbound rules follow least privilege where possible +- Security group descriptions clearly indicate purpose + +## Remediation + +### Via AWS Management Console + +1. **Navigate to Security Groups** + - EC2 Dashboard → Security Groups + +2. **Review and Modify Inbound Rules** + - Select security group + - Click "Edit inbound rules" + - Remove or restrict overly permissive rules + - For SSH/RDP, limit source to specific IP ranges (e.g., corporate VPN) + +3. **Configure Appropriate Rules** + - Allow only necessary traffic + - Use specific CIDR blocks instead of 0.0.0.0/0 + - Consider using security group references for internal traffic + +### Via AWS CLI + +```bash +# Revoke overly permissive SSH rule +aws ec2 revoke-security-group-ingress \ + --group-id sg-xxxxxxxxx \ + --protocol tcp \ + --port 22 \ + --cidr 0.0.0.0/0 + +# Add restricted SSH rule (example: allow from corporate IP) +aws ec2 authorize-security-group-ingress \ + --group-id sg-xxxxxxxxx \ + --protocol tcp \ + --port 22 \ + --cidr 203.0.113.0/24 +``` + +## Default Value + +Default security groups deny all inbound traffic and allow all outbound traffic. Custom security groups created by users may have different configurations. + +## References + +1. [Amazon EC2 Security Groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 12.3 Securely Manage Network Infrastructure | ● | ● | ● | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | ● | ● | | + +**CIS Control v8 - 12.3 Securely Manage Network Infrastructure:** +Securely manage network infrastructure. Implementations include version-controlled-infrastructure-as-code, and the use of secure network protocols, such as SSH and HTTPS. + +**CIS Control v7 - 9.2 Ensure Only Approved Ports, Protocols and Services Are Running:** +Ensure that only network ports, protocols, and services listening on a system with validated business needs, are running on each system. + +## Notes + +- This is a **manual** control requiring review of security group configurations +- Avoid opening ports to 0.0.0.0/0 unless absolutely necessary (e.g., public web servers) +- Use AWS Systems Manager Session Manager as an alternative to direct SSH access +- Regularly audit security groups using AWS Config or third-party tools +- Consider using VPC endpoints for AWS service access instead of internet routing diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.3/SKILL.md new file mode 100644 index 0000000000..4b6388d649 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.3/SKILL.md @@ -0,0 +1,186 @@ +--- +name: cis-aws-storage-2.3 +description: "Ensure the proper configuration of EBS storage" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, ebs, encryption, kms, volume-configuration] +cis_id: "2.3" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [CWE-311] +chains_with: [cis-aws-storage-2.1, cis-aws-storage-2.4, cis-aws-storage-2.5] +prerequisites: [cis-aws-storage-2.1] +severity_boost: {} +--- + +# CIS Control 2.3: Ensure the proper configuration of EBS storage (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +All computer instances need to have a device on which to store files. EBS is built on top of EC2 instances as a block storage device. + +## Rationale + +Remember that we are working with cloud computing. Rather than purchasing and manually installing disk drives on a server, AWS allows you to virtually add storage using Elastic Block Store (EBS). + +Proper EBS configuration is essential for: + +- Data integrity and persistence +- Performance optimization +- Cost-effectiveness +- Security (encryption) +- Disaster recovery capability +- Operational reliability + +## Impact + +Failure to properly configure EBS storage can lead to data loss, performance issues, increased costs, security vulnerabilities, and operational downtime. Ensuring correct configuration is crucial to maintain data integrity, efficiency, cost-effectiveness, security, and reliability. + +## Audit Procedure + +### Via AWS Management Console + +1. **Open the Amazon EC2 Console** + - Navigate to the EC2 Dashboard in the AWS Management Console + +2. **Select Volumes** + - Under the "Elastic Block Store" section, select "Volumes" + +3. **Create Volume** + - Click on "Create Volume" + - Choose the volume type (e.g., General Purpose SSD (gp2), Provisioned IOPS SSD (io1), etc.) + - Specify the size and availability zone + - Optionally, configure additional settings such as IOPS, encryption, and tags + +4. **Attach Volume to Instance** + - Select the volume you created + - Click on "Actions" and choose "Attach Volume" + - Select the instance to which you want to attach the volume and specify the device name + +5. **Format and Mount the Volume (on the instance)** + - Connect to your instance using SSH + - List available disks using the command: `lsblk` + - Format the new volume (e.g., `sudo mkfs -t ext4 /dev/xvdf` for ext4 filesystem) + - Create a mount point (e.g., `sudo mkdir /mnt/data`) + - Mount the volume (e.g., `sudo mount /dev/xvdf /mnt/data`) + +6. **Configure Automatic Mounting (optional)** + - Edit the `/etc/fstab` file to add an entry for the new volume to ensure it mounts automatically on reboot + - Example entry: `/dev/xvdf /mnt/data ext4 defaults,nofail 0 2` + +### Via AWS CLI + +```bash +# List all EBS volumes +aws ec2 describe-volumes \ + --query 'Volumes[].[VolumeId,Size,VolumeType,State,Encrypted]' \ + --output table + +# Check for unencrypted volumes +aws ec2 describe-volumes \ + --filters Name=encrypted,Values=false \ + --query 'Volumes[].[VolumeId,Size,State]' \ + --output table + +# Get volume details including IOPS and throughput +aws ec2 describe-volumes \ + --volume-ids vol-xxxxxxxxx + +# Check if volumes have appropriate tags +aws ec2 describe-volumes \ + --query 'Volumes[?Tags==`null`].[VolumeId,Size]' \ + --output table +``` + +## Expected Result + +- Volumes are properly sized for workload requirements +- Volume types match performance needs (gp3/gp2 for general use, io1/io2 for high IOPS) +- Encryption is enabled for volumes containing sensitive data +- Volumes are attached to appropriate instances +- Delete on Termination is configured appropriately +- Volumes are properly tagged for management and cost tracking + +## Remediation + +### Via AWS Management Console + +Follow the audit procedure steps above to: + +1. Create volumes with appropriate configuration +2. Enable encryption for sensitive data +3. Choose correct volume type for workload +4. Configure IOPS and throughput settings +5. Set up automatic mounting where needed + +### Via AWS CLI + +```bash +# Create encrypted EBS volume +aws ec2 create-volume \ + --volume-type gp3 \ + --size 100 \ + --encrypted \ + --kms-key-id arn:aws:kms:region:account:key/key-id \ + --availability-zone us-east-1a \ + --tag-specifications 'ResourceType=volume,Tags=[{Key=Name,Value=DataVolume},{Key=Environment,Value=Production}]' + +# Modify volume type (requires volume to be in available state or attached to running instance) +aws ec2 modify-volume \ + --volume-id vol-xxxxxxxxx \ + --volume-type gp3 \ + --iops 3000 \ + --throughput 125 + +# Enable encryption for existing volume (requires snapshot and recreation) +# 1. Create snapshot +aws ec2 create-snapshot --volume-id vol-xxxxxxxxx --description "Pre-encryption snapshot" + +# 2. Copy snapshot with encryption +aws ec2 copy-snapshot \ + --source-snapshot-id snap-xxxxxxxxx \ + --source-region us-east-1 \ + --encrypted \ + --kms-key-id arn:aws:kms:region:account:key/key-id + +# 3. Create new encrypted volume from encrypted snapshot +aws ec2 create-volume \ + --snapshot-id snap-yyyyyyyyy \ + --availability-zone us-east-1a +``` + +## Default Value + +By default, new EBS volumes are not encrypted unless you enable encryption by default in your AWS account settings. + +## References + +1. [Amazon EBS Volumes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes.html) +2. [Amazon EBS Encryption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.2 Establish and Maintain a Secure Configuration Process for Network Infrastructure | ● | ● | ● | +| v7 | 11.1 Maintain Standard Security Configurations for Network Devices | | ● | ● | + +**CIS Control v8 - 4.2 Establish and Maintain a Secure Configuration Process for Network Infrastructure:** +Establish and maintain a secure configuration process for network devices. Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard. + +**CIS Control v7 - 11.1 Maintain Standard Security Configurations for Network Devices:** +Maintain standard, documented security configuration standards for all authorized network devices. + +## Notes + +- This is a **manual** control requiring configuration verification +- By following these steps, you can effectively configure and manage EBS storage for your AWS instances +- Enable EBS encryption by default for your AWS account to ensure all new volumes are encrypted +- Use AWS Config rules to monitor EBS encryption compliance +- Consider using gp3 volumes for better performance and cost optimization +- Regularly review volume utilization to avoid over-provisioning diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.4/SKILL.md new file mode 100644 index 0000000000..3296e07a14 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.4/SKILL.md @@ -0,0 +1,161 @@ +--- +name: cis-aws-storage-2.4 +description: "Ensure the creation of a new volume" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, ebs, encryption, kms, data-protection, delete-on-termination] +cis_id: "2.4" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [CWE-311, CWE-404] +chains_with: [cis-aws-storage-2.3, cis-aws-storage-2.5] +prerequisites: [cis-aws-storage-2.1] +severity_boost: {} +--- + +# CIS Control 2.4: Ensure the creation of a new volume (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +Leave the root volume unchanged and create a new volume. To ensure the security of the instance and prevent data loss, select "no" under the "delete on termination" option and encrypt your volume using AWS KMS. A default key is available for encrypting the volume. + +## Rationale + +By leaving the root volume unchanged and creating a new volume, you separate critical data from the operating system. Selecting "no" for the "delete on termination" option ensures that data on the new volume is not automatically deleted when the instance is terminated, protecting against accidental data loss. Encrypting the volume using AWS KMS adds an additional layer of security, safeguarding the data against unauthorized access. The use of a default key for encryption simplifies the process while maintaining strong security measures. + +## Impact + +Not following these steps can lead to data loss, security risks, operational disruptions, and prolonged recovery times. Setting "delete on termination" to "no" prevents data deletion upon instance termination, while encrypting the volume with AWS KMS protects against unauthorized access. Storing critical data separately from the root volume ensures operational continuity and easier recovery. + +## Audit Procedure + +### Via AWS Management Console + +To audit this configuration in AWS, follow these steps: + +1. **Access the AWS Management Console** + - Log in to your AWS account and navigate to the AWS Management Console + +2. **Review EBS Volumes** + - Go to the EC2 Dashboard and select "Volumes" under the "Elastic Block Store" section + - Check the properties of each volume to ensure that the root volume is unchanged and new volumes are created as needed + +3. **Check "Delete on Termination" Setting** + - In the "Volumes" section, select each volume and click on the "Actions" button + - Select "Modify Volume" and ensure that "Delete on Termination" is set to "no" for the critical volumes + +4. **Verify Encryption** + - In the "Volumes" section, check the "Encrypted" column to confirm that the volumes are encrypted + - For detailed information, select a volume and view its details to ensure it is encrypted using AWS KMS + +5. **Review IAM Policies** + - Navigate to the IAM Dashboard and review the policies attached to users, groups, and roles to ensure they have appropriate permissions to create, modify, and encrypt EBS volumes + +6. **Use AWS Config** + - Enable AWS Config to continuously monitor and record AWS resource configurations + - Create AWS Config rules to check for compliance with best practices, such as ensuring volumes are encrypted and "Delete on Termination" is set to "no" + +7. **Generate Reports** + - Use AWS CloudTrail to review logs of API calls made to EBS volumes, ensuring compliance with the required configurations + - Generate compliance reports using AWS Config and AWS CloudTrail to provide evidence of adherence to best practices + +### Via AWS CLI + +```bash +# Check EBS volumes and their delete on termination status +aws ec2 describe-instances \ + --query 'Reservations[].Instances[].[InstanceId,BlockDeviceMappings[]]' \ + --output json + +# Check for volumes with DeleteOnTermination=true +aws ec2 describe-instances \ + --query 'Reservations[].Instances[].BlockDeviceMappings[?Ebs.DeleteOnTermination==`true`]' \ + --output json + +# Verify encryption status +aws ec2 describe-volumes \ + --query 'Volumes[].[VolumeId,Encrypted,KmsKeyId]' \ + --output table + +# Check specific volume configuration +aws ec2 describe-volumes --volume-ids vol-xxxxxxxxx +``` + +## Expected Result + +- Root volume remains unmodified +- Additional data volumes are created separately +- Delete on Termination is set to "no" for data volumes +- Volumes containing sensitive data are encrypted with AWS KMS +- KMS keys are properly configured and rotated + +## Remediation + +### Via AWS Management Console + +1. **Volume Configurations** + - After configuring your volume, ensure the settings meet your requirements + - To secure your file system and prevent data loss, verify that the "Delete on Termination" option is set to "no," the volume is encrypted, and the KMS key is correctly specified + - For this EBS instance, we are using the default KMS key + +2. **Availability Zone Consistency** + - Ensure your EBS volume is in the same Availability Zone as your EC2 instance + - An EBS volume can only be attached to an EC2 instance within the same Availability Zone + - You can mount and unmount EBS volumes to any EC2 instance within the same zone as needed + +### Via AWS CLI + +```bash +# Modify instance attribute to disable DeleteOnTermination +aws ec2 modify-instance-attribute \ + --instance-id i-xxxxxxxxx \ + --block-device-mappings '[{ + "DeviceName": "/dev/sdf", + "Ebs": { + "DeleteOnTermination": false + } + }]' + +# Create a new encrypted volume +aws ec2 create-volume \ + --volume-type gp3 \ + --size 100 \ + --encrypted \ + --kms-key-id arn:aws:kms:region:account:key/key-id \ + --availability-zone us-east-1a + +# Attach volume to instance +aws ec2 attach-volume \ + --volume-id vol-xxxxxxxxx \ + --instance-id i-xxxxxxxxx \ + --device /dev/sdf +``` + +## Default Value + +By default, root volumes have DeleteOnTermination set to true, while additional volumes have it set to false. Encryption is not enabled by default. + +## References + +1. [Amazon EBS Volumes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes.html) +2. [Amazon EBS Encryption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.2 Establish and Maintain a Secure Configuration Process for Network Infrastructure | ● | ● | ● | +| v7 | 11.1 Maintain Standard Security Configurations for Network Devices | | ● | ● | + +## Notes + +- This is a **manual** control requiring configuration review +- By following these steps, you can effectively audit your EBS configurations to ensure data security, integrity, and operational reliability +- Always create separate volumes for data that needs to persist beyond instance lifecycle +- Use AWS Config rules to automatically detect non-compliant configurations +- Document the purpose and data classification of each volume diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.5/SKILL.md new file mode 100644 index 0000000000..cb9a6cb732 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.5/SKILL.md @@ -0,0 +1,186 @@ +--- +name: cis-aws-storage-2.5 +description: "Ensure creating snapshots of EBS volumes" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, ebs, snapshot, backup, disaster-recovery, data-replication] +cis_id: "2.5" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-2.3, cis-aws-storage-2.4] +prerequisites: [cis-aws-storage-2.1] +severity_boost: {} +--- + +# CIS Control 2.5: Ensure creating snapshots of EBS volumes (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +A snapshot is a backup of your EBS volume that captures its state at a specific point in time, storing only the data changes since the last snapshot to optimize storage costs and speed. Snapshots are crucial for data recovery, creating new EBS volumes, and replicating data across AWS regions for disaster recovery and high availability. Restoring from a snapshot allows you to create a new EBS volume and attach it to an EC2 instance in the same availability zone, ensuring data integrity and accessibility. + +## Rationale + +The rationale behind using EBS snapshots is to ensure efficient and cost-effective data backup and recovery. By capturing only the data changes since the last snapshot, storage costs are minimized and the backup process is expedited. Snapshots are essential for maintaining data integrity, facilitating quick recovery, and enabling seamless data replication across regions, thereby enhancing disaster recovery capabilities and operational resilience. + +## Impact + +Not utilizing EBS snapshots can lead to significant risks and drawbacks. Without snapshots, data recovery becomes more complex and time-consuming, increasing the risk of prolonged downtime in the event of data loss or system failure. Additionally, the absence of incremental backups can result in higher storage costs and inefficient use of resources. The lack of data replication across regions severely compromises disaster recovery efforts, making it challenging to maintain high availability and operational continuity. Overall, failing to use snapshots undermines data integrity, security, and the ability to quickly restore critical information. + +## Audit Procedure + +### Via AWS Management Console + +To audit the use of EBS snapshots in AWS, follow these steps: + +1. **Access the AWS Management Console** + - Log in to your AWS account and navigate to the AWS Management Console + +2. **Review EBS Snapshots** + - Go to the EC2 Dashboard and select "Snapshots" under the "Elastic Block Store" section + - Check the list of snapshots to ensure regular backups are being created for all critical volumes + +3. **Verify Snapshot Policies** + - Ensure that snapshot lifecycle policies are in place and configured correctly + - Go to the "Lifecycle Manager" under the EC2 Dashboard and review policies for automated snapshot creation and retention + +4. **Check Snapshot Status and Details** + - Review the status of each snapshot to ensure they are completed successfully + - Verify the details of snapshots, such as description, creation time, and the volume ID associated with each snapshot + +5. **Inspect IAM Policies and Permissions** + - Navigate to the IAM Dashboard and review the policies attached to users, groups, and roles to ensure they have appropriate permissions to create, delete, and manage snapshots + +6. **Use AWS Config Rules** + - Enable AWS Config to continuously monitor and record AWS resource configurations + - Create AWS Config rules to check for compliance with best practices, such as ensuring snapshots are created regularly and are not older than a specific period + +7. **Review AWS CloudTrail Logs** + - Use AWS CloudTrail to review logs of API calls related to EBS snapshots + - Ensure that all snapshot activities are logged and can be traced back to authorized users and roles + +8. **Generate Reports** + - Utilize AWS Config and AWS CloudTrail to generate compliance and activity reports + - Review these reports to ensure adherence to snapshot policies and identify any anomalies or unauthorized activities + +### Via AWS CLI + +```bash +# List all EBS snapshots +aws ec2 describe-snapshots --owner-ids self \ + --query 'Snapshots[].[SnapshotId,VolumeId,StartTime,State,Description]' \ + --output table + +# Find volumes without recent snapshots (example: no snapshot in last 7 days) +aws ec2 describe-volumes --query 'Volumes[].VolumeId' --output text | \ +while read volume; do + snapshot=$(aws ec2 describe-snapshots \ + --filters Name=volume-id,Values=$volume \ + --query 'Snapshots | sort_by(@, &StartTime) | [-1].StartTime' \ + --output text) + echo "Volume: $volume, Latest Snapshot: $snapshot" +done + +# Check snapshot lifecycle policies +aws dlm get-lifecycle-policies + +# Verify snapshot encryption +aws ec2 describe-snapshots --owner-ids self \ + --query 'Snapshots[?Encrypted==`false`].[SnapshotId,VolumeId]' \ + --output table +``` + +## Expected Result + +- Regular snapshots are created for all critical EBS volumes +- Snapshot lifecycle policies automate creation and retention +- Snapshots are encrypted if source volumes contain sensitive data +- Snapshots are replicated to other regions for disaster recovery +- Snapshot retention policies align with compliance requirements + +## Remediation + +### Via AWS Management Console + +To create an EBS snapshot on AWS, follow these steps: + +1. **Access the AWS Management Console** + - Log in to your AWS account and navigate to the AWS Management Console + +2. **Navigate to the EC2 Dashboard** + - In the AWS Management Console, select "EC2" from the services menu to open the EC2 Dashboard + +3. **Select the Volume** + - In the left-hand navigation pane, under "Elastic Block Store," click on "Volumes" + - Find the volume you want to snapshot from the list and select it by clicking the checkbox next to it + +4. **Create a Snapshot** + - With the volume selected, click on the "Actions" button at the top of the page + - From the dropdown menu, select "Create Snapshot" + +5. **Configure the Snapshot** + - In the "Create Snapshot" dialog box, provide a description for the snapshot. This helps identify the snapshot later + - Review the volume ID to ensure it is the correct volume + +6. **Initiate the Snapshot Creation** + - Click the "Create Snapshot" button to start the snapshot creation process + +7. **Monitor the Snapshot** + - Navigate to the "Snapshots" section under "Elastic Block Store" in the left-hand navigation pane + - Find your snapshot in the list and monitor its status. The snapshot creation process might take some time, depending on the size of the volume and the amount of data + +8. **Verify Completion** + - Once the snapshot status changes to "completed," it indicates that the snapshot has been successfully created and is available for use + +### Via AWS CLI + +```bash +# Create a snapshot manually +aws ec2 create-snapshot \ + --volume-id vol-xxxxxxxxx \ + --description "Manual backup - $(date +%Y-%m-%d)" \ + --tag-specifications 'ResourceType=snapshot,Tags=[{Key=Name,Value=DataSnapshot},{Key=Backup,Value=Manual}]' + +# Create snapshot lifecycle policy +aws dlm create-lifecycle-policy \ + --description "Daily EBS Snapshot Policy" \ + --state ENABLED \ + --execution-role-arn arn:aws:iam::ACCOUNT:role/AWSDataLifecycleManagerDefaultRole \ + --policy-details file://snapshot-policy.json + +# Copy snapshot to another region for DR +aws ec2 copy-snapshot \ + --source-snapshot-id snap-xxxxxxxxx \ + --source-region us-east-1 \ + --region us-west-2 \ + --description "DR copy" +``` + +## Default Value + +By default, no automatic snapshots are created. Users must manually create snapshots or configure Data Lifecycle Manager (DLM) policies. + +## References + +1. [Creating EBS Snapshots](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html) +2. [Automating the Amazon EBS Snapshot Lifecycle](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 11.1 Establish and Maintain a Data Recovery Process | ● | ● | ● | +| v7 | 10.1 Ensure Regular Automated Back Ups | ● | ● | ● | + +## Notes + +- This is a **manual** control requiring snapshot verification +- By following these steps, you can create an EBS snapshot to ensure you have a backup of your volume at a specific point in time +- Use AWS Data Lifecycle Manager to automate snapshot creation and retention +- Test snapshot restoration regularly to ensure recovery procedures work +- Consider using AWS Backup for centralized snapshot management across services diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.6/SKILL.md new file mode 100644 index 0000000000..83c9986c71 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.6/SKILL.md @@ -0,0 +1,70 @@ +--- +name: cis-aws-storage-2.6 +description: "Ensure Proper IAM Configuration for EC2 Instances" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, ebs, ec2, iam, access-control, mfa, least-privilege] +cis_id: "2.6" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [CWE-284, CWE-287] +chains_with: [cis-aws-storage-2.7, cis-aws-storage-2.8, cis-aws-storage-2.9] +prerequisites: [] +severity_boost: {} +--- + +# CIS Control 2.6: Ensure Proper IAM Configuration for EC2 Instances (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +IAM, or Identity and Access Management, is a vital security service used to control and manage access to AWS resources, ensuring only authorized users and services can interact with them. It allows you to create users and groups, set permissions, enforce multi-factor authentication, and implement least privilege principles to enhance security and compliance. + +## Rationale + +The rationale behind using IAM is to enhance security by controlling and managing access to AWS resources, ensuring that only authorized users and services can interact with them. This minimizes the risk of unauthorized access and potential security breaches, while also allowing for the implementation of best practices such as multi-factor authentication and least privilege principles, which further strengthen the security and compliance of your AWS environment. + +## Impact + +Not implementing IAM properly can lead to significant security vulnerabilities, including unauthorized access to AWS resources, data breaches, and potential loss of sensitive information. Without IAM, it is challenging to enforce access controls, monitor user activity, and implement security best practices such as multi-factor authentication and least privilege principles. This can result in increased risk of malicious attacks, operational disruptions, non-compliance with regulatory requirements, and substantial financial damage. + +## Audit Procedure + +See detailed audit steps in the full control documentation including: + +1. Access the AWS Management Console +2. Review IAM Users and Roles +3. Check IAM Policies +4. Analyze IAM Groups +5. Examine MFA Settings +6. Audit IAM Activity +7. Implement AWS Config Rules +8. Generate IAM Reports +9. Conduct Regular Reviews + +## Remediation + +1. Restrict Overly Permissive Policies +2. Enable Multi-Factor Authentication (MFA) +3. Rotate Access Keys +4. Remove Unnecessary Users and Roles +5. Implement Role-Based Access Control (RBAC) +6. Regularly Review and Update IAM Policies +7. Enable AWS CloudTrail and AWS Config +8. Conduct Security Awareness Training +9. Implement IAM Access Analyzer + +## References + +1. [AWS IAM Roles for EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | ● | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts | | ● | ● | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.7/SKILL.md new file mode 100644 index 0000000000..594256e3f9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.7/SKILL.md @@ -0,0 +1,202 @@ +--- +name: cis-aws-storage-2.7 +description: "Ensure creating IAM User" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, iam, iam-user, identity-verification, access-control] +cis_id: "2.7" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [CWE-284] +chains_with: [cis-aws-storage-2.6, cis-aws-storage-2.8, cis-aws-storage-2.9] +prerequisites: [] +severity_boost: {} +--- + +# CIS Control 2.7: Ensure creating IAM User (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +IAM users are individuals whose accounts have been created by the AWS administrator, providing them with access to specific AWS resources. These users have undergone identity verification with your organization, ensuring that only authorized personnel can manage and interact with your AWS environment. + +## Rationale + +The purpose of creating IAM users and verifying their identities with your organization is to ensure that only authorized individuals have access to AWS resources, enhancing security and preventing unauthorized access. This practice helps maintain control over your AWS environment, ensuring that sensitive data and critical operations are managed by trusted and validated personnel. + +## Impact + +Not creating IAM users and verifying their identities can lead to unauthorized access to your AWS resources, increasing the risk of security breaches and data leaks. This lack of control can result in compromised sensitive data, unauthorized changes to critical systems, and overall reduced security posture, potentially causing significant operational and financial damage to your organization. + +## Audit Procedure + +### Via AWS Management Console + +1. **Access the AWS Management Console** + - Log in to your AWS account and navigate to the AWS Management Console + +2. **Review IAM Users** + - Go to the IAM Dashboard and select "Users" + - Check the list of IAM users to ensure that only authorized users are present + +3. **Check User Details** + - For each user, click on their name to view their details + - Verify the "User ARN" and ensure that the user was created by an authorized administrator + - Check the "Security credentials" tab to see if Multi-Factor Authentication (MFA) is enabled for added security + +4. **Verify Identity Policies** + - Review the policies attached to each user to ensure they are appropriate for the user's role + - Check that permissions follow the principle of least privilege, granting only the necessary access + +5. **Monitor Login Activity** + - Use AWS CloudTrail to review login activities for each IAM user + - Check for any unusual login patterns or unauthorized access attempts + +6. **Use AWS IAM Access Analyzer** + - Enable IAM Access Analyzer to identify any IAM resources shared outside your AWS account + - Review findings to ensure that only verified and authorized users have access to your resources + +7. **Generate IAM Credential Reports** + - In the IAM Dashboard, go to "Credential reports" and generate a report + - Review the report for details on all IAM users, including their access key age, password age, and MFA status + +8. **Implement AWS Config Rules** + - Enable AWS Config to continuously monitor IAM configurations + - Create and apply AWS Config rules to check for compliance with identity verification and user management best practices + +9. **Review IAM Roles and Groups** + - Ensure that roles and groups are properly configured and assigned only to authorized users + - Verify that roles have the correct trust relationships and that group memberships are appropriate for the user's responsibilities + +10. **Schedule Regular Audits** + - Set up regular intervals to audit IAM users and their access rights + - Keep records of audit findings and remediation actions to maintain a secure and compliant AWS environment + +### Via AWS CLI + +```bash +# List all IAM users +aws iam list-users --query 'Users[].[UserName,CreateDate,PasswordLastUsed]' --output table + +# Get details of specific user +aws iam get-user --user-name + +# Check if user has MFA enabled +aws iam list-mfa-devices --user-name + +# List policies attached to user +aws iam list-attached-user-policies --user-name + +# List access keys for user +aws iam list-access-keys --user-name + +# Generate credential report +aws iam generate-credential-report +aws iam get-credential-report --query 'Content' --output text | base64 -d +``` + +## Expected Result + +- Only authorized IAM users exist in the account +- All users have undergone identity verification +- Users have appropriate MFA enabled +- Access keys are rotated regularly +- Permissions follow least privilege principle + +## Remediation + +### Via AWS Management Console + +1. **Remove Unauthorized Users** + - Go to the IAM Dashboard, select "Users," and review the list of users + - Identify any unauthorized or unverified users and delete their accounts to prevent unauthorized access + +2. **Enable Multi-Factor Authentication (MFA)** + - For each IAM user, go to the "Security credentials" tab and enable MFA + - Ensure all users have MFA configured to enhance security and reduce the risk of unauthorized access + +3. **Update User Policies** + - Review the policies attached to each IAM user + - Modify policies to follow the principle of least privilege, ensuring users have only the permissions necessary for their role + - Remove any overly permissive policies that could lead to security risks + +4. **Rotate Access Keys** + - For IAM users with long-lived access keys, create new keys and update the applications or services using them + - In the IAM Dashboard, select "Users," go to the "Security credentials" tab, and create new access keys. Then, disable and delete old access keys after confirming the new keys are functioning correctly + +5. **Review and Correct IAM Roles and Groups** + - Ensure IAM roles are assigned only to authorized users and that trust relationships are properly configured + - Check group memberships and remove users who should not be part of specific groups + - Update role policies to adhere to the principle of least privilege + +6. **Configure AWS Access Analyzer** + - Enable IAM Access Analyzer to continuously monitor and analyze access to your IAM resources + - Address any findings related to unauthorized or overly broad access permissions + +7. **Implement and Enforce IAM Policies** + - Create and enforce organizational IAM policies that require identity verification for all users + - Use AWS Organizations and Service Control Policies (SCPs) to enforce these policies across all accounts within your organization + +8. **Enable AWS Config and Create Compliance Rules** + - Enable AWS Config to monitor IAM configurations and compliance + - Create AWS Config rules to ensure users have MFA enabled, policies adhere to least privilege, and access keys are rotated regularly + +9. **Conduct Regular Training** + - Provide regular security awareness training for all users to emphasize the importance of secure IAM practices + - Educate users on how to properly use IAM features and the significance of identity verification + +10. **Schedule Regular Reviews and Audits** + - Establish a schedule for regular audits of IAM configurations and access controls + - Document findings and remediation actions taken during each audit + - Continuously improve your IAM practices based on audit results and evolving security threats + +### Via AWS CLI + +```bash +# Create new IAM user +aws iam create-user --user-name + +# Attach policy to user +aws iam attach-user-policy \ + --user-name \ + --policy-arn arn:aws:iam::aws:policy/ReadOnlyAccess + +# Enable MFA (requires MFA device configuration) +aws iam enable-mfa-device \ + --user-name \ + --serial-number arn:aws:iam::ACCOUNT:mfa/ \ + --authentication-code-1 \ + --authentication-code-2 + +# Delete unauthorized user +aws iam delete-user --user-name +``` + +## Default Value + +No IAM users exist by default. Users must be created by administrators. + +## References + +1. [Creating IAM Users](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------- | ---- | ---- | ---- | +| v8 | 6.1 Establish an Access Granting Process | ● | ● | ● | + +**CIS Control v8 - 6.1 Establish an Access Granting Process:** +Establish and follow a process, preferably automated, for granting access to enterprise assets upon new hire, rights grant, or role change of a user. + +## Notes + +- This is a **manual** control requiring identity verification processes +- All IAM users should represent real, verified individuals +- Avoid creating generic or shared user accounts +- Implement automated user lifecycle management where possible +- Document user onboarding and offboarding procedures diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.8/SKILL.md new file mode 100644 index 0000000000..fe7e7542b0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.8/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-aws-storage-2.8 +description: "Ensure the Creation of IAM Groups" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, iam, iam-group, rbac, access-management] +cis_id: "2.8" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [CWE-284] +chains_with: [cis-aws-storage-2.7, cis-aws-storage-2.9] +prerequisites: [] +severity_boost: {} +--- + +# CIS Control 2.8: Ensure the Creation of IAM Groups (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +IAM Groups are collections of users that share the same permissions for accessing AWS resources. For instance, you can create a group named "Administrators," which includes users who require full access to your AWS environment. This simplifies permission management by assigning common access policies to all members of the group. + +## Rationale + +IAM groups in AWS simplify permission management by grouping users with similar access needs and applying common access policies, reducing administrative overhead and enhancing security through the principle of least privilege. This approach ensures consistency, scalability, and ease of auditing, strengthening the overall security posture of the AWS environment. + +## Audit Procedure + +### Via AWS Management Console + +1. Enable AWS CloudTrail +2. Review CloudTrail Logs +3. Utilize AWS Config +4. Check IAM Console + +### Via AWS CLI + +\`\`\`bash +aws iam list-groups +aws iam get-group --group-name +aws iam list-attached-group-policies --group-name +\`\`\` + +## Remediation + +### Via AWS CLI + +\`\`\`bash + +# Create IAM group + +aws iam create-group --group-name Administrators + +# Attach policy to group + +aws iam attach-group-policy \ + --group-name Administrators \ + --policy-arn arn:aws:iam::aws:policy/AdministratorAccess + +# Add user to group + +aws iam add-user-to-group \ + --user-name \ + --group-name Administrators +\`\`\` + +## References + +1. [Creating IAM Groups](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_create.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | ● | +| v7 | 16.1 Maintain an Inventory of Authentication Systems | | ● | ● | +| v7 | 16.2 Configure Centralized Point of Authentication | | ● | ● | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.9/SKILL.md new file mode 100644 index 0000000000..6edc489f98 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-2.9/SKILL.md @@ -0,0 +1,61 @@ +--- +name: cis-aws-storage-2.9 +description: "Ensure Granular Policy Creation" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, iam, iam-policy, least-privilege, granular-access] +cis_id: "2.9" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [CWE-284] +chains_with: [cis-aws-storage-2.8, cis-aws-storage-2.10] +prerequisites: [] +severity_boost: {} +--- + +# CIS Control 2.9: Ensure Granular Policy Creation (Manual) + +## Profile Applicability + +- **Level 2** + +## Description + +Granular policies are meticulously tailored to AWS resources, ensuring precision in access control measures. + +## Rationale + +Emphasizing granular policies in AWS ensures that access control measures are precisely aligned with the requirements of each resource, bolstering security and minimizing unauthorized access. By tailoring policies to specific resources, organizations can adhere more closely to the principle of least privilege, mitigating risks and maintaining compliance with regulatory standards. + +## Audit Procedure + +### Via AWS CLI + +\`\`\`bash + +# Review IAM policies for granularity + +aws iam list-policies --scope Local + +# Examine policy document + +aws iam get-policy-version \ + --policy-arn \ + --version-id +\`\`\` + +## Remediation + +Review existing IAM policies to identify those that are overly broad or lack granularity. Refine these policies to restrict permissions to only the resources and actions necessary for each user or group. + +## References + +1. [IAM Policy Tags](https://docs.aws.amazon.com/tag-editor/latest/userguide/tags-in-iam-policies.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | ● | +| v7 | 16.2 Configure Centralized Point of Authentication | | ● | ● | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.1/SKILL.md new file mode 100644 index 0000000000..612a4a614a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.1/SKILL.md @@ -0,0 +1,88 @@ +--- +name: cis-aws-storage-3.1 +description: "EFS - Ensure AWS EFS is implemented for file system deployment" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, file-system, managed-storage] +cis_id: "3.1" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.2, cis-aws-storage-3.3] +prerequisites: [] +severity_boost: {} +--- + +# 3.1 EFS (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +AWS EFS is a scalable and fully-managed storage service that enables you to quickly deploy file systems without the hassle of configuring, patching, or maintaining them. + +## Rationale + +Utilize AWS EFS to streamline your file system deployment, allowing the service to handle the heavy lifting for you. + +## Impact + +Not using AWS EFS for your file system deployment can lead to increased management overhead, as you'll need to manually configure, patch, and maintain the systems. This manual effort is time-consuming and complex, raising the potential for errors that could result in downtime and data loss. By not leveraging AWS EFS, you miss out on the streamlined, automated management and scalability that the service provides, potentially impacting your operational efficiency and reliability. + +## Audit Procedure + +### Console + +To create an Amazon EFS (Elastic File System), you can follow these steps: + +1. Sign in to the AWS Management Console and navigate to the Amazon EFS console - https://us-east-2.console.aws.amazon.com/efs?region=us-east-2#/get-started +2. Click on the "Create file system" button. +3. Enter a name for your file system. +4. Choose a VPC for your file system +5. Then you have to go to File system settings to edit configurations, then you have to select Lifecycle management, performance settings and File system protection, and then click save changes. + +## Expected Result + +AWS EFS file system should be created and configured with appropriate lifecycle management, performance settings, and file system protection enabled. + +## Remediation + +### Console + +To create an Amazon EFS (Elastic File System), follow these steps: + +1. **Open the Amazon EFS Console**: Sign in to your AWS Management Console and navigate to the Amazon EFS service. + +2. **Create File System**: Click on the "Create file system" button to start the creation process. + +3. **Configure File System**: Select your desired VPC (Virtual Private Cloud) and availability zones for the file system. Optionally, you can configure settings like throughput mode and lifecycle management. + +4. **Configure Access Points**: Set up access points if needed, to control access permissions and streamline access management. + +5. **Review and Create**: Review your settings and click on the "Create" button to create the file system. + +6. **Mount the File System**: Once created, use the provided mount targets and instructions to mount the file system to your EC2 instances or other resources. + +## Default Value + +By default, AWS does not automatically create EFS file systems. File systems must be explicitly created and configured by the user. + +## References + +1. https://us-east-2.console.aws.amazon.com/efs?region=us-east-2#/get-started + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.1 Establish and Maintain a Secure Configuration Process
Establish and maintain a secure configuration process for enterprise assets (end-user devices, including portable and mobile, non-computing/IoT devices, and servers) and software (operating systems and applications). Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard. | ● | ● | ● | +| v8 | 7.3 Perform Automated Operating System Patch Management
Perform operating system updates on enterprise assets through automated patch management on a monthly, or more frequent, basis. | ● | ● | ● | +| v7 | 3.4 Deploy Automated Operating System Patch Management Tools
Deploy automated software update tools in order to ensure that the operating systems are running the most recent security updates provided by the software vendor. | ● | ● | ● | +| v7 | 5.4 Deploy System Configuration Management Tools
Deploy system configuration management tools that will automatically enforce and redeploy configuration settings to systems at regularly scheduled intervals. | | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.10/SKILL.md new file mode 100644 index 0000000000..f0920899a1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.10/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-aws-storage-3.10 +description: "Ensure managing AWS EFS access points" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, access-points, access-control, iam] +cis_id: "3.10" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.7, cis-aws-storage-3.11] +prerequisites: [] +severity_boost: {} +--- + +# 3.10 Ensure managing AWS EFS access points (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +EFS access points serve as gateways to your EFS file system, allowing applications to interact with the file system across various resources. Proper configuration of these access points within your applications is crucial to ensure seamless and secure access. By configuring EFS access points, you can control and manage which users have access to specific resources in your EFS environment, enhancing security and operational efficiency. + +## Rationale + +The rationale behind properly configuring EFS access points is to ensure secure and efficient interaction between your applications and the EFS file system. By setting up these access points correctly, you can control and manage user permissions, ensuring that only authorized users can access specific resources. This not only enhances the security of your data but also improves operational efficiency by preventing unauthorized access and potential data breaches. + +## Impact + +Without properly configured EFS access points, you may experience inefficient and insecure access to your EFS file system. This can lead to unauthorized users gaining access to sensitive data, resulting in potential data breaches and security vulnerabilities. Additionally, improper configuration can cause operational inefficiencies, as managing user permissions becomes more complex and error-prone, ultimately impacting the overall security and performance of your infrastructure. + +## Audit Procedure + +### Console + +1. **Creating an EFS access point**: + You can create an EFS access point through the Amazon CLI, AWS console, and with the EFS API. An EFS can only have up to 1,000 access points. + +2. **Mounting an EFS access point**: + Consult the section where we mounted an EFS file system on an EC2 instance. While inside the resource you want to configure an access point for, type in this command: + + ``` + mount -t efs -o tls,iam,accesspoint=fsap-abcdef0123456789a fs-abc0123def456789a: /localmountpoint + ``` + +3. **Enforcing a User Identity with an EFS access point**: + You can enforce user identity to ensure that users and groups with proper permissions are able to access the EFS system. In order to do this, you must specify the user and group ID you wish to have ownership of the files. + + When `enforcement` is enabled, that file that is was created by the user will automatically show ownership belong to the user. When enforcement is enabled, the access point considers the User ID, group ID, and secondary group ID. It ignored the NFS client's ID. + +4. **Enforcing a root directory with an access point**: + If you wish to override the root directory of the EFS, you can make the root directory that of the access point. To enforce the root directory with an access point, you must specify three things upon provisioning the EFS mount point: + - Owner UID + - Group GID + - Permissions + + To access an EFS from an access point, a root directory must be created and enforced. Reminder: You must specify permissions for the access point root directory. If these permissions are not defined, a root directory will not be created on the mount point, and you will not be able to access EFS from an access point. + +5. **Security Model for access point root directories**: + When a root directory override is in effect, the EFS behaves like a Linux server with a no_subtree_check option enabled. + +## Expected Result + +- EFS access points should be properly configured +- User identity enforcement should be configured when required +- Root directory should be properly configured with owner UID, group GID, and permissions +- Access points should not exceed the limit of 1,000 per file system +- Proper mount commands should be used with IAM authentication + +## Remediation + +### Console + +Implement AWS EFS access points: + +1. Create EFS access points via AWS Console, CLI, or API +2. Configure user identity enforcement with proper user/group IDs +3. Set up root directory override with: + - Owner UID + - Group GID + - Permissions +4. Mount access points using proper IAM authentication: + ``` + mount -t efs -o tls,iam,accesspoint=fsap-abcdef0123456789a fs-abc0123def456789a: /localmountpoint + ``` +5. Verify access point configuration and permissions + +## Default Value + +EFS access points are not created by default. Users must explicitly create and configure access points, including user identity enforcement and root directory settings. + +## References + +1. https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 6.8 Define and Maintain Role-Based Access Control
Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | +| v7 | 14.7 Enforce Access Control to Data through Automated Tools
Use an automated tool, such as host-based Data Loss Prevention, to enforce access controls to data even when data is copied off a system. | | | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.11/SKILL.md new file mode 100644 index 0000000000..545ca2a41d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.11/SKILL.md @@ -0,0 +1,132 @@ +--- +name: cis-aws-storage-3.11 +description: "Ensure accessing Points and IAM Policies for EFS" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, iam, access-points, elasticfilesystem, access-control] +cis_id: "3.11" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.10] +prerequisites: [] +severity_boost: {} +--- + +# 3.11 Ensure accessing Points and IAM Policies (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +You can use IAM policies to control access to your EFS access points. To achieve this, utilize the `elasticfilesystem:AccessPointArn` IAM condition key. The `AccessPointArn` represents the Amazon Resource Name (ARN) of the access point that the file system is mounted with. + +## Rationale + +The rationale for using IAM policies with the `elasticfilesystem:AccessPointArn` condition key is to ensure precise and secure access control to EFS access points. By specifying the access point's ARN, you can restrict interactions to authorized users and resources only, thereby enhancing data security and preventing unauthorized access. This approach maintains the integrity and confidentiality of your data within the AWS environment. + +## Impact + +Without using IAM policies with the `elasticfilesystem:AccessPointArn` condition key, access control to EFS access points becomes less precise, increasing the risk of unauthorized access. This lack of granular control can lead to potential security breaches, data exposure, and compliance violations. Consequently, your organization may face data integrity issues, financial losses, and damage to its reputation. + +## Audit Procedure + +### Console + +Below is a sample IAM policy copied from the AWS documentation: + +```json +{ + "Version": "2012-10-17", + "Id": "MyFileSystemPolicy", + "Statement": [ + { + "Sid": "App1Access", + "Effect": "Allow", + "Principal": { "AWS": "arn:aws:iam::111122223333:role/app1" }, + "Action": ["elasticfilesystem:ClientMount", "elasticfilesystem:ClientWrite"], + "Condition": { + "StringEquals": { + "elasticfilesystem:AccessPointArn": "arn:aws:elasticfilesystem:us-east-1:222233334444:access-point/fsap-01234567" + } + } + }, + { + "Sid": "App2Access", + "Effect": "Allow", + "Principal": { "AWS": "arn:aws:iam::111122223333:role/app2" }, + "Action": ["elasticfilesystem:ClientMount", "elasticfilesystem:ClientWrite"], + "Condition": { + "StringEquals": { + "elasticfilesystem:AccessPointArn": "arn:aws:elasticfilesystem:us-east-1:222233334444:access-point/fsap-89abcdef" + } + } + } + ] +} +``` + +This policy demonstrates: + +- Using the `elasticfilesystem:AccessPointArn` condition to restrict access to specific access points +- Granting `ClientMount` and `ClientWrite` permissions to specific IAM roles +- Associating different roles with different access points + +## Expected Result + +- IAM policies should use the `elasticfilesystem:AccessPointArn` condition key +- Policies should restrict access to specific access points via their ARN +- Only authorized principals should have ClientMount and ClientWrite permissions +- Each access point should have appropriate IAM policy restrictions + +## Remediation + +### Console + +Implement IAM policies that use the `elasticfilesystem:AccessPointArn` condition key: + +1. Create or update IAM policies for EFS access +2. Include the `elasticfilesystem:AccessPointArn` condition key +3. Specify the ARN of the access point in the condition +4. Grant only necessary permissions (ClientMount, ClientWrite, etc.) +5. Assign policies to appropriate IAM roles/users +6. Review and test access control regularly + +Example policy structure: + +```json +{ + "Effect": "Allow", + "Principal": { "AWS": "arn:aws:iam::ACCOUNT:role/ROLE" }, + "Action": ["elasticfilesystem:ClientMount", "elasticfilesystem:ClientWrite"], + "Condition": { + "StringEquals": { + "elasticfilesystem:AccessPointArn": "arn:aws:elasticfilesystem:REGION:ACCOUNT:access-point/ACCESS_POINT_ID" + } + } +} +``` + +## Default Value + +By default, no IAM policies are automatically created for EFS access points. Users must explicitly create and configure IAM policies with appropriate condition keys to control access. + +## References + +1. https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 6.8 Define and Maintain Role-Based Access Control
Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | ● | +| v7 | 1.7 Deploy Port Level Access Control
Utilize port level access control, following 802.1x standards, to control which devices can authenticate to the network. The authentication system shall be tied into the hardware asset inventory data to ensure only authorized devices can connect to the network. | | ● | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.12/SKILL.md new file mode 100644 index 0000000000..cc53bd214b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.12/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-aws-storage-3.12 +description: "Ensure configuring IAM for AWS Elastic Disaster Recovery" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, disaster-recovery, iam, drs, replication, failback] +cis_id: "3.12" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.12 Ensure configuring IAM for AWS Elastic Disaster Recovery (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Before installing the AWS Elastic Disaster Recovery client, you need to configure AWS IAM permissions and users for both the AWS Replication and AWS Failback Client. + +## Rationale + +Configuring AWS IAM permissions and users before installing the AWS Elastic Disaster Recovery client ensures that the AWS Replication and AWS Failback Client have the necessary access rights. This setup is essential for maintaining security and preventing unauthorized access. Proper IAM configuration guarantees the smooth operation of disaster recovery processes, safeguarding your data and ensuring system reliability. + +## Impact + +Without proper IAM configuration for AWS Elastic Disaster Recovery, the AWS Replication and AWS Failback Client may lack the necessary access rights, leading to failed disaster recovery operations. This can result in data loss, prolonged downtime, and compromised system reliability. Additionally, inadequate IAM permissions increase the risk of unauthorized access, potentially exposing sensitive data and causing security breaches. Consequently, your organization may face significant operational disruptions, financial losses, and damage to its reputation. + +## Audit Procedure + +### Console + +To create DRS Agent User, follow following steps: + +1. Navigate to the AWS IAM Console - https://us-east-1.console.aws.amazon.com/iam/home?region=us-east-1#/home +2. Create new user. This user will only be able to access the Elastic disaster recovery agent installation resource. Accordingly, name the user "DSRuser". +3. Allow Programmatic access: This allows the user to access resources programmatically with a secure key rather than having to enter a password. +4. Select "attach policies directly" and search for "AWSElasticDisasterRecoveryAgentInstallationPolicy". +5. Create user. + +To create Failback Agent User, Follow the steps above with these two modifications: + +1. Name the user "FailbackAgentuser". +2. Apply the "AWSElasticDisasterRecoveryFailbackInstallationPolicy". + +## Expected Result + +- IAM user "DSRuser" should be created with programmatic access +- "AWSElasticDisasterRecoveryAgentInstallationPolicy" should be attached to DSRuser +- IAM user "FailbackAgentuser" should be created with programmatic access +- "AWSElasticDisasterRecoveryFailbackInstallationPolicy" should be attached to FailbackAgentuser +- Both users should have appropriate access keys configured + +## Remediation + +### Console + +Configure IAM Credentials for AWS Elastic Disaster Recovery: + +1. **Create DRS Agent User**: + - Navigate to AWS IAM Console: https://us-east-1.console.aws.amazon.com/iam/home?region=us-east-1#/home + - Create new user named "DSRuser" + - Enable "Programmatic access" + - Attach policy: "AWSElasticDisasterRecoveryAgentInstallationPolicy" + - Create user and save access keys + +2. **Create Failback Agent User**: + - Create new user named "FailbackAgentuser" + - Enable "Programmatic access" + - Attach policy: "AWSElasticDisasterRecoveryFailbackInstallationPolicy" + - Create user and save access keys + +3. **Secure Access Keys**: + - Store access keys securely + - Rotate keys regularly + - Monitor usage via CloudTrail + +## Default Value + +By default, AWS does not create IAM users or attach policies for Elastic Disaster Recovery. Users must explicitly create these IAM users and attach the required managed policies. + +## References + +1. https://us-east-1.console.aws.amazon.com/iam/home?region=us-east-1#/home + +## CIS Controls + +This control does not have specific CIS Controls mappings in the original document, but it aligns with general IAM and disaster recovery best practices. + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.2/SKILL.md new file mode 100644 index 0000000000..e48e5d9107 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.2/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-aws-storage-3.2 +description: "Ensure Implementation of EFS for managed file system deployment" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, file-system, automation, nfs] +cis_id: "3.2" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.1, cis-aws-storage-3.3, cis-aws-storage-3.7] +prerequisites: [] +severity_boost: {} +--- + +# 3.2 Ensure Implementation of EFS (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +AWS EFS is a fully managed storage service that enables rapid file system deployment without the need for configuration, patching, or maintenance. + +## Rationale + +The rationale behind using AWS EFS is to simplify and expedite the deployment of file systems, eliminating the need for manual configuration, patching, and maintenance. This allows you to focus on other critical aspects of your operations while benefiting from a reliable, scalable, and fully managed storage solution. + +## Impact + +Not using AWS EFS can lead to increased complexity and time-consuming manual management for configuration, patching, and maintenance. This raises the risk of human error, system downtime, and data loss, while also making it more challenging to scale your file systems efficiently. + +## Audit Procedure + +### Console + +1. Navigate to console - https://us-east-1.console.aws.amazon.com/efs/home?region=us-east-1#/get-started +2. Select "Create File System". Give the file system a name and select the default VPC. Select "Create". +3. Encrypting data at rest - The EFS is encrypted automatically upon creation. +4. Attach the EFS to an EC2 instance. +5. Navigate to file system details - Select the radio box next to the file system that was just created and select "view details". +6. Creating an NFS directory on your EC2 instance - Launch your EC2 instance. Once connected, Type following command: + ``` + sudo mkdir efs + ``` + to create a new efs directory. +7. Mounting an NFS directory on your EC2 instance - Navigate to find your EC2 DNS information. Paste this command into the console after making the efs directory: + ``` + sudo mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport mount-target-DNS:/ ~/efs-mount-point + ``` + NOTE: The encryption takes place as soon as you mount the directory. This encrypts the data in transit. +8. Terminating the EC2 instance - The EFS file system that was just mounted doesn't persist on reboot. You can consult the AWS documentation to see how you can write a script to automatically mount the file system upon every reboot. + +## Expected Result + +- EFS file system should be created successfully +- Encryption at rest should be enabled by default +- NFS directory should be created and mounted on EC2 instance +- Data should be encrypted in transit when mounting + +## Remediation + +### Console + +To remediate the issues of manual file system management, follow these steps to create and use Amazon EFS: + +1. **Open the Amazon EFS Console**: Sign in to the AWS Management Console and navigate to the Amazon EFS service. + +2. **Create a New File System**: Click on "Create file system" to start the setup process. + +3. **Configure Settings**: Select your desired VPC, availability zones, throughput mode, and any additional settings like lifecycle management. + +4. **Set Up Access Points**: Configure access points to control permissions and simplify access management. + +5. **Review and Create**: Verify your settings and click "Create" to finalize the file system setup. + +6. **Mount the File System**: Use the provided mount targets and instructions to attach the file system to your EC2 instances or other resources. + +## Default Value + +By default, AWS does not automatically create or configure EFS file systems. Users must explicitly create EFS file systems and configure encryption, which is enabled by default upon creation. + +## References + +1. https://aws.amazon.com/efs/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest
Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data. | | ● | ● | +| v8 | 8.3 Ensure Adequate Audit Log Storage
Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process. | ● | ● | ● | +| v7 | 5.2 Maintain Secure Images
Maintain secure images or templates for all systems in the enterprise based on the organization's approved configuration standards. Any new system deployment or existing system that becomes compromised should be imaged using one of those images or templates. | | ● | ● | +| v7 | 13.4 Only Allow Access to Authorized Cloud Storage or Email Providers
Only allow access to authorized cloud storage or email providers. | | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.3/SKILL.md new file mode 100644 index 0000000000..e2d932d568 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.3/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-aws-storage-3.3 +description: "Ensure EFS and VPC Integration for redundancy and scalability" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, vpc, ec2, redundancy, scalability, availability] +cis_id: "3.3" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.1, cis-aws-storage-3.2, cis-aws-storage-3.7] +prerequisites: [] +severity_boost: {} +--- + +# 3.3 Ensure EFS and VPC Integration (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +You can use EFS as a network file system across availability zones on a virtual private cloud. This capability allows the organization to create a highly available file sharing solution. Leveraging AWS VPC and EC2 in tandem with AWS EFS makes for a highly available and scalable cloud file storage solution. + +## Rationale + +Redundancy and scalability are crucial for maintaining uninterrupted services. By integrating these AWS services, users can harness the full power of AWS, ensuring a resilient and scalable infrastructure. + +## Impact + +Not integrating AWS services for redundancy and scalability can lead to service disruptions and increased downtime. This approach also limits your ability to efficiently handle growing workloads, negatively impacting performance and user experience. + +## Audit Procedure + +### Audit Procedures for AWS Redundancy and Scalability + +1. **Create Mount Targets in Each Availability Zone**: Ensure EFS is attached in each availability zone by creating mount targets in each subnet. Although multiple subnets can exist per availability zone, verify that EFS is configured to work with one subnet per zone to maintain redundancy. + +2. **Monitor EFS with CloudWatch**: Use AWS CloudWatch to automatically monitor your EFS service. Check that alarms are configured and logs and events are tracked effectively, providing real-time insights into the performance and health of your file systems. + +## Expected Result + +- Mount targets should exist in each availability zone +- EFS should be configured for high availability across multiple subnets +- CloudWatch monitoring should be enabled with appropriate alarms configured + +## Remediation + +### Console + +Create an EC2 instance in each availability zone within your VPC. + +## Default Value + +By default, AWS does not automatically create mount targets in all availability zones. Users must explicitly configure EFS mount targets for each desired availability zone to ensure redundancy. + +## References + +1. https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-conceptual + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest
Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data. | | ● | ● | +| v8 | 16.7 Use Standard Hardening Configuration Templates for Application Infrastructure
Use standard, industry-recommended hardening configuration templates for application infrastructure components. This includes underlying servers, databases, and web servers, and applies to cloud containers, Platform as a Service (PaaS) components, and SaaS components. Do not allow in-house developed software to weaken configuration hardening. | | ● | ● | +| v7 | 13.4 Only Allow Access to Authorized Cloud Storage or Email Providers
Only allow access to authorized cloud storage or email providers. | | ● | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.4/SKILL.md new file mode 100644 index 0000000000..f6ad3ff527 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.4/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-aws-storage-3.4 +description: "Ensure controlling Network access to EFS Services" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, network-security, security-groups, nacl, iam] +cis_id: "3.4" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.5, cis-aws-storage-3.6, cis-aws-storage-3.8] +prerequisites: [] +severity_boost: {} +--- + +# 3.4 Ensure controlling Network access to EFS Services (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +It's important that you secure access to your resources on your AWS VPC network. There are several ways to ensure that control what traffic is accessing your resources. Some of which include tightening down network layer security using a Security Group and a NACL within the VPC console. You can also tighten down Security Groups within your EC2 console and by using AWS IAM. Maintaining network security is a high priority to ensure that no unauthorized users can access the data stored on your EFS service. + +## Rationale + +Maintaining network security is a best practice essential for keeping your data safe and secure. + +## Impact + +Failing to maintain network security can lead to significant vulnerabilities, exposing your data to unauthorized access, breaches, and potential data loss. This can result in severe financial, operational, and reputational damage to your organization. + +## Audit Procedure + +### Console + +Verify that appropriate network access controls are implemented for EFS services: + +1. Review Security Groups and Network ACLs +2. Verify IAM policies restrict EFS access appropriately +3. Ensure only authorized traffic can reach EFS mount targets + +## Expected Result + +- Security Groups should restrict inbound traffic to necessary ports only +- Network ACLs should be configured to control traffic to/from subnets +- IAM policies should enforce least privilege access to EFS +- No unauthorized network paths to EFS resources + +## Remediation + +### Console + +Implement network security access controls. + +## Default Value + +By default, AWS EFS mount targets inherit the security group of the VPC. Additional network access controls must be explicitly configured by the user. + +## References + +1. https://docs.aws.amazon.com/efs/latest/ug/NFS-access-control-efs.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.5/SKILL.md new file mode 100644 index 0000000000..9c2ac23047 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.5/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-aws-storage-3.5 +description: "Ensure using Security Groups for VPC to control EFS traffic" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, security-groups, vpc, network-security, traffic-control] +cis_id: "3.5" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.4, cis-aws-storage-3.6, cis-aws-storage-3.8] +prerequisites: [] +severity_boost: {} +--- + +# 3.5 Ensure using Security Groups for VPC (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +A security group controls the traffic that is allowed to reach and leave the resources that it is associated with. For example, after you associate a security group with an EC2 instance, it controls the inbound and outbound traffic for the instance. + +## Rationale + +Security groups act as virtual firewalls to control network traffic to EFS mount targets, ensuring only authorized traffic can access the file system. + +## Impact + +Without properly configured security groups, EFS mount targets may be exposed to unauthorized network access, potentially leading to data breaches or service disruptions. + +## Audit Procedure + +### Console + +1. Go to https://console.aws.amazon.com/vpc/ +2. Navigate to Security Groups and select on the VPC that houses your mount target. +3. Ensure that incoming traffic is restricted to SSH access on port 22 using TCP protocol and outbound traffic is accepting all traffic. + +## Expected Result + +- Security Groups should be configured to allow only necessary inbound traffic (e.g., SSH on port 22) +- Outbound traffic rules should be appropriately configured +- Security Groups should follow least privilege principle + +## Remediation + +### Console + +Configure security groups to restrict traffic appropriately: + +1. Navigate to VPC console +2. Select Security Groups +3. Configure inbound rules to allow only necessary traffic (e.g., SSH on port 22 using TCP) +4. Configure outbound rules as needed +5. Apply security groups to EFS mount targets + +## Default Value + +By default, the default security group for a VPC allows all inbound traffic from instances assigned to the same security group and all outbound traffic. Custom security groups must be explicitly configured for EFS mount targets. + +## References + +1. https://console.aws.amazon.com/vpc/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control
Centralize access control for all enterprise assets through a directory service or SSO provider, where supported. | | ● | ● | +| v8 | 13.9 Deploy Port-Level Access Control
Deploy port-level access control. Port-level access control utilizes 802.1x, or similar network access control protocols, such as certificates, and may incorporate user and/or device authentication. | | | ● | +| v7 | 1.7 Deploy Port Level Access Control
Utilize port level access control, following 802.1x standards, to control which devices can authenticate to the network. The authentication system shall be tied into the hardware asset inventory data to ensure only authorized devices can connect to the network. | | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.6/SKILL.md new file mode 100644 index 0000000000..e0446894b6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.6/SKILL.md @@ -0,0 +1,124 @@ +--- +name: cis-aws-storage-3.6 +description: "Ensure Secure Ports for AWS storage services (S3, EFS, EBS)" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, s3, ebs, ports, security-groups, nacl, network-security] +cis_id: "3.6" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.4, cis-aws-storage-3.5] +prerequisites: [] +severity_boost: {} +--- + +# 3.6 Ensure Secure Ports (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Securing network ports is essential for protecting AWS storage services like Amazon S3, EFS, and EBS. By configuring security groups and network access control lists (NACLs) to allow only necessary traffic, you minimize the risk of unauthorized access. Regular audits and monitoring of port usage ensure that only approved ports and protocols are operational, enhancing the overall security of your AWS storage environment. + +## Rationale + +By limiting traffic to only necessary and approved ports and protocols, you reduce the attack surface and enhance the overall security of your storage environment. Regular audits and monitoring further ensure that security measures remain effective and up-to-date, safeguarding your data from emerging threats. + +## Impact + +Not securing network ports in AWS storage services can lead to significant vulnerabilities, exposing your data to unauthorized access and potential breaches. This lack of control increases the risk of malicious attacks, such as port scanning and exploitation of open ports, which can result in data loss, corruption, and theft. Consequently, your organization may face severe financial losses, operational disruptions, and damage to its reputation. + +## Audit Procedure + +### Console + +1. **Review Security Group Configurations**: + 1. Navigate to "Security Groups" under "Network & Security". + 2. Verify that security groups are configured to allow only necessary inbound and outbound traffic. + 3. Ensure rules are in place to restrict access to critical storage services, such as Amazon S3, EFS, and EBS. + +2. **Check Network Access Control Lists (NACLs)**: + - Steps: + 1. Navigate to "Network ACLs" under "Security". + 2. Ensure NACLs are configured to control traffic to and from subnets, allowing only necessary ports and protocols. + 3. Verify that rules are implemented to deny unauthorized access. + +3. **Monitor VPC Flow Logs**: + - Steps: + 1. Enable VPC Flow Logs for each VPC. + 2. Regularly review flow logs to monitor traffic and identify any unauthorized access attempts or anomalies. + 3. Investigate and remediate any unusual traffic patterns. + +4. **Inspect IAM Policies and Roles**: + - Steps: + 1. Review IAM policies to ensure they enforce least privilege principles for access to security groups and NACLs. + 2. Verify that roles are appropriately assigned and used to control access to security groups and NACLs. + +5. **Enable and Review AWS CloudTrail Logs**: + - Steps: + 1. Ensure CloudTrail is enabled in all regions. + 2. Regularly review CloudTrail logs for any changes to security groups, NACLs, and IAM policies. + 3. Set up alerts for critical security events related to port configurations. + +6. **Conduct Regular Penetration Testing**: + - Steps: + 1. Conduct tests to identify vulnerabilities in port configurations. + 2. Review findings and implement necessary security measures to address identified issues. + 3. Ensure compliance with AWS penetration testing policies. + +7. **Verify Encryption in Transit**: + - Steps: + 1. Ensure that data encryption is enabled for data in transit. + 2. Verify that encryption keys are managed securely using AWS Key Management Service (KMS). + 3. Check that all communication with storage services is encrypted. + +8. **Implement and Review Security Best Practices**: + - Steps: + 1. Implement recommended best practices for securing network ports and storage services. + 2. Regularly review and update security configurations to align with evolving best practices. + 3. Conduct periodic training for staff on security best practices and AWS configurations. + +## Expected Result + +- Security Groups should allow only necessary ports (e.g., NFS port 2049 for EFS, HTTPS 443 for S3) +- Network ACLs should be configured to control traffic appropriately +- VPC Flow Logs should be enabled and monitored +- CloudTrail should be enabled for audit logging +- No unauthorized ports should be open +- Encryption in transit should be enabled + +## Remediation + +### Console + +1. Configure Security Groups to allow only necessary ports +2. Configure Network ACLs to control traffic to/from subnets +3. Enable VPC Flow Logs for monitoring +4. Enable CloudTrail for audit logging +5. Implement encryption in transit +6. Conduct regular security reviews and penetration testing + +## Default Value + +By default, AWS creates a default security group for each VPC that allows all outbound traffic and all inbound traffic from instances in the same security group. Custom security groups and NACLs must be configured to restrict traffic to only necessary ports. + +## References + +1. https://docs.aws.amazon.com/efs/latest/ug/NFS-access-control-efs.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 13.9 Deploy Port-Level Access Control
Deploy port-level access control. Port-level access control utilizes 802.1x, or similar network access control protocols, such as certificates, and may incorporate user and/or device authentication. | | | ● | +| v7 | 1.7 Deploy Port Level Access Control
Utilize port level access control, following 802.1x standards, to control which devices can authenticate to the network. The authentication system shall be tied into the hardware asset inventory data to ensure only authorized devices can connect to the network. | | ● | ● | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with validated business needs, are running on each system. | | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.7/SKILL.md new file mode 100644 index 0000000000..f3fde16bfd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.7/SKILL.md @@ -0,0 +1,82 @@ +--- +name: cis-aws-storage-3.7 +description: "Ensure File-Level Access Control with Mount Targets" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, mount-targets, access-control, availability-zones] +cis_id: "3.7" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.3, cis-aws-storage-3.8] +prerequisites: [] +severity_boost: {} +--- + +# 3.7 Ensure File-Level Access Control with Mount Targets (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Mount targets act as gateways, enabling resources to be accessed across different availability zones within a VPC. When you create an EFS file system, mount targets are automatically provisioned in each availability zone associated with the VPC. This ensures high availability and redundancy, allowing seamless and efficient access to the EFS file system from any availability zone. + +## Rationale + +Using mount targets ensures seamless access to the EFS file system across different availability zones within a VPC. This automatic provisioning of mount targets in each availability zone provides high availability and redundancy, essential for maintaining uninterrupted data access. It simplifies configuration and enhances the resilience and scalability of the file system architecture. + +## Impact + +Not using mount targets can lead to inefficient and unreliable access to the EFS file system across availability zones. This lack of automatic provisioning reduces high availability and redundancy, increasing the risk of service interruptions and data access issues. Consequently, your infrastructure may suffer from decreased performance, higher latency, and potential data loss or downtime. + +## Audit Procedure + +### Console + +Verify that mount targets are properly configured in each availability zone: + +1. Navigate to EFS console +2. Select the file system +3. Verify mount targets exist in each availability zone +4. Ensure mount targets are associated with appropriate subnets + +## Expected Result + +- Mount targets should exist in each availability zone where the EFS is used +- Each mount target should be in a different availability zone for redundancy +- Mount targets should be properly associated with VPC subnets + +## Remediation + +### Console + +Control access by modifying mount targets in each availability zone. + +1. Navigate to EFS console +2. Select your file system +3. Configure mount targets for each availability zone +4. Ensure proper subnet association for high availability + +## Default Value + +Mount targets are not created by default. Users must explicitly create mount targets when setting up an EFS file system. + +## References + +1. https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 6.8 Define and Maintain Role-Based Access Control
Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | +| v7 | 14.7 Enforce Access Control to Data through Automated Tools
Use an automated tool, such as host-based Data Loss Prevention, to enforce access controls to data even when data is copied off a system. | | | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.8/SKILL.md new file mode 100644 index 0000000000..b392188e8b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.8/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-aws-storage-3.8 +description: "Ensure managing mount target security groups" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, mount-targets, security-groups, network-security] +cis_id: "3.8" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.5, cis-aws-storage-3.7] +prerequisites: [] +severity_boost: {} +--- + +# 3.8 Ensure managing mount target security groups (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Managing security groups for mount targets is essential for controlling access to your Amazon EFS file systems. By configuring these security groups, you ensure that only authorized network traffic can access your file systems, enhancing security. Regular reviews and updates of security group rules maintain strict access control, protecting your data from unauthorized access and potential breaches. + +## Rationale + +The rationale for managing security groups for mount targets is to ensure robust access control and security for your Amazon EFS file systems. By configuring these security groups, you restrict access to only authorized network traffic, thereby minimizing the risk of unauthorized access and potential data breaches. Regularly reviewing and updating these rules helps maintain strong security measures and compliance with organizational policies and industry standards. + +## Impact + +Not managing security groups for mount targets can lead to significant vulnerabilities, exposing your Amazon EFS file systems to unauthorized access and potential breaches. This lack of control increases the risk of malicious attacks, data theft, and data corruption. Consequently, your organization may face severe financial losses, operational disruptions, and damage to its reputation. + +## Audit Procedure + +### Console + +1. Navigate to EFS. +2. Select file systems. +3. Click the radio box and select "view details". +4. Select the "manage" button. +5. Select "Networking" tab. +6. This will bring up a screen for each of your mount points. +7. To edit Security Groups, select "Manage". From here, you can edit security groups for each mount point. This gives you control of how traffic can flow between each subnet. + +## Expected Result + +- Security groups should be properly configured for each mount target +- Security groups should restrict traffic to authorized sources only +- Rules should follow least privilege principle +- Regular reviews of security group configurations should be documented + +## Remediation + +### Console + +1. Navigate to EFS console +2. Select your file system +3. Click "Manage" button +4. Select "Networking" tab +5. For each mount target, click "Manage" to edit security groups +6. Configure security groups to allow only authorized traffic +7. Review and update rules regularly + +## Default Value + +By default, mount targets use the default security group of the VPC. Custom security groups should be configured to implement proper access controls. + +## References + +1. https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 13.9 Deploy Port-Level Access Control
Deploy port-level access control. Port-level access control utilizes 802.1x, or similar network access control protocols, such as certificates, and may incorporate user and/or device authentication. | | | ● | +| v7 | 1.7 Deploy Port Level Access Control
Utilize port level access control, following 802.1x standards, to control which devices can authenticate to the network. The authentication system shall be tied into the hardware asset inventory data to ensure only authorized devices can connect to the network. | | ● | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.9/SKILL.md new file mode 100644 index 0000000000..d77812c3f6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-3.9/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-aws-storage-3.9 +description: "Ensure using VPC endpoints - EFS" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, vpc-endpoints, privatelink, network-security] +cis_id: "3.9" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-3.3, cis-aws-storage-3.4] +prerequisites: [] +severity_boost: {} +--- + +# 3.9 Ensure using VPC endpoints - EFS (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +With AWS PrivateLink, VPC Endpoints allow services to communicate within AWS using private IP addresses within approved CIDR ranges. This communication can be achieved without the need for a VPN, ensuring secure and efficient data transfer. + +## Rationale + +The rationale behind using AWS PrivateLink with VPC Endpoints is to enable secure and efficient communication between services within AWS. By using private IP addresses within approved CIDR ranges, it eliminates the need for a VPN, reducing complexity and potential points of failure. This approach enhances security, reduces latency, and ensures data remains within the AWS network, aligning with best practices for secure and reliable cloud architecture. + +## Impact + +Not using AWS PrivateLink with VPC Endpoints can lead to several issues, including increased security risks and potential data exposure since services would need to communicate over the public internet or through more complex VPN setups. This can result in higher latency, reduced performance, and greater vulnerability to attacks. Additionally, managing VPN connections adds complexity and potential points of failure, compromising the overall efficiency and reliability of your network architecture. + +## Audit Procedure + +### Console + +Creating a FIPS compliant interface endpoint for EFS: + +1. Navigate to VPC Console: https://console.aws.amazon.com/vpc/ +2. Select "Endpoints" on the sidebar. +3. Select "Create endpoint". +4. Name the endpoint. +5. Copy and paste this services into the services bar: + `com.amazonaws.region.elasticfilesystem-fips` – replace "region: with us-east-1 or whatever region you're using. +6. Select your VPC. +7. For subnets, select the availability zone and then select private subnet. +8. Select the Security Group for the VPC endpoint. +9. For policy: select "full access". +10. Create a tag for future reference / granular IAM permissions. +11. Create endpoint. + +## Expected Result + +- VPC endpoint should be created for EFS service +- Endpoint should use FIPS-compliant service name +- Endpoint should be associated with appropriate VPC and subnets +- Security group should be configured for the endpoint +- Full access policy should be configured (or restricted as per requirements) + +## Remediation + +### Console + +Use VPC Endpoints in tandem with AWS Private Link to secure your EFS connections. + +1. Navigate to VPC Console +2. Create VPC endpoint for EFS +3. Configure endpoint with appropriate VPC, subnets, and security groups +4. Use FIPS-compliant service endpoint: `com.amazonaws.[region].elasticfilesystem-fips` +5. Configure access policy as needed + +## Default Value + +VPC endpoints are not created by default. Users must explicitly create and configure VPC endpoints for EFS to enable private connectivity. + +## References + +1. https://docs.aws.amazon.com/efs/latest/ug/efs-vpc-endpoints.html#:~:text=To%20establish%20a%20private%20connection,private%20network%20(VPN)%20connection. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 13.5 Manage Access Control for Remote Assets
Manage access control for assets remotely connecting to enterprise resources. Determine amount of access to enterprise resources based on: up-to-date anti-malware software installed, configuration compliance with the enterprise's secure configuration process, and ensuring the operating system and applications are up-to-date. | | ● | ● | +| v8 | 14.5 Train Workforce Members on Causes of Unintentional Data Exposure
Train workforce members to be aware of causes for unintentional data exposure. Example topics include mis-delivery of sensitive data, losing a portable end-user device, or publishing data to unintended audiences. | ● | ● | ● | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with validated business needs, are running on each system. | | ● | ● | +| v7 | 13.1 Maintain an Inventory Sensitive Information
Maintain an inventory of all of the sensitive information stored, processed, or transmitted by the organization's technology systems, including those located onsite or at a remote service provider. | ● | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.1/SKILL.md new file mode 100644 index 0000000000..c7f9679d33 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.1/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-aws-storage-4.1 +description: "FSX (AWS Elastic File Cache)" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, fsx, file-cache, level-2] +cis_id: "4.1" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-4.2, cis-aws-storage-4.3, cis-aws-storage-4.4] +prerequisites: [] +severity_boost: {} +--- + +# 4.1 FSX (AWS Elastic File Cache) (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Amazon File Cache is a fully managed, high speed cache on AWS that is used to process file data, regardless of where such data is stored. AWS File Cache is a serverless service on AWS that spares the administrators from the burden of managing file servers and storage volumes, updating hardware, configuring software, running out of capacity, or tuning performance. AWS Elastic File Cache is capable of handling hundreds of GB/s of throughput and up to millions of operations per second. AWS FSx is an excellent service for cost optimization and high scalability. Amazon File Cache automatically loads data into the cache when it's accessed for the first time and automatically releases data when it's not used. + +## Rationale + +Amazon File Cache is used as a temporary, high performance storage location for data that's stored in on-premises file systems, AWS file systems, and Amazon S3 buckets. This service is used for data processing and is best suited for applications that need high data processing speeds. This is not a long term storage option. + +## Impact + +Not implementing Amazon Elastic File Cache as a high-performance caching layer can result in slower data processing times and increased latency when accessing data from primary storage systems. This may lead to reduced application performance and operational efficiency. + +## Audit Procedure + +### AWS Console + +Amazon File Cache can be linked to various data repositories including: + +- S3 data repositories +- On-premises file systems (NFSv3 protocol) +- AWS file systems +- Amazon Elastic Compute Service +- Amazon Elastic Container Service +- Amazon Elastic Kubernetes Service + +**Steps:** + +1. Navigate to the Amazon FSx console +2. Review existing File Cache configurations +3. Verify that File Cache is linked to appropriate data repositories +4. Confirm that all linked repositories are using the same file system (either S3 or NFS objects) + +### AWS CLI + +No specific CLI audit commands are provided in this control as it is primarily informational about the FSX service capabilities. + +## Expected Result + +File Cache should be properly configured and linked to authorized data repositories. The cache should transparently present S3 or NFS objects as files and directories. + +## Remediation + +### AWS Console + +To implement Amazon File Cache: + +1. Ensure you have the necessary prerequisites: + - Amazon Elastic Compute Instance with compatible OS + - S3 bucket for data storage + - Proper VPC and security group configuration + +2. Navigate to the Amazon FSx console +3. Configure File Cache to link to your data repositories +4. You can link a maximum of eight repositories +5. All linked repositories must be using the same file system (either S3 or NFS) +6. Amazon File Cache is compatible with: + - Amazon Elastic Compute Service + - Amazon Elastic Container Service + - Amazon Elastic Kubernetes Service + +### AWS CLI + +No specific CLI remediation commands are provided as this is a configuration guidance control. + +## Default Value + +By default, Amazon File Cache is not enabled. It must be explicitly configured and linked to data repositories. + +## References + +1. https://aws.amazon.com/fsx/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 8.3 Ensure Adequate Audit Log Storage
Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process. | ● | ● | ● | +| v7 | 13.4 Only Allow Access to Authorized Cloud Storage or Email Providers
Only allow access to authorized cloud storage or email providers. | | ● | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.2/SKILL.md new file mode 100644 index 0000000000..e51e316704 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.2/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-aws-storage-4.2 +description: "Amazon Elastic File Cache" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, fsx, file-cache, regional-availability, level-2] +cis_id: "4.2" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-4.1, cis-aws-storage-4.3, cis-aws-storage-4.4, cis-aws-storage-4.5] +prerequisites: [] +severity_boost: {} +--- + +# 4.2 Amazon Elastic File Cache (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Amazon File Cache is available in the following AWS Regions: + +1. US East (N. Virginia) +2. US East (Ohio) +3. US West (Oregon) +4. Canada (Central) +5. Europe (Frankfurt) +6. Europe (Ireland) +7. Europe (London) +8. Europe (Stockholm) +9. Asia Pacific (Hong Kong) +10. Asia Pacific (Mumbai) +11. Asia Pacific (Seoul) +12. Asia Pacific (Tokyo) +13. Asia Pacific (Singapore) +14. Asia Pacific (Sydney) + +**Amazon Elastic File Cache Compatibility:** In order to use AWS FSx, you must ensure that the operating system you're using on the compute instance is compatible with AWS FSx. Below are the compatible operating systems: + +1. Amazon Linux 2 and Amazon Linux +2. Red Hat Enterprise Linux (RHEL) +3. CentOS +4. Rocky Linux +5. Ubuntu. The Lustre client must be installed on these systems in order for the FSx service to work. + +## Rationale + +The rationale behind creating Amazon Elastic File Cache is to enhance the performance and scalability of cloud-based applications by providing a high-speed, scalable file caching solution. This service reduces latency and improves access times for frequently accessed data, thereby optimizing application performance and user experience. Additionally, it helps manage and reduce storage costs by efficiently utilizing cached data, ensuring that resources are used effectively while maintaining high performance standards. + +## Impact + +Not implementing Amazon Elastic File Cache can lead to increased latency and slower access times for frequently accessed data, resulting in suboptimal performance for cloud-based applications. This can negatively affect user experience and productivity. Additionally, without an efficient caching solution, there may be higher storage costs due to inefficient use of resources, and the system may struggle to handle high demand, leading to potential performance bottlenecks and scalability issues. + +## Audit Procedure + +### AWS Console + +**Creating Amazon Elastic File Cache:** + +Before you can start using Amazon Elastic File Cache, you must set up an Amazon Elastic Compute Instance and an S3 bucket. + +1. Navigate to the Amazon EC2 console +2. Select "Launch Instance" +3. Give your server a name +4. Select "Ubuntu" or an operating system that's compatible with FSx +5. Select default VPC and security group +6. Select or create private SSH keys +7. Leave the rest of the settings default +8. Create Instance + +**Verify regional availability:** + +- Confirm that your resources are deployed in one of the supported regions listed above +- Verify that the EC2 instance OS is compatible with Lustre client (Amazon Linux 2, Amazon Linux, RHEL, CentOS, Rocky Linux, or Ubuntu) +- Ensure that the AMI selected is compatible with Lustre 2.12 client + +### AWS CLI + +No specific CLI audit commands are provided in this control as it is primarily about regional availability and compatibility verification. + +## Expected Result + +Amazon Elastic File Cache should be deployed in supported regions with compatible operating systems. The Lustre client must be installed on Ubuntu systems for FSx service to work properly. + +## Remediation + +### AWS Console + +1. Verify that your AWS region is in the list of supported regions +2. If deploying in an unsupported region, migrate resources to a supported region +3. Ensure EC2 instances use compatible operating systems: + - Amazon Linux 2 or Amazon Linux + - Red Hat Enterprise Linux (RHEL) + - CentOS + - Rocky Linux + - Ubuntu (with Lustre client installed) +4. For Ubuntu systems, proceed with Lustre client installation (see control 4.5) + +### AWS CLI + +No specific CLI remediation commands are required for this control. + +## Default Value + +Amazon Elastic File Cache is available only in the regions listed above. The service requires compatible operating systems to function properly. + +## References + +1. https://aws.amazon.com/fsx/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 8.3 Ensure Adequate Audit Log Storage
Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process. | ● | ● | ● | +| v7 | 6.4 Ensure adequate storage for logs
Ensure that all systems that store logs have adequate storage space for the logs generated. | | ● | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.3/SKILL.md new file mode 100644 index 0000000000..79968e9834 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.3/SKILL.md @@ -0,0 +1,141 @@ +--- +name: cis-aws-storage-4.3 +description: "Ensure the creation of an FSX Bucket" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, fsx, s3, bucket-creation, level-2] +cis_id: "4.3" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-4.1, cis-aws-storage-4.2, cis-aws-storage-4.4, cis-aws-storage-5.1] +prerequisites: [] +severity_boost: {} +--- + +# 4.3 Ensure the creation of an FSX Bucket (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +An S3 bucket will store the data that Amazon Elastic File Cache accesses. + +## Rationale + +Storing data in S3 ensures scalability, durability, and cost-efficiency, while Amazon Elastic File Cache enhances access speed by caching frequently accessed data. This combination leverages the strengths of both services, providing a seamless and efficient data storage and retrieval solution. + +## Impact + +Without creating an S3 bucket for FSx File Cache, there is no persistent storage backend for the cached data. This can lead to data loss, inability to persist data beyond the cache lifecycle, and reduced functionality of the File Cache service. + +## Audit Procedure + +### AWS Console + +1. Navigate to the Amazon S3 bucket console: https://s3.console.aws.amazon.com/s3/ +2. Review existing buckets +3. Verify that a dedicated bucket exists for FSx File Cache usage +4. Confirm the bucket configuration: + - Bucket must have a unique name globally across AWS + - Block public access should be enabled (this is an internal service not accessed outside the AWS network) + - Bucket versioning should be enabled + - Default encryption should be configured + +### AWS CLI + +```bash +# List all S3 buckets +aws s3api list-buckets --query 'Buckets[].[Name,CreationDate]' --output table + +# Check bucket configuration for a specific bucket +aws s3api get-bucket-versioning --bucket +aws s3api get-bucket-encryption --bucket +aws s3api get-public-access-block --bucket +``` + +## Expected Result + +An S3 bucket should exist with the following configuration: + +- Unique bucket name that is not used anywhere on AWS +- Block public access enabled +- Bucket versioning enabled +- Encryption enabled (default or custom KMS key) +- Appropriate path created within the bucket for FSx cache data + +## Remediation + +### AWS Console + +1. Navigate to the Amazon S3 bucket console: https://s3.console.aws.amazon.com/s3/ +2. Select "Create Bucket" +3. Give your bucket a name and select the region + - **Note:** Your bucket must be a unique name that's not used anywhere on AWS +4. **Block public access:** This is an internal service that will not be accessed outside of our internal AWS network. Keep the "block public access" setting checked +5. Enable bucket versioning +6. Leave the rest of the settings as default +7. Select "create bucket" +8. Create a path in your bucket: + - Give it a name and leave the encryption as default for now + +### AWS CLI + +```bash +# Create S3 bucket +aws s3api create-bucket \ + --bucket \ + --region \ + --create-bucket-configuration LocationConstraint= + +# Enable versioning +aws s3api put-bucket-versioning \ + --bucket \ + --versioning-configuration Status=Enabled + +# Enable server-side encryption +aws s3api put-bucket-encryption \ + --bucket \ + --server-side-encryption-configuration '{ + "Rules": [{ + "ApplyServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + }] + }' + +# Block public access +aws s3api put-public-access-block \ + --bucket \ + --public-access-block-configuration \ + "BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true" + +# Create a folder (prefix) in the bucket +aws s3api put-object \ + --bucket \ + --key / +``` + +## Default Value + +By default, no S3 buckets exist for FSx File Cache. They must be explicitly created and configured. + +## References + +1. https://docs.aws.amazon.com/fsx/latest/LustreGuide/create-dra-linked-data-repo.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 8.3 Ensure Adequate Audit Log Storage
Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process. | ● | ● | ● | +| v7 | 6.4 Ensure adequate storage for logs
Ensure that all systems that store logs have adequate storage space for the logs generated. | | ● | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.4/SKILL.md new file mode 100644 index 0000000000..21f13a737b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.4/SKILL.md @@ -0,0 +1,141 @@ +--- +name: cis-aws-storage-4.4 +description: "Ensure the creation of Elastic File Cache" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, fsx, file-cache, cache-creation, vpc, kms, level-2] +cis_id: "4.4" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-4.1, cis-aws-storage-4.2, cis-aws-storage-4.3, cis-aws-storage-4.5] +prerequisites: [cis-aws-storage-4.2, cis-aws-storage-4.3] +severity_boost: {} +--- + +# 4.4 Ensure the creation of Elastic File Cache (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +With the prerequisites completed, we can now proceed to create our Elastic File Cache. + +## Rationale + +By implementing an Elastic File Cache, frequently accessed data is stored closer to the application, reducing latency and speeding up access times. This approach optimizes resource utilization, improves user experience, and ensures that the system can handle high-demand workloads effectively. + +## Impact + +Without implementing Elastic File Cache, applications may experience higher latency, slower data access times, and reduced performance, particularly for frequently accessed data. This can negatively impact user experience and system efficiency. + +## Audit Procedure + +### AWS Console + +1. Navigate to the AWS Elastic File Cache console: https://console.aws.amazon.com/fsx/ +2. Click the hamburger menu on the left side of the screen and select "caches" +3. Review existing File Cache configurations +4. Verify the following for each cache: + - Cache name is descriptive and follows naming conventions + - Storage capacity is appropriately sized (should be in increments of 1.2 TiB) + - Throughput capacity is calculated correctly based on storage (multiply cache storage capacity by throughput tier) + - VPC configuration is correct and uses the appropriate VPC + - Security groups are properly configured + - Subnet selection is appropriate + - Encryption is enabled using aws/fsx KMS encryption keys + - Data repository associations (DRAs) are properly configured + - Cache is linked to the correct S3 bucket path + +### AWS CLI + +```bash +# List all File Caches +aws fsx describe-file-caches --query 'FileCaches[].[FileCacheId,FileCachePath,Lifecycle,StorageCapacity]' --output table + +# Describe a specific File Cache +aws fsx describe-file-caches --file-cache-ids + +# Check Data Repository Associations +aws fsx describe-data-repository-associations --filters Name=file-cache-id,Values= +``` + +## Expected Result + +Elastic File Cache should be properly created and configured with: + +- Appropriate storage capacity (in 1.2 TiB increments) +- Correctly calculated throughput capacity +- Proper VPC and security group configuration +- KMS encryption enabled +- Valid Data Repository Association linking to S3 bucket + +## Remediation + +### AWS Console + +1. Navigate to the AWS Elastic File Cache console: https://console.aws.amazon.com/fsx/ +2. Click the hamburger menu on the left side of the screen and select "caches" +3. Select "Create Cache" +4. **Give your Cache a name.** Choose a name that you will remember +5. **Select the amount of storage capacity you need for your cache.** We'll select 1.2 TiB for this tutorial. You can select storage capacity in increments of 1.2 TiB +6. **Select the amount of throughput capacity.** The amount of Throughput capacity is calculated by multiplying the cache storage capacity by the throughput tier. For example: + - For a 1.2 TiB cache, it's 1200 MB/s + - For a 9.6 TiB cache, it's 9600 MB/s + - Throughput capacity is the sustained speed at which the file server that hosts your cache can serve data +7. In the **Network & Security section**, provide networking and security group information: + - For **Virtual Private Cloud (VPC)** choose the correct amazon VPC that you want to associate with your cache. We're going to use the default VPC + - For **VPC Security Groups**, the ID for the default security group for your VPC should already be added + - For **Subnet**, you can choose any of the available subnets +8. In the **Encryption section**, choose the Default aws/fsx KMS encryption keys to protect your data by encrypting your data at rest +9. You have the option to create tags; this is an optional step +10. Select "next" +11. In the **Data repository associations (DRAs) section**, there are no DRAs linking your cache to S3 or NFS repositories. We need to link the cache that we're creating to the Amazon S3 bucket that we created earlier: + - For **Data repository type**, choose S3 + - For **Data repository path**, type the path of the S3 bucket that you want to associate with this cache. For example: `s3://(example-bucket)/(example-prefix)` + - **Note:** To access this URL, go back to the S3 bucket that was just created and navigate to the directory of the folder that you created. Select "copy AWS URI" + - For **cache path**, enter the name of a high-level directory such as `/ns1` or subdirectory such as `/ns1/subdir` within Amazon File Cache to associate with the S3 data repository. The first forward slash in the path is required +12. Select "Next" this will take you to the summary page +13. Choose "**Create Cache**." You will see your cache in the FSx dashboard + +### AWS CLI + +```bash +# Create File Cache +aws fsx create-file-cache \ + --file-cache-type LUSTRE \ + --file-cache-type-version 2.12 \ + --storage-capacity 1200 \ + --subnet-ids \ + --security-group-ids \ + --data-repository-associations '[ + { + "FileCachePath": "/ns1", + "DataRepositoryPath": "s3:///", + "DataRepositorySubdirectories": [] + } + ]' \ + --kms-key-id "alias/aws/fsx" + +# Verify cache creation +aws fsx describe-file-caches --file-cache-ids +``` + +## Default Value + +By default, no Elastic File Cache exists. It must be explicitly created and configured. + +## References + +1. https://aws.amazon.com/filecache/ + +## CIS Controls + +This control does not map to specific CIS Controls but follows general AWS security best practices for encryption, network isolation, and access control. + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.5/SKILL.md new file mode 100644 index 0000000000..be641db77b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.5/SKILL.md @@ -0,0 +1,151 @@ +--- +name: cis-aws-storage-4.5 +description: "Ensure installation and configuration of Lustre Client" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, fsx, lustre, client-installation, ubuntu, level-2] +cis_id: "4.5" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws, linux] +cwe_ids: [] +chains_with: [cis-aws-storage-4.2, cis-aws-storage-4.4, cis-aws-storage-4.6] +prerequisites: [cis-aws-storage-4.2, cis-aws-storage-4.4] +severity_boost: {} +--- + +# 4.5 Ensure installation and configuration of Lustre Client (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +To utilize the newly created File Cache, you must install the Lustre Client on your EC2 instance. + +## Rationale + +The Lustre Client facilitates efficient communication between the EC2 instance and the File Cache, ensuring high-performance data access and improved overall system efficiency. This setup is crucial for optimizing data processing and leveraging the benefits of the File Cache. + +## Impact + +Without the Lustre Client installed, EC2 instances cannot mount or access the FSx File Cache, resulting in inability to leverage the high-performance caching capabilities and potential performance degradation for data-intensive workloads. + +## Audit Procedure + +### AWS Console + +This is a client-side configuration that cannot be audited through the AWS Console. Use SSH to connect to EC2 instances and verify Lustre client installation. + +### AWS CLI & SSH + +1. Connect to your EC2 instance: + +```bash +ssh -i "{KEY.pem}" ubuntu@{your-ec2-instance} +``` + +2. Verify Lustre client installation: + +```bash +# Check if Lustre client is installed +dpkg -l | grep lustre + +# Check Lustre client version +modinfo lustre + +# Verify kernel compatibility +uname -r +``` + +## Expected Result + +The Lustre client should be properly installed with: + +- Lustre client modules present in the system +- Compatible kernel version (5.15.0.1020-aws or later for Ubuntu 22.02) +- Lustre repository configured +- Client modules loaded and available + +## Remediation + +### SSH to EC2 Instance + +Follow these steps to install the Lustre Client on Ubuntu 22.04: + +1. **Launch your EC2 instance.** Navigate to the folder of your secure key and ssh into the instance using this command: + +```bash +ssh -i "{KEY.pem}" ubuntu@{your-ec2-instance} +``` + +2. When prompted to log in with the SSH key, enter "yes" + +3. You should now be connected to your EC2 instance + +4. **Run the following command to download and install the public Lustre key:** + +```bash +wget -O - https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-ubuntu-public-key.asc | gpg --dearmor | sudo tee /usr/share/keyrings/fsx-ubuntu-public-key.gpg >/dev/null +``` + +5. **Add the AWS Lustre package repository to your local package manager using the following command:** + +```bash +sudo bash -c 'echo "deb [signed-by=/usr/share/keyrings/fsx-ubuntu-public-key.gpg] https://fsx-lustre-client-repo.s3.amazonaws.com/ubuntu jammy main" > /etc/apt/sources.list.d/fsxlustreclientrepo.list && apt-get update' +``` + +6. **Determine which kernel is currently running on your client instance and update as needed.** The AWS Lustre client on Ubuntu 22.02 requires kernel 5.15.0.1020-aws or later for both x86 based EC2 instances and Arm-based EC2 instanced powered by AWS Graviton processors: + + a. Run the following command to find out which kernel your machine is running: + + ```bash + uname -r + ``` + + b. If your kernel is not up to date, run the following command to install the kernel update, Lustre client update, and reboot your system: + + ```bash + sudo apt install -y linux-aws lustre-client-modules-aws && sudo reboot + ``` + + c. If your kernel is up to date and you just want to install the latest Lustre version, run this command: + + ```bash + sudo apt install -y lustre-client-modules-$(uname -r) + ``` + +7. **Verify installation:** + +```bash +# Check installed packages +dpkg -l | grep lustre + +# Verify Lustre module +modinfo lustre + +# Check if module can be loaded +sudo modprobe lustre +``` + +## Default Value + +By default, the Lustre client is not installed on EC2 instances. It must be explicitly installed on compatible operating systems. + +## References + +1. https://docs.aws.amazon.com/fsx/latest/LustreGuide/install-lustre-client.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 14.2 Train Workforce Members to Recognize Social Engineering Attacks
Train workforce members to recognize social engineering attacks, such as phishing, pre-texting, and tailgating. | ● | ● | ● | +| v7 | 5.2 Maintain Secure Images
Maintain secure images or templates for all systems in the enterprise based on the organization's approved configuration standards. Any new system deployment or existing system that becomes compromised should be imaged using one of those images or templates. | | ● | ● | +| v7 | 13.4 Only Allow Access to Authorized Cloud Storage or Email Providers
Only allow access to authorized cloud storage or email providers. | | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.6/SKILL.md new file mode 100644 index 0000000000..c84920c8e5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.6/SKILL.md @@ -0,0 +1,139 @@ +--- +name: cis-aws-storage-4.6 +description: "Ensure EC2 Kernel compatibility with Lustre" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, fsx, lustre, kernel, compatibility, ubuntu, level-2] +cis_id: "4.6" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws, linux] +cwe_ids: [] +chains_with: [cis-aws-storage-4.5, cis-aws-storage-4.7] +prerequisites: [cis-aws-storage-4.2, cis-aws-storage-4.5] +severity_boost: {} +--- + +# 4.6 Ensure EC2 Kernel compatibility with Lustre (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +The latest kernel included with the Ubuntu Amazon EC2 AMI is not compatible with the Lustre service, which is crucial for mounting the cache on your EC2 instance. To downgrade your kernel, specific prerequisites must be met if you are using the default Ubuntu machine image as of November 8, 2023. + +## Rationale + +The latest kernel version is not supported by Lustre, and meeting the prerequisites for downgrading will allow you to leverage Lustre's high-performance file system capabilities effectively. This ensures optimal data access and processing efficiency on your EC2 instance. + +## Impact + +Using an incompatible kernel version will prevent the Lustre client from functioning properly, resulting in inability to mount FSx File Cache and loss of high-performance file system capabilities. + +## Audit Procedure + +### SSH to EC2 Instance + +1. Connect to your EC2 instance: + +```bash +ssh -i "{KEY.pem}" ubuntu@{your-ec2-instance} +``` + +2. **Check current kernel version:** + +```bash +uname -r +``` + +3. **List available Lustre packages and verify compatible kernel:** + +```bash +sudo apt-cache search lustre-client-modules +``` + +4. **Verify the most recent compatible version:** + - The output will show a list of supported modules with corresponding kernel order from top to bottom + - The most recent version should be similar to "lustre-client-modules-5.15.0-1049-aws" + - Ensure this matches the kernel requirements (5.15.0.1020-aws or later for Ubuntu 22.02) + +## Expected Result + +The EC2 instance should be running a kernel version compatible with Lustre: + +- For Ubuntu 22.02: kernel 5.15.0-1049-aws or compatible version +- Lustre client modules available for the current kernel version +- Kernel version supports both x86 based EC2 instances and Arm-based EC2 instances powered by AWS Graviton processors + +## Remediation + +### SSH to EC2 Instance + +Follow the steps to downgrade your kernel to a Lustre-compatible version: + +1. **List all of the available Lustre packages:** + +```bash +sudo apt-cache search lustre-client-modules +``` + +- This will show a list of supported modules with corresponding kernel order from top to bottom +- The most recent version in this case is "lustre-client-modules-5.15.0-1049-aws" +- Save this information for the next commands + +2. **Install the most recent linux image that supports the Lustre client:** + +```bash +sudo apt-get install -y linux-image-5.15.0-1049-aws +sudo sed -i 's/GRUB_DEFAULT=.\+/GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.15.0-1049-aws"/' /etc/default/grub +``` + +3. **Reboot your system:** + +```bash +sudo reboot +``` + +4. **After reboot, reconnect and install the correct Lustre module:** + +```bash +ssh -i "{KEY.pem}" ubuntu@{your-ec2-instance} +sudo apt-get install -y lustre-client-modules-$(uname -r) +``` + +5. **Verify installation:** + +```bash +# Confirm kernel version +uname -r + +# Verify Lustre module installation +dpkg -l | grep lustre + +# Check if Lustre module can be loaded +sudo modprobe lustre +lsmod | grep lustre +``` + +## Default Value + +The default Ubuntu AMI includes the latest kernel which may not be compatible with Lustre. Manual kernel downgrade is required for Lustre compatibility. + +## References + +1. https://docs.aws.amazon.com/fsx/latest/LustreGuide/install-lustre-client.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts
Restrict administrator privileges to dedicated administrator accounts on enterprise assets. Conduct general computing activities, such as internet browsing, email, and productivity suite use, from the user's primary, non-privileged account. | ● | ● | ● | +| v8 | 13.11 Tune Security Event Alerting Thresholds
Tune security event alerting thresholds monthly, or more frequently. | | | ● | +| v7 | 5.2 Maintain Secure Images
Maintain secure images or templates for all systems in the enterprise based on the organization's approved configuration standards. Any new system deployment or existing system that becomes compromised should be imaged using one of those images or templates. | | ● | ● | +| v7 | 13.4 Only Allow Access to Authorized Cloud Storage or Email Providers
Only allow access to authorized cloud storage or email providers. | | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.7/SKILL.md new file mode 100644 index 0000000000..45baa2d5ed --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.7/SKILL.md @@ -0,0 +1,146 @@ +--- +name: cis-aws-storage-4.7 +description: "Ensure mounting FSx cache" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, fsx, lustre, mount, file-system, level-2] +cis_id: "4.7" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws, linux] +cwe_ids: [] +chains_with: [cis-aws-storage-4.5, cis-aws-storage-4.6, cis-aws-storage-4.8] +prerequisites: [cis-aws-storage-4.4, cis-aws-storage-4.5, cis-aws-storage-4.6] +severity_boost: {} +--- + +# 4.7 Ensure mounting FSx cache (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Mounting the FSx cache is a crucial step to optimize data retrieval and system performance. This process involves connecting the FSx file system to your compute instances, allowing them to access cached data efficiently. Properly mounting the FSx cache ensures low-latency access to frequently used data, enhances overall application performance, and leverages the full capabilities of the AWS FSx service. This setup is essential for achieving high performance and efficient data processing in your AWS environment. + +## Rationale + +By connecting the FSx file system to your compute instances, you enable low-latency access to frequently used data, significantly improving application performance. This setup leverages the full capabilities of the AWS FSx service, ensuring efficient data processing and resource utilization in your AWS environment. Properly mounting the FSx cache is essential for achieving high performance and operational efficiency. + +## Impact + +Without properly mounting the FSx cache, compute instances cannot access the cached data, resulting in inability to benefit from the high-performance caching layer and potential degradation in application performance and data access times. + +## Audit Procedure + +### SSH to EC2 Instance + +1. Connect to your EC2 instance: + +```bash +ssh -i "{KEY.pem}" ubuntu@{your-ec2-instance} +``` + +2. **Verify mount point exists:** + +```bash +ls -ld /mnt +``` + +3. **Check if FSx cache is already mounted:** + +```bash +df -h | grep /mnt +mount | grep lustre +``` + +4. **Verify the mount configuration:** + +```bash +# Check if the path shows up in the file system +ls -la /mnt + +# Verify DNS name is resolvable +nslookup + +# Check VPC connectivity +# Ensure EC2 instance is in the same VPC as the cache +``` + +## Expected Result + +The FSx cache should be properly mounted with: + +- Mount point directory created (`/mnt` or custom path) +- FSx cache mounted to the mount point using Lustre protocol +- Mount point accessible and visible in file system (`df -h`, `mount`) +- EC2 instance in the same VPC as the FSx cache +- DNS name resolvable and mount name correct + +## Remediation + +### SSH to EC2 Instance + +To mount your cache, follow the next steps: + +1. **Make a directory for the mount point:** + +```bash +sudo mkdir -p /mnt +``` + +2. **Mount the Amazon file cache to the directory that you just created.** Use the following command and replace these names: + - Replace `cache_dns_name` with the actual file cache's Domain Name System (DNS) name + - Replace `mountname` with the cache's mount name, which you can get by running the `describe-file-caches` AWS CLI command or `DescribeFileCaches` API operation + +```bash +sudo mount -t lustre -o relatime,flock cache_dns_name@tcp:/mountname /mnt +``` + +**Note:** Make sure your EC2 instance is in the same VPC as your cache. + +3. **Verify the mount:** + +```bash +# If done correctly, the path of your folder will show up in the /mnt folder +df -h +ls -la /mnt + +# You can also use the df command to see the DNS and mount point is attached to your file system: +df -h | grep /mnt +``` + +### AWS CLI (to retrieve mount information) + +```bash +# Get cache DNS name and mount name +aws fsx describe-file-caches --file-cache-ids \ + --query 'FileCaches[0].[DNSName,LustreConfiguration.MountName]' \ + --output text + +# Get cache details including VPC information +aws fsx describe-file-caches --file-cache-ids \ + --query 'FileCaches[0].[DNSName,VpcId,SubnetIds]' +``` + +## Default Value + +By default, FSx cache is not mounted on EC2 instances. Manual mounting is required after cache creation and Lustre client installation. + +## References + +1. https://docs.aws.amazon.com/fsx/latest/LustreGuide/mounting-from-lustre-client.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v7 | 3.3 Protect Dedicated Assessment Accounts
Use a dedicated account for authenticated vulnerability scans, which should not be used for any other administrative activities and should be tied to specific machines at specific IP addresses. | | ● | ● | +| v7 | 5.2 Maintain Secure Images
Maintain secure images or templates for all systems in the enterprise based on the organization's approved configuration standards. Any new system deployment or existing system that becomes compromised should be imaged using one of those images or templates. | | ● | ● | +| v7 | 6.4 Ensure adequate storage for logs
Ensure that all systems that store logs have adequate storage space for the logs generated. | | ● | ● | +| v7 | 8.3 Enable Operating System Anti-Exploitation Features/ Deploy Anti-Exploit Technologies
Enable anti-exploitation features such as Data Execution Prevention (DEP) or Address Space Layout Randomization (ASLR) that are available in an operating system or deploy appropriate toolkits that can be configured to apply protection to a broader set of applications and executables. | | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.8/SKILL.md new file mode 100644 index 0000000000..2ec96a31f4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.8/SKILL.md @@ -0,0 +1,140 @@ +--- +name: cis-aws-storage-4.8 +description: "Ensure exporting cache to S3" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, fsx, s3, data-export, backup, level-2] +cis_id: "4.8" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws, linux] +cwe_ids: [] +chains_with: [cis-aws-storage-4.3, cis-aws-storage-4.7, cis-aws-storage-5.1] +prerequisites: [cis-aws-storage-4.3, cis-aws-storage-4.7] +severity_boost: {} +--- + +# 4.8 Ensure exporting cache to S3 (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +The S3 bucket we created earlier will store the files generated at this mount point. + +## Rationale + +The rationale behind using the S3 bucket to store files generated at the mount point is to ensure scalable, durable, and cost-effective storage for your data. By exporting files to S3, you benefit from its high availability and robust data management features, which enhances data security and accessibility. This approach also optimizes storage resource utilization and simplifies data backup and retrieval processes. + +## Impact + +Without exporting cache data to S3, files created in the cache mount point will not be persisted to durable storage. This can result in data loss when the cache is deleted or during cache failures, as FSx File Cache is designed as a temporary high-performance layer, not long-term storage. + +## Audit Procedure + +### SSH to EC2 Instance + +1. Connect to your EC2 instance: + +```bash +ssh -i "{KEY.pem}" ubuntu@{your-ec2-instance} +``` + +2. **Verify mount point has files:** + +```bash +ls -la /mnt +``` + +3. **Check S3 bucket for exported data:** + +```bash +# Use AWS CLI to list objects in the S3 bucket +aws s3 ls s3://// --recursive + +# Check for specific test files +aws s3 ls s3:////efx.txt +``` + +### AWS Console + +1. Navigate to the Amazon S3 console +2. Select the bucket associated with your FSx cache +3. Navigate to the prefix/folder path configured in the Data Repository Association +4. Verify that files created in the cache mount point are present in S3 + +## Expected Result + +Files created in the FSx cache mount point should be automatically exported to the S3 bucket through the Data Repository Association. The S3 bucket should contain the files with proper metadata and timestamps. + +## Remediation + +### SSH to EC2 Instance + +We can export the files that were created to the S3 bucket using the following steps: + +1. **Create a file on the FSx mount point:** + +```bash +sudo touch efx.txt +``` + +2. **Run the command to export the file to S3:** + +```bash +sudo lsm_hsm_archive efx.txt +``` + +3. **Verify the file was created in the mount point:** + +```bash +ls -la /mnt +``` + +4. **Now check your S3 bucket that was created earlier:** + - The file should now appear in the S3 bucket under the configured prefix/path + +### AWS CLI + +```bash +# Verify file creation in mount point (run on EC2 instance) +ls -la /mnt/efx.txt + +# Check S3 bucket for the exported file (can run from anywhere with AWS credentials) +aws s3 ls s3:////efx.txt + +# Verify file content matches +aws s3 cp s3:////efx.txt - + +# List all files in the S3 bucket prefix +aws s3 ls s3://// --recursive --human-readable +``` + +### Automated Export Configuration + +Ensure Data Repository Association is properly configured for automatic export: + +```bash +# Verify DRA configuration +aws fsx describe-data-repository-associations \ + --filters Name=file-cache-id,Values= \ + --query 'Associations[0].[FileCachePath,DataRepositoryPath,DataRepositorySubdirectories]' +``` + +## Default Value + +By default, FSx File Cache does not automatically export files to S3 without proper Data Repository Association configuration. The `lsm_hsm_archive` command or automatic export policies must be used to persist data to S3. + +## References + +1. https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html + +## CIS Controls + +This control supports data backup and recovery best practices but does not map to specific CIS Controls. + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.9/SKILL.md new file mode 100644 index 0000000000..628cba7be9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-4.9/SKILL.md @@ -0,0 +1,190 @@ +--- +name: cis-aws-storage-4.9 +description: "Ensure cleaning up FSx Resources" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, fsx, cleanup, resource-management, cost-optimization, level-2] +cis_id: "4.9" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-4.1, cis-aws-storage-4.3, cis-aws-storage-4.4] +prerequisites: [] +severity_boost: {} +--- + +# 4.9 Ensure cleaning up FSx Resources (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Cleaning up FSx resources involves removing unused or unnecessary FSx file systems and associated components to optimize costs and maintain a secure cloud environment. This includes deleting redundant file systems, snapshots, and mount targets, while ensuring all data is backed up or migrated. Regular cleanup prevents resource sprawl, reduces expenses, and maintains the overall health and performance of your AWS infrastructure. + +## Rationale + +The rationale for cleaning up FSx resources is to optimize costs and ensure a secure and efficient cloud environment. By removing unused or unnecessary file systems, snapshots, and mount targets, you prevent resource sprawl and reduce unnecessary expenses. Regular cleanup also helps maintain the overall health and performance of your AWS infrastructure, ensuring it remains organized and secure. + +## Impact + +Failing to clean up FSx resources can lead to: + +- **Cost Impact:** Continued billing for unused File Cache resources, EC2 instances, and S3 storage +- **Security Impact:** Orphaned resources may contain sensitive data and expand attack surface +- **Operational Impact:** Resource sprawl makes infrastructure management more difficult +- **Compliance Impact:** Unused resources may violate data retention policies + +## Audit Procedure + +### AWS Console + +**Review FSx Resources:** + +1. Navigate to the AWS Elastic File Cache console +2. Review all existing File Caches +3. Identify File Caches that are no longer needed +4. Verify that data has been backed up or migrated before deletion + +**Review Associated Resources:** + +1. **EC2 Instances:** + - Navigate to Amazon EC2 console + - Identify instances created for FSx testing/usage + - Verify if instances are still needed + +2. **S3 Buckets:** + - Navigate to Amazon S3 console + - Identify buckets associated with FSx File Cache + - Verify if data should be retained or if bucket can be deleted + - Check bucket size and storage costs + +3. **Security Groups and Network Resources:** + - Review security groups created for FSx + - Identify unused VPC resources + +### AWS CLI + +```bash +# List all File Caches +aws fsx describe-file-caches \ + --query 'FileCaches[].{ID:FileCacheId,Name:FileCachePath,Status:Lifecycle,Size:StorageCapacity}' \ + --output table + +# List EC2 instances +aws ec2 describe-instances \ + --filters "Name=instance-state-name,Values=running,stopped" \ + --query 'Reservations[].Instances[].[InstanceId,InstanceType,State.Name,Tags[?Key==`Name`].Value|[0]]' \ + --output table + +# List S3 buckets with size +aws s3 ls +aws s3 ls s3:// --recursive --summarize + +# Get bucket size +aws s3api list-objects-v2 \ + --bucket \ + --query 'sum(Contents[].Size)' \ + --output json +``` + +## Expected Result + +All unused FSx resources should be identified and evaluated for cleanup: + +- File Caches no longer in use should be deleted +- Associated EC2 instances should be terminated if not needed +- S3 buckets should be emptied and deleted if not required for data retention +- Orphaned security groups and network resources should be removed + +## Remediation + +### AWS Console + +**To clean the FSx resources:** + +1. **Terminate the EC2 instance:** + - Navigate to EC2 console + - Select the instance + - Actions → Instance State → Terminate + +2. **Delete FSx cache:** + - Navigate to FSx console + - On the actions drop down, select "delete cache" + - Verify that you want to delete the service + - Select `Delete` + - **Note:** It will take some time to delete the cache + +3. **Delete the S3 Bucket:** + - Navigate to S3 console + - **Before you can delete the bucket you must first empty the bucket** + - Check the radio box and select `Empty` + - Confirm by typing "permanently delete" + - Select the bucket that you want to delete + - Select `Delete` in the S3 console + - Confirm deletion by typing the bucket name + +### AWS CLI + +```bash +# 1. Terminate EC2 instance +aws ec2 terminate-instances --instance-ids + +# Verify termination +aws ec2 describe-instances --instance-ids \ + --query 'Reservations[].Instances[].State.Name' + +# 2. Delete File Cache +aws fsx delete-file-cache --file-cache-id + +# Monitor deletion status +aws fsx describe-file-caches --file-cache-ids \ + --query 'FileCaches[0].Lifecycle' + +# 3. Empty S3 bucket +aws s3 rm s3:// --recursive + +# Verify bucket is empty +aws s3 ls s3:// + +# 4. Delete S3 bucket +aws s3api delete-bucket --bucket --region + +# 5. Delete security groups (if created specifically for FSx) +# Note: Can only delete after all resources using them are terminated +aws ec2 delete-security-group --group-id +``` + +### Cleanup Checklist + +- [ ] Data backed up or migrated from File Cache +- [ ] EC2 instances terminated +- [ ] File Cache deleted +- [ ] S3 bucket emptied +- [ ] S3 bucket deleted (if not needed for retention) +- [ ] Security groups removed (if dedicated to FSx) +- [ ] VPC resources cleaned up (if created specifically for FSx) +- [ ] Verify no ongoing charges for deleted resources + +## Default Value + +FSx resources are not automatically cleaned up. Manual deletion is required for all components. + +## References + +1. https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/getting-started-step3.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.8 Document Data Flows
Document data flows. Data flow documentation includes service provider data flows and should be based on the enterprise's data management process. Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard. | | ● | ● | +| v8 | 8.3 Ensure Adequate Audit Log Storage
Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process. | ● | ● | ● | +| v7 | 7.8 Implement DMARC and Enable Receiver-Side Verification
To lower the chance of spoofed or modified emails from valid domains, implement Domain-based Message Authentication, Reporting and Conformance (DMARC) policy and verification, starting by implementing the Sender Policy Framework (SPF) and the DomainKeys Identified Mail(DKIM) standards. | | ● | ● | +| v7 | 13.4 Only Allow Access to Authorized Cloud Storage or Email Providers
Only allow access to authorized cloud storage or email providers. | | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-5.1/SKILL.md new file mode 100644 index 0000000000..d3924552ae --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-5.1/SKILL.md @@ -0,0 +1,216 @@ +--- +name: cis-aws-storage-5.1 +description: "Amazon Simple Storage Service (S3)" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, s3, object-storage, level-2] +cis_id: "5.1" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-5.2, cis-aws-storage-5.3] +prerequisites: [] +severity_boost: {} +--- + +# 5.1 Amazon Simple Storage Service (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Amazon Simple Storage Service (Amazon S3) is an object storage service that provides industry-leading scalability, data availability, security, and performance. It allows customers of all sizes and industries to store and protect any amount of data for virtually any use case, including data lakes, cloud-native applications, and mobile apps. With cost-effective storage classes and intuitive management features, you can optimize costs, organize data, and configure precise access controls to meet your specific business, organizational, and compliance requirements. + +## Rationale + +By utilizing S3, businesses of all sizes can efficiently store and protect large amounts of data, ensuring it is accessible when needed. The service's cost-effective storage classes and user-friendly management features help optimize costs and streamline data organization. Additionally, S3's fine-tuned access controls allow organizations to meet specific business, organizational, and compliance requirements, enhancing overall data management and security. + +## Impact + +Not implementing Amazon S3 or failing to properly configure it can result in: + +- **Scalability Issues:** Inability to handle growing data volumes efficiently +- **Data Availability:** Reduced data durability and availability (S3 provides 99.999999999% durability) +- **Security Risks:** Lack of proper access controls and encryption +- **Compliance Violations:** Inability to meet data retention and protection requirements +- **Cost Inefficiency:** Missing out on cost optimization through storage classes +- **Data Management Challenges:** Difficulty organizing and retrieving data at scale + +## Audit Procedure + +### AWS Console + +**Review S3 Service Understanding:** + +1. Navigate to the Amazon S3 console: https://s3.console.aws.amazon.com/s3/ +2. Review the key concepts: + - **Buckets:** Containers for storing objects + - **Objects:** Individual files stored in buckets with unique key names + - **Keys:** Unique identifiers for objects within buckets + - **Regions:** Geographic locations where buckets are created + - **Versioning:** Ability to keep multiple versions of objects + - **Bucket Policies:** JSON-based access control policies + - **IAM Policies:** Identity-based permissions for S3 access + - **Access Control Lists (ACLs):** Legacy access control method + - **S3 Access Points:** Named network endpoints for simplified access management + +**Verify S3 Features Implementation:** + +1. **Data Privacy and Access Control:** + - Buckets and objects are private by default + - Verify explicit permissions are required for access + - Check bucket policies, IAM policies, ACLs, and S3 Access Points configuration + +2. **Versioning:** + - Review buckets with versioning enabled + - Verify versioning is used to keep multiple versions of objects + - Confirm ability to restore accidentally deleted or overwritten objects + +### AWS CLI + +```bash +# List all S3 buckets +aws s3api list-buckets --query 'Buckets[].[Name,CreationDate]' --output table + +# Get bucket location +aws s3api get-bucket-location --bucket + +# Check versioning status +aws s3api get-bucket-versioning --bucket + +# Review bucket policy +aws s3api get-bucket-policy --bucket --output json + +# Check bucket ACL +aws s3api get-bucket-acl --bucket + +# List access points +aws s3control list-access-points --account-id + +# Check public access block configuration +aws s3api get-public-access-block --bucket + +# Get bucket encryption +aws s3api get-bucket-encryption --bucket +``` + +## Expected Result + +Amazon S3 should be properly understood and implemented with: + +- Buckets created in appropriate AWS regions +- Objects stored with unique key names +- Versioning enabled where appropriate for data protection +- Proper access controls configured (bucket policies, IAM policies, or S3 Access Points) +- Buckets and objects are private by default +- Public access blocked unless explicitly required +- Encryption enabled for data at rest + +## Remediation + +### Understanding S3 Key Concepts + +**How Amazon S3 works:** + +1. **Create a bucket and specify a bucket name and AWS Region:** + - Bucket names must be globally unique + - Choose region based on latency, cost, and regulatory requirements + +2. **Upload data to bucket as objects:** + - Each object has a key (unique identifier within bucket) + - Objects can be up to 5 TB in size + - Use folders (prefixes) for organization + +3. **Configure features:** + - **S3 Versioning:** Keep multiple versions of objects for recovery from accidental deletion or overwrite + - **Bucket Policies:** JSON-based access control policies for buckets and objects + - **IAM Policies:** Identity-based permissions for users and roles + - **ACLs:** Legacy access control (prefer bucket policies or IAM policies) + - **S3 Access Points:** Named network endpoints to simplify access management at scale + +**Data Privacy:** + +- Buckets and objects are **private by default** +- Explicit permissions required via: + - Bucket policies + - IAM policies + - Access Control Lists (ACLs) + - S3 Access Points + +### AWS Console + +1. Navigate to Amazon S3 console: https://s3.console.aws.amazon.com/s3/ +2. Click "Create bucket" +3. Configure bucket settings: + - Bucket name (globally unique) + - Region + - Versioning (recommended: Enabled) + - Encryption (recommended: Enable with SSE-S3 or SSE-KMS) + - Block Public Access (recommended: Enable all options) + - Object Lock (optional, for compliance) + +### AWS CLI + +```bash +# Create S3 bucket +aws s3api create-bucket \ + --bucket \ + --region \ + --create-bucket-configuration LocationConstraint= + +# Enable versioning +aws s3api put-bucket-versioning \ + --bucket \ + --versioning-configuration Status=Enabled + +# Enable encryption +aws s3api put-bucket-encryption \ + --bucket \ + --server-side-encryption-configuration '{ + "Rules": [{ + "ApplyServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + }] + }' + +# Block public access +aws s3api put-public-access-block \ + --bucket \ + --public-access-block-configuration \ + "BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true" + +# Upload object +aws s3 cp s3:/// +``` + +## Default Value + +By default: + +- S3 service is available in all AWS accounts +- Buckets and objects are private +- Versioning is disabled (must be explicitly enabled) +- Encryption is not enabled by default (must be configured) +- No bucket policies are configured +- ACLs provide bucket owner full control + +## References + +1. https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 8.3 Ensure Adequate Audit Log Storage
Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process. | ● | ● | ● | +| v7 | 13.4 Only Allow Access to Authorized Cloud Storage or Email Providers
Only allow access to authorized cloud storage or email providers. | | ● | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-5.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-5.2/SKILL.md new file mode 100644 index 0000000000..18ab3f794d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-5.2/SKILL.md @@ -0,0 +1,208 @@ +--- +name: cis-aws-storage-5.2 +description: "Ensure direct data addition to S3" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, s3, data-upload, access-point, level-2] +cis_id: "5.2" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-5.1, cis-aws-storage-5.3] +prerequisites: [cis-aws-storage-5.1] +severity_boost: {} +--- + +# 5.2 Ensure direct data addition to S3 (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Your bucket name must be unique and not already in use on AWS. Click on your bucket name, and in the right corner, you will find an option to upload data directly to your S3 bucket. You can choose the file option to upload individual files, images, or even entire folders. + +## Rationale + +Accessing the upload option within your bucket simplifies the process of adding data, making it easy to manage and organize your files. This streamlined approach allows for efficient data storage, retrieval, and management within the AWS S3 environment, enhancing overall operational efficiency. + +## Impact + +Without direct data upload capability: + +- **Operational Inefficiency:** Manual data transfer processes become more complex +- **User Experience:** Reduced ease of use for data management +- **Data Management:** Difficulty organizing and uploading files at scale +- **Access Control:** May bypass proper access point configurations if not using recommended methods + +## Audit Procedure + +### AWS Console + +**Access Point in S3 Bucket:** + +Access points are named network endpoints that are attached to buckets which simplify managing data access at scale in S3. To see if any of the access points attached to this bucket grant public or cross-account access, go to IAM Access Analyzer for S3. + +1. Navigate to your S3 bucket +2. Click on the bucket name +3. Review the upload functionality: + - Verify upload button is available in the right corner + - Check for proper access controls before uploading +4. Review Access Points (if configured): + - Navigate to the "Access Points" tab + - Verify access points are properly configured + - Check IAM Access Analyzer for S3 findings +5. Verify bucket configuration: + - Unique bucket name (not used anywhere on AWS) + - Proper VPC configuration (Virtual Private Cloud) + - Appropriate subnet selection + - Endpoint policy configuration (if using access points) + +### AWS CLI + +```bash +# List objects in bucket to verify upload capability +aws s3 ls s3:/// + +# Upload a test file +aws s3 cp s3:/// + +# Verify upload succeeded +aws s3 ls s3:/// + +# List access points for the bucket +aws s3control list-access-points \ + --account-id \ + --bucket + +# Describe specific access point +aws s3control get-access-point \ + --account-id \ + --name + +# Check for public access through access points +aws s3control get-access-point-policy-status \ + --account-id \ + --name +``` + +## Expected Result + +S3 bucket should allow direct data upload with: + +- Unique bucket name globally across AWS +- Upload functionality available through console or CLI +- Proper access controls configured +- Access points (if used) properly configured with appropriate permissions +- No public or unintended cross-account access through access points +- Files can be uploaded individually or in folders +- Upload process is streamlined and efficient + +## Remediation + +### AWS Console + +**Upload Data to S3 Bucket:** + +1. Navigate to your S3 bucket +2. Click on your bucket name +3. In the right corner, find the upload option +4. Choose the file option to upload: + - Individual files + - Images + - Entire folders +5. Select files and upload + +**Configure Access Point (Optional but Recommended for Scale):** + +1. **Enter a name for the access point.** The name must be unique within the AWS account and Region +2. **Choose the VPC (Virtual Private Cloud) and subnet** where you want the access point to be accessible. This determines the network traffic routing for the access point +3. **Optionally, you can configure additional settings** such as permissions, bucket policy, and endpoint policy for the access point +4. **Review the settings, and click on "Create access point"** to create the access point + +### AWS CLI + +**Upload Files to S3:** + +```bash +# Upload single file +aws s3 cp s3:/// + +# Upload directory (recursive) +aws s3 cp / s3://// --recursive + +# Upload with server-side encryption +aws s3 cp s3:/// \ + --server-side-encryption AES256 + +# Sync local directory with S3 bucket +aws s3 sync / s3://// +``` + +**Create Access Point:** + +```bash +# Create access point +aws s3control create-access-point \ + --account-id \ + --name \ + --bucket \ + --vpc-configuration VpcId= + +# Set access point policy +aws s3control put-access-point-policy \ + --account-id \ + --name \ + --policy file://access-point-policy.json + +# Verify access point creation +aws s3control get-access-point \ + --account-id \ + --name +``` + +**Example Access Point Policy (access-point-policy.json):** + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam:::role/" + }, + "Action": ["s3:GetObject", "s3:PutObject"], + "Resource": "arn:aws:s3:::accesspoint//object/*" + } + ] +} +``` + +## Default Value + +By default: + +- S3 buckets support direct upload through console and CLI +- No access points are configured +- Bucket policies and IAM policies control access +- Standard S3 endpoints are used + +## References + +1. https://docs.aws.amazon.com/redshift/latest/dg/tutorial-loading-data-upload-files.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 8.3 Ensure Adequate Audit Log Storage
Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process. | ● | ● | ● | +| v7 | 13.4 Only Allow Access to Authorized Cloud Storage or Email Providers
Only allow access to authorized cloud storage or email providers. | | ● | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-5.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-5.3/SKILL.md new file mode 100644 index 0000000000..52e08a5710 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-5.3/SKILL.md @@ -0,0 +1,309 @@ +--- +name: cis-aws-storage-5.3 +description: "Ensure Storage Classes are Configured" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, s3, storage-classes, cost-optimization, lifecycle, intelligent-tiering, glacier, level-2] +cis_id: "5.3" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-5.1, cis-aws-storage-5.2] +prerequisites: [cis-aws-storage-5.1] +severity_boost: {} +--- + +# 5.3 Ensure Storage Classes are Configured (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Amazon S3 offers various storage classes to optimize cost and performance based on data access patterns and retention needs. **Standard Storage** is for frequently accessed data, while **Standard-IA and One Zone-IA** are for infrequent access, with the latter offering cost savings by storing in a single Availability Zone. **Intelligent-Tiering** automatically moves data between access tiers based on usage, and **Glacier and Glacier Deep Archive** provide low-cost options for long-term archival storage with varying retrieval times. Each class balances availability, durability, performance, and cost, enabling a tailored storage strategy to meet specific requirements. + +## Rationale + +This approach ensures frequently accessed data is readily available, while infrequently accessed data is stored cost-effectively, balancing availability, durability, and cost. + +## Impact + +Not configuring appropriate storage classes can result in: + +- **Cost Inefficiency:** Paying for Standard storage pricing for infrequently accessed data +- **Wasted Resources:** Not leveraging cost-optimized storage tiers +- **Missed Savings:** Failing to use Intelligent-Tiering for data with unknown or changing access patterns +- **Suboptimal Performance:** Using archive storage classes for frequently accessed data +- **Compliance Issues:** Not meeting data retention requirements with appropriate archival storage + +## Audit Procedure + +### AWS Console + +1. Navigate to the Amazon S3 console +2. Select a bucket +3. Review objects and their storage classes: + - Click on individual objects + - Check the "Properties" tab + - Verify the storage class assignment +4. Review lifecycle policies: + - Navigate to "Management" tab + - Check "Lifecycle rules" + - Verify automatic transitions between storage classes +5. Check for Intelligent-Tiering configuration: + - Review objects using S3 Intelligent-Tiering + - Verify automatic tier optimization is enabled + +### AWS CLI + +```bash +# List objects with their storage classes +aws s3api list-objects-v2 \ + --bucket \ + --query 'Contents[].[Key,StorageClass,Size,LastModified]' \ + --output table + +# Get specific object storage class +aws s3api head-object \ + --bucket \ + --key \ + --query 'StorageClass' + +# List lifecycle rules +aws s3api get-bucket-lifecycle-configuration \ + --bucket + +# Get Intelligent-Tiering configuration +aws s3api list-bucket-intelligent-tiering-configurations \ + --bucket + +# Analyze storage class distribution +aws s3api list-objects-v2 \ + --bucket \ + --query 'Contents[].StorageClass' | sort | uniq -c +``` + +## Expected Result + +S3 storage classes should be properly configured based on data access patterns: + +- **Frequently accessed data:** S3 Standard +- **Infrequently accessed data (>30 days):** S3 Standard-IA or S3 One Zone-IA +- **Unknown/changing access patterns:** S3 Intelligent-Tiering +- **Archive data (rarely accessed):** S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive +- Lifecycle policies configured to automatically transition objects between classes +- Cost optimization achieved through appropriate class selection + +## Remediation + +### Understanding S3 Storage Classes + +**Available Storage Classes:** + +1. **S3 Standard:** + - For frequently accessed data + - High durability (99.999999999%) + - Low latency, high throughput + - Most expensive + +2. **S3 Standard-IA (Infrequent Access):** + - For data accessed less frequently but requires rapid access when needed + - Lower storage cost than Standard + - Retrieval fees apply + - Minimum storage duration: 30 days + +3. **S3 One Zone-IA:** + - Similar to Standard-IA but stored in a single Availability Zone + - 20% lower cost than Standard-IA + - Lower durability (99.5% availability) + - Suitable for recreatable data + +4. **S3 Intelligent-Tiering:** + - Automatically moves data between access tiers based on usage + - No retrieval fees + - Small monthly monitoring and automation fee + - Ideal for unknown or changing access patterns + - Four access tiers: + - Frequent Access (automatic) + - Infrequent Access (automatic, 30 days) + - Archive Instant Access (automatic, 90 days) + - Archive Access (optional, 90-730+ days) + - Deep Archive Access (optional, 180-730+ days) + +5. **S3 Glacier Flexible Retrieval (formerly S3 Glacier):** + - Low-cost archival storage + - Retrieval times: 1-5 minutes (Expedited), 3-5 hours (Standard), 5-12 hours (Bulk) + - Minimum storage duration: 90 days + +6. **S3 Glacier Deep Archive:** + - Lowest-cost storage class + - Retrieval time: 12 hours (Standard), 48 hours (Bulk) + - Minimum storage duration: 180 days + - Ideal for data accessed once or twice per year + +### AWS Console + +**Configure Storage Class for New Upload:** + +1. Navigate to S3 bucket +2. Click "Upload" +3. Select files +4. Expand "Properties" +5. Under "Storage class" dropdown, select appropriate class +6. Complete upload + +**Change Storage Class for Existing Object:** + +1. Navigate to object +2. Select object +3. Click "Actions" → "Edit storage class" +4. Select new storage class +5. Save changes + +**Configure Lifecycle Policy:** + +1. Navigate to bucket +2. Select "Management" tab +3. Click "Create lifecycle rule" +4. Configure rule: + - Rule name + - Scope (entire bucket or prefix filter) + - Lifecycle rule actions: + - Transition current versions between storage classes + - Transition previous versions between storage classes + - Expire current versions + - Permanently delete previous versions +5. Define transitions: + - Example: Transition to Standard-IA after 30 days + - Example: Transition to Glacier after 90 days + - Example: Expire after 365 days +6. Review and create + +### AWS CLI + +**Upload Object with Specific Storage Class:** + +```bash +# Upload to Standard-IA +aws s3 cp s3:/// \ + --storage-class STANDARD_IA + +# Upload to Intelligent-Tiering +aws s3 cp s3:/// \ + --storage-class INTELLIGENT_TIERING + +# Upload to Glacier Flexible Retrieval +aws s3 cp s3:/// \ + --storage-class GLACIER + +# Upload to Glacier Deep Archive +aws s3 cp s3:/// \ + --storage-class DEEP_ARCHIVE +``` + +**Change Storage Class of Existing Object:** + +```bash +aws s3api copy-object \ + --bucket \ + --copy-source / \ + --key \ + --storage-class INTELLIGENT_TIERING \ + --metadata-directive COPY +``` + +**Configure Lifecycle Policy:** + +```bash +aws s3api put-bucket-lifecycle-configuration \ + --bucket \ + --lifecycle-configuration file://lifecycle.json +``` + +**Example lifecycle.json:** + +```json +{ + "Rules": [ + { + "Id": "Archive-old-data", + "Status": "Enabled", + "Filter": { + "Prefix": "" + }, + "Transitions": [ + { + "Days": 30, + "StorageClass": "STANDARD_IA" + }, + { + "Days": 90, + "StorageClass": "GLACIER" + }, + { + "Days": 365, + "StorageClass": "DEEP_ARCHIVE" + } + ], + "Expiration": { + "Days": 2555 + } + } + ] +} +``` + +**Enable Intelligent-Tiering:** + +```bash +aws s3api put-bucket-intelligent-tiering-configuration \ + --bucket \ + --id \ + --intelligent-tiering-configuration file://intelligent-tiering.json +``` + +**Example intelligent-tiering.json:** + +```json +{ + "Id": "EntireBucket", + "Status": "Enabled", + "Tierings": [ + { + "Days": 90, + "AccessTier": "ARCHIVE_ACCESS" + }, + { + "Days": 180, + "AccessTier": "DEEP_ARCHIVE_ACCESS" + } + ] +} +``` + +## Default Value + +By default: + +- Objects are stored in **S3 Standard** storage class +- No lifecycle policies are configured +- No automatic transitions between storage classes occur +- Intelligent-Tiering must be explicitly enabled + +## References + +1. https://aws.amazon.com/s3/storage-classes/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists
Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | ● | ● | ● | +| v8 | 8.3 Ensure Adequate Audit Log Storage
Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process. | ● | ● | ● | +| v7 | 7.8 Implement DMARC and Enable Receiver-Side Verification
To lower the chance of spoofed or modified emails from valid domains, implement Domain-based Message Authentication, Reporting and Conformance (DMARC) policy and verification, starting by implementing the Sender Policy Framework (SPF) and the DomainKeys Identified Mail(DKIM) standards. | | ● | ● | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.1/SKILL.md new file mode 100644 index 0000000000..89eb292b22 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.1/SKILL.md @@ -0,0 +1,158 @@ +--- +name: cis-aws-storage-6.1 +description: "Ensure Elastic Disaster Recovery is Configured" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, disaster-recovery, backup, resilience, business-continuity] +cis_id: "6.1" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.2, cis-aws-storage-6.3, cis-aws-storage-6.4, cis-aws-storage-6.8, cis-aws-storage-6.9] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.1: Ensure Elastic Disaster Recovery is Configured (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +AWS Elastic Disaster Recovery is a service that enables you to create and maintain backups of your workloads on AWS, specifically your servers. This service is crucial for ensuring high resilience for your AWS workloads. It operates by establishing and maintaining backups in selected AWS regions, guaranteeing that your data is safe, durable, and highly available in the event of issues in the primary availability zone or region where your AWS server is located. + +AWS Elastic Disaster Recovery is essential to providing high resilience to your AWS workloads. It works by establishing and maintaining backups in AWS regions of your choosing, to ensure that your backups are safe, durable, and highly available if something goes wrong in the availability zone or region that your AWS server resides. + +## Rationale + +AWS Elastic Disaster Recovery is crucial for establishing high resiliency in the cloud, synonymous with effective disaster recovery. High resiliency measures your organization's ability to respond to and recover from disasters impacting IT infrastructure. Achieving high resiliency minimizes downtime and long-term costs associated with outages, while low resiliency can result in prolonged downtime, potential data loss, and even permanent infrastructure damage. + +## Impact + +Implementing AWS Elastic Disaster Recovery requires planning, configuration, and ongoing maintenance. Organizations must allocate resources for setup, testing, and monitoring to ensure the disaster recovery solution remains effective. + +## Audit Procedure + +### Via AWS Console + +1. **Review Disaster Recovery Plans:** + - Log in to the AWS Management Console. + - Navigate to the AWS Elastic Disaster Recovery service. + - Locate and open the disaster recovery plans. + - Verify that the plans are current and comprehensive, covering all critical workloads. + - Ensure that the plans specify clear recovery time objectives (RTO) and recovery point objectives (RPO). + +2. **Check Backup Configurations:** + - In the AWS Elastic Disaster Recovery dashboard, review the list of protected servers and workloads. + - Confirm that backups are enabled for all critical servers and workloads. + - Verify the backup schedule and frequency to ensure they meet organizational requirements. + - Check that backups are being stored in the correct AWS regions as specified in the disaster recovery plan. + +3. **Test Recovery Procedures:** + - Identify a non-production environment to conduct recovery drills. + - Initiate a simulated disaster scenario to test the recovery procedures. + - Execute the recovery process for each critical workload. + - Measure and document the time taken to recover each workload. + - Compare the measured recovery times against the RTO and RPO. + - Identify and document any issues or delays encountered during the recovery process. + +4. **Monitor Backup Integrity:** + - Open the AWS CloudWatch console. + - Set up CloudWatch Alarms to monitor the status of backups. + - Configure alerts for any failed or incomplete backups. + - Regularly review the CloudWatch logs to verify that backups are successfully completed and stored. + +5. **Evaluate Backup Storage and Security:** + - Access the AWS S3 or Glacier console, depending on where backups are stored. + - Verify that all backup data is encrypted in transit and at rest. + - Check the storage settings to confirm that data is being stored in secure, durable storage solutions. + - Review the access control policies to ensure that only authorized personnel have access to backup data. + +6. **Ensure Compliance with Policies and Regulations:** + - Review organizational and regulatory compliance requirements relevant to disaster recovery. + - Ensure that the disaster recovery practices and configurations comply with these requirements. + - Document the compliance efforts, including any specific steps taken to meet industry standards and regulations. + - Prepare reports or evidence of compliance for any upcoming audits or assessments. + +## Expected Result + +- Comprehensive disaster recovery plans exist covering all critical workloads +- Clear RTO and RPO objectives are documented +- Backups are enabled for all critical systems +- Backup schedules meet organizational requirements +- Backups are stored in appropriate AWS regions +- Recovery procedures have been tested successfully +- CloudWatch monitoring is configured for backup status +- All backup data is encrypted in transit and at rest +- Access controls limit backup access to authorized personnel only +- Disaster recovery practices comply with relevant regulations + +## Remediation + +### Via AWS Console + +1. **Update Disaster Recovery Plans:** + - Log in to the AWS Management Console. + - Navigate to the AWS Elastic Disaster Recovery service. + - Locate and review the current disaster recovery plans. + - Update the plans to ensure they are comprehensive and cover all critical workloads. + - Ensure that the plans specify clear recovery time objectives (RTO) and recovery point objectives (RPO). + - Save and document the updated plans. + +2. **Correct Backup Configurations:** + - In the AWS Elastic Disaster Recovery dashboard, review the list of protected servers and workloads. + - Enable backups for any critical servers and workloads that are not currently being backed up. + - Adjust the backup schedule and frequency to meet organizational requirements. + - Ensure backups are stored in the correct AWS regions as specified in the disaster recovery plan. + +3. **Conduct Recovery Procedure Drills:** + - Identify a non-production environment to conduct recovery drills. + - Simulate a disaster scenario to test the recovery procedures. + - Execute the recovery process for each critical workload. + - Measure and document the time taken to recover each workload. + - Compare the measured recovery times against the RTO and RPO. + - Identify and address any issues or delays encountered during the recovery process. + - Update the recovery procedures based on the findings from the drill. + +4. **Ensure Backup Integrity:** + - Open the AWS CloudWatch console. + - Set up CloudWatch Alarms to monitor the status of backups. + - Configure alerts for any failed or incomplete backups. + - Regularly review CloudWatch logs to verify that backups are successfully completed and stored. + - Resolve any issues identified in the logs, such as incomplete or failed backups. + +5. **Enhance Backup Storage and Security:** + - Access the AWS S3 or Glacier console, depending on where backups are stored. + - Ensure all backup data is encrypted in transit and at rest. + - Adjust storage settings to confirm that data is being stored in secure, durable storage solutions. + - Review and update access control policies to ensure only authorized personnel can access backup data. + - Implement any additional security measures necessary to protect the backup data. + +6. **Ensure Compliance with Policies and Regulations:** + - Review organizational and regulatory compliance requirements relevant to disaster recovery. + - Adjust disaster recovery practices and configurations to ensure compliance with these requirements. + - Document the compliance efforts, including specific steps taken to meet industry standards and regulations. + - Prepare and maintain reports or evidence of compliance for any upcoming audits or assessments. + +## Default Value + +By default, AWS Elastic Disaster Recovery is not configured. Organizations must manually set up and configure the service to establish disaster recovery capabilities. + +## References + +- [AWS Elastic Disaster Recovery Documentation](https://aws.amazon.com/disaster-recovery/) +- [AWS Well-Architected Framework - Reliability Pillar](https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/welcome.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 11.2 Perform Automated Backups
Perform automated backups of in-scope enterprise assets. Run backups weekly, or more frequently, based on the sensitivity of the data. | ● | ● | ● | +| v7 | 10.2 Perform Complete System Backups
Ensure that each of the organization's key systems are backed up as a complete system, through processes such as imaging, to enable the quick recovery of an entire system. | ● | ● | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.10/SKILL.md new file mode 100644 index 0000000000..001c3c4964 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.10/SKILL.md @@ -0,0 +1,151 @@ +--- +name: cis-aws-storage-6.10 +description: "Ensure execution of a Disaster Recovery Failover" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, disaster-recovery, failover, recovery, business-continuity] +cis_id: "6.10" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.8, cis-aws-storage-6.9, cis-aws-storage-6.11] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.10: Ensure execution of a Disaster Recovery Failover (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +Execute a comprehensive disaster recovery failover to transition operations from the primary system to a backup system during disruptions. This process includes ensuring all critical data and applications are accurately replicated to the backup site for seamless operational continuity. Regularly test and document the failover process to identify and resolve any issues, maintaining readiness to minimize downtime and data loss during real disasters. + +## Rationale + +Executing a comprehensive disaster recovery failover is essential to ensure operational continuity during disruptions. Accurate replication of critical data and applications to the backup site guarantees that business operations can continue seamlessly. Regular testing and documentation of the failover process help identify and resolve potential issues, maintaining a state of readiness and minimizing downtime and data loss in actual disaster scenarios. + +## Impact + +Failover execution requires: + +- Comprehensive planning and preparation +- Testing in non-production environments first +- Documented procedures +- Trained personnel +- Potential brief service interruption +- Post-failover validation + +Benefits: + +- Validates failover capability +- Ensures business continuity +- Minimizes downtime +- Protects against data loss +- Builds confidence in DR capabilities +- Identifies issues before real disasters + +## Audit Procedure + +### Via AWS Console + +Follow the steps where we learned how to conduct a recovery drill with the below modifications: + +1. **Select Server for Failover:** + - Choose the server that you want to recover and failover. + - On the initiate recovery job menu, choose "initiate recovery." + +2. **Choose Recovery Point:** + - Choose a point in time to recover from backup. + +3. **Initiate Recovery Job:** + - Choose initiate recovery to create a recovery job. + +**Note:** You can use the job details to monitor the progress and status of the recovery job. + +4. **Verify Completion:** + - After the recovery job has completed, the last recovery result of your source server will report "successful." + - The EC2 instance ID of the launched recovery instance will also be listed in the source server overview. + +5. **Test Recovery Instance:** + - You can test if the recovery instance is functioning by testing the EC2 instance that is in the source server overview. + +## Expected Result + +- Recovery job initiated successfully +- Server selected for failover +- Recovery point chosen appropriately +- Job details available for monitoring +- Recovery job completes successfully +- Source server reports "successful" recovery status +- EC2 instance ID listed in source server overview +- Recovery instance accessible and functional +- All critical data replicated correctly +- Applications running on recovery instance +- Minimal downtime experienced +- Process documented + +## Remediation + +### Via AWS Console + +1. **Prepare for Failover:** + - Identify the server to recover and failover + - Verify backup status + - Review recovery procedures + +2. **Initiate Failover:** + - Navigate to recovery job menu + - Select server for failover + - Choose "initiate recovery" (not "initiate drill") + - Select appropriate point-in-time backup + - Confirm and initiate recovery job + +3. **Monitor Progress:** + - Use job details to monitor progress + - Track recovery job status + - Watch for any errors or issues + +4. **Verify Completion:** + - Confirm recovery result shows "successful" + - Verify EC2 instance ID appears in source server overview + - Check instance launch status + +5. **Test Recovery Instance:** + - Access the recovered EC2 instance + - Verify data integrity + - Test application functionality + - Confirm all services are operational + +6. **Document Results:** + - Record recovery time + - Document any issues encountered + - Note lessons learned + - Update procedures if needed + +## Default Value + +Implement a disaster recovery failover. + +By default, no failover procedures are configured or automated. Organizations must manually plan, test, and execute failover operations. + +## References + +- [AWS Elastic Disaster Recovery - Failback Preparing - Failover](https://docs.aws.amazon.com/drs/latest/userguide/failback-preparing-failover.html) +- [AWS DR Failover Best Practices](https://docs.aws.amazon.com/drs/latest/userguide/failover.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 11.4 Establish and Maintain an Isolated Instance of Recovery Data
Establish and maintain an isolated instance of recovery data. Example implementations include, version controlling backup destinations through offline, cloud, or off-site systems or services. | ● | ● | ● | +| v8 | 11.5 Test Data Recovery
Test backup recovery quarterly, or more frequently, for a sampling of in-scope enterprise assets. | | ● | ● | +| v7 | 10.4 Ensure Protection of Backups
Ensure that backups are properly protected via physical security or encryption when they are stored, as well as when they are moved across the network. This includes remote backups and cloud services. | ● | ● | ● | +| v7 | 10.5 Ensure Backups Have At least One Non-Continuously Addressable Destination
Ensure that all backups have at least one backup destination that is not continuously addressable through operating system calls. | ● | ● | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.11/SKILL.md new file mode 100644 index 0000000000..4c1a1d5cf4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.11/SKILL.md @@ -0,0 +1,173 @@ +--- +name: cis-aws-storage-6.11 +description: "Ensure execution of a failback" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, disaster-recovery, failback, recovery, restoration] +cis_id: "6.11" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.10, cis-aws-storage-6.9] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.11: Ensure execution of a failback (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +This method involves transitioning operations back from the backup or recovery system to the primary system after the resolution of a disruption or disaster. You can execute a failback either to the original server, ensuring continuity and restoring the previous state, or to a new server, which might be necessary if the original server is compromised or no longer functional. The failback process ensures that all updated data and configurations are transferred back, maintaining the integrity and functionality of the primary system. + +## Rationale + +A failback is crucial for restoring normal operations after a disaster recovery scenario. Transitioning operations back to the primary system ensures continuity and leverages the original environment's configurations and settings. This process can be directed either to the original server, maintaining the existing infrastructure, or to a new server if the original is compromised. Ensuring all data and configurations are accurately transferred back preserves system integrity and functionality, reducing downtime and allowing the organization to resume normal operations efficiently. + +## Impact + +Failback operations require: + +- Completion of disaster resolution +- Verification that primary environment is ready +- Failback client ISO installation +- Data synchronization between recovery and primary +- Potential brief service interruption +- Post-failback validation + +Prerequisites: + +- Volumes on server being failed back to must be same size or larger than recovery instance +- Failback client must have proper IAM permissions +- Network connectivity (TCP 1500 inbound, TCP 443 outbound) +- Public IP added to recovery instance + +## Audit Procedure + +### Via AWS Console + +**Performing the failback:** + +1. **Download Failback Client ISO:** + - Download the failback client ISO + +2. **Attach ISO and Boot:** + - Attach the ISO to your original server and boot up the server. + - The failback client will prompt for the IAM access key and secret key generated when making the user with the permission to access the failback. + - It will also ask for the recovery instance. Remember: regions are case sensitive. If you're in US east 1, type "us-east-1." + +3. **Select Target Server:** + - If you are failing back to the original server, the failback client will automatically detect the recovery instance and map the data volumes for replication. + - If you are failing back to a new server, you may need to manually specify from a list of available recovery instances and map the data volumes. + +4. **Monitor Replication:** + - Return to the elastic disaster recovery console and recovery instances to see the current state of replication. + - Failing back to the original server will show "rescan" in the console, while failing back to a new instance will perform an "initial sync." + +5. **Complete Data Replication:** + - After the data replication is completed, you will be able to perform the failback. + - Check the state of the recovery instance to ensure that it's ready to complete a failback. + - Select your recovery instance, then choose failback for the chosen recovery instance(s). + +6. **Execute Failback:** + - Choose failback again the complete a failback for the chosen recovery instance(s). + - During the failback process, the failback client will prepare your source server for normal operation. + - After it has completed successfully, the failback client will return "failback completed successfully" in the console. + +7. **Finalize:** + - Reboot the server and return to normal operations. + +8. **Clean Up:** + - Clean up failback job; terminate recovery job by following the steps outlined above when we ran a drill. + +## Expected Result + +- Failback client ISO downloaded successfully +- ISO attached to original/new server +- Server boots with failback client +- IAM credentials provided and authenticated +- Region entered correctly (case-sensitive) +- Recovery instance detected (automatic or manual) +- Data volumes mapped correctly +- Replication initiated and monitored +- Console shows appropriate status ("rescan" or "initial sync") +- Data replication completes successfully +- Recovery instance ready for failback +- Failback initiated successfully +- Failback completes with success message +- Server rebooted successfully +- Normal operations restored +- Failback job cleaned up +- Recovery instances terminated + +## Remediation + +### Via AWS Console + +1. **Prepare Failback Environment:** + - Verify original/target server meets prerequisites: + - Volumes same size or larger than recovery instance + - Network allows TCP 1500 inbound, TCP 443 outbound + - Public IP available if needed + - Ensure IAM credentials are accessible + +2. **Install Failback Client:** + - Download failback client ISO + - Attach ISO to target server + - Boot server from ISO + +3. **Configure Failback:** + - Enter IAM access key and secret key + - Enter region (case-sensitive, e.g., "us-east-1") + - For original server: automatic detection + - For new server: manually select recovery instance and map volumes + +4. **Monitor Replication:** + - Access elastic disaster recovery console + - Navigate to recovery instances + - Monitor replication status: + - "rescan" for original server + - "initial sync" for new server + - Wait for replication to complete + +5. **Execute Failback:** + - Verify recovery instance is ready + - Select recovery instance + - Choose "failback" option + - Confirm failback action + - Monitor failback progress + - Wait for "failback completed successfully" message + +6. **Finalize and Clean Up:** + - Reboot the server + - Verify normal operations + - Test system functionality + - Clean up failback job + - Terminate recovery instances + - Document the process + +## Default Value + +By default, no failback procedures are configured. Organizations must manually execute failback operations when needed. + +## References + +- [AWS Elastic Disaster Recovery - Failback Performing Main](https://docs.aws.amazon.com/drs/latest/userguide/failback-performing-main.html) +- [AWS EDR Failback Best Practices](https://docs.aws.amazon.com/drs/latest/userguide/failback.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 11.1 Establish and Maintain a Data Recovery Process
Establish and maintain a data recovery process. In the process, address the scope of data recovery activities, recovery prioritization, and the security of backup data. Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard. | ● | ● | ● | +| v8 | 11.5 Test Data Recovery
Test backup recovery quarterly, or more frequently, for a sampling of in-scope enterprise assets. | | ● | ● | +| v7 | 10.2 Perform Complete System Backups
Ensure that each of the organization's key systems are backed up as a complete system, through processes such as imaging, to enable the quick recovery of an entire system. | ● | ● | ● | +| v7 | 10.3 Test Data on Backup Media
Test data integrity on backup media on a regular basis by performing a data restoration process to ensure that the backup is properly working. | | ● | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.12/SKILL.md new file mode 100644 index 0000000000..6480319951 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.12/SKILL.md @@ -0,0 +1,199 @@ +--- +name: cis-aws-storage-6.12 +description: "Ensure CloudWatch Metrics for AWS EDR" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, cloudwatch, monitoring, metrics, logging, alerting] +cis_id: "6.12" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.9, cis-aws-storage-6.13] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.12: Ensure CloudWatch Metrics for AWS EDR (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +Set up and monitor AWS CloudWatch metrics for Endpoint Detection and Response (EDR) to track and analyze the performance and security of your AWS environment. This involves configuring CloudWatch to collect detailed logs and metrics on EDR activities, such as threat detections, response actions, and system health. Regularly review these metrics to identify trends, anomalies, and potential security issues, enabling proactive management and timely responses to ensure the effectiveness of your EDR solution. + +## Rationale + +Implementing AWS CloudWatch metrics for Endpoint Detection and Response (EDR) is essential for maintaining a secure and efficient AWS environment. By collecting detailed logs and metrics on EDR activities, you gain valuable insights into the performance and health of your security measures. Regular review of these metrics allows for the early detection of trends, anomalies, and potential security threats, enabling proactive management and swift responses to maintain the integrity and effectiveness of your EDR solution. This continuous monitoring ensures that your security posture remains robust and adaptive to evolving threats. + +## Impact + +CloudWatch monitoring provides: + +- Visibility into EDR performance +- Early detection of issues +- Trend analysis capabilities +- Anomaly detection +- Proactive management capabilities +- Audit trail for compliance + +Requirements: + +- CloudWatch log group configuration +- Metric collection setup +- Alarm configuration +- Dashboard creation +- Log insights queries +- Event rule configuration + +## Audit Procedure + +### Via AWS Console + +1. **Sign in to the AWS Management Console:** + - Open the [AWS Management Console](https://console.aws.amazon.com) and sign in with your credentials. + +2. **Navigate to CloudWatch:** + - In the AWS Management Console, navigate to the CloudWatch service. + +3. **Create a CloudWatch Log Group:** + - Select Logs from the navigation pane. + - Click on Create log group. + - Enter a name for the log group and click Create. + +4. **Configure AWS EDR to Send Logs to CloudWatch:** + - Go to the AWS EDR (Elastic Disaster Recovery) console. + - In the AWS EDR console, configure your settings to send logs and metrics to the CloudWatch log group you created. + +5. **Set Up CloudWatch Alarms:** + - In the CloudWatch console, select Alarms from the navigation pane. + - Click on Create Alarm. + - Select the metric you want to monitor from the list of AWS EDR metrics. + - Configure the conditions for the alarm (e.g., threshold, period, etc.). + - Set the actions to take when the alarm state is triggered (e.g., send a notification). + - Review and create the alarm. + +6. **Create CloudWatch Dashboards:** + - In the CloudWatch console, select Dashboards from the navigation pane. + - Click on Create dashboard. + - Enter a name for your dashboard and click Create. + - Add widgets to the dashboard by selecting the relevant AWS EDR metrics. + - Customize the widgets to display the data in a meaningful way (e.g., graphs, numbers). + +7. **Enable CloudWatch Logs Insights:** + - In the CloudWatch console, select Logs Insights from the navigation pane. + - Choose the log group you created for AWS EDR. + - Use CloudWatch Logs Insights queries to analyze the log data and extract meaningful insights. + +8. **Set Up CloudWatch Events:** + - In the CloudWatch console, select Events from the navigation pane. + - Click on Create rule. + - Define the event source and the specific events you want to capture (e.g., changes in EDR status). + - Set the target for the event (e.g., send a notification, invoke a Lambda function). + - Configure the rule and click Create rule. + +## Expected Result + +- CloudWatch log group created with appropriate name +- AWS EDR configured to send logs to CloudWatch +- CloudWatch alarms configured for key EDR metrics: + - Threat detection alerts + - Response action monitoring + - System health metrics + - Replication status + - Backup completion status +- Alarm thresholds configured appropriately +- Alarm actions configured (notifications, Lambda, etc.) +- CloudWatch dashboards created showing: + - EDR activity metrics + - Threat detection trends + - System health status + - Performance metrics +- Dashboard widgets customized for clarity +- CloudWatch Logs Insights configured +- Log queries available for analysis +- CloudWatch Events rules created for: + - EDR status changes + - Critical alerts + - Configuration changes +- Event targets configured (SNS, Lambda, etc.) + +## Remediation + +### Via AWS Console + +1. **Create Log Group:** + - Sign in to AWS Management Console + - Navigate to CloudWatch service + - Select Logs > Create log group + - Enter meaningful name (e.g., "aws-edr-logs") + - Create log group + +2. **Configure EDR Logging:** + - Access AWS EDR console + - Configure settings to send logs to CloudWatch + - Verify log delivery + +3. **Set Up Alarms:** + - In CloudWatch, select Alarms > Create Alarm + - Select EDR metrics to monitor: + - Replication lag + - Backup failures + - Recovery job status + - Threat detections + - Configure thresholds and periods + - Set actions (SNS notifications, Lambda, etc.) + - Create alarms + +4. **Create Dashboards:** + - Select Dashboards > Create dashboard + - Name dashboard (e.g., "EDR-Monitoring") + - Add widgets for key metrics: + - Replication status + - Backup completion rates + - Recovery instance health + - Alert trends + - Customize visualization + - Save dashboard + +5. **Enable Logs Insights:** + - Select Logs Insights + - Choose EDR log group + - Create useful queries for common analysis + - Save queries for future use + +6. **Configure Events:** + - Select Events > Create rule + - Define event patterns for: + - EDR status changes + - Failed backups + - Failed replication + - Security alerts + - Configure targets (SNS, Lambda, etc.) + - Create and enable rules + +7. **Test and Verify:** + - Generate test events + - Verify alarms trigger correctly + - Check dashboard displays data + - Validate log ingestion + - Test event rules + +## Default Value + +By default, CloudWatch metrics for AWS EDR are not configured. Organizations must manually set up log groups, metrics, alarms, dashboards, and event rules. + +## References + +- [AWS CloudWatch Monitoring](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) +- [AWS Elastic Disaster Recovery Monitoring](https://docs.aws.amazon.com/drs/latest/userguide/monitoring.html) + +## CIS Controls + +This control supports monitoring and logging best practices but does not directly map to specific CIS Controls v7/v8 items. It enables compliance with multiple controls related to logging, monitoring, and incident response. + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.13/SKILL.md new file mode 100644 index 0000000000..bcd0171157 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.13/SKILL.md @@ -0,0 +1,211 @@ +--- +name: cis-aws-storage-6.13 +description: "Ensure working of EDR" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, disaster-recovery, verification, testing, functionality] +cis_id: "6.13" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.1, cis-aws-storage-6.3, cis-aws-storage-6.4, cis-aws-storage-6.6, cis-aws-storage-6.12] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.13: Ensure working of EDR (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +This control ensures the complete functionality and proper configuration of AWS Elastic Disaster Recovery (EDR). It validates that all components of the EDR system are working correctly, from environment preparation through agent installation, replication, and recovery capabilities. + +## Rationale + +Verifying the working state of EDR is essential to ensure that disaster recovery capabilities are functional when needed. A comprehensive validation of all EDR components ensures that the organization can successfully recover from disasters, minimizing downtime and data loss. This holistic verification approach confirms that all prerequisites, configurations, and processes are properly aligned. + +## Impact + +Ensuring EDR functionality requires: + +- Environment preparation and validation +- Source server configuration +- Staging area setup +- Replication agent installation +- Network connectivity verification +- Security group configuration +- Encryption implementation +- Point-in-time policy configuration + +Benefits: + +- Confidence in disaster recovery capability +- Early detection of configuration issues +- Validated recovery processes +- Verified data protection +- Compliance readiness + +## Audit Procedure + +### Via AWS Console + +This control encompasses the complete EDR setup and verification process: + +1. **Preparing the Environment for EDR:** + - Before getting started with EDR, you must prepare the environment that you want to back up. + +2. **Preparing the Source Server:** + - Allow direct access to Elastic Disaster Recovery and Amazon S3 AWS service API endpoints through HTTPS protocol (TCP port 443). + - Direct outbound TCP port 1500 from the source server to the staging area subnet, which contains the replication servers. + +3. **Preparing the Staging Area Subnet:** + - Allow Direct access to EDR, S3, and EC2 through HTTPS protocol (TCP port 443) + - Direct inbound TCP port 1500 for replication traffic + +4. **Accessing the AWS Elastic Disaster Recovery Console:** + - Search for "AWS Elastic Disaster Recovery" in the AWS Console. + - Select "Elastic Disaster Recovery" + +5. **Configuring the Replication Settings Template:** + - Select `Configure and Initializein` in the AWS Elastic Disaster Recovery screen. + - You will be navigated to setup your replication settings template. This will create a staging area in a subnet of your choice and a replication server instance types. + - The default replication server instance type will be a t3 micro EC2 instance. This is good for normal workloads with small I/O operations. + +6. **Configure EBS encryption and volume types:** + - This will depend on your workload requirements. + +7. **Configure EBS volumes:** + - To encrypt EBS volumes, leave the setting as "default." If you wish to make a custom encryption setting, you will need to create an AWS KMS key. + +8. **Configure the security group:** + - Remember what ports need to be opened on inbound / outbound traffic that was specified in previous steps: + - You can choose how you want your data routed and if you want to throttle network traffic to reserve bandwidth. + - To keep your data as secure as possible, it's recommended to get set up with a VPN or AWS direct connect, so your backups are not traveling over the public internet. + - Point in time policy defines the snapshot retention time. Because Elastic Disaster Recovery service uses incremental backups, it's not necessary to keep old copies of backups. + +9. **Launch the template:** + - Now, you're ready to launch this template. + +## Expected Result + +**Environment Preparation:** + +- Environment prepared for EDR deployment +- Backup requirements identified + +**Source Server Configuration:** + +- Direct access to EDR endpoints (TCP 443) configured +- Direct access to S3 endpoints (TCP 443) configured +- Outbound TCP port 1500 configured to staging area + +**Staging Area Configuration:** + +- Access to EDR, S3, EC2 via HTTPS (TCP 443) configured +- Inbound TCP port 1500 allowed for replication traffic + +**EDR Console Access:** + +- Successfully accessed AWS EDR console +- Service available and responsive + +**Replication Settings:** + +- Replication settings template configured +- Staging area created in appropriate subnet +- Replication server instance type selected (default: t3.micro) + +**EBS Configuration:** + +- EBS encryption enabled (default or custom KMS key) +- Volume types configured for workload requirements + +**Security Group Configuration:** + +- Security groups properly configured with required ports +- Network routing configured (VPN or Direct Connect recommended) +- Bandwidth throttling configured if needed + +**Retention Policy:** + +- Point-in-time policy configured +- Incremental backup strategy implemented + +**Template Launch:** + +- Template launched successfully +- EDR operational and ready for use + +## Remediation + +### Via AWS Console + +Follow the complete EDR setup process: + +1. **Prepare Environment:** + - Identify systems requiring EDR protection + - Document backup requirements + - Plan network architecture + +2. **Configure Source Server:** + - Allow HTTPS access to EDR endpoints (TCP 443) + - Allow HTTPS access to S3 endpoints (TCP 443) + - Configure outbound TCP 1500 to staging area + +3. **Configure Staging Area:** + - Allow HTTPS to EDR, S3, EC2 (TCP 443) + - Allow inbound TCP 1500 for replication + +4. **Access EDR Console:** + - Search for "AWS Elastic Disaster Recovery" + - Open EDR console + +5. **Configure Replication Template:** + - Select "Configure and Initialize" + - Choose staging area subnet + - Select replication server instance type + - Configure for workload I/O requirements + +6. **Configure EBS:** + - Enable EBS encryption (default recommended) + - Create custom KMS key if needed + - Select appropriate volume types + +7. **Configure Security Groups:** + - Configure required ports (TCP 443, TCP 1500) + - Set up network routing + - Implement VPN or Direct Connect for security + - Configure bandwidth throttling if needed + +8. **Configure Retention:** + - Set point-in-time policy + - Configure snapshot retention time + - Leverage incremental backup strategy + +9. **Launch and Verify:** + - Launch the template + - Verify all components are operational + - Test replication + - Validate recovery capabilities + +## Default Value + +By default, EDR is not configured or enabled. Organizations must complete the full configuration process to enable EDR functionality. + +## References + +- [AWS Elastic Disaster Recovery Documentation](https://aws.amazon.com/disaster-recovery/) +- [AWS EDR Getting Started Guide](https://docs.aws.amazon.com/drs/latest/userguide/getting-started.html) +- [AWS EDR Network Requirements](https://docs.aws.amazon.com/drs/latest/userguide/network-requirements.html) + +## CIS Controls + +This control represents a comprehensive validation of EDR functionality and supports multiple CIS Controls related to backup, recovery, and business continuity. + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.2/SKILL.md new file mode 100644 index 0000000000..a15444bed2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.2/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-aws-storage-6.2 +description: "Ensure AWS Disaster Recovery Configuration" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, disaster-recovery, network, architecture, vpc, replication] +cis_id: "6.2" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.1, cis-aws-storage-6.3, cis-aws-storage-6.4] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.2: Ensure AWS Disaster Recovery Configuration (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +It's important to understand how the network on EDR works. This isn't a simple service to configure, but it works with multiple work loads over the network. You can connect your on-premises or third-party cloud service to AWS EDR over the network. + +### AWS Network Architecture for EDR: + +1. **Local Network Connection:** + - Connect an AWS Replication Agent to each of your resources in your local network inside the data center or cloud. + +2. **AWS Cloud Architecture:** + - Choose the AWS Region that you want to house your disaster recovery instances. + - Create AWS API Endpoints for EC2, Disaster Recovery, and S3. + - Upon creation of Disaster Recovery endpoints, two subnets will be created in your VPC: + - **Staging Area Subnets:** Replication servers with EBS volumes attached to each disk on the servers. + - **Recovery Subnets:** Recovery EC2 instances attached to EBS volumes. + +3. **Network Connectivity:** + - Connect local network over TCP port 443 to EDR and S3. + - Connect local replication agent to AWS replication servers over TCP port 1500. + - Connectivity out of staging area: Connect staging area on AWS to EDR over TCP port 443. + - Allow connection to S3 over TCP 443. + - Allow connectivity to EC2 over TCP 443 to connect to API Endpoint. + +## Rationale + +Understanding the network architecture is essential for proper EDR implementation. The network configuration ensures secure, reliable data replication between on-premises or third-party cloud environments and AWS, enabling effective disaster recovery capabilities. + +## Impact + +Proper network configuration requires careful planning of VPC architecture, subnet design, security group rules, and network connectivity. Organizations must ensure adequate bandwidth and network security controls are in place. + +## Audit Procedure + +This control focuses on understanding and documenting the network architecture. Verification should include: + +- Reviewing VPC configuration for EDR endpoints +- Confirming staging and recovery subnets are properly configured +- Verifying security group rules allow required ports (TCP 443, TCP 1500) +- Ensuring network connectivity between on-premises and AWS +- Validating replication agent network access + +## Expected Result + +- VPC configured with proper EDR endpoints +- Staging Area Subnets created with replication servers +- Recovery Subnets created for EC2 instances +- Security groups allow TCP 443 (EDR, S3, EC2 API) +- Security groups allow TCP 1500 (replication traffic) +- Network connectivity tested and verified +- Bandwidth sufficient for replication requirements + +## Remediation + +### Via AWS Console + +Configure the network architecture according to AWS EDR requirements: + +1. Create or select VPC for EDR +2. Configure EDR API endpoints +3. Verify subnet creation (staging and recovery) +4. Configure security groups with required ports +5. Test network connectivity +6. Document network architecture + +## Default Value + +By default, no EDR network configuration exists. Organizations must manually configure the network architecture for EDR. + +## References + +- [AWS Disaster Recovery Documentation](https://aws.amazon.com/disaster-recovery/) +- [AWS Elastic Disaster Recovery Network Requirements](https://docs.aws.amazon.com/drs/latest/userguide/network-requirements.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 11.4 Establish and Maintain an Isolated Instance of Recovery Data
Establish and maintain an isolated instance of recovery data. Example implementations include, version controlling backup destinations through offline, cloud, or off-site systems or services. | ● | ● | ● | +| v8 | 13.3 Deploy a Network Intrusion Detection Solution
Deploy a network intrusion detection solution on enterprise assets, where appropriate. Example implementations include the use of a Network Intrusion Detection System (NIDS) or equivalent cloud service provider (CSP) service. | | ● | ● | +| v7 | 10.4 Ensure Protection of Backups
Ensure that backups are properly protected via physical security or encryption when they are stored, as well as when they are moved across the network. This includes remote backups and cloud services. | ● | ● | ● | +| v7 | 13.4 Only Allow Access to Authorized Cloud Storage or Email Providers
Only allow access to authorized cloud storage or email providers. | | ● | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.3/SKILL.md new file mode 100644 index 0000000000..b84c9f8644 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.3/SKILL.md @@ -0,0 +1,130 @@ +--- +name: cis-aws-storage-6.3 +description: "Ensure functionality of Endpoint Detection and Response (EDR)" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, endpoint-detection, security, threat-detection, malware] +cis_id: "6.3" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.1, cis-aws-storage-6.2, cis-aws-storage-6.4] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.3: Ensure functionality of Endpoint Detection and Response (EDR) (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +Establish and maintain an effective Endpoint Detection and Response (EDR) system to proactively monitor, detect, and respond to security threats on endpoints such as computers, mobile devices, and servers. This involves deploying EDR software that continuously collects data from endpoints, analyzes this data for signs of malicious activity, and provides real-time alerts and detailed incident reports. Regularly test and update the EDR system to ensure it can accurately identify and mitigate advanced threats, including zero-day exploits and sophisticated malware, ensuring comprehensive protection and swift response to potential security incidents. + +## Rationale + +Ensuring the functionality of Endpoint Detection and Response (EDR) systems is essential for early detection and swift response to security threats on endpoints. These systems continuously monitor and analyze endpoint data, providing real-time alerts and detailed incident reports to identify and mitigate potential threats. Regular testing and updates of the EDR system ensure it remains effective against advanced threats, maintaining comprehensive protection for the organization's assets. + +## Impact + +Implementing and maintaining EDR requires: + +- Deployment of EDR software on all endpoints +- Continuous monitoring and analysis infrastructure +- Regular testing and updates +- Trained security personnel to respond to alerts +- Integration with incident response procedures + +## Audit Procedure + +### Via AWS Console + +1. **Preparing the Environment for EDR:** + - Before getting started with EDR, you must prepare the environment that you want to back up. + +2. **Preparing the Source Server:** + - Allow direct access to Elastic Disaster Recovery and Amazon S3 AWS service API endpoints through HTTPS protocol (TCP port 443). + - Direct outbound TCP port 1500 from the source server to the staging area subnet, which contains the replication servers. + +3. **Preparing the Staging Area Subnet:** + - Allow Direct access to EDR, S3, and EC2 through HTTPS protocol (TCP port 443) + - Direct inbound TCP port 1500 for replication traffic + +4. **Accessing the AWS Elastic Disaster Recovery Console:** + - Search for "AWS Elastic Disaster Recovery" in the AWS Console. + - Select "Elastic Disaster Recovery" + +5. **Configuring the Replication Settings Template:** + - Select `Configure and Initializein` in the AWS Elastic Disaster Recovery screen. + - You will be navigated to setup your replication settings template. This will create a staging area in a subnet of your choice and a replication server instance types. + - The default replication server instance type will be a t3 micro EC2 instance. This is good for normal workloads with small I/O operations. + +6. **Configure EBS encryption and volume types:** + - This will depend on your workload requirements. + +7. **Configure EBS volumes:** + - To encrypt EBS volumes, leave the setting as "default." If you wish to make a custom encryption setting, you will need to create an AWS KMS key. + +8. **Configure the security group:** + - Remember what ports need to be opened on inbound / outbound traffic that was specified in previous steps. + - You can choose how you want your data routed and if you want to throttle network traffic to reserve bandwidth. + - To keep your data as secure as possible, it's recommended to get set up with a VPN or AWS direct connect, so your backups are not traveling over the public internet. + - Point in time policy defines the snapshot retention time. Because Elastic Disaster Recovery service uses incremental backups, it's not necessary to keep old copies of backups. + +9. **Launch the template:** + - Now, you're ready to launch this template. + +## Expected Result + +- EDR environment properly prepared and configured +- Source servers have network access to EDR and S3 endpoints (TCP 443) +- Outbound TCP port 1500 configured from source to staging area +- Staging area subnet allows EDR, S3, EC2 access (TCP 443) +- Staging area allows inbound TCP 1500 for replication +- Replication settings template configured +- EBS encryption enabled +- Security groups properly configured +- Network routing configured (preferably VPN or Direct Connect) +- Point-in-time policy configured for snapshot retention + +## Remediation + +### Via AWS Console + +Follow the audit procedure steps to configure EDR functionality: + +1. Prepare the environment for EDR deployment +2. Configure source server network access +3. Configure staging area subnet +4. Access AWS Elastic Disaster Recovery Console +5. Configure replication settings template +6. Enable EBS encryption +7. Configure security groups with required ports +8. Set up secure network routing (VPN/Direct Connect recommended) +9. Configure point-in-time policy +10. Launch and test the configuration + +## Default Value + +By default, EDR is not configured. Organizations must manually set up all components including network access, security groups, replication settings, and encryption. + +## References + +- [AWS Elastic Disaster Recovery User Guide](https://docs.aws.amazon.com/drs/latest/userguide/) +- [AWS EDR Installation Requirements](https://docs.aws.amazon.com/mgn/latest/ug/installation-requirements.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 13.2 Deploy a Host-Based Intrusion Detection Solution
Deploy a host-based intrusion detection solution on enterprise assets, where appropriate and/or supported. | | ● | ● | +| v8 | 13.3 Deploy a Network Intrusion Detection Solution
Deploy a network intrusion detection solution on enterprise assets, where appropriate. Example implementations include the use of a Network Intrusion Detection System (NIDS) or equivalent cloud service provider (CSP) service. | | ● | ● | +| v7 | 8.6 Centralize Anti-malware Logging
Send all malware detection events to enterprise anti-malware administration tools and event log servers for analysis and alerting. | | ● | ● | +| v7 | 12.6 Deploy Network-based IDS Sensor
Deploy network-based Intrusion Detection Systems (IDS) sensors to look for unusual attack mechanisms and detect compromise of these systems at each of the organization's network boundaries. | | ● | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.4/SKILL.md new file mode 100644 index 0000000000..a7e2c92e3b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.4/SKILL.md @@ -0,0 +1,132 @@ +--- +name: cis-aws-storage-6.4 +description: "Ensure configuration of replication settings" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, replication, data-duplication, bandwidth, rto, rpo] +cis_id: "6.4" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.1, cis-aws-storage-6.2, cis-aws-storage-6.3, cis-aws-storage-6.6] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.4: Ensure configuration of replication settings (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +Set up and maintain the replication settings to ensure accurate and efficient data duplication across systems. Proper configuration includes specifying source and target locations, defining replication schedules, and setting bandwidth limits to optimize performance. Regularly review and update these settings to accommodate changes in data volume and network conditions, ensuring data integrity and availability during replication processes. + +## Rationale + +Proper configuration of replication settings is essential to ensure data consistency and availability across systems. Accurate replication schedules and bandwidth management optimize performance and prevent network congestion. Regular reviews and updates of these settings help adapt to changes in data volume and network conditions, maintaining efficient and reliable data replication processes. + +## Impact + +Replication configuration affects: + +- Data consistency across regions +- Network bandwidth utilization +- Recovery Time Objective (RTO) and Recovery Point Objective (RPO) +- Operational costs +- System performance + +## Audit Procedure + +### Via AWS Console + +1. **Access Replication Settings:** + - Select "Configure and Initialize" in the AWS Elastic Disaster Recovery screen. + - You will be navigated to setup your replication settings template. + - This will create a staging area in a subnet of your choice and a replication server instance types. + - The default replication server instance type will be a t3 micro EC2 instance. This is good for normal workloads with small I/O operations. + +2. **Review EBS Configuration:** + - Configure EBS encryption and volume types. This will depend on your workload requirements. + - To encrypt EBS volumes, leave the setting as "default." If you wish to make a custom encryption setting, you will need to create an AWS KMS key. + +3. **Review Security Group Configuration:** + - Configure the security group to your specific needs. + - Remember what ports need to be opened on inbound / outbound traffic that was specified in previous steps. + - You can choose how you want your data routed and if you want to throttle network traffic to reserve bandwidth. + - To keep your data as secure as possible, it's recommended to get set up with a VPN or AWS direct connect, so your backups are not traveling over the public internet. + - Point in time policy defines the snapshot retention time. Because Elastic Disaster Recovery service uses incremental backups, it's not necessary to keep old copies of backups. + +4. **Launch Template:** + - Now, you're ready to launch this template. + +## Expected Result + +- Replication settings template properly configured +- Staging area created in appropriate subnet +- Replication server instance type selected (default: t3.micro for small I/O) +- EBS encryption configured (default or custom KMS key) +- EBS volume types match workload requirements +- Security groups configured with correct ports: + - Inbound TCP 1500 for replication traffic + - Outbound TCP 443 for EDR, S3, EC2 API access +- Network routing configured appropriately +- Bandwidth throttling configured if needed +- VPN or AWS Direct Connect recommended for secure transit +- Point-in-time policy configured for snapshot retention +- Incremental backup strategy implemented + +## Remediation + +### Via AWS Console + +1. **Configure Replication Template:** + - Navigate to AWS Elastic Disaster Recovery service + - Select "Configure and Initialize" + - Choose staging area subnet + - Select appropriate replication server instance type + +2. **Configure EBS Settings:** + - Configure EBS encryption (leave as "default" or create custom KMS key) + - Select appropriate volume types for workload requirements + +3. **Configure Security Groups:** + - Configure security group rules: + - Allow inbound TCP 1500 for replication + - Allow outbound TCP 443 for EDR, S3, EC2 + - Configure network routing + - Set bandwidth throttling if needed + - Implement VPN or Direct Connect for secure data transit + +4. **Configure Retention Policy:** + - Set point-in-time policy for snapshot retention + - Configure incremental backup settings + +5. **Launch Configuration:** + - Review all settings + - Launch the replication template + - Verify configuration is active + +## Default Value + +By default, no replication settings are configured. Organizations must manually configure all replication parameters including staging area, instance types, encryption, security groups, and retention policies. + +## References + +- [AWS Elastic Disaster Recovery Replication Settings](https://docs.aws.amazon.com/drs/latest/userguide/replication-settings.html) +- [AWS EDR Configuration Best Practices](https://docs.aws.amazon.com/drs/latest/userguide/best-practices.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 11.2 Perform Automated Backups
Perform automated backups of in-scope enterprise assets. Run backups weekly, or more frequently, based on the sensitivity of the data. | ● | ● | ● | +| v8 | 11.4 Establish and Maintain an Isolated Instance of Recovery Data
Establish and maintain an isolated instance of recovery data. Example implementations include, version controlling backup destinations through offline, cloud, or off-site systems or services. | ● | ● | ● | +| v7 | 10.4 Ensure Protection of Backups
Ensure that backups are properly protected via physical security or encryption when they are stored, as well as when they are moved across the network. This includes remote backups and cloud services. | ● | ● | ● | +| v7 | 10.5 Ensure Backups Have At least One Non-Continuously Addressable Destination
Ensure that all backups have at least one backup destination that is not continuously addressable through operating system calls. | ● | ● | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.5/SKILL.md new file mode 100644 index 0000000000..77c5b28a1b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.5/SKILL.md @@ -0,0 +1,134 @@ +--- +name: cis-aws-storage-6.5 +description: "Ensure proper IAM configuration for AWS Elastic Disaster Recovery" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, iam, access-control, mfa, least-privilege, authentication] +cis_id: "6.5" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.1, cis-aws-storage-6.6] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.5: Ensure proper IAM configuration for AWS Elastic Disaster Recovery (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +Set up and maintain Identity and Access Management (IAM) roles and policies specifically for AWS Elastic Disaster Recovery. This includes defining least-privilege access for users and services, creating roles for automated processes, and enforcing multi-factor authentication (MFA) for added security. Regularly review and update IAM policies to adapt to changes in the organization and to maintain compliance with security best practices, ensuring that only authorized personnel and services can access and manage disaster recovery resources. + +## Rationale + +Proper IAM configuration for AWS Elastic Disaster Recovery ensures that only authorized users and services have access to critical recovery functions, reducing the risk of unauthorized access and potential security breaches. Implementing least-privilege access and MFA enhances security by limiting permissions and adding an extra layer of authentication. Regular reviews and updates of IAM policies help maintain security compliance and adapt to organizational changes, ensuring continuous protection of disaster recovery resources. + +## Impact + +Implementing proper IAM configuration requires: + +- Creation and maintenance of specialized IAM roles +- Policy development for least-privilege access +- MFA enforcement for human users +- Regular policy reviews and updates +- Audit trail monitoring + +## Audit Procedure + +### Via AWS Console + +**To create DRS Agent User:** + +1. Navigate to the AWS IAM Console: [https://us-east-1.console.aws.amazon.com/iam/home?region=us-east-1#/home](https://us-east-1.console.aws.amazon.com/iam/home?region=us-east-1#/home) + +2. Create new user: + - This user will be able to access the Elastic disaster recovery agent installation resource. + - Name the user "DSRuser" + +3. Allow Programmatic access: + - This allows the user to access resources programmatically with a secure key rather than having to enter a password. + +4. Elect "attach policies directly" and search for "AWSElasticDisasterRecoveryAgentInstallationPolicy" + +5. Create user. + +**To create Failback Agent User:** + +Follow the steps above with these two modifications: + +1. Name the user "FailbackAgentuser" +2. Apply the "AWSElasticDisasterRecoveryFailbackInstallationPolicy" + +## Expected Result + +- DRS Agent User created with name "DSRuser" +- Programmatic access enabled for DSRuser +- AWSElasticDisasterRecoveryAgentInstallationPolicy attached to DSRuser +- Failback Agent User created with name "FailbackAgentuser" +- Programmatic access enabled for FailbackAgentuser +- AWSElasticDisasterRecoveryFailbackInstallationPolicy attached to FailbackAgentuser +- No additional unnecessary permissions granted +- MFA enabled for human users with EDR access +- IAM policies follow least-privilege principle +- Regular policy review schedule established + +## Remediation + +### Via AWS Console + +1. **Create DRS Agent User:** + - Navigate to AWS IAM Console + - Create new user named "DSRuser" + - Enable programmatic access + - Attach "AWSElasticDisasterRecoveryAgentInstallationPolicy" + - Create user + +2. **Create Failback Agent User:** + - Navigate to AWS IAM Console + - Create new user named "FailbackAgentuser" + - Enable programmatic access + - Attach "AWSElasticDisasterRecoveryFailbackInstallationPolicy" + - Create user + +3. **Enforce MFA:** + - For all human users with EDR access + - Configure MFA requirements in IAM policies + +4. **Review Permissions:** + - Audit all EDR-related IAM policies + - Remove unnecessary permissions + - Implement least-privilege access + +5. **Establish Review Schedule:** + - Set up regular IAM policy reviews + - Document review process + - Update policies as needed + +## Default Value + +Configure IAM Credentials for AWS Elastic Disaster Recovery. + +By default, no specialized IAM users or policies for EDR exist. Organizations must manually create and configure IAM resources. + +## References + +- [AWS IAM Console](https://us-east-1.console.aws.amazon.com/iam/home?region=us-east-1#/home) +- [AWS Elastic Disaster Recovery IAM Policies](https://docs.aws.amazon.com/drs/latest/userguide/security-iam.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control
Centralize access control for all enterprise assets through a directory service or SSO provider, where supported. | | ● | ● | +| v8 | 6.8 Define and Maintain Role-Based Access Control
Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | ● | +| v7 | 14.6 Protect Information through Access Control Lists
Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | ● | ● | ● | +| v7 | 14.7 Enforce Access Control to Data through Automated Tools
Use an automated tool, such as host-based Data Loss Prevention, to enforce access controls to data even when data is copied off a system. | | | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.6/SKILL.md new file mode 100644 index 0000000000..dbe21ba475 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.6/SKILL.md @@ -0,0 +1,155 @@ +--- +name: cis-aws-storage-6.6 +description: "Ensure installation of the AWS Replication Agent" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, replication-agent, installation, agent-deployment] +cis_id: "6.6" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.4, cis-aws-storage-6.5, cis-aws-storage-6.7] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.6: Ensure installation of the AWS Replication Agent (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +Set up and verify the installation of the AWS Replication Agent on all relevant systems to facilitate efficient and reliable data replication. This process includes downloading the agent, configuring it according to best practices, and ensuring it is correctly integrated with your AWS environment. Regularly check the agent's performance and update it as needed to maintain optimal functionality and data integrity during replication processes. + +## Rationale + +Installing the AWS Replication Agent is crucial for enabling efficient and reliable data replication, ensuring that critical data is accurately duplicated across systems. Proper configuration and integration with your AWS environment optimize the agent's performance, enhancing data availability and disaster recovery capabilities. Regular checks and updates of the replication agent help maintain its effectiveness, ensuring data integrity and minimizing the risk of replication failures. + +## Impact + +Agent installation and maintenance requires: + +- Agent download and installation on all source servers +- Proper configuration aligned with best practices +- Network connectivity verification +- Ongoing performance monitoring +- Regular agent updates +- IAM credentials for agent authentication + +## Audit Procedure + +### Via AWS Console + +1. **Obtain Agent Installer Link:** + - On the source servers page, from Actions, choose add servers to obtain the agent installer link. + +2. **Download Agent Installer:** + - On your source server (in our case, the EC2 instance that was already created) download the appropriate agent installer for your operating system. + - For Linux instance on US-East-1, substitute your region in the {Region} brackets of this command: + +```bash +wget -O ./aws-replication-installer-init https://aws-elastic-disaster-recovery-{Region}.s3.{Region}.amazonaws.com/latest/linux/aws-replication-installer-init +``` + +3. **Run Installation Command:** + +```bash +chmod +x aws-replication-installer-init; sudo ./aws-replication-installer-init +``` + +4. **Enter Region:** + - Type in your region. Region is case sensitive; if you're in us-east-1, make sure you type "us-east-1". + +5. **Provide IAM Credentials:** + - If you're using SSH, you will be prompted with your activation ID and secret activation key. + - Make sure you have those accessible for the IAM user you're using. + - You can generate a new key from the IAM dashboard if you forgot to save your key. + +6. **Select Replication Scope:** + - Select "Enter" to replicate all servers. + +7. **Verify Replication Status:** + - All servers should replicate. + +8. **Verify Installation:** + - Make sure your OS is up to date. If you run into an error replicating your devices, view the documentation on troubleshooting the AWS replication installation here: [https://docs.aws.amazon.com/mgn/latest/ug/installation-requirements.html](https://docs.aws.amazon.com/mgn/latest/ug/installation-requirements.html) + +9. **Confirm Installation Success:** + - If install runs successfully, the source server will appear in your Elastic Disaster Recovery Console dashboard on the "source servers" page. + - This will signify the beginning of the replication process. + +## Expected Result + +- Agent installer link obtained from AWS console +- Agent installer downloaded on all source servers +- Agent installation completed successfully +- Region configured correctly (case-sensitive) +- IAM credentials provided and authenticated +- All target servers selected for replication +- All servers showing "replicate" status +- Source servers appearing in EDR Console dashboard +- Replication process initiated +- No installation errors +- OS is up to date on all source servers + +## Remediation + +### Via AWS Console + +1. **Obtain and Download Agent:** + - Access source servers page in EDR console + - Choose "add servers" from Actions menu + - Download appropriate agent installer for your OS + +2. **Install Agent (Linux Example):** + +```bash +# Download installer +wget -O ./aws-replication-installer-init https://aws-elastic-disaster-recovery-{Region}.s3.{Region}.amazonaws.com/latest/linux/aws-replication-installer-init + +# Make executable and run +chmod +x aws-replication-installer-init; sudo ./aws-replication-installer-init +``` + +3. **Configure Agent:** + - Enter region (case-sensitive, e.g., "us-east-1") + - Provide IAM activation ID and secret key + - Select servers to replicate (Enter for all) + +4. **Verify Installation:** + - Check server replication status + - Verify source server appears in EDR dashboard + - Confirm replication process has started + - Review logs for any errors + +5. **Troubleshoot if Needed:** + - Update OS if installation fails + - Review troubleshooting documentation + - Verify network connectivity + - Confirm IAM permissions + +## Default Value + +By default, the AWS Replication Agent is not installed. Organizations must manually download, install, and configure the agent on all source servers. + +## References + +- [AWS Elastic Disaster Recovery Agent Installation](https://docs.aws.amazon.com/mgn/latest/ug/agent-installation.html) +- [AWS EDR Installation Requirements](https://docs.aws.amazon.com/mgn/latest/ug/installation-requirements.html) +- [Troubleshooting AWS Replication Installation](https://docs.aws.amazon.com/mgn/latest/ug/installation-requirements.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control
Centralize access control for all enterprise assets through a directory service or SSO provider, where supported. | | ● | ● | +| v8 | 6.8 Define and Maintain Role-Based Access Control
Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | ● | +| v7 | 3.4 Deploy Automated Operating System Patch Management Tools
Deploy automated software update tools in order to ensure that the operating systems are running the most recent security updates provided by the software vendor. | ● | ● | ● | +| v7 | 5.4 Deploy System Configuration Management Tools
Deploy system configuration management tools that will automatically enforce and redeploy configuration settings to systems at regularly scheduled intervals. | | ● | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.7/SKILL.md new file mode 100644 index 0000000000..fb100af1d7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.7/SKILL.md @@ -0,0 +1,125 @@ +--- +name: cis-aws-storage-6.7 +description: "Ensure proper configuration of the Launch Settings" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, launch-settings, ec2, configuration, startup] +cis_id: "6.7" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.6, cis-aws-storage-6.8] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.7: Ensure proper configuration of the Launch Settings (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +Set up and verify the launch settings to ensure systems and applications start correctly and securely. This includes defining startup parameters, specifying required resources, and configuring security settings to prevent unauthorized changes. Regularly review and update these settings to align with best practices and organizational requirements, ensuring optimal performance and security at launch. + +## Rationale + +Proper configuration of launch settings is crucial for ensuring that systems and applications start securely and perform optimally. Defining startup parameters and resource requirements prevents potential issues and enhances efficiency. Regular reviews and updates of these settings help maintain alignment with best practices and evolving organizational needs, thereby strengthening security and operational reliability from the moment of launch. + +## Impact + +Launch settings configuration affects: + +- System startup behavior +- Resource allocation +- Security posture at launch +- Recovery instance performance +- Operational reliability + +Note: The settings can be changed after instances have been launched, but a new instance must be launched for new launch settings to take effect. + +## Audit Procedure + +### Via AWS Console + +1. **Select Launch Settings:** + - Select launch settings on the source server page + +2. **Configure Launch Settings:** + - On the launch settings page, next to general launch, select "edit" + +3. **Configure EC2 Launch Template:** + - Enable auto assign public IP and change the instance type to a t2.medium + +4. **Set Version to Default:** + - Set version to default in the console + +5. **Set Default Version:** + - Set the default version that was just created to default version + +6. **Return to Dashboard:** + - Return to the dashboard and confirm your configurations are correct. + +## Expected Result + +- Launch settings accessible from source server page +- General launch settings configured +- EC2 launch template configured with: + - Auto-assign public IP enabled + - Instance type set to t2.medium (or appropriate size) +- Default version set in console +- New version created and set as default +- Configurations verified and confirmed correct +- Settings documented + +## Remediation + +### Via AWS Console + +1. **Access Launch Settings:** + - Navigate to source server page + - Select launch settings + +2. **Edit General Launch:** + - Click "edit" next to general launch + +3. **Configure EC2 Template:** + - Enable auto assign public IP + - Change instance type to t2.medium (or appropriate size for workload) + +4. **Set Version:** + - Set version to default in the console + - Confirm the default version setting + +5. **Verify Configuration:** + - Return to the dashboard + - Confirm all configurations are correct + - Document the settings + +6. **Note:** + - Remember that a new instance must be launched for new launch settings to take effect + - Plan instance launches accordingly + +## Default Value + +By default, launch settings are not configured. Organizations must manually configure startup parameters, resource allocations, and security settings. + +## References + +- [AWS Elastic Disaster Recovery Launch Settings](https://docs.aws.amazon.com/drs/latest/userguide/launch-settings.html) +- [AWS EC2 Launch Templates](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.2 Establish and Maintain a Secure Configuration Process for Network Infrastructure
Establish and maintain a secure configuration process for network devices. Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard. | ● | ● | ● | +| v8 | 16.7 Use Standard Hardening Configuration Templates for Application Infrastructure
Use standard, industry-recommended hardening configuration templates for application infrastructure components. This includes underlying servers, databases, and web servers, and applies to cloud containers, Platform as a Service (PaaS) components, and SaaS components. Do not allow in-house developed software to weaken configuration hardening. | | ● | ● | +| v7 | 5.2 Maintain Secure Images
Maintain secure images or templates for all systems in the enterprise based on the organization's approved configuration standards. Any new system deployment or existing system that becomes compromised should be imaged using one of those images or templates. | | ● | ● | +| v7 | 5.4 Deploy System Configuration Management Tools
Deploy system configuration management tools that will automatically enforce and redeploy configuration settings to systems at regularly scheduled intervals. | | ● | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.8/SKILL.md new file mode 100644 index 0000000000..25b04d674e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.8/SKILL.md @@ -0,0 +1,150 @@ +--- +name: cis-aws-storage-6.8 +description: "Ensure execution of a recovery drill" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, disaster-recovery, drill, testing, recovery-testing, rto, rpo] +cis_id: "6.8" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.1, cis-aws-storage-6.7, cis-aws-storage-6.9, cis-aws-storage-6.10] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.8: Ensure execution of a recovery drill (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +To ensure your organization is prepared for a disaster, it's crucial to verify that your disaster recovery services function as expected. Your IT team should conduct regular recovery drills on your AWS Elastic Recovery Instance to confirm everything operates smoothly and according to plan. + +## Rationale + +Regular recovery drills are essential to verify the functionality of your disaster recovery services and ensure your organization is well-prepared for any disruptions. By conducting these drills on your AWS Elastic Recovery Instance, you can identify and address potential issues before they impact operations. This proactive approach enhances the reliability and effectiveness of your disaster recovery plan, providing confidence that your systems can recover swiftly and efficiently in the event of a disaster. + +## Impact + +Recovery drills require: + +- Planning and scheduling +- Non-production environment for testing +- Time and resources for execution +- Documentation of results +- Potential discovery of configuration issues +- Updates to recovery procedures based on findings + +Benefits: + +- Validates disaster recovery plan effectiveness +- Identifies potential issues before real disasters +- Ensures team familiarity with recovery procedures +- Confirms RTO and RPO objectives are achievable +- Provides confidence in recovery capabilities + +## Audit Procedure + +### Via AWS Console + +**Steps to perform a recovery drill:** + +1. **Navigate to Source Servers:** + - Navigate to source servers tab in AWS Elastic Disaster Recovery Dashboard. + +2. **Verify Server Status:** + - Make sure that all servers you launch show as "Ready" under "status," report as "healthy" in the data replication status column, and that pending actions show as "initiate drill". + +3. **Initiate Drill:** + - Select "initiate drill" under the orange dropdown menu. + - Make sure that you don't initiate a real recovery job. + +4. **Choose Recovery Point:** + - Choose a recovery point. Normally, it makes sense to choose the most recent recovery point, but you can also choose a recovery point from earlier. + +5. **Select Initiate Drill:** + - Select the orange "initiate drill" button to initiate the recovery drill. + +6. **Clean Up:** + - To complete the recovery drill, clean up your resources by deleting the recovery instance by selecting actions and "terminate recovery instances". + +## Expected Result + +- All source servers show status "Ready" +- Data replication status reports "healthy" +- Pending actions show "initiate drill" +- Recovery drill initiated successfully +- Recovery point selected (most recent or specific point) +- Drill completes without errors +- Recovery instance launches successfully +- Recovery time measured and documented +- Recovery time meets RTO objectives +- Recovery point meets RPO objectives +- Issues identified and documented +- Recovery instances terminated after drill +- Resources cleaned up properly + +## Remediation + +### Via AWS Console + +1. **Prepare for Drill:** + - Ensure all source servers are in "Ready" status + - Verify data replication status is "healthy" + - Confirm pending actions show "initiate drill" + +2. **Execute Drill:** + - Navigate to source servers tab in EDR Dashboard + - Select "initiate drill" from orange dropdown menu + - **IMPORTANT:** Do not initiate a real recovery job + - Choose appropriate recovery point (typically most recent) + - Click orange "initiate drill" button + +3. **Monitor Drill:** + - Observe recovery instance launch + - Measure and document recovery time + - Test recovered instance functionality + - Verify data integrity + +4. **Document Results:** + - Record recovery time + - Compare against RTO and RPO objectives + - Document any issues encountered + - Note lessons learned + +5. **Clean Up:** + - Select actions menu + - Choose "terminate recovery instances" + - Confirm termination + - Verify resources are cleaned up + +6. **Review and Update:** + - Review drill results with team + - Update recovery procedures as needed + - Schedule next drill + +## Default Value + +By default, no recovery drills are scheduled or configured. Organizations must manually plan and execute recovery drills. + +## References + +- [AWS Elastic Disaster Recovery - Failback Preparing](https://docs.aws.amazon.com/drs/latest/userguide/failback-preparing.html) +- [AWS DR Testing Best Practices](https://docs.aws.amazon.com/drs/latest/userguide/drill-recovery.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 11.5 Test Data Recovery
Test backup recovery quarterly, or more frequently, for a sampling of in-scope enterprise assets. | | ● | ● | +| v8 | 17.7 Conduct Routine Incident Response Exercises
Plan and conduct routine incident response exercises and scenarios for key personnel involved in the incident response process to prepare for responding to real-world incidents. Exercises need to test communication channels, decision making, and workflows. Conduct testing on an annual basis, at a minimum. | | ● | ● | +| v7 | 10.3 Test Data on Backup Media
Test data integrity on backup media on a regular basis by performing a data restoration process to ensure that the backup is properly working. | | ● | ● | +| v7 | 19.7 Conduct Periodic Incident Scenario Sessions for Personnel
Plan and conduct routine incident response exercises and scenarios for the workforce involved in the incident response to maintain awareness and comfort in responding to real world threats. Exercises should test communication channels, decision making, and incident responders technical capabilities using tools and data available to them. | | ● | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.9/SKILL.md new file mode 100644 index 0000000000..671a4d5158 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Storage_Services_Benchmark_v1.0.0/cis-aws-storage-6.9/SKILL.md @@ -0,0 +1,189 @@ +--- +name: cis-aws-storage-6.9 +description: "Ensure Continuous Disaster Recovery Operations" +category: cis-storage-services +version: "1.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, edr, disaster-recovery, continuous-operations, monitoring, backup, replication] +cis_id: "6.9" +cis_benchmark: "CIS AWS Storage Services Benchmark v1.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-storage-6.1, cis-aws-storage-6.8, cis-aws-storage-6.10, cis-aws-storage-6.12] +prerequisites: [] +severity_boost: {} +--- + +# CIS 6.9: Ensure Continuous Disaster Recovery Operations (Manual) + +## Profile Applicability + +- **Level:** 2 + +## Description + +Maintain ongoing disaster recovery operations to ensure that systems and data can be swiftly restored in the event of a disaster. This involves regularly updating and testing recovery plans, monitoring replication processes, and verifying the integrity and accessibility of backups. Continuously evaluate and improve disaster recovery strategies to adapt to evolving threats and organizational changes, ensuring resilience and minimal downtime during incidents. + +## Rationale + +Maintaining continuous disaster recovery operations is essential for ensuring that systems and data can be quickly and effectively restored following a disruption. Regular updates and tests of recovery plans, along with constant monitoring of replication processes, help verify the integrity and availability of backups. This proactive approach allows organizations to adapt to evolving threats and changes, ensuring resilience and minimizing downtime during incidents, which ultimately protects business continuity and reduces potential losses. + +## Impact + +Continuous disaster recovery operations require: + +- Ongoing monitoring and maintenance +- Regular plan updates +- Periodic testing +- Resource allocation for DR activities +- Staff training and awareness +- Documentation maintenance +- Compliance verification + +Benefits: + +- Ensures rapid recovery capability +- Minimizes downtime +- Protects business continuity +- Reduces potential data loss +- Maintains compliance +- Builds organizational confidence + +## Audit Procedure + +### Via AWS Console + +1. **Review Disaster Recovery Plan:** + - Verify that a comprehensive disaster recovery (DR) plan exists and is regularly updated. + - Ensure the DR plan includes detailed procedures for data backup, system recovery, and failover processes. + - Check for documentation of roles and responsibilities during a disaster event. + +2. **Check Backup and Replication Settings:** + - Confirm that AWS Backup is configured correctly for all critical systems and data. + - Review the settings for Amazon RDS, EBS snapshots, S3 versioning, and other AWS services to ensure backups are automated and scheduled appropriately. + - Ensure that replication settings are configured to replicate data across multiple AWS regions for added redundancy. + +3. **Test Recovery Procedures:** + - Verify that regular recovery drills are conducted to test the DR plan's effectiveness. + - Check the logs and reports from these drills to ensure that any issues identified are addressed promptly. + - Ensure that the most recent recovery drill results are documented and reviewed by relevant stakeholders. + +4. **Monitor and Log Review:** + - Ensure CloudWatch logs and alarms are set up to monitor backup and replication processes. + - Review CloudTrail logs to verify that DR-related actions are being logged and monitored. + - Check for alerts and notifications related to backup failures, replication issues, or any anomalies in the DR processes. + +5. **Evaluate Recovery Time Objectives (RTO) and Recovery Point Objectives (RPO):** + - Verify that the DR plan specifies RTO and RPO for all critical systems and data. + - Ensure that actual recovery times and points from recent drills meet or exceed the defined objectives. + +6. **Review Access Controls:** + - Check IAM policies to ensure that only authorized personnel have access to manage and initiate disaster recovery operations. + - Verify that multi-factor authentication (MFA) is enabled for accounts with access to DR resources. + +7. **Assess Security and Compliance:** + - Ensure that data encryption is enabled for all backups and replicated data. + - Verify compliance with industry standards and regulations (e.g., GDPR, HIPAA) concerning data protection and disaster recovery. + +8. **Continuous Improvement:** + - Review post-mortem reports from actual incidents and recovery drills to identify areas for improvement. + - Ensure that feedback loops are in place for continuous enhancement of the DR plan and procedures. + - Confirm that lessons learned from incidents and drills are incorporated into the DR plan. + +9. **Regular Updates and Communication:** + - Ensure the DR plan is reviewed and updated at least annually or whenever significant changes occur in the IT environment. + - Verify that all relevant personnel are trained on the DR procedures and aware of their roles. + - Check that regular communication channels are established for DR updates and training sessions. + +## Expected Result + +- Comprehensive DR plan exists and is regularly updated +- DR plan includes detailed backup, recovery, and failover procedures +- Roles and responsibilities documented +- AWS Backup configured correctly for all critical systems +- Automated backup schedules in place (RDS, EBS, S3, etc.) +- Replication configured across multiple AWS regions +- Regular recovery drills conducted +- Drill results documented and reviewed +- CloudWatch monitoring configured for backups and replication +- CloudTrail logging enabled for DR actions +- Alerts configured for failures and anomalies +- RTO and RPO defined for all critical systems +- Actual recovery times meet objectives +- IAM policies restrict DR access to authorized personnel only +- MFA enabled for DR resource access +- Data encryption enabled for all backups and replicated data +- Compliance requirements met (GDPR, HIPAA, etc.) +- Post-mortem reviews conducted after incidents and drills +- Feedback incorporated into DR plan +- DR plan reviewed and updated at least annually +- Personnel trained on DR procedures +- Regular communication channels established + +## Remediation + +### Via AWS Console + +Follow the audit procedure steps to implement continuous disaster recovery operations: + +1. **Update/Create DR Plan:** + - Develop comprehensive DR plan with detailed procedures + - Document roles and responsibilities + - Define RTO and RPO for all critical systems + +2. **Configure Backup and Replication:** + - Set up AWS Backup for all critical systems + - Configure automated schedules for RDS, EBS, S3 + - Enable cross-region replication + +3. **Implement Monitoring:** + - Configure CloudWatch logs and alarms + - Enable CloudTrail logging for DR actions + - Set up alerts for failures and anomalies + +4. **Establish Testing Schedule:** + - Plan regular recovery drills + - Document drill results + - Review and address identified issues + +5. **Configure Access Controls:** + - Review and update IAM policies + - Enable MFA for DR resource access + - Implement least-privilege access + +6. **Enable Security Controls:** + - Enable encryption for all backups + - Configure encryption for replicated data + - Verify compliance requirements + +7. **Establish Continuous Improvement:** + - Conduct post-mortem reviews + - Implement feedback loops + - Update DR plan based on lessons learned + +8. **Maintain Communication:** + - Schedule annual DR plan reviews + - Conduct personnel training + - Establish regular communication channels + +## Default Value + +By default, continuous disaster recovery operations are not configured. Organizations must manually establish all components including plans, backups, monitoring, testing schedules, and improvement processes. + +## References + +- [AWS Disaster Recovery Workloads on AWS](https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-options-in-the-cloud.html) +- [AWS Well-Architected Framework - Reliability Pillar](https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/welcome.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 11.1 Establish and Maintain a Data Recovery Process
Establish and maintain a data recovery process. In the process, address the scope of data recovery activities, recovery prioritization, and the security of backup data. Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard. | ● | ● | ● | +| v8 | 11.5 Test Data Recovery
Test backup recovery quarterly, or more frequently, for a sampling of in-scope enterprise assets. | | ● | ● | +| v7 | 10.2 Perform Complete System Backups
Ensure that each of the organization's key systems are backed up as a complete system, through processes such as imaging, to enable the quick recovery of an entire system. | ● | ● | ● | +| v7 | 19.7 Conduct Periodic Incident Scenario Sessions for Personnel
Plan and conduct routine incident response exercises and scenarios for the workforce involved in the incident response to maintain awareness and comfort in responding to real world threats. Exercises should test communication channels, decision making, and incident responders technical capabilities using tools and data available to them. | | ● | ● | + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.1/SKILL.md new file mode 100644 index 0000000000..6202f6bd1c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.1/SKILL.md @@ -0,0 +1,82 @@ +--- +name: cis-aws-foundations-2.1.1 +description: "Ensure centralized root access in AWS Organizations" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, organizations, root-access, centralized-management] +cis_id: "2.1.1" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.1.2, cis-aws-foundations-2.1.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure centralized root access in AWS Organizations + +## Description + +Ensure centralized root access management is enabled to manage and secure root user credentials for member accounts in AWS Organizations. This allows the management account and an optional delegated administrator account to centrally delete, prevent recovery of, and if necessary, perform short-lived, scoped root-required actions in member accounts without maintaining long-term root user credentials in each account. + +## Rationale + +The AWS account root user is a powerful, default administrative identity that is difficult to manage safely across many accounts. When each member account manages its own root credentials, organizations often end up with numerous long-lived root passwords, access keys, and MFA devices that are hard to inventory, rotate, and protect. Centralized root access management lets security teams remove or avoid creating root user credentials in member accounts, centrally review and manage any remaining credentials, and perform necessary root-only tasks via short-term, task-scoped root sessions. This significantly reduces privileged credential sprawl, supports least privilege and dedicated administrator models, and improves visibility and auditability of root-level activity across the organization. + +## Impact + +Enabling centralized root access management changes how root user access is obtained and used in member accounts, but it does not automatically remove existing root credentials. Organizations must plan when and how to delete or disable any existing root passwords, access keys, signing certificates, and MFA devices in member accounts and update any workflows that still rely on direct root sign-in. Security and operations teams will need to use centrally initiated, short-lived root sessions for exceptional tasks that truly require root. This may require procedural changes and additional training, but it significantly reduces long-lived privileged credential sprawl across the organization. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console with the management account. +2. In the console search bar, type Organizations and open AWS Organizations. +3. On the Overview page, confirm that an Organization exists and that this account is listed as the Management account. +4. In AWS Organizations, choose Services. +5. Confirm that AWS Identity and Access Management appears in the list of services with trusted access enabled. +6. In the console search bar, type IAM and open IAM. In the left navigation pane, choose Root access management. Check the status banner. +7. If you see that Root access management is enabled and the feature card shows that root credentials management is turned on for member accounts, the organization has centralized root access management enabled. +8. If you see Root access management is disabled with an option to Enable, centralized root access is not yet enabled. +9. (Optional) On the same Root access management page, review the Delegated administrator information (if shown). +10. Confirm that the delegated account (if present) is a security or management-focused account, not a general workload account. + +## Expected Result + +Root access management is enabled in the Organizations management account. The feature card confirms root credentials management is turned on for member accounts. If a delegated administrator is configured, it is a security or management-focused account. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console with the management account. +2. In the console search bar, type Organizations and open AWS Organizations. +3. On the Overview page, confirm that an Organization exists and that this account is listed as the Management account. +4. In AWS Organizations, choose Services. Locate AWS Identity and Access Management in the list and, if it is not already enabled, choose Enable trusted access and confirm. +5. In the console search bar, type IAM and open IAM. In the left navigation pane, choose Root access management. If you see Root access management is disabled, choose Enable. +6. In the enable dialog, confirm that you want to enable "Root credentials management" and if desired "Privileged root actions in member accounts". +7. In the Delegated administrator field, enter the account ID of the account that will manage root user access and take privileged actions on member accounts. AWS recommends using an account intended for security or management purposes, not a general workload account. +8. When you enable centralized root access in the console, IAM also enables trusted access for IAM in AWS Organizations if it isn't already enabled. +9. Choose Enable to save the configuration. + +## Default Value + +Centralized root access management is not enabled by default. Each member account manages its own root user credentials independently. + +## References + +- [AWS Documentation - Centralize root access for member accounts](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | | \* | \* | +| v8 | 5.6 Centralize Account Management | | \* | \* | +| v8 | 6.7 Centralize Access Control | | \* | \* | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.2/SKILL.md new file mode 100644 index 0000000000..ec67231072 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.2/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-aws-foundations-2.1.2 +description: "Ensure authorization guardrails for all AWS Organization accounts" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, organizations, scp, rcp, guardrails, authorization] +cis_id: "2.1.2" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.1.1, cis-aws-foundations-2.1.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure authorization guardrails for all AWS Organization accounts + +## Description + +Ensure that one or more baseline authorization policies such as Service Control Policies (SCPs) and/or Resource Control Policies (RCPs) are attached to all member accounts in AWS Organizations in accordance with organizational security requirements. Authorization policies act as preventive permission guardrails: SCPs define the maximum available permissions for IAM principals within accounts, while RCPs define the maximum available permissions for resources within accounts. These policies can enforce security invariants such as preventing disabling of key security services, restricting use of unapproved AWS Regions, or blocking external access to sensitive resources. + +## Rationale + +Authorization policies do not grant permissions but instead set organization-wide limits on what actions principals can perform (SCPs) and what access can be granted to resources (RCPs), regardless of local IAM or resource-based policies. Without baseline guardrail authorization policies, each account can grant excessive or inconsistent permissions that disable logging, weaken security services, allow use of unapproved Regions and services, or permit unintended external access to resources. Attaching standard authorization policies to all member accounts enforces preventive, centralized control over high-risk actions and access patterns, supports least-privilege and role-based access control at scale, and helps ensure that all accounts and resources operate within the organization's defined security baseline. + +## Impact + +Enforcing baseline authorization policies for all member accounts can initially block some existing patterns, such as use of unapproved Regions, disabling security services, or granting broader permissions than the guardrails allow. Teams may need to adjust IAM policies, deployment pipelines, and exception processes so legitimate use cases remain possible within the new guardrails. This can introduce short-term operational overhead and require careful testing, especially when attaching new policies at the root or OU level. + +## Audit Procedure + +### Using AWS CLI + +Pre-requisite: you must run these CLI commands in the management account for the AWS Organization. + +1. Before auditing, document or confirm your organization's baseline guardrail requirements. Common examples include: + - Prevent disabling CloudTrail, AWS Config, GuardDuty, or Security Hub + - Restrict usage to approved AWS Regions only + - Protect central security or logging roles from modification + - Deny external principal access to sensitive resources + +2. List all SCPs and RCPs in the organization: + +```bash +aws organizations list-policies --filter SERVICE_CONTROL_POLICY +aws organizations list-policies --filter RESOURCE_CONTROL_POLICY +``` + +3. For each SCP/RCP, retrieve and review the policy document to determine if it implements your baseline guardrail requirements: + +```bash +aws organizations describe-policy --policy-id +``` + +Review the Content field in the output to confirm the policy enforces organizational security requirements. + +If no SCPs/RCPs exist that implement your documented baseline guardrail requirements, note this as a gap and proceed to remediation. + +4. List all accounts in the organization and note the account IDs: + +```bash +aws organizations list-accounts --query 'Accounts[?Status==`ACTIVE`].[Id,Name]' --output table +``` + +5. For each baseline guardrail Authorization policy identified in Step 2, list the accounts and OUs to which it is attached: + +```bash +aws organizations list-targets-for-policy --policy-id +``` + +6. Compare the list of attached targets to your full account list. + - If the policy is attached to the root, all accounts in the organization inherit it and this policy passes for coverage. + - If the policy is attached to specific OUs, verify that all active member accounts belong to those OUs. + - If the policy is attached to individual accounts, verify that all active member accounts are included. + +## Expected Result + +- All baseline guardrail authorization policies required by organizational security requirements exist. +- Each baseline guardrail authorization policy is attached to all active member accounts either directly or via OU/root inheritance. + +## Remediation + +### Using AWS Console + +1. From the AWS Organizations console, go to Policies -> Service control policies. + - If you already have standard guardrail SCPs that implement your security baseline, note their names. + - If you do not have such policies, choose Create policy and create at least one baseline guardrail SCP that encodes non-negotiable security requirements. + +2. Do the same step as above but for RCPs if needed. From the AWS Organizations console, go to Policies -> Resource control policies. + +3. Attach guardrail authorization policies to the root and/or OUs. In AWS Organizations, choose AWS accounts, then select the Root of the organization. + - Go to the Policies tab, then within section for Service control policies, choose Attach, and select the baseline guardrail SCP(s) you identified or created. + - If using RCPs, then within section for Resource control policies, choose Attach, and select the baseline guardrail RCP(s) you identified or created. + - If your design uses different guardrails per OU (for example, stricter policies for production OU), select each OU in turn and attach the appropriate guardrail SCPs and RCPs to those OUs. + +4. AWS recommends testing authorization policies in a staging OU before attaching them broadly to the root to avoid unintended service disruption. + +## Default Value + +No custom SCPs or RCPs are attached by default. Only the AWS-managed `FullAWSAccess` SCP is attached to the root. + +## References + +- [AWS Documentation - Service Control Policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) +- [AWS Documentation - Resource Control Policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | \* | \* | +| v8 | 6.7 Centralize Access Control | | \* | \* | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.3/SKILL.md new file mode 100644 index 0000000000..ee979c3985 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.3/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-aws-foundations-2.1.3 +description: "Ensure Organizations management account is not used for workloads" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, organizations, management-account, workload-isolation] +cis_id: "2.1.3" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.1.1, cis-aws-foundations-2.1.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Organizations management account is not used for workloads + +## Description + +Ensure that the AWS Organizations management account is used only for organizational governance tasks and does not host production workloads, applications, or business data. The management account is the most privileged account in an AWS Organization and performs sensitive administrative functions such as creating and managing member accounts, applying service control policies (SCPs), and managing consolidated billing. Workloads, applications, and associated data should be deployed in dedicated member accounts, not in the management account. + +## Rationale + +The management account has unique privileges that cannot be restricted by SCPs, making it the highest-risk account in an organization. Deploying workloads or storing business data in the management account increases the attack surface and blast radius of a compromise. If a workload vulnerability or misconfiguration occurs in the management account, it could grant attackers access to organization-wide administrative capabilities. + +## Impact + +Restricting the management account to governance-only use may require creating new member accounts, redesigning existing account boundaries, and migrating workloads and data out of the management account. This can introduce short-term complexity and operational overhead. However, it reduces the blast radius of a compromise, simplifies security controls in the most privileged account, and aligns the environment with AWS multi-account and workload-isolation best practices. + +## Audit Procedure + +### Using AWS CLI + +1. Confirm which AWS account is the management account for the organization (for example, via AWS Organizations "Overview" page or organizational documentation). +2. Ensure you have read-only access to review resources in this account. +3. Use your organization's standard discovery methods (for example, AWS Config, CMDB/asset inventory, or CSPM) to obtain a list of services and resources running in the management account. +4. At a minimum, identify compute, storage, database, and application services (for example, EC2, Lambda, ECS, S3, RDS, DynamoDB, API Gateway, load balancers). + +```bash +# List EC2 instances in the management account +aws ec2 describe-instances --query 'Reservations[*].Instances[*].[InstanceId,State.Name,Tags[?Key==`Name`].Value|[0]]' --output table + +# List Lambda functions +aws lambda list-functions --query 'Functions[*].[FunctionName,Runtime]' --output table + +# List RDS instances +aws rds describe-db-instances --query 'DBInstances[*].[DBInstanceIdentifier,Engine,DBInstanceStatus]' --output table + +# List ECS clusters +aws ecs list-clusters + +# List S3 buckets +aws s3api list-buckets --query 'Buckets[*].Name' --output table +``` + +5. For each identified resource, determine whether it is: + - Governance/security: resources that support centralized management, logging, audit, or security (for example, org-wide CloudTrail, Config aggregator, Security Hub or GuardDuty delegated admin, billing/cost tooling). + - Workload/business: resources that support business applications, production or non-production workloads, or customer-facing systems. + +6. If any workload/business resources are present in the management account, record this as a gap and document the affected services and resource types. + +## Expected Result + +The management account contains only governance and security resources. No workload or business application resources are present. + +## Remediation + +1. Inventory all workload resources currently in the management account (compute, storage, databases, application services). +2. For each class of workload resource (for example, production, non-production, shared services), create or confirm dedicated member accounts within the organization and place them into the appropriate OUs. +3. For each workload resource, design a migration plan to the appropriate member account. +4. Execute the migrations in phases, starting with lower-risk environments (for example, development/test) before production. +5. Review and adjust IAM roles and permissions in the management account so that only personnel responsible for organization governance and security have access. +6. Update architecture diagrams, runbooks, and onboarding processes to state that new workloads must be deployed only into designated workload accounts, not the management account. + +## Default Value + +AWS does not restrict the management account from hosting workloads. By default, any AWS services can be deployed in any account including the management account. + +## References + +- [AWS Documentation - AWS Organizations Best Practices](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_best-practices.html) +- [AWS Well-Architected Framework - Multi-Account Strategy](https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/aws-account-management-and-separation.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.12 Segment Data Processing and Storage Based on Sensitivity | | \* | \* | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.4/SKILL.md new file mode 100644 index 0000000000..3355cf749c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.4/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-aws-foundations-2.1.4 +description: "Ensure Organizational Units are structured by environment and sensitivity" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, organizations, ou-structure, environment, sensitivity] +cis_id: "2.1.4" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.1.2, cis-aws-foundations-2.1.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Organizational Units are structured by environment and sensitivity + +## Description + +Ensure that AWS Organizations Organizational Units (OUs) are structured primarily by environment (for example, production, non-production, sandbox) and sensitivity (for example, security, logging, shared services, regulated workloads), rather than mirroring the corporate org chart. OUs should group accounts that share similar security requirements and controls so that appropriate authorization policies and other guardrails can be applied consistently at the OU level. + +## Rationale + +A clear OU structure based on environment and sensitivity makes it easier to apply consistent guardrails and centralized security controls to accounts that have similar risk profiles and compliance needs. Poorly defined or ad-hoc OU structures complicate policy management, increase the chance of misapplied controls, and can lead to mixing workloads with different data sensitivities under the same set of controls. + +## Impact + +Restructuring OUs by environment and sensitivity can require moving accounts, changing inherited policies, and updating automation that assumes existing OU paths. This may introduce short-term operational overhead, including policy revalidation, testing of workloads under new guardrails, and coordination with application and platform teams to avoid unintended service disruption. + +## Audit Procedure + +### Using AWS Console + +1. From the management account, use AWS Organizations console to obtain: + - The full OU hierarchy (root, top-level and child OUs). + - The list of accounts in each OU. + +### Using AWS CLI + +```bash +# List roots +aws organizations list-roots + +# List OUs under root +aws organizations list-organizational-units-for-parent --parent-id + +# List accounts under an OU +aws organizations list-accounts-for-parent --parent-id + +# Recursively list child OUs +aws organizations list-organizational-units-for-parent --parent-id +``` + +2. Review top-level and key OUs and determine whether they are clearly aligned to: + - Environment (for example, production, non-production, sandbox). + - Sensitivity/function (for example, security, logging, shared services, regulated). + +3. Note any OUs whose purpose is unclear or that appear to be organized mainly by department or owner rather than environment/sensitivity. + +4. For each environment/sensitivity OU, select a sample of accounts and verify that their primary workloads match the OU's stated purpose. + - Note any accounts that mix production and non-production workloads in the same OU when separate OUs are defined. + - Note any accounts that place highly sensitive or regulated workloads in OUs that are intended for lower-sensitivity use. + +## Expected Result + +- Top-level OUs are clearly aligned to environment (production, non-production, sandbox) and sensitivity/function (security, logging, shared services, regulated). +- Accounts are placed in OUs that match their workload environment and sensitivity. +- No active accounts remain directly under the root unless explicitly justified and documented. + +## Remediation + +### Using AWS Console + +1. Work with security, platform, and application teams to agree on a small set of top-level OUs such as: + - Security / Management + - Shared Services / Infrastructure + - Prod + - Non-Prod (dev, test, staging) + - You may also define dedicated OUs for highly regulated workloads. + +2. In the AWS Organizations console (management account), navigate to AWS Accounts. Under the root, create the agreed top-level OUs. If needed, create child OUs under these. + +3. Export or list all existing accounts and their current OUs. Create a simple mapping from each account to its target OU based on environment and sensitivity. + +4. In the AWS Organizations console (management account), navigate to AWS Accounts. Move accounts into the new environment/sensitivity-based OUs according to your mapping. + - Start with low-risk accounts (for example, sandbox and non-production) to validate effects of inherited policies and guardrails before moving production and high-sensitivity accounts. + +5. After accounts have been moved, remove old OUs that no longer reflect the target structure. + - Ensure no active accounts remain directly under the root unless explicitly justified and documented. + +6. Update architecture docs, onboarding runbooks, and account request processes to require new accounts to be created in the correct OU based on environment and sensitivity. + +## Default Value + +AWS Organizations creates a single root with no OUs by default. All accounts are placed directly under the root unless OUs are explicitly created. + +## References + +- [AWS Documentation - Organizing AWS Accounts](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_ous.html) +- [AWS Prescriptive Guidance - Organizing Your AWS Environment Using Multiple Accounts](https://docs.aws.amazon.com/prescriptive-guidance/latest/organizing-your-aws-environment/organizing-your-aws-environment.html) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.12 Segment Data Processing and Storage Based on Sensitivity | | \* | \* | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.5/SKILL.md new file mode 100644 index 0000000000..bb5f748c89 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.5/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-aws-foundations-2.1.5 +description: "Ensure delegated admin manages AWS Organizations policies" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, organizations, delegated-admin, scp, policies] +cis_id: "2.1.5" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.1.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure delegated admin manages AWS Organizations policies + +## Description + +Ensure that a dedicated member account is configured as a delegated administrator for AWS Organizations to manage organization policies (SCPs, RCPs, tag policies, backup policies, AI opt-out policies) and other Organizations features, instead of performing these tasks directly from the management account. The delegated administrator for AWS Organizations is configured via a resource-based delegation policy in the management account, which grants specific member accounts limited permissions to perform Organizations policy and account management actions across the organization. This allows policy management, OU operations, and other governance tasks to be handled from purpose-built accounts without requiring broad access to the management account. + +## Rationale + +The management account has unique and high privileges to manage AWS Organizations (for example, creating/deleting accounts, managing org structures) and is not subject to guardrails like SCPs. Without a delegated administrator for Organizations, all policy management, OU changes, and account governance must be performed directly from the management account. This results in concentrating operational activity in the most powerful account. Configuring a dedicated member account as a delegated administrator for Organizations policy management distributes these tasks to a purpose-built AWS account that can be protected by SCPs and other controls, reduces the number of users and roles that need management-account access, and supports separation of duties while maintaining centralized control over organization-wide features. + +## Impact + +Configuring a delegated administrator for AWS Organizations requires creating or identifying a dedicated member account for policy management and granting it specific permissions via a resource-based delegation policy. Existing workflows, automation, and user access patterns that currently perform Organizations policy tasks directly from the management account must be updated to use the delegated account instead. This introduces short-term operational overhead and testing to ensure policy creation, attachment, and management continue to function correctly from the new account. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Organizations console. From the AWS Accounts section, verify that this is the management account for the organization. +2. In the AWS Organizations console, navigate to Settings. Scroll to the Delegated administrator for AWS Organizations section. +3. Review the delegation policy status: + - If a delegation policy is configured and shows one or more member accounts registered to manage Organizations policies, proceed to step 4. + - If no delegation policy is configured or the section shows No delegated administrator (or equivalent), the audit fails because Organizations management is performed directly from the management account. +4. In the Delegated administrator section, note the account IDs registered for Organizations policy management. Confirm that the delegated accounts are purpose-built governance, security, or policy management accounts, not general workload, sandbox, or development accounts. +5. View the delegation policy details to confirm it grants appropriate least-privilege permissions for policy types (for example, SCPs, tag policies, backup policies) and actions (CreatePolicy, AttachPolicy, UpdatePolicy, etc.). + +## Expected Result + +A delegation policy is configured in the management account with at least one dedicated member account registered as a delegated administrator for Organizations policy management with least-privilege permissions. + +## Remediation + +### Using AWS Console + +1. Identify a dedicated member account for governance/policy management (for example, create a new "Policy Management" account or use an existing Security account). +2. You must be in the management account with permissions to manage Organizations resource policies. Navigate to AWS Organizations console, then click on Settings and browse to "Delegated administrator for AWS Organizations" section. +3. If no policy exists, click on Delegate. If a policy exists, choose Edit policy. +4. In the policy editor, paste or construct a delegation policy statement mentioning the Principal as the AWS account Root which is being delegated access to, and the Actions with the list of least-privileged permissions that could be performed by the delegated AWS account. +5. Save and validate the delegation policy. +6. Sign in to the delegated administrator account and open the AWS Organizations console. Confirm that policy management (Policies, Attach/Detach, etc.) is accessible and that users/roles in this account can perform Organizations tasks without management-account access. +7. Grant IAM roles/users in the delegated admin account only the permissions needed for Organizations policy management. +8. Update procedures so that routine Organizations policy tasks are performed from the delegated account, reserving the management account for tasks that only it can perform. + +## Default Value + +By default, no delegated administrator is configured for AWS Organizations policy management. All policy management tasks must be performed directly from the management account. + +## References + +- AWS Organizations documentation on delegated administration + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | | x | x | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.6/SKILL.md new file mode 100644 index 0000000000..528d4eba96 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.1.6/SKILL.md @@ -0,0 +1,83 @@ +--- +name: cis-aws-foundations-2.1.6 +description: "Ensure delegated admins manage AWS Organizations-integrated services" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, organizations, delegated-admin, cloudtrail, integrated-services] +cis_id: "2.1.6" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.1.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure delegated admins manage AWS Organizations-integrated services + +## Description + +Ensure that AWS services (such as AWS CloudTrail) which integrate with AWS Organizations and support delegated administration are managed through delegated administrator member accounts instead of directly from the Organizations management account. For each such service, the management account should enable trusted access and register a purpose-built member account as the delegated administrator, so that this account can perform service-level administration across all organization accounts. + +## Rationale + +The management account has unique and high privileges to manage AWS Organizations (for example, creating/deleting accounts, managing org structures) and is not subject to guardrails like SCPs. Without delegated administrators, organization-wide security, logging, and management services must be operated directly from the management account, concentrating operational activity and credentials in the most privileged account in the organization. Registering member accounts as delegated administrators for AWS services distributes service-specific administration to dedicated security, logging, or operations accounts that can be restricted by SCPs, monitored like other workload accounts, and aligned with team responsibilities, while reducing day-to-day use of the management account. + +## Impact + +Configuring a delegated administrator for AWS Services that integrate with AWS Organizations requires creating or identifying a dedicated member account for policy management and granting it specific permissions. Existing workflows, automation, and user access patterns that currently perform tasks directly from the management account must be updated to use the delegated account instead. This introduces short-term operational overhead and testing to ensure policy creation, attachment, and management continue to function correctly from the new account. + +## Audit Procedure + +### Using AWS Console + +Note: This audit uses AWS CloudTrail as a concrete example. You must perform similar audits for all other AWS services that integrate with AWS Organizations and support delegated administration that are in use in your environment. + +1. Sign in to the management account and open the CloudTrail console. +2. In the left navigation pane, choose Trails. + - Verify that there is at least one organization trail (trail with Apply trail to all accounts in my organization or equivalent setting enabled). + - If CloudTrail is only configured as single-account trails and no organization trail is in use, note that delegated admin for CloudTrail is not in scope and this recommendation is not applicable for CloudTrail in this environment. +3. In the same management account CloudTrail console, choose Settings in the left navigation pane, and scroll to the Organization delegated administrators section. +4. Verify the configuration for Organization delegated administrators: + - Verify that at least one member account ID (not the management account) is listed as a delegated administrator for CloudTrail. + - Verify that the account(s) are appropriate for security/logging operations (for example, a named Security or Logging account, not a sandbox or general workload account). + - If the section shows "No delegated administrators" when an organization trail is in use, CloudTrail is effectively administered from the management account and this is a gap. + +## Expected Result + +At least one dedicated member account (not the management account) is registered as a delegated administrator for each AWS service that integrates with Organizations and is in use in the environment. + +## Remediation + +### Using AWS Console + +Note: This remediation section uses AWS CloudTrail as a concrete example. You must perform similar procedure for all other AWS services that integrate with AWS Organizations and support delegated administration that are in use in your environment. + +1. In the management account, verify that trusted access for CloudTrail is enabled in AWS Organizations (AWS Organizations -> Services). +2. In the management account CloudTrail console, choose Settings in the left navigation pane. Scroll to Organization delegated administrators. +3. Click on "Register administrator" + - Enter the account ID of the designated Logging or Security account. + - Click on Register administrator. CloudTrail will automatically create the necessary service-linked roles and register the account. +4. In the delegated administrator account, open the CloudTrail console and confirm that the organization trail is visible and administrative actions are accessible. +5. Update operational runbooks so that routine CloudTrail administration is performed from the delegated admin account, not the management account. + +## Default Value + +By default, no delegated administrators are configured for AWS Organizations-integrated services. All service administration must be performed directly from the management account. + +## References + +- AWS Organizations documentation on delegated administration +- AWS CloudTrail documentation on organization trails + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | | x | x | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.10/SKILL.md new file mode 100644 index 0000000000..3147ecc554 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.10/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-aws-foundations-2.10 +description: "Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, mfa, console-password, authentication, users] +cis_id: "2.10" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.5, cis-aws-foundations-2.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password + +## Description + +Multi-Factor Authentication (MFA) adds an extra layer of authentication assurance beyond traditional credentials. With MFA enabled, when a user signs in to the AWS Console, they are prompted for their username and password as well as an authentication code from their physical or virtual MFA device. It is recommended that MFA be enabled for all IAM users that have a console password. + +## Rationale + +Enabling MFA increases security for console access by requiring the authenticating principal to possess a device that generates a time-sensitive authentication code, in addition to their credentials. + +## Impact + +Without MFA, IAM user accounts with console access are more susceptible to credential compromise, potentially leading to unauthorized access to AWS resources. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam. +2. In the left pane, select `Users`. +3. If the `MFA` or `Password age` columns are not visible, click the gear icon in the upper right corner and enable them. +4. Ensure that for each user where the `Password age` column shows a value, the `MFA` column shows `Virtual`, `U2F Security Key`, or `Hardware`. + +### Using AWS CLI + +1. Run the following command: + +```bash +aws iam generate-credential-report +aws iam get-credential-report --query 'Content' --output text | base64 -d | cut -d, -f1,4,8 +``` + +2. The output of this command will produce a table similar to the following: + +``` +user,password_enabled,mfa_active +elise,false,false +brandon,true,true +rakesh,false,false +helene,false,false +paras,true,true +anitha,false,false +``` + +3. For any column having `password_enabled` set to `true`, ensure `mfa_active` is also set to `true`. + +## Expected Result + +All IAM users with `password_enabled` set to `true` also have `mfa_active` set to `true`. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/. +2. In the left pane, select `Users`. +3. Select the IAM user. +4. Choose the `Security credentials` tab. +5. Under `Multi-factor authentication (MFA)`, select `Assign MFA device`. +6. Select `Virtual MFA device` (or hardware/security key as applicable), then choose `Continue`. +7. Configure the MFA device by: + - Scanning the QR code, or + - Entering the secret key manually. +8. Enter two consecutive authentication codes. +9. Select `Assign MFA`. + +## Default Value + +By default, IAM users with a console password do not have MFA enabled. MFA must be explicitly configured for each user account. + +## References + +1. https://tools.ietf.org/html/rfc6238 +2. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa.html +3. https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#enable-mfa-for-privileged-users +4. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_virtual.html +5. CCE-78901-6 +6. https://blogs.aws.amazon.com/security/post/Tx2SJJYE082KBUK/How-to-Delegate-Management-of-Multi-Factor-Authentication-to-AWS-IAM-Users + +## Additional Information + +### Forced IAM User Self-Service Remediation + +Amazon has published a pattern that requires users to set up MFA through self-service before they gain access to their complete set of permissions. Until they complete this step, they cannot access their full permissions. This pattern can be used for new AWS accounts. It can also be applied to existing accounts; it is recommended that users receive instructions and a grace period to complete MFA enrollment before active enforcement on existing AWS accounts. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.5 Require MFA for Administrative Access | x | x | x | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ---------------------- | ----------- | +| T1078.004 | TA0001, TA0007, TA0043 | M1027 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.11/SKILL.md new file mode 100644 index 0000000000..bc9bcfe189 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.11/SKILL.md @@ -0,0 +1,136 @@ +--- +name: cis-aws-foundations-2.11 +description: "Ensure credentials unused for 45 days or more are disabled" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, credentials, unused-credentials, access-keys, password] +cis_id: "2.11" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.12, cis-aws-foundations-2.10] +prerequisites: [] +severity_boost: {} +--- + +# Ensure credentials unused for 45 days or more are disabled + +## Description + +AWS IAM users can access AWS resources using different types of credentials, such as passwords or access keys. It is recommended that all credentials that have been unused for 45 days or more be deactivated or removed. + +## Rationale + +Disabling or removing unused credentials reduces the window of opportunity for credentials associated with a compromised or abandoned account to be used. + +## Impact + +Disabling or removing unused credentials reduces the window of opportunity for credentials associated with a compromised or abandoned account to be used. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam +2. Click on `Users` +3. Click the `Settings` (gear) icon +4. Select `Console last sign-in`, `Access key last used`, and `Access Key Id` +5. Click on `Confirm` +6. Check and ensure that `Console last sign-in` is less than 45 days ago. + +**Note** - `-` means the user has never logged in. + +7. If credentials have not been used within 45 days, refer to remediation + +### Using AWS CLI + +1. Generate and review the credential report: + +```bash +aws iam generate-credential-report +aws iam get-credential-report --query 'Content' --output text | base64 -d +``` + +2. Review the following fields: + +- `password_last_used` +- `access_key_1_last_used_date` +- `access_key_2_last_used_date` + +3. Identify any credentials unused for 45 days or more + +## Expected Result + +All IAM user credentials (passwords and access keys) should show activity within the last 45 days. Any credentials unused for 45 days or more should be disabled or removed. + +## Remediation + +### Using AWS Console + +Perform the following to deactivate or remove unused credentials: + +1. Login to the AWS Management Console and open the IAM console +2. Click on the `User` +3. Select the user +4. Click `Security Credentials` + +Disable Console Access: + +5. In the Console sign-in section, select Manage console access +6. If Console last sign-in is greater than 45 days, select Disable access + +Deactivate or Delete Access Keys: + +7. In the Access keys section: + +- Deactivate unused keys, or +- Delete keys that are no longer required + +### Using AWS CLI + +1. Delete unused access keys: + +```bash +aws iam delete-access-key --access-key-id --user-name +``` + +2. Remove console access: + +```bash +aws iam delete-login-profile --user-name +``` + +## Default Value + +By default, AWS does not automatically disable or remove IAM user credentials based on age or last use. Console passwords and access keys remain active until manually deactivated or deleted. + +## References + +1. CCE-78900-8 +2. https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#remove-credentials +3. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding_unused.html +4. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html +5. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html + +## Additional Information + +- `` is excluded from this audit, as root usage should be limited and may not occur within a 45-day window +- Consider implementing automation (e.g., AWS Config, Lambda, or IAM Access Analyzer) to regularly detect and remediate unused credentials + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.3 Disable Dormant Accounts - Delete or disable any dormant accounts after a period of 45 days of inactivity, where supported. | x | x | x | +| v7 | 16.9 Disable Dormant Accounts - Automatically disable dormant accounts after a set period of inactivity. | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1078.004 | TA0001 | M1018 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.12/SKILL.md new file mode 100644 index 0000000000..50541a1844 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.12/SKILL.md @@ -0,0 +1,136 @@ +--- +name: cis-aws-foundations-2.12 +description: "Ensure access keys are rotated every 90 days or less" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, access-keys, key-rotation, credentials] +cis_id: "2.12" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.11, cis-aws-foundations-2.13] +prerequisites: [] +severity_boost: {} +--- + +# Ensure access keys are rotated every 90 days or less + +## Description + +Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests to AWS. IAM users require access keys to make programmatic calls via the AWS CLI, SDKs, or APIs. It is recommended that all access keys be rotated regularly and at least every 90 days. + +## Rationale + +Rotating access keys reduces the window of opportunity for a compromised or exposed key to be used. Regular rotation also limits the risk associated with lost, stolen, or improperly stored credentials. + +## Impact + +Long-lived access keys increase the risk of unauthorized access if compromised, as they may remain valid indefinitely without detection. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam +2. Click on `Users` +3. For each user, go to `Security Credentials` +4. Review each key under `Access Keys` +5. For each key with `Status = Active`, ensure the `Created` date is within `90 days` + +### Using AWS CLI + +1. Run the following commands: + +```bash +aws iam generate-credential-report +aws iam get-credential-report --query 'Content' --output text | base64 -d +``` + +2. Review the following fields: + +- `access_key_1_last_rotated` +- `access_key_2_last_rotated` + +3. Ensure all active keys have been rotated within `90 days` + +## Expected Result + +All active access keys should have a `last_rotated` date within the last 90 days. No access key should be older than 90 days. + +## Remediation + +### Using AWS Console + +Perform the following to rotate access keys: + +1. Sign in to the AWS Management Console and open the IAM console (https://console.aws.amazon.com/iam) +2. Click on `Users` +3. Select the user +4. Navigate to `Security credentials` + +Rotate Access Keys: + +5. Click `Create access` key +6. Update all applications and tools to use the new access key +7. After confirming successful use of the new key: + +- Deactivate the old key +- Delete the old key when no longer needed + +### Using AWS CLI + +1. Create a new access key: + +```bash +aws iam create-access-key --user-name +``` + +2. Update all applications and tools to use the new access key + +3. Check usage of the old key: + +```bash +aws iam get-access-key-last-used --access-key-id +``` + +4. Deactivate the old key: + +```bash +aws iam update-access-key --access-key-id --status Inactive --user-name +``` + +5. After confirming no usage, delete the old key: + +```bash +aws iam delete-access-key --access-key-id --user-name +``` + +## Default Value + +By default, AWS does not enforce access key rotation. Access keys remain valid until manually deactivated or deleted. + +## References + +1. CCE-78902-4 +2. https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#rotate-credentials +3. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html +4. https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html +5. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.1 Establish and Maintain an Inventory of Accounts - Establish and maintain an inventory of all accounts managed in the enterprise. The inventory must include both user and administrator accounts. The inventory, at a minimum, should contain the person's name, username, start/stop dates, and department. Validate that all active accounts are authorized, on a recurring schedule at a minimum quarterly, or more frequently. | x | x | x | +| v7 | 16.1 Maintain an Inventory of Authentication Systems - Maintain an inventory of each of the organization's authentication systems, including those located onsite or at a remote service provider. | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1078.004 | TA0006 | M1018 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.13/SKILL.md new file mode 100644 index 0000000000..5b51b0433b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.13/SKILL.md @@ -0,0 +1,147 @@ +--- +name: cis-aws-foundations-2.13 +description: "Ensure IAM users receive permissions only through groups" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, groups, permissions, policies, least-privilege] +cis_id: "2.13" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.14, cis-aws-foundations-2.15] +prerequisites: [] +severity_boost: {} +--- + +# Ensure IAM users receive permissions only through groups + +## Description + +IAM users are granted access to services, functions, and data through IAM policies. There are four ways to assign policies to a user: + +1. Attach an inline (user) policy directly to the user +2. Attach a managed policy directly to the user +3. Add the user to an IAM group with attached policies +4. Add the user to an IAM group with inline policies + +Only assigning permissions through IAM groups is recommended. + +## Rationale + +Assigning IAM policies through groups centralizes permissions management and aligns access with organizational roles. This reduces complexity and lowers the likelihood of excessive or inconsistent permissions. + +## Impact + +Directly assigning policies to users increases the risk of misconfigured or excessive permissions and makes access management more difficult to audit and maintain. + +## Audit Procedure + +### Using AWS CLI + +1. Run the following command to list all IAM users: + +```bash +aws iam list-users --query 'Users[*].UserName' --output text +``` + +2. For each user returned, run: + +```bash +aws iam list-attached-user-policies --user-name +aws iam list-user-policies --user-name +``` + +3. If any policies are returned, the user has either: + +- A directly attached managed policy, or +- An inline policy + +## Expected Result + +For each IAM user, both `list-attached-user-policies` and `list-user-policies` should return empty results. All permissions should be assigned through IAM groups only. + +## Remediation + +### Using AWS Console + +Create and configure a group: + +1. Sign in to the AWS Management Console and open the IAM console (https://console.aws.amazon.com/iam/) +2. In the navigation pane, click `User Groups` and then click `Create Group` +3. Enter a group name and click `Next` +4. Select the appropriate policies +5. Click `Create Group` + +Add users to the group: + +6. Navigate to `User Groups` +7. Select the group +8. Click `Add users` to group +9. Select users and click `Add users` + +Remove direct user policies: + +10. Navigate to `Users` +11. Select the user +12. Go to the `Permissions` tab +13. Remove any directly attached policies + +### Using AWS CLI + +1. Create a group: + +```bash +aws iam create-group --group-name +``` + +2. Attach a policy to the group: + +```bash +aws iam attach-group-policy --group-name --policy-arn +``` + +3. Add user to group: + +```bash +aws iam add-user-to-group --user-name --group-name +``` + +4. Detach managed policies from user: + +```bash +aws iam detach-user-policy --user-name --policy-arn +``` + +5. Delete inline policies from user: + +```bash +aws iam delete-user-policy --user-name --policy-name +``` + +## Default Value + +By default, AWS allows IAM policies to be attached directly to users, groups, or roles. There are no restrictions preventing direct user policies unless enforced through organizational standards. + +## References + +1. http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html +2. http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html +3. CCE-78912-3 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control - Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | x | +| v7 | 16.1 Maintain an Inventory of Authentication Systems - Maintain an inventory of each of the organization's authentication systems, including those located onsite or at a remote service provider. | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ---------------------- | ----------- | +| T1078.004 | TA0007, TA0008, TA0043 | M1018 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.14/SKILL.md new file mode 100644 index 0000000000..1a03acdef0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.14/SKILL.md @@ -0,0 +1,158 @@ +--- +name: cis-aws-foundations-2.14 +description: 'Ensure IAM policies that allow full "*:*" administrative privileges are not attached' +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, policies, admin-privileges, least-privilege, permissions] +cis_id: "2.14" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.13, cis-aws-foundations-2.15, cis-aws-foundations-2.21] +prerequisites: [] +severity_boost: {} +--- + +# Ensure IAM policies that allow full "_:_" administrative privileges are not attached + +## Description + +IAM policies are the means by which privileges are granted to users, groups, or roles. It is recommended and considered standard security advice to grant least privilege, granting only the permissions required to perform a task. Determine what users need to do, and then craft policies for them that allow the users to perform only those tasks, instead of granting full administrative privileges. + +## Rationale + +It is more secure to start with a minimal set of permissions and grant additional permissions as necessary, rather than starting with overly permissive access and attempting to restrict it later. + +Providing full administrative privileges instead of restricting access to the minimum required exposes resources to potentially unintended or malicious actions. + +IAM policies that contain a statement with `"Effect": "Allow"` and `"Action": "*"` over `"Resource": "*"` should be removed. + +## Impact + +Policies granting full administrative privileges significantly increase the risk of unauthorized or unintended actions, potentially resulting in complete account compromise. + +## Audit Procedure + +### Using AWS CLI + +1. Run the following to get a list of IAM policies: + +```bash +aws iam list-policies --only-attached --output text +``` + +2. For each policy returned, evaluate the default policy version to determine if it allows full administrative privileges (":"). The default version represents the effective permissions applied. + +3. Alternatively, the following command can be used to identify all attached policies that allow full administrative privileges and list associated entities: + +```bash +policies=$(aws iam list-policies --scope All --only-attached --query 'Policies[*].Arn' --output text) + +for arn in $policies; do + version=$(aws iam get-policy --policy-arn "$arn" --query 'Policy.DefaultVersionId' --output text) + + is_admin=$(aws iam get-policy-version --policy-arn "$arn" --version-id "$version" --query 'PolicyVersion.Document' | jq -r ' + .Statement | + (if type == "array" then .[] else . end) | + select(.Effect == "Allow") | + select( + (.Action | if type == "array" then .[] else . end == "*") and + (.Resource | if type == "array" then .[] else . end == "*") + ) + ') + + if [ ! -z "$is_admin" ]; then + echo "-------------------------------------------------------------" + echo "ADMIN POLICY FOUND: $arn" + echo "ATTACHED ENTITIES:" + aws iam list-entities-for-policy --policy-arn "$arn" --query '{Users: PolicyUsers[*].UserName, Roles: PolicyRoles[*].RoleName, Groups: PolicyGroups[*].GroupName}' --output yaml + fi +done +``` + +4. In the output, no policy should contain a statement with: + +- "Effect": "Allow" +- "Action": "\*" +- "Resource": "\*" + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console +2. In the navigation pane, click `Policies` +3. Search for the policy identified in the audit step +4. Select the policy +5. Choose `Detach` +6. Detach the policy from all `Users`, `Groups`, and `Roles` +7. Delete the policy if it is no longer required + +## Expected Result + +No attached IAM policies should contain a statement with `"Effect": "Allow"`, `"Action": "*"`, and `"Resource": "*"` simultaneously. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console +2. In the navigation pane, click `Policies` +3. Search for the policy identified in the audit step +4. Select the policy +5. Choose `Detach` +6. Detach the policy from all `Users`, `Groups`, and `Roles` +7. Delete the policy if it is no longer required + +### Using AWS CLI + +1. List all entities attached to the policy: + +```bash +aws iam list-entities-for-policy --policy-arn +``` + +2. Detach from users: + +```bash +aws iam detach-user-policy --user-name --policy-arn +``` + +3. Detach from groups: + +```bash +aws iam detach-group-policy --group-name --policy-arn +``` + +4. Detach from roles: + +```bash +aws iam detach-role-policy --role-name --policy-arn +``` + +## Default Value + +By default, AWS allows the creation and attachment of IAM policies that grant full administrative privileges (i.e., "Effect": "Allow", "Action": "\*", "Resource": "\*"). No restriction exists unless enforced through organizational policy or Service Control Policies (SCPs). + +## References + +1. https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html +2. https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html +3. CCE-78912-3 +4. https://docs.aws.amazon.com/cli/latest/reference/iam/index.html#cli-aws-iam + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control - Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | x | +| v7 | 4.1 Maintain Inventory of Administrative Accounts - Use automated tools to inventory all administrative accounts, including domain and local accounts, to ensure that only authorized individuals have elevated privileges. | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ---------------------------------------------- | ----------- | +| T1078.004 | TA0003, TA0007, TA0008, TA0009, TA0010, TA0043 | M1018 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.15/SKILL.md new file mode 100644 index 0000000000..67491d8e43 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.15/SKILL.md @@ -0,0 +1,132 @@ +--- +name: cis-aws-foundations-2.15 +description: "Ensure a support role has been created to manage incidents with AWS Support" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, support-role, incident-management, least-privilege] +cis_id: "2.15" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.14, cis-aws-foundations-2.13] +prerequisites: [] +severity_boost: {} +--- + +# Ensure a support role has been created to manage incidents with AWS Support + +## Description + +AWS provides a Support Center that can be used for incident notification and response, as well as technical support and customer service. Create an IAM role with the appropriate policy assigned to allow authorized users to manage incidents with AWS Support. + +## Rationale + +Following the principle of least privilege, an IAM role should be used with a scoped policy to allow access to AWS Support. This ensures only authorized users can manage support cases without requiring broad administrative access. + +## Impact + +Without a dedicated support role, access to AWS Support may require overly permissive roles, increasing the risk of excessive access and reducing separation of duties. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam +2. In the left navigation pane, under `Access management`, select `Policies` +3. In the policy search field, enter `AWSSupportAccess` +4. Select the policy +5. Click the `Entities attached` tab +6. Ensure at least one `IAM Role` is attached + +### Using AWS CLI + +1. Identify the AWS managed support policy: + +```bash +aws iam list-policies --query "Policies[?PolicyName=='AWSSupportAccess'].Arn" --output text +``` + +2. Check if it is attached to any roles: + +```bash +aws iam list-entities-for-policy --policy-arn arn:aws:iam::aws:policy/AWSSupportAccess +``` + +3. Ensure that at least one role is listed under `PolicyRoles` + +## Expected Result + +At least one IAM role should be attached to the `AWSSupportAccess` policy. The policy ARN is `arn:aws:iam::aws:policy/AWSSupportAccess`. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console +2. Navigate to `Roles` +3. Click `Create role` +4. Configure the trusted entity (e.g., your AWS account or identity provider) +5. Attach the `AWSSupportAccess` policy +6. Complete role creation +7. Assign the role to appropriate users or groups + +### Using AWS CLI + +1. Create a trust policy (example): + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam:::root" + }, + "Action": "sts:AssumeRole" + } + ] +} +``` + +2. Create the role: + +```bash +aws iam create-role --role-name --assume-role-policy-document file://trust-policy.json +``` + +3. Attach the AWS Support policy: + +```bash +aws iam attach-role-policy --policy-arn arn:aws:iam::aws:policy/AWSSupportAccess --role-name +``` + +## Default Value + +By default, AWS does not create a dedicated support role. IAM users and roles with sufficient permissions (e.g., `AdministratorAccess`) can access the Support Center unless a specific role with the `AWSSupportAccess` policy is created. + +## References + +1. https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html +2. https://aws.amazon.com/premiumsupport/pricing/ +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/list-policies.html +4. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/attach-role-policy.html +5. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/list-entities-for-policy.html + +## Additional Information + +- The `AWSSupportAccess` policy is a global AWS managed policy with ARN: `arn:aws:iam::aws:policy/AWSSupportAccess` +- Avoid granting support access through broad policies like `AdministratorAccess` +- Assign the support role only to users who require it to maintain separation of duties + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 17.1 Designate Personnel to Manage Incident Handling - Designate one key person, and at least one backup, who will manage the enterprise's incident handling process. Management personnel are responsible for the coordination and documentation of incident response and recovery efforts and can consist of employees internal to the enterprise, third-party vendors, or a hybrid approach. If using a third-party vendor, designate at least one person internal to the enterprise to oversee any third-party work. Review annually, or when significant enterprise changes occur that could impact this Safeguard. | x | x | x | +| v7 | 14.1 Segment the Network Based on Sensitivity - Segment the network based on the label or classification level of the information stored on the servers, locate all sensitive information on separated Virtual Local Area Networks (VLANs). | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.16/SKILL.md new file mode 100644 index 0000000000..1f8cb61c76 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.16/SKILL.md @@ -0,0 +1,131 @@ +--- +name: cis-aws-foundations-2.16 +description: "Ensure IAM instance roles are used for AWS resource access from instances" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, ec2, instance-roles, credentials, least-privilege] +cis_id: "2.16" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.14, cis-aws-foundations-2.12] +prerequisites: [] +severity_boost: {} +--- + +# Ensure IAM instance roles are used for AWS resource access from instances + +## Description + +AWS access from within EC2 instances can be achieved either by embedding AWS access keys into applications or by assigning an IAM role to the instance with the appropriate permissions. "AWS access" refers to making API calls to AWS services to access or manage resources. + +## Rationale + +IAM roles reduce the risks associated with storing, sharing, and rotating long-term credentials. Compromised credentials can be used outside of AWS, whereas IAM role credentials are temporary and tied to the instance. + +Additionally, credentials embedded in applications or configuration files are more difficult to rotate and are more likely to be exposed over time, increasing the risk of unauthorized access. + +## Impact + +Using embedded credentials instead of IAM roles increases the risk of credential exposure and unauthorized access, particularly if credentials are not rotated or are improperly stored. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and navigate to the EC2 dashboard at https://console.aws.amazon.com/ec2/ +2. In the left navigation panel, choose `Instances` +3. Select the EC2 instance you want to examine +4. Select `Actions` +5. Select `View details` +6. Review the following: + +- If `IAM Role` contains a role, it is compliant +- If `IAM Role` is blank, it is non-compliant +- If an `Instance profile ARN` exists but no role is attached, it is non-compliant + +7. Repeat for all EC2 instances + +### Using AWS CLI + +1. List all EC2 instances: + +```bash +aws ec2 describe-instances --region --query 'Reservations[*].Instances[*].InstanceId' +``` + +2. Check for IAM instance profiles: + +```bash +aws ec2 describe-instances --region --instance-id --query 'Reservations[*].Instances[*].IamInstanceProfile' +``` + +3. If no IAM instance profile is returned, the instance does not have a role attached +4. Repeat for all instances and regions + +## Expected Result + +Every running EC2 instance should have an IAM instance profile with an appropriate role attached. No instance should rely on embedded access keys for AWS API calls. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and navigate to the EC2 dashboard at https://console.aws.amazon.com/ec2/ +2. In the left navigation panel, choose `Instances` +3. Select the EC2 instance you want to modify +4. Click `Actions` +5. Click `Security` +6. Click `Modify IAM role` +7. Select an existing IAM role or create a new one +8. Click `Update IAM role` +9. Repeat for all applicable instances + +### Using AWS CLI + +1. Identify instances without roles (all regions): + +```bash +for r in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do aws ec2 describe-instances --region "$r" --query "Reservations[].Instances[?IamInstanceProfile==null].[InstanceId, '$r']" --output text done +``` + +2. Attach an instance profile: + +```bash +aws ec2 associate-iam-instance-profile --region --instance-id --iam-instance-profile Name="Instance-Profile-Name" +``` + +3. Verify the role is attached: + +```bash +aws ec2 describe-instances --region --instance-id --query 'Reservations[*].Instances[*].IamInstanceProfile' +``` + +4. Repeat steps 2 and 3 for each EC2 instance in your AWS account that requires an IAM role to be attached. + +## Default Value + +By default, EC2 instances are launched without an IAM role attached. Applications must use embedded credentials unless an instance role is configured. + +## References + +1. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html +2. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control - Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | x | +| v7 | 14.1 Segment the Network Based on Sensitivity - Segment the network based on the label or classification level of the information stored on the servers, locate all sensitive information on separated Virtual Local Area Networks (VLANs). | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------- | ----------- | +| T1078.004 | TA0001, TA0004 | M1026 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.17/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.17/SKILL.md new file mode 100644 index 0000000000..01ae27031b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.17/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-aws-foundations-2.17 +description: "Ensure that all expired SSL/TLS certificates stored in AWS IAM are removed" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, ssl, tls, certificates, expired-certificates, acm] +cis_id: "2.17" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.18] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that all expired SSL/TLS certificates stored in AWS IAM are removed + +## Description + +To enable HTTPS connections to your website or application in AWS, you need an SSL/TLS server certificate. You should use AWS Certificate Manager (ACM) to store and deploy server certificates, as storing certificates in IAM is no longer recommended. Use IAM only when you must support HTTPS connections in a region or service that is not supported by ACM. IAM securely encrypts your private keys and stores the encrypted version in IAM SSL certificate storage. IAM supports deploying server certificates in all regions, but you must obtain your certificate from an external provider for use with AWS. You cannot upload an ACM certificate to IAM. Additionally, you cannot manage your certificates from the IAM Console. + +## Rationale + +Removing expired SSL/TLS certificates eliminates the risk that an invalid certificate will be deployed accidentally to a resource such as AWS Elastic Load Balancer (ELB), which can damage the credibility of the application or website behind the ELB. As a best practice, it is recommended to delete expired certificates and migrate certificate management to AWS Certificate Manager (ACM) where supported. + +## Impact + +Deleting certificates may impact applications if expired certificates are still in use by services such as Elastic Load Balancing or CloudFront. Ensure services are updated to use valid certificates before removal. Migrating certificates from IAM to ACM may require updates to associated resources. + +## Audit Procedure + +### Using AWS Console + +Getting certificate expiration information via the AWS Management Console is not currently supported for IAM-stored certificates. To request information about SSL/TLS certificates stored in IAM, use the Command Line Interface (CLI). + +### Using AWS CLI + +1. Run the following command to list all IAM-stored server certificates: + +```bash +aws iam list-server-certificates +``` + +2. The command output returns an array containing all SSL/TLS certificates and their metadata: + +```json +{ + "ServerCertificateMetadataList": [ + { + "ServerCertificateId": "EHDGFRW7EJFYTE88D", + "ServerCertificateName": "MyServerCertificate", + "Expiration": "2018-07-10T23:59:59Z", + "Path": "/", + "Arn": "arn:aws:iam::012345678910:server-certificate/MySSLCertificate", + "UploadDate": "2018-06-10T11:56:08Z" + } + ] +} +``` + +3. Review the `Expiration` value for each certificate and determine if any certificates are expired +4. If expired certificates are identified, they should be removed +5. If the command returns: + +```json +{ "ServerCertificateMetadataList": [] } +``` + +This indicates that no certificates are currently stored in IAM + +## Expected Result + +No expired SSL/TLS certificates should be stored in AWS IAM. The `ServerCertificateMetadataList` should either be empty or contain only certificates with `Expiration` dates in the future. + +## Remediation + +### Using AWS Console + +Removing expired certificates via the AWS Management Console is not currently supported. Use the CLI to delete IAM-stored certificates. + +### Using AWS CLI + +1. Run the following command to delete an expired certificate: + +```bash +aws iam delete-server-certificate --server-certificate-name +``` + +2. A successful command returns no output + +## Default Value + +By default, expired SSL/TLS certificates stored in AWS IAM are not automatically deleted. Certificates remain in IAM until manually removed. ACM-managed certificates are automatically renewed when possible. + +## References + +1. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/delete-server-certificate.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.1 Establish and Maintain a Data Management Process - Establish and maintain a data management process. In the process, address data sensitivity, data owner, handling of data, data retention limits, and disposal requirements, based on sensitivity and retention standards for the enterprise. Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard. | x | x | x | +| v7 | 13.1 Maintain an Inventory Sensitive Information - Maintain an inventory of all sensitive information stored, processed, or transmitted by the organization's technology systems, including those located onsite or at a remote service provider. | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.18/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.18/SKILL.md new file mode 100644 index 0000000000..6e9a6d06d3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.18/SKILL.md @@ -0,0 +1,119 @@ +--- +name: cis-aws-foundations-2.18 +description: "Ensure that IAM External Access Analyzer is enabled for all regions" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, access-analyzer, external-access, cross-account, resource-policies] +cis_id: "2.18" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.14, cis-aws-foundations-2.21] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that IAM External Access Analyzer is enabled for all regions + +## Description + +Enable IAM External Access Analyzer for all resources in each active AWS region. + +IAM Access Analyzer is a service that analyzes resource policies to identify resources that can be accessed from outside the account. After the analyzer is enabled, scan results are displayed in the console showing accessible resources. These results help determine whether unintended access is permitted, making it easier for administrators to monitor least privilege access. Access Analyzer analyzes only policies applied to resources within the same AWS region. + +## Rationale + +IAM External Access Analyzer helps identify resources in your account or organization that are shared with external entities. This allows detection of unintended access to resources and data. It continuously monitors policies for services such as S3 buckets, KMS keys, Lambda functions, and SQS queues. + +## Impact + +If IAM External Access Analyzer is not enabled, unintended external access to resources may go undetected, increasing the risk of data exposure or unauthorized access. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam +2. Under `Access analyzer` choose `Analyzer Settings` +3. On the `Analyzer Settings` page, review the list of analyzers +4. Identify analyzers where the `Finding type` is `External Access` +5. Repeat these steps for each active region, as analyzers are region-specific + +### Using AWS CLI + +1. Run the following command: + +```bash +aws accessanalyzer list-analyzers --type --region | grep status +``` + +2. Ensure that at least one Analyzer's `status` is set to `ACTIVE` + +3. To check all regions: + +```bash +for r in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do + echo "=== $r ===" + aws accessanalyzer list-analyzers --region "$r" --type ACCOUNT --query "analyzers[].status" --output text +done +``` + +4. Ensure each region returns at least one `ACTIVE` analyzer + +## Expected Result + +Every active AWS region should have at least one IAM External Access Analyzer with `ACTIVE` status. The analyzer should be configured with `Finding type` set to `External Access`. + +## Remediation + +### Using AWS Console + +Perform the following to enable IAM Access Analyzer for IAM policies: + +1. Open the IAM console at https://console.aws.amazon.com/iam/ +2. Choose `Access analyzer` +3. Select `Create analyzer` +4. Select `External access` analyzer +5. Confirm the region +6. Optionally provide a name and tags +7. Select `Create analyzer` +8. Repeat for each active region + +### Using AWS CLI + +1. Create an analyzer in a region: + +```bash +aws accessanalyzer list-analyzers --type --region | grep status +``` + +2. Repeat for each region as required + +## Default Value + +By default, IAM External Access Analyzer is not enabled in any region. An analyzer must be explicitly created in each region. + +## References + +1. https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html +2. https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/accessanalyzer/get-analyzer.html +4. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/accessanalyzer/create-analyzer.html + +## Additional Information + +- IAM Access Analyzer is region-specific and must be enabled in each region +- For multi-account environments, consider using an `ORGANIZATION` analyzer to centralize findings +- Some AWS regions are enabled by default, while others must be manually enabled + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.19/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.19/SKILL.md new file mode 100644 index 0000000000..66e58ff560 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.19/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-aws-foundations-2.19 +description: "Ensure IAM users are managed centrally via identity federation or AWS Organizations for multi-account environments" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, federation, identity-center, sso, organizations, multi-account] +cis_id: "2.19" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.13, cis-aws-foundations-2.14] +prerequisites: [] +severity_boost: {} +--- + +# Ensure IAM users are managed centrally via identity federation or AWS Organizations for multi-account environments + +## Description + +In multi-account environments, IAM user centralization facilitates greater user control. User access beyond the initial account is provided through role assumption. Centralization of users can be accomplished through federation with an external identity provider or through the use of AWS Organizations. AWS IAM Identity Center (formerly AWS SSO) is the recommended approach for centralized user management in AWS Organizations. + +## Rationale + +Centralizing IAM user management to a single identity store reduces complexity and the likelihood of access management errors. Using AWS IAM Identity Center further simplifies access management and reduces reliance on legacy per-account federation configurations. + +## Impact + +Managing IAM users independently across multiple accounts increases the risk of inconsistent access controls, orphaned accounts, and excessive permissions. + +## Audit Procedure + +### Using AWS Console + +For multi-account AWS environments with an external identity provider: + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam +2. Click `Identity providers` +3. Verify that federation is configured appropriately + +For environments using AWS IAM Identity Center (recommended): + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam +2. Navigate to `IAM Identity Center` +3. Verify that IAM Identity Center is enabled +4. Confirm that users and groups are centrally managed +5. Confirm that access is assigned to accounts through IAM Identity Center + +For multi-account environments without centralized identity management: + +1. Identify accounts that should not contain local IAM users +2. Sign in to the AWS Management Console +3. Switch role into each identified account +4. Navigate to the IAM console +5. Select Users +6. Confirm that no IAM users representing individuals are present + +## Expected Result + +Multi-account environments should have centralized identity management through either AWS IAM Identity Center or an external identity provider with federation. No local IAM users representing individuals should exist in member accounts (except for service accounts where required). + +## Remediation + +The remediation procedure will vary based on the organization's implementation of identity federation and or AWS Organizations. + +Ensure the following: + +1. IAM users are centrally managed through a single identity provider +2. Local IAM users are removed from member accounts, except for service accounts where required +3. Access to accounts is granted through role assumption +4. Where possible, migrate to AWS IAM Identity Center for centralized access management +5. Avoid legacy per-account federation configurations + +## Default Value + +By default, AWS accounts are created and managed independently. IAM users are local to each account unless centralized management is explicitly configured. IAM Identity Center must be enabled to provide centralized access management. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management - Centralize account management through a directory or identity service. | | x | x | +| v7 | 16.2 Configure Centralized Point of Authentication - Configure access for all accounts through as few centralized points of authentication as possible, including network, security, and cloud systems. | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------- | ----------- | +| T1078.004 | TA0001, TA0004 | M1018 | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.2/SKILL.md new file mode 100644 index 0000000000..1390513f4e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.2/SKILL.md @@ -0,0 +1,119 @@ +--- +name: cis-aws-foundations-2.2 +description: "Maintain current AWS account contact details" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, account, contact-details, billing] +cis_id: "2.2" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.3] +prerequisites: [] +severity_boost: {} +--- + +# Maintain current AWS account contact details + +## Description + +Ensure contact email and telephone details for AWS accounts are current and mapped to more than one individual in your organization. + +An AWS account supports a number of contact details, and AWS will use these to contact the account owner if activity judged to be in breach of the Acceptable Use Policy or indicative of a likely security compromise is observed by the AWS Abuse team. Contact details should not be associated with a single individual, as circumstances may arise where that individual is unavailable. Email contact details should point to a mail alias that forwards messages to multiple individuals within the organization; where feasible, phone contact details should point to a PABX hunt group or other call-forwarding system. In AWS Organizations environments, this applies to all member accounts, not just the management account. + +## Rationale + +If an AWS account is observed to be behaving in a prohibited or suspicious manner, AWS will attempt to contact the account owner by email and phone using the listed contact details. If this is unsuccessful and the account behavior requires urgent mitigation, proactive measures may be taken, including throttling traffic between the account exhibiting suspicious behavior and AWS API endpoints or the Internet. This may result in impaired service to and from the affected account. Therefore, it is in both the customer's and AWS's best interests to ensure that prompt contact can be established. This is best achieved by configuring AWS account contact details to point to resources that reach multiple individuals, such as email aliases and PABX hunt groups. + +## Impact + +Outdated contact details may delay incident response and lead to service disruption. + +## Audit Procedure + +### Using AWS Console + +This activity can only be performed via the AWS Console, with a user who has permission to read and write Billing information (aws-portal:\*Billing). + +1. Sign in to the AWS Management Console and open the `Billing and Cost Management` console at https://console.aws.amazon.com/billing/home#/. +2. On the navigation bar, choose your account name, and then choose `Account`. +3. Under `Contact Information`, review and verify the current details. + +### Using AWS CLI + +1. Run the following command: + +```bash +aws account get-contact-information +``` + +Expected output format: + +```json +{ + "AddressLine1": "", + "AddressLine2": "", + "City": "", + "CompanyName": "", + "CountryCode": "", + "FullName": "", + "PhoneNumber": "", + "PostalCode": "", + "StateOrRegion": "" +} +``` + +## Expected Result + +Contact information is current, accurate, and mapped to shared resources (email aliases, group phone numbers) rather than a single individual. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the `Billing and Cost Management` console at https://console.aws.amazon.com/billing/home#/. +2. On the navigation bar, choose your account name, and then choose `Account`. +3. On the `Account Settings` page, next to `Account Settings`, choose `Edit`. +4. Next to the field that you need to update, choose `Edit`. +5. After you have entered your changes, choose `Save changes`. +6. After you have made your changes, choose `Done`. +7. To edit your contact information, under `Contact Information`, choose `Edit`. +8. For the fields that you want to change, type your updated information, and then choose `Update`. + +### Using AWS CLI + +Run the following command: + +```bash +aws account get-contact-information '{ + "AddressLine1": "", + "AddressLine2": "", + "City": "", + "CompanyName": "", + "CountryCode": "", + "FullName": "", + "PhoneNumber": "", + "PostalCode": "", + "StateOrRegion": "" +}' +``` + +## Default Value + +By default, AWS account contact information (email and telephone) is set to the values provided at account creation. These usually reference a single individual rather than a shared alias or group contact. In AWS Organizations environments, this may vary across accounts unless centrally managed or periodically reviewed. + +## References + +1. https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-account-settings.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 17.2 Establish and Maintain Contact Information for Reporting Security Incidents | x | x | x | +| v7 | 19.3 Designate Management Personnel to Support Incident Handling | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.20/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.20/SKILL.md new file mode 100644 index 0000000000..9e3852fa2e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.20/SKILL.md @@ -0,0 +1,127 @@ +--- +name: cis-aws-foundations-2.20 +description: "Ensure access to AWSCloudShellFullAccess is restricted" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, cloudshell, data-exfiltration, least-privilege, policies] +cis_id: "2.20" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.14, cis-aws-foundations-2.13] +prerequisites: [] +severity_boost: {} +--- + +# Ensure access to AWSCloudShellFullAccess is restricted + +## Description + +AWS CloudShell is a convenient way of running CLI commands against AWS services. The managed IAM policy `AWSCloudShellFullAccess` provides full access to CloudShell, including file upload and download capability between a user's local system and the CloudShell environment. Within the CloudShell environment, a user has sudo permissions and can access the internet. It is therefore possible to install software and transfer data to external systems. + +## Rationale + +Access to this policy should be restricted, as it presents a potential channel for data exfiltration by privileged users. AWS documentation provides guidance on creating more restrictive policies that limit file transfer capabilities. + +## Impact + +Unrestricted access to CloudShell may allow users to transfer data outside the AWS environment, increasing the risk of data exfiltration and loss of sensitive information. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam +2. In the left pane, select `Policies` +3. Search for and select `AWSCloudShellFullAccess` +4. Select the `Entities attached` tab +5. Ensure that no users, groups, or roles are attached + +### Using AWS CLI + +1. Run the following command: + +```bash +aws iam list-entities-for-policy --policy-arn arn:aws:iam::aws:policy/AWSCloudShellFullAccess +``` + +2. In the output, ensure the following are empty: + +- PolicyUsers +- PolicyRoles +- PolicyGroups + +Example: + +``` +PolicyRoles: [ ] +``` + +## Expected Result + +The `AWSCloudShellFullAccess` policy should not be attached to any users, groups, or roles. All three lists (`PolicyUsers`, `PolicyRoles`, `PolicyGroups`) should be empty. + +## Remediation + +### Using AWS Console + +1. Open the IAM console at https://console.aws.amazon.com/iam/ +2. In the left pane, select `Policies` +3. Search for and select `AWSCloudShellFullAccess` +4. Select the `Entities attached` tab +5. For each attached entity: + +- Select the entity +- Choose Detach + +### Using AWS CLI + +From Command Line (optional automation): + +```bash +POLICY_ARN="arn:aws:iam::aws:policy/AWSCloudShellFullAccess" + +# Detach from users +for u in $(aws iam list-entities-for-policy --policy-arn "$POLICY_ARN" --query "PolicyUsers[].UserName" --output text); do + echo "Detaching from user: $u" + aws iam detach-user-policy --user-name "$u" --policy-arn "$POLICY_ARN" +done + +# Detach from roles +for r in $(aws iam list-entities-for-policy --policy-arn "$POLICY_ARN" --query "PolicyRoles[].RoleName" --output text); do + echo "Detaching from role: $r" + aws iam detach-role-policy --role-name "$r" --policy-arn "$POLICY_ARN" +done + +# Detach from groups +for g in $(aws iam list-entities-for-policy --policy-arn "$POLICY_ARN" --query "PolicyGroups[].GroupName" --output text); do + echo "Detaching from group: $g" + aws iam detach-group-policy --group-name "$g" --policy-arn "$POLICY_ARN" +done +``` + +## Default Value + +By default, the AWS managed policy `AWSCloudShellFullAccess` exists but is not attached to any users, groups, or roles. It must be explicitly assigned to grant permissions. + +## References + +1. https://docs.aws.amazon.com/cloudshell/latest/userguide/sec-auth-with-identities.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.1 Establish an Access Granting Process - Establish and follow a process, preferably automated, for granting access to enterprise assets upon new hire, rights grant, or role change of a user. | x | x | x | +| v7 | 14.1 Segment the Network Based on Sensitivity - Segment the network based on the label or classification level of the information stored on the servers, locate all sensitive information on separated Virtual Local Area Networks (VLANs). | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ---------------------- | ------------------- | +| T1078.004 | TA0009, TA0010, TA0043 | M1018, M1047, M1050 | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.21/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.21/SKILL.md new file mode 100644 index 0000000000..42cf58eb3a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.21/SKILL.md @@ -0,0 +1,195 @@ +--- +name: cis-aws-foundations-2.21 +description: 'Ensure AWS resource policies do not allow unrestricted access using "Principal": "*"' +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, resource-policies, principal-wildcard, s3, sqs, sns, lambda, least-privilege] +cis_id: "2.21" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.14, cis-aws-foundations-2.18] +prerequisites: [] +severity_boost: {} +--- + +# Ensure AWS resource policies do not allow unrestricted access using "Principal": "\*" + +## Description + +Ensure AWS resource-based policies, such as Amazon S3 bucket policies, Amazon SQS queue policies, Amazon SNS topic policies, and AWS Lambda resource policies, do not grant unrestricted access using `"Principal": "*"` with `"Effect": "Allow"` unless the policy includes restrictive conditions that limit access to specific trusted identities, accounts, services, or network boundaries. + +## Rationale + +Resource-based policies are evaluated alongside identity-based IAM policies during authorization decisions. When a policy statement specifies `"Principal": "*"` with `"Effect": "Allow"`, it grants the specified permissions to any AWS principal unless additional conditions restrict the request. This may unintentionally allow access from users, roles, or services in any AWS account. Such broad access significantly increases the risk of unauthorized data access, resource abuse, or data exfiltration. + +## Impact + +Unrestricted resource-based policies may expose data or services to unauthorized access, potentially leading to data breaches, service misuse, or unintended public exposure. + +## Audit Procedure + +1. Identify resources that support resource-based policies within the AWS account, such as S3 buckets, SQS queues, SNS topics, and Lambda functions +2. Retrieve the resource policies for each resource. Example CLI commands: + +### SQS Queue Policies + +```bash +aws sqs get-queue-attributes \ + --queue-url https://sqs.region.amazonaws.com/account/QUEUE \ + --attribute-names Policy +``` + +### S3 Bucket Policies + +```bash +aws s3api get-bucket-policy \ + --bucket YOUR-BUCKET-NAME +``` + +### SNS Topic Policies + +```bash +aws sns get-topic-attributes \ + --topic-arn TOPIC-ARN \ + --query "Attributes.Policy" \ + --output text +``` + +3. Inspect the retrieved policies and identify statements containing: + +- `"Effect": "Allow"` AND `"Principal": "*"` + + OR + +- `"Principal": {"AWS": "*"}` + +4. Evaluate whether the statement includes restrictive conditions such as: + +- `aws:SourceArn` +- `aws:SourceAccount` +- `aws:PrincipalArn` +- Other service-specific condition keys + +5. Determine audit status: + +- **Compliant:** Wildcard principals are present only when restrictive conditions limit access to trusted principals or services +- **Non-Compliant:** Wildcard principals are used without sufficient restrictions + +## Expected Result + +All resource-based policies that use `"Principal": "*"` should include restrictive conditions (such as `aws:SourceArn`, `aws:SourceAccount`, or `aws:PrincipalArn`) that limit access to specific trusted entities. Policies without such conditions are non-compliant. + +## Remediation + +If a resource policy contains `"Principal": "*"` with `"Effect": "Allow"` and lacks sufficient restrictions, modify the policy to limit access. + +### OPTION 1 - Restrict the Principal + +Replace the wildcard principal (`"Principal": "*"`) with a specific account, role, user, or service. + +Example: Non-Compliant Policy + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "AllowPublicAccess", + "Effect": "Allow", + "Principal": "*", + "Action": "sqs:SendMessage", + "Resource": "arn:aws:sqs:us-east-1:123456789012:my-queue" + } + ] +} +``` + +Steps: + +1. Retrieve the current policy: + +```bash +aws sqs get-queue-attributes \ + --queue-url https://sqs.us-east-1.amazonaws.com/123456789012/my-queue \ + --attribute-names Policy \ + --query 'Attributes.Policy' +``` + +2. Update the policy with a specific principal: + +```bash +aws sqs set-queue-attributes \ + --queue-url https://sqs.us-east-1.amazonaws.com/123456789012/my-queue \ + --attributes '{ + "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"AllowSpecificAccount\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::345678901234:root\"},\"Action\":\"sqs:SendMessage\",\"Resource\":\"arn:aws:sqs:us-east-1:123456789012:my-queue\"}]}" + }' +``` + +Resulting Compliant Policy: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "AllowSpecificAccount", + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::345678901234:root" + }, + "Action": "sqs:SendMessage", + "Resource": "arn:aws:sqs:us-east-1:123456789012:my-queue" + } + ] +} +``` + +### OPTION 2 - Restrict Using Conditions + +If a wildcard principal is required, add restrictive conditions. + +Example compliant policy: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "AllowServiceIntegration", + "Effect": "Allow", + "Principal": "*", + "Action": "sqs:SendMessage", + "Resource": "arn:aws:sqs:us-east-1:123456789012:my-queue", + "Condition": { + "StringEquals": { + "aws:SourceAccount": "345678901234" + } + } + } + ] +} +``` + +## Default Value + +By default, AWS does not prevent the use of `"Principal": "*"` in resource-based policies. Policies may allow unrestricted access unless explicitly restricted through policy definitions or organizational controls. It is the responsibility of the customer to ensure that resource policies are properly scoped and do not grant unintended public or cross-account access. + +## References + +- AWS IAM Policy Evaluation Logic +- AWS S3 Bucket Policy Documentation +- AWS SQS Queue Policy Documentation +- AWS SNS Topic Policy Documentation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v8 | 6.8 Define and Maintain Role-Based Access Control - Define and maintain role-based access control, through determining and documenting the access rights necessary for each role within the enterprise to successfully carry out its assigned duties. Perform access control reviews of enterprise assets to validate that all privileges are authorized, on a recurring schedule at a minimum annually, or more frequently. | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.3/SKILL.md new file mode 100644 index 0000000000..82e3b756c7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.3/SKILL.md @@ -0,0 +1,92 @@ +--- +name: cis-aws-foundations-2.3 +description: "Ensure security contact information is registered" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, account, security-contact, alternate-contact] +cis_id: "2.3" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure security contact information is registered + +## Description + +AWS provides customers with the option to specify contact information for the account's security team. It is recommended that this information be configured. In AWS Organizations environments, this applies to all member accounts. + +## Rationale + +Specifying security-specific contact information helps ensure that security advisories sent by AWS reach the team within your organization that is best equipped to respond to them. + +## Impact + +Missing or incorrect security contact information may delay response to AWS security notifications, increasing the risk of prolonged exposure to security threats. + +## Audit Procedure + +### Using AWS Console + +1. Click on your account name at the top right corner of the console. +2. From the drop-down menu, Click `Account`. +3. Scroll down to the `Alternate Contacts` section. +4. Ensure contact information is specified in the `Security contact` section. + +### Using AWS CLI + +1. Run the following command: + +```bash +aws account put-alternate-contact --alternate-contact-type SECURITY --email-address "" --name "" --phone-number "" +``` + +2. Ensure proper contact information is specified for the `Security` contact. + +## Expected Result + +Security contact information is configured with valid email, name, and phone number for the security team. The email should ideally be a distribution list monitored by more than one individual. + +## Remediation + +### Using AWS Console + +1. Click on your account name at the top right corner of the console. +2. From the drop-down menu click `My Account`. +3. Scroll down to the `Alternate Contacts` section. +4. Enter contact information in the `Security` section. + +### Using AWS CLI + +Run the following command with the following input parameters: --email-address, --name, and --phone-number. + +```bash +aws account put-alternate-contact --alternate-contact-type SECURITY --email-address "" --name "" --phone-number "" +``` + +**Note:** Consider specifying an internal email distribution list to ensure emails are regularly monitored by more than one individual. + +## Default Value + +By default, no alternate security contact information is configured for an AWS account. If not specified, only the primary account contact provided at account creation will be used. In AWS Organizations environments, this may vary across accounts unless centrally managed or periodically reviewed. + +## References + +1. CCE-79200-2 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 17.2 Establish and Maintain Contact Information for Reporting Security Incidents | x | x | x | +| v8 | 17.6 Define Mechanisms for Communicating During Incident Response | | x | x | +| v7 | 19 Incident Response and Management | | | | +| v7 | 19.2 Assign Job Titles and Duties for Incident Response | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.4/SKILL.md new file mode 100644 index 0000000000..cca99c15ed --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.4/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-aws-foundations-2.4 +description: "Ensure no 'root' user account access key exists" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, root, access-key, credentials] +cis_id: "2.4" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.5, cis-aws-foundations-2.6, cis-aws-foundations-2.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure no 'root' user account access key exists + +## Description + +The 'root' user account is the most privileged user in an AWS account. AWS access keys provide programmatic access to a given AWS account. It is recommended that all access keys associated with the 'root' user account be deleted. + +## Rationale + +Deleting access keys associated with the 'root' user account limits the vectors by which the account can be compromised. Additionally, removing 'root' access keys encourages the use of role-based access with least privilege. + +## Impact + +Root access keys significantly increase the risk of account compromise, as they provide unrestricted programmatic access with no built-in scope limitations. + +## Audit Procedure + +### Using AWS Console + +1. Login to the IAM Management Console (https://console.aws.amazon.com/iam). +2. Click on `Credential Report`. +3. Download the `.csv` file which contains credential usage for all IAM users within an AWS Account. +4. Open the file. +5. For the `root` user, ensure the `access_key_1_active` and `access_key_2_active` fields are set to `FALSE`. + +### Using AWS CLI + +1. Run the following command: + +```bash +aws iam get-account-summary | grep "AccountAccessKeysPresent" +``` + +2. If no 'root' access keys exist the output will show `"AccountAccessKeysPresent": 0,` +3. If the output shows a "1", then 'root' keys exist and should be deleted. + +## Expected Result + +`"AccountAccessKeysPresent": 0` -- no root access keys exist. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console as 'root' and open the IAM console at https://console.aws.amazon.com/iam/. +2. Click on `` at the top right and select `Security Credentials` from the drop down list. +3. Click on `Access Keys` (Access Key ID and Secret Access Key). +4. If there are active keys: + - Deactivate the key under `Status`. + - Click `Delete` (Deleted keys cannot be recovered). + +**Note:** While a key can be made inactive, it will still appear in CLI audit output and may result in a false positive. Keys should be deleted to ensure compliance. + +### Using AWS CLI + +There is no AWS CLI command to delete root access keys. This must be done via the AWS Console. + +## Default Value + +By default, the AWS root user has no access keys created. Access keys are only present if they have been explicitly generated by the account owner. + +## References + +1. http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html +2. http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html +3. http://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountSummary.html +4. CCE-78910-7 +5. https://aws.amazon.com/blogs/security/an-easier-way-to-determine-the-presence-of-aws-account-access-keys/ + +## Additional Information + +- In AWS GovCloud environments, root access is linked to the associated standard AWS account and should be restricted and monitored in the same manner as commercial AWS accounts. +- Implement regular checks and alerts for any creation or use of root credentials, including access keys and console logins, to promptly detect and respond to unauthorized or accidental activity. +- CloudTrail must be enabled and configured to capture activity across all regions and accounts (using a multi-region or organization trail) to ensure all root account activity is logged and monitored. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------- | ----------- | +| T1078.004 | TA0001, TA0004 | M1026 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.5/SKILL.md new file mode 100644 index 0000000000..3e6795bdfb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.5/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-aws-foundations-2.5 +description: "Ensure MFA is enabled for the 'root' user account" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, root, mfa, authentication] +cis_id: "2.5" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.4, cis-aws-foundations-2.6, cis-aws-foundations-2.7, cis-aws-foundations-2.10] +prerequisites: [] +severity_boost: {} +--- + +# Ensure MFA is enabled for the 'root' user account + +## Description + +The 'root' user account is the most privileged user in an AWS account. Multi-Factor Authentication (MFA) adds an extra layer of protection on top of a username and password. With MFA enabled, when a user signs in to an AWS website, they are prompted for their username and password as well as an authentication code from their MFA device. + +**Note:** When virtual MFA is used for 'root' accounts, it is recommended that the device used is not a personal device, but rather a dedicated mobile device (tablet or phone) that is kept charged and secured, independent of any individual ("non-personal virtual MFA"). This reduces the risk of losing access to MFA due to device loss, device replacement, or employee turnover. + +Where an AWS Organization is using centralized root access, root credentials can be removed from member accounts. In that case, it is neither possible nor necessary to configure root MFA in the member account. + +## Rationale + +Enabling MFA increases security for console access by requiring the authenticating principal to possess a device that generates a time-sensitive authentication code, in addition to their credentials. + +## Impact + +Without MFA, the root account is highly susceptible to compromise, potentially resulting in full account takeover and unrestricted access to all resources. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam. +2. Click on `Credential Report`. +3. Download the `.csv` file containing credential usage for all IAM users within an AWS Account. +4. Open this file. +5. For the `root` user, ensure: + - `mfa_active` is set to `TRUE`, or + - `password_enabled` is set to `FALSE` + +### Using AWS CLI + +1. Run the following command: + +```bash +aws iam get-account-summary | grep "AccountMFAEnabled" +aws iam get-account-summary | grep "AccountPasswordPresent" +``` + +2. Ensure: + - `AccountMFAEnabled` property is set to 1, or + - `AccountPasswordPresent` property is set to 0 + +## Expected Result + +`AccountMFAEnabled` is set to `1` (MFA enabled) or `AccountPasswordPresent` is set to `0` (console access removed). + +## Remediation + +**Note:** To manage MFA devices for the 'root' AWS account, you must use root credentials. MFA cannot be managed for the root account using IAM users or roles. + +### Using AWS Console + +1. Sign in to the AWS Management Console using the root user email. +2. In the top right corner, click the account name. +3. Choose `Security Credentials`. +4. Under `Multi-Factor authentication (MFA)`, locate the root user. +5. Choose `Assign MFA device` (or Activate MFA, depending on UI version). +6. Select `Virtual MFA device`. +7. Choose one of the following: + - Scan the QR code using your MFA app, or + - Select Show secret key for manual configuration and enter it into your MFA app. +8. Enter the first authentication code in Authentication Code 1. +9. Wait for a new code, then enter it in Authentication Code 2. +10. Click `Assign Virtual MFA`. + +## Default Value + +By default, the AWS root user does not have Multi-Factor Authentication (MFA) enabled. MFA must be explicitly configured after account creation. + +## References + +1. CCE-78911-5 +2. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#id_root-user_manage_mfa +3. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_virtual.html#enable-virt-mfa-for-root +4. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html + +## Additional Information + +- In AWS GovCloud environments, root access is linked to the associated standard AWS account and should be restricted and monitored in the same manner as commercial AWS accounts. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.5 Require MFA for Administrative Access | x | x | x | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------- | ----------- | +| T1078.004 | TA0001, TA0004 | M1032 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.6/SKILL.md new file mode 100644 index 0000000000..2c0cb99f06 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.6/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-aws-foundations-2.6 +description: "Ensure hardware MFA is enabled for the 'root' user account" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, root, mfa, hardware-mfa, authentication] +cis_id: "2.6" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.4, cis-aws-foundations-2.5, cis-aws-foundations-2.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure hardware MFA is enabled for the 'root' user account + +## Description + +The 'root' user account is the most privileged user in an AWS account. MFA adds an extra layer of protection on top of a username and password. With MFA enabled, when a user signs in to an AWS website, they are prompted for their username and password as well as an authentication code from their MFA device. For Level 2, it is recommended that the 'root' user account be protected with a hardware MFA device. + +Where an AWS Organization is using centralized root access, root credentials can be removed from member accounts. In that case, it is neither possible nor necessary to configure root MFA in the member account. + +## Rationale + +A hardware MFA device has a smaller attack surface than a virtual MFA. For example, a hardware MFA device does not inherit the risks associated with mobile devices on which virtual MFA applications reside. + +**Note:** Using hardware MFA for numerous AWS accounts may create logistical device management challenges. In such cases, consider applying this Level 2 recommendation selectively to the highest-security AWS accounts, while applying the Level 1 recommendation to others. + +## Impact + +Without hardware MFA, root account protection may be more susceptible to compromise compared to hardware-based authentication, increasing the risk of unauthorized access. + +## Audit Procedure + +### Using AWS CLI + +1. Run the following commands to determine if the 'root' account has MFA enabled: + +```bash +aws iam get-account-summary | grep "AccountMFAEnabled" +aws iam get-account-summary | grep "AccountPasswordPresent" +``` + +2. Verify: + - `AccountMFAEnabled` is set to `1` (MFA enabled) + - `AccountPasswordPresent` is set to `1` (console access exists) or `0` (console access removed) + +3. If `AccountMFAEnabled` is set to `1` (MFA enabled), determine whether the MFA device is hardware: + +```bash +aws iam list-virtual-mfa-devices +``` + +4. If the output contains a serial number similar to: + +``` +"SerialNumber": "arn:aws:iam:::mfa/root-account-mfa-device" +``` + +then the MFA device is virtual, not hardware, and the account is **not compliant** with this recommendation. + +## Expected Result + +MFA is enabled for the root account and the MFA device is hardware-based (not listed in `list-virtual-mfa-devices` output). + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console using the root account. +2. Click on at the top right and select `Security Credentials` from the drop-down list. +3. Under `Multi-Factor Authentication (MFA)`, locate the root user. +4. If a virtual MFA device is already assigned, remove it before proceeding. +5. Click `Assign MFA device` (or `Manage MFA`, depending on UI version). +6. Select `Security key` or `hardware MFA device`. +7. Enter the required device details (e.g., serial number or follow prompts for security key). +8. Enter authentication codes if required. +9. Click `Assign MFA`. + +## Default Value + +By default, the AWS root user does not have a hardware MFA device assigned. MFA must be explicitly configured, and if enabled by default it will be virtual (software-based), not hardware. + +## References + +1. CCE-78911-5 +2. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_virtual.html +3. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_physical.html#enable-hw-mfa-for-root +4. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html +5. https://docs.aws.amazon.com/IAM/latest/UserGuide/enable-virt-mfa-for-root.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.5 Require MFA for Administrative Access | x | x | x | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1078.004 | TA0004 | M1032 | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.7/SKILL.md new file mode 100644 index 0000000000..6208e924f1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.7/SKILL.md @@ -0,0 +1,120 @@ +--- +name: cis-aws-foundations-2.7 +description: "Eliminate use of the 'root' user for administrative and daily tasks" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, root, least-privilege, credential-management] +cis_id: "2.7" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.4, cis-aws-foundations-2.5, cis-aws-foundations-2.6] +prerequisites: [] +severity_boost: {} +--- + +# Eliminate use of the 'root' user for administrative and daily tasks + +## Description + +With the creation of an AWS account, a 'root user' is created that cannot be disabled or deleted. This user has unrestricted access to and control over all resources in the AWS account. It is highly recommended that the use of this account be avoided for everyday tasks. + +## Rationale + +The 'root user' has unrestricted access to and control over all account resources. Use of this account is inconsistent with the principles of least privilege and separation of duties and can lead to unnecessary harm due to user error or account compromise. + +## Impact + +Use of the root account for routine activities increases the risk of accidental or unauthorized changes, potentially resulting in full account compromise. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam. +2. In the left pane, click `Credential Report`. +3. Select `Download Report`. +4. Open or Save the file locally. +5. Locate the `root` user under the user column. +6. Review: + - `password_last_used` + - `access_key_1_last_used_date` + - `access_key_2_last_used_date` +7. Determine whether recent usage indicates frequent or inappropriate use of the root account. +8. Ensure the `mfa_active` field is set to `TRUE` or the `password_enabled` field is set to `FALSE`. + +### Using AWS CLI + +1. Run the following CLI commands to provide a credential report for determining the last time the 'root user' was used: + +```bash +aws iam generate-credential-report +aws iam get-credential-report --query 'Content' --output text | base64 -d | cut -d, -f1,5,11,16 | grep -B1 '' +``` + +2. Review: + - `password_last_used` + - `access_key_1_last_used_date` + - `access_key_2_last_used_date` +3. Determine when the root user was last used. + +**Note:** There are limited scenarios where use of the 'root' user is required. Refer to AWS documentation for a complete list. + +## Expected Result + +The root user should show no recent usage for administrative or daily tasks. `password_last_used`, `access_key_1_last_used_date`, and `access_key_2_last_used_date` should indicate infrequent or no recent use. + +## Remediation + +If the 'root' user account is being used for daily activities or administrative tasks that do not require root access: + +### Using AWS Console + +1. Stop using the root account for routine operations. +2. Create and use IAM roles or users with least privilege instead. +3. Change the root user password. +4. Deactivate or delete any access keys associated with the root user. + +### Using AWS CLI + +1. Run the following command as the root user in the account to delete the root login profile: + +```bash +aws iam delete-login-profile +``` + +This removes the password associated with the root account and prevents console authentication using the root user. + +## Default Value + +By default, the AWS root user is created with full administrative privileges and no restrictions. The root account remains permanently enabled and can perform all actions unless access is limited through IAM users and roles. + +## References + +1. https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html +2. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html +3. https://docs.aws.amazon.com/general/latest/gr/aws_tasks-that-require-root.html + +## Additional Information + +- In AWS GovCloud environments, root access is linked to the associated standard AWS account and should be restricted and monitored in the same manner as commercial AWS accounts. +- Monitor root account usage using logging and alerting (e.g., CloudTrail and alerts for root activity). +- Monitoring usage of the 'root' user can be accomplished by implementing recommendation 3.3 - Ensure a log metric filter and alarm exist for usage of the 'root' user. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------- | ----------- | +| T1078.004 | TA0001, TA0004 | M1036 | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.8/SKILL.md new file mode 100644 index 0000000000..61d23d6d0f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.8/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-aws-foundations-2.8 +description: "Ensure IAM password policy requires minimum length of 14 or greater" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, password-policy, minimum-length, brute-force] +cis_id: "2.8" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure IAM password policy requires minimum length of 14 or greater + +## Description + +Password policies are used, in part, to enforce password complexity requirements. IAM password policies can ensure that passwords meet a minimum length. It is recommended that the password policy require a minimum password length of 14 characters. + +## Rationale + +Setting a password policy with sufficient length requirements increases account resilience against brute force login attempts. + +## Impact + +Enforcing a minimum password length of 14 characters enhances security by making passwords more resistant to brute force attacks. However, it may require users to create longer passwords, which could impact user convenience. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam. +2. Select `Account Settings` on the left Pane. +3. Located the 'Password Policy' section. +4. Ensure "Minimum password length" is set to 14 or greater. + +### Using AWS CLI + +1. Run the following command: + +```bash +aws iam get-account-password-policy +``` + +2. Ensure the output includes: + +```json +"MinimumPasswordLength": 14 +``` + +(or higher) + +## Expected Result + +The IAM password policy has `MinimumPasswordLength` set to `14` or greater. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console (with appropriate permissions to View Identity Access Management Account Settings). +2. Go to IAM Service. +3. Select `Account Settings` on the Left Pane. +4. Set "Minimum password length" to `14` or greater. +5. Select "Apply password policy". + +### Using AWS CLI + +1. Run the following command: + +```bash +aws iam update-account-password-policy --minimum-password-length 14 +``` + +**Note:** All commands starting with "aws iam update-account-password-policy" can be combined into a single command. + +## Additional Information + +Ensure the password policy also includes requirements for password complexity, such as uppercase letters, lowercase letters, numbers, and special characters: + +```bash +aws iam update-account-password-policy \ + --require-uppercase-characters \ + --require-lowercase-characters \ + --require-numbers \ + --require-symbols +``` + +## Default Value + +By default, the AWS IAM account password policy does not enforce a minimum password length. If configured, the default minimum length is 6 characters. + +## References + +1. CCE-78907-3 +2. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_account-policy.html +3. https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#configure-strong-password-policy + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.2 Use Unique Passwords | x | x | x | +| v7 | 16.1 Maintain an Inventory of Authentication Systems | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ---------------------- | ----------- | +| T1078.004 | TA0001, TA0007, TA0043 | M1027 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.9/SKILL.md new file mode 100644 index 0000000000..80f44625dd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-2.9/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-aws-foundations-2.9 +description: "Ensure IAM password policy prevents password reuse" +category: cis-iam +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, iam, password-policy, password-reuse, credential-management] +cis_id: "2.9" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-2.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure IAM password policy prevents password reuse + +## Description + +IAM password policies can prevent the reuse of passwords by the same user. It is recommended that the password policy be configured to prevent password reuse. + +## Rationale + +Preventing password reuse increases account resilience against brute force and credential reuse attacks. + +## Impact + +Allowing password reuse increases the risk of account compromise, particularly if previously exposed or weak passwords are reused. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam. +2. Click on `Account Settings` on the left Pane. +3. Ensure `Prevent password reuse` is checked. +4. Ensure `Remember XX password(s)` is set appropriately (e.g., 24 or greater). + +### Using AWS CLI + +1. Run the following command: + +```bash +aws iam get-account-password-policy +``` + +2. Ensure the output includes: + +```json +"PasswordReusePrevention": 24 +``` + +## Expected Result + +The IAM password policy has `PasswordReusePrevention` set to `24` or greater. + +## Remediation + +### Using AWS Console + +1. Login to AWS Console (with appropriate permissions to View Identity Access Management Account Settings). +2. Go to `IAM Service`. +3. Select `Account Settings` on the left Pane. +4. Check `Prevent password reuse`. +5. Set `Remember XX password(s)` to **24 or greater**. + +### Using AWS CLI + +1. Run the following command: + +```bash +aws iam update-account-password-policy --password-reuse-prevention 24 +``` + +**Note:** All commands starting with "aws iam update-account-password-policy" can be combined into a single command. + +## Default Value + +By default, the AWS IAM password policy does not prevent password reuse. No password history is maintained unless explicitly configured. + +## References + +1. CCE-78908-1 +2. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_account-policy.html +3. https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#configure-strong-password-policy + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------ | ---- | ---- | ---- | +| v8 | 5.2 Use Unique Passwords | x | x | x | +| v7 | 4.4 Use Unique Passwords | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ---------------------- | ----------- | +| T1078.004 | TA0001, TA0007, TA0043 | M1027 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.1/SKILL.md new file mode 100644 index 0000000000..15f452aa9d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.1/SKILL.md @@ -0,0 +1,245 @@ +--- +name: cis-aws-foundations-3.1.1 +description: "Ensure S3 Bucket Policy is set to deny HTTP requests" +category: cis-storage +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, s3, encryption, tls, https, bucket-policy] +cis_id: "3.1.1" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-3.1.2, cis-aws-foundations-3.1.3, cis-aws-foundations-3.1.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure S3 Bucket Policy is set to deny HTTP requests + +## Description + +At the Amazon S3 bucket level, permissions can be configured through a bucket policy to ensure objects are accessible only through HTTPS. + +## Rationale + +By default, Amazon S3 allows both HTTP and HTTPS requests. To ensure that access to S3 objects is only permitted through HTTPS, you must explicitly deny HTTP requests. Bucket policies that allow HTTPS requests without explicitly denying HTTP requests do not meet this requirement. + +## Impact + +If HTTP access is not explicitly denied, data transmitted to and from S3 buckets may be exposed to interception or man-in-the-middle attacks. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/ +2. Select the target bucket +3. Select the 'Permissions' tab +4. Select `Bucket policy` +5. Ensure a policy exists that explicitly denies HTTP requests using one of the following conditions: + +**Option 1: Deny non-HTTPS requests** + +```json +{ + "Sid": "", + "Effect": "Deny", + "Principal": "*", + "Action": "s3:*", + "Resource": "arn:aws:s3:::/*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + } +} +``` + +**Option 2: Enforce minimum TLS version** + +```json +{ + "Sid": "", + "Effect": "Deny", + "Principal": "*", + "Action": "s3:*", + "Resource": ["arn:aws:s3:::", "arn:aws:s3:::/*"], + "Condition": { + "NumericLessThan": { + "s3:TlsVersion": "1.2" + } + } +} +``` + +6. Repeat for all S3 buckets + +### Using AWS CLI + +1. List all of the S3 Buckets: + +```bash +aws s3 ls +``` + +2. For each bucket, run: + +```bash +aws s3api get-bucket-policy --bucket | grep aws:SecureTransport +``` + +or + +```bash +aws s3api get-bucket-policy --bucket | grep s3:TlsVersion +``` + +3. Verify the policy includes either: + - `"aws:SecureTransport": "false"` with `"Effect": "Deny"` + - or a TLS version restriction using `"s3:TlsVersion"` + +4. If no policy is returned, the bucket allows both HTTP and HTTPS requests by default + +## Expected Result + +Each S3 bucket should have a bucket policy that explicitly denies HTTP requests either by using the `aws:SecureTransport` condition set to `false` with a `Deny` effect, or by enforcing a minimum TLS version using the `s3:TlsVersion` condition. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the Amazon S3 console +2. Select the bucket +3. Select the `Permissions` tab +4. Select `Bucket policy` +5. Add one of the following statements to the policy + +**Deny HTTP requests:** + +```json +{ + "Sid": "", + "Effect": "Deny", + "Principal": "*", + "Action": "s3:*", + "Resource": "arn:aws:s3:::/*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + } +} +``` + +**Enforce TLS version:** + +```json +{ + "Sid": "", + "Effect": "Deny", + "Principal": "*", + "Action": "s3:*", + "Resource": ["arn:aws:s3:::", "arn:aws:s3:::/*"], + "Condition": { + "NumericLessThan": { + "s3:TlsVersion": "1.2" + } + } +} +``` + +6. Save the policy +7. Repeat for all relevant buckets + +**Using AWS Policy Generator:** + +1. Repeat steps 1-4 above +2. Click on `Policy Generator` at the bottom of the Bucket Policy editor +3. Select `S3 Bucket Policy` as the policy type +4. Configure the statement: + - `Effect` = Deny + - `Principal` = \* + - `AWS Service` = Amazon S3 + - `Actions` = \* + - `Amazon Resource Name` = +5. Select `Generate Policy` +6. Copy the generated policy and add it to the bucket policy + +### Using AWS CLI + +1. Export the existing policy, if one exists: + +```bash +aws s3api get-bucket-policy --bucket --query Policy --output text > policy.json +``` + +If the bucket does not already have a policy, create a new `policy.json` file containing a valid bucket policy document. + +2. Modify `policy.json` to include one of the following deny statements within the `Statement` array. + +**Option 1: Deny HTTP requests** + +```json +{ + "Sid": "", + "Effect": "Deny", + "Principal": "*", + "Action": "s3:*", + "Resource": "arn:aws:s3:::/*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + } +} +``` + +**Option 2: Enforce minimum TLS version** + +```json +{ + "Sid": "", + "Effect": "Deny", + "Principal": "*", + "Action": "s3:*", + "Resource": ["arn:aws:s3:::", "arn:aws:s3:::/*"], + "Condition": { + "NumericLessThan": { + "s3:TlsVersion": "1.2" + } + } +} +``` + +3. Apply the modified policy back to the S3 bucket: + +```bash +aws s3api put-bucket-policy --bucket --policy file://policy.json +``` + +## Default Value + +By default, Amazon S3 accepts both HTTP and HTTPS requests. No bucket policy is applied to deny unencrypted (HTTP) access unless explicitly configured. + +## References + +1. https://aws.amazon.com/premiumsupport/knowledge-center/s3-bucket-policy-for-config-rule/ +2. https://aws.amazon.com/blogs/security/how-to-use-bucket-policies-and-apply-defense-in-depth-to-help-secure-your-amazon-s3-data/ +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/get-bucket-policy.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------- | ----------- | +| T1040 | TA0006, TA0007 | M1041 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.2/SKILL.md new file mode 100644 index 0000000000..1f7409aff0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.2/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-aws-foundations-3.1.2 +description: "Ensure MFA Delete is enabled on S3 buckets" +category: cis-storage +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, s3, mfa, delete-protection, versioning] +cis_id: "3.1.2" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-3.1.1, cis-aws-foundations-3.1.3, cis-aws-foundations-3.1.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure MFA Delete is enabled on S3 buckets + +## Description + +Once MFA Delete is enabled on your sensitive and classified S3 bucket, it requires the user to provide two forms of authentication. + +## Rationale + +Adding MFA delete to an S3 bucket requires additional authentication when you change the version state of your bucket or delete an object version, adding another layer of security in the event your security credentials are compromised or unauthorized access is granted. + +## Impact + +Enabling MFA delete on an S3 bucket could require additional administrator oversight. Enabling MFA delete may impact other services that automate the creation and/or deletion of S3 buckets. + +## Audit Procedure + +### Using AWS Console + +1. Login to the S3 console at https://console.aws.amazon.com/s3/. +2. Click the `check` box next to the name of the bucket you want to confirm. +3. In the window under `Properties`: + - Confirm that Versioning is `Enabled` + - Confirm that MFA Delete is `Enabled` + +### Using AWS CLI + +1. Run the `get-bucket-versioning` command: + +```bash +aws s3api get-bucket-versioning --bucket my-bucket | grep MfaDelete +``` + +Example output: + +```xml + + Enabled + Enabled + +``` + +If the console or CLI output does not show that Versioning and MFA Delete are `enabled`, please refer to the remediation below. + +## Expected Result + +Both Versioning and MFA Delete should be `Enabled` for the S3 bucket. The `get-bucket-versioning` command should return `MfaDelete: Enabled`. + +## Remediation + +### Using AWS Console + +You cannot enable MFA Delete using the AWS Management Console; you must use the AWS CLI or API. You must use your 'root' account to enable MFA Delete on S3 buckets. + +### Using AWS CLI + +1. Run the s3api `put-bucket-versioning` command: + +```bash +aws s3api put-bucket-versioning \ + --bucket my-bucket \ + --versioning-configuration Status=Enabled,MFADelete=Enabled \ + --mfa "arn:aws:iam:::mfa/root-account-mfa-device " +``` + +## Default Value + +By default, S3 bucket versioning is disabled, and MFA Delete is not enabled. Both must be explicitly configured, and MFA Delete can only be enabled using the root account via CLI or API. + +## References + +1. https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete +2. https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html +3. https://aws.amazon.com/blogs/security/securing-access-to-aws-using-mfa-part-3/ +4. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_lost-or-broken.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v8 | 6.5 Require MFA for Administrative Access | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1078.004 | TA0040 | M1032 | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.3/SKILL.md new file mode 100644 index 0000000000..62bcd44777 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.3/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-aws-foundations-3.1.3 +description: "Ensure all data in Amazon S3 has been discovered, classified, and secured when necessary" +category: cis-storage +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, s3, macie, data-classification, data-discovery] +cis_id: "3.1.3" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-3.1.1, cis-aws-foundations-3.1.2, cis-aws-foundations-3.1.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure all data in Amazon S3 has been discovered, classified, and secured when necessary + +## Description + +Amazon S3 buckets can contain sensitive data that, for security purposes, should be discovered, monitored, classified, and protected. Macie, along with other third-party tools, can automatically provide an inventory of Amazon S3 buckets. + +## Rationale + +Using a cloud service or third-party software to continuously monitor and automate the process of data discovery and classification for S3 buckets through machine learning and pattern matching is a strong defense in protecting that information. + +Amazon Macie is a fully managed data security and privacy service that uses machine learning and pattern matching to discover and protect your sensitive data in AWS. + +## Impact + +There is a cost associated with using Amazon Macie, and there is typically a cost associated with third-party tools that perform similar processes and provide protection. + +## Audit Procedure + +### Using AWS Console + +1. Login to the Macie console at https://console.aws.amazon.com/macie/. +2. In the left hand pane, click on `By job` under findings. +3. Confirm that you have a job set up for your S3 buckets. + +When you log into the Macie console, if you are not taken to the summary page and do not have a job set up and running, then refer to the remediation procedure below. + +If you are using a third-party tool to manage and protect your S3 data, you meet this recommendation. + +### Using AWS CLI + +No specific CLI audit procedure is provided for this control. Use the console to verify Macie configuration. + +## Expected Result + +Amazon Macie should be enabled and configured with discovery jobs for S3 buckets, or a third-party equivalent tool should be in use for data discovery and classification. + +## Remediation + +### Using AWS Console + +**Enable Amazon Macie:** + +1. Log on to the Macie console at https://console.aws.amazon.com/macie/. +2. Click `Get started`. +3. Click `Enable Macie`. + +**Set up a repository for sensitive data discovery results:** + +1. In the left pane, under Settings, click `Discovery results`. +2. Make sure `Create bucket` is selected. +3. Create a bucket and enter a name for it. The name must be unique across all S3 buckets, and it must start with a lowercase letter or a number. +4. Click `Advanced`. +5. For block all public access, make sure `Yes` is selected. +6. For KMS encryption, specify the AWS KMS key that you want to use to encrypt the results. The key must be a symmetric customer master key (CMK) that is in the same region as the S3 bucket. +7. Click `Save`. + +**Create a job to discover sensitive data:** + +1. In the left pane, click `S3 buckets`. Macie displays a list of all the S3 buckets for your account. +2. Check the box for each bucket that you want Macie to analyze as part of the job. +3. Click `Create job`. +4. Click `Quick create`. +5. For the Name and Description step, enter a name and, optionally, a description of the job. +6. Click `Next`. +7. For the Review and create step, click `Submit`. + +**Review your findings:** + +1. In the left pane, click `Findings`. +2. To view the details of a specific finding, choose any field other than the check box for the finding. + +If you are using a third-party tool to manage and protect your S3 data, follow the vendor documentation for implementing and configuring that tool. + +### Using AWS CLI + +No specific CLI remediation procedure is provided for this control. Use the console to enable and configure Macie. + +## Default Value + +By default, Amazon S3 does not perform data discovery, classification, or monitoring. Services such as Amazon Macie or third-party tools must be explicitly enabled and configured. + +## References + +1. https://aws.amazon.com/macie/getting-started/ +2. https://docs.aws.amazon.com/workspaces/latest/adminguide/data-protection.html +3. https://docs.aws.amazon.com/macie/latest/user/data-classification.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.1 Establish and Maintain a Data Management Process | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.4/SKILL.md new file mode 100644 index 0000000000..00cea3047d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.1.4/SKILL.md @@ -0,0 +1,175 @@ +--- +name: cis-aws-foundations-3.1.4 +description: "Ensure that S3 is configured with 'Block Public Access' enabled" +category: cis-storage +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, s3, public-access, block-public-access, access-control] +cis_id: "3.1.4" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-3.1.1, cis-aws-foundations-3.1.2, cis-aws-foundations-3.1.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that S3 is configured with 'Block Public Access' enabled + +## Description + +Amazon S3 provides `Block public access (bucket settings)` and `Block public access (account settings)` to help you manage public access to Amazon S3 resources. By default, S3 buckets and objects are created with public access disabled. However, an IAM principal with sufficient S3 permissions can enable public access at the bucket and/or object level. While enabled, `Block public access (bucket settings)` prevents an individual bucket and its contained objects from becoming publicly accessible. Similarly, `Block public access (account settings)` prevents all buckets and their contained objects from becoming publicly accessible across the entire account. + +## Rationale + +Amazon S3 `Block public access (bucket settings)` prevents the accidental or malicious public exposure of data contained within the respective bucket(s). + +Amazon S3 `Block public access (account settings)` prevents the accidental or malicious public exposure of data contained within all buckets of the respective AWS account. + +Whether to block public access to all or some buckets is an organizational decision that should be based on data sensitivity, least privilege, and use case. + +## Impact + +When you apply Block Public Access settings to an account, the settings apply to all AWS regions globally. The settings may not take effect in all regions immediately or simultaneously, but they will eventually propagate to all regions. + +## Audit Procedure + +### Using AWS Console + +**If utilizing Block Public Access (bucket settings):** + +1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/. +2. Click Bucket name. +3. Click on Permissions tab and check "Block public access (bucket settings)". +4. Ensure that the block public access settings are configured appropriately for this bucket. +5. Repeat for all the buckets in your AWS account. + +**If utilizing Block Public Access (account settings):** + +1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/. +2. Choose `Block public access (account settings)`. +3. Ensure that the block public access settings are configured appropriately for your AWS account. + +### Using AWS CLI + +**Check bucket-level Block Public Access:** + +1. List all the S3 buckets: + +```bash +aws s3 ls +``` + +2. Find the public access settings for a specific bucket: + +```bash +aws s3api get-public-access-block --bucket +``` + +Output if Block Public Access is enabled: + +```json +{ + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "IgnorePublicAcls": true, + "BlockPublicPolicy": true, + "RestrictPublicBuckets": true + } +} +``` + +If the output reads `false` for the separate configuration settings, then proceed with the remediation. + +**Check account-level Block Public Access:** + +```bash +aws s3control get-public-access-block --account-id --region +``` + +Output if Block Public Access is enabled: + +```json +{ + "PublicAccessBlockConfiguration": { + "IgnorePublicAcls": true, + "BlockPublicPolicy": true, + "BlockPublicAcls": true, + "RestrictPublicBuckets": true + } +} +``` + +If the output reads `false` for the separate configuration settings, then proceed with the remediation. + +## Expected Result + +All four Block Public Access settings should be set to `true`: + +- `BlockPublicAcls`: true +- `IgnorePublicAcls`: true +- `BlockPublicPolicy`: true +- `RestrictPublicBuckets`: true + +This should be verified at either the bucket level or account level, depending on organizational requirements. + +## Remediation + +### Using AWS Console + +**If utilizing Block Public Access (bucket settings):** + +1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/. +2. Select the check box next to a bucket. +3. Click 'Edit public access settings'. +4. Click 'Block all public access' +5. Repeat for all the buckets in your AWS account that contain sensitive data. + +**If utilizing Block Public Access (account settings):** + +1. Login to the AWS Management Console and open the Amazon S3 console using https://console.aws.amazon.com/s3/. +2. Click `Block Public Access (account settings)`. +3. Click `Edit` to change the block public access settings for all the buckets in your AWS account. +4. Update the settings and click `Save`. +5. When you're asked for confirmation, enter `confirm`. Then click `Confirm` to save your changes. + +### Using AWS CLI + +**Enable Block Public Access on a specific bucket:** + +```bash +aws s3api put-public-access-block --bucket --public-access-block-configuration "BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true" +``` + +**Enable Block Public Access for the account:** + +```bash +aws s3control put-public-access-block \ +--public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true, BlockPublicPolicy=true, RestrictPublicBuckets=true \ +--account-id +``` + +## Default Value + +By default, new S3 buckets and objects are created with public access disabled, but the Block Public Access settings (at the bucket or account level) are not enforced. They must be explicitly enabled to prevent future public access changes. + +## References + +1. https://docs.aws.amazon.com/AmazonS3/latest/user-guide/block-public-access-account.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1022 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.1/SKILL.md new file mode 100644 index 0000000000..d99070ac19 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.1/SKILL.md @@ -0,0 +1,191 @@ +--- +name: cis-aws-foundations-3.2.1 +description: "Ensure that encryption-at-rest is enabled for RDS instances" +category: cis-storage +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, rds, encryption, encryption-at-rest, kms] +cis_id: "3.2.1" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-3.2.2, cis-aws-foundations-3.2.3, cis-aws-foundations-3.2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that encryption-at-rest is enabled for RDS instances + +## Description + +Amazon RDS encrypted DB instances use the industry-standard AES-256 encryption algorithm to encrypt your data on the server that hosts your Amazon RDS DB instances. After your data is encrypted, Amazon RDS handles the authentication of access and the decryption of your data transparently, with minimal impact on performance. + +## Rationale + +Databases are likely to hold sensitive and critical data; therefore, it is highly recommended to implement encryption to protect your data from unauthorized access or disclosure. With RDS encryption enabled, the data stored on the instance's underlying storage, the automated backups, read replicas, and snapshots are all encrypted. + +## Impact + +Enabling encryption requires creating a new encrypted instance from a snapshot. This involves downtime and potential application configuration changes. For production databases, consider implementing replication or planned downtime to ensure data consistency during migration. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Management Console and open the RDS dashboard at https://console.aws.amazon.com/rds/. +2. In the navigation pane, under RDS dashboard, click `Databases`. +3. Select the RDS instance that you want to examine. +4. Click `Instance Name` to see details, then select the `Configuration` tab. +5. Under Configuration Details, in the Primary Storage pane, search for the `Encryption Enabled` status. +6. If the current status is set to `Disabled`, encryption is not enabled for the selected RDS database instance. +7. Repeat steps 2 to 6 to verify the encryption status of other RDS instances in the same region. +8. Change the region from the top of the navigation bar, and repeat the audit steps for other regions. + +### Using AWS CLI + +1. Run the `describe-db-instances` command to list all the RDS database instance names available in the selected AWS region. The output will return each database instance identifier (name): + +```bash +aws rds describe-db-instances --region --query 'DBInstances[*].[DBInstanceIdentifier,StorageEncrypted]' --output table +``` + +2. Run the `describe-db-instances` command again, using an RDS instance identifier returned from step 1, to determine if the selected database instance is encrypted. The output should return the encryption status `True` or `False`: + +```bash +aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].StorageEncrypted' +``` + +3. If the StorageEncrypted parameter value is `False`, encryption is not enabled for the selected RDS database instance. +4. Repeat steps 1 to 3 to audit each RDS instance, and change the region to verify RDS instances in other regions. + +## Expected Result + +The `StorageEncrypted` parameter should return `True` for all RDS database instances, indicating that encryption at rest is enabled. + +## Remediation + +### Using AWS Console + +1. Login to the AWS Management Console and open the RDS dashboard at https://console.aws.amazon.com/rds/. +2. In the left navigation panel, click on `Databases`. +3. Select the Database instance that needs to be encrypted. +4. Click the `Actions` button placed at the top right and select `Take Snapshot`. +5. On the Take Snapshot page, enter the name of the database for which you want to take a snapshot in the `Snapshot Name` field and click on `Take Snapshot`. +6. Select the newly created snapshot, click the `Action` button placed at the top right, and select `Copy snapshot` from the Action menu. +7. On the Make Copy of DB Snapshot page, perform the following: + - In the `New DB Snapshot Identifier` field, enter a name for the new snapshot. + - Check `Copy Tags`. The new snapshot must have the same tags as the source snapshot. + - Select `Yes` from the `Enable Encryption` dropdown list to enable encryption. You can choose to use the AWS default encryption key or a custom key from the Master Key dropdown list. +8. Click `Copy Snapshot` to create an encrypted copy of the selected instance's snapshot. +9. Select the new Snapshot Encrypted Copy and click the `Action` button located at the top right. Then, select the `Restore Snapshot` option from the Action menu. This will restore the encrypted snapshot to a new database instance. +10. On the Restore DB Instance page, enter a unique name for the new database instance in the DB Instance Identifier field. +11. Review the instance configuration details and click `Restore DB Instance`. +12. After the new instance is provisioned: + - Update application configuration to use the new encrypted database endpoint + - Remove the unencrypted instance once migration is complete + +Note: This remediation procedure assumes that the database has been taken offline (or operating in read-only mode) and is static when the snapshot is taken. If the database is still in use, any changes made between the time the snapshot is made and the new encrypted database is brought online will be lost. + +### Using AWS CLI + +1. List all RDS database instances: + +```bash +aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' +``` + +2. Check if the instance is encrypted: + +```bash +aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].StorageEncrypted' +``` + +3. Create a snapshot: + +```bash +aws rds create-db-snapshot --region --db-snapshot-identifier --db-instance-identifier +``` + +4. List KMS key aliases: + +```bash +aws kms list-aliases --region +``` + +5. Create an encrypted copy of the snapshot: + +```bash +aws rds copy-db-snapshot --region \ + --source-db-snapshot-identifier \ + --target-db-snapshot-identifier \ + --copy-tags \ + --kms-key-id +``` + +6. Restore the encrypted snapshot (default VPC): + +```bash +aws rds restore-db-instance-from-db-snapshot --region \ + --db-instance-identifier \ + --db-snapshot-identifier +``` + +7. (Optional) Create a DB subnet group (if using custom VPC): + +```bash +aws rds create-db-subnet-group \ + --db-subnet-group-name \ + --db-subnet-group-description \ + --subnet-ids '["subnet-1","subnet-2","subnet-3"]' +``` + +8. Restore using the subnet group: + +```bash +aws rds restore-db-instance-from-db-snapshot --region \ + --db-subnet-group-name \ + --db-instance-identifier \ + --db-snapshot-identifier +``` + +9. Verify the new database instance: + +```bash +aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' +``` + +10. Confirm encryption is enabled: + +```bash +aws rds describe-db-instances --region \ + --db-instance-identifier \ + --query 'DBInstances[*].StorageEncrypted' +``` + +## Default Value + +By default, Amazon RDS instances are created without encryption at rest. Encryption must be explicitly enabled at instance creation or by restoring from an encrypted snapshot. + +## References + +1. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Encryption.html +2. https://aws.amazon.com/blogs/database/selecting-the-right-encryption-options-for-amazon-rds-and-amazon-aurora-database-engines/ +3. https://aws.amazon.com/rds/features/security/ +4. https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-subnet-group.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0010 | M1041 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.2/SKILL.md new file mode 100644 index 0000000000..eaafdb198c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.2/SKILL.md @@ -0,0 +1,127 @@ +--- +name: cis-aws-foundations-3.2.2 +description: "Ensure the Auto Minor Version Upgrade feature is enabled for RDS instances" +category: cis-storage +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, rds, patching, auto-upgrade, version-management] +cis_id: "3.2.2" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-3.2.1, cis-aws-foundations-3.2.3, cis-aws-foundations-3.2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure the Auto Minor Version Upgrade feature is enabled for RDS instances + +## Description + +Ensure that RDS database instances have the Auto Minor Version Upgrade flag enabled to automatically receive minor engine upgrades during the specified maintenance window. This way, RDS instances can obtain new features, bug fixes, and security patches for their database engines. + +## Rationale + +AWS RDS will occasionally deprecate minor engine versions and provide new ones for upgrades. When the last version number within a release is replaced, the changed version is considered minor. With the Auto Minor Version Upgrade feature enabled, version upgrades will occur automatically during the specified maintenance window, allowing your RDS instances to receive new features, bug fixes, and security patches for their database engines. + +## Impact + +Automatic minor version upgrades may introduce changes during maintenance windows. For critical production databases, consider testing upgrades in a staging environment first. + +## Audit Procedure + +### Using AWS Console + +1. Log in to the AWS management console and navigate to the RDS dashboard at https://console.aws.amazon.com/rds/. +2. In the left navigation panel, click `Databases`. +3. Select the RDS instance that you want to examine. +4. Click on the `Maintenance and backups` panel. +5. Under the `Maintenance` section, search for the Auto Minor Version Upgrade status. + - If the current status is `Disabled`, it means that the feature is not enabled, and the minor engine upgrades released will not be applied to the selected RDS instance. + +### Using AWS CLI + +1. Run the `describe-db-instances` command to list all RDS database names available in the selected AWS region: + +```bash +aws rds describe-db-instances --region --query 'DBInstances[*].[DBInstanceIdentifier,AutoMinorVersionUpgrade]' --output table +``` + +2. The command output should return each database instance identifier. + +3. Run the `describe-db-instances` command again using a RDS instance identifier returned earlier to determine the Auto Minor Version Upgrade status for the selected instance: + +```bash +aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].AutoMinorVersionUpgrade' +``` + +4. The command output should return the current status of the feature. If the current status is set to `true`, the feature is enabled and the minor engine upgrades will be applied to the selected RDS instance. + +## Expected Result + +The `AutoMinorVersionUpgrade` parameter should return `true` for all RDS database instances. + +## Remediation + +### Using AWS Console + +1. Log in to the AWS management console and navigate to the RDS dashboard at https://console.aws.amazon.com/rds/. +2. In the left navigation panel, click `Databases`. +3. Select the RDS instance that you want to update. +4. Click on the `Modify` button located at the top right side. +5. On the `Modify DB Instance: ` page, In the `Maintenance` section, select `Auto minor version upgrade` and click the `Yes` radio button. +6. At the bottom of the page, click `Continue`, and check `Apply Immediately` to apply the changes immediately, or select `Apply during the next scheduled maintenance window` to avoid any downtime. +7. Review the changes and click `Modify DB Instance`. The instance status should change from available to modifying and back to available. Once the feature is enabled, the `Auto Minor Version Upgrade` status should change to `Yes`. + +### Using AWS CLI + +1. Run the `describe-db-instances` command to list all RDS database instance names available in the selected AWS region: + +```bash +aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' +``` + +2. The command output should return each database instance identifier. + +3. Run the `modify-db-instance` command to modify the configuration of a selected RDS instance. This command will apply the changes immediately. Remove `--apply-immediately` to apply changes during the next scheduled maintenance window and avoid any downtime: + +```bash +aws rds modify-db-instance --region --db-instance-identifier --auto-minor-version-upgrade --apply-immediately +``` + +4. The command output should reveal the new configuration metadata for the RDS instance, including the `AutoMinorVersionUpgrade` parameter value. + +5. Run the `describe-db-instances` command to check if the Auto Minor Version Upgrade feature has been successfully enabled: + +```bash +aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].AutoMinorVersionUpgrade' +``` + +6. The command output should return the feature's current status set to `true`, indicating that the feature is `enabled`, and that the minor engine upgrades will be applied to the selected RDS instance. + +## Default Value + +By default, new Amazon RDS instances have the Auto Minor Version Upgrade option enabled, unless explicitly disabled at creation or modification. + +## References + +1. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_RDS_Managing.html +2. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Upgrading.html +3. https://aws.amazon.com/rds/faqs/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------- | ---- | ---- | ---- | +| v8 | 7.4 Perform Automated Application Patch Management | x | x | x | +| v7 | 3.5 Deploy Automated Software Patch Management Tools | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| | | M1051 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.3/SKILL.md new file mode 100644 index 0000000000..e8410d10b2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.3/SKILL.md @@ -0,0 +1,169 @@ +--- +name: cis-aws-foundations-3.2.3 +description: "Ensure that RDS instances are not publicly accessible" +category: cis-storage +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, rds, public-access, network-security, vpc] +cis_id: "3.2.3" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-3.2.1, cis-aws-foundations-3.2.2, cis-aws-foundations-3.2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that RDS instances are not publicly accessible + +## Description + +Ensure and verify that the RDS database instances provisioned in your AWS account restrict unauthorized access in order to minimize security risks. To restrict access to any RDS database instance, you must disable the Publicly Accessible flag for the database and update the VPC security group associated with the instance. + +## Rationale + +Ensure that no public-facing RDS database instances are provisioned in your AWS account, and restrict unauthorized access in order to minimize security risks. When the RDS instance allows unrestricted access (0.0.0.0/0), anyone and anything on the Internet can establish a connection to your database, which can increase the opportunity for malicious activities such as brute force attacks, PostgreSQL injections, or DoS/DDoS attacks. + +## Impact + +Disabling public accessibility may require application reconfiguration to use private endpoints or VPN connections. Ensure all applications connecting to the RDS instance can reach it through private networking before making changes. + +## Audit Procedure + +### Using AWS Console + +1. Log in to the AWS management console and navigate to the RDS dashboard at https://console.aws.amazon.com/rds/. +2. Under the navigation panel, on the RDS dashboard, click `Databases`. +3. Select the RDS instance that you want to examine. +4. Click `Instance Name` from the dashboard, under `Connectivity and Security`. +5. In the `Security` section, check if the Publicly Accessible flag status is set to `No`. +6. Follow the steps below to check database subnet access: + - In the `networking` section, click the subnet link under `Subnets`. + - The link will redirect you to the VPC Subnets page. + - Select the subnet listed on the page and click the `Route Table` tab from the dashboard bottom panel. + - If the route table contains any entries with the destination CIDR block set to `0.0.0.0/0` and an `Internet Gateway` attached, the selected RDS database instance was provisioned inside a public subnet; therefore, it is not running within a logically isolated environment and can be accessed from the Internet. +7. Repeat steps 3-6 to determine the configuration of other RDS database instances provisioned in the current region. +8. Change the AWS region from the navigation bar and repeat the audit process for other regions. + +### Using AWS CLI + +1. Run the `describe-db-instances` command to list all available RDS database names in the selected AWS region: + +```bash +aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' +``` + +2. The command output should return each database instance `identifier`. + +3. Run the `describe-db-instances` command again, using the `PubliclyAccessible` parameter as a query filter to reveal the status of the database instance's Publicly Accessible flag: + +```bash +aws rds describe-db-instances --region us-east-1 --query 'DBInstances[*].[DBInstanceIdentifier,PubliclyAccessible]' --output table +``` + +4. Check the Publicly Accessible parameter status. If the Publicly Accessible flag is set to `Yes`, then the selected RDS database instance is publicly accessible and insecure. Follow the steps mentioned below to check database subnet access. + +5. Run the `describe-db-instances` command again using the RDS database instance identifier that you want to check, along with the appropriate filtering to describe the VPC subnet(s) associated with the selected instance: + +```bash +aws ec2 describe-route-tables --filters "Name=association.subnet-id,Values=" --query "RouteTables[].Routes[?GatewayId!='null']" +``` + +- If the command returns the route table associated with the database instance subnet ID, check the values of the `GatewayId` and `DestinationCidrBlock` attributes returned in the output. If the route table contains any entries with the `GatewayId` value set to `igw-xxxxxxxx` and the `DestinationCidrBlock` value set to `0.0.0.0/0`, the selected RDS database instance was provisioned within a public subnet. +- Or, if the command returns empty results, the route table is implicitly associated with the subnet; therefore, the audit process continues with the next step. + +6. Run the `describe-route-tables` command using the ID of the subnet returned in the previous step to describe the routes of the VPC route table associated with the selected subnet: + +```bash +aws ec2 describe-route-tables --region --filters "Name=association.subnet-id,Values=" --query 'RouteTables[*].Routes[]' +``` + +7. Run the `describe-db-instances` command again using the RDS database instance identifier that you want to check, along with the appropriate filtering to describe the VPC ID associated with the selected instance: + +```bash +aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].DBSubnetGroup.VpcId' +``` + +8. Now run the `describe-route-tables` command using the ID of the VPC returned in the previous step to describe the routes of the VPC's main route table that is implicitly associated with the selected subnet: + +```bash +aws ec2 describe-route-tables --region --filters "Name=vpc-id,Values=" "Name=association.main,Values=true" --query 'RouteTables[*].Routes[]' +``` + +- The command output returns the VPC main route table implicitly associated with the database instance subnet ID. Check the values of the `GatewayId` and `DestinationCidrBlock` attributes returned in the output. If the route table contains any entries with the `GatewayId` value set to `igw-xxxxxxxx` and the `DestinationCidrBlock` value set to `0.0.0.0/0`, the selected RDS database instance was provisioned inside a public subnet; therefore, it is not running within a logically isolated environment and does not adhere to AWS security best practices. + +## Expected Result + +The `PubliclyAccessible` flag should be set to `No` (or `False`) for all RDS instances. Additionally, the RDS instances should be deployed in private subnets without routes to Internet Gateways. + +## Remediation + +### Using AWS Console + +1. Log in to the AWS management console and navigate to the RDS dashboard at https://console.aws.amazon.com/rds/. +2. Under the navigation panel, on the RDS dashboard, click `Databases`. +3. Select the RDS instance that you want to update. +4. Click `Modify` from the dashboard top menu. +5. On the Modify DB Instance panel, under the `Connectivity` section, click on `Additional connectivity configuration` and update the value for `Publicly Accessible` to `Not publicly accessible` to restrict public access. +6. Follow the below steps to update subnet configurations: + - Select the `Connectivity and security` tab, and click the VPC attribute value inside the `Networking` section. + - Select the `Details` tab from the VPC dashboard's bottom panel and click the Route table configuration attribute value. + - On the Route table details page, select the Routes tab from the dashboard's bottom panel and click `Edit routes`. + - On the Edit routes page, update the Destination of Target which is set to `igw-xxxxx` and click `Save` routes. +7. On the Modify DB Instance panel, click `Continue`, and in the Scheduling of modifications section, perform one of the following actions based on your requirements: + - Select `Apply during the next scheduled maintenance window` to apply the changes automatically during the next scheduled maintenance window. + - Select `Apply immediately` to apply the changes right away. With this option, any pending modifications will be asynchronously applied as soon as possible, regardless of the maintenance window setting for this RDS database instance. +8. Repeat steps 3-7 for each RDS instance in the current region. +9. Change the AWS region from the navigation bar to repeat the process for other regions. + +### Using AWS CLI + +1. Run the `describe-db-instances` command to list all available RDS database identifiers in the selected AWS region: + +```bash +aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' +``` + +2. The command output should return each database instance identifier. + +3. Run the `modify-db-instance` command to modify the configuration of a selected RDS instance, disabling the `Publicly Accessible` flag for that instance. This command uses the `apply-immediately` flag. If you want to avoid any downtime, the `--no-apply-immediately` flag can be used: + +```bash +aws rds modify-db-instance --region --db-instance-identifier --no-publicly-accessible --apply-immediately +``` + +4. The command output should reveal the `PubliclyAccessible` configuration under pending values, to be applied at the specified time. + +5. Updating the Internet Gateway destination via the AWS CLI is not currently supported. To update information about the Internet Gateway, please use the AWS Console procedure. + +6. Repeat steps 1-5 for each RDS instance provisioned in the current region. + +7. Change the AWS region by using the --region filter to repeat the process for other regions. + +## Default Value + +By default, new Amazon RDS instances are created with the Publicly Accessible setting disabled. However, this option can be explicitly enabled during instance creation or modification. + +## References + +1. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.html +2. https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Scenario2.html +3. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html +4. https://aws.amazon.com/rds/faqs/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ------------ | +| T1530 | TA0010 | M1037, M1054 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.4/SKILL.md new file mode 100644 index 0000000000..4de4d4c297 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.2.4/SKILL.md @@ -0,0 +1,124 @@ +--- +name: cis-aws-foundations-3.2.4 +description: "Ensure Multi-AZ deployments are used for enhanced availability in Amazon RDS" +category: cis-storage +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, rds, multi-az, high-availability, disaster-recovery] +cis_id: "3.2.4" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-3.2.1, cis-aws-foundations-3.2.2, cis-aws-foundations-3.2.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Multi-AZ deployments are used for enhanced availability in Amazon RDS + +## Description + +Amazon RDS offers Multi-AZ deployments that provide enhanced availability and durability for your databases, using synchronous replication to replicate data to a standby instance in a different Availability Zone (AZ). In the event of an infrastructure failure, Amazon RDS automatically fails over to the standby to minimize downtime and ensure business continuity. + +## Rationale + +Database availability is crucial for maintaining service uptime, particularly for applications that are critical to the business. Implementing Multi-AZ deployments with Amazon RDS ensures that your databases are protected against unplanned outages due to hardware failures, network issues, or other disruptions. This configuration enhances both the availability and durability of your database, making it a highly recommended practice for production environments. + +## Impact + +Multi-AZ deployments may increase costs due to the additional resources required to maintain a standby instance; however, the benefits of increased availability and reduced risk of downtime outweigh these costs for critical applications. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Management Console and open the RDS dashboard at AWS RDS Console. +2. In the navigation pane, under `Databases`, select the RDS instance you want to examine. +3. Click the `Instance Name` to see details, then navigate to the `Configuration` tab. +4. Under the `Availability` section, check the `Multi-AZ` status. + - If Multi-AZ deployment is enabled, it will display `Yes`. + - If it is disabled, the status will display `No`. +5. Repeat steps 2-4 to verify the Multi-AZ status of other RDS instances in the same region. +6. Change the region from the top of the navigation bar and repeat the audit for other regions. + +### Using AWS CLI + +1. Run the following command to list all RDS instances in the selected AWS region: + +```bash +aws rds describe-db-instances --region --query 'DBInstances[*].DBInstanceIdentifier' +``` + +2. Run the following command using the instance identifier returned earlier to check the Multi-AZ status: + +```bash +aws rds describe-db-instances --region --query 'DBInstances[*].[DBInstanceIdentifier,MultiAZ]' --output table +``` + +- If the output is `True`, Multi-AZ is enabled. +- If the output is `False`, Multi-AZ is not enabled. + +3. Repeat steps 1 and 2 to audit each RDS instance, and change regions to verify in other regions. + +## Expected Result + +The `MultiAZ` parameter should return `True` for all production RDS database instances, indicating that Multi-AZ deployment is enabled for high availability. + +## Remediation + +### Using AWS Console + +1. Login to the AWS Management Console and open the RDS dashboard at AWS RDS Console. +2. In the left navigation pane, click on `Databases`. +3. Select the database instance that needs Multi-AZ deployment to be enabled. +4. Click the `Modify` button at the top right. +5. Scroll down to the `Availability & Durability` section. +6. Under `Multi-AZ deployment`, select `Yes` to enable. +7. Review the changes and click `Continue`. +8. On the `Review` page, choose `Apply immediately` to make the change without waiting for the next maintenance window, or `Apply during the next scheduled maintenance window`. +9. Click `Modify DB Instance` to apply the changes. + +### Using AWS CLI + +1. Run the following command to modify the RDS instance and enable Multi-AZ: + +```bash +aws rds modify-db-instance --region --db-instance-identifier --multi-az --apply-immediately +``` + +2. Confirm that the Multi-AZ deployment is enabled by running the following command: + +```bash +aws rds describe-db-instances --region --db-instance-identifier --query 'DBInstances[*].MultiAZ' +``` + +- The output should return `True`, indicating that Multi-AZ is enabled. + +3. Repeat the procedure for other instances as necessary. + +## Default Value + +By default, Amazon RDS instances are created as Single-AZ deployments. Multi-AZ must be explicitly enabled during instance creation or modification. + +## References + +1. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html +2. https://aws.amazon.com/rds/features/multi-az/ +3. https://aws.amazon.com/rds/faqs/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 2.10 Physically or Logically Segregate High Risk Applications | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| | | M1030 | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.3.1/SKILL.md new file mode 100644 index 0000000000..8a3208b4f3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-3.3.1/SKILL.md @@ -0,0 +1,151 @@ +--- +name: cis-aws-foundations-3.3.1 +description: "Ensure that encryption is enabled for EFS file systems" +category: cis-storage +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, storage, efs, encryption, encryption-at-rest, kms] +cis_id: "3.3.1" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that encryption is enabled for EFS file systems + +## Description + +EFS data should be encrypted at rest using AWS KMS (Key Management Service). + +## Rationale + +Data should be encrypted at rest to reduce the risk of a data breach via direct access to the storage device. + +## Impact + +EFS file system data-at-rest encryption must be turned on when creating the file system. If an EFS file system has been created without data-at-rest encryption enabled, then you must create another EFS file system with the correct configuration and transfer the data. There is no way to enable encryption on an existing unencrypted EFS file system. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Management Console and Navigate to the Elastic File System (EFS) dashboard. +2. Select `File Systems` from the left navigation panel. +3. Each item on the list has a visible Encrypted field that displays data at rest encryption status. +4. Validate that this field reads `Encrypted` for all EFS file systems in all AWS regions. + +### Using AWS CLI + +1. Run the `describe-file-systems` command using custom query filters to list the identifiers of all AWS EFS file systems currently available within the selected region: + +```bash +aws efs describe-file-systems --region --output table --query 'FileSystems[*].[FileSystemId,Encrypted]' --output table +``` + +2. The command output should return a table with the requested file system IDs. + +3. Run the `describe-file-systems` command using the ID of the file system that you want to examine as `file-system-id` and the necessary query filters: + +```bash +aws efs describe-file-systems --region --file-system-id --query 'FileSystems[*].Encrypted' +``` + +4. The command output should return the file system encryption status as `true` or `false`. If the returned value is `false`, the selected AWS EFS file system is not encrypted and if the returned value is `true`, the selected AWS EFS file system is encrypted. + +## Expected Result + +The `Encrypted` field should return `true` for all EFS file systems, indicating that encryption at rest is enabled using AWS KMS. + +## Remediation + +**It is important to note that EFS file system data-at-rest encryption must be turned on when creating the file system. If an EFS file system has been created without data-at-rest encryption enabled, then you must create another EFS file system with the correct configuration and transfer the data.** + +### Using AWS Console + +Steps to create an EFS file system with data encrypted at rest: + +1. Login to the AWS Management Console and Navigate to the `Elastic File System (EFS)` dashboard. +2. Select `File Systems` from the left navigation panel. +3. Click the `Create File System` button from the dashboard top menu to start the file system setup process. +4. On the `Configure file system access` configuration page, perform the following actions: + - Choose an appropriate VPC from the VPC dropdown list. + - Within the `Create mount targets` section, check the boxes for all of the Availability Zones (AZs) within the selected VPC. These will be your mount targets. + - Click `Next step` to continue. +5. Perform the following on the `Configure optional settings` page: + - Create `tags` to describe your new file system. + - Choose `performance mode` based on your requirements. + - Check the `Enable encryption` box and choose `aws/elasticfilesystem` from the `Select KMS master key` dropdown list to enable encryption for the new file system, using the default master key provided and managed by AWS KMS. + - Click `Next step` to continue. +6. Review the file system configuration details on the `review and create` page and then click `Create File System` to create your new AWS EFS file system. +7. Copy the data from the old unencrypted EFS file system onto the newly created encrypted file system. +8. Remove the unencrypted file system as soon as your data migration to the newly created encrypted file system is completed. +9. Change the AWS region from the navigation bar and repeat the entire process for the other AWS regions. + +### Using AWS CLI + +1. Run the `describe-file-systems` command to view the configuration information for the selected unencrypted file system identified in the Audit steps: + +```bash +aws efs describe-file-systems --region --file-system-id +``` + +2. The command output should return the configuration information. + +3. To provision a new AWS EFS file system, you need to generate a universally unique identifier (UUID) to create the token required by the `create-file-system` command. To create the required token, you can use a randomly generated UUID from "https://www.uuidgenerator.net". + +4. Run the `create-file-system` command using the unique token created at the previous step: + +```bash +aws efs create-file-system --region --creation-token --performance-mode generalPurpose --encrypted +``` + +5. The command output should return the new file system configuration metadata. + +6. Run the `create-mount-target` command using the EFS file system ID returned from step 4 as the identifier and the ID of the Availability Zone (AZ) that will represent the mount target: + +```bash +aws efs create-mount-target --region --file-system-id --subnet-id +``` + +7. The command output should return the new mount target metadata. + +8. Now you can mount your file system from an EC2 instance. + +9. Copy the data from the old unencrypted EFS file system to the newly created encrypted file system. + +10. Remove the unencrypted file system as soon as your data migration to the newly created encrypted file system is completed: + +```bash +aws efs delete-file-system --region --file-system-id +``` + +11. Change the AWS region by updating the --region and repeat the entire process for the other AWS regions. + +## Default Value + +By default, when creating an EFS file system through the AWS Management Console, encryption at rest is enabled. When creating a file system using the AWS CLI, API, or SDKs, encryption is not enabled by default and must be explicitly specified. + +## References + +1. https://docs.aws.amazon.com/efs/latest/ug/encryption-at-rest.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/efs/index.html#efs + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1041 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.1/SKILL.md new file mode 100644 index 0000000000..39221abf43 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.1/SKILL.md @@ -0,0 +1,157 @@ +--- +name: cis-aws-foundations-4.1 +description: "Ensure CloudTrail is enabled in all regions" +category: cis-logging +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, logging, cloudtrail, multi-region, management-events] +cis_id: "4.1" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.2, cis-aws-foundations-4.3, cis-aws-foundations-4.4, cis-aws-foundations-4.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure CloudTrail is enabled in all regions + +## Description + +AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail provides a history of AWS API calls for an account, including API calls made via the Management Console, SDKs, command line tools, and higher-level AWS services (such as CloudFormation). + +## Rationale + +The AWS API call history produced by CloudTrail enables security analysis, resource change tracking, and compliance auditing. Additionally, + +- ensuring that a multi-region trail exists will help detect unexpected activity occurring in otherwise unused regions +- ensuring that a multi-region trail exists will ensure that Global Service Logging is enabled for a trail by default to capture recordings of events generated on AWS global services +- for a multi-region trail, ensuring that management events are configured for all types of Read/Writes ensures the recording of management operations that are performed on all resources in an AWS account + +## Impact + +S3 lifecycle features can be used to manage the accumulation and management of logs over time. See the following AWS resource for more information on these features: + +1. https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the CloudTrail console at https://console.aws.amazon.com/cloudtrail +2. Click on `Trails` in the left navigation pane +3. You will be presented with a list of trails across all regions +4. Ensure that at least one Trail has `Yes` specified in the `Multi-region trail` column +5. Click on a trail via the link in the `Name` column +6. Ensure `Logging` is set to `ON` +7. Ensure `Multi-region trail` is set to `Yes` +8. In the section `Management Events`, ensure that `API activity` set to `ALL` + +### Using AWS CLI + +1. List all trails: + +```bash +aws cloudtrail describe-trails +``` + +2. Ensure `IsMultiRegionTrail` is set to `true`: + +```bash +aws cloudtrail get-trail-status --name +``` + +3. Ensure `IsLogging` is set to `true`: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +4. Ensure there is at least one `fieldSelector` for a trail that equals `Management`: + +- This should NOT output any results for Field: "readOnly". If either `true` or `false` is returned, one of the checkboxes (`read` or `write`) is not selected. + +Example of correct output: + +```json +"TrailARN": "", + "AdvancedEventSelectors": [ + { + "Name": "Management events selector", + "FieldSelectors": [ + { + "Field": "eventCategory", + "Equals": [ + "Management" + ] + } + ] + } + ] +``` + +## Expected Result + +At least one multi-region trail exists with `IsMultiRegionTrail` set to `true`, `IsLogging` set to `true`, and management events configured for all read/write types. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/cloudtrail. +2. Click on `Trails` in the left navigation pane. +3. Click `Get Started Now` if it is presented, then: + - Click `Add new trail`. + - Enter a trail name in the `Trail name` box. + - A trail created in the console is a multi-region trail by default. + - Specify an S3 bucket name in the `S3 bucket` box. + - Specify the AWS KMS alias under the `Log file SSE-KMS encryption` section, or create a new key. + - Click `Next`. +4. Ensure the `Management events` check box is selected. +5. Ensure both `Read` and `Write` are checked under API activity. +6. Click `Next`. +7. Review your trail settings and click `Create trail`. + +### Using AWS CLI + +Create a multi-region trail: + +```bash +aws cloudtrail create-trail --name --bucket-name --is-multi-region-trail +``` + +Enable multi-region on an existing trail: + +```bash +aws cloudtrail update-trail --name --is-multi-region-trail +``` + +**Note:** Creating a CloudTrail trail via the CLI without providing any overriding options configures all `read` and `write` `Management Events` to be logged by default. + +## Default Value + +By default, CloudTrail is not enabled in any region. + +## References + +1. CCE-78913-1 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html?icmpid=docs_cloudtrail_console#logging-management-events +4. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-services.html#cloud-trail-supported-services-data-events + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs - Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation. | | x | x | +| v7 | 6.2 Activate audit logging - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ------------ | +| T1535 | TA0005 | M1047, M1054 | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.10/SKILL.md new file mode 100644 index 0000000000..77bfe04c0c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.10/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-aws-foundations-4.10 +description: "Ensure all AWS-managed web front-end services have access logging enabled" +category: cis-logging +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, logging, cloudfront, alb, nlb, api-gateway, access-logging, web] +cis_id: "4.10" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure all AWS-managed web front-end services have access logging enabled + +## Description + +Ensure that access logging is enabled for all AWS-managed web front-end services that terminate or front HTTP(S) traffic, including Amazon CloudFront distributions, Application Load Balancers (ALB), Network Load Balancers (NLB), and Amazon API Gateway REST/HTTP API stages with public endpoints. Access logs must be enabled with delivery to a designated S3 bucket or CloudWatch Logs destination that is protected with appropriate access controls. + +This control requires logging of request details such as client IP address, timestamp, HTTP method, requested URI, response status code, bytes transferred, and user agent for every request processed by these services. CloudTrail provides management event logging for these resources, but access logs are required to capture the actual HTTP request/response activity at the network edge layers. + +## Rationale + +AWS-managed web front-end services (CloudFront, ALB/NLB, API Gateway) represent the primary HTTP(S) ingress points into AWS accounts and are the first line of defense against web attacks, reconnaissance, and abuse attempts. CloudTrail logs management actions (create/update/delete) and data events but does not capture the content of HTTP requests/responses or client activity, leaving a critical visibility gap for security monitoring and incident response. + +Access logs from these services enable reconstruction of all web traffic, detection of anomalous patterns, forensic analysis of incidents, and compliance proof that internet-facing entry points were monitored. Without these logs, security teams cannot distinguish legitimate traffic from attacks or prove access patterns during audits. + +## Impact + +Enabling access logging incurs additional storage costs for log delivery and retention, as well as minor configuration overhead for creating dedicated logging buckets, IAM roles, and retention policies. Costs can be managed through lifecycle policies, log sampling, and tiered storage classes. + +## Audit Procedure + +### Using AWS Console + +As an example with CloudFront, verify following the below steps if access logging is enabled: + +1. Open the CloudFront console from the AWS Management Console. +2. Click Distributions in the left navigation. +3. For each Distribution ID (e.g., E123ABC...), click the Distribution ID and go to the "Logging" tab +4. Check if one or more "Access log destinations" are present with a destination type of S3 or CloudWatch log group. + +### Using AWS CLI + +N/A - This control requires checking multiple services (CloudFront, ALB, NLB, API Gateway) through their respective console interfaces or service-specific CLI commands. + +## Expected Result + +All AWS-managed web front-end services (CloudFront distributions, ALBs, NLBs, API Gateway stages) with public endpoints have access logging enabled and delivering logs to a designated S3 bucket or CloudWatch Logs destination. + +## Remediation + +### Using AWS Console + +Following instructions enable standard access logging for CloudFront distributions using the AWS Management Console. + +1. Open the CloudFront console from the AWS Management Console. +2. Click Distributions in the left navigation and click on the Distribution ID needing remediation. +3. Go to the "Logging" tab and click on "Create access log delivery" + - Select "Deliver to" for your preferred location: S3 or CloudWatch log group + - Select the ARN of your log destination resource + - Click on Submit +4. Confirm if you see the access log destination in the logging tab + +### Using AWS CLI + +N/A - Remediation steps vary by service. Use the respective service console or service-specific CLI commands for ALB, NLB, and API Gateway access logging configuration. + +## Default Value + +By default, access logging is not enabled for CloudFront distributions, ALBs, NLBs, or API Gateway stages. Each service requires explicit configuration to enable access logging. + +## References + +N/A + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs - Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation. | | x | x | +| v8 | 8.7 Collect URL Request Audit Logs - Collect URL request audit logs on enterprise assets, where appropriate and supported. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.2/SKILL.md new file mode 100644 index 0000000000..b8d4827052 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.2/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-aws-foundations-4.2 +description: "Ensure CloudTrail log file validation is enabled" +category: cis-logging +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, logging, cloudtrail, log-validation, integrity] +cis_id: "4.2" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure CloudTrail log file validation is enabled + +## Description + +CloudTrail log file validation creates a digitally signed digest file containing a hash of each log that CloudTrail writes to S3. These digest files can be used to determine whether a log file was changed, deleted, or remained unchanged after CloudTrail delivered the log. It is recommended that file validation be enabled for all CloudTrails. + +## Rationale + +Enabling log file validation will provide additional integrity checks for CloudTrail logs. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/cloudtrail. +2. Click on `Trails` in the left navigation pane. +3. For every trail: + - Click a trail via the link in the `Name` column. + - Under the `General details` section, ensure `log file validation` is set to `Enabled`. + +### Using AWS CLI + +List all trails: + +```bash +aws cloudtrail describe-trails +``` + +Ensure `LogFileValidationEnabled` is set to `true` for each trail. + +## Expected Result + +All CloudTrail trails have `LogFileValidationEnabled` set to `true`. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/cloudtrail. +2. Click on `Trails` in the left navigation pane. +3. Click on the target trail. +4. Within the `General details` section, click `edit`. +5. Under `Advanced settings`, check the `enable` box under `Log file validation`. +6. Click `Save changes`. + +### Using AWS CLI + +Enable log file validation on a trail: + +```bash +aws cloudtrail update-trail --name --enable-log-file-validation +``` + +Note that periodic validation of logs using these digests can be carried out by running the following command: + +```bash +aws cloudtrail validate-logs --trail-arn --start-time --end-time +``` + +## Default Value + +By default, CloudTrail log file validation is not enabled. This means that while logs are still delivered to the designated S3 bucket, there is no mechanism in place to verify their integrity. Without validation, it is not possible to detect if log files have been altered, deleted, or tampered with after delivery. + +## References + +1. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-log-file-validation-enabling.html +2. CCE-78914-9 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.11 Conduct Audit Log Reviews - Conduct reviews of audit logs to detect anomalies or abnormal events that could indicate a potential threat. Conduct reviews on a weekly, or more frequent, basis. | | x | x | +| v7 | 6.1 Utilize Three Synchronized Time Sources - Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent. | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1565 | TA0040 | | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.3/SKILL.md new file mode 100644 index 0000000000..ee081c3c8b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.3/SKILL.md @@ -0,0 +1,163 @@ +--- +name: cis-aws-foundations-4.3 +description: "Ensure AWS Config is enabled in all regions" +category: cis-logging +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, logging, config, configuration-management, compliance] +cis_id: "4.3" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1] +prerequisites: [] +severity_boost: {} +--- + +# Ensure AWS Config is enabled in all regions + +## Description + +AWS Config is a web service that performs configuration management of supported AWS resources within your account and delivers log files to you. The recorded information includes the configuration items (AWS resources), relationships between configuration items (AWS resources), and any configuration changes between resources. It is recommended that AWS Config be enabled in all regions. In environments using AWS Control Tower or Landing Zone Accelerator (LZA), AWS Config may be centrally managed and automatically enabled across regions. + +## Rationale + +The AWS configuration item history captured by AWS Config enables security analysis, resource change tracking, and compliance auditing. + +## Impact + +Enabling AWS Config in all regions provides comprehensive visibility into resource configurations, enhancing security and compliance monitoring. However, this may incur additional costs and require proper configuration management. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the AWS Config console at https://console.aws.amazon.com/config/. +2. On the top right of the console select the target region. +3. If a Config Recorder is enabled in this region, you should navigate to the Settings page from the navigation menu on the left-hand side. If a Config Recorder is not yet enabled in this region, proceed to the remediation steps. +4. Ensure "Record all resources supported in this region" is checked. +5. Ensure "Include global resources (e.g., AWS IAM resources)" is checked, unless it is enabled in another region (this is only required in one region). +6. Ensure the correct S3 bucket has been defined. +7. Ensure the correct SNS topic has been defined. +8. Repeat steps 2 to 7 for each region. + +Note: In environments using AWS Control Tower or Landing Zone Accelerator (LZA), AWS Config configuration may be managed centrally. Verify that AWS Config is enabled and recording through the centralized governance solution. + +### Using AWS CLI + +1. Run this command to show all AWS Config Recorders and their properties: + +```bash +aws configservice describe-configuration-recorders +``` + +2. Evaluate the output to ensure that all recorders have a `recordingGroup` object which includes `"allSupported": true`. Additionally, ensure that at least one recorder has `"includeGlobalResourceTypes": true`. + +**Note:** There is one more parameter, "ResourceTypes," in the recordingGroup object. We don't need to check it, as whenever we set "allSupported" to true, AWS enforces the resource types to be empty ("ResourceTypes": []). + +Sample output: + +```json +{ + "ConfigurationRecorders": [ + { + "recordingGroup": { + "allSupported": true, + "resourceTypes": [], + "includeGlobalResourceTypes": true + }, + "roleARN": "arn:aws:iam:::role/service-role/", + "name": "default" + } + ] +} +``` + +3. Run this command to show the status for all AWS Config Recorders: + +```bash +aws configservice describe-configuration-recorder-status +``` + +4. In the output, find recorders with `name` key matching the recorders that were evaluated in step 2. Ensure that they include `"recording": true` and `"lastStatus": "SUCCESS"`. + +## Expected Result + +All regions have AWS Config enabled with `allSupported` set to `true`, at least one recorder has `includeGlobalResourceTypes` set to `true`, and all recorders show `recording: true` with `lastStatus: SUCCESS`. + +## Remediation + +### Using AWS Console + +1. Select the region you want to focus on in the top right of the console. +2. Click `Services`. +3. Click `Config`. +4. If a Config Recorder is enabled in this region, navigate to the Settings page from the navigation menu on the left-hand side. If a Config Recorder is not yet enabled in this region, select "Get Started". +5. Select "Record all resources supported in this region". +6. Choose to include global resources (IAM resources). +7. Specify an S3 bucket in the same account or in another managed AWS account. +8. Create an SNS Topic from the same AWS account or another managed AWS account. + +Note: In AWS Control Tower or Landing Zone Accelerator (LZA) environments, AWS Config setup and recording may be deployed and managed automatically. Configuration changes should be performed through the centralized governance framework rather than directly in individual accounts. + +### Using AWS CLI + +1. Ensure there is an appropriate S3 bucket, SNS topic, and IAM role per the AWS Config Service prerequisites. +2. Run this command to create a new configuration recorder: + +```bash +aws configservice put-configuration-recorder --configuration-recorder name=,roleARN=arn:aws:iam:::role/ --recording-group allSupported=true,includeGlobalResourceTypes=true +``` + +3. Create a delivery channel configuration file locally which specifies the channel attributes, populated from the prerequisites set up previously: + +```json +{ + "name": "", + "s3BucketName": "", + "snsTopicARN": "arn:aws:sns:::", + "configSnapshotDeliveryProperties": { + "deliveryFrequency": "Twelve_Hours" + } +} +``` + +4. Run this command to create a new delivery channel, referencing the json configuration file made in the previous step: + +```bash +aws configservice put-delivery-channel --delivery-channel file://.json +``` + +5. Start the configuration recorder by running the following command: + +```bash +aws configservice start-configuration-recorder --configuration-recorder-name +``` + +## Default Value + +By default, AWS Config is not enabled in any region. No configuration changes or resource relationships are tracked until a Config Recorder and Delivery Channel are set up, leaving organizations without historical records for security analysis, compliance auditing, or incident investigations. + +## References + +1. CCE-78917-2 +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configservice/describe-configuration-recorder-status.html +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configservice/describe-configuration-recorders.html +4. https://docs.aws.amazon.com/config/latest/developerguide/gs-cli-prereq.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory - Establish and maintain an accurate, detailed, and up-to-date inventory of all enterprise assets with the potential to store or process data. | x | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory - Maintain an accurate and up-to-date inventory of all technology assets with the potential to store or process information. | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------------------------------- | ----------- | +| | TA0003, TA0007, TA0008, TA0009, TA0042 | M1047 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.4/SKILL.md new file mode 100644 index 0000000000..085c9d5743 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.4/SKILL.md @@ -0,0 +1,152 @@ +--- +name: cis-aws-foundations-4.4 +description: "Ensure that server access logging is enabled on the CloudTrail S3 bucket" +category: cis-logging +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, logging, cloudtrail, s3, server-access-logging] +cis_id: "4.4" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that server access logging is enabled on the CloudTrail S3 bucket + +## Description + +Server access logging generates a log that contains access records for each request made to your S3 bucket. An access log record contains details about the request, such as the request type, the resources specified in the request worked, and the time and date the request was processed. It is recommended that server access logging be enabled on the CloudTrail S3 bucket. + +## Rationale + +By enabling server access logging on target S3 buckets, it is possible to capture all events that may affect objects within any target bucket. Configuring the logs to be placed in a separate bucket allows access to log information that can be useful in security and incident response workflows. In some environments (e.g., AWS Control Tower), logs may be delivered to the same bucket with appropriate prefixes, which is also an acceptable configuration. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS Console + +1. Go to the Amazon CloudTrail console at https://console.aws.amazon.com/cloudtrail/home. +2. In the API activity history pane on the left, click `Trails`. +3. In the Trails pane, note the bucket names in the S3 bucket column. +4. Sign in to the AWS Management Console and open the S3 console at https://console.aws.amazon.com/s3. +5. Under `All Buckets` click on a target S3 bucket. +6. Click on `Properties` in the top right of the console. +7. Scroll down to `Server access logging`. +8. Ensure `Server access logging` is `Enabled`. +9. Verify the `Target bucket` where logs are delivered. + +### Using AWS CLI + +1. Get the name of the S3 bucket that CloudTrail is logging to: + +```bash +aws cloudtrail describe-trails --query 'trailList[*].S3BucketName' +``` + +2. Ensure logging is enabled on the bucket: + +```bash +aws s3api get-bucket-logging --bucket +``` + +Ensure the command does not return an empty output. + +Sample output for a bucket with logging enabled: + +```json +{ + "LoggingEnabled": { + "TargetPrefix": "", + "TargetBucket": "" + } +} +``` + +## Expected Result + +The CloudTrail S3 bucket has server access logging enabled with a valid `TargetBucket` and `TargetPrefix` configured. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the S3 console at https://console.aws.amazon.com/s3. +2. Under `All Buckets` click on the target S3 bucket. +3. Click on `Properties` in the top right of the console. +4. Under `Server access logging`, click `Edit`. +5. Configure bucket logging: + - Check the `Enabled` box. + - Select a Target Bucket from the list. + - Enter a Target Prefix. +6. Click `Save`. + +### Using AWS CLI + +1. Get the name of the S3 bucket that CloudTrail is logging to: + +```bash +aws cloudtrail describe-trails --region --query trailList[*].S3BucketName +``` + +2. Create a logging configuration file and populate the following values: + +```json +{ + "LoggingEnabled": { + "TargetBucket": "", + "TargetPrefix": "", + "TargetGrants": [ + { + "Grantee": { + "Type": "AmazonCustomerByEmail", + "EmailAddress": "" + }, + "Permission": "FULL_CONTROL" + } + ] + } +} +``` + +3. Save the file as `.json` +4. Apply the logging configuration: + +```bash +aws s3api put-bucket-logging --bucket --bucket-logging-status file://.json +``` + +## Default Value + +By default, server access logging is disabled on S3 buckets, including those used for CloudTrail. Without enabling this setting, no record of access requests to the CloudTrail bucket is captured, leaving organizations without visibility into who accessed log files or how they were used. + +## References + +1. CCE-78918-0 +2. https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html +3. https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.14 Log Sensitive Data Access - Log sensitive data access, including modification and disposal. | | | x | +| v8 | 8.2 Collect Audit Logs - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | x | x | x | +| v7 | 6.2 Activate audit logging - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | +| v7 | 14.9 Enforce Detail Logging for Access or Changes to Sensitive Data - Enforce detailed audit logging for access to sensitive data or changes to sensitive data. | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------- | ----------- | +| | TA0005, TA0009 | M1047 | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.5/SKILL.md new file mode 100644 index 0000000000..035a02c2cb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.5/SKILL.md @@ -0,0 +1,169 @@ +--- +name: cis-aws-foundations-4.5 +description: "Ensure CloudTrail logs are encrypted at rest using KMS CMKs" +category: cis-logging +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, logging, cloudtrail, kms, encryption, sse-kms, cmk] +cis_id: "4.5" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure CloudTrail logs are encrypted at rest using KMS CMKs + +## Description + +AWS CloudTrail is a web service that records AWS API calls for an account and makes those logs available to users and resources in accordance with IAM policies. AWS Key Management Service (KMS) is a managed service that helps create and control the encryption keys used to encrypt account data, and uses Hardware Security Modules (HSMs) to protect the security of encryption keys. CloudTrail logs can be configured to leverage server side encryption (SSE) and KMS customer-created master keys (CMK) to further protect CloudTrail logs. It is recommended that CloudTrail be configured to use SSE-KMS. + +## Rationale + +Configuring CloudTrail to use SSE-KMS provides additional confidentiality controls on log data, as a given user must have S3 read permission on the corresponding log bucket and must be granted decrypt permission by the CMK policy. + +## Impact + +Customer-created keys incur an additional cost. See https://aws.amazon.com/kms/pricing/ for more information. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the CloudTrail console at https://console.aws.amazon.com/cloudtrail. +2. In the left navigation pane, choose `Trails`. +3. Select a trail. +4. In the `General details` section, select `Edit` to edit the trail configuration. +5. Ensure the box at `Log file SSE-KMS encryption` is checked and that a valid `AWS KMS alias` of a KMS key is entered in the respective text box. + +### Using AWS CLI + +1. Run the following command: + +```bash +aws cloudtrail describe-trails +``` + +2. For each trail listed, SSE-KMS is enabled if the trail has a `KmsKeyId` property defined. + +## Expected Result + +All CloudTrail trails have a `KmsKeyId` property defined, indicating SSE-KMS encryption is enabled. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the CloudTrail console at https://console.aws.amazon.com/cloudtrail. +2. In the left navigation pane, choose `Trails`. +3. Click on a trail. +4. Under the `S3` section, click the edit button (pencil icon). +5. Click `Advanced`. +6. Select an existing CMK from the `KMS key Id` drop-down menu. + - **Note:** Ensure the CMK is located in the same region as the S3 bucket. + - **Note:** You will need to apply a KMS key policy on the selected CMK in order for CloudTrail, as a service, to encrypt and decrypt log files using the CMK provided. View the AWS documentation for editing the selected CMK Key policy. +7. Click `Save`. +8. You will see a notification message stating that you need to have decryption permissions on the specified KMS key to decrypt log files. +9. Click `Yes`. + +### Using AWS CLI + +Run the following command to specify a KMS key ID to use with a trail: + +```bash +aws cloudtrail update-trail --name --kms-key-id +``` + +Run the following command to attach a key policy to a specified KMS key: + +```bash +aws kms put-key-policy --key-id --policy +``` + +### Additional Information + +Three statements that need to be added to the CMK policy: + +1. Enable CloudTrail to describe CMK properties: + +```json +{ + "Sid": "Allow CloudTrail access", + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Action": "kms:DescribeKey", + "Resource": "*" +} +``` + +2. Granting encrypt permissions: + +```json +{ + "Sid": "Allow CloudTrail to encrypt logs", + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Action": "kms:GenerateDataKey*", + "Resource": "*", + "Condition": { + "StringLike": { + "kms:EncryptionContext:aws:cloudtrail:arn": ["arn:aws:cloudtrail:*:aws-account-id:trail/*"] + } + } +} +``` + +3. Granting decrypt permissions: + +```json +{ + "Sid": "Enable CloudTrail log decrypt permissions", + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::aws-account-id:user/username" + }, + "Action": "kms:Decrypt", + "Resource": "*", + "Condition": { + "Null": { + "kms:EncryptionContext:aws:cloudtrail:arn": "false" + } + } +} +``` + +## Default Value + +By default, CloudTrail logs are not encrypted with a KMS CMK. Logs may be encrypted with SSE-S3, but this does not provide the same level of control or auditing as KMS CMKs. + +## References + +1. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/encrypting-cloudtrail-log-files-with-aws-kms.html +2. https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html +3. CCE-78919-8 +4. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/update-trail.html +5. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/kms/put-key-policy.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. | | x | x | +| v8 | 8.1 Establish and Maintain an Audit Log Management Process - Establish and maintain an audit log management process that defines the enterprise's logging requirements. | x | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest - Encrypt all sensitive information at rest using a tool that requires a secondary authentication mechanism not integrated into the operating system. | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1041 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.6/SKILL.md new file mode 100644 index 0000000000..29aecfaa40 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.6/SKILL.md @@ -0,0 +1,123 @@ +--- +name: cis-aws-foundations-4.6 +description: "Ensure rotation for customer-created symmetric CMKs is enabled" +category: cis-logging +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, logging, kms, key-rotation, cmk, encryption] +cis_id: "4.6" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure rotation for customer-created symmetric CMKs is enabled + +## Description + +AWS Key Management Service (KMS) allows customers to rotate the backing key, which is key material stored within the KMS that is tied to the key ID of the customer-created customer master key (CMK). The backing key is used to perform cryptographic operations such as encryption and decryption. Automated key rotation currently retains all prior backing keys so that decryption of encrypted data can occur transparently. It is recommended that CMK key rotation be enabled for symmetric keys. Key rotation cannot be enabled for any asymmetric CMK. + +## Rationale + +Rotating encryption keys helps reduce the potential impact of a compromised key, as data encrypted with a new key cannot be accessed with a previous key that may have been exposed. Keys should be rotated every year or upon an event that could result in the compromise of that key. + +## Impact + +Creation, management, and storage of CMKs may require additional time from an administrator. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the KMS console at: https://console.aws.amazon.com/kms. +2. In the left navigation pane, click `Customer-managed keys`. +3. Select a customer-managed CMK where `Key spec = SYMMETRIC_DEFAULT`. +4. Select the `Key rotation` tab. +5. Ensure the `Automatically rotate this KMS key every year` box is checked. +6. Repeat steps 3-5 for all customer-managed CMKs where `Key spec = SYMMETRIC_DEFAULT`. + +### Using AWS CLI + +1. Run the following command to get a list of all keys and their associated `KeyIds`: + +```bash +aws kms list-keys +``` + +2. For each key, note the KeyId and run the following command: + +```bash +aws kms describe-key --key-id +``` + +3. If the response contains `"KeySpec = SYMMETRIC_DEFAULT"`, run the following command: + +```bash +aws kms get-key-rotation-status --key-id +``` + +4. Ensure `KeyRotationEnabled` is set to `true`. +5. Repeat steps 2-4 for all remaining CMKs. +6. Alternatively, the following command can be used to check all keys more comprehensively: + +```bash +KEY_IDS=$(aws kms list-keys --query "Keys[].KeyId" --output text) + +for KEY_ID in $KEY_IDS; do + aws kms get-key-rotation-status --key-id "$KEY_ID" --query "{KeyId:KeyId,RotationEnabled:KeyRotationEnabled}" --output table +done +``` + +## Expected Result + +All customer-managed symmetric CMKs (`KeySpec = SYMMETRIC_DEFAULT`) have `KeyRotationEnabled` set to `true`. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and open the KMS console at: https://console.aws.amazon.com/kms. +2. In the left navigation pane, click `Customer-managed keys`. +3. Select a key with `Key spec = SYMMETRIC_DEFAULT` that does not have automatic rotation enabled. +4. Select the `Key rotation` tab. +5. Check the `Automatically rotate this KMS key every year` box. +6. Click `Save`. +7. Repeat steps 3-6 for all customer-managed CMKs that do not have automatic rotation enabled. + +### Using AWS CLI + +1. Run the following command to enable key rotation: + +```bash +aws kms enable-key-rotation --key-id +``` + +## Default Value + +By default, automatic key rotation is disabled for customer-managed symmetric CMKs. Key rotation must be explicitly enabled after key creation. + +## References + +1. https://aws.amazon.com/kms/pricing/ +2. https://csrc.nist.gov/publications/detail/sp/800-57-part-1/rev-5/final +3. CCE-78920-6 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest - Encrypt all sensitive information at rest using a tool that requires a secondary authentication mechanism not integrated into the operating system. | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1041 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.7/SKILL.md new file mode 100644 index 0000000000..de19eb047a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.7/SKILL.md @@ -0,0 +1,203 @@ +--- +name: cis-aws-foundations-4.7 +description: "Ensure VPC flow logging is enabled in all VPCs" +category: cis-logging +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, logging, vpc, flow-logs, network, cloudwatch] +cis_id: "4.7" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1] +prerequisites: [] +severity_boost: {} +--- + +# Ensure VPC flow logging is enabled in all VPCs + +## Description + +VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC. After you've created a flow log, you can view and retrieve its data in Amazon CloudWatch Logs. It is recommended that VPC Flow Logs be enabled for packet "Rejects" for VPCs. + +## Rationale + +VPC Flow Logs provide visibility into network traffic that traverses the VPC and can be used to detect anomalous traffic or gain insights during security workflows. + +## Impact + +By default, CloudWatch Logs will store logs indefinitely unless a specific retention period is defined for the log group. When choosing the number of days to retain, keep in mind that the average time it takes for an organization to realize they have been breached is 210 days (at the time of this writing). Since additional time is required to research a breach, a minimum retention policy of 365 days allows for detection and investigation. You may also wish to archive the logs to a cheaper storage service rather than simply deleting them. See the following AWS resource to manage CloudWatch Logs retention periods: + +1. https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/SettingLogRetention.html + +## Audit Procedure + +### Using AWS Console + +1. Sign into the management console. +2. Select `Services`, then select `VPC`. +3. In the left navigation pane, select `Your VPCs`. +4. Select a VPC. +5. In the right pane, select the `Flow Logs` tab. +6. Ensure a Log Flow exists that has `Active` in the `Status` column. + +### Using AWS CLI + +1. Run the `describe-vpcs` command (OSX/Linux/UNIX) to list the VPC networks available in the current AWS region: + +```bash +aws ec2 describe-vpcs --region --query Vpcs[].VpcId +``` + +The command output returns the `VpcId` of VPCs available in the selected region. + +2. Run the `describe-flow-logs` command (OSX/Linux/UNIX) using the VPC ID to determine if the selected virtual network has the Flow Logs feature enabled: + +```bash +aws ec2 describe-flow-logs --filter "Name=resource-id,Values=" +``` + +If there are no Flow Logs created for the selected VPC, the command output will return an empty list `[]`. + +3. Repeat step 2 for other VPCs in the same region. +4. Change the region by updating `--region`, and repeat steps 1-4 for each region. +5. Alternatively, the following command can be used to identify VPCs with and without Flow Logs: + +```bash +VPCS=$(aws ec2 describe-vpcs --query "Vpcs[].VpcId" --output text) + +for VPC in $VPCS; do + COUNT=$(aws ec2 describe-flow-logs --filter Name=resource-id,Values=$VPC --query "length(FlowLogs)" --output text) + + if [ "$COUNT" -gt 0 ]; then + echo "$VPC True" + else + echo "$VPC False" + fi +done +``` + +## Expected Result + +All VPCs in all regions have at least one active Flow Log configured. + +## Remediation + +### Using AWS Console + +1. Sign into the management console. +2. Select `Services`, then select `VPC`. +3. In the left navigation pane, select `Your VPCs`. +4. Select a VPC. +5. In the right pane, select the `Flow Logs` tab. +6. If no Flow Log exists, click `Create Flow Log`. +7. For Filter, select `Reject`. +8. Enter a `Role` and `Destination Log Group`. +9. Click `Create Log Flow`. +10. Click on `CloudWatch Logs Group`. + +**Note:** Setting the filter to "Reject" will dramatically reduce the accumulation of logging data for this recommendation and provide sufficient information for the purposes of breach detection, research, and remediation. However, during periods of least privilege security group engineering, setting the filter to "All" can be very helpful in discovering existing traffic flows required for the proper operation of an already running environment. + +### Using AWS CLI + +1. Create a policy document, name it `role_policy_document.json`, and paste the following content: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "test", + "Effect": "Allow", + "Principal": { + "Service": "vpc-flow-logs.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] +} +``` + +2. Create another policy document, name it `iam_policy.json`, and paste the following content: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:DescribeLogGroups", + "logs:DescribeLogStreams", + "logs:PutLogEvents", + "logs:GetLogEvents", + "logs:FilterLogEvents" + ], + "Resource": "*" + } + ] +} +``` + +3. Run the following command to create an IAM role: + +```bash +aws iam create-role --role-name --assume-role-policy-document file://role_policy_document.json +``` + +4. Run the following command to create an IAM policy: + +```bash +aws iam create-policy --policy-name --policy-document file://iam_policy.json +``` + +5. Run the `attach-group-policy` command, using the IAM policy ARN returned from the previous step to attach the policy to the IAM role: + +```bash +aws iam attach-group-policy --policy-arn arn:aws:iam:::policy/ --group-name +``` + +6. Run the `describe-vpcs` command to get a list of VPCs in the selected region: + +```bash +aws ec2 describe-vpcs --region +``` + +7. Run the `create-flow-logs` command to create a flow log for a VPC: + +```bash +aws ec2 create-flow-logs --resource-type VPC --resource-ids --traffic-type REJECT --log-group-name --deliver-logs-permission-arn +``` + +8. Repeat step 7 for other VPCs in the selected region. +9. Change the region by updating --region, and repeat the remediation procedure for each region. + +## Default Value + +By default, VPC Flow Logs are not enabled for any newly created VPCs. Logging must be manually configured on a per-VPC basis. + +## References + +1. CCE-79202-8 +2. https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | x | x | x | +| v8 | 13.6 Collect Network Traffic Flow Logs - Collect network traffic flow logs and/or network traffic to review and alert upon from network devices. | | x | x | +| v7 | 6.2 Activate audit logging - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | +| v7 | 12.5 Configure Monitoring Systems to Record Network Packets - Configure monitoring systems to record network packets passing through the boundary at each of the organization's network boundaries. | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| | | M1047 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.8/SKILL.md new file mode 100644 index 0000000000..20fb1fa568 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.8/SKILL.md @@ -0,0 +1,148 @@ +--- +name: cis-aws-foundations-4.8 +description: "Ensure that object-level logging for write events is enabled for S3 buckets" +category: cis-logging +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, logging, s3, object-level, cloudtrail, data-events, write] +cis_id: "4.8" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that object-level logging for write events is enabled for S3 buckets + +## Description + +S3 object-level API operations, such as GetObject, DeleteObject, and PutObject, are referred to as data events. By default, CloudTrail trails do not log data events, so it is recommended to enable object-level logging for S3 buckets. + +## Rationale + +Enabling object-level logging will help you meet data compliance requirements within your organization, perform comprehensive security analyses, monitor specific patterns of user behavior in your AWS account, or take immediate actions on any object-level API activity within your S3 buckets using Amazon CloudWatch Events. + +## Impact + +Enabling logging for these object-level events may significantly increase the number of events logged and may incur additional costs. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Management Console and navigate to the CloudTrail dashboard at `https://console.aws.amazon.com/cloudtrail/`. +2. In the left panel, click `Trails`, and then click the name of the trail that you want to examine. +3. Review `General details`. +4. Confirm that `Multi-region trail` is set to `Yes`. +5. Scroll down to `Data events` and confirm the configuration: + +- If `advanced event selectors` is being used, it should read: + +``` +Data Events: S3 +Log selector template +Log all events +``` + +- If `basic event selectors` is being used, it should read: + +``` +Data events: S3 +Bucket Name: All current and future S3 buckets +Write: Enabled +``` + +6. Repeat steps 2-5 to verify that each trail has multi-region enabled and is configured to log data events. If a trail does not have multi-region enabled and data event logging configured, refer to the remediation steps. + +### Using AWS CLI + +1. Run the `list-trails` command to list all trails: + +```bash +aws cloudtrail list-trails +``` + +2. The command output will be a list of trails: + +``` +"TrailARN": "arn:aws:cloudtrail:::trail/", +"Name": "", +"HomeRegion": "" +``` + +3. Run the `get-trail` command to determine whether a trail is a multi-region trail: + +```bash +aws cloudtrail get-trail --name --region +``` + +4. The command output should include: `"IsMultiRegionTrail": true`. + +5. Run the `get-event-selectors` command, using the `Name` of the trail and the `region` returned in step 2, to determine if data event logging is configured: + +```bash +aws cloudtrail get-event-selectors --region --trail-name --query EventSelectors[*].DataResources[] +``` + +6. The command output should be an array that includes the S3 bucket defined for data event logging: + +``` +"Type": "AWS::S3::Object", + "Values": [ + "arn:aws:s3" +``` + +7. If the `get-event-selectors` command returns an empty array, data events are not included in the trail's logging configuration; therefore, object-level API operations performed on S3 buckets within your AWS account are not being recorded. + +8. Repeat steps 1-7 to verify that each trail has multi-region enabled and is configured to log data events. If a trail does not have multi-region enabled and data event logging configured, refer to the remediation steps. + +## Expected Result + +At least one multi-region trail has S3 object-level write event logging enabled for all buckets. + +## Remediation + +### Using AWS Console + +1. Login to the AWS Management Console and navigate to the S3 dashboard at `https://console.aws.amazon.com/s3/`. +2. In the left navigation panel, click `buckets`, and then click the name of the S3 bucket you want to examine. +3. Click the `Properties` tab to see the bucket configuration in detail. +4. In the `AWS CloudTrail data events` section, select the trail name for recording activity. You can choose an existing trail or create a new one by clicking the `Configure in CloudTrail` button or navigating to the CloudTrail console. +5. Once the trail is selected, select the `Data Events` check box. +6. Select `S3` from the `Data event type` drop-down. +7. Select `Log all events` from the `Log selector template` drop-down. +8. Repeat steps 2-7 to enable object-level logging of write events for other S3 buckets. + +### Using AWS CLI + +1. To enable `object-level` data events logging for S3 buckets within your AWS account, run the `put-event-selectors` command using the name of the trail that you want to reconfigure as identifier: + +```bash +aws cloudtrail put-event-selectors --region --trail-name --event-selectors '[{ "ReadWriteType": "WriteOnly", "IncludeManagementEvents":true, "DataResources": [{ "Type": "AWS::S3::Object", "Values": ["arn:aws:s3:::/"] }] }]' +``` + +2. The command output will be `object-level` event trail configuration. +3. If you want to enable it for all buckets at once, change the Values parameter to `["arn:aws:s3"]` in the previous command. +4. Repeat step 1 for each s3 bucket to update `object-level` logging of write events. +5. Change the AWS region by updating the `--region` command parameter, and perform the process for the other regions. + +## Default Value + +By default, CloudTrail does not log object-level (data event) API operations for S3 buckets. Data event logging must be explicitly enabled per trail and bucket. + +## References + +1. https://docs.aws.amazon.com/AmazonS3/latest/user-guide/enable-cloudtrail-events.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs - Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation. | | x | x | +| v7 | 6.3 Enable Detailed Logging - Enable system logging to include detailed information such as an event source, date, user, timestamp, source addresses, destination addresses, and other useful elements. | | x | x | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.9/SKILL.md new file mode 100644 index 0000000000..117a3c4728 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-4.9/SKILL.md @@ -0,0 +1,135 @@ +--- +name: cis-aws-foundations-4.9 +description: "Ensure that object-level logging for read events is enabled for S3 buckets" +category: cis-logging +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, logging, s3, object-level, cloudtrail, data-events, read] +cis_id: "4.9" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that object-level logging for read events is enabled for S3 buckets + +## Description + +S3 object-level API operations, such as GetObject, DeleteObject, and PutObject, are referred to as data events. By default, CloudTrail trails do not log data events, so it is recommended to enable object-level logging for S3 buckets. + +## Rationale + +Enabling object-level logging will help you meet data compliance requirements within your organization, perform comprehensive security analyses, monitor specific patterns of user behavior in your AWS account, or take immediate actions on any object-level API activity within your S3 buckets using Amazon CloudWatch Events. + +## Impact + +Enabling logging for these object-level events may significantly increase the number of events logged and may incur additional costs. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Management Console and navigate to the CloudTrail dashboard at `https://console.aws.amazon.com/cloudtrail/`. +2. In the left panel, click `Trails`, and then click the name of the trail that you want to examine. +3. Review `General details`. +4. Confirm that `Multi-region trail` is set to `Yes`. +5. Scroll down to `Data events`. +6. Scroll down to `Data events` and confirm the configuration: + +- If `advanced event selectors` is being used, it should read: + +``` +Data Events: S3 +Log selector template +Log all events +``` + +- If `basic event selectors` is being used, it should read: + +``` +Data events: S3 +Bucket Name: All current and future S3 buckets +Read: Enabled +``` + +6. Repeat steps 2-5 to verify that each trail has multi-region enabled and is configured to log data events. If a trail does not have multi-region enabled and data event logging configured, refer to the remediation steps. + +### Using AWS CLI + +1. Run the `describe-trails` command to list all trail names: + +```bash +aws cloudtrail describe-trails --region --output table --query trailList[*].Name +``` + +2. The command output will be table of the trail names. + +3. For each trail, run the `get-trail` command to verify it is a multi-regional trail: + +```bash +aws cloudtrail get-trail --region --name \ + --query 'Trail.IsMultiRegionTrail' +``` + +4. Run the `get-event-selectors` command using the name of a trail returned at the previous step and custom query filters to determine if data event logging is configured: + +```bash +aws cloudtrail get-event-selectors --region --trail-name --query EventSelectors[*].DataResources[] +``` + +5. The command output should be an array that includes the S3 bucket defined for data event logging. +6. If the `get-event-selectors` command returns an empty array, data events are not included in the trail's logging configuration; therefore, object-level API operations performed on S3 buckets within your AWS account are not being recorded. +7. Repeat steps 1-5 to verify the configuration of each trail. +8. Change the AWS region by updating the `--region` command parameter, and perform the audit process for other regions. + +## Expected Result + +At least one multi-region trail has S3 object-level read event logging enabled for all buckets. + +## Remediation + +### Using AWS Console + +1. Login to the AWS Management Console and navigate to S3 dashboard at `https://console.aws.amazon.com/s3/`. +2. In the left navigation panel, click `buckets` and then click the name of the S3 bucket that you want to examine. +3. Click the `Properties` tab to see the bucket configuration in detail. +4. In the `AWS Cloud Trail data events` section, select the trail name for recording activity. You can choose an existing trail or create a new one by clicking the `Configure in CloudTrail` button or navigating to the CloudTrail console. +5. Once the trail is selected, select the `Data Events` check box. +6. Select `S3` from the `Data event type` drop-down. +7. Select `Log all events` from the `Log selector template` drop-down. +8. Repeat steps 2-7 to enable object-level logging of read events for other S3 buckets. + +### Using AWS CLI + +1. To enable `object-level` data events logging for S3 buckets within your AWS account, run the `put-event-selectors` command using the name of the trail that you want to reconfigure as identifier: + +```bash +aws cloudtrail put-event-selectors --region --trail-name --event-selectors '[{ "ReadWriteType": "ReadOnly", "IncludeManagementEvents":true, "DataResources": [{ "Type": "AWS::S3::Object", "Values": ["arn:aws:s3:::/"] }] }]' +``` + +2. The command output will be `object-level` event trail configuration. +3. If you want to enable it for all buckets at once, change the Values parameter to `["arn:aws:s3"]` in the previous command. +4. Repeat step 1 for each s3 bucket to update `object-level` logging of read events. +5. Change the AWS region by updating the `--region` command parameter, and perform the process for the other regions. + +## Default Value + +By default, CloudTrail does not log S3 object-level (data) events; only management events are logged unless explicitly enabled. + +## References + +1. https://docs.aws.amazon.com/AmazonS3/latest/user-guide/enable-cloudtrail-events.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs - Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation. | | x | x | +| v7 | 6.3 Enable Detailed Logging - Enable system logging to include detailed information such as an event source, date, user, timestamp, source addresses, destination addresses, and other useful elements. | | x | x | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.1/SKILL.md new file mode 100644 index 0000000000..eaf16d97fc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.1/SKILL.md @@ -0,0 +1,171 @@ +--- +name: cis-aws-foundations-5.1 +description: "Ensure unauthorized API calls are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, unauthorized-api] +cis_id: "5.1" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure unauthorized API calls are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is recommended that a metric filter and alarm be established for unauthorized API calls. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring unauthorized API calls will help reduce the time it takes to detect malicious activity and can alert you to potential security incidents. + +## Impact + +This alert may be triggered by normal read-only console activities that attempt to opportunistically gather optional information but gracefully fail if they lack the necessary permissions. + +If an excessive number of alerts are generated, then an organization may wish to consider adding read access to the limited IAM user permissions solely to reduce the number of alerts. + +In some cases, doing this may allow users to actually view some areas of the system; any additional access granted should be reviewed for alignment with the original limited IAM user intent. + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.errorCode ="*UnauthorizedOperation") || ($.errorCode ="AccessDenied*") && ($.sourceIPAddress!="delivery.logs.amazonaws.com") && ($.eventName!="HeadBucket") }", +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query "MetricAlarms[?MetricName == ]" +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching unauthorized API calls, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for unauthorized API calls and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=unauthorized_api_calls_metric,metricNamespace=CISBenchmark,metricValue=1 --filter-pattern "{ ($.errorCode ="*UnauthorizedOperation") || ($.errorCode ="AccessDenied*") && ($.sourceIPAddress!="delivery.logs.amazonaws.com") && ($.eventName!="HeadBucket") }" +``` + +**Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +**Note**: You can execute this command once and then reuse the same topic for all monitoring alarms. + +**Note**: Capture the `TopicArn` that is displayed when creating the SNS topic in step 2. + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +**Note**: You can execute this command once and then reuse the same subscription for all monitoring alarms. + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name "unauthorized_api_calls_alarm" --metric-name "unauthorized_api_calls_metric" --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace "CISBenchmark" --alarm-actions +``` + +## Default Value + +By default, no CloudWatch metric filters or alarms exist for unauthorized API calls. + +## References + +1. https://aws.amazon.com/sns/ +2. CCE-79186-3 +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +4. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +5. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | +| v7 | 6.5 Central Log Management | | x | x | +| v7 | 6.7 Regularly Review Logs | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.10/SKILL.md new file mode 100644 index 0000000000..1ef7774e26 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.10/SKILL.md @@ -0,0 +1,162 @@ +--- +name: cis-aws-foundations-5.10 +description: "Ensure security group changes are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, security-groups, vpc] +cis_id: "5.10" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure security group changes are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +Security groups are stateful packet filters that control ingress and egress traffic within a VPC. + +It is recommended that a metric filter and alarm be established to detect changes to security groups. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring changes to security groups will help ensure that resources and services are not unintentionally exposed. + +## Impact + +This may require additional 'tuning' to eliminate false positives and filter out expected activity so that anomalies are easier to detect. + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.eventName = AuthorizeSecurityGroupIngress) || ($.eventName = AuthorizeSecurityGroupEgress) || ($.eventName = RevokeSecurityGroupIngress) || ($.eventName = RevokeSecurityGroupEgress) || ($.eventName = CreateSecurityGroup) || ($.eventName = DeleteSecurityGroup) || ($.eventName = ModifySecurityGroupRules) }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query "MetricAlarms[?MetricName==]" +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching security group change events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for security groups changes and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=,metricNamespace="CISBenchmark",metricValue=1 --filter-pattern "{ ($.eventName = AuthorizeSecurityGroupIngress) || ($.eventName = AuthorizeSecurityGroupEgress) || ($.eventName = RevokeSecurityGroupIngress) || ($.eventName = RevokeSecurityGroupEgress) || ($.eventName = CreateSecurityGroup) || ($.eventName = DeleteSecurityGroup) || ($.eventName = ModifySecurityGroupRules) }" +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace "CISBenchmark" --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs security group events (e.g., AuthorizeSecurityGroupIngress, DeleteSecurityGroup), but no CloudWatch metric filters or alarms exist. These changes are captured but not actively monitored unless configured. + +## References + +1. CCE-79195-4 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html +5. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifySecurityGroupRules.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.11/SKILL.md new file mode 100644 index 0000000000..bcd44076a9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.11/SKILL.md @@ -0,0 +1,157 @@ +--- +name: cis-aws-foundations-5.11 +description: "Ensure Network Access Control List (NACL) changes are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, nacl, network-acl, vpc] +cis_id: "5.11" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Network Access Control List (NACL) changes are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +NACLs are used as a stateless packet filter to control ingress and egress traffic for subnets within a VPC. It is recommended that a metric filter and alarm be established for any changes made to NACLs. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring changes to NACLs will help ensure that AWS resources and services are not unintentionally exposed. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.eventName = CreateNetworkAcl) || ($.eventName = CreateNetworkAclEntry) || ($.eventName = DeleteNetworkAcl) || ($.eventName = DeleteNetworkAclEntry) || ($.eventName = ReplaceNetworkAclEntry) || ($.eventName = ReplaceNetworkAclAssociation) }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching NACL change events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for NACL changes and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = CreateNetworkAcl) || ($.eventName = CreateNetworkAclEntry) || ($.eventName = DeleteNetworkAcl) || ($.eventName = DeleteNetworkAclEntry) || ($.eventName = ReplaceNetworkAclEntry) || ($.eventName = ReplaceNetworkAclAssociation) }' +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs NACL events (e.g., CreateNetworkAcl, ReplaceNetworkAclEntry), but no CloudWatch metric filters or alarms exist. These changes are captured but not actively monitored unless configured. + +## References + +1. CCE-79196-2 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | +| v7 | 11.3 Use Automated Tools to Verify Standard Device Configurations and Detect Changes | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.12/SKILL.md new file mode 100644 index 0000000000..365965c451 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.12/SKILL.md @@ -0,0 +1,157 @@ +--- +name: cis-aws-foundations-5.12 +description: "Ensure changes to network gateways are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, network-gateway, internet-gateway, vpc] +cis_id: "5.12" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure changes to network gateways are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +Network gateways are required to send and receive traffic to a destination outside of a VPC. It is recommended that a metric filter and alarm be established for changes to network gateways. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring changes to network gateways will help ensure that all ingress/egress traffic traverses the VPC border via a controlled path. + +## Impact + +Monitoring changes to network gateways helps detect unauthorized modifications that could compromise network security. Implementing automated monitoring and alerts can improve incident response times, but it may require additional configuration and maintenance efforts. + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.eventName = CreateCustomerGateway) || ($.eventName = DeleteCustomerGateway) || ($.eventName = AttachInternetGateway) || ($.eventName = CreateInternetGateway) || ($.eventName = DeleteInternetGateway) || ($.eventName = DetachInternetGateway) }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching network gateway change events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for network gateways changes and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = CreateCustomerGateway) || ($.eventName = DeleteCustomerGateway) || ($.eventName = AttachInternetGateway) || ($.eventName = CreateInternetGateway) || ($.eventName = DeleteInternetGateway) || ($.eventName = DetachInternetGateway) }' +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs gateway events (e.g., CreateInternetGateway, AttachInternetGateway), but no CloudWatch metric filters or alarms exist. These changes are recorded but not actively monitored unless configured. + +## References + +1. CCE-79197-0 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.13/SKILL.md new file mode 100644 index 0000000000..164e744b57 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.13/SKILL.md @@ -0,0 +1,159 @@ +--- +name: cis-aws-foundations-5.13 +description: "Ensure route table changes are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, route-table, vpc, networking] +cis_id: "5.13" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure route table changes are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +Routing tables are used to route network traffic between subnets and to network gateways. + +It is recommended that a metric filter and alarm be established for changes to route tables. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring changes to route tables will help ensure that all VPC traffic flows through the expected path and prevent any accidental or intentional modifications that may lead to uncontrolled network traffic. An alarm should be triggered every time an AWS API call is performed to create, replace, delete, or disassociate a route table. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{($.eventSource = ec2.amazonaws.com) && ($.eventName = CreateRoute) || ($.eventName = CreateRouteTable) || ($.eventName = ReplaceRoute) || ($.eventName = ReplaceRouteTableAssociation) || ($.eventName = DeleteRouteTable) || ($.eventName = DeleteRoute) || ($.eventName = DisassociateRouteTable) }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching route table change events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for route table changes and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-pattern '{ ($.eventName = CreateRoute) || ($.eventName = CreateRouteTable) || ($.eventName = ReplaceRoute) || ($.eventName = ReplaceRouteTableAssociation) || ($.eventName = DeleteRouteTable) || ($.eventName = DeleteRoute) || ($.eventName = DisassociateRouteTable) }' --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs route table events (e.g., CreateRoute, DeleteRouteTable), but no CloudWatch metric filters or alarms exist. These changes are captured but not actively monitored unless configured. + +## References + +1. CCE-79198-8 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.14/SKILL.md new file mode 100644 index 0000000000..5f5239ff1b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.14/SKILL.md @@ -0,0 +1,159 @@ +--- +name: cis-aws-foundations-5.14 +description: "Ensure VPC changes are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, vpc, vpc-peering, networking] +cis_id: "5.14" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure VPC changes are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is possible to have more than one VPC within an account; additionally, it is also possible to create a peer connection between two VPCs, enabling network traffic to route between them. + +It is recommended that a metric filter and alarm be established for changes made to VPCs. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +VPCs in AWS are logically isolated virtual networks that can be used to launch AWS resources. Monitoring changes to VPC configurations will help ensure that VPC traffic flow is not negatively impacted. Changes to VPCs can affect network accessibility from the public internet and additionally impact VPC traffic flow to and from the resources launched in the VPC. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.eventName = CreateVpc) || ($.eventName = DeleteVpc) || ($.eventName = ModifyVpcAttribute) || ($.eventName = AcceptVpcPeeringConnection) || ($.eventName = CreateVpcPeeringConnection) || ($.eventName = DeleteVpcPeeringConnection) || ($.eventName = RejectVpcPeeringConnection) || ($.eventName = AttachClassicLinkVpc) || ($.eventName = DetachClassicLinkVpc) || ($.eventName = DisableVpcClassicLink) || ($.eventName = EnableVpcClassicLink) }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching VPC change events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for VPC changes and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = CreateVpc) || ($.eventName = DeleteVpc) || ($.eventName = ModifyVpcAttribute) || ($.eventName = AcceptVpcPeeringConnection) || ($.eventName = CreateVpcPeeringConnection) || ($.eventName = DeleteVpcPeeringConnection) || ($.eventName = RejectVpcPeeringConnection) || ($.eventName = AttachClassicLinkVpc) || ($.eventName = DetachClassicLinkVpc) || ($.eventName = DisableVpcClassicLink) || ($.eventName = EnableVpcClassicLink) }' +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs VPC events (e.g., CreateVpc, DeleteVpc, CreateVpcPeeringConnection), but no CloudWatch metric filters or alarms exist. These changes are recorded but not actively monitored unless configured. + +## References + +1. CCE-79199-6 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 5.5 Implement Automated Configuration Monitoring Systems | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.15/SKILL.md new file mode 100644 index 0000000000..11bbe9da85 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.15/SKILL.md @@ -0,0 +1,156 @@ +--- +name: cis-aws-foundations-5.15 +description: "Ensure AWS Organizations changes are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, organizations, multi-account] +cis_id: "5.15" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure AWS Organizations changes are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is recommended that a metric filter and alarm be established for changes made to AWS Organizations in the master AWS account. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring AWS Organizations changes can help you prevent unwanted, accidental, or intentional modifications that may lead to unauthorized access or other security breaches. This monitoring technique helps ensure that any unexpected changes made within your AWS Organizations can be investigated and that any unwanted changes can be rolled back. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.eventSource = organizations.amazonaws.com) && (($.eventName = "AcceptHandshake") || ($.eventName = "AttachPolicy") || ($.eventName = "CreateAccount") || ($.eventName = "CreateOrganizationalUnit") || ($.eventName = "CreatePolicy") || ($.eventName = "DeclineHandshake") || ($.eventName = "DeleteOrganization") || ($.eventName = "DeleteOrganizationalUnit") || ($.eventName = "DeletePolicy") || ($.eventName = "DetachPolicy") || ($.eventName = "DisablePolicyType") || ($.eventName = "EnablePolicyType") || ($.eventName = "InviteAccountToOrganization") || ($.eventName = "LeaveOrganization") || ($.eventName = "MoveAccount") || ($.eventName = "RemoveAccountFromOrganization") || ($.eventName = "UpdatePolicy") || ($.eventName = "UpdateOrganizationalUnit")) }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching AWS Organizations change events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for AWS Organizations changes and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventSource = organizations.amazonaws.com) && (($.eventName = "AcceptHandshake") || ($.eventName = "AttachPolicy") || ($.eventName = "CreateAccount") || ($.eventName = "CreateOrganizationalUnit") || ($.eventName = "CreatePolicy") || ($.eventName = "DeclineHandshake") || ($.eventName = "DeleteOrganization") || ($.eventName = "DeleteOrganizationalUnit") || ($.eventName = "DeletePolicy") || ($.eventName = "DetachPolicy") || ($.eventName = "DisablePolicyType") || ($.eventName = "EnablePolicyType") || ($.eventName = "InviteAccountToOrganization") || ($.eventName = "LeaveOrganization") || ($.eventName = "MoveAccount") || ($.eventName = "RemoveAccountFromOrganization") || ($.eventName = "UpdatePolicy") || ($.eventName = "UpdateOrganizationalUnit")) }' +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs AWS Organizations events (e.g., CreateAccount, AttachPolicy, DeleteOrganization), but no CloudWatch metric filters or alarms exist. These changes are recorded but not actively monitored unless configured. + +## References + +1. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +2. https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.16/SKILL.md new file mode 100644 index 0000000000..10adb3490d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.16/SKILL.md @@ -0,0 +1,115 @@ +--- +name: cis-aws-foundations-5.16 +description: "Ensure AWS Security Hub is enabled" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, security-hub, compliance, security-posture] +cis_id: "5.16" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure AWS Security Hub is enabled + +## Description + +Security Hub collects security data from various AWS accounts, services, and supported third-party partner products, helping you analyze your security trends and identify the highest-priority security issues. When you enable Security Hub, it begins to consume, aggregate, organize, and prioritize findings from the AWS services that you have enabled, such as Amazon GuardDuty, Amazon Inspector, and Amazon Macie. You can also enable integrations with AWS partner security products. + +## Rationale + +AWS Security Hub provides you with a comprehensive view of your security state in AWS and helps you check your environment against security industry standards and best practices, enabling you to quickly assess the security posture across your AWS accounts. + +## Impact + +It is recommended that AWS Security Hub be enabled in all regions. AWS Security Hub requires that AWS Config be enabled. + +## Audit Procedure + +### From Console + +1. Sign in to the AWS Management Console and open the AWS Security Hub console at https://console.aws.amazon.com/securityhub/. +2. On the top right of the console, select the target Region. +3. If the Security Hub > Summary page is displayed, then Security Hub is set up for the selected region. +4. If presented with "Setup Security Hub" or "Get Started With Security Hub," refer to the remediation steps. +5. Repeat steps 2 to 4 for each region. + +### From Command Line + +Run the following command to verify the Security Hub status: + +```bash +aws securityhub describe-hub +``` + +This will list the Security Hub status by region. Check for a `SubscribedAt` value. + +Example output: + +```json +{ + "HubArn": "", + "SubscribedAt": "2022-08-19T17:06:42.398Z", + "AutoEnableControls": true +} +``` + +An error will be returned if Security Hub is not enabled. + +Example error: + +``` +An error occurred (InvalidAccessException) when calling the DescribeHub operation: Account is not subscribed to AWS Security Hub +``` + +## Expected Result + +The `aws securityhub describe-hub` command returns a valid response with a `SubscribedAt` timestamp in each region, confirming that Security Hub is enabled and active. + +## Remediation + +### From Console + +1. Use the credentials of the IAM identity to sign in to the Security Hub console. +2. When you open the Security Hub console for the first time, choose `Go to Security Hub`. +3. The `Security standards` section on the welcome page lists supported security standards. Check the box for a standard to enable it. +4. Choose `Enable Security Hub`. + +### From Command Line + +1. Run the `enable-security-hub` command, including `--enable-default-standards` to enable the default standards: + +```bash +aws securityhub enable-security-hub --enable-default-standards +``` + +2. To enable Security Hub without the default standards, include `--no-enable-default-standards`: + +```bash +aws securityhub enable-security-hub --no-enable-default-standards +``` + +## Default Value + +By default, AWS Security Hub is not enabled. It must be manually set up in each region (and requires AWS Config) before findings can be aggregated or standards applied. + +## References + +1. https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-get-started.html +2. https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-enable.html#securityhub-enable-api +3. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securityhub/enable-security-hub.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 7.1 Establish and Maintain a Vulnerability Management Process | x | x | x | +| v7 | 11.3 Use Automated Tools to Verify Standard Device Configurations and Detect Changes | | x | x | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.2/SKILL.md new file mode 100644 index 0000000000..b997b2fff0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.2/SKILL.md @@ -0,0 +1,171 @@ +--- +name: cis-aws-foundations-5.2 +description: "Ensure management console sign-in without MFA is monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, mfa, console-signin] +cis_id: "5.2" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure management console sign-in without MFA is monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is recommended that a metric filter and alarm be established for console logins that are not protected by multi-factor authentication (MFA). + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring for single-factor console logins will increase visibility into accounts that are not protected by MFA. These type of accounts are more susceptible to compromise and unauthorized access. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.eventName = "ConsoleLogin") && ($.additionalEventData.MFAUsed != "Yes") }" +``` + +Or, to reduce false positives in case Single Sign-On (SSO) is used in the organization: + +``` +"filterPattern": "{ ($.eventName = "ConsoleLogin") && ($.additionalEventData.MFAUsed != "Yes") && ($.userIdentity.type = "IAMUser") && ($.responseElements.ConsoleLogin = "Success") }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName== ]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching console sign-in events without MFA, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for AWS Management Console sign-ins without MFA and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name `` --metric-transformations metricName= ``,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = "ConsoleLogin") && ($.additionalEventData.MFAUsed != "Yes") }' +``` + +Or, to reduce false positives in case Single Sign-On (SSO) is used in the organization: + +```bash +aws logs put-metric-filter --log-group-name --filter-name `` --metric-transformations metricName= ``,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = "ConsoleLogin") && ($.additionalEventData.MFAUsed != "Yes") && ($.userIdentity.type = "IAMUser") && ($.responseElements.ConsoleLogin = "Success") }' +``` + +**Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name `` --metric-name `` --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, no CloudWatch metric filters or alarms exist for console sign-ins without MFA. + +## References + +1. https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/viewing_metrics_with_cloudwatch.html +2. CCE-79187-1 +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +4. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +5. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.3/SKILL.md new file mode 100644 index 0000000000..2a810b78a0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.3/SKILL.md @@ -0,0 +1,159 @@ +--- +name: cis-aws-foundations-5.3 +description: "Ensure usage of the 'root' account is monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, root-account] +cis_id: "5.3" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure usage of the 'root' account is monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is recommended that a metric filter and alarm be established for 'root' login attempts to detect unauthorized use or attempts to use the root account. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring 'root' account logins will provide visibility into the use of a fully privileged account and the opportunity to reduce its usage. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ $.userIdentity.type = "Root" && $.userIdentity.invokedBy NOT EXISTS && $.eventType != "AwsServiceEvent" }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching root account usage, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for 'root' account usage and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name `` --filter-name `` --metric-transformations metricName= `` ,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ $.userIdentity.type = "Root" && $.userIdentity.invokedBy NOT EXISTS && $.eventType != "AwsServiceEvent" }' +``` + +**Note**: You can choose your own `metricName` and `metricNamespace` strings. Using the same `metricNamespace` for all Foundations Benchmark metrics will group them together. + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name `` --metric-name `` --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, no CloudWatch metric filters or alarms exist to monitor root account activity. Root usage is logged in CloudTrail, but proactive monitoring must be configured. + +## References + +1. CCE-79188-9 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 4.9 Log and Alert on Unsuccessful Administrative Account Login | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.4/SKILL.md new file mode 100644 index 0000000000..649188baac --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.4/SKILL.md @@ -0,0 +1,156 @@ +--- +name: cis-aws-foundations-5.4 +description: "Ensure IAM policy changes are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, iam, policy-changes] +cis_id: "5.4" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure IAM policy changes are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is recommended that a metric filter and alarm be established for changes made to Identity and Access Management (IAM) policies. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring changes to IAM policies will help ensure authentication and authorization controls remain intact. + +## Impact + +Monitoring these changes may result in a number of "false positives," especially in larger environments. This alert may require more tuning than others to eliminate some of those erroneous notifications. + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{($.eventName=DeleteGroupPolicy)||($.eventName=DeleteRolePolicy)||($.eventName=DeleteUserPolicy)||($.eventName=PutGroupPolicy)||($.eventName=PutRolePolicy)||($.eventName=PutUserPolicy)||($.eventName=CreatePolicy)||($.eventName=DeletePolicy)||($.eventName=CreatePolicyVersion)||($.eventName=DeletePolicyVersion)||($.eventName=AttachRolePolicy)||($.eventName=DetachRolePolicy)||($.eventName=AttachUserPolicy)||($.eventName=DetachUserPolicy)||($.eventName=AttachGroupPolicy)||($.eventName=DetachGroupPolicy)}" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching IAM policy change events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for IAM policy changes and the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name `` --filter-name `` --metric-transformations metricName= ``,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{($.eventName=DeleteGroupPolicy)||($.eventName=DeleteRolePolicy)||($.eventName=DeleteUserPolicy)||($.eventName=PutGroupPolicy)||($.eventName=PutRolePolicy)||($.eventName=PutUserPolicy)||($.eventName=CreatePolicy)||($.eventName=DeletePolicy)||($.eventName=CreatePolicyVersion)||($.eventName=DeletePolicyVersion)||($.eventName=AttachRolePolicy)||($.eventName=DetachRolePolicy)||($.eventName=AttachUserPolicy)||($.eventName=DetachUserPolicy)||($.eventName=AttachGroupPolicy)||($.eventName=DetachGroupPolicy)}' +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name `` --metric-name `` --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail records IAM policy change events, but no CloudWatch metric filters or alarms are configured. This means changes (e.g., CreatePolicy, AttachRolePolicy, DeletePolicy) are logged but not actively monitored or alerted on unless you explicitly set up filters and alarms. + +## References + +1. CCE-79189-7 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.5/SKILL.md new file mode 100644 index 0000000000..13b1454ae6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.5/SKILL.md @@ -0,0 +1,156 @@ +--- +name: cis-aws-foundations-5.5 +description: "Ensure CloudTrail configuration changes are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, cloudtrail-changes] +cis_id: "5.5" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure CloudTrail configuration changes are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is recommended that a metric filter and alarm be used to detect changes to CloudTrail's configurations. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring changes to CloudTrail's configuration will help ensure sustained visibility into the activities performed in the AWS account. + +## Impact + +Ensuring that changes to CloudTrail configurations are monitored enhances security by maintaining the integrity of logging mechanisms. Automated monitoring can provide real-time alerts; however, it may require additional setup and resources to configure and manage these alerts effectively. These steps can be performed manually within a company's existing SIEM platform in cases where CloudTrail logs are monitored outside of the AWS monitoring tools in CloudWatch. + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.eventName = CreateTrail) || ($.eventName = UpdateTrail) || ($.eventName = DeleteTrail) || ($.eventName = StartLogging) || ($.eventName = StopLogging) }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching CloudTrail configuration change events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for CloudTrail configuration changes and the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = CreateTrail) || ($.eventName = UpdateTrail) || ($.eventName = DeleteTrail) || ($.eventName = StartLogging) || ($.eventName = StopLogging) }' +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs configuration change events (e.g., CreateTrail, UpdateTrail, DeleteTrail, StartLogging, StopLogging), but no CloudWatch metric filters or alarms are set up. This means changes are recorded in CloudTrail, yet they are not actively monitored or alerted on unless filters and alarms are manually configured. + +## References + +1. CCE-79190-5 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.6/SKILL.md new file mode 100644 index 0000000000..df9925603b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.6/SKILL.md @@ -0,0 +1,157 @@ +--- +name: cis-aws-foundations-5.6 +description: "Ensure AWS Management Console authentication failures are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, console-auth-failures] +cis_id: "5.6" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure AWS Management Console authentication failures are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is recommended that a metric filter and alarm be established for failed console authentication attempts. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring failed console logins may decrease the lead time to detect an attempt to brute-force a credential, which may provide an indicator, such as the source IP address, that can be used in other event correlations. + +## Impact + +Monitoring for these failures may generate a large number of alerts, especially in larger environments. + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.eventName = ConsoleLogin) && ($.errorMessage = "Failed authentication") }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching failed console authentication events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for AWS management Console login failures and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = ConsoleLogin) && ($.errorMessage = "Failed authentication") }' +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs failed console authentication attempts, but no CloudWatch metric filters or alarms are configured. This means failed sign-in events are recorded, yet they are not proactively monitored or alerted on until filters and alarms are explicitly set up. + +## References + +1. CCE-79191-3 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 4.9 Log and Alert on Unsuccessful Administrative Account Login | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.7/SKILL.md new file mode 100644 index 0000000000..0932e06b46 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.7/SKILL.md @@ -0,0 +1,156 @@ +--- +name: cis-aws-foundations-5.7 +description: "Ensure disabling or scheduled deletion of customer created CMKs is monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, kms, cmk, encryption] +cis_id: "5.7" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure disabling or scheduled deletion of customer created CMKs is monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is recommended that a metric filter and alarm be established for customer-created CMKs that have changed state to disabled or are scheduled for deletion. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Data encrypted with disabled or deleted keys will no longer be accessible. Changes in the state of a CMK should be monitored to ensure that the change is intentional. + +## Impact + +Creation, storage, and management of CMK may require additional labor compared to the use of AWS-managed keys. + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{($.eventSource = kms.amazonaws.com) && (($.eventName=DisableKey)||($.eventName=ScheduleKeyDeletion)) }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching CMK disabling or scheduled deletion events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for CMKs that have been disabled or scheduled for deletion and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{($.eventSource = kms.amazonaws.com) && (($.eventName=DisableKey)||($.eventName=ScheduleKeyDeletion)) }' +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs KMS events (DisableKey, ScheduleKeyDeletion), but no CloudWatch metric filters or alarms are set. These changes are recorded but not actively monitored unless configured. + +## References + +1. CCE-79192-1 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.8/SKILL.md new file mode 100644 index 0000000000..94a3fd97bf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.8/SKILL.md @@ -0,0 +1,157 @@ +--- +name: cis-aws-foundations-5.8 +description: "Ensure S3 bucket policy changes are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, s3, bucket-policy] +cis_id: "5.8" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure S3 bucket policy changes are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is recommended that a metric filter and alarm be established for changes to S3 bucket policies. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring changes to S3 bucket policies may reduce the time it takes to detect and correct permissive policies on sensitive S3 buckets. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.eventSource = s3.amazonaws.com) && (($.eventName = PutBucketAcl) || ($.eventName = PutBucketPolicy) || ($.eventName = PutBucketCors) || ($.eventName = PutBucketLifecycle) || ($.eventName = PutBucketReplication) || ($.eventName = DeleteBucketPolicy) || ($.eventName = DeleteBucketCors) || ($.eventName = DeleteBucketLifecycle) || ($.eventName = DeleteBucketReplication)) }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching S3 bucket policy change events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for changes to S3 bucket policies and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventSource = s3.amazonaws.com) && (($.eventName = PutBucketAcl) || ($.eventName = PutBucketPolicy) || ($.eventName = PutBucketCors) || ($.eventName = PutBucketLifecycle) || ($.eventName = PutBucketReplication) || ($.eventName = DeleteBucketPolicy) || ($.eventName = DeleteBucketCors) || ($.eventName = DeleteBucketLifecycle) || ($.eventName = DeleteBucketReplication)) }' +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs S3 bucket policy changes (e.g., PutBucketPolicy, DeleteBucketPolicy), but no CloudWatch metric filters or alarms exist. These events are recorded but not actively monitored unless configured. + +## References + +1. CCE-79193-9 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.9/SKILL.md new file mode 100644 index 0000000000..ec8881f817 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-5.9/SKILL.md @@ -0,0 +1,155 @@ +--- +name: cis-aws-foundations-5.9 +description: "Ensure AWS Config configuration changes are monitored" +category: cis-monitoring +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, monitoring, cloudwatch, cloudtrail, metric-filters, alarms, aws-config, configuration-changes] +cis_id: "5.9" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-4.1, cis-aws-foundations-4.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure AWS Config configuration changes are monitored + +## Description + +Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms. + +It is recommended that a metric filter and alarm be established for detecting changes to AWS Config's configurations. + +## Rationale + +CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting. + +Monitoring changes to the AWS Config configuration will help ensure sustained visibility of the configuration items within the AWS account. + +## Impact + +N/A + +## Audit Procedure + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured: + +1. Identify the log group name that is configured for use with the active multi-region CloudTrail trail: + +- List all CloudTrail trails: + +```bash +aws cloudtrail describe-trails +``` + +- Identify multi-region CloudTrail trails: Trails with `"IsMultiRegionTrail"` set to `true` +- Note the value associated with `"Name":` +- Note the `` within the value associated with `"CloudWatchLogsLogGroupArn"` + - Example: `arn:aws:logs:::log-group::*` + +- Ensure the identified multi-region CloudTrail trail is active: + +```bash +aws cloudtrail get-trail-status --name +``` + +- Ensure `IsLogging` is set to `TRUE` + +- Ensure the identified multi-region CloudTrail trail captures all management events: + +```bash +aws cloudtrail get-event-selectors --trail-name +``` + +- Ensure there is at least one event selector for a trail with `IncludeManagementEvents` set to `true` and `ReadWriteType` set to `All` + +2. Get a list of all associated metric filters for the `` captured in step 1: + +```bash +aws logs describe-metric-filters --log-group-name +``` + +3. Ensure the output from the above command contains the following: + +``` +"filterPattern": "{ ($.eventSource = config.amazonaws.com) && (($.eventName=StopConfigurationRecorder)||($.eventName=DeleteDeliveryChannel)||($.eventName=PutDeliveryChannel)||($.eventName=PutConfigurationRecorder)) }" +``` + +4. Note the `` value associated with the `filterPattern` from step 3. + +5. Get a list of CloudWatch alarms, and filter on the `` captured in step 4: + +```bash +aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName==]' +``` + +6. Note the `AlarmActions` value; this will provide the SNS topic ARN value. + +7. Ensure there is at least one active subscriber to the SNS topic: + +```bash +aws sns list-subscriptions-by-topic --topic-arn +``` + +- At least one subscription should have "SubscriptionArn" with a valid AWS ARN. + - Example of valid "SubscriptionArn": `arn:aws:sns::::` + +## Expected Result + +A metric filter exists with the filter pattern matching AWS Config configuration change events, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber. + +## Remediation + +### Using AWS CLI + +If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription: + +1. Create a metric filter based on the provided filter pattern that checks for AWS Configuration changes and uses the `` taken from audit step 1: + +```bash +aws logs put-metric-filter --log-group-name --filter-name --metric-transformations metricName=,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventSource = config.amazonaws.com) && (($.eventName=StopConfigurationRecorder)||($.eventName=DeleteDeliveryChannel)||($.eventName=PutDeliveryChannel)||($.eventName=PutConfigurationRecorder)) }' +``` + +2. Create an SNS topic that the alarm will notify: + +```bash +aws sns create-topic --name +``` + +3. Create an SNS subscription for the topic created in step 2: + +```bash +aws sns subscribe --topic-arn --protocol --notification-endpoint +``` + +4. Create an alarm that is associated with the CloudWatch Logs metric filter created in step 1 and the SNS topic created in step 2: + +```bash +aws cloudwatch put-metric-alarm --alarm-name --metric-name --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions +``` + +## Default Value + +By default, CloudTrail logs AWS Config events (e.g., StopConfigurationRecorder, DeleteDeliveryChannel), but no CloudWatch metric filters or alarms exist. These changes are captured but not actively monitored unless configured. + +## References + +1. CCE-79194-7 +2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html +3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html +4. https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.1.1/SKILL.md new file mode 100644 index 0000000000..d487d6cb20 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.1.1/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-aws-foundations-6.1.1 +description: "Ensure EBS volume encryption is enabled in all regions" +category: cis-networking +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, networking, ec2, ebs, encryption] +cis_id: "6.1.1" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-6.1.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure EBS volume encryption is enabled in all regions + +## Description + +Elastic Compute Cloud (EC2) supports encryption at rest when using the Elastic Block Store (EBS) service. While disabled by default, forcing encryption at EBS volume creation is supported. + +## Rationale + +Encrypting data at rest reduces the likelihood of unintentional exposure and can nullify the impact of disclosure if the encryption remains unbroken. + +## Impact + +Losing access to or removing the KMS key used by the EBS volumes will result in the inability to access the volumes. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Management Console and open the Amazon EC2 console using https://console.aws.amazon.com/ec2/. +2. Under `Account attributes`, click `Data Protection and Security`. +3. Under `EBS encryption`, verify that `Always encrypt new EBS volumes` displays `Enabled`. +4. Repeat for each region in use. + +**Note:** EBS volume encryption is configured per region. + +### Using AWS CLI + +1. Run the following command: + +```bash +aws --region ec2 get-ebs-encryption-by-default +``` + +2. Verify that `"EbsEncryptionByDefault": true` is displayed. +3. Repeat for each region in use. + +## Expected Result + +`"EbsEncryptionByDefault": true` should be displayed for every region in use. + +## Remediation + +### Using AWS Console + +1. Login to the AWS Management Console and open the Amazon EC2 console using https://console.aws.amazon.com/ec2/. +2. Under `Account attributes`, click `Data protection and security`. +3. Under `EBS encryption`, Click `Manage`. +4. Check the `Enable` box to default encryption. +5. Click `Update EBS encryption`. +6. Repeat for each region in which EBS volume encryption is not enabled by default. + +### Using AWS CLI + +1. Run the following command: + +```bash +aws --region ec2 enable-ebs-encryption-by-default +``` + +2. Verify that `"EbsEncryptionByDefault": true` is displayed. +3. Repeat for each region in which EBS volume encryption is not enabled by default. + +**Note:** EBS volume encryption is configured per region. + +## Default Value + +By default, EBS volume encryption is disabled. It must be manually enabled per region; otherwise, new EBS volumes are created unencrypted. + +## References + +1. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html +2. https://aws.amazon.com/blogs/aws/new-opt-in-to-default-encryption-for-new-ebs-volumes/ + +## Additional Information + +Default EBS volume encryption only applies to newly created EBS volumes; existing EBS volumes are **not** converted automatically. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1041 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.1.2/SKILL.md new file mode 100644 index 0000000000..79c1747305 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.1.2/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-aws-foundations-6.1.2 +description: "Ensure CIFS access is restricted to trusted networks to prevent unauthorized access" +category: cis-networking +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, networking, ec2, security-groups, cifs] +cis_id: "6.1.2" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-6.1.1, cis-aws-foundations-6.3, cis-aws-foundations-6.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure CIFS access is restricted to trusted networks to prevent unauthorized access + +## Description + +Common Internet File System (CIFS) is a network file-sharing protocol that allows systems to share files over a network. However, unrestricted CIFS access can expose your data to unauthorized users, leading to potential security risks. It is important to restrict CIFS access to only trusted networks and users to prevent unauthorized access and data breaches. + +## Rationale + +Allowing unrestricted CIFS access can lead to significant security vulnerabilities, as it may allow unauthorized users to access sensitive files and data. By restricting CIFS access to known and trusted networks, you can minimize the risk of unauthorized access and protect sensitive data from exposure to potential attackers. Implementing proper network access controls and permissions is essential for maintaining the security and integrity of your file-sharing systems. + +## Impact + +Restricting CIFS access may require additional configuration and management effort. However, the benefits of enhanced security and reduced risk of unauthorized access to sensitive data far outweigh the potential challenges. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS Management Console. +2. Navigate to the EC2 Dashboard and select the Security Groups section under `Network & Security`. +3. Identify the security groups associated with instances or resources that may be using CIFS. +4. Review the inbound rules of each security group to check for rules that allow unrestricted access on port 445 (the port used by CIFS). + - Specifically, look for inbound rules that allow access from `0.0.0.0/0` or `::/0` on port 445. +5. Document any instances where unrestricted access is allowed and verify whether it is necessary for the specific use case. + +### Using AWS CLI + +1. Run the following command to list all security groups and identify those associated with CIFS: + +```bash +aws ec2 describe-security-groups --region --query 'SecurityGroups[*].GroupId' +``` + +2. Check for any inbound rules that allow unrestricted access on port 445 using the following command: + +```bash +aws ec2 describe-security-groups --region < region-name > --group-ids --query "SecurityGroups[*].IpPermissions[?((IpProtocol=='-1') || (FromPort<=\`445\` && ToPort>=\`445\`))].{IpProtocol:IpProtocol,FromPort:FromPort,ToPort:ToPort,CIDRv4:IpRanges[*].CidrIp,CIDRv6:Ipv6Ranges[*].CidrIpv6}" +``` + +- Look for `0.0.0.0/0` or `::/0` in the output, which indicates unrestricted access. + +3. Repeat the audit for other regions and security groups as necessary. + +## Expected Result + +No security group should have inbound rules allowing unrestricted access (from `0.0.0.0/0` or `::/0`) on port 445 (CIFS). + +## Remediation + +### Using AWS Console + +1. Login to the AWS Management Console. +2. Navigate to the EC2 Dashboard and select the Security Groups section under `Network & Security`. +3. Identify the security group that allows unrestricted ingress on port 445. +4. Select the security group and click the `Edit Inbound Rules` button. +5. Locate the rule allowing unrestricted access on port 445 (typically listed as `0.0.0.0/0` or `::/0`). +6. Modify the rule to restrict access to specific IP ranges or trusted networks only. +7. Save the changes to the security group. + +### Using AWS CLI + +1. Run the following command to remove or modify the unrestricted rule for CIFS access: + +```bash +aws ec2 revoke-security-group-ingress --region --group-id --protocol tcp --port 445 --cidr 0.0.0.0/0 +``` + +- Optionally, run the `authorise-security-group-ingress` command to create a new rule, specifying a trusted CIDR range instead of `0.0.0.0/0`. + +2. Confirm the changes by describing the security group again and ensuring the unrestricted access rule has been removed or appropriately restricted: + +```bash +aws ec2 describe-security-groups --region --group-ids --query "SecurityGroups[*].IpPermissions[?((IpProtocol=='-1') || (FromPort<=\`445\` && ToPort>=\`445\`))].{IpProtocol:IpProtocol,FromPort:FromPort,ToPort:ToPort,CIDRv4:IpRanges[*].CidrIp,CIDRv6:Ipv6Ranges[*].CidrIpv6}" +``` + +3. Repeat the remediation for other security groups and regions as necessary. + +## Default Value + +By default, security groups can allow unrestricted CIFS access (port 445) if configured, including 0.0.0.0/0 or ::/0. AWS does not automatically restrict this; controls must be set manually to limit access to trusted networks. + +## References + +None specified in the benchmark. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.5 Implement and Manage a Firewall on End-User Devices | x | x | x | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------- | ----------- | +| T1530 | TA0009, TA0010 | M1037 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.2/SKILL.md new file mode 100644 index 0000000000..c766c654cb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.2/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-aws-foundations-6.2 +description: "Ensure no Network ACLs allow ingress from 0.0.0.0/0 to remote server administration ports" +category: cis-networking +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, networking, nacl, vpc, ssh, rdp] +cis_id: "6.2" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-6.3, cis-aws-foundations-6.4, cis-aws-foundations-6.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure no Network ACLs allow ingress from 0.0.0.0/0 to remote server administration ports + +## Description + +The Network Access Control List (NACL) function provides stateless filtering of ingress and egress network traffic to AWS resources. It is recommended that no NACL allows unrestricted ingress access to remote server administration ports, such as SSH on port 22 and RDP on port 3389, using either the TCP (6), UDP (17), or ALL (-1) protocols. + +## Rationale + +Public access to remote server administration ports, such as 22 (when used for SSH, not SFTP) and 3389, increases the attack surface of resources and unnecessarily raises the risk of resource compromise. + +## Impact + +None specified. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. +2. In the left pane, click `Network ACLs`. +3. For each network ACL, check whether it is associated with one or more subnets. +4. If it is associated, proceed to Step 5. +5. If it is not associated, you may still review the rules, but note it has no effect until attached. +6. Select the network ACL. +7. Click the Inbound Rules tab. +8. Ensure that no rule exists which has a port range that includes port 22 or 3389, uses the protocols TCP (6), UDP (17), or ALL (-1), or other remote server administration ports for your environment, has a Source of 0.0.0.0/0, and shows ALLOW. + +**Note:** + +- A port value of ALL or a port range such as 0-3389 includes port 22, 3389, and potentially other remote server administration ports. +- An effective ruleset that explicitly DENIES access to these ports (e.g., a DENY rule for ports 22 and 3389 from 0.0.0.0/0 placed before a broader ALLOW rule such as ANY/ANY) is considered acceptable, as NACLs are evaluated in order and the DENY rule will take precedence. + +### Using AWS CLI + +The CLI command to see all the matching ACLs bound to a subnet is: + +```bash +aws ec2 describe-network-acls --filters "Name=association.subnet-id,Values=*" --query 'NetworkAcls[].{ACL_ID:NetworkAclId, Subnet_ID:Associations[].SubnetId, Rules:Entries[?Egress==true && RuleAction==allow && (CidrBlock==0.0.0.0/0 || Ipv6CidrBlock==::/0)].{RuleNumber:RuleNumber, Action:RuleAction, Protocol:Protocol, CidrBlock:CidrBlock, Ipv6CidrBlock:Ipv6CidrBlock, PortRange:PortRange}}' --output table +``` + +For unattached ACLs: + +```bash +aws ec2 describe-network-acls --query 'NetworkAcls[].{ACL_ID:NetworkAclId, Subnet_ID:Associations[].SubnetId, Rules:Entries[?Egress==true && RuleAction==allow && (CidrBlock==0.0.0.0/0 || Ipv6CidrBlock==::/0)].{RuleNumber:RuleNumber, Action:RuleAction, Protocol:Protocol, CidrBlock:CidrBlock, Ipv6CidrBlock:Ipv6CidrBlock, PortRange:PortRange}}' --output table +``` + +## Expected Result + +No Network ACL should have inbound rules allowing traffic from 0.0.0.0/0 to port 22 or 3389. + +## Remediation + +### Using AWS Console + +1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. +2. In the left pane, click `Network ACLs`. +3. For each network ACL that needs remediation, perform the following: +4. Select the network ACL. +5. Click the `Inbound Rules` tab. +6. Click `Edit inbound rules`. +7. Either: + A) update the Source field to a range other than 0.0.0.0/0 + B) click `Delete` to remove the offending inbound rule + C) Add an explicit DENY rule for the affected ports (e.g., 22, 3389) from 0.0.0.0/0 with a lower rule number than any broader ALLOW rule +8. Click `Save`. + +### Using AWS CLI + +No specific CLI remediation commands were provided in the benchmark. + +## Default Value + +By default, NACLs start with rules that allow all inbound/outbound traffic (or deny all if custom), and administrators may configure them to allow 0.0.0.0/0. AWS does not automatically restrict ports like SSH (22) or RDP (3389); controls must be set manually. + +## References + +1. https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html +2. https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Security.html#VPC_Security_Comparison + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | +| v7 | 12.4 Deny Communication over Unauthorized Ports | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1070 | TA0011 | M1037 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.3/SKILL.md new file mode 100644 index 0000000000..1c1d3c39fb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.3/SKILL.md @@ -0,0 +1,125 @@ +--- +name: cis-aws-foundations-6.3 +description: "Ensure no security groups allow ingress from 0.0.0.0/0 to remote server administration ports" +category: cis-networking +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, networking, security-groups, vpc, ssh, rdp] +cis_id: "6.3" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-6.2, cis-aws-foundations-6.4, cis-aws-foundations-6.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure no security groups allow ingress from 0.0.0.0/0 to remote server administration ports + +## Description + +Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH on port 22 and RDP on port 3389, using either the TCP (6), UDP (17), or ALL (-1) protocols. + +## Rationale + +Public access to remote server administration ports, such as 22 (when used for SSH, not SFTP) and 3389, increases the attack surface of resources and unnecessarily raises the risk of resource compromise. + +## Impact + +When updating an existing environment, ensure that administrators have access to remote server administration ports through another mechanism before removing access by deleting the 0.0.0.0/0 inbound rule. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. +2. In the left pane, click `Security Groups`. +3. For each security group, perform the following: + - Select the security group. + - Click the `Inbound Rules` tab. + - Ensure that no rule exists which has a port range including port 22 or 3389, uses the protocols TCP (6), UDP (17), or ALL (-1), or other remote server administration ports for your environment, and has a `Source` of `0.0.0.0/0`. + +**Note:** + +- A port value of ALL or a port range such as 0-3389 includes port 22, 3389, and potentially other remote server administration ports. +- Security groups are stateful and do not support explicit DENY rules. Therefore, an "effective ruleset" approach (e.g., allowing ANY/ANY but denying specific ports) is not applicable. Any rule that allows 0.0.0.0/0 access to administrative ports is considered non-compliant and must be removed or restricted. + +### Using AWS CLI + +1. Check all security groups for insecure inbound rules allowing traffic from 0.0.0.0/0: + +```bash +aws ec2 describe-security-group-rules --query 'SecurityGroupRules[?CidrIpv4 == "0.0.0.0/0" && IsEgress == `false`]' --output json +``` + +## Expected Result + +No security group should have inbound rules allowing traffic from 0.0.0.0/0 to port 22 or 3389. + +## Remediation + +### Using AWS Console + +1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. +2. In the left pane, click `Security Groups`. +3. For each security group, perform the following: + - Select the security group. + - Click the `Inbound Rules` tab. + - Click the `Edit inbound rules` button. +4. Identify the rules to be edited or removed. +5. Either: + A) update the Source field to a range other than 0.0.0.0/0, or B) click `Delete` to remove the offending inbound rule. + - Click `Save rules`. + +### Using AWS CLI + +1. Check all security groups for insecure inbound rules allowing traffic from 0.0.0.0/0: + +```bash +aws ec2 describe-security-group-rules --query 'SecurityGroupRules[?CidrIpv4 == "0.0.0.0/0" && IsEgress == `false`]' --output json +``` + +2. Delete the insecure rule(s) based on their rule ID: + +```bash +aws ec2 delete-security-group-rules --group-id --security-group-rule-ids +``` + +3. Recreate necessary security group rules: + +```bash +aws ec2 authorize-security-group-ingress --group-id --protocol --port --cidr +``` + +## Default Value + +By default, security groups may be configured to allow unrestricted ingress (0.0.0.0/0) on ports like SSH (22) or RDP (3389). AWS does not block this automatically; restrictions must be applied manually. + +## References + +1. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html#deleting-security-group-rule + +## Additional Information + +Use the following command to list all potentially non-compliant security groups in a table format: + +``` +aws ec2 describe-security-groups --query "SecurityGroups[?IpPermissions[?IpRanges[?CidrIp=='0.0.0.0/0']]].{GroupId:GroupId,GroupName:GroupName,Description:Description,VpcId:VpcId,InboundRules:IpPermissions[].{Protocol:IpProtocol,FromPort:FromPort,ToPort:ToPort,CidrIpv4:IpRanges[].CidrIp,CidrIpv6:Ipv6Ranges[*].CidrIpv6}}" --output table +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.5 Implement and Manage a Firewall on End-User Devices | x | x | x | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1070 | TA0011 | M1037 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.4/SKILL.md new file mode 100644 index 0000000000..7d5ab0bdb3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.4/SKILL.md @@ -0,0 +1,116 @@ +--- +name: cis-aws-foundations-6.4 +description: "Ensure no security groups allow ingress from ::/0 to remote server administration ports" +category: cis-networking +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, networking, security-groups, vpc, ssh, rdp, ipv6] +cis_id: "6.4" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-6.2, cis-aws-foundations-6.3, cis-aws-foundations-6.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure no security groups allow ingress from ::/0 to remote server administration ports + +## Description + +Security groups provide stateful filtering of ingress and egress network traffic to AWS resources. It is recommended that no security group allows unrestricted ingress access to remote server administration ports, such as SSH on port 22 and RDP on port 3389, using either the TCP (6), UDP (17), or ALL (-1) protocols. + +## Rationale + +Public access to remote server administration ports, such as 22 (when used for SSH, not SFTP) and 3389, increases attack surface of resources and unnecessarily raises the risk of resource compromise. + +## Impact + +When updating an existing environment, ensure that administrators have access to remote server administration ports through another mechanism before removing access by deleting the ::/0 inbound rule. + +## Audit Procedure + +### Using AWS Console + +1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. +2. In the left pane, click `Security Groups`. +3. For each security group, perform the following: + - Select the security group. + - Click the `Inbound Rules` tab. + - Ensure that no rule exists which has a port range including port 22, 3389, or other remote server administration ports for your environment, and has a `Source` of `::/0`. + +**Note:** + +- A port value of ALL or a port range such as 0-3389 includes port 22, 3389, and potentially other remote server administration ports. +- Security groups are stateful and do not support explicit DENY rules. Therefore, an "effective ruleset" approach (e.g., allowing ANY/ANY but denying specific ports) is not applicable. Any rule that allows ::/0 access to administrative ports is considered non-compliant and must be removed or restricted. + +### Using AWS CLI + +1. Check all security groups for insecure inbound rules that allow traffic from ::/0: + +```bash +aws ec2 describe-security-group-rules --query 'SecurityGroupRules[?CidrIpv6 == `::/0` && IsEgress == `false`]' --output json +``` + +## Expected Result + +No security group should have inbound rules allowing traffic from ::/0 to port 22 or 3389. + +## Remediation + +### Using AWS Console + +1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. +2. In the left pane, click `Security Groups`. +3. For each security group, perform the following: + - Select the security group. + - Click the `Inbound Rules` tab. + - Click the `Edit inbound rules` button. + - Identify the rules to be edited or removed. + - Either A) update the Source field to a range other than ::/0, or B) Click `Delete` to remove the offending inbound rule. + - Click `Save rules`. + +### Using AWS CLI + +1. Check all security groups for insecure inbound rules that allow traffic from ::/0: + +```bash +aws ec2 describe-security-group-rules --query 'SecurityGroupRules[?CidrIpv6 == `::/0` && IsEgress == `false`]' --output json +``` + +2. Delete the insecure rule(s) based on the rule ID: + +```bash +aws ec2 delete-security-group-rules --group-id --security-group-rule-ids +``` + +3. Recreate necessary security group rules: + +```bash +aws ec2 authorize-security-group-ingress --group-id --protocol --port --cidr +``` + +## Default Value + +By default, security groups may allow unrestricted IPv6 ingress (::/0) on ports like SSH (22) or RDP (3389). AWS does not block this automatically; restrictions must be applied manually. + +## References + +1. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html#deleting-security-group-rule + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.5 Implement and Manage a Firewall on End-User Devices | x | x | x | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1070 | TA0011 | M1037 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.5/SKILL.md new file mode 100644 index 0000000000..17c2821153 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.5/SKILL.md @@ -0,0 +1,170 @@ +--- +name: cis-aws-foundations-6.5 +description: "Ensure the default security group of every VPC restricts all traffic" +category: cis-networking +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, networking, security-groups, vpc, default-security-group] +cis_id: "6.5" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-6.3, cis-aws-foundations-6.4, cis-aws-foundations-6.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure the default security group of every VPC restricts all traffic + +## Description + +A VPC comes with a default security group whose initial settings deny all inbound traffic, allow all outbound traffic, and allow all traffic between instances assigned to the security group. If a security group is not specified when an instance is launched, it is automatically assigned to this default security group. Security groups provide stateful filtering of ingress/egress network traffic to AWS resources. It is recommended that the default security group restrict all traffic, both inbound and outbound. + +The default VPC in every region should have its default security group updated to comply with the following: + +- No inbound rules. +- No outbound rules. + +Any newly created VPCs will automatically contain a default security group that will need remediation to comply with this recommendation. + +**Note:** When implementing this recommendation, VPC flow logging is invaluable in determining the least privilege port access required by systems to work properly, as it can log all packet acceptances and rejections occurring under the current security groups. This dramatically reduces the primary barrier to least privilege engineering by discovering the minimum ports required by systems in the environment. Even if the VPC flow logging recommendation in this benchmark is not adopted as a permanent security measure, it should be used during any period of discovery and engineering for least privileged security groups. + +## Rationale + +Configuring all VPC default security groups to restrict all traffic will encourage the development of least privilege security groups and promote the mindful placement of AWS resources into security groups, which will, in turn, reduce the exposure of those resources. + +## Impact + +Implementing this recommendation in an existing VPC that contains operating resources requires extremely careful migration planning, as the default security groups are likely enabling many ports that are unknown. Enabling VPC flow logging (for accepted connections) in an existing environment that is known to be breach-free will reveal the current pattern of ports being used for each instance to communicate successfully. The migration process should include: + +- Analyzing VPC flow logs to understand current traffic patterns. +- Creating least privilege security groups based on the analyzed data. +- Testing the new security group rules in a staging environment before applying them to production. + +## Audit Procedure + +### Using AWS Console + +**Security Group State:** + +1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. +2. Repeat the following steps for all VPCs, including the default VPC in each AWS region: +3. In the left pane, click `Security Groups`. +4. For each default security group, perform the following: + - Select the `default` security group. + - Click the `Inbound Rules` tab and ensure no rules exist. + - Click the `Outbound Rules` tab and ensure no rules exist. + +**Security Group Members:** + +1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. +2. Repeat the following steps for all default groups in all VPCs, including the default VPC in each AWS region: +3. In the left pane, click `Security Groups`. +4. Copy the ID of the default security group. +5. Change to the EC2 Management Console at https://console.aws.amazon.com/ec2/v2/home. +6. In the filter column type `Security Group ID : `. + +### Using AWS CLI + +1. List all default security groups in the specified region: + +```bash +aws ec2 describe-security-groups --region --query 'SecurityGroups[?GroupName == `default`]' +``` + +2. Check if the inbound rules (IpPermissions) and outbound rules (IpPermissionsEgress) of the default security group are empty. If the rules are not empty, proceed and note down the Security Group ID (GroupId) of the security group with non-empty rules. + +3. List the inbound security group rule IDs (SecurityGroupRuleId): + +```bash +aws ec2 describe-security-group-rules --region --query 'SecurityGroupRules[?GroupId == `` && IsEgress == `false`]' +``` + +## Expected Result + +The default security group in every VPC should have no inbound rules and no outbound rules. + +## Remediation + +**Security Group Members:** + +1. Identify AWS resources that exist within the default security group. +2. Create a set of least-privilege security groups for those resources. +3. Place the resources in those security groups, removing the resources noted in step 1 from the default security group. + +### Using AWS Console + +1. Login to the AWS VPC Console at https://console.aws.amazon.com/vpc/home. +2. Repeat the following steps for all VPCs, including the default VPC in each AWS region: +3. In the left pane, click `Security Groups`. +4. For each default security group, perform the following: + - Select the `default` security group. + - Click the `Inbound Rules` tab. + - Remove any inbound rules. + - Click the `Outbound Rules` tab. + - Remove any Outbound rules. + +### Using AWS CLI + +1. List all default security groups in the specified region: + +```bash +aws ec2 describe-security-groups --region --query 'SecurityGroups[?GroupName == `default`]' +``` + +2. Check if the inbound rules (IpPermissions) and outbound rules (IpPermissionsEgress) of the default security group are empty. If the rules are not empty, proceed and note down the Security Group ID (GroupId) of the security group with non-empty rules. + +3. List the inbound security group rule IDs (SecurityGroupRuleId): + +```bash +aws ec2 describe-security-group-rules --region --query 'SecurityGroupRules[?GroupId == `` && IsEgress == `false`]' +``` + +4. Delete the inbound security group rules based on their rule IDs: + +```bash +aws ec2 revoke-security-group-ingress --group-id --security-group-rule-ids +``` + +5. List the outbound security group rule IDs (SecurityGroupRuleId): + +```bash +aws ec2 describe-security-group-rules --region --query 'SecurityGroupRules[?GroupId == `` && IsEgress == `true`]' +``` + +6. Delete the outbound security group rules based on their rule IDs: + +```bash +aws ec2 revoke-security-group-egress --group-id --security-group-rule-ids +``` + +**Recommended:** IAM groups allow you to edit the "name" field. After remediating default group rules for all VPCs in all regions, edit this field to add text similar to "DO NOT USE. DO NOT ADD RULES." + +## Default Value + +By default, each VPC has a "default" security group that allows all outbound traffic and all traffic between resources within the group. No restrictions are enforced unless manually configured. + +## References + +1. CCE-79201-0 +2. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html +3. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html#default-security-group + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v8 | 4.5 Implement and Manage a Firewall on End-User Devices | x | x | x | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1071 | TA0011 | M1037 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.6/SKILL.md new file mode 100644 index 0000000000..b858856617 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.6/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-aws-foundations-6.6 +description: "Ensure routing tables for VPC peering are least access" +category: cis-networking +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, networking, vpc, vpc-peering, route-tables] +cis_id: "6.6" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-6.5, cis-aws-foundations-6.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure routing tables for VPC peering are "least access" + +## Description + +Once a VPC peering connection is established, routing tables must be updated to enable any connections between the peered VPCs. These routes can be as specific as desired, even allowing for the peering of a VPC to only a single host on the other side of the connection. + +It is recommended that a metric filter and alarm be established for changes made to VPCs. + +## Rationale + +Being highly selective in peering routing tables is a very effective way to minimize the impact of a breach, as resources outside of these routes are inaccessible to the peered VPC. + +## Impact + +None specified. + +## Audit Procedure + +### Using AWS Console + +Review the routing tables of peered VPCs to determine whether they route all subnets of each VPC and whether this is necessary to accomplish the intended purposes of peering the VPCs. + +### Using AWS CLI + +1. List all the route tables from a VPC and check if the "GatewayId" is pointing to a `` (e.g., pcx-1a2b3c4d) and if the "DestinationCidrBlock" is as specific as desired: + +```bash +aws ec2 describe-route-tables --filter "Name=vpc-id,Values=" --query "RouteTables[*].{RouteTableId:RouteTableId, VpcId:VpcId, Routes:Routes, AssociatedSubnets:Associations[*].SubnetId}" +``` + +2. Alternatively, the following command can be used for improved readability: + +```bash +aws ec2 describe-route-tables --query "RouteTables[].{RouteTableId:RouteTableId, VpcId:VpcId, Routes:Routes, AssociatedSubnets:Associations[].SubnetId}" --output table +``` + +## Expected Result + +Routing tables for VPC peering connections should have the most specific CIDR blocks possible, routing only the minimum required subnets or hosts -- not entire VPC CIDR ranges. + +## Remediation + +### Using AWS Console + +Review route table entries and remove overly permissive routes to peered VPCs, replacing them with specific routes to only the required subnets or hosts. + +### Using AWS CLI + +1. For each `` that contains routes that are non-compliant with your routing policy (granting more access than desired), delete the non-compliant route: + +```bash +aws ec2 delete-route --route-table-id --destination-cidr-block +``` + +2. Create a new compliant route: + +```bash +aws ec2 create-route --route-table-id --destination-cidr-block --vpc-peering-connection-id +``` + +## Default Value + +By default, AWS allows full routing between peered VPCs once routes are added. There is no automatic restriction to "least access" -- administrators must manually scope routes to the minimum required CIDR blocks or hosts. + +## References + +1. https://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/peering-configurations-partial-access.html +2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/create-vpc-peering-connection.html + +## Additional Information + +If an organization has an AWS Transit Gateway implemented in its VPC architecture, it should look to apply the recommendation above for a "least access" routing architecture at the AWS Transit Gateway level, in combination with what must be implemented at the standard VPC route table. More specifically, to route traffic between two or more VPCs via a Transit Gateway, VPCs must have an attachment to a Transit Gateway route table as well as a route. Therefore, to avoid routing traffic between VPCs, an attachment to the Transit Gateway route table should only be added where there is an intention to route traffic between the VPCs. As Transit Gateways are capable of hosting multiple route tables, it is possible to group VPCs by attaching them to a common route table. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 13.4 Perform Traffic Filtering Between Network Segments | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1210 | TA0008 | M1030 | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.7/SKILL.md new file mode 100644 index 0000000000..60636c01cf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.7/SKILL.md @@ -0,0 +1,132 @@ +--- +name: cis-aws-foundations-6.7 +description: "Ensure that the EC2 Metadata Service only allows IMDSv2" +category: cis-networking +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, networking, ec2, imdsv2, metadata, ssrf] +cis_id: "6.7" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-6.1.1, cis-aws-foundations-6.1.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that the EC2 Metadata Service only allows IMDSv2 + +## Description + +When enabling the Metadata Service on AWS EC2 instances, users have the option of using either Instance Metadata Service Version 1 (IMDSv1; a request/response method) or Instance Metadata Service Version 2 (IMDSv2; a session-oriented method). + +## Rationale + +Instance metadata is data about your instance that you can use to configure or manage the running instance. Instance metadata is divided into categories, such as host name, events, and security groups. + +When enabling the Metadata Service on AWS EC2 instances, users have the option of using either Instance Metadata Service Version 1 (IMDSv1; a request/response method) or Instance Metadata Service Version 2 (IMDSv2; a session-oriented method). With IMDSv2, every request is now protected by session authentication. A session begins and ends a series of requests that software running on an EC2 instance uses to access the locally stored EC2 instance metadata and credentials. + +Allowing Version 1 of the service may open EC2 instances to Server-Side Request Forgery (SSRF) attacks, so Amazon recommends utilizing Version 2 for better instance security. + +## Impact + +None specified. + +## Audit Procedure + +### Using AWS Console + +1. Sign in to the AWS Management Console and navigate to the EC2 dashboard at https://console.aws.amazon.com/ec2/. +2. In the left navigation panel, under the `Instances` section, choose `Instances`. +3. Select the EC2 instance that you want to examine. +4. Check the `IMDSv2` status, and ensure that it is set to `Required`. + +### Using AWS CLI + +1. Run the `describe-instances` command using appropriate filters to list the IDs of all existing EC2 instances currently available in the selected region: + +```bash +aws ec2 describe-instances --region --output table --query "Reservations[*].Instances[*].InstanceId" +``` + +The command output should return a table with the requested instance IDs. + +2. Run the `describe-instances` command using the instance ID returned in the previous step and apply custom filtering to determine whether the selected instance is using IMDSv2: + +```bash +aws ec2 describe-instances --region --instance-ids --query "Reservations[*].Instances[*].MetadataOptions" --output table +``` + +3. Ensure that for all EC2 instances, `HttpTokens` is set to `required` and `State` is set to `applied`. + +4. Repeat steps 2 and 3 to verify the other EC2 instances provisioned within the current region. + +5. Repeat steps 1-4 to perform the audit process for other AWS regions. + +6. Alternatively, the following command can be used to identify instances still using IMDSv1: + +```bash +aws ec2 describe-instances --region --query "Reservations[].Instances[?MetadataOptions.HttpTokens=='optional'][] | [].{ID: InstanceId, Tokens: MetadataOptions.HttpTokens, State: MetadataOptions.State}" --output table +``` + +## Expected Result + +For all EC2 instances, `HttpTokens` should be set to `required` and `State` should be `applied`, indicating that only IMDSv2 is allowed. + +## Remediation + +### Using AWS Console + +1. Sign in to the AWS Management Console and navigate to the EC2 dashboard at https://console.aws.amazon.com/ec2/. +2. In the left navigation panel, under the `INSTANCES` section, choose `Instances`. +3. Select the EC2 instance that you want to examine. +4. Choose `Actions` > `Instance Settings` > `Modify instance metadata options`. +5. Set `Instance metadata service` to `Enable`. +6. Set `IMDSv2` to `Required`. +7. Repeat steps 1-6 to perform the remediation process for other EC2 instances in all applicable AWS region(s). + +### Using AWS CLI + +1. Run the `describe-instances` command, applying the appropriate filters to list the IDs of all existing EC2 instances currently available in the selected region: + +```bash +aws ec2 describe-instances --region --output table --query "Reservations[*].Instances[*].InstanceId" +``` + +2. The command output should return a table with the requested instance IDs. + +3. Run the `modify-instance-metadata-options` command with an instance ID obtained from the previous step to update the Instance Metadata Version: + +```bash +aws ec2 modify-instance-metadata-options --instance-id --http-tokens required --region +``` + +4. Repeat steps 1-3 to perform the remediation process for other EC2 instances in the same AWS region. + +5. Change the region by updating `--region` and repeat the process for other regions. + +## Default Value + +By default, new EC2 instances support both IMDSv1 and IMDSv2. IMDSv1 (less secure) remains enabled unless explicitly restricted, so IMDSv2 must be manually required. + +## References + +1. https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/ +2. https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 5.2 Maintain Secure Images | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1190 | TA0001 | M1051 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.8/SKILL.md new file mode 100644 index 0000000000..b6f4efeaf3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_Amazon_Web_Services_Foundations_Benchmark_v7.0.0/cis-aws-foundations-6.8/SKILL.md @@ -0,0 +1,186 @@ +--- +name: cis-aws-foundations-6.8 +description: "Ensure VPC Endpoints are used for access to AWS Services" +category: cis-networking +version: "7.0.0" +author: cyberstrike-official +tags: [cis, aws, networking, vpc, vpc-endpoints, privatelink, s3, dynamodb] +cis_id: "6.8" +cis_benchmark: "CIS AWS Foundations Benchmark v7.0.0" +tech_stack: [aws] +cwe_ids: [] +chains_with: [cis-aws-foundations-6.5, cis-aws-foundations-6.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure VPC Endpoints are used for access to AWS Services + +## Description + +Ensure that Amazon VPCs use VPC endpoints (gateway or interface endpoints) for access to AWS services such as Amazon S3 and DynamoDB, so that traffic from workloads to AWS services stays on the Amazon private network instead of traversing the public internet. VPC endpoints provide private connectivity between VPCs and supported AWS services without requiring an internet gateway, NAT gateway, or public IP addresses. + +## Rationale + +Accessing AWS services over the public internet increases exposure to network-level threats, relies on internet routing, and makes it harder to tightly control egress paths. Using VPC endpoints allows workloads to reach AWS services over the Amazon private network, which reduces reliance on internet gateways and NAT gateways, simplifies egress filtering, and helps enforce data-perimeter and "private-only" patterns for sensitive workloads. + +## Impact + +Enforcing the use of VPC endpoints may require changes to existing network architectures, including creating and managing endpoints in each VPC, updating route tables, adjusting security groups, and potentially removing or tightening some internet/NAT gateway paths. This can introduce additional operational overhead and cost (per-endpoint charges for interface endpoints) and may require updates to IaC templates and deployment pipelines. + +## Audit Procedure + +### Using AWS CLI + +1. Identify in-scope VPCs and services. + - Determine which VPCs host production or sensitive workloads that should access AWS services securely via endpoints. + - For those VPCs, identify the AWS services they depend on (for example, S3 for data storage, DynamoDB for database, etc.). + +2. For each in-scope VPC, check for existing VPC endpoints: + +```bash +aws ec2 describe-vpc-endpoints \ + --region REGION \ + --filters "Name=vpc-id,Values=VPC_ID" \ + --query "VpcEndpoints[*].[VpcEndpointId,VpcEndpointType,ServiceName,State]" \ + --output table +``` + +- Provide the REGION and VPC_ID. +- `VpcEndpointType` tells you whether the endpoint is Gateway or Interface. +- `ServiceName` shows which AWS service the endpoint is for (for example, com.amazonaws.us-east-1.s3, com.amazonaws.us-east-1.dynamodb, com.amazonaws.us-east-1.ssm). + +3. For each interface endpoint, verify subnet attachment across relevant AZs/subnets: + +```bash +aws ec2 describe-vpc-endpoints \ + --region REGION \ + --vpc-endpoint-ids INTERFACE_ENDPOINT_ID \ + --query "VpcEndpoints[*].[VpcEndpointId,ServiceName,SubnetIds,State]" \ + --output json +``` + +- Provide the REGION and INTERFACE_ENDPOINT_ID. + +4. For each gateway endpoint, verify that the route tables for the relevant subnets send traffic to the endpoint (via the AWS-managed prefix list), not via internet/NAT gateways. + - Identify relevant subnets in the VPC that need to have a route to gateway endpoint: + +```bash +aws ec2 describe-subnets \ + --region REGION \ + --filters "Name=vpc-id,Values=,VPC_ID" \ + --query "Subnets[*].[SubnetId,AvailabilityZone,MapPublicIpOnLaunch,CidrBlock]" \ + --output table +``` + +- Provide the REGION and VPC_ID. +- For each relevant subnet, identify the route table associated with it: + +```bash +aws ec2 describe-route-tables \ + --region REGION \ + --filters "Name=association.subnet-id,Values=SUBNET_ID" \ + --query "RouteTables[*].RouteTableId" \ + --output text +``` + +- Provide the REGION and SUBNET_ID. +- For each route table associated with relevant subnets, inspect routes: + +```bash +aws ec2 describe-route-tables \ + --region REGION \ + --route-table-ids ROUTE_TABLE_ID \ + --query "RouteTables[0].Routes[*].[DestinationPrefixListId,GatewayId,NatGatewayId,State]" \ + --output table +``` + +- Provide the REGION and ROUTE_TABLE_ID. + +For S3/DynamoDB gateway endpoints, you should see a DestinationPrefixListId (for example, pl-xxxxxxxx) with GatewayId equal to the endpoint (vpce-xxxx). If S3/DynamoDB are used by workloads in those subnets but traffic is only routed via igw-xxxx or nat-xxxx (and no prefix-list/endpoint route exists), then VPC endpoints are not being used for securing network traffic for these services. + +## Expected Result + +Each in-scope VPC should have VPC endpoints configured for the AWS services it depends on, with gateway endpoints having proper route table entries and interface endpoints attached to the relevant subnets. + +## Remediation + +### Using AWS CLI + +In this example, we are going to add S3 gateway endpoint and SQS interface endpoint to a VPC. You can follow similar remediation instructions for other services. + +1. Create S3 Gateway Endpoint: + +```bash +aws ec2 create-vpc-endpoint \ + --region REGION \ + --route-table-ids ROUTE_TABLE_ID \ + --vpc-id VPC_ID \ + --service-name com.amazonaws.REGION.s3 \ + --vpc-endpoint-type Gateway \ + --query "VpcEndpoint.VpcEndpointId" \ + --output text +``` + +- Provide values for REGION, ROUTE_TABLE_ID, VPC_ID. +- AWS automatically creates the routes for the AWS service in the route table provided as part of above command. + +2. Verify that the gateway routes have been adequately created: + +```bash +aws ec2 describe-route-tables \ + --region REGION --route-table-ids ROUTE_TABLE_ID \ + --query "RouteTables[0].Routes[?DestinationPrefixListId=='pl-xxxxxxxx']" +``` + +- Provide values for REGION, ROUTE_TABLE_ID. +- pl-xxxxxxxx: replace with the specific prefix list for S3 in that region. + +3. Create an SQS Interface Endpoint: + +```bash +aws ec2 create-vpc-endpoint \ + --vpc-id VPC_ID \ + --service-name com.amazonaws.REGION.sqs \ + --vpc-endpoint-type Interface \ + --subnet-ids PRIVATE_SUBNET_1_ID PRIVATE_SUBNET_2_ID \ + --security-group-ids SECURITY_GROUP_ID \ + --vpc-endpoint-policy VPC_ENDPOINT_POLICY \ + --query "VpcEndpoint.VpcEndpointId" \ + --output text +``` + +- SECURITY_GROUP_ID: Update security groups for interface endpoint. Ensure the interface endpoint security group allows inbound traffic from your workloads. +- VPC_ENDPOINT_POLICY: Create a restrictive Endpoint policy to ensure only certain AWS services could be reached and only specific actions can be performed. +- AWS automatically creates Elastic Network Interfaces (ENIs) for the interface endpoint which allows any traffic from PRIVATE_SUBNET_1_ID and PRIVATE_SUBNET_2_ID intended for SQS to be routed through the Interface Gateway. + +4. Test and validate endpoint connectivity from an EC2 instance in a private subnet: + - Test S3 (gateway endpoint): + +```bash +aws s3 ls s3://your-test-bucket --region REGION +``` + +- Test SQS (interface endpoint): + +```bash +aws sqs list-queues --region REGION +``` + +## Default Value + +By default, VPC endpoints are not created. Traffic to AWS services is routed over the public internet via internet gateways or NAT gateways unless VPC endpoints are explicitly configured. + +## References + +None specified in the benchmark. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.1/SKILL.md new file mode 100644 index 0000000000..c264e300a6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.1/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-gcp-foundations-1.1 +description: "Ensure That Corporate Login Credentials Are Used" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, service-accounts, mfa, kms, api-keys] +cis_id: "1.1" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1 Ensure That Corporate Login Credentials Are Used (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Use corporate login credentials instead of consumer accounts, such as Gmail accounts. + +## Rationale + +It is recommended fully-managed corporate Google accounts be used for increased visibility, auditing, and controlling access to Cloud Platform resources. Email accounts based outside of the user's organization, such as consumer accounts, should not be used for business purposes. + +## Impact + +There will be increased overhead as maintaining accounts will now be required. For smaller organizations, this will not be an issue, but will balloon with size. + +## Audit Procedure + +For each Google Cloud Platform project, list the accounts that have been granted access to that project. + +**From Google Cloud CLI** + +1. List the accounts added on each project: + +```bash +gcloud projects get-iam-policy PROJECT_ID +``` + +2. Also list the accounts added on each folder: + +```bash +gcloud resource-manager folders get-iam-policy FOLDER_ID +``` + +3. And list your organization's IAM policy: + +```bash +gcloud organizations get-iam-policy ORGANIZATION_ID +``` + +## Expected Result + +No email accounts outside the organization domain should be granted permissions in the IAM policies. This excludes Google-owned service accounts. + +## Remediation + +Remove all consumer Google accounts from IAM policies. Follow the documentation and setup corporate login accounts. + +**Prevention:** + +To ensure that no email addresses outside the organization can be granted IAM permissions to its Google Cloud projects, folders or organization, turn on the Organization Policy for `Domain Restricted Sharing`. Learn more at: +https://cloud.google.com/resource-manager/docs/organization-policy/restricting-domains + +**From Google Cloud Console** + +Follow the documentation to set up corporate login accounts and remove consumer accounts from IAM policies. + +## Default Value + +By default, no email addresses outside the organization's domain have access to its Google Cloud deployments, but any user email account can be added to the IAM policy for Google Cloud Platform projects, folders, or organizations. + +## References + +1. https://support.google.com/work/android/answer/6371476 +2. https://cloud.google.com/sdk/gcloud/reference/projects/get-iam-policy +3. https://cloud.google.com/sdk/gcloud/reference/resource-manager/folders/get-iam-policy +4. https://cloud.google.com/sdk/gcloud/reference/organizations/get-iam-policy +5. https://cloud.google.com/resource-manager/docs/organization-policy/restricting-domains +6. https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management - Centralize account management through a directory or identity service. | | x | x | +| v7 | 16.2 Configure Centralized Point of Authentication - Configure access for all accounts through as few centralized points of authentication as possible, including network, security, and cloud systems. | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.10/SKILL.md new file mode 100644 index 0000000000..523f98fdcd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.10/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-gcp-foundations-1.10 +description: "Ensure KMS Encryption Keys Are Rotated Within a Period of 90 Days" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, kms, encryption] +cis_id: "1.10" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.10 Ensure KMS Encryption Keys Are Rotated Within a Period of 90 Days (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Google Cloud Key Management Service stores cryptographic keys in a hierarchical structure designed for useful and elegant access control management. + +The format for the rotation schedule depends on the client library that is used. For the gcloud command-line tool, the next rotation time must be in `ISO` or `RFC3339` format, and the rotation period must be in the form `INTEGER[UNIT]`, where units can be one of seconds (s), minutes (m), hours (h) or days (d). + +## Rationale + +Set a key rotation period and starting time. A key can be created with a specified `rotation period`, which is the time between when new key versions are generated automatically. A key can also be created with a specified next rotation time. A key is a named object representing a `cryptographic key` used for a specific purpose. The key material, the actual bits used for `encryption`, can change over time as new key versions are created. + +A key is used to protect some `corpus of data`. A collection of files could be encrypted with the same key and people with `decrypt` permissions on that key would be able to decrypt those files. Therefore, it's necessary to make sure the `rotation period` is set to a specific time. + +## Impact + +After a successful key rotation, the older key version is required in order to decrypt the data encrypted by that previous key version. + +## Audit Procedure + +### From Google Cloud Console + +1. Go to `Cryptographic Keys` by visiting: https://console.cloud.google.com/security/kms +2. Click on each key ring, then ensure each key in the keyring has `Next Rotation` set for less than 90 days from the current date. + +### From Google Cloud CLI + +1. Ensure rotation is scheduled by `ROTATION_PERIOD` and `NEXT_ROTATION_TIME` for each key: + +```bash +gcloud kms keys list --keyring= --location= --format=json'(rotationPeriod)' +``` + +## Expected Result + +Ensure outcome values for `rotationPeriod` and `nextRotationTime` satisfy the below criteria: + +- `rotationPeriod` is <= `129600m` +- `rotationPeriod` is <= `7776000s` +- `rotationPeriod` is <= `2160h` +- `rotationPeriod` is <= `90d` +- `nextRotationTime` is <= `90days` from current DATE + +## Remediation + +### From Google Cloud Console + +1. Go to `Cryptographic Keys` by visiting: https://console.cloud.google.com/security/kms +2. Click on the specific key ring. +3. From the list of keys, choose the specific key and Click on `Right side pop up the blade (3 dots)`. +4. Click on `Edit rotation period`. +5. On the pop-up window, `Select a new rotation period` in days which should be less than 90 and then choose `Starting on` date (date from which the rotation period begins). + +### From Google Cloud CLI + +1. Update and schedule rotation by `ROTATION_PERIOD` and `NEXT_ROTATION_TIME` for each key: + +```bash +gcloud kms keys update new --keyring=KEY_RING --location=LOCATION --next-rotation-time=NEXT_ROTATION_TIME --rotation-period=ROTATION_PERIOD +``` + +## Default Value + +By default, KMS encryption keys are rotated every 90 days. + +## Additional Information + +- Key rotation does NOT re-encrypt already encrypted data with the newly generated key version. If you suspect unauthorized use of a key, you should re-encrypt the data protected by that key and then disable or schedule destruction of the prior key version. +- It is not recommended to rely solely on irregular rotation, but rather to use irregular rotation if needed in conjunction with a regular rotation schedule. + +## References + +1. https://cloud.google.com/kms/docs/key-rotation#frequency_of_key_rotation +2. https://cloud.google.com/kms/docs/re-encrypt-data + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.11/SKILL.md new file mode 100644 index 0000000000..7104856c88 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.11/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-gcp-foundations-1.11 +description: "Ensure That Separation of Duties Is Enforced While Assigning KMS Related Roles to Users" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, kms, encryption] +cis_id: "1.11" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.11 Ensure That Separation of Duties Is Enforced While Assigning KMS Related Roles to Users (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +It is recommended that the principle of 'Separation of Duties' is enforced while assigning KMS related roles to users. + +## Rationale + +The built-in/predefined IAM role `Cloud KMS Admin` allows the user/identity to create, delete, and manage service account(s). The built-in/predefined IAM role `Cloud KMS CryptoKey Encrypter/Decrypter` allows the user/identity (with adequate privileges on concerned resources) to encrypt and decrypt data at rest using an encryption key(s). + +The built-in/predefined IAM role `Cloud KMS CryptoKey Encrypter` allows the user/identity (with adequate privileges on concerned resources) to encrypt data at rest using an encryption key(s). The built-in/predefined IAM role `Cloud KMS CryptoKey Decrypter` allows the user/identity (with adequate privileges on concerned resources) to decrypt data at rest using an encryption key(s). + +Separation of duties is the concept of ensuring that one individual does not have all necessary permissions to be able to complete a malicious action. In Cloud KMS, this could be an action such as using a key to access and decrypt data a user should not normally have access to. Separation of duties is a business control typically used in larger organizations, meant to help avoid security or privacy incidents and errors. It is considered best practice. + +No user(s) should have `Cloud KMS Admin` and any of the `Cloud KMS CryptoKey Encrypter/Decrypter`, `Cloud KMS CryptoKey Encrypter`, `Cloud KMS CryptoKey Decrypter` roles assigned at the same time. + +## Impact + +Removed roles should be assigned to another user based on business needs. + +## Audit Procedure + +### From Google Cloud Console + +1. Go to `IAM & Admin/IAM` by visiting: https://console.cloud.google.com/iam-admin/iam +2. Ensure no member has the roles `Cloud KMS Admin` and any of the `Cloud KMS CryptoKey Encrypter/Decrypter`, `Cloud KMS CryptoKey Encrypter`, `Cloud KMS CryptoKey Decrypter` assigned. + +### From Google Cloud CLI + +1. List all users and role assignments: + +```bash +gcloud projects get-iam-policy PROJECT_ID +``` + +2. Ensure that there are no common users found in the member section for roles `cloudkms.admin` and any one of `Cloud KMS CryptoKey Encrypter/Decrypter`, `Cloud KMS CryptoKey Encrypter`, `Cloud KMS CryptoKey Decrypter`. + +## Expected Result + +No user should have both `Cloud KMS Admin` (cloudkms.admin) and any of the CryptoKey Encrypter/Decrypter roles assigned simultaneously. + +## Remediation + +### From Google Cloud Console + +1. Go to `IAM & Admin/IAM` using https://console.cloud.google.com/iam-admin/iam +2. For any member having `Cloud KMS Admin` and any of the `Cloud KMS CryptoKey Encrypter/Decrypter`, `Cloud KMS CryptoKey Encrypter`, `Cloud KMS CryptoKey Decrypter` roles granted/assigned, click the `Delete Bin` icon to remove the role from the member. + +Note: Removing a role should be done based on the business requirement. + +### From Google Cloud CLI + +Remove the conflicting role from the user: + +```bash +gcloud projects remove-iam-policy-binding PROJECT_ID --member=user:USER_EMAIL --role=ROLE_TO_REMOVE +``` + +## Default Value + +By default, there are no role assignments that violate separation of duties. + +## Additional Information + +Users granted with Owner (roles/owner) and Editor (roles/editor) have privileges equivalent to `Cloud KMS Admin` and `Cloud KMS CryptoKey Encrypter/Decrypter`. To avoid misuse, Owner and Editor roles should be granted to a very limited group of users. Use of these primitive privileges should be minimal. + +## References + +1. https://cloud.google.com/kms/docs/separation-of-duties + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.12/SKILL.md new file mode 100644 index 0000000000..0f62171399 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.12/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-gcp-foundations-1.12 +description: "Ensure API Keys Only Exist for Active Services" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, api-keys] +cis_id: "1.12" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.12 Ensure API Keys Only Exist for Active Services (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +API Keys should only be used for services in cases where other authentication methods are unavailable. Unused keys with their permissions in tact may still exist within a project. Keys are insecure because they can be viewed publicly, such as from within a browser, or they can be accessed on a device where the key resides. It is recommended to use standard authentication flow instead. + +## Rationale + +To avoid the security risk in using API keys, it is recommended to use standard authentication flow instead. Security risks involved in using API-Keys appear below: + +- API keys are simple encrypted strings +- API keys do not identify the user or the application making the API request +- API keys are typically accessible to clients, making it easy to discover and steal an API key + +## Impact + +Deleting an API key will break dependent applications (if any). + +## Audit Procedure + +### From Google Cloud Console + +1. From within the Project you wish to audit Go to `APIs & Services\Credentials`. +2. In the section `API Keys`, no API key should be listed. + +### From Google Cloud CLI + +1. Run the following from within the project you wish to audit: + +```bash +gcloud services api-keys list --filter +``` + +2. There should be no keys listed at the project level. + +## Expected Result + +No API keys should be listed at the project level. If API keys exist, they should only be associated with actively used services. + +## Remediation + +### From Google Cloud Console + +1. Go to `APIs & Services\Credentials` using https://console.cloud.google.com/apis/credentials +2. In the section `API Keys`, to delete API Keys: Click the `Delete Bin Icon` in front of every `API Key Name`. + +### From Google Cloud CLI + +1. Run the following from within the project you wish to audit: + +```bash +gcloud services api-keys list --filter +``` + +2. Run the following command, providing the ID of the key or fully qualified identifier for the key for ``: + +```bash +gcloud services api-keys delete +``` + +## Default Value + +By default, API keys are not created for a project. + +## Additional Information + +Google recommends using the standard authentication flow instead of using API keys. However, there are limited cases where API keys are more appropriate. For example, if there is a mobile application that needs to use the Google Cloud Translation API, but doesn't otherwise need a backend server, API keys are the simplest way to authenticate to that API. + +If a business requires API keys to be used, then the API keys should be secured properly. + +## References + +1. https://cloud.google.com/docs/authentication/api-keys +2. https://cloud.google.com/sdk/gcloud/reference/services/api-keys/list +3. https://cloud.google.com/docs/authentication +4. https://cloud.google.com/sdk/gcloud/reference/services/api-keys/delete + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 16.10 Apply Secure Design Principles in Application Architectures | | x | x | +| v7 | 16.8 Disable Any Unassociated Accounts | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.13/SKILL.md new file mode 100644 index 0000000000..7375095563 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.13/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-gcp-foundations-1.13 +description: "Ensure API Keys Are Restricted To Use by Only Specified Hosts and Apps" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, api-keys] +cis_id: "1.13" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.13 Ensure API Keys Are Restricted To Use by Only Specified Hosts and Apps (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +API Keys should only be used for services in cases where other authentication methods are unavailable. In this case, unrestricted keys are insecure because they can be viewed publicly, such as from within a browser, or they can be accessed on a device where the key resides. It is recommended to restrict API key usage to trusted hosts, HTTP referrers and apps. It is recommended to use the more secure standard authentication flow instead. + +## Rationale + +Security risks involved in using API-Keys appear below: + +- API keys are simple encrypted strings +- API keys do not identify the user or the application making the API request +- API keys are typically accessible to clients, making it easy to discover and steal an API key + +In light of these potential risks, Google recommends using the standard authentication flow instead of API keys. However, there are limited cases where API keys are more appropriate. For example, if there is a mobile application that needs to use the Google Cloud Translation API, but doesn't otherwise need a backend server, API keys are the simplest way to authenticate to that API. + +In order to reduce attack vectors, API-Keys can be restricted only to trusted hosts, HTTP referrers and applications. + +## Impact + +Setting `Application Restrictions` may break existing application functioning, if not done carefully. + +## Audit Procedure + +### From Google Cloud Console + +1. Go to `APIs & Services\Credentials` using https://console.cloud.google.com/apis/credentials +2. In the section `API Keys`, Click the `API Key Name`. The API Key properties display on a new page. +3. For every API Key, ensure the section `Key restrictions` parameter `Application restrictions` is not set to `None`. + +Or, + +1. Ensure `Application restrictions` is set to `HTTP referrers` and the referrer is not set to wild-cards `(* or *.[TLD] or *.[TLD]/*)` allowing access to any/wide HTTP referrer(s). + +Or, + +1. Ensure `Application restrictions` is set to `IP addresses` and referrer is not set to `any host (0.0.0.0 or 0.0.0.0/0 or ::0)`. + +### From Google Cloud CLI + +1. Run the following from within the project you wish to audit: + +```bash +gcloud services api-keys list --filter="-restrictions:*" --format="table[box](displayName:label='Key With No Restrictions')" +``` + +## Expected Result + +The command should return no results. All API keys should have application restrictions configured (not set to `None`). + +## Remediation + +### From Google Cloud Console — Leaving Keys in Place + +1. Go to `APIs & Services\Credentials` using https://console.cloud.google.com/apis/credentials +2. In the section `API Keys`, Click the `API Key Name`. The API Key properties display on a new page. +3. In the `Key restrictions` section, set the application restrictions to any of `HTTP referrers, IP addresses, Android apps, iOS apps`. +4. Click `Save`. +5. Repeat steps 2,3,4 for every unrestricted API key. + +Note: Do not set `HTTP referrers` to wild-cards (_ or _.[TLD] or .[TLD]/) allowing access to any/wide HTTP referrer(s). Do not set `IP addresses` and referrer to `any host (0.0.0.0 or 0.0.0.0/0 or ::0)`. + +### From Google Cloud Console — Removing Keys + +Another option is to remove the keys entirely. + +1. Go to `APIs & Services\Credentials` using https://console.cloud.google.com/apis/credentials +2. In the section `API Keys`, select the checkbox next to each key you wish to remove. +3. Select `Delete` and confirm. + +## Default Value + +By default, `Application Restrictions` are set to `None`. + +## References + +1. https://cloud.google.com/docs/authentication/api-keys +2. https://cloud.google.com/sdk/gcloud/reference/services/api-keys/list +3. https://cloud.google.com/sdk/gcloud/reference/services/api-keys/update + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 16.10 Apply Secure Design Principles in Application Architectures | | x | x | +| v7 | 0.0 Explicitly Not Mapped | | | | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.14/SKILL.md new file mode 100644 index 0000000000..8caa11484f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.14/SKILL.md @@ -0,0 +1,152 @@ +--- +name: cis-gcp-foundations-1.14 +description: "Ensure API Keys Are Restricted to Only APIs That Application Needs Access" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, api-keys] +cis_id: "1.14" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.14 Ensure API Keys Are Restricted to Only APIs That Application Needs Access (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +API Keys should only be used for services in cases where other authentication methods are unavailable. API keys are always at risk because they can be viewed publicly, such as from within a browser, or they can be accessed on a device where the key resides. It is recommended to restrict API keys to use (call) only APIs required by an application. + +## Rationale + +Security risks involved in using API-Keys are below: + +- API keys are simple encrypted strings +- API keys do not identify the user or the application making the API request +- API keys are typically accessible to clients, making it easy to discover and steal an API key + +In light of these potential risks, Google recommends using the standard authentication flow instead of API-Keys. However, there are limited cases where API keys are more appropriate. For example, if there is a mobile application that needs to use the Google Cloud Translation API, but doesn't otherwise need a backend server, API keys are the simplest way to authenticate to that API. + +In order to reduce attack surfaces by providing `least privileges`, API-Keys can be restricted to use (call) only APIs required by an application. + +## Impact + +Setting `API restrictions` may break existing application functioning, if not done carefully. + +## Audit Procedure + +### From Google Cloud Console + +1. Go to `APIs & Services\Credentials` using https://console.cloud.google.com/apis/credentials +2. In the section `API Keys`, Click the `API Key Name`. The API Key properties display on a new page. +3. For every API Key, ensure the section `Key restrictions` parameter `API restrictions` is not set to `None`. + +Or, + +Ensure `API restrictions` is not set to `Google Cloud APIs`. Note: `Google Cloud APIs` represents the API collection of all cloud services/APIs offered by Google cloud. + +### From Google Cloud CLI + +1. List all API Keys: + +```bash +gcloud services api-keys list +``` + +Each key should have a line that says `restrictions:` followed by varying parameters and NOT have a line saying `- service: cloudapis.googleapis.com` as shown here: + +```yaml +restrictions: + apiTargets: + - service: cloudapis.googleapis.com +``` + +## Expected Result + +All API keys should have `API restrictions` configured to only the specific APIs required by the application. No key should be unrestricted or set to `Google Cloud APIs`. + +## Remediation + +### From Google Cloud Console + +1. Go to `APIs & Services\Credentials` using https://console.cloud.google.com/apis/credentials +2. In the section `API Keys`, Click the `API Key Name`. The API Key properties display on a new page. +3. In the `Key restrictions` section go to `API restrictions`. +4. Click the `Select API` drop-down to choose an API. +5. Click `Save`. +6. Repeat steps 2,3,4,5 for every unrestricted API key. + +Note: Do not set `API restrictions` to `Google Cloud APIs`, as this option allows access to all services offered by Google cloud. + +### From Google Cloud CLI + +1. List all API keys: + +```bash +gcloud services api-keys list +``` + +2. Note the `UID` of the key to add restrictions to. + +3. Run the update command with the appropriate API target service or flags file with API target services and methods to add the required restrictions. + +Command with appropriate API target service: + +```bash +gcloud services api-keys update --api-target=service= +``` + +Command with flags file: + +```bash +gcloud services api-keys update --flags-file=.yaml +``` + +Content of flags file: + +```yaml +- --api-target: + service: "foo.service.com" +- --api-target: + service: "bar.service.com" + methods: + - "foomethod" + - "barmethod" +``` + +Note: Flags can be found by running: + +```bash +gcloud services api-keys update --help +``` + +Note: Services can be found by running: + +```bash +gcloud services list +``` + +or in this documentation: https://cloud.google.com/sdk/gcloud/reference/services/api-keys/update + +## Default Value + +By default, `API restrictions` are set to `None`. + +## References + +1. https://cloud.google.com/docs/authentication/api-keys +2. https://cloud.google.com/apis/docs/overview + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 16.10 Apply Secure Design Principles in Application Architectures | | x | x | +| v7 | 0.0 Explicitly Not Mapped | | | | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.15/SKILL.md new file mode 100644 index 0000000000..32ad7e4600 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.15/SKILL.md @@ -0,0 +1,130 @@ +--- +name: cis-gcp-foundations-1.15 +description: "Ensure API Keys Are Rotated Every 90 Days" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, api-keys] +cis_id: "1.15" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.15 Ensure API Keys Are Rotated Every 90 Days (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +API Keys should only be used for services in cases where other authentication methods are unavailable. If they are in use it is recommended to rotate API keys every 90 days. + +## Rationale + +Security risks involved in using API-Keys are listed below: + +- API keys are simple encrypted strings +- API keys do not identify the user or the application making the API request +- API keys are typically accessible to clients, making it easy to discover and steal an API key + +Because of these potential risks, Google recommends using the standard authentication flow instead of API Keys. However, there are limited cases where API keys are more appropriate. For example, if there is a mobile application that needs to use the Google Cloud Translation API, but doesn't otherwise need a backend server, API keys are the simplest way to authenticate to that API. + +Once a key is stolen, it has no expiration, meaning it may be used indefinitely unless the project owner revokes or regenerates the key. Rotating API keys will reduce the window of opportunity for an access key that is associated with a compromised or terminated account to be used. + +API keys should be rotated to ensure that data cannot be accessed with an old key that might have been lost, cracked, or stolen. + +## Impact + +`Regenerating Key` may break existing client connectivity as the client will try to connect with older API keys they have stored on devices. + +## Audit Procedure + +### From Google Cloud Console + +1. Go to `APIs & Services\Credentials` using https://console.cloud.google.com/apis/credentials +2. In the section `API Keys`, for every key ensure the `creation date` is less than 90 days. + +### From Google Cloud CLI + +To list keys, use the command: + +```bash +gcloud services api-keys list +``` + +Ensure the date in `createTime` is within 90 days. + +## Expected Result + +All API keys should have a `createTime` within the last 90 days, indicating they have been rotated. + +## Remediation + +### From Google Cloud Console + +1. Go to `APIs & Services\Credentials` using https://console.cloud.google.com/apis/credentials +2. In the section `API Keys`, Click the `API Key Name`. The API Key properties display on a new page. +3. Click `REGENERATE KEY` to rotate API key. +4. Click `Save`. +5. Repeat steps 2,3,4 for every API key that has not been rotated in the last 90 days. + +Note: Do not set `HTTP referrers` to wild-cards (_ or _.[TLD] or .[TLD]/) allowing access to any/wide HTTP referrer(s). Do not set `IP addresses` and referrer to `any host (0.0.0.0 or 0.0.0.0/0 or ::0)`. + +### From Google Cloud CLI + +There is not currently a way to regenerate an API key using gcloud commands. To 'regenerate' a key you will need to create a new one, duplicate the restrictions from the key being rotated, and delete the old key. + +1. List existing keys: + +```bash +gcloud services api-keys list +``` + +2. Note the `UID` and restrictions of the key to regenerate. + +3. Run this command to create a new API key. `` is the display name of the new key: + +```bash +gcloud services api-keys create --display-name="" +``` + +Note the `UID` of the newly created key. + +4. Run the update command to add required restrictions: + +Note - the restriction may vary for each key. Refer to this documentation for the appropriate flags: https://cloud.google.com/sdk/gcloud/reference/services/api-keys/update + +```bash +gcloud services api-keys update +``` + +5. Delete the old key: + +```bash +gcloud services api-keys delete +``` + +## Default Value + +API keys do not have an automatic rotation mechanism. + +## Additional Information + +There is no option to automatically regenerate (rotate) API keys periodically. + +## References + +1. https://developers.google.com/maps/api-security-best-practices#regenerate-apikey +2. https://cloud.google.com/sdk/gcloud/reference/services/api-keys/update + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 16.10 Apply Secure Design Principles in Application Architectures | | x | x | +| v7 | 0.0 Explicitly Not Mapped | | | | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.16/SKILL.md new file mode 100644 index 0000000000..ce1ec924d4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.16/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-gcp-foundations-1.16 +description: "Ensure Essential Contacts is Configured for Organization" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, contacts] +cis_id: "1.16" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.16 Ensure Essential Contacts is Configured for Organization (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended that Essential Contacts is configured to designate email addresses for Google Cloud services to notify of important technical or security information. + +## Rationale + +Many Google Cloud services, such as Cloud Billing, send out notifications to share important information with Google Cloud users. By default, these notifications are sent to members with certain Identity and Access Management (IAM) roles. With Essential Contacts, you can customize who receives notifications by providing your own list of contacts. + +## Impact + +There is no charge for Essential Contacts except for the 'Technical Incidents' category that is only available to premium support customers. + +## Audit Procedure + +### From Google Cloud Console + +1. Go to `Essential Contacts` by visiting https://console.cloud.google.com/iam-admin/essential-contacts +2. Make sure the organization appears in the resource selector at the top of the page. The resource selector tells you what project, folder, or organization you are currently managing contacts for. +3. Ensure that appropriate email addresses are configured for each of the following notification categories: + - `Legal` + - `Security` + - `Suspension` + - `Technical` + +Alternatively, appropriate email addresses can be configured for the `All` notification category to receive all possible important notifications. + +### From Google Cloud CLI + +1. To list all configured organization Essential Contacts run a command: + +```bash +gcloud essential-contacts list --organization= +``` + +2. Ensure at least one appropriate email address is configured for each of the following notification categories: + - `LEGAL` + - `SECURITY` + - `SUSPENSION` + - `TECHNICAL` + +Alternatively, appropriate email addresses can be configured for the `ALL` notification category to receive all possible important notifications. + +## Expected Result + +At least one contact should be configured for each of the following notification categories: `LEGAL`, `SECURITY`, `SUSPENSION`, and `TECHNICAL` (or the `ALL` category should be configured). + +## Remediation + +### From Google Cloud Console + +1. Go to `Essential Contacts` by visiting https://console.cloud.google.com/iam-admin/essential-contacts +2. Make sure the organization appears in the resource selector at the top of the page. The resource selector tells you what project, folder, or organization you are currently managing contacts for. +3. Click `+Add contact`. +4. In the `Email` and `Confirm Email` fields, enter the email address of the contact. +5. From the `Notification categories` drop-down menu, select the notification categories that you want the contact to receive communications for. +6. Click `Save`. + +### From Google Cloud CLI + +1. To add an organization Essential Contacts run a command: + +```bash +gcloud essential-contacts create --email="" \ + --notification-categories="" \ + --organization= +``` + +## Default Value + +By default, there are no Essential Contacts configured. + +In the absence of an Essential Contact, the following IAM roles are used to identify users to notify for the following categories: + +- Legal: `roles/billing.admin` +- Security: `roles/resourcemanager.organizationAdmin` +- Suspension: `roles/owner` +- Technical: `roles/owner` +- Technical Incidents: `roles/owner` + +## References + +1. https://cloud.google.com/resource-manager/docs/managing-notification-contacts + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 17.2 Establish and Maintain Contact Information for Reporting Security Incidents | x | x | x | +| v7 | 19.5 Maintain Contact Information For Reporting Security Incidents | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.17/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.17/SKILL.md new file mode 100644 index 0000000000..1f5e8d5b4e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.17/SKILL.md @@ -0,0 +1,206 @@ +--- +name: cis-gcp-foundations-1.17 +description: "Ensure Secrets are Not Stored in Cloud Functions Environment Variables by Using Secret Manager" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, secret-manager] +cis_id: "1.17" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.17 Ensure Secrets are Not Stored in Cloud Functions Environment Variables by Using Secret Manager (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Google Cloud Functions allow you to host serverless code that is executed when an event is triggered, without the requiring the management a host operating system. These functions can also store environment variables to be used by the code that may contain authentication or other information that needs to remain confidential. + +## Rationale + +It is recommended to use the Secret Manager, because environment variables are stored unencrypted, and accessible for all users who have access to the code. + +## Impact + +There should be no impact on the Cloud Function. There are minor costs after 10,000 requests a month to the Secret Manager API as well for a high use of other functions. Modifying the Cloud Function to use the Secret Manager may prevent it running to completion. + +## Audit Procedure + +### Determine if Confidential Information is Stored in Your Functions in Cleartext + +#### From Google Cloud Console + +1. Within the project you wish to audit, select the Navigation hamburger menu in the top left. Scroll down to under the heading 'Serverless', then select 'Cloud Functions'. +2. Click on a function name from the list. +3. Open the Variables tab and you will see both buildEnvironmentVariables and environmentVariables. +4. Review the variables whether they are secrets. +5. Repeat step 3-5 until all functions are reviewed. + +#### From Google Cloud CLI + +1. To view a list of your cloud functions run: + +```bash +gcloud functions list +``` + +2. For each cloud function in the list run the following command: + +```bash +gcloud functions describe +``` + +3. Review the settings of the buildEnvironmentVariables and environmentVariables. Determine if this is data that should not be publicly accessible. + +### Determine if Secret Manager API is 'Enabled' for your Project + +#### From Google Cloud Console + +1. Within the project you wish to audit, select the Navigation hamburger menu in the top left. Hover over 'APIs & Services' to under the heading 'Serverless', then select 'Enabled APIs & Services' in the menu that opens up. +2. Click the button '+ Enable APIS and Services'. +3. In the Search bar, search for 'Secret Manager API' and select it. +4. If it is enabled, the blue box that normally says 'Enable' will instead say 'Manage'. + +#### From Google Cloud CLI + +1. Within the project you wish to audit, run the following command: + +```bash +gcloud services list +``` + +2. If 'Secret Manager API' is in the list, it is enabled. + +## Expected Result + +- No confidential information (secrets, passwords, API keys, tokens) should be stored in Cloud Functions environment variables. +- The Secret Manager API should be enabled for the project. + +## Remediation + +### Enable Secret Manager API for your Project + +#### From Google Cloud Console + +1. Within the project you wish to enable, select the Navigation hamburger menu in the top left. Hover over 'APIs & Services' to under the heading 'Serverless', then select 'Enabled APIs & Services' in the menu that opens up. +2. Click the button '+ Enable APIS and Services'. +3. In the Search bar, search for 'Secret Manager API' and select it. +4. Click the blue box that says 'Enable'. + +#### From Google Cloud CLI + +1. Within the project you wish to enable the API in, run the following command: + +```bash +gcloud services enable Secret Manager API +``` + +### Reviewing Environment Variables That Should Be Migrated to Secret Manager + +#### From Google Cloud Console + +1. Log in to the Google Cloud Web Portal (https://console.cloud.google.com/) +2. Go to Cloud Functions. +3. Click on a function name from the list. +4. Click on Edit and review the Runtime environment for variables that should be secrets. Leave this list open for the next step. + +#### From Google Cloud CLI + +1. To view a list of your cloud functions run: + +```bash +gcloud functions list +``` + +2. For each cloud function run the following command: + +```bash +gcloud functions describe +``` + +3. Review the settings of the buildEnvironmentVariables and environmentVariables. Keep this information for the next step. + +### Migrating Environment Variables to Secrets within the Secret Manager + +#### From Google Cloud Console + +1. Go to the Secret Manager page in the Cloud Console. +2. On the Secret Manager page, click Create Secret. +3. On the Create secret page, under Name, enter the name of the Environment Variable you are replacing. This will then be the Secret Variable you will reference in your code. +4. You will also need to add a version. This is the actual value of the variable that will be referenced from the code. To add a secret version when creating the initial secret, in the Secret value field, enter the value from the Environment Variable you are replacing. +5. Leave the Regions section unchanged. +6. Click the Create secret button. +7. Repeat for all Environment Variables. + +#### From Google Cloud CLI + +1. Run the following command with the Environment Variable name you are replacing in the ``. It is most secure to point this command to a file with the Environment Variable value located in it, as if you entered it via command line it would show up in your shell's command history: + +```bash +gcloud secrets create --data-file="/path/to/file.txt" +``` + +### Granting your Runtime's Service Account Access to Secrets + +#### From Google Cloud Console + +1. Within the project containing your runtime login with account that has the 'roles/secretmanager.secretAccessor' permission. +2. Select the Navigation hamburger menu in the top left. Hover over 'Security' to under the then select 'Secret Manager' in the menu that opens up. +3. Click the name of a secret listed in this screen. +4. If it is not already open, click Show Info Panel in this screen to open the panel. +5. In the info panel, click Add principal. +6. In the New principals field, enter the service account your function uses for its identity. (If you need help locating or updating your runtime's service account, please see the 'docs/securing/function-identity#runtime_service_account' reference.) +7. In the Select a role dropdown, choose Secret Manager and then Secret Manager Secret Accessor. + +#### From Google Cloud CLI + +As of the time of writing, using Google CLI to list Runtime variables is only in beta. Because this is likely to change we are not including it here. + +### Modifying the Code to use the Secrets in Secret Manager + +This depends heavily on which language your runtime is in. For the sake of the brevity of this recommendation, please see the '/docs/creating-and-accessing-secrets#access' reference for language specific instructions. + +### Deleting the Insecure Environment Variables + +Be certain to do this step last. Removing variables from code actively referencing them will prevent it from completing successfully. + +#### From Google Cloud Console + +1. Select the Navigation hamburger menu in the top left. Hover over 'Security' then select 'Secret Manager' in the menu that opens up. +2. Click the name of a function. Click Edit. +3. Click Runtime, build and connections settings to expand the advanced configuration options. +4. Click 'Security'. Hover over the secret you want to remove, then click 'Delete'. +5. Click Next. Click Deploy. The latest version of the runtime will now reference the secrets in Secret Manager. + +#### From Google Cloud CLI + +```bash +gcloud functions deploy --remove-env-vars +``` + +If you need to find the env vars to remove, they are from the step where `gcloud functions describe ` was run. + +## Default Value + +By default Secret Manager is not enabled. + +## References + +1. https://cloud.google.com/functions/docs/configuring/env-var +2. https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets +3. https://cloud.google.com/functions/docs/securing/function-identity#runtime_service_account + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 16.10 Apply Secure Design Principles in Application Architectures | | x | x | +| v7 | 0.0 Explicitly Not Mapped | | | | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.2/SKILL.md new file mode 100644 index 0000000000..6edc31e2dc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.2/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gcp-foundations-1.2 +description: "Ensure That Multi-Factor Authentication is Enabled for All Non-Service Accounts" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, service-accounts, mfa, kms, api-keys] +cis_id: "1.2" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.2 Ensure That Multi-Factor Authentication is Enabled for All Non-Service Accounts (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Setup multi-factor authentication for Google Cloud Platform accounts. + +## Rationale + +Multi-factor authentication requires more than one mechanism to authenticate a user. This secures user logins from attackers exploiting stolen or weak credentials. + +## Impact + +None documented. + +## Audit Procedure + +**From Google Cloud Console** + +For each Google Cloud Platform project, folder, or organization: + +1. Identify non-service accounts. +2. Manually verify that multi-factor authentication for each account is set. + +## Expected Result + +All non-service accounts should have multi-factor authentication enabled. + +## Remediation + +**From Google Cloud Console** + +For each Google Cloud Platform project: + +1. Identify non-service accounts. +2. Setup multi-factor authentication for each account. + +## Default Value + +By default, multi-factor authentication is not set. + +## References + +1. https://cloud.google.com/solutions/securing-gcp-account-u2f +2. https://support.google.com/accounts/answer/185839 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications - Require all externally-exposed enterprise or third-party applications to enforce MFA, where supported. Enforcing MFA through a directory service or SSO provider is a satisfactory implementation of this Safeguard. | | x | x | +| v7 | 16.3 Require Multi-factor Authentication - Require multi-factor authentication for all user accounts, on all systems, whether managed onsite or by a third-party provider. | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.3/SKILL.md new file mode 100644 index 0000000000..f56385fe99 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.3/SKILL.md @@ -0,0 +1,70 @@ +--- +name: cis-gcp-foundations-1.3 +description: "Ensure That Security Key Enforcement is Enabled for All Admin Accounts" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, service-accounts, mfa, kms, api-keys] +cis_id: "1.3" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.3 Ensure That Security Key Enforcement is Enabled for All Admin Accounts (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Setup Security Key Enforcement for Google Cloud Platform admin accounts. + +## Rationale + +Google Cloud Platform users with Organization Administrator roles have the highest level of privilege in the organization. These accounts should be protected with the strongest form of two-factor authentication: Security Key Enforcement. Ensure that admins use Security Keys to log in instead of weaker second factors like SMS or one-time passwords (OTP). Security Keys are actual physical keys used to access Google Organization Administrator Accounts. They send an encrypted signature rather than a code, ensuring that logins cannot be phished. + +## Impact + +If an organization administrator loses access to their security key, the user could lose access to their account. For this reason, it is important to set up backup security keys. + +## Audit Procedure + +1. Identify users with Organization Administrator privileges: + +```bash +gcloud organizations get-iam-policy ORGANIZATION_ID +``` + +Look for members granted the role `roles/resourcemanager.organizationAdmin`. + +2. Manually verify that Security Key Enforcement has been enabled for each account. + +## Expected Result + +All users with Organization Administrator privileges should have Security Key Enforcement enabled. + +## Remediation + +1. Identify users with the Organization Administrator role. +2. Setup Security Key Enforcement for each account. Learn more at: https://cloud.google.com/security-key/ + +## Default Value + +By default, Security Key Enforcement is not enabled for Organization Administrators. + +## References + +1. https://cloud.google.com/security-key/ +2. https://gsuite.google.com/learn-more/key_for_working_smarter_faster_and_more_securely.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications - Require all externally-exposed enterprise or third-party applications to enforce MFA, where supported. Enforcing MFA through a directory service or SSO provider is a satisfactory implementation of this Safeguard. | | x | x | +| v7 | 16.3 Require Multi-factor Authentication - Require multi-factor authentication for all user accounts, on all systems, whether managed onsite or by a third-party provider. | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.4/SKILL.md new file mode 100644 index 0000000000..cbdc24ee8d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.4/SKILL.md @@ -0,0 +1,115 @@ +--- +name: cis-gcp-foundations-1.4 +description: "Ensure That There Are Only GCP-Managed Service Account Keys for Each Service Account" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, service-accounts, mfa, kms, api-keys] +cis_id: "1.4" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.4 Ensure That There Are Only GCP-Managed Service Account Keys for Each Service Account (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +User-managed service accounts should not have user-managed keys. + +## Rationale + +Anyone who has access to the keys will be able to access resources through the service account. GCP-managed keys are used by Cloud Platform services such as App Engine and Compute Engine. These keys cannot be downloaded. Google will keep the keys and automatically rotate them on an approximately weekly basis. User-managed keys are created, downloadable, and managed by users. They expire 10 years from creation. + +For user-managed keys, the user has to take ownership of key management activities which include: + +- Key storage +- Key distribution +- Key revocation +- Key rotation +- Protecting the keys from unauthorized users +- Key recovery + +Even with key owner precautions, keys can be easily leaked by common development malpractices like checking keys into the source code or leaving them in the Downloads directory, or accidentally leaving them on support blogs/channels. + +It is recommended to prevent user-managed service account keys. + +## Impact + +Deleting user-managed service account keys may break communication with the applications using the corresponding keys. + +## Audit Procedure + +**From Google Cloud Console** + +1. Go to the IAM page in the GCP Console using `https://console.cloud.google.com/iam-admin/iam` +2. In the left navigation pane, click `Service accounts`. All service accounts and their corresponding keys are listed. +3. Click the service accounts and check if keys exist. + +**From Google Cloud CLI** + +1. List all the service accounts: + +```bash +gcloud iam service-accounts list +``` + +2. Identify user-managed service accounts which have an account `EMAIL` ending with `iam.gserviceaccount.com`. For each user-managed service account, list the keys managed by the user: + +```bash +gcloud iam service-accounts keys list --iam-account= --managed-by=user +``` + +## Expected Result + +No keys should be listed. + +## Remediation + +**From Google Cloud Console** + +1. Go to the IAM page in the GCP Console using `https://console.cloud.google.com/iam-admin/iam` +2. In the left navigation pane, click `Service accounts`. All service accounts and their corresponding keys are listed. +3. Click the service account. +4. Click the `edit` and delete the keys. + +**From Google Cloud CLI** + +To delete a user managed Service Account Key: + +```bash +gcloud iam service-accounts keys delete --iam-account= +``` + +**Prevention:** + +You can disable service account key creation through the `Disable service account key creation` Organization policy by visiting `https://console.cloud.google.com/iam-admin/orgpolicies/iam-disableServiceAccountKeyCreation`. Learn more at: https://cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts + +In addition, if you do not need to have service accounts in your project, you can also prevent the creation of service accounts through the `Disable service account creation` Organization policy: `https://console.cloud.google.com/iam-admin/orgpolicies/iam-disableServiceAccountCreation`. + +## Default Value + +By default, there are no user-managed keys created for user-managed service accounts. + +## Additional Information + +A user-managed key cannot be created on GCP-Managed Service Accounts. + +## References + +1. https://cloud.google.com/iam/docs/understanding-service-accounts#managing_service_account_keys +2. https://cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------- | ---- | ---- | ---- | +| v8 | 0.0 Explicitly Not Mapped | | | | +| v7 | 0.0 Explicitly Not Mapped | | | | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.5/SKILL.md new file mode 100644 index 0000000000..851c5f0942 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.5/SKILL.md @@ -0,0 +1,159 @@ +--- +name: cis-gcp-foundations-1.5 +description: "Ensure That Service Account Has No Admin Privileges" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, service-accounts, mfa, kms, api-keys] +cis_id: "1.5" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.5 Ensure That Service Account Has No Admin Privileges (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +A service account is a special Google account that belongs to an application or a VM, instead of to an individual end-user. The application uses the service account to call the service's Google API so that users aren't directly involved. It's recommended not to use admin access for ServiceAccount. + +## Rationale + +Service accounts represent service-level security of the Resources (application or a VM) which can be determined by the roles assigned to it. Enrolling ServiceAccount with Admin rights gives full access to an assigned application or a VM. A ServiceAccount Access holder can perform critical actions like delete, update change settings, etc. without user intervention. For this reason, it's recommended that service accounts not have Admin rights. + +## Impact + +Removing `*Admin` or `*admin` or `Editor` or `Owner` role assignments from service accounts may break functionality that uses impacted service accounts. Required role(s) should be assigned to impacted service accounts in order to restore broken functionalities. + +## Audit Procedure + +**From Google Cloud Console** + +1. Go to `IAM & admin/IAM` using `https://console.cloud.google.com/iam-admin/iam` +2. Under the `IAM` Tab look for `VIEW BY PRINCIPALS` +3. Filter `PRINCIPALS` using `type : Service account` +4. Look for the Service Account with the nomenclature: `SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com` +5. Ensure that there are no such Service Accounts with roles containing `*Admin` or `*admin` or role matching `Editor` or role matching `Owner` under `Role` column. + +**From Google Cloud CLI** + +1. Get the policy that you want to modify, and write it to a JSON file: + +```bash +gcloud projects get-iam-policy PROJECT_ID --format json > iam.json +``` + +2. The contents of the JSON file will look similar to the following. Note that `role` of members group associated with each `serviceaccount` does not contain `*Admin` or `*admin` or does not match `roles/editor` or does not match `roles/owner`. + +This recommendation is only applicable to `User-Managed user-created` service accounts. These accounts have the nomenclature: `SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com`. Note that some Google-managed, Google-created service accounts have the same naming format, and should be excluded (e.g., `appsdev-apps-dev-script-auth@system.gserviceaccount.com` which needs the Owner role). + +**Sample JSON output:** + +```json +{ + "bindings": [ + { + "members": ["serviceAccount:our-project-123@appspot.gserviceaccount.com"], + "role": "roles/appengine.appAdmin" + }, + { + "members": ["user:email1@gmail.com"], + "role": "roles/owner" + }, + { + "members": [ + "serviceAccount:our-project-123@appspot.gserviceaccount.com", + "serviceAccount:123456789012-compute@developer.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "BwUjMhCsNvY=", + "version": 1 +} +``` + +## Expected Result + +No user-managed service accounts should have `*Admin`, `*admin`, `Editor`, or `Owner` roles assigned. + +## Remediation + +**From Google Cloud Console** + +1. Go to `IAM & admin/IAM` using `https://console.cloud.google.com/iam-admin/iam` +2. Under the `IAM` Tab look for `VIEW BY PRINCIPALS` +3. Filter `PRINCIPALS` using `type : Service account` +4. Look for the Service Account with the Principal nomenclature: `SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com` +5. Identify `User-Managed user created` service account with roles containing `*Admin` or `*admin` or role matching `Editor` or role matching `Owner` under `Role` Column. +6. Click on `Edit (Pencil Icon)` for the Service Account, it will open all the roles which are assigned to the Service Account. +7. Click the `Delete bin` icon to remove the role from the Principal (service account in this case). + +**From Google Cloud CLI** + +```bash +gcloud projects get-iam-policy PROJECT_ID --format json > iam.json +``` + +1. Using a text editor, Remove `Role` which contains `roles/*Admin` or `roles/*admin` or matched `roles/editor` or matches `roles/owner`. Add a role to the bindings array that defines the group members and the role for those members. + +For example, to grant the role `roles/appengine.appViewer` to the `ServiceAccount` which is `roles/editor`, you would change the example shown below as follows: + +```json +{ + "bindings": [ + { + "members": ["serviceAccount:our-project-123@appspot.gserviceaccount.com"], + "role": "roles/appengine.appViewer" + }, + { + "members": ["user:email1@gmail.com"], + "role": "roles/owner" + }, + { + "members": [ + "serviceAccount:our-project-123@appspot.gserviceaccount.com", + "serviceAccount:123456789012-compute@developer.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "BwUjMhCsNvY=" +} +``` + +2. Update the project's IAM policy: + +```bash +gcloud projects set-iam-policy PROJECT_ID iam.json +``` + +## Default Value + +User Managed (and not user-created) default service accounts have the `Editor (roles/editor)` role assigned to them to support GCP services they offer. + +By default, there are no roles assigned to `User Managed User created` service accounts. + +## Additional Information + +Default (user-managed but not user-created) service accounts have the `Editor (roles/editor)` role assigned to them to support GCP services they offer. Such Service accounts are: `PROJECT_NUMBER-compute@developer.gserviceaccount.com`, `PROJECT_ID@appspot.gserviceaccount.com`. + +## References + +1. https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/ +2. https://cloud.google.com/iam/docs/understanding-roles +3. https://cloud.google.com/iam/docs/understanding-service-accounts + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts - Restrict administrator privileges to dedicated administrator accounts on enterprise assets. Conduct general computing activities, such as internet browsing, email, and productivity suite use, from the user's primary, non-privileged account. | x | x | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts - Ensure that all users with administrative account access use a dedicated or secondary account for elevated activities. This account should only be used for administrative activities and not internet browsing, email, or similar activities. | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.6/SKILL.md new file mode 100644 index 0000000000..1a5fd58898 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.6/SKILL.md @@ -0,0 +1,136 @@ +--- +name: cis-gcp-foundations-1.6 +description: "Ensure That IAM Users Are Not Assigned the Service Account User or Service Account Token Creator Roles at Project Level" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, service-accounts, mfa, kms, api-keys] +cis_id: "1.6" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.6 Ensure That IAM Users Are Not Assigned the Service Account User or Service Account Token Creator Roles at Project Level (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to assign the `Service Account User (iam.serviceAccountUser)` and `Service Account Token Creator (iam.serviceAccountTokenCreator)` roles to a user for a specific service account rather than assigning the role to a user at project level. + +## Rationale + +A service account is a special Google account that belongs to an application or a virtual machine (VM), instead of to an individual end-user. Application/VM-Instance uses the service account to call the service's Google API so that users aren't directly involved. In addition to being an identity, a service account is a resource that has IAM policies attached to it. These policies determine who can use the service account. + +Users with IAM roles to update the App Engine and Compute Engine instances (such as App Engine Deployer or Compute Instance Admin) can effectively run code as the service accounts used to run these instances, and indirectly gain access to all the resources for which the service accounts have access. Similarly, SSH access to a Compute Engine instance may also provide the ability to execute code as that instance/Service account. + +Based on business needs, there could be multiple user-managed service accounts configured for a project. Granting the `iam.serviceAccountUser` or `iam.serviceAccountTokenCreator` roles to a user for a project gives the user access to all service accounts in the project, including service accounts that may be created in the future. This can result in elevation of privileges by using service accounts and corresponding `Compute Engine instances`. + +In order to implement `least privileges` best practices, IAM users should not be assigned the `Service Account User` or `Service Account Token Creator` roles at the project level. Instead, these roles should be assigned to a user for a specific service account, giving that user access to the service account. The `Service Account User` allows a user to bind a service account to a long-running job service, whereas the `Service Account Token Creator` role allows a user to directly impersonate (or assert) the identity of a service account. + +## Impact + +After revoking `Service Account User` or `Service Account Token Creator` roles at the project level from all impacted user account(s), these roles should be assigned to a user(s) for specific service account(s) according to business needs. + +## Audit Procedure + +**From Google Cloud Console** + +1. Go to the IAM page in the GCP Console by visiting `https://console.cloud.google.com/iam-admin/iam` +2. Click on the filter table text bar, Type `Role: Service Account User`. +3. Ensure no user is listed as a result of the filter. +4. Click on the filter table text bar, Type `Role: Service Account Token Creator`. +5. Ensure no user is listed as a result of the filter. + +**From Google Cloud CLI** + +To ensure IAM users are not assigned Service Account User role at the project level: + +```bash +gcloud projects get-iam-policy PROJECT_ID --format json | jq '.bindings[].role' | grep "roles/iam.serviceAccountUser" + +gcloud projects get-iam-policy PROJECT_ID --format json | jq '.bindings[].role' | grep "roles/iam.serviceAccountTokenCreator" +``` + +## Expected Result + +These commands should not return any output. + +## Remediation + +**From Google Cloud Console** + +1. Go to the IAM page in the GCP Console by visiting: `https://console.cloud.google.com/iam-admin/iam`. +2. Click on the filter table text bar. Type `Role: Service Account User` +3. Click the `Delete Bin` icon in front of the role `Service Account User` for every user listed as a result of a filter. +4. Click on the filter table text bar. Type `Role: Service Account Token Creator` +5. Click the `Delete Bin` icon in front of the role `Service Account Token Creator` for every user listed as a result of a filter. + +**From Google Cloud CLI** + +1. Using a text editor, remove the bindings with the `roles/iam.serviceAccountUser` or `roles/iam.serviceAccountTokenCreator`. + +For example, you can use the iam.json file shown below as follows: + +```json +{ + "bindings": [ + { + "members": ["serviceAccount:our-project-123@appspot.gserviceaccount.com"], + "role": "roles/appengine.appViewer" + }, + { + "members": ["user:email1@gmail.com"], + "role": "roles/owner" + }, + { + "members": [ + "serviceAccount:our-project-123@appspot.gserviceaccount.com", + "serviceAccount:123456789012-compute@developer.gserviceaccount.com" + ], + "role": "roles/editor" + } + ], + "etag": "BwUjMhCsNvY=" +} +``` + +2. Update the project's IAM policy: + +```bash +gcloud projects set-iam-policy PROJECT_ID iam.json +``` + +## Default Value + +By default, users do not have the Service Account User or Service Account Token Creator role assigned at project level. + +## Additional Information + +To assign the role `roles/iam.serviceAccountUser` or `roles/iam.serviceAccountTokenCreator` to a user role on a service account instead of a project: + +1. Go to `https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts` +2. Select `Target Project` +3. Select `target service account`. Click `Permissions` on the top bar. It will open permission pane on right side of the page. +4. Add desired members with `Service Account User` or `Service Account Token Creator` role. + +## References + +1. https://cloud.google.com/iam/docs/service-accounts +2. https://cloud.google.com/iam/docs/granting-roles-to-service-accounts +3. https://cloud.google.com/iam/docs/understanding-roles +4. https://cloud.google.com/iam/docs/granting-changing-revoking-access +5. https://console.cloud.google.com/iam-admin/iam + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.7/SKILL.md new file mode 100644 index 0000000000..aca41d4e40 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.7/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-gcp-foundations-1.7 +description: "Ensure User-Managed/External Keys for Service Accounts Are Rotated Every 90 Days or Fewer" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, service-accounts, mfa, kms, api-keys] +cis_id: "1.7" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.7 Ensure User-Managed/External Keys for Service Accounts Are Rotated Every 90 Days or Fewer (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Service Account keys consist of a key ID (Private_key_Id) and Private key, which are used to sign programmatic requests users make to Google cloud services accessible to that particular service account. It is recommended that all Service Account keys are regularly rotated. + +## Rationale + +Rotating Service Account keys will reduce the window of opportunity for an access key that is associated with a compromised or terminated account to be used. Service Account keys should be rotated to ensure that data cannot be accessed with an old key that might have been lost, cracked, or stolen. + +Each service account is associated with a key pair managed by Google Cloud Platform (GCP). It is used for service-to-service authentication within GCP. Google rotates the keys daily. + +GCP provides the option to create one or more user-managed (also called external key pairs) key pairs for use from outside GCP (for example, for use with Application Default Credentials). When a new key pair is created, the user is required to download the private key (which is not retained by Google). With external keys, users are responsible for keeping the private key secure and other management operations such as key rotation. External keys can be managed by the IAM API, gcloud command-line tool, or the Service Accounts page in the Google Cloud Platform Console. GCP facilitates up to 10 external service account keys per service account to facilitate key rotation. + +## Impact + +Rotating service account keys will break communication for dependent applications. Dependent applications need to be configured manually with the new key `ID` displayed in the `Service account keys` section and the `private key` downloaded by the user. + +## Audit Procedure + +**From Google Cloud Console** + +1. Go to `APIs & Services\Credentials` using `https://console.cloud.google.com/apis/credentials` +2. In the section `Service Account Keys`, for every External (user-managed) service account key listed ensure the `creation date` is within the past 90 days. + +**From Google Cloud CLI** + +1. List all Service accounts from a project. + +```bash +gcloud iam service-accounts list +``` + +2. For every service account list service account keys. + +```bash +gcloud iam service-accounts keys list --iam-account [Service_Account_Email_Id] --format=json +``` + +3. Ensure every service account key for a service account has a `"validAfterTime"` value within the past 90 days. + +## Expected Result + +All user-managed/external service account keys should have a `validAfterTime` within the past 90 days. + +## Remediation + +**From Google Cloud Console** + +Delete any external (user-managed) Service Account Key older than 90 days: + +1. Go to `APIs & Services\Credentials` using `https://console.cloud.google.com/apis/credentials` +2. In the Section `Service Account Keys`, for every external (user-managed) service account key where `creation date` is greater than or equal to the past 90 days, click `Delete Bin Icon` to `Delete Service Account key` + +Create a new external (user-managed) Service Account Key for a Service Account: + +1. Go to `APIs & Services\Credentials` using `https://console.cloud.google.com/apis/credentials` +2. Click `Create Credentials` and Select `Service Account Key`. +3. Choose the service account in the drop-down list for which an External (user-managed) Service Account key needs to be created. +4. Select the desired key type format among `JSON` or `P12`. +5. Click `Create`. It will download the `private key`. Keep it safe. +6. Click `Close` if prompted. +7. The site will redirect to the `APIs & Services\Credentials` page. Make a note of the new `ID` displayed in the `Service account keys` section. + +## Default Value + +GCP does not provide an automation option for External (user-managed) Service key rotation. + +## Additional Information + +For user-managed Service Account key(s), key management is entirely the user's responsibility. + +## References + +1. https://cloud.google.com/iam/docs/understanding-service-accounts#managing_service_account_keys +2. https://cloud.google.com/sdk/gcloud/reference/iam/service-accounts/keys/list +3. https://cloud.google.com/iam/docs/service-accounts + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------- | ---- | ---- | ---- | +| v8 | 0.0 Explicitly Not Mapped | | | | +| v7 | 0.0 Explicitly Not Mapped | | | | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.8/SKILL.md new file mode 100644 index 0000000000..c784cf9932 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.8/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-gcp-foundations-1.8 +description: "Ensure That Separation of Duties Is Enforced While Assigning Service Account Related Roles to Users" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, service-accounts, mfa, kms, api-keys] +cis_id: "1.8" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.8 Ensure That Separation of Duties Is Enforced While Assigning Service Account Related Roles to Users (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +It is recommended that the principle of 'Separation of Duties' is enforced while assigning service-account related roles to users. + +## Rationale + +The built-in/predefined IAM role `Service Account admin` allows the user/identity to create, delete, and manage service account(s). The built-in/predefined IAM role `Service Account User` allows the user/identity (with adequate privileges on Compute and App Engine) to assign service account(s) to Apps/Compute Instances. + +Separation of duties is the concept of ensuring that one individual does not have all necessary permissions to be able to complete a malicious action. In Cloud IAM - service accounts, this could be an action such as using a service account to access resources that user should not normally have access to. + +Separation of duties is a business control typically used in larger organizations, meant to help avoid security or privacy incidents and errors. It is considered best practice. + +No user should have `Service Account Admin` and `Service Account User` roles assigned at the same time. + +## Impact + +The removed role should be assigned to a different user based on business needs. + +## Audit Procedure + +**From Google Cloud Console** + +1. Go to `IAM & Admin/IAM` using `https://console.cloud.google.com/iam-admin/iam`. +2. Ensure no member has the roles `Service Account Admin` and `Service account User` assigned together. + +**From Google Cloud CLI** + +1. List all users and role assignments: + +```bash +gcloud projects get-iam-policy [Project_ID] --format json | \ + jq -r '[ + (["Service_Account_Admin_and_User"] | (., map(length*"-"))), + ( + [ + .bindings[] | + select(.role == "roles/iam.serviceAccountAdmin" or .role == "roles/iam.serviceAccountUser").members[] + ] | + group_by(.) | + map({User: ., Count: length}) | + .[] | + select(.Count == 2).User | + unique + ) + ] | + .[] | + @tsv' +``` + +2. All common users listed under `Service_Account_Admin_and_User` are assigned both the `roles/iam.serviceAccountAdmin` and `roles/iam.serviceAccountUser` roles. + +## Expected Result + +No users should be listed as having both `Service Account Admin` and `Service Account User` roles assigned simultaneously. + +## Remediation + +**From Google Cloud Console** + +1. Go to `IAM & Admin/IAM` using `https://console.cloud.google.com/iam-admin/iam`. +2. For any member having both `Service Account Admin` and `Service account User` roles granted/assigned, click the `Delete Bin` icon to remove either role from the member. + Removal of a role should be done based on the business requirements. + +## Default Value + +By default, there are no roles assigned to User Managed User created service accounts. + +## Additional Information + +Users granted with Owner (roles/owner) and Editor (roles/editor) have privileges equivalent to `Service Account Admin` and `Service Account User`. To avoid the misuse, Owner and Editor roles should be granted to very limited users and Use of these primitive privileges should be minimal. These requirements are addressed in separate recommendations. + +## References + +1. https://cloud.google.com/iam/docs/service-accounts +2. https://cloud.google.com/iam/docs/understanding-roles +3. https://cloud.google.com/iam/docs/granting-roles-to-service-accounts + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.9/SKILL.md new file mode 100644 index 0000000000..2c536cbdc2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-1.9/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-gcp-foundations-1.9 +description: "Ensure That Cloud KMS Cryptokeys Are Not Anonymously or Publicly Accessible" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, iam, service-accounts, mfa, kms, api-keys] +cis_id: "1.9" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.9 Ensure That Cloud KMS Cryptokeys Are Not Anonymously or Publicly Accessible (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended that the IAM policy on Cloud KMS `cryptokeys` should restrict anonymous and/or public access. + +## Rationale + +Granting permissions to `allUsers` or `allAuthenticatedUsers` allows anyone to access the dataset. Such access might not be desirable if sensitive data is stored at the location. In this case, ensure that anonymous and/or public access to a Cloud KMS `cryptokey` is not allowed. + +## Impact + +Removing the binding for `allUsers` and `allAuthenticatedUsers` members denies accessing `cryptokeys` to anonymous or public users. + +## Audit Procedure + +**From Google Cloud CLI** + +1. List all Cloud KMS `Cryptokeys`. + +```bash +gcloud kms keys list --keyring=[key_ring_name] --location=global --format=json | jq '.[].name' +``` + +2. Ensure the below command's output does not contain `allUsers` or `allAuthenticatedUsers`. + +```bash +gcloud kms keys get-iam-policy [key_name] --keyring=[key_ring_name] --location=global --format=json | jq '.bindings[].members[]' +``` + +## Expected Result + +The output should not contain `allUsers` or `allAuthenticatedUsers`. + +## Remediation + +**From Google Cloud CLI** + +1. List all Cloud KMS `Cryptokeys`. + +```bash +gcloud kms keys list --keyring=[key_ring_name] --location=global --format=json | jq '.[].name' +``` + +2. Remove IAM policy binding for a KMS key to remove access to `allUsers` and `allAuthenticatedUsers` using the below command. + +```bash +gcloud kms keys remove-iam-policy-binding [key_name] --keyring=[key_ring_name] --location=global --member='allAuthenticatedUsers' --role='[role]' + +gcloud kms keys remove-iam-policy-binding [key_name] --keyring=[key_ring_name] --location=global --member='allUsers' --role='[role]' +``` + +## Default Value + +By default Cloud KMS does not allow access to `allUsers` or `allAuthenticatedUsers`. + +## Additional Information + +`[key_ring_name]` : Is the resource ID of the key ring, which is the fully-qualified Key ring name. This value is case-sensitive and in the form: `projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING` + +You can retrieve the key ring resource ID using the Cloud Console: + +1. Open the `Cryptographic Keys` page in the Cloud Console. +2. For the key ring whose resource ID you are retrieving, click the `More icon (3 vertical dots)`. +3. Click `Copy Resource ID`. The resource ID for the key ring is copied to your clipboard. + +`[key_name]` : Is the resource ID of the key, which is the fully-qualified CryptoKey name. This value is case-sensitive and in the form: `projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY` + +You can retrieve the key resource ID using the Cloud Console: + +1. Open the `Cryptographic Keys` page in the Cloud Console. +2. Click the name of the key ring that contains the key. +3. For the key whose resource ID you are retrieving, click the `More icon (3 vertical dots)`. + +## References + +1. https://cloud.google.com/sdk/gcloud/reference/kms/keys/remove-iam-policy-binding +2. https://cloud.google.com/sdk/gcloud/reference/kms/keys/set-iam-policy +3. https://cloud.google.com/sdk/gcloud/reference/kms/keys/get-iam-policy +4. https://cloud.google.com/kms/docs/object-hierarchy#key_resource_id + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.1/SKILL.md new file mode 100644 index 0000000000..01438e4ea7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.1/SKILL.md @@ -0,0 +1,151 @@ +--- +name: cis-gcp-foundations-2.1 +description: "Ensure That Cloud Audit Logging Is Configured Properly" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, cloud-audit, data-access] +cis_id: "2.1" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure That Cloud Audit Logging Is Configured Properly (Automated) + +## Description + +It is recommended that Cloud Audit Logging is configured to track all admin activities and read, write access to user data. + +## Rationale + +Cloud Audit Logging maintains two audit logs for each project, folder, and organization: Admin Activity and Data Access. + +1. Admin Activity logs contain log entries for API calls or other administrative actions that modify the configuration or metadata of resources. Admin Activity audit logs are enabled for all services and cannot be configured. +2. Data Access audit logs record API calls that create, modify, or read user-provided data. These are disabled by default and should be enabled. + +There are three kinds of Data Access audit log information: + +- Admin read: Records operations that read metadata or configuration information. Admin Activity audit logs record writes of metadata and configuration information that cannot be disabled. +- Data read: Records operations that read user-provided data. +- Data write: Records operations that write user-provided data. + +It is recommended to have an effective default audit config configured in such a way that: + +1. logtype is set to DATA_READ (to log user activity tracking) and DATA_WRITES (to log changes/tampering to user data). +2. audit config is enabled for all the services supported by the Data Access audit logs feature. +3. Logs should be captured for all users, i.e., there are no exempted users in any of the audit config sections. This will ensure overriding the audit config will not contradict the requirement. + +## Impact + +There is no charge for Admin Activity audit logs. Enabling the Data Access audit logs might result in your project being charged for the additional logs usage. + +## Audit Procedure + +### Using Google Cloud Console + +1. Go to `Audit Logs` by visiting https://console.cloud.google.com/iam-admin/audit. +2. Ensure that Admin Read, Data Write, and Data Read are enabled for all Google Cloud services and that no exemptions are allowed. + +### Using Google Cloud CLI + +1. List the Identity and Access Management (IAM) policies for the project, folder, or organization: + +```bash +gcloud organizations get-iam-policy ORGANIZATION_ID +gcloud resource-manager folders get-iam-policy FOLDER_ID +gcloud projects get-iam-policy PROJECT_ID +``` + +2. Policy should have a default `auditConfigs` section which has the logtype set to `DATA_WRITES` and `DATA_READ` for all services. Note that projects inherit settings from folders, which in turn inherit settings from the organization. When called, `projects get-iam-policy`, the result shows only the policies set in the project, not the policies inherited from the parent folder or organization. Nevertheless, if the parent folder has Cloud Audit Logging enabled, the project does as well. + +### Expected Result + +Sample output for default audit configs may look like this: + +``` +auditConfigs: +- auditLogConfigs: + - logType: ADMIN_READ + - logType: DATA_WRITE + - logType: DATA_READ + service: allServices +``` + +3. Any of the `auditConfigs` sections should not have parameter `exemptedMembers:` set, which will ensure that Logging is enabled for all users and no user is exempted. + +## Remediation + +### Using Google Cloud Console + +1. Go to `Audit Logs` by visiting https://console.cloud.google.com/iam-admin/audit. +2. Follow the steps at https://cloud.google.com/logging/docs/audit/configure-data-access to enable audit logs for all Google Cloud services. Ensure that no exemptions are allowed. + +### Using Google Cloud CLI + +1. To read the project's IAM policy and store it in a file run a command: + +```bash +gcloud projects get-iam-policy PROJECT_ID > /tmp/project_policy.yaml +``` + +Alternatively, the policy can be set at the organization or folder level. If setting the policy at the organization level, it is not necessary to also set it for each folder or project. + +```bash +gcloud organizations get-iam-policy ORGANIZATION_ID > /tmp/org_policy.yaml +gcloud resource-manager folders get-iam-policy FOLDER_ID > /tmp/folder_policy.yaml +``` + +2. Edit policy in /tmp/policy.yaml, adding or changing only the audit logs configuration to: + +Note: Admin Activity Logs are enabled by default, and cannot be disabled. So they are not listed in these configuration changes. + +```yaml +auditConfigs: + - auditLogConfigs: + - logType: DATA_WRITE + - logType: DATA_READ + service: allServices +``` + +Note: `exemptedMembers:` is not set as audit logging should be enabled for all the users. + +3. To write new IAM policy run command: + +```bash +gcloud organizations set-iam-policy ORGANIZATION_ID /tmp/org_policy.yaml +gcloud resource-manager folders set-iam-policy FOLDER_ID /tmp/folder_policy.yaml +gcloud projects set-iam-policy PROJECT_ID /tmp/project_policy.yaml +``` + +If the preceding command reports a conflict with another change, then repeat these steps, starting with the first step. + +## Default Value + +Admin Activity logs are always enabled. They cannot be disabled. Data Access audit logs are disabled by default because they can be quite large. + +## References + +1. https://cloud.google.com/logging/docs/audit/ +2. https://cloud.google.com/logging/docs/audit/configure-data-access + +## Additional Information + +- Log type `DATA_READ` is equally important to that of `DATA_WRITE` to track detailed user activities. +- BigQuery Data Access logs are handled differently from other data access logs. BigQuery logs are enabled by default and cannot be disabled. They do not count against logs allotment and cannot result in extra logs charges. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------ | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.7 Regularly Review Logs | | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.10/SKILL.md new file mode 100644 index 0000000000..59ce948d4a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.10/SKILL.md @@ -0,0 +1,149 @@ +--- +name: cis-gcp-foundations-2.10 +description: "Ensure That the Log Metric Filter and Alerts Exist for Cloud Storage IAM Permission Changes" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, log-metrics, alerts, cloud-storage, iam] +cis_id: "2.10" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.10 Ensure That the Log Metric Filter and Alerts Exist for Cloud Storage IAM Permission Changes (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +It is recommended that a metric filter and alarm be established for Cloud Storage Bucket IAM changes. + +## Rationale + +Monitoring changes to cloud storage bucket permissions may reduce the time needed to detect and correct permissions on sensitive cloud storage buckets and objects inside the bucket. + +## Impact + +Enabling of logging may result in your project being charged for the additional logs usage. These charges could be significant depending on the size of the organization. + +## Audit + +### From Google Cloud Console + +Ensure the prescribed log metric is present: + +1. For each project that contains cloud storage buckets, go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics. +2. In the `User-defined Metrics` section, ensure at least one metric `` is present with the filter text: + +``` +resource.type="gcs_bucket" +AND protoPayload.methodName="storage.setIamPermissions" +``` + +Ensure the prescribed alerting policy is present: + +3. Go to `Alerting` by visiting https://console.cloud.google.com/monitoring/alerting. +4. Under the `Policies` section, ensure that at least one alert policy exists for the log metric above. Clicking on the policy should show that it is configured with a condition. For example, `Violates when: Any logging.googleapis.com/user/ stream is above a threshold of 0 for greater than 0 seconds` means that the alert will trigger for any new owner change. Verify that the chosen alerting thresholds make sense for the user's organization. +5. Ensure that the appropriate notifications channels have been set up. + +### From Google Cloud CLI + +Ensure that the prescribed log metric is present: + +1. List the log metrics: + +```bash +gcloud logging metrics list --format json +``` + +2. Ensure that the output contains at least one metric with the filter set to: + +``` +resource.type=gcs_bucket +AND protoPayload.methodName="storage.setIamPermissions" +``` + +3. Note the value of the property `metricDescriptor.type` for the identified metric, in the format `logging.googleapis.com/user/`. + +Ensure the prescribed alerting policy is present: + +4. List the alerting policies: + +```bash +gcloud alpha monitoring policies list --format json +``` + +5. Ensure that the output contains at least one alert policy where: + - `conditions.conditionThreshold.filter` is set to `metric.type=\"logging.googleapis.com/user/\"` + - AND `enabled` is set to `true` + +## Remediation + +### From Google Cloud Console + +Create the prescribed log metric: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics and click "CREATE METRIC". +2. Click the down arrow symbol on the `Filter Bar` at the rightmost corner and select `Convert to Advanced Filter`. +3. Clear any text and add: + +``` +resource.type="gcs_bucket" +AND protoPayload.methodName="storage.setIamPermissions" +``` + +4. Click `Submit Filter`. Display logs appear based on the filter text entered by the user. +5. In the `Metric Editor` menu on right, fill out the name field. Set `Units` to `1` (default) and `Type` to `Counter`. This ensures that the log metric counts the number of log entries matching the user's advanced logs query. +6. Click `Create Metric`. + +Create the prescribed Alert Policy: + +1. Identify the newly created metric under the section `User-defined Metrics` at https://console.cloud.google.com/logs/metrics. +2. Click the 3-dot icon in the rightmost column for the new metric and select `Create alert from Metric`. A new page appears. +3. Fill out the alert policy configuration and click `Save`. Choose the alerting threshold and configuration that makes sense for the user's organization. For example, a threshold of zero(0) for the most recent value will ensure that a notification is triggered for every owner change in the project: + +``` +Set `Aggregator` to `Count` + +Set `Configuration`: +- Condition: above +- Threshold: 0 +- For: most recent value +``` + +4. Configure the desired notifications channels in the section `Notifications`. +5. Name the policy and click `Save`. + +### From Google Cloud CLI + +Create the prescribed Log Metric: + +- Use the command: `gcloud beta logging metrics create` + +Create the prescribed alert policy: + +- Use the command: `gcloud alpha monitoring policies create` + +## References + +1. https://cloud.google.com/logging/docs/logs-based-metrics/ +2. https://cloud.google.com/monitoring/custom-metrics/ +3. https://cloud.google.com/monitoring/alerts/ +4. https://cloud.google.com/logging/docs/reference/tools/gcloud-logging +5. https://cloud.google.com/storage/docs/overview +6. https://cloud.google.com/storage/docs/access-control/iam-roles + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.11/SKILL.md new file mode 100644 index 0000000000..ab5a2056e7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.11/SKILL.md @@ -0,0 +1,154 @@ +--- +name: cis-gcp-foundations-2.11 +description: "Ensure That the Log Metric Filter and Alerts Exist for SQL Instance Configuration Changes" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, log-metrics, alerts, cloud-sql, database] +cis_id: "2.11" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.11 Ensure That the Log Metric Filter and Alerts Exist for SQL Instance Configuration Changes (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +It is recommended that a metric filter and alarm be established for SQL instance configuration changes. + +## Rationale + +Monitoring changes to SQL instance configuration changes may reduce the time needed to detect and correct misconfigurations done on the SQL server. + +Below are a few of the configurable options which may impact the security posture of an SQL instance: + +- Enable auto backups and high availability: Misconfiguration may adversely impact business continuity, disaster recovery, and high availability +- Authorize networks: Misconfiguration may increase exposure to untrusted networks + +## Impact + +Enabling of logging may result in your project being charged for the additional logs usage. These charges could be significant depending on the size of the organization. + +## Audit + +### From Google Cloud Console + +Ensure the prescribed log metric is present: + +1. For each project that contains Cloud SQL instances, go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics. +2. In the `User-defined Metrics` section, ensure that at least one metric `` is present with the filter text: + +``` +protoPayload.methodName="cloudsql.instances.update" +``` + +Ensure the prescribed alerting policy is present: + +3. Go to `Alerting` by visiting https://console.cloud.google.com/monitoring/alerting. +4. Under the `Policies` section, ensure that at least one alert policy exists for the log metric above. Clicking on the policy should show that it is configured with a condition. For example, `Violates when: Any logging.googleapis.com/user/ stream is above a threshold of zero(0) for greater than zero(0) seconds` means that the alert will trigger for any new owner change. Verify that the chosen alerting thresholds make sense for the user's organization. +5. Ensure that the appropriate notifications channels have been set up. + +### From Google Cloud CLI + +Ensure the prescribed log metric is present: + +1. List the log metrics: + +```bash +gcloud logging metrics list --format json +``` + +2. Ensure that the output contains at least one metric with the filter set to: + +``` +protoPayload.methodName="cloudsql.instances.update" +``` + +3. Note the value of the property `metricDescriptor.type` for the identified metric, in the format `logging.googleapis.com/user/`. + +Ensure the prescribed alerting policy is present: + +4. List the alerting policies: + +```bash +gcloud alpha monitoring policies list --format json +``` + +5. Ensure that the output contains at least one alert policy where: + - `conditions.conditionThreshold.filter` is set to `metric.type=\"logging.googleapis.com/user/\"` + - AND `enabled` is set to `true` + +## Remediation + +### From Google Cloud Console + +Create the prescribed Log Metric: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics and click "CREATE METRIC". +2. Click the down arrow symbol on the `Filter Bar` at the rightmost corner and select `Convert to Advanced Filter`. +3. Clear any text and add: + +``` +protoPayload.methodName="cloudsql.instances.update" +``` + +4. Click `Submit Filter`. Display logs appear based on the filter text entered by the user. +5. In the `Metric Editor` menu on right, fill out the name field. Set `Units` to `1` (default) and `Type` to `Counter`. This ensures that the log metric counts the number of log entries matching the user's advanced logs query. +6. Click `Create Metric`. + +Create the prescribed alert policy: + +1. Identify the newly created metric under the section `User-defined Metrics` at https://console.cloud.google.com/logs/metrics. +2. Click the 3-dot icon in the rightmost column for the new metric and select `Create alert from Metric`. A new page appears. +3. Fill out the alert policy configuration and click `Save`. Choose the alerting threshold and configuration that makes sense for the user's organization. For example, a threshold of zero(0) for the most recent value will ensure that a notification is triggered for every owner change in the user's project: + +``` +Set `Aggregator` to `Count` + +Set `Configuration`: +- Condition: above +- Threshold: 0 +- For: most recent value +``` + +4. Configure the desired notification channels in the section `Notifications`. +5. Name the policy and click `Save`. + +### From Google Cloud CLI + +Create the prescribed log metric: + +- Use the command: `gcloud logging metrics create` + +Create the prescribed alert policy: + +- Use the command: `gcloud alpha monitoring policies create` +- Reference for command usage: https://cloud.google.com/sdk/gcloud/reference/alpha/monitoring/policies/create + +## References + +1. https://cloud.google.com/logging/docs/logs-based-metrics/ +2. https://cloud.google.com/monitoring/custom-metrics/ +3. https://cloud.google.com/monitoring/alerts/ +4. https://cloud.google.com/logging/docs/reference/tools/gcloud-logging +5. https://cloud.google.com/storage/docs/overview +6. https://cloud.google.com/sql/docs/ +7. https://cloud.google.com/sql/docs/mysql/ +8. https://cloud.google.com/sql/docs/postgres/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.12/SKILL.md new file mode 100644 index 0000000000..adfefe5791 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.12/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-gcp-foundations-2.12 +description: "Ensure That Cloud DNS Logging Is Enabled for All VPC Networks" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, dns, vpc, networking] +cis_id: "2.12" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.12 Ensure That Cloud DNS Logging Is Enabled for All VPC Networks (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Cloud DNS logging records the queries from the name servers within your VPC to Stackdriver. Logged queries can come from Compute Engine VMs, GKE containers, or other GCP resources provisioned within the VPC. + +## Rationale + +Security monitoring and forensics cannot depend solely on IP addresses from VPC flow logs, especially when considering the dynamic IP usage of cloud resources, HTTP virtual host routing, and other technology that can obscure the DNS name used by a client from the IP address. Monitoring of Cloud DNS logs provides visibility to DNS names requested by the clients within the VPC. These logs can be monitored for anomalous domain names, evaluated against threat intelligence, and + +Note: For full capture of DNS, firewall must block egress UDP/53 (DNS) and TCP/443 (DNS over HTTPS) to prevent client from using external DNS name server for resolution. + +## Impact + +Enabling Cloud DNS logging might result in your project being charged for the additional logs usage. + +## Audit + +### From Google Cloud CLI + +1. List all VPCs networks in a project: + +```bash +gcloud compute networks list --format="table[box,title='All VPC Networks'](name:label='VPC Network Name')" +``` + +2. List all DNS policies, logging enablement, and associated VPC networks: + +```bash +gcloud dns policies list --flatten="networks[]" --format="table[box,title='All DNS Policies By VPC Network'](name:label='Policy Name',enableLogging:label='Logging Enabled':align=center,networks.networkUrl.basename():label='VPC Network Name')" +``` + +Each VPC Network should be associated with a DNS policy with logging enabled. + +## Remediation + +### From Google Cloud CLI + +Add New DNS Policy With Logging Enabled + +For each VPC network that needs a DNS policy with logging enabled: + +```bash +gcloud dns policies create enable-dns-logging --enable-logging --description="Enable DNS Logging" --networks=VPC_NETWORK_NAME +``` + +The VPC_NETWORK_NAME can be one or more networks in comma-separated list. + +Enable Logging for Existing DNS Policy + +For each VPC network that has an existing DNS policy that needs logging enabled: + +```bash +gcloud dns policies update POLICY_NAME --enable-logging --networks=VPC_NETWORK_NAME +``` + +The VPC_NETWORK_NAME can be one or more networks in comma-separated list. + +## Default Value + +Cloud DNS logging is disabled by default on each network. + +## References + +1. https://cloud.google.com/dns/docs/monitoring + +## Additional Information + +- Only queries that reach a name server are logged. Cloud DNS resolvers cache responses, queries answered from caches, or direct queries to an external DNS resolver outside the VPC are not logged. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.6 Collect DNS Query Audit Logs | | x | x | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.7 Regularly Review Logs | | x | x | +| v7 | 8.7 Enable DNS Query Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.13/SKILL.md new file mode 100644 index 0000000000..9826d135f8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.13/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-gcp-foundations-2.13 +description: "Ensure Cloud Asset Inventory Is Enabled" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, asset-inventory, compliance] +cis_id: "2.13" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.13 Ensure Cloud Asset Inventory Is Enabled (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +GCP Cloud Asset Inventory is a service that provides a historical view of GCP resources and IAM policies through a time-series database. The information recorded includes metadata on Google Cloud resources, metadata on policies set on Google Cloud projects or resources, and runtime information gathered within a Google Cloud resource. + +Cloud Asset Inventory Service (CAIS) API enablement is not required for operation of the service, but rather enables the mechanism for searching/exporting CAIS asset data directly. + +## Rationale + +The GCP resources and IAM policies captured by GCP Cloud Asset Inventory enables security analysis, resource change tracking, and compliance auditing. + +It is recommended GCP Cloud Asset Inventory be enabled for all GCP projects. + +## Audit + +### From Google Cloud Console + +Ensure that the Cloud Asset API is enabled: + +1. Go to `API & Services/Library` by visiting https://console.cloud.google.com/apis/library +2. Search for `Cloud Asset API` and select the result for Cloud Asset API +3. Ensure that `API Enabled` is displayed. + +### From Google Cloud CLI + +Ensure that the Cloud Asset API is enabled: + +1. Query enabled services: + +```bash +gcloud services list --enabled --filter=name:cloudasset.googleapis.com +``` + +If the API is listed, then it is enabled. If the response is `Listed 0 items` the API is not enabled. + +## Remediation + +### From Google Cloud Console + +Enable the Cloud Asset API: + +1. Go to `API & Services/Library` by visiting https://console.cloud.google.com/apis/library +2. Search for `Cloud Asset API` and select the result for Cloud Asset API +3. Click the `ENABLE` button. + +### From Google Cloud CLI + +Enable the Cloud Asset API: + +1. Enable the Cloud Asset API through the services interface: + +```bash +gcloud services enable cloudasset.googleapis.com +``` + +## Default Value + +The Cloud Asset Inventory API is disabled by default in each project. + +## References + +1. https://cloud.google.com/asset-inventory/docs + +## Additional Information + +- Cloud Asset Inventory only keeps a five-week history of Google Cloud asset metadata. If a longer history is desired, automation to export the history to Cloud Storage or BigQuery should be evaluated. +- Users need not enable CAI API if they don't have any plans to export. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 1.1 Establish and Maintain Detailed Enterprise Asset Inventory | x | x | x | +| v8 | 6.6 Establish and Maintain an Inventory of Authentication and Authorization Systems | | x | x | +| v7 | 1.4 Maintain Detailed Asset Inventory | x | x | x | +| v7 | 11.2 Document Traffic Configuration Rules | | x | x | +| v7 | 16.1 Maintain an Inventory of Authentication Systems | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.14/SKILL.md new file mode 100644 index 0000000000..67bd743129 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.14/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-gcp-foundations-2.14 +description: "Ensure 'Access Transparency' is 'Enabled'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, access-transparency, audit-logs] +cis_id: "2.14" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.14 Ensure 'Access Transparency' is 'Enabled' (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +GCP Access Transparency provides audit logs for all actions that Google personnel take in your Google Cloud resources. + +## Rationale + +Controlling access to your information is one of the foundations of information security. Given that Google Employees do have access to your organizations' projects for support reasons, you should have logging in place to view who, when, and why your information is being accessed. + +## Impact + +To use Access Transparency your organization will need to have at one of the following support level: Premium, Enterprise, Platinum, or Gold. There will be subscription costs associated with support, as well as increased storage costs for storing the logs. You will also not be able to turn Access Transparency off yourself, and you will need to submit a service request to Google Cloud Support. + +## Audit + +### From Google Cloud Console + +Determine if Access Transparency is Enabled: + +1. From the Google Cloud Home, click on the Navigation hamburger menu in the top left. Hover over the IAM & Admin Menu. Select `settings` in the middle of the column that opens. +2. The status will be under the heading `Access Transparency`. Status should be `Enabled`. + +## Remediation + +### From Google Cloud Console + +Add privileges to enable Access Transparency: + +1. From the Google Cloud Home, within the project you wish to check, click on the Navigation hamburger menu in the top left. Hover over the 'IAM and Admin'. Select `IAM` in the top of the column that opens. +2. Click the blue button the says `+add` at the top of the screen. +3. In the `principals` field, select a user or group by typing in their associated email address. +4. Click on the `role` field to expand it. In the filter field enter `Access Transparency Admin` and select it. +5. Click `save`. + +Verify that the Google Cloud project is associated with a billing account: + +1. From the Google Cloud Home, click on the Navigation hamburger menu in the top left. Select `Billing`. +2. If you see `This project is not associated with a billing account` you will need to enter billing information or switch to a project with a billing account. + +Enable Access Transparency: + +1. From the Google Cloud Home, click on the Navigation hamburger menu in the top left. Hover over the IAM & Admin Menu. Select `settings` in the middle of the column that opens. +2. Click the blue button labeled Enable `Access Transparency for Organization`. + +## Default Value + +By default Access Transparency is not enabled. + +## References + +1. https://cloud.google.com/cloud-provider-access-management/access-transparency/docs/overview +2. https://cloud.google.com/cloud-provider-access-management/access-transparency/docs/enable +3. https://cloud.google.com/cloud-provider-access-management/access-transparency/docs/reading-logs +4. https://cloud.google.com/cloud-provider-access-management/access-transparency/docs/reading-logs#justification_reason_codes +5. https://cloud.google.com/cloud-provider-access-management/access-transparency/docs/supported-services + +## Additional Information + +To enable Access Transparency for your Google Cloud organization, your Google Cloud organization must have one of the following customer support levels: Premium, Enterprise, Platinum, or Gold. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.15/SKILL.md new file mode 100644 index 0000000000..4f4006f650 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.15/SKILL.md @@ -0,0 +1,124 @@ +--- +name: cis-gcp-foundations-2.15 +description: "Ensure 'Access Approval' is 'Enabled'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, access-transparency, access-approval, iam] +cis_id: "2.15" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.15 Ensure 'Access Approval' is 'Enabled' (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +GCP Access Approval enables you to require your organizations' explicit approval whenever Google support try to access your projects. You can then select users within your organization who can approve these requests through giving them a security role in IAM. All access requests display which Google Employee requested them in an email or Pub/Sub message that you can choose to Approve. This adds an additional control and logging of who in your organization approved/denied these requests. + +## Rationale + +Controlling access to your information is one of the foundations of information security. Google Employees do have access to your organizations' projects for support reasons. With Access Approval, organizations can then be certain that their information is accessed by only approved Google Personnel. + +## Impact + +To use Access Approval your organization will need have enabled Access Transparency and have at one of the following support level: Enhanced or Premium. There will be subscription costs associated with these support levels, as well as increased storage costs for storing the logs. You will also not be able to turn the Access Transparency which Access Approval depends on, off yourself. To do so you will need to submit a service request to Google Cloud Support. There will also be additional overhead in managing user permissions. There may also be a potential delay in support times as Google Personnel will have to wait for their access to be approved. + +## Audit + +### From Google Cloud Console + +Determine if Access Transparency is Enabled as it is a Dependency: + +1. From the Google Cloud Home inside the project you wish to audit, click on the Navigation hamburger menu in the top left. Hover over the `IAM & Admin` Menu. Select `settings` in the middle of the column that opens. +2. The status should be 'Enabled' under the heading `Access Transparency`. + +Determine if Access Approval is Enabled: + +1. From the Google Cloud Home, within the project you wish to check, click on the Navigation hamburger menu in the top left. Hover over the `Security` Menu. Select `Access Approval` in the middle of the column that opens. +2. The status will be displayed here. If you see a screen saying you need to enroll in Access Approval, it is not enabled. + +### From Google Cloud CLI + +Determine if Access Approval is Enabled: + +1. From within the project you wish to audit, run the following command: + +```bash +gcloud access-approval settings get +``` + +2. The status will be displayed in the output. + +IF Access Approval is not enabled you should get this output: + +``` +API [accessapproval.googleapis.com] not enabled on project [-----]. Would you like to enable and retry (this will take a few minutes)? (y/N)? +``` + +After entering `Y` if you get the following output, it means that `Access Transparency` is not enabled: + +``` +ERROR: (gcloud.access-approval.settings.get) FAILED_PRECONDITION: Precondition check failed. +``` + +## Remediation + +### From Google Cloud Console + +1. From the Google Cloud Home, within the project you wish to enable, click on the Navigation hamburger menu in the top left. Hover over the `Security` Menu. Select `Access Approval` in the middle of the column that opens. +2. The status will be displayed here. On this screen, there is an option to click `Enroll`. If it is greyed out and you see an error bar at the top of the screen that says `Access Transparency is not enabled` please view the corresponding reference within this section to enable it. +3. In the second screen click `Enroll`. + +Grant an IAM Group or User the role with permissions to Add Users to be Access Approval message Recipients: + +1. From the Google Cloud Home, within the project you wish to enable, click on the Navigation hamburger menu in the top left. Hover over the `IAM and Admin`. Select `IAM` in the middle of the column that opens. +2. Click the blue button the says `+ ADD` at the top of the screen. +3. In the `principals` field, select a user or group by typing in their associated email address. +4. Click on the role field to expand it. In the filter field enter `Access Approval Approver` and select it. +5. Click `save`. + +Add a Group or User as an Approver for Access Approval Requests: + +1. As a user with the `Access Approval Approver` permission, within the project where you wish to add an email address to which request will be sent, click on the Navigation hamburger menu in the top left. Hover over the `Security` Menu. Select `Access Approval` in the middle of the column that opens. +2. Click `Manage Settings`. +3. Under `Set up approval notifications`, enter the email address associated with a Google Cloud User or Group you wish to send Access Approval requests to. All future access approvals will be sent as emails to this address. + +### From Google Cloud CLI + +1. To update all services in an entire project, run the following command from an account that has permissions as an 'Approver for Access Approval Requests': + +```bash +gcloud access-approval settings update --project= --enrolled_services=all --notification_emails='@' +``` + +## Default Value + +By default Access Approval and its dependency of Access Transparency are not enabled. + +## References + +1. https://cloud.google.com/cloud-provider-access-management/access-approval/docs +2. https://cloud.google.com/cloud-provider-access-management/access-approval/docs/overview +3. https://cloud.google.com/cloud-provider-access-management/access-approval/docs/quickstart-custom-key +4. https://cloud.google.com/cloud-provider-access-management/access-approval/docs/supported-services +5. https://cloud.google.com/cloud-provider-access-management/access-approval/docs/view-historical-requests + +## Additional Information + +The recipients of Access Requests will also need to be logged into a Google Cloud account associated with an email address in this list. To approve requests they can click approve within the email. Or they can view requests at the Access Approval page within the Security submenu. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.16/SKILL.md new file mode 100644 index 0000000000..55e1843fd0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.16/SKILL.md @@ -0,0 +1,91 @@ +--- +name: cis-gcp-foundations-2.16 +description: "Ensure Logging is enabled for HTTP(S) Load Balancer" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, load-balancer, networking] +cis_id: "2.16" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.16 Ensure Logging is enabled for HTTP(S) Load Balancer (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Logging enabled on a HTTPS Load Balancer will show all network traffic and its destination. + +## Rationale + +Logging will allow you to view HTTPS network traffic to your web applications. + +## Impact + +On high use systems with a high percentage sample rate, the logging file may grow to high capacity in a short amount of time. Ensure that the sample rate is set appropriately so that storage costs are not exorbitant. + +## Audit + +### From Google Cloud Console + +1. From Google Cloud home open the Navigation Menu in the top left. +2. Under the `Networking` heading select `Network services`. +3. Select the HTTPS load-balancer you wish to audit. +4. Select `Edit` then `Backend Configuration`. +5. Select `Edit` on the corresponding backend service. +6. Ensure that `Enable Logging` is selected. Also ensure that `Sample Rate` is set to an appropriate level for your needs. + +### From Google Cloud CLI + +1. Run the following command: + +```bash +gcloud compute backend-services describe +``` + +2. Ensure that `enable-logging` is enabled and `sample rate` is set to your desired level. + +## Remediation + +### From Google Cloud Console + +1. From Google Cloud home open the Navigation Menu in the top left. +2. Under the `Networking` heading select `Network services`. +3. Select the HTTPS load-balancer you wish to audit. +4. Select `Edit` then `Backend Configuration`. +5. Select `Edit` on the corresponding backend service. +6. Click `Enable Logging`. +7. Set `Sample Rate` to a desired value. This is a percentage as a decimal point. 1.0 is 100%. + +### From Google Cloud CLI + +1. Run the following command: + +```bash +gcloud compute backend-services update --region=REGION --enable-logging --logging-sample-rate= +``` + +## Default Value + +By default logging for https load balancing is disabled. When logging is enabled it sets the default sample rate as 1.0 or 100%. Ensure this value fits the need of your organization to avoid high storage costs. + +## References + +1. https://cloud.google.com/load-balancing/ +2. https://cloud.google.com/load-balancing/docs/https/https-logging-monitoring#gcloud:-global-mode +3. https://cloud.google.com/sdk/gcloud/reference/compute/backend-services/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.2/SKILL.md new file mode 100644 index 0000000000..5ff59756e1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.2/SKILL.md @@ -0,0 +1,121 @@ +--- +name: cis-gcp-foundations-2.2 +description: "Ensure That Sinks Are Configured for All Log Entries" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, log-sinks, cloud-audit] +cis_id: "2.2" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure That Sinks Are Configured for All Log Entries (Automated) + +## Description + +It is recommended to create a sink that will export copies of all the log entries. This can help aggregate logs from multiple projects and export them to a Security Information and Event Management (SIEM). + +## Rationale + +Log entries are held in Cloud Logging. To aggregate logs, export them to a SIEM. To keep them longer, it is recommended to set up a log sink. Exporting involves writing a filter that selects the log entries to export, and choosing a destination in Cloud Storage, BigQuery, or Cloud Pub/Sub. The filter and destination are held in an object called a sink. To ensure all log entries are exported to sinks, ensure that there is no filter configured for a sink. Sinks can be created in projects, organizations, folders, and billing accounts. + +## Impact + +There are no costs or limitations in Cloud Logging for exporting logs, but the export destinations charge for storing or transmitting the log data. + +## Audit Procedure + +### Using Google Cloud Console + +1. Go to `Logs Router` by visiting https://console.cloud.google.com/logs/router. +2. For every sink, click the 3-dot button for Menu options and select `View sink details`. +3. Ensure there is at least one sink with an `empty` Inclusion filter. +4. Additionally, ensure that the resource configured as `Destination` exists. + +### Using Google Cloud CLI + +1. Ensure that a sink with an `empty filter` exists. List the sinks for the project, folder or organization. If sinks are configured at a folder or organization level, they do not need to be configured for each project: + +```bash +gcloud logging sinks list --folder=FOLDER_ID | --organization=ORGANIZATION_ID | --project=PROJECT_ID +``` + +The output should list at least one sink with an `empty filter`. + +2. Additionally, ensure that the resource configured as `Destination` exists. + +See https://cloud.google.com/sdk/gcloud/reference/beta/logging/sinks/list for more information. + +### Expected Result + +At least one sink with an empty filter is configured, and the destination resource exists. + +## Remediation + +### Using Google Cloud Console + +1. Go to `Logs Router` by visiting https://console.cloud.google.com/logs/router. +2. Click on the arrow symbol with `CREATE SINK` text. +3. Fill out the fields for `Sink details`. +4. Choose Cloud Logging bucket in the Select sink destination drop down menu. +5. Choose a log bucket in the next drop down menu. +6. If an inclusion filter is not provided for this sink, all ingested logs will be routed to the destination provided above. This may result in higher than expected resource usage. +7. Click `Create Sink`. + +For more information, see https://cloud.google.com/logging/docs/export/configure_export_v2#dest-create. + +### Using Google Cloud CLI + +To create a sink to export all log entries in a Google Cloud Storage bucket: + +```bash +gcloud logging sinks create storage.googleapis.com/DESTINATION_BUCKET_NAME +``` + +Sinks can be created for a folder or organization, which will include all projects. + +```bash +gcloud logging sinks create storage.googleapis.com/DESTINATION_BUCKET_NAME --include-children --folder=FOLDER_ID | --organization=ORGANIZATION_ID +``` + +Note: + +1. A sink created by the command-line above will export logs in storage buckets. However, sinks can be configured to export logs into BigQuery, or Cloud Pub/Sub, or `Custom Destination`. +2. While creating a sink, the sink option `--log-filter` is not used to ensure the sink exports all log entries. +3. A sink can be created at a folder or organization level that collects the logs of all the projects underneath by passing the option `--include-children` in the gcloud command. + +## Default Value + +By default, there are no sinks configured. + +## References + +1. https://cloud.google.com/logging/docs/reference/tools/gcloud-logging +2. https://cloud.google.com/logging/quotas +3. https://cloud.google.com/logging/docs/routing/overview +4. https://cloud.google.com/logging/docs/export/using_exported_logs +5. https://cloud.google.com/logging/docs/export/configure_export_v2 +6. https://cloud.google.com/logging/docs/export/aggregated_exports +7. https://cloud.google.com/sdk/gcloud/reference/beta/logging/sinks/list + +## Additional Information + +For Command-Line Audit and Remediation, the sink destination of type `Cloud Storage Bucket` is considered. However, the destination could be configured to `Cloud Storage Bucket` or `BigQuery` or `Cloud Pub\Sub` or `Custom Destination`. Command Line Interface commands would change accordingly. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.3 Ensure Adequate Audit Log Storage | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.4 Ensure adequate storage for logs | | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.3/SKILL.md new file mode 100644 index 0000000000..73c630705a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.3/SKILL.md @@ -0,0 +1,112 @@ +--- +name: cis-gcp-foundations-2.3 +description: "Ensure That Retention Policies on Cloud Storage Buckets Used for Exporting Logs Are Configured Using Bucket Lock" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, bucket-lock, log-sinks, cloud-storage] +cis_id: "2.3" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure That Retention Policies on Cloud Storage Buckets Used for Exporting Logs Are Configured Using Bucket Lock (Automated) + +## Description + +Enabling retention policies on log buckets will protect logs stored in cloud storage buckets from being overwritten or accidentally deleted. It is recommended to set up retention policies and configure Bucket Lock on all storage buckets that are used as log sinks. + +## Rationale + +Logs can be exported by creating one or more sinks that include a log filter and a destination. As Cloud Logging receives new log entries, they are compared against each sink. If a log entry matches a sink's filter, then a copy of the log entry is written to the destination. + +Sinks can be configured to export logs in storage buckets. It is recommended to configure a data retention policy for these cloud storage buckets and to lock the data retention policy; thus permanently preventing the policy from being reduced or removed. This way, if the system is ever compromised by an attacker or a malicious insider who wants to cover their tracks, the activity logs are definitely preserved for forensics and security investigations. + +## Impact + +Locking a bucket is an irreversible action. Once you lock a bucket, you cannot remove the retention policy from the bucket or decrease the retention period for the policy. You will then have to wait for the retention period for all items within the bucket before you can delete them, and then the bucket. + +## Audit Procedure + +### Using Google Cloud Console + +1. Open the Cloud Storage browser in the Google Cloud Console by visiting https://console.cloud.google.com/storage/browser. +2. In the Column display options menu, make sure `Retention policy` is checked. +3. In the list of buckets, the retention period of each bucket is found in the `Retention policy` column. If the retention policy is locked, an image of a lock appears directly to the left of the retention period. + +### Using Google Cloud CLI + +1. To list all sinks destined to storage buckets: + +```bash +gcloud logging sinks list --folder=FOLDER_ID | --organization=ORGANIZATION_ID | --project=PROJECT_ID +``` + +2. For every storage bucket listed above, verify that retention policies and Bucket Lock are enabled: + +```bash +gsutil retention get gs://BUCKET_NAME +``` + +For more information, see https://cloud.google.com/storage/docs/using-bucket-lock#view-policy. + +### Expected Result + +Each storage bucket used as a log sink has a retention policy configured and Bucket Lock is enabled (locked). + +## Remediation + +### Using Google Cloud Console + +1. If sinks are not configured, first follow the instructions in the recommendation: `Ensure that sinks are configured for all Log entries`. +2. For each storage bucket configured as a sink, go to the Cloud Storage browser at `https://console.cloud.google.com/storage/browser/`. +3. Select the Bucket Lock tab near the top of the page. +4. In the Retention policy entry, click the Add Duration link. The `Set a retention policy` dialog box appears. +5. Enter the desired length of time for the retention period and click `Save policy`. +6. Set the `Lock status` for this retention policy to `Locked`. + +### Using Google Cloud CLI + +1. To list all sinks destined to storage buckets: + +```bash +gcloud logging sinks list --folder=FOLDER_ID | --organization=ORGANIZATION_ID | --project=PROJECT_ID +``` + +2. For each storage bucket listed above, set a retention policy and lock it: + +```bash +gsutil retention set [TIME_DURATION] gs://[BUCKET_NAME] +gsutil retention lock gs://[BUCKET_NAME] +``` + +For more information, visit https://cloud.google.com/storage/docs/using-bucket-lock#set-policy. + +## Default Value + +By default, storage buckets used as log sinks do not have retention policies and Bucket Lock configured. + +## References + +1. https://cloud.google.com/storage/docs/bucket-lock +2. https://cloud.google.com/storage/docs/using-bucket-lock +3. https://cloud.google.com/storage/docs/bucket-lock + +## Additional Information + +Caution: Locking a retention policy is an irreversible action. Once locked, you must delete the entire bucket in order to "remove" the bucket's retention policy. However, before you can delete the bucket, you must be able to delete all the objects in the bucket, which itself is only possible if all the objects have reached the retention period set by the retention policy. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.4/SKILL.md new file mode 100644 index 0000000000..e7b92f63bc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.4/SKILL.md @@ -0,0 +1,188 @@ +--- +name: cis-gcp-foundations-2.4 +description: "Ensure Log Metric Filter and Alerts Exist for Project Ownership Assignments/Changes" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, log-metrics, alerts, iam, project-ownership] +cis_id: "2.4" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Log Metric Filter and Alerts Exist for Project Ownership Assignments/Changes (Automated) + +## Description + +In order to prevent unnecessary project ownership assignments to users/service-accounts and further misuses of projects and resources, all `roles/Owner` assignments should be monitored. + +Members (users/Service-Accounts) with a role assignment to primitive role `roles/Owner` are project owners. + +The project owner has all the privileges on the project the role belongs to. These are summarized below: + +- All viewer permissions on all GCP Services within the project +- Permissions for actions that modify the state of all GCP services within the project +- Manage roles and permissions for a project and all resources within the project +- Set up billing for a project + +Granting the owner role to a member (user/Service-Account) will allow that member to modify the Identity and Access Management (IAM) policy. Therefore, grant the owner role only if the member has a legitimate purpose to manage the IAM policy. This is because the project IAM policy contains sensitive access control data. Having a minimal set of users allowed to manage IAM policy will simplify any auditing that may be necessary. + +## Rationale + +Project ownership has the highest level of privileges on a project. To avoid misuse of project resources, the project ownership assignment/change actions mentioned above should be monitored and alerted to concerned recipients. + +- Sending project ownership invites +- Acceptance/Rejection of project ownership invite by user +- Adding `role\Owner` to a user/service-account +- Removing a user/Service account from `role\Owner` + +## Impact + +Enabling logging may result in your project being charged for the additional logs usage. + +## Audit Procedure + +### Using Google Cloud Console + +Ensure that the prescribed log metric is present: + +1. Go to `Logging/Log-based Metrics` by visiting https://console.cloud.google.com/logs/metrics. +2. In the `User-defined Metrics` section, ensure that at least one metric `` is present with filter text: + +``` +(protoPayload.serviceName="cloudresourcemanager.googleapis.com") +AND (ProjectOwnership OR projectOwnerInvitee) +OR (protoPayload.serviceData.policyDelta.bindingDeltas.action="REMOVE" +AND protoPayload.serviceData.policyDelta.bindingDeltas.role="roles/owner") +OR (protoPayload.serviceData.policyDelta.bindingDeltas.action="ADD" +AND protoPayload.serviceData.policyDelta.bindingDeltas.role="roles/owner") +``` + +Ensure that the prescribed Alerting Policy is present: + +3. Go to `Alerting` by visiting https://console.cloud.google.com/monitoring/alerting. +4. Under the `Policies` section, ensure that at least one alert policy exists for the log metric above. Clicking on the policy should show that it is configured with a condition. For example, `Violates when: Any logging.googleapis.com/user/ stream is above a threshold of zero(0) for greater than zero(0) seconds` means that the alert will trigger for any new owner change. Verify that the chosen alerting thresholds make sense for your organization. +5. Ensure that the appropriate notifications channels have been set up. + +### Using Google Cloud CLI + +Ensure that the prescribed log metric is present: + +1. List the log metrics: + +```bash +gcloud logging metrics list --format json +``` + +2. Ensure that the output contains at least one metric with filter set to: + +``` +(protoPayload.serviceName="cloudresourcemanager.googleapis.com") +AND (ProjectOwnership OR projectOwnerInvitee) +OR (protoPayload.serviceData.policyDelta.bindingDeltas.action="REMOVE" +AND protoPayload.serviceData.policyDelta.bindingDeltas.role="roles/owner") +OR (protoPayload.serviceData.policyDelta.bindingDeltas.action="ADD" +AND protoPayload.serviceData.policyDelta.bindingDeltas.role="roles/owner") +``` + +3. Note the value of the property `metricDescriptor.type` for the identified metric, in the format `logging.googleapis.com/user/`. + +Ensure that the prescribed alerting policy is present: + +4. List the alerting policies: + +```bash +gcloud alpha monitoring policies list --format json +``` + +5. Ensure that the output contains at least one alert policy where: + +- `conditions.conditionThreshold.filter` is set to `metric.type=\"logging.googleapis.com/user/\"` +- AND `enabled` is set to `true` + +### Expected Result + +A log metric filter exists matching the project ownership filter, and at least one alert policy is configured and enabled for it. + +## Remediation + +### Using Google Cloud Console + +Create the prescribed log metric: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics and click "CREATE METRIC". +2. Click the down arrow symbol on the `Filter Bar` at the rightmost corner and select `Convert to Advanced Filter`. +3. Clear any text and add: + +``` +(protoPayload.serviceName="cloudresourcemanager.googleapis.com") +AND (ProjectOwnership OR projectOwnerInvitee) +OR (protoPayload.serviceData.policyDelta.bindingDeltas.action="REMOVE" +AND protoPayload.serviceData.policyDelta.bindingDeltas.role="roles/owner") +OR (protoPayload.serviceData.policyDelta.bindingDeltas.action="ADD" +AND protoPayload.serviceData.policyDelta.bindingDeltas.role="roles/owner") +``` + +4. Click `Submit Filter`. The logs display based on the filter text entered by the user. +5. In the `Metric Editor` menu on the right, fill out the name field. Set `Units` to `1` (default) and the `Type` to `Counter`. This ensures that the log metric counts the number of log entries matching the advanced logs query. +6. Click `Create Metric`. + +Create the display prescribed Alert Policy: + +1. Identify the newly created metric under the section `User-defined Metrics` at https://console.cloud.google.com/logs/metrics. +2. Click the 3-dot icon in the rightmost column for the desired metric and select `Create alert from Metric`. A new page opens. +3. Fill out the alert policy configuration and click `Save`. Choose the alerting threshold and configuration that makes sense for the user's organization. For example, a threshold of zero(0) for the most recent value will ensure that a notification is triggered for every owner change in the project: + +``` +Set `Aggregator` to `Count` +Set `Configuration`: +- Condition: above +- Threshold: 0 +- For: most recent value +``` + +4. Configure the desired notifications channels in the section `Notifications`. +5. Name the policy and click `Save`. + +### Using Google Cloud CLI + +Create a prescribed Log Metric: + +- Use the command: `gcloud beta logging metrics create` +- Reference for Command Usage: https://cloud.google.com/sdk/gcloud/reference/beta/logging/metrics/create + +Create prescribed Alert Policy: + +- Use the command: `gcloud alpha monitoring policies create` +- Reference for Command Usage: https://cloud.google.com/sdk/gcloud/reference/alpha/monitoring/policies/create + +## Default Value + +By default, no log metrics and alert policies are configured. + +## References + +1. https://cloud.google.com/logging/docs/logs-based-metrics/ +2. https://cloud.google.com/monitoring/custom-metrics/ +3. https://cloud.google.com/monitoring/alerts/ +4. https://cloud.google.com/logging/docs/reference/tools/gcloud-logging + +## Additional Information + +1. Project ownership assignments for a user cannot be done using the gcloud utility as assigning project ownership to a user requires sending, and the user accepting, an invitation. +2. Project Ownership assignment to a service account does not send any invites. SetIAMPolicy to `role/owner` is directly performed on service accounts. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.5/SKILL.md new file mode 100644 index 0000000000..e2673cfc27 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.5/SKILL.md @@ -0,0 +1,162 @@ +--- +name: cis-gcp-foundations-2.5 +description: "Ensure That the Log Metric Filter and Alerts Exist for Audit Configuration Changes" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, log-metrics, alerts, cloud-audit, iam] +cis_id: "2.5" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure That the Log Metric Filter and Alerts Exist for Audit Configuration Changes (Automated) + +## Description + +Google Cloud Platform (GCP) services write audit log entries to the Admin Activity and Data Access logs to help answer the questions of, "who did what, where, and when?" within GCP projects. + +Cloud audit logging records information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by GCP services. Cloud audit logging provides a history of GCP API calls for an account, including API calls made via the console, SDKs, command-line tools, and other GCP services. + +## Rationale + +Admin activity and data access logs produced by cloud audit logging enable security analysis, resource change tracking, and compliance auditing. + +Configuring the metric filter and alerts for audit configuration changes ensures the recommended state of audit configuration is maintained so that all activities in the project are audit-able at any point in time. + +## Impact + +Enabling of logging may result in your project being charged for the additional logs usage. + +## Audit Procedure + +### Using Google Cloud Console + +Ensure the prescribed log metric is present: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics. +2. In the `User-defined Metrics` section, ensure that at least one metric `` is present with the filter text: + +``` +protoPayload.methodName="SetIamPolicy" AND +protoPayload.serviceData.policyDelta.auditConfigDeltas:* +``` + +Ensure that the prescribed alerting policy is present: + +3. Go to `Alerting` by visiting https://console.cloud.google.com/monitoring/alerting. +4. Under the `Policies` section, ensure that at least one alert policy exists for the log metric above. Clicking on the policy should show that it is configured with a condition. For example, `Violates when: Any logging.googleapis.com/user/ stream is above a threshold of 0 for greater than zero(0) seconds`, means that the alert will trigger for any new owner change. Verify that the chosen alerting thresholds make sense for the user's organization. +5. Ensure that appropriate notification channels have been set up. + +### Using Google Cloud CLI + +Ensure that the prescribed log metric is present: + +1. List the log metrics: + +```bash +gcloud beta logging metrics list --format json +``` + +2. Ensure that the output contains at least one metric with the filter set to: + +``` +protoPayload.methodName="SetIamPolicy" AND +protoPayload.serviceData.policyDelta.auditConfigDeltas:* +``` + +3. Note the value of the property `metricDescriptor.type` for the identified metric, in the format `logging.googleapis.com/user/`. + +Ensure that the prescribed alerting policy is present: + +4. List the alerting policies: + +```bash +gcloud alpha monitoring policies list --format json +``` + +5. Ensure that the output contains at least one alert policy where: + +- `conditions.conditionThreshold.filter` is set to `metric.type=\"logging.googleapis.com/user/\"` +- AND `enabled` is set to `true` + +### Expected Result + +A log metric filter exists matching the audit configuration changes filter, and at least one alert policy is configured and enabled for it. + +## Remediation + +### Using Google Cloud Console + +Create the prescribed log metric: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics and click "CREATE METRIC". +2. Click the down arrow symbol on the `Filter Bar` at the rightmost corner and select `Convert to Advanced Filter`. +3. Clear any text and add: + +``` +protoPayload.methodName="SetIamPolicy" AND +protoPayload.serviceData.policyDelta.auditConfigDeltas:* +``` + +4. Click `Submit Filter`. Display logs appear based on the filter text entered by the user. +5. In the `Metric Editor` menu on the right, fill out the name field. Set `Units` to `1` (default) and `Type` to `Counter`. This ensures that the log metric counts the number of log entries matching the user's advanced logs query. +6. Click `Create Metric`. + +Create a prescribed Alert Policy: + +1. Identify the new metric the user just created, under the section `User-defined Metrics` at https://console.cloud.google.com/logs/metrics. +2. Click the 3-dot icon in the rightmost column for the new metric and select `Create alert from Metric`. A new page opens. +3. Fill out the alert policy configuration and click `Save`. Choose the alerting threshold and configuration that makes sense for the organization. For example, a threshold of zero(0) for the most recent value will ensure that a notification is triggered for every owner change in the project: + +``` +Set `Aggregator` to `Count` +Set `Configuration`: +- Condition: above +- Threshold: 0 +- For: most recent value +``` + +4. Configure the desired notifications channels in the section `Notifications`. +5. Name the policy and click `Save`. + +### Using Google Cloud CLI + +Create a prescribed Log Metric: + +- Use the command: `gcloud beta logging metrics create` +- Reference for command usage: https://cloud.google.com/sdk/gcloud/reference/beta/logging/metrics/create + +Create prescribed Alert Policy: + +- Use the command: `gcloud alpha monitoring policies create` +- Reference for command usage: https://cloud.google.com/sdk/gcloud/reference/alpha/monitoring/policies/create + +## Default Value + +By default, no log metrics and alert policies are configured. + +## References + +1. https://cloud.google.com/logging/docs/logs-based-metrics/ +2. https://cloud.google.com/monitoring/custom-metrics/ +3. https://cloud.google.com/monitoring/alerts/ +4. https://cloud.google.com/logging/docs/reference/tools/gcloud-logging +5. https://cloud.google.com/logging/docs/audit/configure-data-access#getiampolicy-setiampolicy + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.6/SKILL.md new file mode 100644 index 0000000000..56cdf75844 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.6/SKILL.md @@ -0,0 +1,165 @@ +--- +name: cis-gcp-foundations-2.6 +description: "Ensure That the Log Metric Filter and Alerts Exist for Custom Role Changes" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, log-metrics, alerts, iam, custom-roles] +cis_id: "2.6" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure That the Log Metric Filter and Alerts Exist for Custom Role Changes (Automated) + +## Description + +It is recommended that a metric filter and alarm be established for changes to Identity and Access Management (IAM) role creation, deletion and updating activities. + +## Rationale + +Google Cloud IAM provides predefined roles that give granular access to specific Google Cloud Platform resources and prevent unwanted access to other resources. However, to cater to organization-specific needs, Cloud IAM also provides the ability to create custom roles. Project owners and administrators with the Organization Role Administrator role or the IAM Role Administrator role can create custom roles. Monitoring role creation, deletion and updating activities will help in identifying any over-privileged role at early stages. + +## Impact + +Enabling of logging may result in your project being charged for the additional logs usage. + +## Audit Procedure + +### Using Google Cloud Console + +Ensure that the prescribed log metric is present: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics. +2. In the `User-defined Metrics` section, ensure that at least one metric `` is present with filter text: + +``` +resource.type="iam_role" +AND (protoPayload.methodName="google.iam.admin.v1.CreateRole" +OR protoPayload.methodName="google.iam.admin.v1.DeleteRole" +OR protoPayload.methodName="google.iam.admin.v1.UpdateRole" +OR protoPayload.methodName="google.iam.admin.v1.UndeleteRole") +``` + +Ensure that the prescribed alerting policy is present: + +3. Go to `Alerting` by visiting https://console.cloud.google.com/monitoring/alerting. +4. Under the `Policies` section, ensure that at least one alert policy exists for the log metric above. Clicking on the policy should show that it is configured with a condition. For example, `Violates when: Any logging.googleapis.com/user/ stream is above a threshold of zero(0) for greater than zero(0) seconds` means that the alert will trigger for any new owner change. Verify that the chosen alerting thresholds make sense for the user's organization. +5. Ensure that the appropriate notifications channels have been set up. + +### Using Google Cloud CLI + +Ensure that the prescribed log metric is present: + +1. List the log metrics: + +```bash +gcloud logging metrics list --format json +``` + +2. Ensure that the output contains at least one metric with the filter set to: + +``` +resource.type="iam_role" +AND (protoPayload.methodName = "google.iam.admin.v1.CreateRole" OR +protoPayload.methodName="google.iam.admin.v1.DeleteRole" OR +protoPayload.methodName="google.iam.admin.v1.UpdateRole" OR +protoPayload.methodName="google.iam.admin.v1.UndeleteRole") +``` + +3. Note the value of the property `metricDescriptor.type` for the identified metric, in the format `logging.googleapis.com/user/`. + +Ensure that the prescribed alerting policy is present: + +4. List the alerting policies: + +```bash +gcloud alpha monitoring policies list --format json +``` + +5. Ensure that the output contains an least one alert policy where: + +- `conditions.conditionThreshold.filter` is set to `metric.type=\"logging.googleapis.com/user/\"` +- AND `enabled` is set to `true`. + +### Expected Result + +A log metric filter exists matching the custom role changes filter, and at least one alert policy is configured and enabled for it. + +## Remediation + +### Using Google Cloud Console + +Create the prescribed log metric: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics and click "CREATE METRIC". +2. Click the down arrow symbol on the `Filter Bar` at the rightmost corner and select `Convert to Advanced Filter`. +3. Clear any text and add: + +``` +resource.type="iam_role" +AND (protoPayload.methodName = "google.iam.admin.v1.CreateRole" +OR protoPayload.methodName="google.iam.admin.v1.DeleteRole" +OR protoPayload.methodName="google.iam.admin.v1.UpdateRole" +OR protoPayload.methodName="google.iam.admin.v1.UndeleteRole") +``` + +4. Click `Submit Filter`. Display logs appear based on the filter text entered by the user. +5. In the `Metric Editor` menu on the right, fill out the name field. Set `Units` to `1` (default) and `Type` to `Counter`. This ensures that the log metric counts the number of log entries matching the advanced logs query. +6. Click `Create Metric`. + +Create a prescribed Alert Policy: + +1. Identify the metric that was just created under the section `User-defined Metrics` at https://console.cloud.google.com/logs/metrics. +2. Click the 3-dot icon in the rightmost column for the metric and select `Create alert from Metric`. A new page displays. +3. Fill out the alert policy configuration and click `Save`. Choose the alerting threshold and configuration that makes sense for the user's organization. For example, a threshold of zero(0) for the most recent value ensures that a notification is triggered for every owner change in the project: + +``` +Set `Aggregator` to `Count` +Set `Configuration`: +- Condition: above +- Threshold: 0 +- For: most recent value +``` + +4. Configure the desired notification channels in the section `Notifications`. +5. Name the policy and click `Save`. + +### Using Google Cloud CLI + +Create the prescribed Log Metric: + +- Use the command: `gcloud logging metrics create` + +Create the prescribed Alert Policy: + +- Use the command: `gcloud alpha monitoring policies create` + +## Default Value + +By default, no log metrics and alert policies are configured. + +## References + +1. https://cloud.google.com/logging/docs/logs-based-metrics/ +2. https://cloud.google.com/monitoring/custom-metrics/ +3. https://cloud.google.com/monitoring/alerts/ +4. https://cloud.google.com/logging/docs/reference/tools/gcloud-logging +5. https://cloud.google.com/iam/docs/understanding-custom-roles + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.7/SKILL.md new file mode 100644 index 0000000000..bded7b0ba2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.7/SKILL.md @@ -0,0 +1,162 @@ +--- +name: cis-gcp-foundations-2.7 +description: "Ensure That the Log Metric Filter and Alerts Exist for VPC Network Firewall Rule Changes" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, log-metrics, alerts, vpc, firewall] +cis_id: "2.7" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure That the Log Metric Filter and Alerts Exist for VPC Network Firewall Rule Changes (Automated) + +## Description + +It is recommended that a metric filter and alarm be established for Virtual Private Cloud (VPC) Network Firewall rule changes. + +## Rationale + +Monitoring for Create or Update Firewall rule events gives insight to network access changes and may reduce the time it takes to detect suspicious activity. + +## Impact + +Enabling of logging may result in your project being charged for the additional logs usage. These charges could be significant depending on the size of the organization. + +## Audit Procedure + +### Using Google Cloud Console + +Ensure that the prescribed log metric is present: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics. +2. In the `User-defined Metrics` section, ensure that at least one metric `` is present with this filter text: + +``` +resource.type="gce_firewall_rule" +AND (protoPayload.methodName:"compute.firewalls.patch" +OR protoPayload.methodName:"compute.firewalls.insert" +OR protoPayload.methodName:"compute.firewalls.delete") +``` + +Ensure that the prescribed alerting policy is present: + +3. Go to `Alerting` by visiting https://console.cloud.google.com/monitoring/alerting. +4. Under the `Policies` section, ensure that at least one alert policy exists for the log metric above. Clicking on the policy should show that it is configured with a condition. For example, `Violates when: Any logging.googleapis.com/user/ stream is above a threshold of zero(0) for greater than zero(0) seconds` means that the alert will trigger for any new owner change. Verify that the chosen alerting thresholds make sense for the user's organization. +5. Ensure that appropriate notification channels have been set up. + +### Using Google Cloud CLI + +Ensure that the prescribed log metric is present: + +1. List the log metrics: + +```bash +gcloud logging metrics list --format json +``` + +2. Ensure that the output contains at least one metric with the filter set to: + +``` +resource.type="gce_firewall_rule" +AND (protoPayload.methodName:"compute.firewalls.patch" +OR protoPayload.methodName:"compute.firewalls.insert" +OR protoPayload.methodName:"compute.firewalls.delete") +``` + +3. Note the value of the property `metricDescriptor.type` for the identified metric, in the format `logging.googleapis.com/user/`. + +Ensure that the prescribed alerting policy is present: + +4. List the alerting policies: + +```bash +gcloud alpha monitoring policies list --format json +``` + +5. Ensure that the output contains an least one alert policy where: + +- `conditions.conditionThreshold.filter` is set to `metric.type=\"logging.googleapis.com/user/\"` +- AND `enabled` is set to `true` + +### Expected Result + +A log metric filter exists matching the VPC firewall rule changes filter, and at least one alert policy is configured and enabled for it. + +## Remediation + +### Using Google Cloud Console + +Create the prescribed log metric: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics and click "CREATE METRIC". +2. Click the down arrow symbol on the `Filter Bar` at the rightmost corner and select `Convert to Advanced Filter`. +3. Clear any text and add: + +``` +resource.type="gce_firewall_rule" +AND (protoPayload.methodName:"compute.firewalls.patch" +OR protoPayload.methodName:"compute.firewalls.insert" +OR protoPayload.methodName:"compute.firewalls.delete") +``` + +4. Click `Submit Filter`. Display logs appear based on the filter text entered by the user. +5. In the `Metric Editor` menu on the right, fill out the name field. Set `Units` to `1` (default) and `Type` to `Counter`. This ensures that the log metric counts the number of log entries matching the advanced logs query. +6. Click `Create Metric`. + +Create the prescribed Alert Policy: + +1. Identify the newly created metric under the section `User-defined Metrics` at https://console.cloud.google.com/logs/metrics. +2. Click the 3-dot icon in the rightmost column for the new metric and select `Create alert from Metric`. A new page displays. +3. Fill out the alert policy configuration and click `Save`. Choose the alerting threshold and configuration that makes sense for the user's organization. For example, a threshold of zero(0) for the most recent value ensures that a notification is triggered for every owner change in the project: + +``` +Set `Aggregator` to `Count` +Set `Configuration`: +- Condition: above +- Threshold: 0 +- For: most recent value +``` + +4. Configure the desired notifications channels in the section `Notifications`. +5. Name the policy and click `Save`. + +### Using Google Cloud CLI + +Create the prescribed Log Metric: + +- Use the command: `gcloud logging metrics create` + +Create the prescribed alert policy: + +- Use the command: `gcloud alpha monitoring policies create` + +## Default Value + +By default, no log metrics and alert policies are configured. + +## References + +1. https://cloud.google.com/logging/docs/logs-based-metrics/ +2. https://cloud.google.com/monitoring/custom-metrics/ +3. https://cloud.google.com/monitoring/alerts/ +4. https://cloud.google.com/logging/docs/reference/tools/gcloud-logging +5. https://cloud.google.com/vpc/docs/firewalls + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.8/SKILL.md new file mode 100644 index 0000000000..e61e88cc9a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.8/SKILL.md @@ -0,0 +1,161 @@ +--- +name: cis-gcp-foundations-2.8 +description: "Ensure That the Log Metric Filter and Alerts Exist for VPC Network Route Changes" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, log-metrics, alerts, vpc, routes] +cis_id: "2.8" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure That the Log Metric Filter and Alerts Exist for VPC Network Route Changes (Automated) + +## Description + +It is recommended that a metric filter and alarm be established for Virtual Private Cloud (VPC) network route changes. + +## Rationale + +Google Cloud Platform (GCP) routes define the paths network traffic takes from a VM instance to another destination. The other destination can be inside the organization VPC network (such as another VM) or outside of it. Every route consists of a destination and a next hop. Traffic whose destination IP is within the destination range is sent to the next hop for delivery. + +Monitoring changes to route tables will help ensure that all VPC traffic flows through an expected path. + +## Impact + +Enabling of logging may result in your project being charged for the additional logs usage. These charges could be significant depending on the size of the organization. + +## Audit Procedure + +### Using Google Cloud Console + +Ensure that the prescribed Log metric is present: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics. +2. In the `User-defined Metrics` section, ensure that at least one metric `` is present with the filter text: + +``` +resource.type="gce_route" +AND (protoPayload.methodName:"compute.routes.delete" +OR protoPayload.methodName:"compute.routes.insert") +``` + +Ensure the prescribed alerting policy is present: + +3. Go to `Alerting` by visiting https://console.cloud.google.com/monitoring/alerting. +4. Under the `Policies` section, ensure that at least one alert policy exists for the log metric above. Clicking on the policy should show that it is configured with a condition. For example, `Violates when: Any logging.googleapis.com/user/ stream is above a threshold of 0 for greater than zero(0) seconds` means that the alert will trigger for any new owner change. Verify that the chosen alert thresholds make sense for the user's organization. +5. Ensure that the appropriate notification channels have been set up. + +### Using Google Cloud CLI + +Ensure that the prescribed log metric is present: + +1. List the log metrics: + +```bash +gcloud logging metrics list --format json +``` + +2. Ensure that the output contains at least one metric with the filter set to: + +``` +resource.type="gce_route" +AND (protoPayload.methodName:"compute.routes.delete" +OR protoPayload.methodName:"compute.routes.insert") +``` + +3. Note the value of the property `metricDescriptor.type` for the identified metric, in the format `logging.googleapis.com/user/`. + +Ensure that the prescribed alerting policy is present: + +4. List the alerting policies: + +```bash +gcloud alpha monitoring policies list --format json +``` + +5. Ensure that the output contains an least one alert policy where: + +- `conditions.conditionThreshold.filter` is set to `metric.type=\"logging.googleapis.com/user/\"` +- AND `enabled` is set to `true` + +### Expected Result + +A log metric filter exists matching the VPC network route changes filter, and at least one alert policy is configured and enabled for it. + +## Remediation + +### Using Google Cloud Console + +Create the prescribed Log Metric: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics and click "CREATE METRIC". +2. Click the down arrow symbol on the `Filter Bar` at the rightmost corner and select `Convert to Advanced Filter`. +3. Clear any text and add: + +``` +resource.type="gce_route" +AND (protoPayload.methodName:"compute.routes.delete" +OR protoPayload.methodName:"compute.routes.insert") +``` + +4. Click `Submit Filter`. Display logs appear based on the filter text entered by the user. +5. In the `Metric Editor` menu on the right, fill out the name field. Set `Units` to `1` (default) and `Type` to `Counter`. This ensures that the log metric counts the number of log entries matching the advanced logs query. +6. Click `Create Metric`. + +Create the prescribed alert policy: + +1. Identify the newly created metric under the section `User-defined Metrics` at https://console.cloud.google.com/logs/metrics. +2. Click the 3-dot icon in the rightmost column for the new metric and select `Create alert from Metric`. A new page displays. +3. Fill out the alert policy configuration and click `Save`. Choose the alerting threshold and configuration that makes sense for the user's organization. For example, a threshold of zero(0) for the most recent value ensures that a notification is triggered for every owner change in the project: + +``` +Set `Aggregator` to `Count` +Set `Configuration`: +- Condition: above +- Threshold: 0 +- For: most recent value +``` + +4. Configure the desired notifications channels in the section `Notifications`. +5. Name the policy and click `Save`. + +### Using Google Cloud CLI + +Create the prescribed Log Metric: + +- Use the command: `gcloud logging metrics create` + +Create the prescribed alert policy: + +- Use the command: `gcloud alpha monitoring policies create` + +## Default Value + +By default, no log metrics and alert policies are configured. + +## References + +1. https://cloud.google.com/logging/docs/logs-based-metrics/ +2. https://cloud.google.com/monitoring/custom-metrics/ +3. https://cloud.google.com/monitoring/alerts/ +4. https://cloud.google.com/logging/docs/reference/tools/gcloud-logging +5. https://cloud.google.com/compute/docs/vpc/routes + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.9/SKILL.md new file mode 100644 index 0000000000..b862ef9f76 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-2.9/SKILL.md @@ -0,0 +1,162 @@ +--- +name: cis-gcp-foundations-2.9 +description: "Ensure That the Log Metric Filter and Alerts Exist for VPC Network Changes" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, logging, monitoring, log-metrics, alerts, vpc, networking] +cis_id: "2.9" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.9 Ensure That the Log Metric Filter and Alerts Exist for VPC Network Changes (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +It is recommended that a metric filter and alarm be established for Virtual Private Cloud (VPC) network changes. + +## Rationale + +It is possible to have more than one VPC within a project. In addition, it is also possible to create a peer connection between two VPCs enabling network traffic to route between VPCs. + +Monitoring changes to a VPC will help ensure VPC traffic flow is not getting impacted. + +## Impact + +Enabling of logging may result in your project being charged for the additional logs usage. These charges could be significant depending on the size of the organization. + +## Audit + +### From Google Cloud Console + +Ensure the prescribed log metric is present: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics. +2. In the `User-defined Metrics` section, ensure at least one metric `` is present with filter text: + +``` +resource.type="gce_network" +AND (protoPayload.methodName:"compute.networks.insert" +OR protoPayload.methodName:"compute.networks.patch" +OR protoPayload.methodName:"compute.networks.delete" +OR protoPayload.methodName:"compute.networks.removePeering" +OR protoPayload.methodName:"compute.networks.addPeering") +``` + +Ensure the prescribed alerting policy is present: + +3. Go to `Alerting` by visiting https://console.cloud.google.com/monitoring/alerting. +4. Under the `Policies` section, ensure that at least one alert policy exists for the log metric above. Clicking on the policy should show that it is configured with a condition. For example, `Violates when: Any logging.googleapis.com/user/ stream is above a threshold of 0 for greater than 0 seconds` means that the alert will trigger for any new owner change. Verify that the chosen alerting thresholds make sense for the user's organization. +5. Ensure that appropriate notification channels have been set up. + +### From Google Cloud CLI + +Ensure the log metric is present: + +1. List the log metrics: + +```bash +gcloud logging metrics list --format json +``` + +2. Ensure that the output contains at least one metric with filter set to: + +``` +resource.type="gce_network" +AND protoPayload.methodName="beta.compute.networks.insert" +OR protoPayload.methodName="beta.compute.networks.patch" +OR protoPayload.methodName="v1.compute.networks.delete" +OR protoPayload.methodName="v1.compute.networks.removePeering" +OR protoPayload.methodName="v1.compute.networks.addPeering" +``` + +3. Note the value of the property `metricDescriptor.type` for the identified metric, in the format `logging.googleapis.com/user/`. + +Ensure the prescribed alerting policy is present: + +4. List the alerting policies: + +```bash +gcloud alpha monitoring policies list --format json +``` + +5. Ensure that the output contains at least one alert policy where: + - `conditions.conditionThreshold.filter` is set to `metric.type=\"logging.googleapis.com/user/\"` + - AND `enabled` is set to `true` + +## Remediation + +### From Google Cloud Console + +Create the prescribed log metric: + +1. Go to `Logging/Logs-based Metrics` by visiting https://console.cloud.google.com/logs/metrics and click "CREATE METRIC". +2. Click the down arrow symbol on `Filter Bar` at the rightmost corner and select `Convert to Advanced Filter`. +3. Clear any text and add: + +``` +resource.type="gce_network" +AND (protoPayload.methodName:"compute.networks.insert" +OR protoPayload.methodName:"compute.networks.patch" +OR protoPayload.methodName:"compute.networks.delete" +OR protoPayload.methodName:"compute.networks.removePeering" +OR protoPayload.methodName:"compute.networks.addPeering") +``` + +4. Click `Submit Filter`. Display logs appear based on the filter text entered by the user. +5. In the `Metric Editor` menu on the right, fill out the name field. Set `Units` to `1` (default) and `Type` to `Counter`. This ensures that the log metric counts the number of log entries matching the user's advanced logs query. +6. Click `Create Metric`. + +Create the prescribed alert policy: + +1. Identify the newly created metric under the section `User-defined Metrics` at https://console.cloud.google.com/logs/metrics. +2. Click the 3-dot icon in the rightmost column for the new metric and select `Create alert from Metric`. A new page appears. +3. Fill out the alert policy configuration and click `Save`. Choose the alerting threshold and configuration that makes sense for the user's organization. For example, a threshold of 0 for the most recent value will ensure that a notification is triggered for every owner change in the project: + +``` +Set `Aggregator` to `Count` + +Set `Configuration`: +- Condition: above +- Threshold: 0 +- For: most recent value +``` + +4. Configure the desired notification channels in the section `Notifications`. +5. Name the policy and click `Save`. + +### From Google Cloud CLI + +Create the prescribed Log Metric: + +- Use the command: `gcloud logging metrics create` + +Create the prescribed alert policy: + +- Use the command: `gcloud alpha monitoring policies create` + +## References + +1. https://cloud.google.com/logging/docs/logs-based-metrics/ +2. https://cloud.google.com/monitoring/custom-metrics/ +3. https://cloud.google.com/monitoring/alerts/ +4. https://cloud.google.com/logging/docs/reference/tools/gcloud-logging +5. https://cloud.google.com/vpc/docs/overview + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.1/SKILL.md new file mode 100644 index 0000000000..dfd6b27c39 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.1/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-gcp-foundations-3.1 +description: "Ensure That the Default Network Does Not Exist in a Project" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, networking, vpc, firewall] +cis_id: "3.1" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1 Ensure That the Default Network Does Not Exist in a Project (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +To prevent use of `default` network, a project should not have a `default` network. + +## Rationale + +The `default` network has a preconfigured network configuration and automatically generates the following insecure firewall rules: + +- **default-allow-internal:** Allows ingress connections for all protocols and ports among instances in the network. +- **default-allow-ssh:** Allows ingress connections on TCP port 22 (SSH) from any source to any instance in the network. +- **default-allow-rdp:** Allows ingress connections on TCP port 3389 (RDP) from any source to any instance in the network. +- **default-allow-icmp:** Allows ingress ICMP traffic from any source to any instance in the network. + +These automatically created firewall rules do not get audit logged by default. + +Furthermore, the default network is an auto mode network, which means that its subnets use the same predefined range of IP addresses, and as a result, it's not possible to use Cloud VPN or VPC Network Peering with the default network. + +Based on organization security and networking requirements, the organization should create a new network and delete the `default` network. + +## Impact + +When an organization deletes the default network, it will need to remove all assets from that network and migrate them to a new network. + +## Audit + +### From Google Cloud Console + +1. Go to the `VPC networks` page by visiting: https://console.cloud.google.com/networking/networks/list +2. Ensure that a network with the name `default` is not present. + +### From Google Cloud CLI + +1. Set the project name in the Google Cloud Shell: + +```bash +gcloud config set project PROJECT_ID +``` + +2. List the networks configured in that project: + +```bash +gcloud compute networks list +``` + +It should not list `default` as one of the available networks in that project. + +## Remediation + +### From Google Cloud Console + +1. Go to the `VPC networks` page by visiting: https://console.cloud.google.com/networking/networks/list +2. Click the network named `default`. +3. On the network detail page, click `EDIT`. +4. Click `DELETE VPC NETWORK`. +5. If needed, create a new network to replace the default network. + +### From Google Cloud CLI + +For each Google Cloud Platform project, + +1. Delete the default network: + +```bash +gcloud compute networks delete default +``` + +2. If needed, create a new network to replace it: + +```bash +gcloud compute networks create NETWORK_NAME +``` + +## Prevention + +The user can prevent the default network and its insecure default firewall rules from being created by setting up an Organization Policy to `Skip default network creation` at https://console.cloud.google.com/iam-admin/orgpolicies/compute-skipDefaultNetworkCreation. + +## Default Value + +By default, for each project, a `default` network is created. + +## References + +1. https://cloud.google.com/compute/docs/networking#firewall_rules +2. https://cloud.google.com/compute/docs/reference/latest/networks/insert +3. https://cloud.google.com/compute/docs/reference/latest/networks/delete +4. https://cloud.google.com/vpc/docs/firewall-rules-logging +5. https://cloud.google.com/vpc/docs/vpc#default-network +6. https://cloud.google.com/sdk/gcloud/reference/compute/networks/delete + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.2 Establish and Maintain a Secure Configuration Process for Network Infrastructure | x | x | x | +| v7 | 11.1 Maintain Standard Security Configurations for Network Devices | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.10/SKILL.md new file mode 100644 index 0000000000..b9aad129ad --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.10/SKILL.md @@ -0,0 +1,86 @@ +--- +name: cis-gcp-foundations-3.10 +description: "Use Identity Aware Proxy (IAP) to Ensure Only Traffic From Google IP Addresses are Allowed" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, networking, iap, firewall, vpc] +cis_id: "3.10" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.10 Use Identity Aware Proxy (IAP) to Ensure Only Traffic From Google IP Addresses are 'Allowed' (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +IAP authenticates the user requests to your apps via a Google single sign in. You can then manage these users with permissions to control access. It is recommended to use both IAP permissions and firewalls to restrict this access to your apps with sensitive information. + +## Rationale + +IAP ensure that access to VMs is controlled by authenticating incoming requests. Access to your apps and the VMs should be restricted by firewall rules that allow only the proxy IAP IP addresses contained in the 35.235.240.0/20 subnet. Otherwise, unauthenticated requests can be made to your apps. To ensure that load balancing works correctly health checks should also be allowed. + +## Impact + +If firewall rules are not configured correctly, legitimate business services could be negatively impacted. It is recommended to make these changes during a time of low usage. + +## Audit + +### From Google Cloud Console + +1. For each of your apps that have IAP enabled go to the Cloud Console VPC network > Firewall rules. +2. Verify that the only rules correspond to the following values: + - Targets: All instances in the network + - Source IP ranges: + - IAP Proxy Addresses `35.235.240.0/20` + - Google Health Check `130.211.0.0/22` + - Google Health Check `35.191.0.0/16` + - Protocols and ports: + - Specified protocols and ports required for access and management of your app. For example most health check connection protocols would be covered by: + - tcp:80 (Default HTTP Health Check port) + - tcp:443 (Default HTTPS Health Check port) + +Note: if you have custom ports used by your load balancers, you will need to list them here. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud Console [VPC network > Firewall rules](https://console.cloud.google.com/networking/firewalls/list). +2. Select the checkbox next to the following rules: + - default-allow-http + - default-allow-https + - default-allow-internal +3. Click `Delete`. +4. Click `Create firewall rule` and set the following values: + - Name: allow-iap-traffic + - Targets: All instances in the network + - Source IP ranges (press Enter after you paste each value in the box, copy each full CIDR IP address): + - IAP Proxy Addresses `35.235.240.0/20` + - Google Health Check `130.211.0.0/22` + - Google Health Check `35.191.0.0/16` + - Protocols and ports: + - Specified protocols and ports required for access and management of your app. For example most health check connection protocols would be covered by: + - tcp:80 (Default HTTP Health Check port) + - tcp:443 (Default HTTPS Health Check port) + - Note: if you have custom ports used by your load balancers, you will need to list them here +5. When you're finished updating values, click `Create`. + +## Default Value + +By default all traffic is allowed. + +## References + +1. https://cloud.google.com/iap/docs/concepts-overview +2. https://cloud.google.com/iap/docs/load-balancer-howto +3. https://cloud.google.com/load-balancing/docs/health-checks +4. https://cloud.google.com/blog/products/identity-security/cloud-iap-enables-context-aware-access-to-vms-via-ssh-and-rdp-without-bastion-hosts diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.2/SKILL.md new file mode 100644 index 0000000000..c0593197f2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.2/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-gcp-foundations-3.2 +description: "Ensure Legacy Networks Do Not Exist for Older Projects" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, networking, vpc] +cis_id: "3.2" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2 Ensure Legacy Networks Do Not Exist for Older Projects (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +In order to prevent use of legacy networks, a project should not have a legacy network configured. As of now, Legacy Networks are gradually being phased out, and you can no longer create projects with them. This recommendation is to check older projects to ensure that they are not using Legacy Networks. + +## Rationale + +Legacy networks have a single network IPv4 prefix range and a single gateway IP address for the whole network. The network is global in scope and spans all cloud regions. Subnetworks cannot be created in a legacy network and are unable to switch from legacy to auto or custom subnet networks. Legacy networks can have an impact for high network traffic projects and are subject to a single point of contention or failure. + +## Impact + +None. + +## Audit + +### From Google Cloud CLI + +For each Google Cloud Platform project, + +1. Set the project name in the Google Cloud Shell: + +```bash +gcloud config set project +``` + +2. List the networks configured in that project: + +```bash +gcloud compute networks list +``` + +None of the listed networks should be in the `legacy` mode. + +## Remediation + +### From Google Cloud CLI + +For each Google Cloud Platform project, + +1. Follow the documentation and create a non-legacy network suitable for the organization's requirements. +2. Follow the documentation and delete the networks in the `legacy` mode. + +## Default Value + +By default, networks are not created in the `legacy` mode. + +## References + +1. https://cloud.google.com/vpc/docs/using-legacy#creating_a_legacy_network +2. https://cloud.google.com/vpc/docs/using-legacy#deleting_a_legacy_network + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.2 Establish and Maintain a Secure Configuration Process for Network Infrastructure | x | x | x | +| v7 | 11.1 Maintain Standard Security Configurations for Network Devices | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.3/SKILL.md new file mode 100644 index 0000000000..ab87aae8d5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.3/SKILL.md @@ -0,0 +1,84 @@ +--- +name: cis-gcp-foundations-3.3 +description: "Ensure That DNSSEC Is Enabled for Cloud DNS" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, networking, dns, dnssec] +cis_id: "3.3" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.3 Ensure That DNSSEC Is Enabled for Cloud DNS (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Cloud Domain Name System (DNS) is a fast, reliable and cost-effective domain name system that powers millions of domains on the internet. Domain Name System Security Extensions (DNSSEC) in Cloud DNS enables domain owners to take easy steps to protect their domains against DNS hijacking and man-in-the-middle and other attacks. + +## Rationale + +Domain Name System Security Extensions (DNSSEC) adds security to the DNS protocol by enabling DNS responses to be validated. Having a trustworthy DNS that translates a domain name like www.example.com into its associated IP address is an increasingly important building block of today's web-based applications. Attackers can hijack this process of domain/IP lookup and redirect users to a malicious site through DNS hijacking and man-in-the-middle attacks. DNSSEC helps mitigate the risk of such attacks by cryptographically signing DNS records. As a result, it prevents attackers from issuing fake DNS responses that may misdirect browsers to nefarious websites. + +## Audit + +### From Google Cloud Console + +1. Go to `Cloud DNS` by visiting https://console.cloud.google.com/net-services/dns/zones. +2. For each zone of `Type Public`, ensure that `DNSSEC` is set to `On`. + +### From Google Cloud CLI + +1. List all the Managed Zones in a project: + +```bash +gcloud dns managed-zones list +``` + +2. For each zone of `VISIBILITY public`, get its metadata: + +```bash +gcloud dns managed-zones describe ZONE_NAME +``` + +3. Ensure that `dnssecConfig.state` property is `on`. + +## Remediation + +### From Google Cloud Console + +1. Go to `Cloud DNS` by visiting https://console.cloud.google.com/net-services/dns/zones. +2. For each zone of `Type Public`, set `DNSSEC` to `On`. + +### From Google Cloud CLI + +Use the below command to enable `DNSSEC` for Cloud DNS Zone Name. + +```bash +gcloud dns managed-zones update ZONE_NAME --dnssec-state on +``` + +## Default Value + +By default DNSSEC is not enabled. + +## References + +1. https://cloudplatform.googleblog.com/2017/11/DNSSEC-now-available-in-Cloud-DNS.html +2. https://cloud.google.com/dns/dnssec-config#enabling +3. https://cloud.google.com/dns/dnssec + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.2 Establish and Maintain a Secure Configuration Process for Network Infrastructure | x | x | x | +| v7 | 11.1 Maintain Standard Security Configurations for Network Devices | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.4/SKILL.md new file mode 100644 index 0000000000..54ed721464 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.4/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-gcp-foundations-3.4 +description: "Ensure That RSASHA1 Is Not Used for the Key-Signing Key in Cloud DNS DNSSEC" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, networking, dns, dnssec] +cis_id: "3.4" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.4 Ensure That RSASHA1 Is Not Used for the Key-Signing Key in Cloud DNS DNSSEC (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +NOTE: Currently, the SHA1 algorithm has been removed from general use by Google, and, if being used, needs to be whitelisted on a project basis by Google and will also, therefore, require a Google Cloud support contract. + +DNSSEC algorithm numbers in this registry may be used in CERT RRs. Zone signing (DNSSEC) and transaction security mechanisms (SIG(0) and TSIG) make use of particular subsets of these algorithms. The algorithm used for key signing should be a recommended one and it should be strong. + +## Rationale + +Domain Name System Security Extensions (DNSSEC) algorithm numbers in this registry may be used in CERT RRs. Zonesigning (DNSSEC) and transaction security mechanisms (SIG(0) and TSIG) make use of particular subsets of these algorithms. + +The algorithm used for key signing should be a recommended one and it should be strong. When enabling DNSSEC for a managed zone, or creating a managed zone with DNSSEC, the user can select the DNSSEC signing algorithms and the denial-of-existence type. Changing the DNSSEC settings is only effective for a managed zone if DNSSEC is not already enabled. If there is a need to change the settings for a managed zone where it has been enabled, turn DNSSEC off and then re-enable it with different settings. + +## Audit + +### From Google Cloud CLI + +Ensure the property algorithm for keyType keySigning is not using `RSASHA1`. + +```bash +gcloud dns managed-zones describe ZONENAME --format="json(dnsName,dnssecConfig.state,dnssecConfig.defaultKeySpecs)" +``` + +## Remediation + +### From Google Cloud CLI + +1. If it is necessary to change the settings for a managed zone where it has been enabled, DNSSEC must be turned off and re-enabled with different settings. To turn off DNSSEC, run the following command: + +```bash +gcloud dns managed-zones update ZONE_NAME --dnssec-state off +``` + +2. To update key-signing for a reported managed DNS Zone, run the following command: + +```bash +gcloud dns managed-zones update ZONE_NAME --dnssec-state on --ksk-algorithm KSK_ALGORITHM --ksk-key-length KSK_KEY_LENGTH --zsk-algorithm ZSK_ALGORITHM --zsk-key-length ZSK_KEY_LENGTH --denial-of-existence DENIAL_OF_EXISTENCE +``` + +Supported algorithm options and key lengths are as follows: + +| Algorithm | KSK Length | ZSK Length | +| --------------- | ---------- | ---------- | +| RSASHA1 | 1024,2048 | 1024,2048 | +| RSASHA256 | 1024,2048 | 1024,2048 | +| RSASHA512 | 1024,2048 | 1024,2048 | +| ECDSAP256SHA256 | 256 | 256 | +| ECDSAP384SHA384 | 384 | 384 | + +## References + +1. https://cloud.google.com/dns/dnssec-advanced#advanced_signing_options + +## Additional Information + +1. RSASHA1 key-signing support may be required for compatibility reasons. +2. Remediation CLI works well with gcloud-cli version 221.0.0 and later. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.2 Establish and Maintain a Secure Configuration Process for Network Infrastructure | x | x | x | +| v7 | 11.1 Maintain Standard Security Configurations for Network Devices | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.5/SKILL.md new file mode 100644 index 0000000000..003fef9535 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.5/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-gcp-foundations-3.5 +description: "Ensure That RSASHA1 Is Not Used for the Zone-Signing Key in Cloud DNS DNSSEC" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, networking, dns, dnssec] +cis_id: "3.5" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.5 Ensure That RSASHA1 Is Not Used for the Zone-Signing Key in Cloud DNS DNSSEC (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +NOTE: Currently, the SHA1 algorithm has been removed from general use by Google, and, if being used, needs to be whitelisted on a project basis by Google and will also, therefore, require a Google Cloud support contract. + +DNSSEC algorithm numbers in this registry may be used in CERT RRs. Zone signing (DNSSEC) and transaction security mechanisms (SIG(0) and TSIG) make use of particular subsets of these algorithms. The algorithm used for key signing should be a recommended one and it should be strong. + +## Rationale + +DNSSEC algorithm numbers in this registry may be used in CERT RRs. Zone signing (DNSSEC) and transaction security mechanisms (SIG(0) and TSIG) make use of particular subsets of these algorithms. + +The algorithm used for key signing should be a recommended one and it should be strong. When enabling DNSSEC for a managed zone, or creating a managed zone with DNSSEC, the DNSSEC signing algorithms and the denial-of-existence type can be selected. Changing the DNSSEC settings is only effective for a managed zone if DNSSEC is not already enabled. If the need exists to change the settings for a managed zone where it has been enabled, turn DNSSEC off and then re-enable it with different settings. + +## Audit + +### From Google Cloud CLI + +Ensure the property algorithm for keyType zone signing is not using RSASHA1. + +```bash +gcloud dns managed-zones describe --format="json(dnsName,dnssecConfig.state,dnssecConfig.defaultKeySpecs)" +``` + +## Remediation + +### From Google Cloud CLI + +1. If the need exists to change the settings for a managed zone where it has been enabled, DNSSEC must be turned off and then re-enabled with different settings. To turn off DNSSEC, run following command: + +```bash +gcloud dns managed-zones update ZONE_NAME --dnssec-state off +``` + +2. To update zone-signing for a reported managed DNS Zone, run the following command: + +```bash +gcloud dns managed-zones update ZONE_NAME --dnssec-state on --ksk-algorithm KSK_ALGORITHM --ksk-key-length KSK_KEY_LENGTH --zsk-algorithm ZSK_ALGORITHM --zsk-key-length ZSK_KEY_LENGTH --denial-of-existence DENIAL_OF_EXISTENCE +``` + +Supported algorithm options and key lengths are as follows: + +| Algorithm | KSK Length | ZSK Length | +| --------------- | ---------- | ---------- | +| RSASHA1 | 1024,2048 | 1024,2048 | +| RSASHA256 | 1024,2048 | 1024,2048 | +| RSASHA512 | 1024,2048 | 1024,2048 | +| ECDSAP256SHA256 | 256 | 384 | +| ECDSAP384SHA384 | 384 | 384 | + +## References + +1. https://cloud.google.com/dns/dnssec-advanced#advanced_signing_options + +## Additional Information + +1. RSASHA1 zone-signing support may be required for compatibility reasons. +2. The remediation CLI works well with gcloud-cli version 221.0.0 and later. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.2 Establish and Maintain a Secure Configuration Process for Network Infrastructure | x | x | x | +| v7 | 11.1 Maintain Standard Security Configurations for Network Devices | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.6/SKILL.md new file mode 100644 index 0000000000..3db8e2ed01 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.6/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-gcp-foundations-3.6 +description: "Ensure That SSH Access Is Restricted From the Internet" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, networking, firewall, ssh, vpc] +cis_id: "3.6" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.6 Ensure That SSH Access Is Restricted From the Internet (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +GCP `Firewall Rules` are specific to a `VPC Network`. Each rule either `allows` or `denies` traffic when its conditions are met. Its conditions allow the user to specify the type of traffic, such as ports and protocols, and the source or destination of the traffic, including IP addresses, subnets, and instances. + +Firewall rules are defined at the VPC network level and are specific to the network in which they are defined. The rules themselves cannot be shared among networks. Firewall rules only support IPv4 traffic. When specifying a source for an ingress rule or a destination for an egress rule by address, only an `IPv4` address or `IPv4 block in CIDR` notation can be used. Generic `(0.0.0.0/0)` incoming traffic from the internet to VPC or VM instance using `SSH` on `Port 22` can be avoided. + +## Rationale + +GCP `Firewall Rules` within a `VPC Network` apply to outgoing (egress) traffic from instances and incoming (ingress) traffic to instances in the network. Egress and ingress traffic flows are controlled even if the traffic stays within the network (for example, instance-to-instance communication). For an instance to have outgoing Internet access, the network must have a valid Internet gateway route or custom route whose destination IP is specified. This route simply defines the path to the Internet, to avoid the most general `(0.0.0.0/0)` destination `IP Range` specified from the Internet through `SSH` with the default `Port 22`. Generic access from the Internet to a specific IP Range needs to be restricted. + +## Impact + +All Secure Shell (SSH) connections from outside of the network to the concerned VPC(s) will be blocked. There could be a business need where SSH access is required from outside of the network to access resources associated with the VPC. In that case, specific source IP(s) should be mentioned in firewall rules to white-list access to SSH port for the concerned VPC(s). + +## Audit + +### From Google Cloud Console + +1. Go to `VPC network`. +2. Go to the `Firewall Rules`. +3. Ensure that `Port` is not equal to `22` and `Action` is not set to `Allow`. +4. Ensure `IP Ranges` is not equal to `0.0.0.0/0` under `Source filters`. + +### From Google Cloud CLI + +```bash +gcloud compute firewall-rules list --format=table'(name,direction,sourceRanges,allowed)' +``` + +Ensure that there is no rule matching the below criteria: + +- `SOURCE_RANGES` is `0.0.0.0/0` +- AND `DIRECTION` is `INGRESS` +- AND IPProtocol is `tcp` or `ALL` +- AND `PORTS` is set to `22` or `range containing 22` or `Null (not set)` + +**Note:** + +- When ALL TCP ports are allowed in a rule, PORT does not have any value set (`NULL`) +- When ALL Protocols are allowed in a rule, PORT does not have any value set (`NULL`) + +## Remediation + +### From Google Cloud Console + +1. Go to `VPC Network`. +2. Go to the `Firewall Rules`. +3. Click the `Firewall Rule` you want to modify. +4. Click `Edit`. +5. Modify `Source IP ranges` to specific `IP`. +6. Click `Save`. + +### From Google Cloud CLI + +1. Update the Firewall rule with the new `SOURCE_RANGE` from the below command: + +```bash +gcloud compute firewall-rules update FirewallName --allow=[PROTOCOL[:PORT[-PORT]],...] --source-ranges=[CIDR_RANGE,...] +``` + +## References + +1. https://cloud.google.com/vpc/docs/firewalls#blockedtraffic +2. https://cloud.google.com/blog/products/identity-security/cloud-iap-enables-context-aware-access-to-vms-via-ssh-and-rdp-without-bastion-hosts + +## Additional Information + +Currently, GCP VPC only supports IPV4; however, Google is already working on adding IPV6 support for VPC. In that case along with source IP range `0.0.0.0`, the rule should be checked for IPv6 equivalent `::/0` as well. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | x | x | x | +| v8 | 4.5 Implement and Manage a Firewall on End-User Devices | x | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | +| v7 | 12.4 Deny Communication over Unauthorized Ports | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.7/SKILL.md new file mode 100644 index 0000000000..cd47ac01d9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.7/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-gcp-foundations-3.7 +description: "Ensure That RDP Access Is Restricted From the Internet" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, networking, firewall, rdp, vpc] +cis_id: "3.7" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.7 Ensure That RDP Access Is Restricted From the Internet (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +GCP `Firewall Rules` are specific to a `VPC Network`. Each rule either `allows` or `denies` traffic when its conditions are met. Its conditions allow users to specify the type of traffic, such as ports and protocols, and the source or destination of the traffic, including IP addresses, subnets, and instances. + +Firewall rules are defined at the VPC network level and are specific to the network in which they are defined. The rules themselves cannot be shared among networks. Firewall rules only support IPv4 traffic. When specifying a source for an ingress rule or a destination for an egress rule by address, an `IPv4` address or `IPv4 block in CIDR` notation can be used. Generic `(0.0.0.0/0)` incoming traffic from the Internet to a VPC or VM instance using `RDP` on `Port 3389` can be avoided. + +## Rationale + +GCP `Firewall Rules` within a `VPC Network`. These rules apply to outgoing (egress) traffic from instances and incoming (ingress) traffic to instances in the network. Egress and ingress traffic flows are controlled even if the traffic stays within the network (for example, instance-to-instance communication). For an instance to have outgoing Internet access, the network must have a valid Internet gateway route or custom route whose destination IP is specified. This route simply defines the path to the Internet, to avoid the most general `(0.0.0.0/0)` destination `IP Range` specified from the Internet through `RDP` with the default `Port 3389`. Generic access from the Internet to a specific IP Range should be restricted. + +## Impact + +All Remote Desktop Protocol (RDP) connections from outside of the network to the concerned VPC(s) will be blocked. There could be a business need where secure shell access is required from outside of the network to access resources associated with the VPC. In that case, specific source IP(s) should be mentioned in firewall rules to white-list access to RDP port for the concerned VPC(s). + +## Audit + +### From Google Cloud Console + +1. Go to `VPC network`. +2. Go to the `Firewall Rules`. +3. Ensure that `Port` is not equal to `3389` and `Action` is not `Allow`. +4. Ensure `IP Ranges` is not equal to `0.0.0.0/0` under `Source filters`. + +### From Google Cloud CLI + +```bash +gcloud compute firewall-rules list --format=table'(name,direction,sourceRanges,allowed)' +``` + +Ensure that there is no rule matching the below criteria: + +- `SOURCE_RANGES` is `0.0.0.0/0` +- AND `DIRECTION` is `INGRESS` +- AND IPProtocol is `TCP` or `ALL` +- AND `PORTS` is set to `3389` or `range containing 3389` or `Null (not set)` + +**Note:** + +- When ALL TCP ports are allowed in a rule, PORT does not have any value set (`NULL`) +- When ALL Protocols are allowed in a rule, PORT does not have any value set (`NULL`) + +## Remediation + +### From Google Cloud Console + +1. Go to `VPC Network`. +2. Go to the `Firewall Rules`. +3. Click the `Firewall Rule` to be modified. +4. Click `Edit`. +5. Modify `Source IP ranges` to specific `IP`. +6. Click `Save`. + +### From Google Cloud CLI + +1. Update RDP Firewall rule with new `SOURCE_RANGE` from the below command: + +```bash +gcloud compute firewall-rules update FirewallName --allow=[PROTOCOL[:PORT[-PORT]],...] --source-ranges=[CIDR_RANGE,...] +``` + +## References + +1. https://cloud.google.com/vpc/docs/firewalls#blockedtraffic +2. https://cloud.google.com/blog/products/identity-security/cloud-iap-enables-context-aware-access-to-vms-via-ssh-and-rdp-without-bastion-hosts + +## Additional Information + +Currently, GCP VPC only supports IPV4; however, Google is already working on adding IPV6 support for VPC. In that case along with source IP range `0.0.0.0`, the rule should be checked for IPv6 equivalent `::/0` as well. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | x | x | x | +| v8 | 4.5 Implement and Manage a Firewall on End-User Devices | x | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | +| v7 | 12.4 Deny Communication over Unauthorized Ports | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.8/SKILL.md new file mode 100644 index 0000000000..fc4cb8a822 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.8/SKILL.md @@ -0,0 +1,139 @@ +--- +name: cis-gcp-foundations-3.8 +description: "Ensure That VPC Flow Logs Is Enabled for Every Subnet in a VPC Network" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, networking, vpc, flow-logs] +cis_id: "3.8" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.8 Ensure that VPC Flow Logs is Enabled for Every Subnet in a VPC Network (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Flow Logs is a feature that enables users to capture information about the IP traffic going to and from network interfaces in the organization's VPC Subnets. Once a flow log is created, the user can view and retrieve its data in Stackdriver Logging. It is recommended that Flow Logs be enabled for every business-critical VPC subnet. + +## Rationale + +VPC networks and subnetworks not reserved for internal HTTP(S) load balancing provide logically isolated and secure network partitions where GCP resources can be launched. When Flow Logs are enabled for a subnet, VMs within that subnet start reporting on all Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) flows. Each VM samples the TCP and UDP flows it sees, inbound and outbound, whether the flow is to or from another VM, a host in the on-premises datacenter, a Google service, or a host on the Internet. If two GCP VMs are communicating, and both are in subnets that have VPC Flow Logs enabled, both VMs report the flows. + +Flow Logs supports the following use cases: + +- Network monitoring +- Understanding network usage and optimizing network traffic expenses +- Network forensics +- Real-time security analysis + +Flow Logs provide visibility into network traffic for each VM inside the subnet and can be used to detect anomalous traffic or provide insight during security workflows. + +The Flow Logs must be configured such that all network traffic is logged, the interval of logging is granular to provide detailed information on the connections, no logs are filtered, and metadata to facilitate investigations are included. + +Note: Subnets reserved for use by internal HTTP(S) load balancers do not support VPC flow logs. + +## Impact + +Standard pricing for Stackdriver Logging, BigQuery, or Cloud Pub/Sub applies. VPC Flow Logs generation will be charged starting in GA as described in reference: https://cloud.google.com/vpc/ + +## Audit + +### From Google Cloud Console + +1. Go to the VPC network GCP Console visiting https://console.cloud.google.com/networking/networks/list +2. From the list of network subnets, make sure for each subnet: + - `Flow Logs` is set to `On` + - `Aggregation Interval` is set to `5 sec` + - `Include metadata` checkbox is checked + - `Sample rate` is set to `100%` + +Note: It is not possible to determine if a Log filter has been defined from the console. + +### From Google Cloud CLI + +```bash +gcloud compute networks subnets list --format json | \ + jq -r +'(["Subnet","Purpose","Flow_Logs","Aggregation_Interval","Flow_Sampling","Metadata","Logs_Filtered"] | (., map(length*"-"))), + (.[] | + [ + .name, + .purpose, + (if has("enableFlowLogs") and .enableFlowLogs == true then "Enabled" else "Disabled" end), + (if has("logConfig") then .logConfig.aggregationInterval else "N/A" end), + (if has("logConfig") then .logConfig.flowSampling else "N/A" end), + (if has("logConfig") then .logConfig.metadata else "N/A" end), + (if has("logConfig") then (.logConfig | has("filterExpr")) else "N/A" end) + ] + ) | + @tsv' | \ + column -t +``` + +The output of the above command will list: + +- each subnet +- the subnet's purpose +- a `Enabled` or `Disabled` value if `Flow Logs` are enabled +- the value for `Aggregation Interval` or `N/A` if disabled, the value for `Flow Sampling` or `N/A` if disabled +- the value for `Metadata` or `N/A` if disabled +- 'true' or 'false' if a Logging Filter is configured or 'N/A' if disabled. + +If the subnet's purpose is `PRIVATE` then `Flow Logs` should be `Enabled`. +If `Flow Logs` is enabled then: + +- `Aggregation_Interval` should be `INTERVAL_5_SEC` +- `Flow_Sampling` should be 1 +- `Metadata` should be `INCLUDE_ALL_METADATA` +- `Logs_Filtered` should be `false`. + +## Remediation + +### From Google Cloud Console + +1. Go to the VPC network GCP Console visiting https://console.cloud.google.com/networking/networks/list +2. Click the name of a subnet, The `Subnet details` page displays. +3. Click the `EDIT` button. +4. Set `Flow Logs` to `On`. +5. Expand the `Configure Logs` section. +6. Set `Aggregation Interval` to `5 SEC`. +7. Check the box beside `Include metadata`. +8. Set `Sample rate` to `100`. +9. Click Save. + +Note: It is not possible to configure a Log filter from the console. + +### From Google Cloud CLI + +To enable VPC Flow Logs for a network subnet, run the following command: + +```bash +gcloud compute networks subnets update [SUBNET_NAME] --region [REGION] --enable-flow-logs --logging-aggregation-interval=interval-5-sec --logging-flow-sampling=1 --logging-metadata=include-all +``` + +## Default Value + +By default, Flow Logs is set to Off when a new VPC network subnet is created. + +## References + +1. https://cloud.google.com/vpc/docs/using-flow-logs#enabling_vpc_flow_logging +2. https://cloud.google.com/vpc/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 13.6 Collect Network Traffic Flow Logs | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 12.8 Deploy NetFlow Collection on Networking Boundary Devices | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.9/SKILL.md new file mode 100644 index 0000000000..cbc192ee9a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-3.9/SKILL.md @@ -0,0 +1,155 @@ +--- +name: cis-gcp-foundations-3.9 +description: "Ensure No HTTPS or SSL Proxy Load Balancers Permit SSL Policies With Weak Cipher Suites" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, networking, ssl, load-balancer] +cis_id: "3.9" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.9 Ensure No HTTPS or SSL Proxy Load Balancers Permit SSL Policies With Weak Cipher Suites (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Secure Sockets Layer (SSL) policies determine what port Transport Layer Security (TLS) features clients are permitted to use when connecting to load balancers. To prevent usage of insecure features, SSL policies should use (a) at least TLS 1.2 with the MODERN profile; or (b) the RESTRICTED profile, because it effectively requires clients to use TLS 1.2 regardless of the chosen minimum TLS version; or (3) a CUSTOM profile that does not support any of the following features: + +``` +TLS_RSA_WITH_AES_128_GCM_SHA256 +TLS_RSA_WITH_AES_256_GCM_SHA384 +TLS_RSA_WITH_AES_128_CBC_SHA +TLS_RSA_WITH_AES_256_CBC_SHA +TLS_RSA_WITH_3DES_EDE_CBC_SHA +``` + +## Rationale + +Load balancers are used to efficiently distribute traffic across multiple servers. Both SSL proxy and HTTPS load balancers are external load balancers, meaning they distribute traffic from the Internet to a GCP network. GCP customers can configure load balancer SSL policies with a minimum TLS version (1.0, 1.1, or 1.2) that clients can use to establish a connection, along with a profile (Compatible, Modern, Restricted, or Custom) that specifies permissible cipher suites. To comply with users using outdated protocols, GCP load balancers can be configured to permit insecure cipher suites. In fact, the GCP default SSL policy uses a minimum TLS version of 1.0 and a Compatible profile, which allows the widest range of insecure cipher suites. As a result, it is easy for customers to configure a load balancer without even knowing that they are permitting outdated cipher suites. + +## Impact + +Creating more secure SSL policies can prevent clients using older TLS versions from establishing a connection. + +## Audit + +### From Google Cloud Console + +1. See all load balancers by visiting https://console.cloud.google.com/net-services/loadbalancing/loadBalancers/list. +2. For each load balancer for `SSL (Proxy)` or `HTTPS`, click on its name to go the `Load balancer details` page. +3. Ensure that each target proxy entry in the `Frontend` table has an `SSL Policy` configured. +4. Click on each SSL policy to go to its `SSL policy details` page. +5. Ensure that the SSL policy satisfies one of the following conditions: + - has a `Min TLS` set to `TLS 1.2` and `Profile` set to `Modern` profile, or + - has `Profile` set to `Restricted`. Note that a Restricted profile effectively requires clients to use TLS 1.2 regardless of the chosen minimum TLS version, or + - has `Profile` set to `Custom` and the following features are all disabled: + ``` + TLS_RSA_WITH_AES_128_GCM_SHA256 + TLS_RSA_WITH_AES_256_GCM_SHA384 + TLS_RSA_WITH_AES_128_CBC_SHA + TLS_RSA_WITH_AES_256_CBC_SHA + TLS_RSA_WITH_3DES_EDE_CBC_SHA + ``` + +### From Google Cloud CLI + +1. List all TargetHttpsProxies and TargetSslProxies. + +```bash +gcloud compute target-https-proxies list +gcloud compute target-ssl-proxies list +``` + +2. For each target proxy, list its properties: + +```bash +gcloud compute target-https-proxies describe TARGET_HTTPS_PROXY_NAME +gcloud compute target-ssl-proxies describe TARGET_SSL_PROXY_NAME +``` + +3. Ensure that the `sslPolicy` field is present and identifies the name of the SSL policy: + +``` +sslPolicy: +https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/sslPolicies/SSL_POLICY_NAME +``` + +If the `sslPolicy` field is missing from the configuration, it means that the GCP default policy is used, which is insecure. + +4. Describe the SSL policy: + +```bash +gcloud compute ssl-policies describe SSL_POLICY_NAME +``` + +5. Ensure that the policy satisfies one of the following conditions: + - has `Profile` set to `Modern` and `minTlsVersion` set to `TLS_1_2`, or + - has `Profile` set to `Restricted`, or + - has `Profile` set to `Custom` and `enabledFeatures` does not contain any of the following values: + ``` + TLS_RSA_WITH_AES_128_GCM_SHA256 + TLS_RSA_WITH_AES_256_GCM_SHA384 + TLS_RSA_WITH_AES_128_CBC_SHA + TLS_RSA_WITH_AES_256_CBC_SHA + TLS_RSA_WITH_3DES_EDE_CBC_SHA + ``` + +## Remediation + +### From Google Cloud Console + +If the TargetSSLProxy or TargetHttpsProxy does not have an SSL policy configured, create a new SSL policy. Otherwise, modify the existing insecure policy. + +1. Navigate to the `SSL Policies` page by visiting: https://console.cloud.google.com/net-security/sslpolicies +2. Click on the name of the insecure policy to go to its `SSL policy details` page. +3. Click `EDIT`. +4. Set `Minimum TLS version` to `TLS 1.2`. +5. Set `Profile` to `Modern` or `Restricted`. +6. Alternatively, if the user selects the profile `Custom`, make sure that the following features are disabled: + ``` + TLS_RSA_WITH_AES_128_GCM_SHA256 + TLS_RSA_WITH_AES_256_GCM_SHA384 + TLS_RSA_WITH_AES_128_CBC_SHA + TLS_RSA_WITH_AES_256_CBC_SHA + TLS_RSA_WITH_3DES_EDE_CBC_SHA + ``` + +### From Google Cloud CLI + +1. For each insecure SSL policy, update it to use secure cyphers: + +```bash +gcloud compute ssl-policies update NAME [--profile COMPATIBLE|MODERN|RESTRICTED|CUSTOM] --min-tls-version 1.2 [--custom-features FEATURES] +``` + +2. If the target proxy has a GCP default SSL policy, use the following command corresponding to the proxy type to update it. + +```bash +gcloud compute target-ssl-proxies update TARGET_SSL_PROXY_NAME --ssl-policy SSL_POLICY_NAME +gcloud compute target-https-proxies update TARGET_HTTPS_POLICY_NAME --ssl-policy SSL_POLICY_NAME +``` + +## Default Value + +The GCP default SSL policy is the least secure setting: Min TLS 1.0 and Compatible profile. + +## References + +1. https://cloud.google.com/load-balancing/docs/use-ssl-policies +2. https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-52r2.pdf + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.1/SKILL.md new file mode 100644 index 0000000000..b08627539a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.1/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-gcp-foundations-4.1 +description: "Ensure That Instances Are Not Configured To Use the Default Service Account" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, service-accounts] +cis_id: "4.1" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1 Ensure That Instances Are Not Configured To Use the Default Service Account (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to configure your instance to not use the default Compute Engine service account because it has the Editor role on the project. + +## Rationale + +When a default Compute Engine service account is created, it is automatically granted the Editor role (roles/editor) on your project which allows read and write access to most Google Cloud Services. This role includes a very large number of permissions. To defend against privilege escalations if your VM is compromised and prevent an attacker from gaining access to all of your project, you should either revoke the Editor role from the default Compute Engine service account or create a new service account and assign only the permissions needed by your instance. To mitigate this at scale, we strongly recommend that you disable the automatic role grant by adding a constraint to your organization policy. + +The default Compute Engine service account is named `[PROJECT_NUMBER]-compute@developer.gserviceaccount.com`. + +## Audit + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. Click on each instance name to go to its `VM instance details` page. +3. Under the section `API and identity management`, ensure that the default Compute Engine service account is not used. This account is named `[PROJECT_NUMBER]-compute@developer.gserviceaccount.com`. + +### From Google Cloud CLI + +1. List the instances in your project and get details on each instance: + +``` +gcloud compute instances list --format=json | jq -r '. | "SA: \(.[].serviceAccounts[].email) Name: \(.[].name)"' +``` + +2. Ensure that the service account section has an email that does not match the pattern `[PROJECT_NUMBER]-compute@developer.gserviceaccount.com`. + +## Exception + +VMs created by GKE should be excluded. These VMs have names that start with `gke-` and are labeled `goog-gke-node`. + +## Remediation + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. Click on the instance name to go to its `VM instance details` page. +3. Click `STOP` and then click `EDIT`. +4. Under the section `API and identity management`, select a service account other than the default Compute Engine service account. You may first need to create a new service account. +5. Click `Save` and then click `START`. + +### From Google Cloud CLI + +1. Stop the instance: + +``` +gcloud compute instances stop +``` + +2. Update the instance: + +``` +gcloud compute instances set-service-account --service-account= +``` + +3. Restart the instance: + +``` +gcloud compute instances start +``` + +## Default Value + +By default, Compute instances are configured to use the default Compute Engine service account. + +## References + +1. https://cloud.google.com/compute/docs/access/service-accounts +2. https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances +3. https://cloud.google.com/sdk/gcloud/reference/compute/instances/set-service-account + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.7 Manage Default Accounts on Enterprise Assets and Software | X | X | X | +| v7 | 4.7 Limit Access to Script Tools | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.10/SKILL.md new file mode 100644 index 0000000000..c9551bb148 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.10/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-gcp-foundations-4.10 +description: "Ensure That App Engine Applications Enforce HTTPS Connections" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, app-engine] +cis_id: "4.10" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.10 Ensure That App Engine Applications Enforce HTTPS Connections (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +In order to maintain the highest level of security all connections to an application should be secure by default. + +## Rationale + +Insecure HTTP connections maybe subject to eavesdropping which can expose sensitive data. + +## Impact + +All connections to appengine will automatically be redirected to the HTTPS endpoint ensuring that all connections are secured by TLS. + +## Audit + +Verify that the app.yaml file controlling the application contains a line which enforces secure connections. For example: + +```yaml +handlers: + - url: /.* + secure: always + redirect_http_response_code: 301 + script: auto +``` + +Reference: https://cloud.google.com/appengine/docs/standard/python3/config/appref + +## Remediation + +Add a line to the app.yaml file controlling the application which enforces secure connections. For example: + +```yaml +handlers: +- url: /.* + **secure: always** + redirect_http_response_code: 301 + script: auto +``` + +Reference: https://cloud.google.com/appengine/docs/standard/python3/config/appref + +## Default Value + +By default both HTTP and HTTP are supported. + +## References + +1. https://cloud.google.com/appengine/docs/standard/python3/config/appref +2. https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v8 | 16.11 Leverage Vetted Modules or Services for Application Security Components | | X | X | +| v7 | 18.5 Use Only Standardized and Extensively Reviewed Encryption Algorithms | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.11/SKILL.md new file mode 100644 index 0000000000..6a236f7511 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.11/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-gcp-foundations-4.11 +description: "Ensure That Compute Instances Have Confidential Computing Enabled" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, confidential-computing] +cis_id: "4.11" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.11 Ensure That Compute Instances Have Confidential Computing Enabled (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Google Cloud encrypts data at-rest and in-transit, but customer data must be decrypted for processing. Confidential Computing is a breakthrough technology that encrypts data in-use while it is being processed. Confidential Computing environments keep data encrypted in memory and elsewhere outside the central processing unit (CPU). + +Confidential VMs leverage hardware-based memory encryption technologies, such as AMD Secure Encrypted Virtualization (SEV), AMD SEV-SNP, and Intel Trust Domain Extensions (TDX), depending on the chosen machine type and CPU platform. Customer data will stay encrypted while it is used, indexed, queried, or trained on. Encryption keys are generated by and reside solely in dedicated hardware and are not exportable, enhancing isolation and security. Built-in hardware optimizations ensure Confidential Computing workloads experience minimal to no significant performance penalties. + +## Rationale + +Confidential Computing enables customers' sensitive code and other data encrypted in memory during processing. Google does not have access to the encryption keys. Confidential VM can help alleviate concerns about risk related to either dependency on Google infrastructure or Google insiders' access to customer data in the clear. + +## Impact + +- Confidential Computing for Compute instances does not support live migration. Unlike regular Compute instances, Confidential VMs experience disruptions during maintenance events like a software or hardware update. +- Additional charges may be incurred when enabling this security feature. See https://cloud.google.com/compute/confidential-vm/pricing for more info. + +## Audit + +Note: Confidential Computing is currently only supported on limited VM configurations. To learn more about VM configurations supported by Confidential Computing, visit https://cloud.google.com/confidential-computing/confidential-vm/docs/supported-configurations. + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. Click on the instance name to see its VM instance details page. +3. Ensure that `Confidential VM service` is `Enabled`. + +### From Google Cloud CLI + +1. List the instances in your project and get details on each instance: + +``` +gcloud compute instances list --format=json +``` + +2. Ensure that `enableConfidentialCompute` is set to `true` for all instances with machine type starting with "n2d-". + +```yaml +confidentialInstanceConfig: + enableConfidentialCompute: true +``` + +## Remediation + +Confidential Computing can only be enabled when an instance is created. You must delete the current instance and create a new one. + +### From Google Cloud Console + +1. Go to the VM instances page by visiting: https://console.cloud.google.com/compute/instances. +2. Click `CREATE INSTANCE`. +3. Fill out the desired configuration for your instance. +4. Under the `Confidential VM service` section, check the option `Enable the Confidential Computing service on this VM instance`. +5. Click `Create`. + +### From Google Cloud CLI + +Create a new instance with Confidential Compute enabled: + +``` +gcloud compute instances create --zone --confidential-compute --maintenance-policy=TERMINATE +``` + +## Default Value + +By default, Confidential Computing is disabled for Compute instances. + +## References + +1. https://cloud.google.com/compute/confidential-vm/docs/creating-cvm-instance +2. https://cloud.google.com/compute/confidential-vm/docs/about-cvm +3. https://cloud.google.com/confidential-computing +4. https://cloud.google.com/blog/products/identity-security/introducing-google-cloud-confidential-computing-with-confidential-vms + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.12/SKILL.md new file mode 100644 index 0000000000..a88aa8b9a8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.12/SKILL.md @@ -0,0 +1,195 @@ +--- +name: cis-gcp-foundations-4.12 +description: "Ensure the Latest Operating System Updates Are Installed On Your Virtual Machines in All Projects" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, service-accounts] +cis_id: "4.12" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.12 Ensure the Latest Operating System Updates Are Installed On Your Virtual Machines in All Projects (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Google Cloud Virtual Machines have the ability via an OS Config agent API to periodically (about every 10 minutes) report OS inventory data. A patch compliance API periodically reads this data, and cross references metadata to determine if the latest updates are installed. + +This is not the only Patch Management solution available to your organization and you should weigh your needs before committing to using this method. + +## Rationale + +Keeping virtual machine operating systems up to date is a security best practice. Using this service will simplify this process. + +## Impact + +Most Operating Systems require a restart or changing critical resources to apply the updates. Using the Google Cloud VM manager for its OS Patch management will incur additional costs for each VM managed by it. Please view the VM manager pricing reference for further information. + +## Audit + +### From Google Cloud Console + +**Determine if OS Config API is Enabled for the Project** + +1. Navigate into a project. In the expanded navigation menu located at the top left of the screen hover over `APIs & Services`. Then in the menu right of that select `API Libraries`. +2. Search for "VM Manager (OS Config API)" or scroll down in the left hand column and select the filter labeled "Compute" where it is the last listed. Open this API. +3. Verify the blue button at the top is enabled. + +**Determine if the Operating System of VM Instances have the local OS-Config Agent running** + +There is no way to determine this from the Google Cloud console. The only way is to run operating specific commands locally inside the operating system via remote connection. For the sake of brevity of this recommendation please view the docs/troubleshooting/vm-manager/verify-setup reference at the bottom of the page. If you initialized your VM instance with a Google Supplied OS Image with a build date of later than v20200114 it will have the service installed. You should still determine its status for proper operation. + +**Verify the service account you have setup for the project in Recommendation 4.1 is running** + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. Click on each instance name to go to its `VM instance details` page. +3. Under the section `Service Account`, take note of the service account. +4. Run the commands locally for your operating system that are located at the docs/troubleshooting/vm-manager/verify-setup#service-account-enabled reference located at the bottom of this page. They should return the name of your service account. + +**Determine if Instances can connect to public update hosting** + +Each type of operating system has its own update process. You will need to determine on each operating system that it can reach the update servers via its network connection. The VM Manager doesn't host the updates, it will only allow you to centrally issue a command to each VM to update. + +**Determine if OS Config API is Enabled for the Project** + +1. In each project you wish to enable run the following command: + +``` +gcloud services list +``` + +2. If osconfig.googleapis.com is in the left hand column it is enabled for this project. + +**Determine if VM Manager is Enabled for the Project** + +1. Within the project run the following command: + +``` +gcloud compute instances os-inventory describe VM-NAME \ + --zone=ZONE +``` + +The output will look like: + +``` +INSTANCE_ID INSTANCE_NAME OS +OSCONFIG_AGENT_VERSION UPDATE_TIME +29255009728795105 centos7 CentOS Linux 7 (Core) +20210217.00-g1.el7 2021-04-12T22:19:36.559Z +5138980234596718741 rhel-8 Red Hat Enterprise Linux 8.3 (Ootpa) +20210316.00-g1.e18 2021-09-16T17:19:24Z +7127836223366142250 windows Microsoft Windows Server 2019 Datacenter +20210316.00.0+win@1 2021-09-16T17:13:18Z +``` + +**Determine if VM Instances have correct metadata tags for OSConfig parsing** + +1. Select the project you want to view tagging in. + +### From Google Cloud Console + +1. From the main Google Cloud console, open the hamburger menu in the top left. Mouse over Computer Engine to expand the menu next to it. +2. Under the "Settings" heading, select "Metadata". +3. In this view there will be a list of the project wide metadata tags for Vms. Verify a tag of 'enable-osconfig' is in this list and it is set to 'true'. + +### From Command Line + +Run the following command to view instance data: + +``` +gcloud compute instances list --format="table(name,status,tags.list())" +``` + +On each instance it should have a tag of 'enable-osconfig' set to 'true'. + +**Determine if the Operating System of VM Instances have the local OS-Config Agent running** + +There is no way to determine this from the Google Cloud CLI. The best way is to run the commands inside the operating system located at 'Check OS-Config agent is installed and running' at the /docs/troubleshooting/vm-manager/verify-setup reference at the bottom of the page. If you initialized your VM instance with a Google Supplied OS Image with a build date of later than v20200114 it will have the service installed. You should still determine its status. + +**Verify the service account you have setup for the project in Recommendation 4.1 is running** + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. Click on each instance name to go to its `VM instance details` page. +3. Under the section `Service Account`, take note of the service account. +4. View the compute/docs/troubleshooting/vm-manager/verify-setup#service-account-enabled resource at the bottom of the page for operating system specific commands to run locally. + +**Determine if Instances can connect to public update hosting** + +**Linux - Debian Based Operating Systems** + +``` +sudo apt update +``` + +The output should have a numbered list of lines with Hit: URL of updates. + +**Redhat Based Operating Systems** + +``` +yum check-update +``` + +The output should show a list of packages that have updates available. + +**Windows** + +``` +ping http://windowsupdate.microsoft.com/ +``` + +The ping should successfully be delivered and received. + +## Remediation + +### From Google Cloud Console + +**Enabling OS Patch Management on a Project by Project Basis** + +**Install OS Config API for the Project** + +1. Navigate into a project. In the expanded portal menu located at the top left of the screen hover over "APIs & Services". Then in the menu right of that select "API Libraries". +2. Search for "VM Manager (OS Config API)" or scroll down in the left hand column and select the filter labeled "Compute" where it is the last listed. Open this API. +3. Click the blue 'Enable' button. + +**Add MetaData Tags for OSConfig Parsing** + +1. From the main Google Cloud console, open the portal menu in the top left. Mouse over Computer Engine to expand the menu next to it. +2. Under the "Settings" heading, select "Metadata". +3. In this view there will be a list of the project wide metadata tags for VMs. Click edit and 'add item' in the key column type 'enable-osconfig' and in the value column set it to 'true'. + +### From Command Line + +1. For project wide tagging, run the following command: + +``` +gcloud compute project-info add-metadata \ + --project \ + --metadata=enable-osconfig=TRUE +``` + +## Default Value + +OS Patch Management is not enabled by default. + +## References + +1. https://cloud.google.com/compute/docs/vm-manager +2. https://cloud.google.com/compute/docs/troubleshooting/vm-manager/verify-setup + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 7.3 Perform Automated Operating System Patch Management | X | X | X | +| v8 | 7.4 Perform Automated Application Patch Management | X | X | X | +| v7 | 3.4 Deploy Automated Operating System Patch Management Tools | X | X | X | +| v7 | 3.5 Deploy Automated Software Patch Management Tools | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.2/SKILL.md new file mode 100644 index 0000000000..8d0615fe15 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.2/SKILL.md @@ -0,0 +1,122 @@ +--- +name: cis-gcp-foundations-4.2 +description: "Ensure That Instances Are Not Configured To Use the Default Service Account With Full Access to All Cloud APIs" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, service-accounts] +cis_id: "4.2" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2 Ensure That Instances Are Not Configured To Use the Default Service Account With Full Access to All Cloud APIs (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +To support principle of least privileges and prevent potential privilege escalation it is recommended that instances are not assigned to default service account `Compute Engine default service account` with Scope `Allow full access to all Cloud APIs`. + +## Rationale + +Along with ability to optionally create, manage and use user managed custom service accounts, Google Compute Engine provides default service account `Compute Engine default service account` for an instances to access necessary cloud services. `Project Editor` role is assigned to `Compute Engine default service account` hence, This service account has almost all capabilities over all cloud services except billing. However, when `Compute Engine default service account` assigned to an instance it can operate in 3 scopes. + +``` +1. Allow default access: Allows only minimum access required to run an +Instance (Least Privileges) + +2. Allow full access to all Cloud APIs: Allow full access to all the cloud +APIs/Services (Too much access) + +3. Set access for each API: Allows Instance administrator to choose only +those APIs that are needed to perform specific business functionality +expected by instance +``` + +When an instance is configured with `Compute Engine default service account` with Scope `Allow full access to all Cloud APIs`, based on IAM roles assigned to the user(s) accessing Instance, it may allow user to perform cloud operations/API calls that user is not supposed to perform leading to successful privilege escalation. + +## Impact + +In order to change service account or scope for an instance, it needs to be stopped. + +## Audit + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. Click on each instance name to go to its `VM instance details` page. +3. Under the `API and identity management`, ensure that `Cloud API access scopes` is not set to `Allow full access to all Cloud APIs`. + +### From Google Cloud CLI + +1. List the instances in your project and get details on each instance: + +``` +gcloud compute instances list --format=json | jq -r '. | "SA Scopes: \(.[].serviceAccounts[].scopes) Name: \(.[].name) Email: \(.[].serviceAccounts[].email)"' +``` + +2. Ensure that the service account section has an email that does not match the pattern `[PROJECT_NUMBER]-compute@developer.gserviceaccount.com`. + +## Exception + +VMs created by GKE should be excluded. These VMs have names that start with `gke-` and are labeled `goog-gke-node`. + +## Remediation + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. Click on the impacted VM instance. +3. If the instance is not stopped, click the `Stop` button. Wait for the instance to be stopped. +4. Next, click the `Edit` button. +5. Scroll down to the `Service Account` section. +6. Select a different service account or ensure that `Allow full access to all Cloud APIs` is not selected. +7. Click the `Save` button to save your changes and then click `START`. + +### From Google Cloud CLI + +1. Stop the instance: + +``` +gcloud compute instances stop +``` + +2. Update the instance: + +``` +gcloud compute instances set-service-account --service-account= --scopes [SCOPE1, SCOPE2...] +``` + +3. Restart the instance: + +``` +gcloud compute instances start +``` + +## Default Value + +While creating an VM instance, default service account is used with scope `Allow default access`. + +## References + +1. https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances +2. https://cloud.google.com/compute/docs/access/service-accounts + +## Additional Information + +- User IAM roles will override service account scope but configuring minimal scope ensures defense in depth. +- Non-default service accounts do not offer selection of access scopes like default service account. IAM roles with non-default service accounts should be used to control VM access. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.7 Manage Default Accounts on Enterprise Assets and Software | X | X | X | +| v7 | 4.7 Limit Access to Script Tools | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.3/SKILL.md new file mode 100644 index 0000000000..470b6ce801 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.3/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-gcp-foundations-4.3 +description: "Ensure 'Block Project-Wide SSH Keys' Is Enabled for VM Instances" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, ssh] +cis_id: "4.3" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.3 Ensure "Block Project-Wide SSH Keys" Is Enabled for VM Instances (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to use Instance specific SSH key(s) instead of using common/shared project-wide SSH key(s) to access Instances. + +## Rationale + +Project-wide SSH keys are stored in Compute/Project-meta-data. Project wide SSH keys can be used to login into all the instances within project. Using project-wide SSH keys eases the SSH key management but if compromised, poses the security risk which can impact all the instances within project. It is recommended to use Instance specific SSH keys which can limit the attack surface if the SSH keys are compromised. + +## Impact + +Users already having Project-wide ssh key pairs and using third party SSH clients will lose access to the impacted Instances. For Project users using gcloud or GCP Console based SSH option, no manual key creation and distribution is required and will be handled by GCE (Google Compute Engine) itself. To access Instance using third party SSH clients Instance specific SSH key pairs need to be created and distributed to the required users. + +## Audit + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting https://console.cloud.google.com/compute/instances. It will list all the instances in your project. +2. For every instance, click on the name of the instance. +3. Under `SSH Keys`, ensure `Block project-wide SSH keys` is selected. + +### From Google Cloud CLI + +1. List the instances in your project and get details on each instance: + +``` +gcloud compute instances list --format=json +``` + +2. Ensure `key: block-project-ssh-keys` is set to `value: 'true'`. + +## Remediation + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. It will list all the instances in your project. +2. Click on the name of the Impacted instance. +3. Click `Edit` in the toolbar. +4. Under SSH Keys, go to the `Block project-wide SSH keys` checkbox. +5. To block users with project-wide SSH keys from connecting to this instance, select `Block project-wide SSH keys`. +6. Click `Save` at the bottom of the page. +7. Repeat steps for every impacted Instance. + +### From Google Cloud CLI + +To block project-wide public SSH keys, set the metadata value to `TRUE`: + +``` +gcloud compute instances add-metadata --metadata block-project-ssh-keys=TRUE +``` + +## Default Value + +By Default `Block Project-wide SSH keys` is not enabled. + +## References + +1. https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys +2. https://cloud.google.com/sdk/gcloud/reference/topic/formats + +## Additional Information + +If OS Login is enabled, SSH keys in instance metadata are ignored, and therefore blocking project-wide SSH keys is not necessary. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v8 | 5.2 Use Unique Passwords | X | X | X | +| v7 | 4.4 Use Unique Passwords | | X | X | +| v7 | 16.5 Encrypt Transmittal of Username and Authentication Credentials | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.4/SKILL.md new file mode 100644 index 0000000000..eb7a7bd469 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.4/SKILL.md @@ -0,0 +1,120 @@ +--- +name: cis-gcp-foundations-4.4 +description: "Ensure Oslogin Is Enabled for a Project" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, oslogin] +cis_id: "4.4" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.4 Ensure Oslogin Is Enabled for a Project (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enabling OS login binds SSH certificates to IAM users and facilitates effective SSH certificate management. + +## Rationale + +Enabling osLogin ensures that SSH keys used to connect to instances are mapped with IAM users. Revoking access to IAM user will revoke all the SSH keys associated with that particular user. It facilitates centralized and automated SSH key pair management which is useful in handling cases like response to compromised SSH key pairs and/or revocation of external/third-party/Vendor users. + +## Impact + +Enabling OS Login on project disables metadata-based SSH key configurations on all instances from a project. Disabling OS Login restores SSH keys that you have configured in project or instance meta-data. + +## Audit + +### From Google Cloud Console + +1. Go to the VM compute metadata page by visiting https://console.cloud.google.com/compute/metadata. +2. Ensure that key `enable-oslogin` is present with value set to `TRUE`. +3. Because instances can override project settings, ensure that no instance has custom metadata with key `enable-oslogin` and value `FALSE`. + +### From Google Cloud CLI + +1. List the instances in your project and get details on each instance: + +``` +gcloud compute instances list --format=json +``` + +2. Verify that the section `commonInstanceMetadata` has a key `enable-oslogin` set to value `TRUE`. + +## Exception + +VMs created by GKE should be excluded. These VMs have names that start with `gke-` and are labeled `goog-gke-node`. + +## Remediation + +### From Google Cloud Console + +1. Go to the VM compute metadata page by visiting: https://console.cloud.google.com/compute/metadata. +2. Click `Edit`. +3. Add a metadata entry where the key is `enable-oslogin` and the value is `TRUE`. +4. Click `Save` to apply the changes. +5. For every instance that overrides the project setting, go to the `VM Instances` page at https://console.cloud.google.com/compute/instances. +6. Click the name of the instance on which you want to remove the metadata value. +7. At the top of the instance details page, click `Edit` to edit the instance settings. +8. Under `Custom metadata`, remove any entry with key `enable-oslogin` and the value is `FALSE`. +9. At the bottom of the instance details page, click `Save` to apply your changes to the instance. + +### From Google Cloud CLI + +1. Configure oslogin on the project: + +``` +gcloud compute project-info add-metadata --metadata enable-oslogin=TRUE +``` + +2. Remove instance metadata that overrides the project setting: + +``` +gcloud compute instances remove-metadata --keys=enable-oslogin +``` + +Optionally, you can enable two factor authentication for OS login. For more information, see: https://cloud.google.com/compute/docs/oslogin/setup-two-factor-authentication. + +## Default Value + +By default, parameter `enable-oslogin` is not set, which is equivalent to setting it to `FALSE`. + +## References + +1. https://cloud.google.com/compute/docs/instances/managing-instance-access +2. https://cloud.google.com/compute/docs/instances/managing-instance-access#enable_oslogin +3. https://cloud.google.com/sdk/gcloud/reference/compute/instances/remove-metadata +4. https://cloud.google.com/compute/docs/oslogin/setup-two-factor-authentication + +## Additional Information + +1. In order to use osLogin, instance using Custom Images must have the latest version of the Linux Guest Environment installed. The following image families do not yet support OS Login: + +``` +Project cos-cloud (Container-Optimized OS) image family cos-stable. + +All project coreos-cloud (CoreOS) image families + +Project suse-cloud (SLES) image family sles-11 + +All Windows Server and SQL Server image families +``` + +2. Project enable-oslogin can be over-ridden by setting enable-oslogin parameter to an instance metadata individually. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | X | X | +| v8 | 6.7 Centralize Access Control | | X | X | +| v7 | 16.2 Configure Centralized Point of Authentication | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.5/SKILL.md new file mode 100644 index 0000000000..df63a4a049 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.5/SKILL.md @@ -0,0 +1,115 @@ +--- +name: cis-gcp-foundations-4.5 +description: "Ensure 'Enable Connecting to Serial Ports' Is Not Enabled for VM Instance" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, ssh] +cis_id: "4.5" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.5 Ensure 'Enable Connecting to Serial Ports' Is Not Enabled for VM Instance (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Interacting with a serial port is often referred to as the serial console, which is similar to using a terminal window, in that input and output is entirely in text mode and there is no graphical interface or mouse support. + +If you enable the interactive serial console on an instance, clients can attempt to connect to that instance from any IP address. Therefore interactive serial console support should be disabled. + +## Rationale + +A virtual machine instance has four virtual serial ports. Interacting with a serial port is similar to using a terminal window, in that input and output is entirely in text mode and there is no graphical interface or mouse support. The instance's operating system, BIOS, and other system-level entities often write output to the serial ports, and can accept input such as commands or answers to prompts. Typically, these system-level entities use the first serial port (port 1) and serial port 1 is often referred to as the serial console. + +The interactive serial console does not support IP-based access restrictions such as IP whitelists. If you enable the interactive serial console on an instance, clients can attempt to connect to that instance from any IP address. This allows anybody to connect to that instance if they know the correct SSH key, username, project ID, zone, and instance name. + +Therefore interactive serial console support should be disabled. + +## Audit + +### From Google Cloud Console + +1. Login to Google Cloud console +2. Go to Compute Engine +3. Go to VM instances +4. Click on the Specific VM +5. Ensure the statement `Connecting to serial serial ports is disabled` is displayed at the top of the details tab, just below the `Connect to serial console` drop-down. + +### From Google Cloud CLI + +Ensure the below command's output shows `null`: + +``` +gcloud compute instances describe --zone= --format="json(metadata.items[].key,metadata.items[].value)" +``` + +or `key` and `value` properties from below command's json response are equal to `serial-port-enable` and `0` or `false` respectively. + +```json +{ + "metadata": { + "items": [ + { + "key": "serial-port-enable", + "value": "0" + } + ] + } +} +``` + +## Remediation + +### From Google Cloud Console + +1. Login to Google Cloud console +2. Go to Computer Engine +3. Go to VM instances +4. Click on the Specific VM +5. Click `EDIT` +6. Unselect `Enable connecting to serial ports` below `Remote access` block. +7. Click `Save` + +### From Google Cloud CLI + +Use the below command to disable: + +``` +gcloud compute instances add-metadata --zone= --metadata=serial-port-enable=false +``` + +or + +``` +gcloud compute instances add-metadata --zone= --metadata=serial-port-enable=0 +``` + +## Prevention + +You can prevent VMs from having serial port access enable by `Disable VM serial port access` organization policy: + +https://console.cloud.google.com/iam-admin/orgpolicies/compute-disableSerialPortAccess. + +## Default Value + +By default, connecting to serial ports is not enabled. + +## References + +1. https://cloud.google.com/compute/docs/instances/interacting-with-serial-console + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | X | X | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.6/SKILL.md new file mode 100644 index 0000000000..b80f33acb4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.6/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-gcp-foundations-4.6 +description: "Ensure That IP Forwarding Is Not Enabled on Instances" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, service-accounts] +cis_id: "4.6" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.6 Ensure That IP Forwarding Is Not Enabled on Instances (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Compute Engine instance cannot forward a packet unless the source IP address of the packet matches the IP address of the instance. Similarly, GCP won't deliver a packet whose destination IP address is different than the IP address of the instance receiving the packet. However, both capabilities are required if you want to use instances to help route packets. + +Forwarding of data packets should be disabled to prevent data loss or information disclosure. + +## Rationale + +Compute Engine instance cannot forward a packet unless the source IP address of the packet matches the IP address of the instance. Similarly, GCP won't deliver a packet whose destination IP address is different than the IP address of the instance receiving the packet. However, both capabilities are required if you want to use instances to help route packets. To enable this source and destination IP check, disable the `canIpForward` field, which allows an instance to send and receive packets with non-matching destination or source IPs. + +## Audit + +### From Google Cloud Console + +1. Go to the `VM Instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. For every instance, click on its name to go to the `VM instance details` page. +3. Under the `Network interfaces` section, ensure that `IP forwarding` is set to `Off` for every network interface. + +### From Google Cloud CLI + +1. List all instances: + +``` +gcloud compute instances list --format='table(name,canIpForward)' +``` + +2. Ensure that `CAN_IP_FORWARD` column in the output of above command does not contain `True` for any VM instance. + +## Exception + +Instances created by GKE should be excluded because they need to have IP forwarding enabled and cannot be changed. Instances created by GKE have names that start with "gke-". + +## Remediation + +You only edit the `canIpForward` setting at instance creation or using CLI. + +### From Google Cloud CLI + +1. Use the instances export command to export the existing instance properties: + +``` +gcloud compute instances export \ + --project \ + --zone \ + --destination= +``` + +Note: Replace the following: + +- INSTANCE_NAME the name for the instance that you want to export. +- PROJECT_ID: the project ID for this request. +- ZONE: the zone for this instance. +- FILE_PATH: the output path where you want to save the instance configuration file on your local workstation. + +2. Use a text editor to modify this file. Replace `canIpForward: true` with `canIpForward: false`. + +3. Run this command to import the file you just modified: + +``` +gcloud compute instances update-from-file INSTANCE_NAME \ + --project PROJECT_ID \ + --zone ZONE \ + --source=FILE_PATH \ + --most-disruptive-allowed-action=REFRESH +``` + +If the update request is valid and the required resources are available, the instance update process begins. You can monitor the status of this operation by viewing the audit logs. This update requires only a REFRESH not a full restart. + +## Default Value + +By default, instances are not configured to allow IP forwarding. + +## References + +1. https://cloud.google.com/vpc/docs/using-routes#canipforward +2. https://cloud.google.com/compute/docs/instances/update-instance-properties + +## Additional Information + +You can only set the `canIpForward` field at instance creation time or using CLI. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | X | X | X | +| v8 | 4.5 Implement and Manage a Firewall on End-User Devices | X | X | X | +| v7 | 11.1 Maintain Standard Security Configurations for Network Devices | | X | X | +| v7 | 11.2 Document Traffic Configuration Rules | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.7/SKILL.md new file mode 100644 index 0000000000..04d9be0bb8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.7/SKILL.md @@ -0,0 +1,122 @@ +--- +name: cis-gcp-foundations-4.7 +description: "Ensure VM Disks for Critical VMs Are Encrypted With Customer-Supplied Encryption Keys (CSEK)" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, encryption] +cis_id: "4.7" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.7 Ensure VM Disks for Critical VMs Are Encrypted With Customer-Supplied Encryption Keys (CSEK) (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Customer-Supplied Encryption Keys (CSEK) are a feature in Google Cloud Storage and Google Compute Engine. If you supply your own encryption keys, Google uses your key to protect the Google-generated keys used to encrypt and decrypt your data. By default, Google Compute Engine encrypts all data at rest. Compute Engine handles and manages this encryption for you without any additional actions on your part. However, if you wanted to control and manage this encryption yourself, you can provide your own encryption keys. + +## Rationale + +By default, Google Compute Engine encrypts all data at rest. Compute Engine handles and manages this encryption for you without any additional actions on your part. However, if you wanted to control and manage this encryption yourself, you can provide your own encryption keys. + +If you provide your own encryption keys, Compute Engine uses your key to protect the Google-generated keys used to encrypt and decrypt your data. Only users who can provide the correct key can use resources protected by a customer-supplied encryption key. + +Google does not store your keys on its servers and cannot access your protected data unless you provide the key. This also means that if you forget or lose your key, there is no way for Google to recover the key or to recover any data encrypted with the lost key. + +At least business critical VMs should have VM disks encrypted with CSEK. + +## Impact + +If you lose your encryption key, you will not be able to recover the data. + +## Audit + +### From Google Cloud Console + +1. Go to Compute Engine `Disks` by visiting: https://console.cloud.google.com/compute/disks. +2. Click on the disk for your critical VMs to see its configuration details. +3. Ensure that `Encryption type` is set to `Customer supplied`. + +### From Google Cloud CLI + +Ensure `diskEncryptionKey` property in the below command's response is not null, and contains key `sha256` with corresponding value: + +``` +gcloud compute disks describe --zone --format="json(diskEncryptionKey,name)" +``` + +## Remediation + +Currently there is no way to update the encryption of an existing disk. Therefore you should create a new disk with `Encryption` set to `Customer supplied`. + +### From Google Cloud Console + +1. Go to Compute Engine `Disks` by visiting: https://console.cloud.google.com/compute/disks. +2. Click `CREATE DISK`. +3. Set `Encryption type` to `Customer supplied`. +4. Provide the `Key` in the box. +5. Select `Wrapped key`. +6. Click `Create`. + +### From Google Cloud CLI + +In the gcloud compute tool, encrypt a disk using the --csek-key-file flag during instance creation. If you are using an RSA-wrapped key, use the gcloud beta component: + +``` +gcloud compute instances create --csek-key-file +``` + +To encrypt a standalone persistent disk: + +``` +gcloud compute disks create --csek-key-file +``` + +## Default Value + +By default, VM disks are encrypted with Google-managed keys. They are not encrypted with Customer-Supplied Encryption Keys. + +## References + +1. https://cloud.google.com/compute/docs/disks/customer-supplied-encryption#encrypt_a_new_persistent_disk_with_your_own_keys +2. https://cloud.google.com/compute/docs/reference/rest/v1/disks/get +3. https://cloud.google.com/compute/docs/disks/customer-supplied-encryption#key_file + +## Additional Information + +**Note 1:** When you delete a persistent disk, Google discards the cipher keys, rendering the data irretrievable. This process is irreversible. + +**Note 2:** It is up to you to generate and manage your key. You must provide a key that is a 256-bit string encoded in RFC 4648 standard base64 to Compute Engine. + +**Note 3:** An example key file looks like this: + +```json +[ + { + "uri": "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/disks/example-disk", + "key": "acXTX3rxrKAFTF0tYVLvydU1riRZTvUNC4g5I11NY-c=", + "key-type": "raw" + }, + { + "uri": "https://www.googleapis.com/compute/v1/projects/myproject/global/snapshots/my-private-snapshot", + "key": "", + "key-type": "rsa-encrypted" + } +] +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.8/SKILL.md new file mode 100644 index 0000000000..fe2bee9295 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.8/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-gcp-foundations-4.8 +description: "Ensure Compute Instances Are Launched With Shielded VM Enabled" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, shielded-vm] +cis_id: "4.8" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.8 Ensure Compute Instances Are Launched With Shielded VM Enabled (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +To defend against advanced threats and ensure that the boot loader and firmware on your VMs are signed and untampered, it is recommended that Compute instances are launched with Shielded VM enabled. + +## Rationale + +Shielded VMs are virtual machines (VMs) on Google Cloud Platform hardened by a set of security controls that help defend against rootkits and bootkits. + +Shielded VM offers verifiable integrity of your Compute Engine VM instances, so you can be confident your instances haven't been compromised by boot- or kernel-level malware or rootkits. Shielded VM's verifiable integrity is achieved through the use of Secure Boot, virtual trusted platform module (vTPM)-enabled Measured Boot, and integrity monitoring. + +Shielded VM instances run firmware which is signed and verified using Google's Certificate Authority, ensuring that the instance's firmware is unmodified and establishing the root of trust for Secure Boot. + +Integrity monitoring helps you understand and make decisions about the state of your VM instances and the Shielded VM vTPM enables Measured Boot by performing the measurements needed to create a known good boot baseline, called the integrity policy baseline. The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed. + +Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. + +## Audit + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. Click on the instance name to see its `VM instance details` page. +3. Under the section `Shielded VM`, ensure that `vTPM` and `Integrity Monitoring` are `on`. + +### From Google Cloud CLI + +1. For each instance in your project, get its metadata: + +``` +gcloud compute instances list --format=json | jq -r '. | "vTPM: \(.[].shieldedInstanceConfig.enableVtpm) IntegrityMonitoring: \(.[].shieldedInstanceConfig.enableIntegrityMonitoring) Name: \(.[].name)"' +``` + +2. Ensure that there is a `shieldedInstanceConfig` configuration and that configuration has the `enableIntegrityMonitoring` and `enableVtpm` set to `true`. If the VM is not a Shield VM image, you will not see a `shieldedInstanceConfig` in the output. + +## Remediation + +To be able turn on `Shielded VM` on an instance, your instance must use an image with Shielded VM support. + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. Click on the instance name to see its `VM instance details` page. +3. Click `STOP` to stop the instance. +4. When the instance has stopped, click `EDIT`. +5. In the Shielded VM section, select `Turn on vTPM` and `Turn on Integrity Monitoring`. +6. Optionally, if you do not use any custom or unsigned drivers on the instance, also select `Turn on Secure Boot`. +7. Click the `Save` button to modify the instance and then click `START` to restart it. + +### From Google Cloud CLI + +You can only enable Shielded VM options on instances that have Shielded VM support. For a list of Shielded VM public images, run the gcloud compute images list command with the following flags: + +``` +gcloud compute images list --project gce-uefi-images --no-standard-images +``` + +1. Stop the instance: + +``` +gcloud compute instances stop +``` + +2. Update the instance: + +``` +gcloud compute instances update --shielded-vtpm --shielded-vm-integrity-monitoring +``` + +3. Optionally, if you do not use any custom or unsigned drivers on the instance, also turn on secure boot: + +``` +gcloud compute instances update --shielded-vm-secure-boot +``` + +4. Restart the instance: + +``` +gcloud compute instances start +``` + +## Prevention + +You can ensure that all new VMs will be created with Shielded VM enabled by setting up an Organization Policy to for `Shielded VM` at https://console.cloud.google.com/iam-admin/orgpolicies/compute-requireShieldedVm. Learn more at: https://cloud.google.com/security/shielded-cloud/shielded-vm#organization-policy-constraint. + +## Default Value + +By default, Compute Instances do not have Shielded VM enabled. + +## References + +1. https://cloud.google.com/compute/docs/instances/modifying-shielded-vm +2. https://cloud.google.com/shielded-vm +3. https://cloud.google.com/security/shielded-cloud/shielded-vm#organization-policy-constraint + +## Additional Information + +If you do use custom or unsigned drivers on the instance, enabling Secure Boot will cause the machine to no longer boot. Turn on Secure Boot only on instances that have been verified to not have any custom drivers installed. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 0.0 Explicitly Not Mapped | | | | +| v7 | 5.2 Maintain Secure Images | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.9/SKILL.md new file mode 100644 index 0000000000..4ae3e79516 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-4.9/SKILL.md @@ -0,0 +1,127 @@ +--- +name: cis-gcp-foundations-4.9 +description: "Ensure That Compute Instances Do Not Have Public IP Addresses" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, compute, virtual-machines, service-accounts] +cis_id: "4.9" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.9 Ensure That Compute Instances Do Not Have Public IP Addresses (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Compute instances should not be configured to have external IP addresses. + +## Rationale + +To reduce your attack surface, Compute instances should not have public IP addresses. Instead, instances should be configured behind load balancers, to minimize the instance's exposure to the internet. + +## Impact + +Removing the external IP address from your Compute instance may cause some applications to stop working. + +## Audit + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. For every VM, ensure that there is no `External IP` configured. + +### From Google Cloud CLI + +``` +gcloud compute instances list --format=json +``` + +1. The output should not contain an `accessConfigs` section under `networkInterfaces`. Note that the `natIP` value is present only for instances that are running or for instances that are stopped but have a static IP address. For instances that are stopped and are configured to have an ephemeral public IP address, the `natIP` field will not be present. Example output: + +```yaml +networkInterfaces: + - accessConfigs: + - kind: compute#accessConfig + name: External NAT + networkTier: STANDARD + type: ONE_TO_ONE_NAT +``` + +## Exception + +Instances created by GKE should be excluded because some of them have external IP addresses and cannot be changed by editing the instance settings. Instances created by GKE should be excluded. These instances have names that start with "gke-" and are labeled "goog-gke-node". + +## Remediation + +### From Google Cloud Console + +1. Go to the `VM instances` page by visiting: https://console.cloud.google.com/compute/instances. +2. Click on the instance name to go the the `Instance detail page`. +3. Click `Edit`. +4. For each Network interface, ensure that `External IP` is set to `None`. +5. Click `Done` and then click `Save`. + +### From Google Cloud CLI + +1. Describe the instance properties: + +``` +gcloud compute instances describe --zone= +``` + +2. Identify the access config name that contains the external IP address. This access config appears in the following format: + +```yaml +networkInterfaces: + - accessConfigs: + - kind: compute#accessConfig + name: External NAT + natIP: 130.211.181.55 + type: ONE_TO_ONE_NAT +``` + +3. Delete the access config: + +``` +gcloud compute instances delete-access-config --zone= --access-config-name +``` + +In the above example, the `ACCESS_CONFIG_NAME` is `External NAT`. The name of your access config might be different. + +## Prevention + +You can configure the `Define allowed external IPs for VM instances` Organization Policy to prevent VMs from being configured with public IP addresses. Learn more at: https://console.cloud.google.com/orgpolicies/compute-vmExternalIpAccess. + +## Default Value + +By default, Compute instances have a public IP address. + +## References + +1. https://cloud.google.com/load-balancing/docs/backend-service#backends_and_external_ip_addresses +2. https://cloud.google.com/compute/docs/instances/connecting-advanced#sshbetweeninstances +3. https://cloud.google.com/compute/docs/instances/connecting-to-instance +4. https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address#unassign_ip +5. https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints + +## Additional Information + +You can connect to Linux VMs that do not have public IP addresses by using Identity-Aware Proxy for TCP forwarding. Learn more at https://cloud.google.com/compute/docs/instances/connecting-advanced#sshbetweeninstances. + +For Windows VMs, see https://cloud.google.com/compute/docs/instances/connecting-to-instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | X | X | X | +| v7 | 14.6 Protect Information through Access Control Lists | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-5.1/SKILL.md new file mode 100644 index 0000000000..400ea111a6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-5.1/SKILL.md @@ -0,0 +1,118 @@ +--- +name: cis-gcp-foundations-5.1 +description: "Ensure That Cloud Storage Bucket Is Not Anonymously or Publicly Accessible" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, storage, cloud-storage] +cis_id: "5.1" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1 Ensure That Cloud Storage Bucket Is Not Anonymously or Publicly Accessible (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended that IAM policy on Cloud Storage bucket does not allows anonymous or public access. + +## Rationale + +Allowing anonymous or public access grants permissions to anyone to access bucket content. Such access might not be desired if you are storing any sensitive data. Hence, ensure that anonymous or public access to a bucket is not allowed. + +## Impact + +No storage buckets would be publicly accessible. You would have to explicitly administer bucket access. + +## Audit + +### From Google Cloud Console + +1. Go to `Storage browser` by visiting https://console.cloud.google.com/storage/browser. +2. Click on each bucket name to go to its `Bucket details` page. +3. Click on the `Permissions` tab. +4. Ensure that `allUsers` and `allAuthenticatedUsers` are not in the `Members` list. + +### From Google Cloud CLI + +1. List all buckets in a project + +``` +gsutil ls +``` + +2. Check the IAM Policy for each bucket: + +``` +gsutil iam get gs://BUCKET_NAME +``` + +No role should contain `allUsers` and/or `allAuthenticatedUsers` as a member. + +### Using Rest API + +1. List all buckets in a project + +``` +Get https://www.googleapis.com/storage/v1/b?project= +``` + +2. Check the IAM Policy for each bucket + +``` +GET https://www.googleapis.com/storage/v1/b//iam +``` + +No role should contain `allUsers` and/or `allAuthenticatedUsers` as a member. + +## Remediation + +### From Google Cloud Console + +1. Go to `Storage browser` by visiting https://console.cloud.google.com/storage/browser. +2. Click on the bucket name to go to its `Bucket details` page. +3. Click on the `Permissions` tab. +4. Click `Delete` button in front of `allUsers` and `allAuthenticatedUsers` to remove that particular role assignment. + +### From Google Cloud CLI + +Remove `allUsers` and `allAuthenticatedUsers` access. + +``` +gsutil iam ch -d allUsers gs://BUCKET_NAME +gsutil iam ch -d allAuthenticatedUsers gs://BUCKET_NAME +``` + +## Prevention + +You can prevent Storage buckets from becoming publicly accessible by setting up the `Domain restricted sharing` organization policy at: +https://console.cloud.google.com/iam-admin/orgpolicies/iam-allowedPolicyMemberDomains + +## Default Value + +By Default, Storage buckets are not publicly shared. + +## References + +1. https://cloud.google.com/storage/docs/access-control/iam-reference +2. https://cloud.google.com/storage/docs/access-control/making-data-public +3. https://cloud.google.com/storage/docs/gsutil/commands/iam + +## Additional Information + +To implement Access restrictions on buckets, configuring Bucket IAM is preferred way than configuring Bucket ACL. On GCP console, "Edit Permissions" for bucket exposes IAM configurations only. Bucket ACLs are configured automatically as per need in order to implement/support User enforced Bucket IAM policy. In-case administrator changes bucket ACL using command-line(gsutils)/API bucket IAM also gets updated automatically. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | | x | x | +| v7 | 12.4 Deny Communication over Unauthorized Ports | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-5.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-5.2/SKILL.md new file mode 100644 index 0000000000..27c1e39410 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-5.2/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-gcp-foundations-5.2 +description: "Ensure That Cloud Storage Buckets Have Uniform Bucket-Level Access Enabled" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, storage, cloud-storage] +cis_id: "5.2" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.2 Ensure That Cloud Storage Buckets Have Uniform Bucket-Level Access Enabled (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +It is recommended that uniform bucket-level access is enabled on Cloud Storage buckets. + +## Rationale + +It is recommended to use uniform bucket-level access to unify and simplify how you grant access to your Cloud Storage resources. + +Cloud Storage offers two systems for granting users permission to access your buckets and objects: Cloud Identity and Access Management (Cloud IAM) and Access Control Lists (ACLs). These systems act in parallel - in order for a user to access a Cloud Storage resource, only one of the systems needs to grant the user permission. Cloud IAM is used throughout Google Cloud and allows you to grant a variety of permissions at the bucket and project levels. ACLs are used only by Cloud Storage and have limited permission options, but they allow you to grant permissions on a per-object basis. + +In order to support a uniform permissioning system, Cloud Storage has uniform bucket-level access. Using this feature disables ACLs for all Cloud Storage resources: access to Cloud Storage resources then is granted exclusively through Cloud IAM. Enabling uniform bucket-level access guarantees that if a Storage bucket is not publicly accessible, no object in the bucket is publicly accessible either. + +## Impact + +If you enable uniform bucket-level access, you revoke access from users who gain their access solely through object ACLs. + +Certain Google Cloud services, such as Stackdriver, Cloud Audit Logs, and Datastore, cannot export to Cloud Storage buckets that have uniform bucket-level access enabled. + +## Audit + +### From Google Cloud Console + +1. Open the Cloud Storage browser in the Google Cloud Console by visiting: https://console.cloud.google.com/storage/browser +2. For each bucket, make sure that `Access control` column has the value `Uniform`. + +### From Google Cloud CLI + +1. List all buckets in a project + +``` +gsutil ls +``` + +2. For each bucket, verify that uniform bucket-level access is enabled. + +``` +gsutil uniformbucketlevelaccess get gs://BUCKET_NAME/ +``` + +If uniform bucket-level access is enabled, the response looks like: + +``` +Uniform bucket-level access setting for gs://BUCKET_NAME/: + Enabled: True + LockedTime: LOCK_DATE +``` + +## Remediation + +### From Google Cloud Console + +1. Open the Cloud Storage browser in the Google Cloud Console by visiting: https://console.cloud.google.com/storage/browser +2. In the list of buckets, click on the name of the desired bucket. +3. Select the `Permissions` tab near the top of the page. +4. In the text box that starts with `This bucket uses fine-grained access control...`, click `Edit`. +5. In the pop-up menu that appears, select `Uniform`. +6. Click `Save`. + +### From Google Cloud CLI + +Use the on option in a uniformbucketlevelaccess set command: + +``` +gsutil uniformbucketlevelaccess set on gs://BUCKET_NAME/ +``` + +## Prevention + +You can set up an Organization Policy to enforce that any new bucket has uniform bucket level access enabled. Learn more at: +https://cloud.google.com/storage/docs/setting-org-policies#uniform-bucket + +## Default Value + +By default, Cloud Storage buckets do not have uniform bucket-level access enabled. + +## References + +1. https://cloud.google.com/storage/docs/uniform-bucket-level-access +2. https://cloud.google.com/storage/docs/using-uniform-bucket-level-access +3. https://cloud.google.com/storage/docs/setting-org-policies#uniform-bucket + +## Additional Information + +Uniform bucket-level access can no longer be disabled if it has been active on a bucket for 90 consecutive days. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.1.1/SKILL.md new file mode 100644 index 0000000000..77e22fd420 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.1.1/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-gcp-foundations-6.1.1 +description: "Ensure That a MySQL Instance Does Not Allow Anyone To Connect With Administrative Privileges" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, mysql] +cis_id: "6.1.1" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.1 Ensure That a MySQL Instance Does Not Allow Anyone To Connect With Administrative Privileges (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to set a password for the administrative user (`root` by default) to prevent unauthorized access to the SQL database instances. + +This recommendation is applicable only for MySQL Instances. PostgreSQL does not offer any setting for No Password from the cloud console. + +## Rationale + +At the time of MySQL Instance creation, not providing an administrative password allows anyone to connect to the SQL database instance with administrative privileges. The root password should be set to ensure only authorized users have these privileges. + +## Impact + +Connection strings for administrative clients need to be reconfigured to use a password. + +## Audit + +### From Google Cloud CLI + +1. List All SQL database instances of type MySQL: + +``` +gcloud sql instances list --filter='DATABASE_VERSION:MYSQL*' --project --format="(NAME,PRIMARY_ADDRESS)" +``` + +2. For every MySQL instance try to connect using the `PRIMARY_ADDRESS`, if available: + +``` +mysql -u root -h +``` + +The command should return either an error message or a password prompt. Sample Error message: + +``` +ERROR 1045 (28000): Access denied for user 'root'@'' (using password: NO) +``` + +If a command produces the `mysql>` prompt, the MySQL instance allows anyone to connect with administrative privileges without needing a password. + +Note: The `No Password` setting is exposed only at the time of MySQL instance creation. Once the instance is created, the Google Cloud Platform Console does not expose the set to confirm whether a password for an administrative user is set to a MySQL instance. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Platform Console using https://console.cloud.google.com/sql/ +2. Select the instance to open its Overview page. +3. Select `Access Control` > `Users`. +4. Click the `More actions icon` for the user to be updated. +5. Select `Change password`, specify a `New password`, and click `OK`. + +### From Google Cloud CLI + +1. Set a password to a MySql instance: + +``` +gcloud sql users set-password root --host= --instance= --prompt-for-password +``` + +2. A prompt will appear, requiring the user to enter a password: + +``` +Instance Password: +``` + +3. With a successful password configured, the following message should be seen: + +``` +Updating Cloud SQL user...done. +``` + +## Default Value + +From the Google Cloud Platform Console, the `Create Instance` workflow enforces the rule to enter the root password unless the option `No Password` is selected explicitly. + +## References + +1. https://cloud.google.com/sql/docs/mysql/create-manage-users +2. https://cloud.google.com/sql/docs/mysql/create-instance + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.7 Manage Default Accounts on Enterprise Assets and Software | x | x | x | +| v7 | 4.2 Change Default Passwords | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.1.2/SKILL.md new file mode 100644 index 0000000000..32d901b13b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.1.2/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-gcp-foundations-6.1.2 +description: "Ensure 'Skip_show_database' Database Flag for Cloud SQL MySQL Instance Is Set to 'On'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, mysql] +cis_id: "6.1.2" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.2 Ensure 'Skip_show_database' Database Flag for Cloud SQL MySQL Instance Is Set to 'On' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to set `skip_show_database` database flag for Cloud SQL Mysql instance to `on`. + +## Rationale + +`skip_show_database` database flag prevents people from using the SHOW DATABASES statement if they do not have the SHOW DATABASES privilege. This can improve security if you have concerns about users being able to see databases belonging to other users. Its effect depends on the SHOW DATABASES privilege: If the variable value is ON, the SHOW DATABASES statement is permitted only to users who have the SHOW DATABASES privilege, and the statement displays all database names. If the value is OFF, SHOW DATABASES is permitted to all users, but displays the names of only those databases for which the user has the SHOW DATABASES or other privilege. This recommendation is applicable to Mysql database instances. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page +3. Ensure the database flag `skip_show_database` that has been set is listed under the `Database flags` section. + +### From Google Cloud CLI + +1. List all Cloud SQL database Instances + +``` +gcloud sql instances list +``` + +2. Ensure the below command returns `on` for every Cloud SQL Mysql database instance + +``` +gcloud sql instances describe --format=json | jq '.settings.databaseFlags[] | select(.name=="skip_show_database")|.value' +``` + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the Mysql instance for which you want to enable to database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add a Database Flag`, choose the flag `skip_show_database` from the drop-down menu, and set its value to `on`. +6. Click `Save` to save your changes. +7. Confirm your changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. List all Cloud SQL database Instances + +``` +gcloud sql instances list +``` + +2. Configure the `skip_show_database` database flag for every Cloud SQL Mysql database instance using the below command. + +``` +gcloud sql instances patch --database-flags skip_show_database=on +``` + +Note: +This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## References + +1. https://cloud.google.com/sql/docs/mysql/flags +2. https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_skip_show_database + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/mysql/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability, and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines." + +Note: Configuring the above flag restarts the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.1.3/SKILL.md new file mode 100644 index 0000000000..e6cd8b9f71 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.1.3/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-gcp-foundations-6.1.3 +description: "Ensure That the 'Local_infile' Database Flag for a Cloud SQL MySQL Instance Is Set to 'Off'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, mysql] +cis_id: "6.1.3" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.3 Ensure That the 'Local_infile' Database Flag for a Cloud SQL MySQL Instance Is Set to 'Off' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to set the `local_infile` database flag for a Cloud SQL MySQL instance to `off`. + +## Rationale + +The `local_infile` flag controls the server-side LOCAL capability for LOAD DATA statements. Depending on the `local_infile` setting, the server refuses or permits local data loading by clients that have LOCAL enabled on the client side. + +To explicitly cause the server to refuse LOAD DATA LOCAL statements (regardless of how client programs and libraries are configured at build time or runtime), start mysqld with local_infile disabled. local_infile can also be set at runtime. + +Due to security issues associated with the `local_infile` flag, it is recommended to disable it. This recommendation is applicable to MySQL database instances. + +## Impact + +Disabling `local_infile` makes the server refuse local data loading by clients that have LOCAL enabled on the client side. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page +3. Ensure the database flag `local_infile` that has been set is listed under the `Database flags` section. + +### From Google Cloud CLI + +1. List all Cloud SQL database instances: + +``` +gcloud sql instances list +``` + +2. Ensure the below command returns `off` for every Cloud SQL MySQL database instance. + +``` +gcloud sql instances describe --format=json | jq '.settings.databaseFlags[] | select(.name=="local_infile")|.value' +``` + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the MySQL instance where the database flag needs to be enabled. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add a Database Flag`, choose the flag `local_infile` from the drop-down menu, and set its value to `off`. +6. Click `Save`. +7. Confirm the changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. List all Cloud SQL database instances using the following command: + +``` +gcloud sql instances list +``` + +2. Configure the `local_infile` database flag for every Cloud SQL Mysql database instance using the below command: + +``` +gcloud sql instances patch --database-flags local_infile=off +``` + +Note: +This command will overwrite all database flags that were previously set. To keep those and add new ones, include the values for all flags to be set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default `local_infile` is `on`. + +## References + +1. https://cloud.google.com/sql/docs/mysql/flags +2. https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_local_infile +3. https://dev.mysql.com/doc/refman/5.7/en/load-data-local.html + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/mysql/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability, and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines." + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 16.7 Use Standard Hardening Configuration Templates for Application Infrastructure | | x | x | +| v7 | 0.0 Explicitly Not Mapped | | | | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.1/SKILL.md new file mode 100644 index 0000000000..f282cf97f3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.1/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-gcp-foundations-6.2.1 +description: "Ensure 'Log_error_verbosity' Database Flag for Cloud SQL PostgreSQL Instance Is Set to 'DEFAULT' or Stricter" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, postgresql] +cis_id: "6.2.1" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.1 Ensure 'Log_error_verbosity' Database Flag for Cloud SQL PostgreSQL Instance Is Set to 'DEFAULT' or Stricter (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +The `log_error_verbosity` flag controls the verbosity/details of messages logged. Valid values are: + +- `TERSE` +- `DEFAULT` +- `VERBOSE` + +`TERSE` excludes the logging of `DETAIL`, `HINT`, `QUERY`, and `CONTEXT` error information. + +`VERBOSE` output includes the `SQLSTATE` error code, source code file name, function name, and line number that generated the error. + +Ensure an appropriate value is set to 'DEFAULT' or stricter. + +## Rationale + +Auditing helps in troubleshooting operational problems and also permits forensic analysis. If `log_error_verbosity` is not set to the correct value, too many details or too few details may be logged. This flag should be configured with a value of 'DEFAULT' or stricter. This recommendation is applicable to PostgreSQL database instances. + +## Impact + +Turning on logging will increase the required storage over time. Mismanaged logs may cause your storage costs to increase. Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page +3. Go to `Configuration` card +4. Under `Database flags`, check the value of `log_error_verbosity` flag is set to 'DEFAULT' or stricter. + +### From Google Cloud CLI + +1. Use the below command for every Cloud SQL PostgreSQL database instance to verify the value of `log_error_verbosity` + +``` +gcloud sql instances describe [INSTANCE_NAME] --format=json | jq '.settings.databaseFlags[] | select(.name=="log_error_verbosity")|.value' +``` + +In the output, database flags are listed under the settings as the collection databaseFlags. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the PostgreSQL instance for which you want to enable the database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add a Database Flag`, choose the flag `log_error_verbosity` from the drop-down menu and set appropriate value. +6. Click `Save` to save your changes. +7. Confirm your changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the log_error_verbosity database flag for every Cloud SQL PosgreSQL database instance using the below command. + +``` +gcloud sql instances patch INSTANCE_NAME --database-flags log_error_verbosity= +``` + +Note: This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default `log_error_verbosity` is `DEFAULT`. + +## References + +1. https://cloud.google.com/sql/docs/postgres/flags +2. https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-ERROR-VERBOSITY + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/postgres/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag does not require restarting the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.2/SKILL.md new file mode 100644 index 0000000000..755321e376 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.2/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-gcp-foundations-6.2.2 +description: "Ensure 'Log_connections' Database Flag for Cloud SQL PostgreSQL Instance Is Set to 'On'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, postgresql] +cis_id: "6.2.2" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.2 Ensure That the 'Log_connections' Database Flag for Cloud SQL PostgreSQL Instance Is Set to 'On' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enabling the `log_connections` setting causes each attempted connection to the server to be logged, along with successful completion of client authentication. This parameter cannot be changed after the session starts. + +## Rationale + +PostgreSQL does not log attempted connections by default. Enabling the `log_connections` setting will create log entries for each attempted connection as well as successful completion of client authentication which can be useful in troubleshooting issues and to determine any unusual connection attempts to the server. This recommendation is applicable to PostgreSQL database instances. + +## Impact + +Turning on logging will increase the required storage over time. Mismanaged logs may cause your storage costs to increase. Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page. +3. Go to the `Configuration` card. +4. Under `Database flags`, check the value of `log_connections` flag to determine if it is configured as expected. + +### From Google Cloud CLI + +1. Ensure the below command returns `on` for every Cloud SQL PostgreSQL database instance: + +``` +gcloud sql instances describe [INSTANCE_NAME] --format=json | jq '.settings.databaseFlags[] | select(.name=="log_connections")|.value' +``` + +In the output, database flags are listed under the `settings` as the collection `databaseFlags`. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the PostgreSQL instance for which you want to enable the database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add a Database Flag`, choose the flag `log_connections` from the drop-down menu and set the value as `on`. +6. Click `Save`. +7. Confirm the changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the `log_connections` database flag for every Cloud SQL PosgreSQL database instance using the below command. + +``` +gcloud sql instances patch --database-flags "log_connections"=on +``` + +Note: +This command will overwrite all previously set database flags. To keep those and add new ones, include the values for all flags to be set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default `log_connections` is `off`. + +## References + +1. https://cloud.google.com/sql/docs/postgres/flags +2. https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-CONNECTIONS + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/postgres/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability and remove the instance from the Cloud SQL SLA. For information about these flags, see the Operational Guidelines. + +Note: Configuring the above flag does not require restarting the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.3/SKILL.md new file mode 100644 index 0000000000..c84641cd0b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.3/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-gcp-foundations-6.2.3 +description: "Ensure 'Log_disconnections' Database Flag for Cloud SQL PostgreSQL Instance Is Set to 'On'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, postgresql] +cis_id: "6.2.3" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.3 Ensure That the 'Log_disconnections' Database Flag for Cloud SQL PostgreSQL Instance Is Set to 'On' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enabling the `log_disconnections` setting logs the end of each session, including the session duration. + +## Rationale + +PostgreSQL does not log session details such as duration and session end by default. Enabling the `log_disconnections` setting will create log entries at the end of each session which can be useful in troubleshooting issues and determine any unusual activity across a time period. The `log_disconnections` and `log_connections` work hand in hand and generally, the pair would be enabled/disabled together. This recommendation is applicable to PostgreSQL database instances. + +## Impact + +Turning on logging will increase the required storage over time. Mismanaged logs may cause your storage costs to increase. Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page +3. Go to the `Configuration` card. +4. Under `Database flags`, check the value of `log_disconnections` flag is configured as expected. + +### From Google Cloud CLI + +1. Ensure the below command returns `on` for every Cloud SQL PostgreSQL database instance: + +``` +gcloud sql instances list --format=json | jq '.[].settings.databaseFlags[] | select(.name=="log_disconnections")|.value' +``` + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the PostgreSQL instance where the database flag needs to be enabled. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add a Database Flag`, choose the flag `log_disconnections` from the drop-down menu and set the value as `on`. +6. Click `Save`. +7. Confirm the changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the `log_disconnections` database flag for every Cloud SQL PosgreSQL database instance using the below command: + +``` +gcloud sql instances patch --database-flags log_disconnections=on +``` + +Note: This command will overwrite all previously set database flags. To keep those and add new ones, include the values for all flags to be set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default `log_disconnections` is off. + +## References + +1. https://cloud.google.com/sql/docs/postgres/flags +2. https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-DISCONNECTIONS + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/postgres/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag does not require restarting the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.4/SKILL.md new file mode 100644 index 0000000000..7a09d2d3b8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.4/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-gcp-foundations-6.2.4 +description: "Ensure 'Log_statement' Database Flag for Cloud SQL PostgreSQL Instance Is Set Appropriately" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, postgresql] +cis_id: "6.2.4" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.4 Ensure 'Log_statement' Database Flag for Cloud SQL PostgreSQL Instance Is Set Appropriately (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +The value of `log_statement` flag determined the SQL statements that are logged. Valid values are: + +- `none` +- `ddl` +- `mod` +- `all` + +The value `ddl` logs all data definition statements. The value `mod` logs all ddl statements, plus data-modifying statements. + +The statements are logged after a basic parsing is done and statement type is determined, thus this does not logs statements with errors. When using extended query protocol, logging occurs after an Execute message is received and values of the Bind parameters are included. + +A value of 'ddl' is recommended unless otherwise directed by your organization's logging policy. + +## Rationale + +Auditing helps in forensic analysis. If `log_statement` is not set to the correct value, too many statements may be logged leading to issues in finding the relevant information from the logs, or too few statements may be logged with relevant information missing from the logs. Setting log_statement to align with your organization's security and logging policies facilitates later auditing and review of database activities. This recommendation is applicable to PostgreSQL database instances. + +## Impact + +Turning on logging will increase the required storage over time. Mismanaged logs may cause your storage costs to increase. Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page +3. Go to `Configuration` card +4. Under `Database flags`, check the value of `log_statement` flag is set to appropriately. + +### From Google Cloud CLI + +1. Use the below command for every Cloud SQL PostgreSQL database instance to verify the value of `log_statement` + +``` +gcloud sql instances list --format=json | jq '.[].settings.databaseFlags[] | select(.name=="log_statement")|.value' +``` + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the PostgreSQL instance for which you want to enable the database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add a Database Flag`, choose the flag `log_statement` from the drop-down menu and set appropriate value. +6. Click `Save` to save your changes. +7. Confirm your changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the `log_statement` database flag for every Cloud SQL PosgreSQL database instance using the below command. + +``` +gcloud sql instances patch --database-flags log_statement= +``` + +Note: This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +`none` + +## References + +1. https://cloud.google.com/sql/docs/postgres/flags +2. https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-STATEMENT + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/postgres/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag does not require restarting the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.5/SKILL.md new file mode 100644 index 0000000000..af0e225a28 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.5/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-gcp-foundations-6.2.5 +description: "Ensure That the 'Log_min_messages' Flag for a Cloud SQL PostgreSQL Instance Is Set at Minimum to 'Warning'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, postgresql] +cis_id: "6.2.5" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.5 Ensure That the 'Log_min_messages' Flag for a Cloud SQL PostgreSQL Instance Is Set at Minimum to 'Warning' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +The `log_min_messages` flag defines the minimum message severity level that is considered as an error statement. Messages for error statements are logged with the SQL statement. Valid values include (from lowest to highest severity) `DEBUG5`, `DEBUG4`, `DEBUG3`, `DEBUG2`, `DEBUG1`, `INFO`, `NOTICE`, `WARNING`, `ERROR`, `LOG`, `FATAL`, and `PANIC`. Each severity level includes the subsequent levels mentioned above. ERROR is considered the best practice setting. Changes should only be made in accordance with the organization's logging policy. + +## Rationale + +Auditing helps in troubleshooting operational problems and also permits forensic analysis. If `log_min_messages` is not set to the correct value, messages may not be classified as error messages appropriately. Setting the threshold to 'Warning' will log messages for the most needed error messages. + +This recommendation is applicable to PostgreSQL database instances. + +## Impact + +Setting the threshold too low will might result in increased log storage size and length, making it difficult to find actual errors. Higher severity levels may cause errors needed to troubleshoot to not be logged. An organization will need to decide their own threshold for logging `log_min_messages` flag. + +Note: To effectively turn off logging failing statements, set this parameter to PANIC. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page. +3. Go to the `Configuration` card. +4. Under `Database flags`, check the value of `log_min_messages` flag is set to `warning` or higher (WARNING|ERROR|LOG|FATAL|PANIC). + +### From Google Cloud CLI + +1. Use the below command for every Cloud SQL PostgreSQL database instance to verify that the value of `log_min_messages` is set to `warning` or higher. + +``` +gcloud sql instances describe [INSTANCE_NAME] --format=json | jq '.settings.databaseFlags[] | select(.name=="log_min_messages")|.value' +``` + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances +2. Select the PostgreSQL instance for which you want to enable the database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add a Database Flag`, choose the flag `log_min_messages` from the drop-down menu and set appropriate value. +6. Click `Save` to save the changes. +7. Confirm the changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the `log_min_messages` database flag for every Cloud SQL PosgreSQL database instance using the below command. + +``` +gcloud sql instances patch --database-flags log_min_messages= +``` + +Note: This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default `log_min_messages` is `ERROR`. + +## References + +1. https://cloud.google.com/sql/docs/postgres/flags +2. https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-MIN-MESSAGES + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/postgres/flags - to see if your instance will be restarted when this patch is submitted. + +Note: Some database flag settings can affect instance availability or stability and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag does not require restarting the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.6/SKILL.md new file mode 100644 index 0000000000..d561d35294 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.6/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-gcp-foundations-6.2.6 +description: "Ensure 'Log_min_error_statement' Database Flag for Cloud SQL PostgreSQL Instance Is Set to 'Error' or Stricter" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, postgresql] +cis_id: "6.2.6" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.6 Ensure 'Log_min_error_statement' Database Flag for Cloud SQL PostgreSQL Instance Is Set to 'Error' or Stricter (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +The `log_min_error_statement` flag defines the minimum message severity level that are considered as an error statement. Messages for error statements are logged with the SQL statement. Valid values include (from lowest to highest severity) `DEBUG5`, `DEBUG4`, `DEBUG3`, `DEBUG2`, `DEBUG1`, `INFO`, `NOTICE`, `WARNING`, `ERROR`, `LOG`, `FATAL`, and `PANIC`. Each severity level includes the subsequent levels mentioned above. Ensure a value of `ERROR` or stricter is set. + +## Rationale + +Auditing helps in troubleshooting operational problems and also permits forensic analysis. If `log_min_error_statement` is not set to the correct value, messages may not be classified as error messages appropriately. Considering general log messages as error messages would make is difficult to find actual errors and considering only stricter severity levels as error messages may skip actual errors to log their SQL statements. The `log_min_error_statement` flag should be set to `ERROR` or stricter. This recommendation is applicable to PostgreSQL database instances. + +## Impact + +Turning on logging will increase the required storage over time. Mismanaged logs may cause your storage costs to increase. Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page +3. Go to `Configuration` card +4. Under `Database flags`, check the value of `log_min_error_statement` flag is configured as to `ERROR` or stricter. + +### From Google Cloud CLI + +1. Use the below command for every Cloud SQL PostgreSQL database instance to verify the value of `log_min_error_statement` is set to `ERROR` or stricter. + +``` +gcloud sql instances describe --format=json | jq '.[].settings.databaseFlags[] | select(.name=="log_min_error_statement")|.value' +``` + +In the output, database flags are listed under the `settings` as the collection `databaseFlags`. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the PostgreSQL instance for which you want to enable the database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add item`, choose the flag `log_min_error_statement` from the drop-down menu and set appropriate value. +6. Click `Save` to save your changes. +7. Confirm your changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the `log_min_error_statement` database flag for every Cloud SQL PosgreSQL database instance using the below command. + +``` +gcloud sql instances patch --database-flags log_min_error_statement= +``` + +Note: This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default `log_min_error_statement` is `ERROR`. + +## References + +1. https://cloud.google.com/sql/docs/postgres/flags +2. https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-MIN-ERROR-STATEMENT + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/postgres/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag does not require restarting the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.7/SKILL.md new file mode 100644 index 0000000000..1ebdeb19e2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.7/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-gcp-foundations-6.2.7 +description: "Ensure 'Log_min_duration_statement' Database Flag for Cloud SQL PostgreSQL Instance Is Set to '-1' (Disabled)" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, postgresql] +cis_id: "6.2.7" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.7 Ensure That the 'Log_min_duration_statement' Database Flag for Cloud SQL PostgreSQL Instance Is Set to '-1' (Disabled) (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +The `log_min_duration_statement` flag defines the minimum amount of execution time of a statement in milliseconds where the total duration of the statement is logged. Ensure that `log_min_duration_statement` is disabled, i.e., a value of `-1` is set. + +## Rationale + +Logging SQL statements may include sensitive information that should not be recorded in logs. This recommendation is applicable to PostgreSQL database instances. + +## Impact + +Turning on logging will increase the required storage over time. Mismanaged logs may cause your storage costs to increase. Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page. +3. Go to the `Configuration` card. +4. Under `Database flags`, check that the value of `log_min_duration_statement` flag is set to `-1`. + +### From Google Cloud CLI + +1. Use the below command for every Cloud SQL PostgreSQL database instance to verify the value of `log_min_duration_statement` is set to `-1`. + +``` +gcloud sql instances describe --format=json| jq '.settings.databaseFlags[] | select(.name=="log_min_duration_statement")|.value' +``` + +In the output, database flags are listed under the `settings` as the collection `databaseFlags`. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the PostgreSQL instance where the database flag needs to be enabled. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add item`, choose the flag `log_min_duration_statement` from the drop-down menu and set a value of `-1`. +6. Click `Save`. +7. Confirm the changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. List all Cloud SQL database instances using the following command: + +``` +gcloud sql instances list +``` + +2. Configure the `log_min_duration_statement` flag for every Cloud SQL PosgreSQL database instance using the below command: + +``` +gcloud sql instances patch --database-flags log_min_duration_statement=-1 +``` + +Note: This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default `log_min_duration_statement` is `-1`. + +## References + +1. https://cloud.google.com/sql/docs/postgres/flags +2. https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-MIN-DURATION-STATEMENT + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/postgres/flags - to see if your instance will be restarted when this patch is submitted. + +Note: Some database flag settings can affect instance availability or stability and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag does not require restarting the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.8/SKILL.md new file mode 100644 index 0000000000..5bb8b0d67d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.2.8/SKILL.md @@ -0,0 +1,180 @@ +--- +name: cis-gcp-foundations-6.2.8 +description: "Ensure 'cloudsql.enable_pgaudit' Database Flag for each Cloud SQL PostgreSQL Instance Is Set to 'on' For Centralized Logging" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, postgresql] +cis_id: "6.2.8" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.8 Ensure That 'cloudsql.enable_pgaudit' Database Flag for each Cloud Sql Postgresql Instance Is Set to 'on' For Centralized Logging (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Ensure `cloudsql.enable_pgaudit` database flag for Cloud SQL PostgreSQL instance is set to `on` to allow for centralized logging. + +## Rationale + +As numerous other recommendations in this section consist of turning on flags for logging purposes, your organization will need a way to manage these logs. You may have a solution already in place. If you do not, consider installing and enabling the open source pgaudit extension within PostgreSQL and enabling its corresponding flag of `cloudsql.enable_pgaudit`. This flag and installing the extension enables database auditing in PostgreSQL through the open-source pgAudit extension. This extension provides detailed session and object logging to comply with government, financial, & ISO standards and provides auditing capabilities to mitigate threats by monitoring security events on the instance. Enabling the flag and settings later in this recommendation will send these logs to Google Logs Explorer so that you can access them in a central location. This recommendation is applicable only to PostgreSQL database instances. + +## Impact + +Enabling the pgAudit extension can lead to increased data storage requirements and to ensure durability of pgAudit log records in the event of unexpected storage issues, it is recommended to enable the `Enable automatic storage increases` setting on the instance. Enabling flags via the command line will also overwrite all existing flags, so you should apply all needed flags in the CLI command. Also flags may require a restart of the server to be implemented or will break existing functionality so update your servers at a time of low usage. + +## Audit + +### Determining if the pgAudit Flag is set to 'on' + +#### From Google Cloud Console + +1. Go to https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Overview` page. +3. Click `Edit`. +4. Scroll down and expand `Flags`. +5. Ensure that `cloudsql.enable_pgaudit` flag is set to `on`. + +#### From Google Cloud CLI + +Run the command by providing ``. Ensure the value of the flag is `on`. + +``` +gcloud sql instances describe --format="json" | jq '.settings|.| .databaseFlags[]|select(.name=="cloudsql.enable_pgaudit")|.value' +``` + +### Determine if the pgAudit extension is installed + +1. Connect to the the server running PostgreSQL or through a SQL client of your choice. +2. Run the following command + +```sql +SELECT * +FROM pg_extension; +``` + +3. If pgAudit is in this list. If so, it is installed. + +### Determine if Data Access Audit logs are enabled for your project and have sufficient privileges + +1. From the homepage open the hamburger menu in the top left. +2. Scroll down to `IAM & Admin` and hover over it. +3. In the menu that opens up, select `Audit Logs` +4. In the middle of the page, in the search box next to `filter` search for `Cloud Composer API` +5. Select it, and ensure that both 'Admin Read' and 'Data Read' are checked. + +### Determine if logs are being sent to Logs Explorer + +1. From the Google Console home page, open the hamburger menu in the top left. +2. In the menu that pops open, scroll down to Logs Explorer under Operations. +3. In the query box, paste the following and search + +``` +resource.type="cloudsql_database" +logName="projects//logs/cloudaudit.googleapis.com%2Fdata_access" +protoPayload.request.@type="type.googleapis.com/google.cloud.sql.audit.v1.PgAuditEntry" +``` + +4. If it returns any log sources, they are correctly setup. + +## Remediation + +### Initialize the pgAudit flag + +#### From Google Cloud Console + +1. Go to https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Overview` page. +3. Click `Edit`. +4. Scroll down and expand `Flags`. +5. To set a flag that has not been set on the instance before, click `Add item`. +6. Enter `cloudsql.enable_pgaudit` for the flag name and set the flag to `on`. +7. Click `Done`. +8. Click `Save` to update the configuration. +9. Confirm your changes under `Flags` on the `Overview` page. + +#### From Google Cloud CLI + +Run the below command by providing `` to enable `cloudsql.enable_pgaudit` flag. + +``` +gcloud sql instances patch --database-flags cloudsql.enable_pgaudit=on +``` + +Note: `RESTART` is required to get this configuration in effect. + +### Creating the extension + +1. Connect to the the server running PostgreSQL or through a SQL client of your choice. +2. Run the following command as a superuser. + +```sql +CREATE EXTENSION pgaudit; +``` + +### Updating the previously created pgaudit.log flag for your Logging Needs + +#### From Console + +Note: there are multiple options here. This command will enable logging for all databases on a server. Please see the customizing database audit logging reference for more flag options. + +1. Go to https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Overview` page. +3. Click `Edit`. +4. Scroll down and expand `Flags`. +5. To set a flag that has not been set on the instance before, click `Add item`. +6. Enter `pgaudit.log=all` for the flag name and set the flag to `on`. +7. Click `Done`. +8. Click `Save` to update the configuration. +9. Confirm your changes under `Flags` on the `Overview` page. + +#### From Command Line + +Run the command + +``` +gcloud sql instances patch --database-flags cloudsql.enable_pgaudit=on,pgaudit.log=all +``` + +Note: This command will overwrite all previously set database flags. To keep those and add new ones, include the values for all flags to be set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +### Enabling Auditing for the Project + +#### From Console + +1. Go to https://console.cloud.google.com/iam-admin/audit. +2. In the middle of the page in the search box next to `filter`, search for `Cloud Composer API`. +3. Select `Cloud Composer API`. +4. Select both `Admin Read` and `Data Read` checkboxes. +5. Click `Save`. + +## Default Value + +By default `cloudsql.enable_pgaudit` is `off`. + +## References + +1. https://cloud.google.com/sql/docs/postgres/pg-audit +2. https://cloud.google.com/sql/docs/postgres/flags + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/postgres/flags - to see if your instance will be restarted when this patch is submitted. + +Note: Some database flag settings can affect instance availability or stability and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.1/SKILL.md new file mode 100644 index 0000000000..c45032c9af --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.1/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-gcp-foundations-6.3.1 +description: "Ensure 'external scripts enabled' Database Flag for Cloud SQL SQL Server Instance Is Set to 'off'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, sql-server] +cis_id: "6.3.1" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.3.1 Ensure 'external scripts enabled' Database Flag for Cloud SQL SQL Server Instance Is Set to 'off' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to set `external scripts enabled` database flag for Cloud SQL SQL Server instance to `off`. + +## Rationale + +`external scripts enabled` enable the execution of scripts with certain remote language extensions. This property is OFF by default. When Advanced Analytics Services is installed, setup can optionally set this property to true. As the External Scripts Enabled feature allows scripts external to SQL such as files located in an R library to be executed, which could adversely affect the security of the system, hence this should be disabled. This recommendation is applicable to SQL Server database instances. + +## Impact + +Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page. +3. Ensure the database flag `external scripts enabled` that has been set is listed under the `Database flags` section. + +### From Google Cloud CLI + +1. Ensure the below command returns `off` for every Cloud SQL SQL Server database instance: + +```bash +gcloud sql instances describe --format=json | jq '.settings.databaseFlags[] | select(.name=="external scripts enabled")|.value' +``` + +In the output, database flags are listed under the `settings` as the collection `databaseFlags`. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the SQL Server instance for which you want to enable to database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add item`, choose the flag `external scripts enabled` from the drop-down menu, and set its value to `off`. +6. Click `Save` to save your changes. +7. Confirm your changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the `external scripts enabled` database flag for every Cloud SQL SQL Server database instance using the below command: + +```bash +gcloud sql instances patch --database-flags "external scripts enabled"=off +``` + +**Note:** This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default `external scripts enabled` is `off`. + +## References + +1. https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/external-scripts-enabled-server-configuration-option?view=sql-server-ver15 +2. https://cloud.google.com/sql/docs/sqlserver/flags +3. https://docs.microsoft.com/en-us/sql/advanced-analytics/concepts/security?view=sql-server-ver15 +4. https://www.stigviewer.com/stig/ms_sql_server_2016_instance/2018-03-09/finding/V-79347 + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/sqlserver/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability, and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag restarts the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.7 Allowlist Authorized Scripts | | | X | +| v7 | 2.9 Implement Application Whitelisting of Scripts | | | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.2/SKILL.md new file mode 100644 index 0000000000..cda4bd7dcb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.2/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-gcp-foundations-6.3.2 +description: "Ensure 'cross db ownership chaining' Database Flag for Cloud SQL SQL Server Instance Is Set to 'off'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, sql-server] +cis_id: "6.3.2" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.3.2 Ensure 'cross db ownership chaining' Database Flag for Cloud SQL SQL Server Instance Is Set to 'off' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to set `cross db ownership chaining` database flag for Cloud SQL SQL Server instance to `off`. + +This flag is deprecated for all SQL Server versions in CGP. Going forward, you can't set its value to on. However, if you have this flag enabled, we strongly recommend that you either remove the flag from your database or set it to off. For cross-database access, use the Microsoft tutorial for signing stored procedures with a certificate. + +## Rationale + +Use the `cross db ownership` for chaining option to configure cross-database ownership chaining for an instance of Microsoft SQL Server. This server option allows you to control cross-database ownership chaining at the database level or to allow cross-database ownership chaining for all databases. Enabling `cross db ownership` is not recommended unless all of the databases hosted by the instance of SQL Server must participate in cross-database ownership chaining and you are aware of the security implications of this setting. This recommendation is applicable to SQL Server database instances. + +## Impact + +Updating flags may cause the database to restart. This may cause it to unavailable for a short amount of time, so this is best done at a time of low usage. You should also determine if the tables in your databases reference another table without using credentials for that database, as turning off cross database ownership will break this relationship. + +## Audit + +NOTE: This flag is deprecated for all SQL Server versions. Going forward, you can't set its value to on. However, if you have this flag enabled it should be removed from your database or set to off. + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console. +2. Select the instance to open its `Instance Overview` page. +3. Ensure the database flag `cross db ownership chaining` that has been set is listed under the `Database flags` section. + +### From Google Cloud CLI + +1. Ensure the below command returns `off` for every Cloud SQL SQL Server database instance: + +```bash +gcloud sql instances describe --format=json | jq '.settings.databaseFlags[] | select(.name=="cross db ownership chaining")|.value' +``` + +In the output, database flags are listed under the `settings` as the collection `databaseFlags`. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the SQL Server instance for which you want to enable to database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add item`, choose the flag `cross db ownership chaining` from the drop-down menu, and set its value to `off`. +6. Click `Save`. +7. Confirm the changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the `cross db ownership chaining` database flag for every Cloud SQL SQL Server database instance using the below command: + +```bash +gcloud sql instances patch --database-flags "cross db ownership chaining"=off +``` + +**Note:** This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags to be set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +This flag is deprecated for all SQL Server versions. Going forward, you can't set its value to on. + +## References + +1. https://cloud.google.com/sql/docs/sqlserver/flags +2. https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/cross-db-ownership-chaining-server-configuration-option?view=sql-server-ver15 + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/sqlserver/flags - to see if your instance will be restarted when this patch is submitted. + +Note: Some database flag settings can affect instance availability or stability, and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag does not restart the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | X | X | X | +| v7 | 14.6 Protect Information through Access Control Lists | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.3/SKILL.md new file mode 100644 index 0000000000..1f3af2c97a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.3/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-gcp-foundations-6.3.3 +description: "Ensure 'user Connections' Database Flag for Cloud SQL SQL Server Instance Is Set to a Non-limiting Value" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, sql-server] +cis_id: "6.3.3" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.3.3 Ensure 'user Connections' Database Flag for Cloud SQL SQL Server Instance Is Set to a Non-limiting Value (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to check the `user connections` for a Cloud SQL SQL Server instance to ensure that it is not artificially limiting connections. + +## Rationale + +The `user connections` option specifies the maximum number of simultaneous user connections that are allowed on an instance of SQL Server. The actual number of user connections allowed also depends on the version of SQL Server that you are using, and also the limits of your application or applications and hardware. SQL Server allows a maximum of 32,767 user connections. Because user connections is by default a self-configuring value, with SQL Server adjusting the maximum number of user connections automatically as needed, up to the maximum value allowable. For example, if only 10 users are logged in, 10 user connection objects are allocated. In most cases, you do not have to change the value for this option. The default is 0, which means that the maximum (32,767) user connections are allowed. However if there is a number defined here that limits connections, SQL Server will not allow anymore above this limit. If the connections are at the limit, any new requests will be dropped, potentially causing lost data or outages for those using the database. + +## Impact + +Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page. +3. Ensure the database flag `user connections` listed under the `Database flags` section is 0. + +### From Google Cloud CLI + +1. Ensure the below command returns a value of 0, for every Cloud SQL SQL Server database instance. + +```bash +gcloud sql instances describe --format=json | jq '.settings.databaseFlags[] | select(.name=="user connections")|.value' +``` + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the SQL Server instance for which you want to enable to database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add item`, choose the flag `user connections` from the drop-down menu, and set its value to your organization recommended value. +6. Click `Save` to save your changes. +7. Confirm your changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the `user connections` database flag for every Cloud SQL SQL Server database instance using the below command. + +```bash +gcloud sql instances patch --database-flags "user connections=[0-32,767]" +``` + +**Note:** This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default `user connections` is set to '0' which does not limit the number of connections, giving the server free reign to facilitate a max of 32,767 connections. + +## References + +1. https://cloud.google.com/sql/docs/sqlserver/flags +2. https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-user-connections-server-configuration-option?view=sql-server-ver15 +3. https://www.stigviewer.com/stig/ms_sql_server_2016_instance/2018-03-09/finding/V-79119 + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/sqlserver/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability, and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag restarts the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.1 Establish and Maintain a Secure Configuration Process | X | X | X | +| v7 | 5.1 Establish Secure Configurations | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.4/SKILL.md new file mode 100644 index 0000000000..ca23688145 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.4/SKILL.md @@ -0,0 +1,118 @@ +--- +name: cis-gcp-foundations-6.3.4 +description: "Ensure 'user options' Database Flag for Cloud SQL SQL Server Instance Is Not Configured" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, sql-server] +cis_id: "6.3.4" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.3.4 Ensure 'user options' Database Flag for Cloud SQL SQL Server Instance Is Not Configured (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +The `user options` option specifies global defaults for all users. A list of default query processing options is established for the duration of a user's work session. The user options option allows you to change the default values of the SET options (if the server's default settings are not appropriate). + +A user can override these defaults by using the SET statement. You can configure user options dynamically for new logins. After you change the setting of user options, new login sessions use the new setting; current login sessions are not affected. This recommendation is applicable to SQL Server database instances. + +## Rationale + +It is recommended that, `user options` database flag for Cloud SQL SQL Server instance should not be configured. + +A user can override these defaults set with `user options` by using the SET statement. Some of these features/options could adversely affect the security of the system if enabled. + +## Impact + +Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page. +3. Ensure the database flag `user options` that has been set is not listed under the `Database flags` section. + +### From Google Cloud CLI + +1. Ensure the below command returns empty result for every Cloud SQL SQL Server database instance: + +```bash +gcloud sql instances describe --format=json | jq '.settings.databaseFlags[] | select(.name=="user options")|.value' +``` + +In the output, database flags are listed under the `settings` as the collection `databaseFlags`. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the SQL Server instance for which you want to enable to database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. Click the X next `user options` flag shown. +6. Click `Save` to save your changes. +7. Confirm your changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. List all Cloud SQL database Instances: + +```bash +gcloud sql instances list +``` + +2. Clear the `user options` database flag for every Cloud SQL SQL Server database instance using either of the below commands. + +Clearing all flags to their default value: + +```bash +gcloud sql instances patch --clear-database-flags +``` + +OR + +To clear only `user options` database flag, configure the database flag by overriding the `user options`. Exclude `user options` flag and its value, and keep all other flags you want to configure. + +```bash +gcloud sql instances patch --database-flags [FLAG1=VALUE1,FLAG2=VALUE2] +``` + +**Note:** This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default 'user options' is not configured. + +## References + +1. https://cloud.google.com/sql/docs/sqlserver/flags +2. https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-user-options-server-configuration-option?view=sql-server-ver15 +3. https://www.stigviewer.com/stig/ms_sql_server_2016_instance/2018-03-09/finding/V-79335 + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/sqlserver/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability, and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag does not restart the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.1 Establish and Maintain a Secure Configuration Process | X | X | X | +| v7 | 5.1 Establish Secure Configurations | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.5/SKILL.md new file mode 100644 index 0000000000..9454dc04bf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.5/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-gcp-foundations-6.3.5 +description: "Ensure 'remote access' Database Flag for Cloud SQL SQL Server Instance Is Set to 'off'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, sql-server] +cis_id: "6.3.5" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.3.5 Ensure 'remote access' Database Flag for Cloud SQL SQL Server Instance Is Set to 'off' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to set `remote access` database flag for Cloud SQL SQL Server instance to `off`. + +## Rationale + +The `remote access` option controls the execution of stored procedures from local or remote servers on which instances of SQL Server are running. This default value for this option is 1. This grants permission to run local stored procedures from remote servers or remote stored procedures from the local server. To prevent local stored procedures from being run from a remote server or remote stored procedures from being run on the local server, this must be disabled. The Remote Access option controls the execution of local stored procedures on remote servers or remote stored procedures on local server. 'Remote access' functionality can be abused to launch a Denial-of-Service (DoS) attack on remote servers by off-loading query processing to a target, hence this should be disabled. This recommendation is applicable to SQL Server database instances. + +## Impact + +Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page. +3. Ensure the database flag `remote access` that has been set is listed under the `Database flags` section. + +### From Google Cloud CLI + +1. Ensure the below command returns `off` for every Cloud SQL SQL Server database instance: + +```bash +gcloud sql instances describe --format=json | jq '.settings.databaseFlags[] | select(.name=="remote access")|.value' +``` + +In the output, database flags are listed under the `settings` as the collection `databaseFlags`. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the SQL Server instance for which you want to enable to database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add item`, choose the flag `remote access` from the drop-down menu, and set its value to `off`. +6. Click `Save` to save your changes. +7. Confirm your changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the `remote access` database flag for every Cloud SQL SQL Server database instance using the below command: + +```bash +gcloud sql instances patch --database-flags "remote access"=off +``` + +**Note:** This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +By default 'remote access' is 'on'. + +## References + +1. https://cloud.google.com/sql/docs/sqlserver/flags +2. https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-remote-access-server-configuration-option?view=sql-server-ver15 +3. https://www.stigviewer.com/stig/ms_sql_server_2016_instance/2018-03-09/finding/V-79337 + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/sqlserver/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability, and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag restarts the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | X | X | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.6/SKILL.md new file mode 100644 index 0000000000..3b331400d6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.6/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-gcp-foundations-6.3.6 +description: "Ensure '3625 (trace flag)' Database Flag for all Cloud SQL SQL Server Instances Is Set to 'on'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, sql-server] +cis_id: "6.3.6" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.3.6 Ensure '3625 (trace flag)' Database Flag for all Cloud SQL SQL Server Instances Is Set to 'on' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to set `3625 (trace flag)` database flag for Cloud SQL SQL Server instance to `on`. + +## Rationale + +Microsoft SQL Trace Flags are frequently used to diagnose performance issues or to debug stored procedures or complex computer systems, but they may also be recommended by Microsoft Support to address behavior that is negatively impacting a specific workload. All documented trace flags and those recommended by Microsoft Support are fully supported in a production environment when used as directed. `3625(trace log)` Limits the amount of information returned to users who are not members of the sysadmin fixed server role, by masking the parameters of some error messages using '**\*\***'. Setting this in a Google Cloud flag for the instance allows for security through obscurity and prevents the disclosure of sensitive information, hence this is recommended to set this flag globally to on to prevent the flag having been left off, or changed by bad actors. This recommendation is applicable to SQL Server database instances. + +## Impact + +Changing flags on a database may cause it to be restarted. The best time to do this is at a time where there is low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page. +3. Ensure the database flag `3625` that has been set is listed under the `Database flags` section. + +### From Google Cloud CLI + +1. Ensure the below command returns `on` for every Cloud SQL SQL Server database instance: + +```bash +gcloud sql instances describe --format=json | jq '.settings.databaseFlags[] | select(.name=="3625")|.value' +``` + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the SQL Server instance for which you want to enable to database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. To set a flag that has not been set on the instance before, click `Add item`, choose the flag `3625` from the drop-down menu, and set its value to `on`. +6. Click `Save` to save your changes. +7. Confirm your changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. Configure the `3625` database flag for every Cloud SQL SQL Server database instance using the below command. + +```bash +gcloud sql instances patch --database-flags "3625=on" +``` + +**Note:** This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## Default Value + +MS SQL Server implementations by default have trace flags, including the '3625' flag, turned off, as they are used for logging purposes. + +## References + +1. https://cloud.google.com/sql/docs/sqlserver/flags +2. https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql?view=sql-server-ver15#trace-flags +3. https://github.com/ktaranov/sqlserver-kit/blob/master/SQL%20Server%20Trace%20Flag.md + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/sqlserver/flags - to see if your instance will be restarted when this patch is submitted. + +Note: some database flag settings can affect instance availability or stability, and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag restarts the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.1 Establish and Maintain a Secure Configuration Process | X | X | X | +| v7 | 5.1 Establish Secure Configurations | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.7/SKILL.md new file mode 100644 index 0000000000..2983cca5cf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.3.7/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-gcp-foundations-6.3.7 +description: "Ensure 'contained database authentication' Database Flag for Cloud SQL SQL Server Instance Is Set to 'off'" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, sql-server] +cis_id: "6.3.7" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.3.7 Ensure 'contained database authentication' Database Flag for Cloud SQL SQL Server Instance Is Set to 'off' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +A contained database includes all database settings and metadata required to define the database and has no configuration dependencies on the instance of the Database Engine where the database is installed. Users can connect to the database without authenticating a login at the Database Engine level. Isolating the database from the Database Engine makes it possible to easily move the database to another instance of SQL Server. Contained databases have some unique threats that should be understood and mitigated by SQL Server Database Engine administrators. Most of the threats are related to the USER WITH PASSWORD authentication process, which moves the authentication boundary from the Database Engine level to the database level, hence this is recommended not to enable this flag. This recommendation is applicable to SQL Server database instances. + +## Rationale + +When contained databases are enabled, database users with the ALTER ANY USER permission, such as members of the db_owner and db_accessadmin database roles, can grant access to databases and by doing so, grant access to the instance of SQL Server. This means that control over access to the server is no longer limited to members of the sysadmin and securityadmin fixed server role, and logins with the server level CONTROL SERVER and ALTER ANY LOGIN permission. + +It is recommended to set `contained database authentication` database flag for Cloud SQL on the SQL Server instance to `off`. + +## Impact + +When `contained database authentication` is off (0) for the instance, contained databases cannot be created, or attached to the Database Engine. Setting custom flags via command line on certain instances will cause all omitted flags to be reset to defaults. This may cause you to lose custom flags and could result in unforeseen complications or instance restarts. Because of this, it is recommended you apply these flags changes during a period of low usage. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance to open its `Instance Overview` page. +3. Under the 'Database flags' section, if the database flag `contained database authentication` is present, then ensure that it is set to 'off'. + +### From Google Cloud CLI + +1. Ensure the below command returns `off` for any Cloud SQL for SQL Server database instance. + +```bash +gcloud sql instances describe --format=json | jq '.settings.databaseFlags[] | select(.name=="contained database authentication")|.value' +``` + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the SQL Server instance for which you want to enable to database flag. +3. Click `Edit`. +4. Scroll down to the `Flags` section. +5. If the flag `contained database authentication` is present and its value is set to 'on', then change it to 'off'. +6. Click `Save`. +7. Confirm the changes under `Flags` on the Overview page. + +### From Google Cloud CLI + +1. If any Cloud SQL for SQL Server instance has the database flag `contained database authentication` set to 'on', then change it to 'off' using the below command: + +```bash +gcloud sql instances patch --database-flags "contained database authentication=off" +``` + +**Note:** This command will overwrite all database flags previously set. To keep those and add new ones, include the values for all flags you want set on the instance; any flag not specifically included is set to its default value. For flags that do not take a value, specify the flag name followed by an equals sign ("="). + +## References + +1. https://cloud.google.com/sql/docs/sqlserver/flags +2. https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/contained-database-authentication-server-configuration-option?view=sql-server-ver15 +3. https://docs.microsoft.com/en-us/sql/relational-databases/databases/security-best-practices-with-contained-databases?view=sql-server-ver15 + +## Additional Information + +WARNING: This patch modifies database flag values, which may require your instance to be restarted. Check the list of supported flags - https://cloud.google.com/sql/docs/sqlserver/flags - to see if your instance will be restarted when this patch is submitted. + +Note: Some database flag settings can affect instance availability or stability, and remove the instance from the Cloud SQL SLA. For information about these flags, see Operational Guidelines. + +Note: Configuring the above flag does not restart the Cloud SQL instance. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | X | X | X | +| v7 | 14.6 Protect Information through Access Control Lists | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.4/SKILL.md new file mode 100644 index 0000000000..ea6edcaf8a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.4/SKILL.md @@ -0,0 +1,92 @@ +--- +name: cis-gcp-foundations-6.4 +description: "Ensure That the Cloud SQL Database Instance Requires All Incoming Connections To Use SSL" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, ssl, networking] +cis_id: "6.4" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.4 Ensure That the Cloud SQL Database Instance Requires All Incoming Connections To Use SSL (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to enforce all incoming connections to SQL database instance to use SSL. + +## Rationale + +SQL database connections if successfully trapped (MITM); can reveal sensitive data like credentials, database queries, query outputs etc. For security, it is recommended to always use SSL encryption when connecting to your instance. This recommendation is applicable for Postgresql, MySql generation 1, MySql generation 2 and SQL Server 2017 instances. + +## Impact + +After enforcing SSL requirement for connections, existing client will not be able to communicate with Cloud SQL database instance unless they use SSL encrypted connections to communicate to Cloud SQL database instance. + +## Audit + +### From Google Cloud Console + +1. Go to https://console.cloud.google.com/sql/instances. +2. Click on an instance name to see its configuration overview. +3. In the left-side panel, select `Connections`. +4. In the `Security` section, ensure that `Allow only SSL connections` option is selected. + +### From Google Cloud CLI + +1. Get the detailed configuration for every SQL database instance using the following command: + +```bash +gcloud sql instances list --format=json +``` + +Ensure that section `settings: ipConfiguration` has the parameter `sslMode` set to `ENCRYPTED_ONLY`. + +## Remediation + +### From Google Cloud Console + +1. Go to https://console.cloud.google.com/sql/instances. +2. Click on an instance name to see its configuration overview. +3. In the left-side panel, select `Connections`. +4. In the `security` section, select SSL mode as `Allow only SSL connections`. +5. Under `Configure SSL server certificates` click `Create new certificate` and save the setting. + +### From Google Cloud CLI + +To enforce SSL encryption for an instance run the command: + +```bash +gcloud sql instances patch INSTANCE_NAME --ssl-mode= ENCRYPTED_ONLY +``` + +**Note:** `RESTART` is required for type MySQL Generation 1 Instances (`backendType: FIRST_GEN`) to get this configuration in effect. + +## Default Value + +By default parameter `settings: ipConfiguration: sslMode` is not set which is equivalent to `sslMode:ALLOW_UNENCRYPTED_AND_ENCRYPTED`. + +## References + +1. https://cloud.google.com/sql/docs/postgres/configure-ssl-instance/ + +## Additional Information + +By default `Settings: ipConfiguration` has no `authorizedNetworks` set/configured. In that case even if by default `sslMode` is not set, which is equivalent to `sslMode:ALLOW_UNENCRYPTED_AND_ENCRYPTED` there is no risk as instance cannot be accessed outside of the network unless `authorizedNetworks` are configured. However, If default for `sslMode` is not updated to `ENCRYPTED_ONLY` any `authorizedNetworks` created later on will not enforce SSL only connection. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | X | X | +| v7 | 16.5 Encrypt Transmittal of Username and Authentication Credentials | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.5/SKILL.md new file mode 100644 index 0000000000..e62b609b77 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.5/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-gcp-foundations-6.5 +description: "Ensure That Cloud SQL Database Instances Do Not Implicitly Whitelist All Public IP Addresses" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, networking] +cis_id: "6.5" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.5 Ensure That Cloud SQL Database Instances Do Not Implicitly Whitelist All Public IP Addresses (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Database Server should accept connections only from trusted Network(s)/IP(s) and restrict access from public IP addresses. + +## Rationale + +To minimize attack surface on a Database server instance, only trusted/known and required IP(s) should be white-listed to connect to it. + +An authorized network should not have IPs/networks configured to `0.0.0.0/0` which will allow access to the instance from anywhere in the world. Note that authorized networks apply only to instances with public IPs. + +## Impact + +The Cloud SQL database instance would not be available to public IP addresses. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Click the instance name to open its `Instance details` page. +3. Under the `Configuration` section click `Edit configurations`. +4. Under `Configuration options` expand the `Connectivity` section. +5. Ensure that no authorized network is configured to allow `0.0.0.0/0`. + +### From Google Cloud CLI + +1. Get detailed configuration for every Cloud SQL database instance. + +```bash +gcloud sql instances list --format=json +``` + +Ensure that the section `settings: ipConfiguration : authorizedNetworks` does not have any parameter `value` containing `0.0.0.0/0`. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Click the instance name to open its `Instance details` page. +3. Under the `Configuration` section click `Edit configurations`. +4. Under `Configuration options` expand the `Connectivity` section. +5. Click the `delete` icon for the authorized network `0.0.0.0/0`. +6. Click `Save` to update the instance. + +### From Google Cloud CLI + +Update the authorized network list by dropping off any addresses. + +```bash +gcloud sql instances patch --authorized-networks=IP_ADDR1,IP_ADDR2... +``` + +## Prevention + +To prevent new SQL instances from being configured to accept incoming connections from any IP addresses, set up a `Restrict Authorized Networks on Cloud SQL instances` Organization Policy at: https://console.cloud.google.com/iam-admin/orgpolicies/sql-restrictAuthorizedNetworks. + +## Default Value + +By default, authorized networks are not configured. Remote connection to Cloud SQL database instance is not possible unless authorized networks are configured. + +## References + +1. https://cloud.google.com/sql/docs/mysql/configure-ip +2. https://console.cloud.google.com/iam-admin/orgpolicies/sql-restrictAuthorizedNetworks +3. https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints +4. https://cloud.google.com/sql/docs/mysql/connection-org-policy + +## Additional Information + +There is no IPv6 configuration found for Google cloud SQL server services. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | X | X | X | +| v7 | 14.6 Protect Information through Access Control Lists | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.6/SKILL.md new file mode 100644 index 0000000000..5d55126d6f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.6/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-gcp-foundations-6.6 +description: "Ensure That Cloud SQL Database Instances Do Not Have Public IPs" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, networking] +cis_id: "6.6" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.6 Ensure That Cloud SQL Database Instances Do Not Have Public IPs (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +It is recommended to configure Second Generation Sql instance to use private IPs instead of public IPs. + +## Rationale + +To lower the organization's attack surface, Cloud SQL databases should not have public IPs. Private IPs provide improved network security and lower latency for your application. + +## Impact + +Removing the public IP address on SQL instances may break some applications that relied on it for database connectivity. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console: https://console.cloud.google.com/sql/instances +2. Ensure that every instance has a private IP address and no public IP address configured. + +### From Google Cloud CLI + +1. List all Cloud SQL database instances using the following command: + +```bash +gcloud sql instances list +``` + +2. For every instance of type `instanceType: CLOUD_SQL_INSTANCE` with `backendType: SECOND_GEN`, get detailed configuration. Ignore instances of type `READ_REPLICA_INSTANCE` because these instances inherit their settings from the primary instance. Also, note that first generation instances cannot be configured to have a private IP address. + +```bash +gcloud sql instances describe +``` + +3. Ensure that the setting `ipAddresses` has an IP address configured of `type: PRIVATE` and has no IP address of `type: PRIMARY`. `PRIMARY` IP addresses are public addresses. An instance can have both a private and public address at the same time. Note also that you cannot use private IP with First Generation instances. + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console: https://console.cloud.google.com/sql/instances +2. Click the instance name to open its Instance details page. +3. Select the `Connections` tab. +4. Deselect the `Public IP` checkbox. +5. Click `Save` to update the instance. + +### From Google Cloud CLI + +1. For every instance remove its public IP and assign a private IP instead: + +```bash +gcloud sql instances patch --network= --no-assign-ip +``` + +2. Confirm the changes using the following command: + +```bash +gcloud sql instances describe +``` + +## Prevention + +To prevent new SQL instances from getting configured with public IP addresses, set up a `Restrict Public IP access on Cloud SQL instances` Organization policy at: https://console.cloud.google.com/iam-admin/orgpolicies/sql-restrictPublicIp. + +## Default Value + +By default, Cloud Sql instances have a public IP. + +## References + +1. https://cloud.google.com/sql/docs/mysql/configure-private-ip +2. https://cloud.google.com/sql/docs/mysql/private-ip +3. https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints +4. https://console.cloud.google.com/iam-admin/orgpolicies/sql-restrictPublicIp + +## Additional Information + +Replicas inherit their private IP status from their primary instance. You cannot configure a private IP directly on a replica. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | X | X | X | +| v7 | 14.6 Protect Information through Access Control Lists | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.7/SKILL.md new file mode 100644 index 0000000000..60d2e3ee9e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-6.7/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-gcp-foundations-6.7 +description: "Ensure That Cloud SQL Database Instances Are Configured With Automated Backups" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, cloud-sql, backups] +cis_id: "6.7" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.7 Ensure That Cloud SQL Database Instances Are Configured With Automated Backups (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended to have all SQL database instances set to enable automated backups. + +## Rationale + +Backups provide a way to restore a Cloud SQL instance to recover lost data or recover from a problem with that instance. Automated backups need to be set for any instance that contains data that should be protected from loss or damage. This recommendation is applicable for SQL Server, PostgreSql, MySql generation 1 and MySql generation 2 instances. + +## Impact + +Automated Backups will increase required size of storage and costs associated with it. + +## Audit + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Click the instance name to open its instance details page. +3. Go to the `Backups` menu. +4. Ensure that `Automated backups` is set to `Enabled` and `Backup time` is mentioned. + +### From Google Cloud CLI + +1. List all Cloud SQL database instances using the following command: + +```bash +gcloud sql instances list --format=json | jq '. | map(select(.instanceType != "READ_REPLICA_INSTANCE")) | .[].name' +``` + +NOTE: gcloud command has been added with the filter to exclude read-replicas instances, as GCP do not provide Automated Backups for read-replica instances. + +2. Ensure that the below command returns `True` for every Cloud SQL database instance. + +```bash +gcloud sql instances describe --format="value('Enabled':settings.backupConfiguration.enabled)" +``` + +## Remediation + +### From Google Cloud Console + +1. Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances. +2. Select the instance where the backups need to be configured. +3. Click `Edit`. +4. In the `Backups` section, check `Enable automated backups`, and choose a backup window. +5. Click `Save`. + +### From Google Cloud CLI + +1. List all Cloud SQL database instances using the following command: + +```bash +gcloud sql instances list --format=json | jq '. | map(select(.instanceType != "READ_REPLICA_INSTANCE")) | .[].name' +``` + +NOTE: gcloud command has been added with the filter to exclude read-replicas instances, as GCP do not provide Automated Backups for read-replica instances. + +2. Enable `Automated backups` for every Cloud SQL database instance using the below command: + +```bash +gcloud sql instances patch --backup-start-time <[HH:MM]> +``` + +The `backup-start-time` parameter is specified in 24-hour time, in the UTC+00 time zone, and specifies the start of a 4-hour backup window. Backups can start any time during the backup window. + +## Default Value + +By default, automated backups are not configured for Cloud SQL instances. + +## References + +1. https://cloud.google.com/sql/docs/mysql/backup-recovery/backups +2. https://cloud.google.com/sql/docs/postgres/backup-recovery/backups +3. https://cloud.google.com/sql/docs/sqlserver/backup-recovery/backups +4. https://cloud.google.com/sql/docs/mysql/backup-recovery/backing-up +5. https://cloud.google.com/sql/docs/postgres/backup-recovery/backing-up +6. https://cloud.google.com/sql/docs/sqlserver/backup-recovery/backing-up + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------- | ---- | ---- | ---- | +| v8 | 11.2 Perform Automated Backups | X | X | X | +| v7 | 10.1 Ensure Regular Automated Back Ups | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.1/SKILL.md new file mode 100644 index 0000000000..33c4509cc5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.1/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-gcp-foundations-7.1 +description: "Ensure That BigQuery Datasets Are Not Anonymously or Publicly Accessible" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, bigquery, encryption, cmek] +cis_id: "7.1" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 7.1 Ensure That BigQuery Datasets Are Not Anonymously or Publicly Accessible (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +It is recommended that the IAM policy on BigQuery datasets does not allow anonymous and/or public access. + +## Rationale + +Granting permissions to `allUsers` or `allAuthenticatedUsers` allows anyone to access the dataset. Such access might not be desirable if sensitive data is being stored in the dataset. Therefore, ensure that anonymous and/or public access to a dataset is not allowed. + +## Impact + +The dataset is not publicly accessible. Explicit modification of IAM privileges would be necessary to make them publicly accessible. + +## Audit + +### From Google Cloud Console + +1. Go to `BigQuery` by visiting: https://console.cloud.google.com/bigquery. +2. Select a dataset from `Resources`. +3. Click `SHARING` near the right side of the window and select `Permissions`. +4. Validate that none of the attached roles contain `allUsers` or `allAuthenticatedUsers`. + +### From Google Cloud CLI + +List the name of all datasets. + +```bash +bq ls +``` + +Retrieve each dataset details using the following command: + +```bash +bq show PROJECT_ID:DATASET_NAME +``` + +Ensure that `allUsers` and `allAuthenticatedUsers` have not been granted access to the dataset. + +## Remediation + +### From Google Cloud Console + +1. Go to `BigQuery` by visiting: https://console.cloud.google.com/bigquery. +2. Select the dataset from 'Resources'. +3. Click `SHARING` near the right side of the window and select `Permissions`. +4. Review each attached role. +5. Click the delete icon for each member `allUsers` or `allAuthenticatedUsers`. On the popup click `Remove`. + +### From Google Cloud CLI + +List the name of all datasets. + +```bash +bq ls +``` + +Retrieve the data set details: + +```bash +bq show --format=prettyjson PROJECT_ID:DATASET_NAME > PATH_TO_FILE +``` + +In the access section of the JSON file, update the dataset information to remove all roles containing `allUsers` or `allAuthenticatedUsers`. + +Update the dataset: + +```bash +bq update --source PATH_TO_FILE PROJECT_ID:DATASET_NAME +``` + +## Prevention + +You can prevent Bigquery dataset from becoming publicly accessible by setting up the `Domain restricted sharing` organization policy at: https://console.cloud.google.com/iam-admin/orgpolicies/iam-allowedPolicyMemberDomains. + +## Default Value + +By default, BigQuery datasets are not publicly accessible. + +## References + +1. https://cloud.google.com/bigquery/docs/dataset-access-controls + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | X | X | X | +| v7 | 14.6 Protect Information through Access Control Lists | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.2/SKILL.md new file mode 100644 index 0000000000..ac080733da --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.2/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-gcp-foundations-7.2 +description: "Ensure That All BigQuery Tables Are Encrypted With Customer-Managed Encryption Key (CMEK)" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, bigquery, encryption, cmek] +cis_id: "7.2" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 7.2 Ensure That All BigQuery Tables Are Encrypted With Customer-Managed Encryption Key (CMEK) (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +BigQuery by default encrypts the data as rest by employing `Envelope Encryption` using Google managed cryptographic keys. The data is encrypted using the `data encryption keys` and data encryption keys themselves are further encrypted using `key encryption keys`. This is seamless and do not require any additional input from the user. However, if you want to have greater control, Customer-managed encryption keys (CMEK) can be used as encryption key management solution for BigQuery Data Sets. If CMEK is used, the CMEK is used to encrypt the data encryption keys instead of using google-managed encryption keys. + +## Rationale + +BigQuery by default encrypts the data as rest by employing `Envelope Encryption` using Google managed cryptographic keys. This is seamless and does not require any additional input from the user. + +For greater control over the encryption, customer-managed encryption keys (CMEK) can be used as encryption key management solution for BigQuery tables. The CMEK is used to encrypt the data encryption keys instead of using google-managed encryption keys. BigQuery stores the table and CMEK association and the encryption/decryption is done automatically. + +Applying the Default Customer-managed keys on BigQuery data sets ensures that all the new tables created in the future will be encrypted using CMEK but existing tables need to be updated to use CMEK individually. + +> **Note:** Google does not store your keys on its servers and cannot access your protected data unless you provide the key. This also means that if you forget or lose your key, there is no way for Google to recover the key or to recover any data encrypted with the lost key. + +## Impact + +Using Customer-managed encryption keys (CMEK) will incur additional labor-hour investment to create, protect, and manage the keys. + +## Audit + +### From Google Cloud Console + +1. Go to `Analytics` +2. Go to `BigQuery` +3. Under `SQL Workspace`, select the project +4. Select Data Set, select the table +5. Go to `Details` tab +6. Under `Table info`, verify `Customer-managed key` is present. +7. Repeat for each table in all data sets for all projects. + +### From Google Cloud CLI + +List all dataset names + +```bash +bq ls +``` + +Use the following command to view the table details. Verify the `kmsKeyName` is present. + +```bash +bq show +``` + +## Remediation + +### From Google Cloud CLI + +Use the following command to copy the data. The source and the destination needs to be same in case copying to the original table. + +```bash +bq cp --destination_kms_key source_dataset.source_table destination_dataset.destination_table +``` + +## Default Value + +Google Managed keys are used as `key encryption keys`. + +## References + +1. https://cloud.google.com/bigquery/docs/customer-managed-encryption + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.3/SKILL.md new file mode 100644 index 0000000000..2137c55336 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.3/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-gcp-foundations-7.3 +description: "Ensure That a Default Customer-Managed Encryption Key (CMEK) Is Specified for All BigQuery Data Sets" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, bigquery, encryption, cmek] +cis_id: "7.3" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 7.3 Ensure That a Default Customer-Managed Encryption Key (CMEK) Is Specified for All BigQuery Data Sets (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +BigQuery by default encrypts the data as rest by employing `Envelope Encryption` using Google managed cryptographic keys. The data is encrypted using the `data encryption keys` and data encryption keys themselves are further encrypted using `key encryption keys`. This is seamless and do not require any additional input from the user. However, if you want to have greater control, Customer-managed encryption keys (CMEK) can be used as encryption key management solution for BigQuery Data Sets. + +## Rationale + +BigQuery by default encrypts the data as rest by employing `Envelope Encryption` using Google managed cryptographic keys. This is seamless and does not require any additional input from the user. + +For greater control over the encryption, customer-managed encryption keys (CMEK) can be used as encryption key management solution for BigQuery Data Sets. Setting a Default Customer-managed encryption key (CMEK) for a data set ensure any tables created in future will use the specified CMEK if none other is provided. + +> **Note:** Google does not store your keys on its servers and cannot access your protected data unless you provide the key. This also means that if you forget or lose your key, there is no way for Google to recover the key or to recover any data encrypted with the lost key. + +## Impact + +Using Customer-managed encryption keys (CMEK) will incur additional labor-hour investment to create, protect, and manage the keys. + +## Audit + +### From Google Cloud Console + +1. Go to `Analytics` +2. Go to `BigQuery` +3. Under `Analysis` click on `SQL Workspaces`, select the project +4. Select Data Set +5. Ensure `Customer-managed key` is present under `Dataset info` section. +6. Repeat for each data set in all projects. + +### From Google Cloud CLI + +List all dataset names + +```bash +bq ls +``` + +Use the following command to view each dataset details. + +```bash +bq show +``` + +Verify the `kmsKeyName` is present. + +## Remediation + +### From Google Cloud CLI + +The default CMEK for existing data sets can be updated by specifying the default key in the `EncryptionConfiguration.kmsKeyName` field when calling the `datasets.insert` or `datasets.patch` methods. + +## Default Value + +Google Managed keys are used as `key encryption keys`. + +## References + +1. https://cloud.google.com/bigquery/docs/customer-managed-encryption + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.4/SKILL.md new file mode 100644 index 0000000000..07bb39f65b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-7.4/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gcp-foundations-7.4 +description: "Ensure all data in BigQuery has been classified" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, bigquery, encryption, cmek] +cis_id: "7.4" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 7.4 Ensure all data in BigQuery has been classified (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +BigQuery tables can contain sensitive data that for security purposes should be discovered, monitored, classified, and protected. Google Cloud's Sensitive Data Protection tools can automatically provide data classification of all BigQuery data across an organization. + +## Rationale + +Using a cloud service or 3rd party software to continuously monitor and automate the process of data discovery and classification for BigQuery tables is an important part of protecting the data. + +Sensitive Data Protection is a fully managed data protection and data privacy platform that uses machine learning and pattern matching to discover and classify sensitive data in Google Cloud. + +## Impact + +There is a cost associated with using Sensitive Data Protection. There is also typically a cost associated with 3rd party tools that perform similar processes and protection. + +## Audit + +1. Go to Cloud DLP by visiting https://console.cloud.google.com/dlp/landing/dataProfiles/configurations. +2. Verify there is a discovery scan configuration either for the organization or project. + +## Remediation + +Enable profiling: + +1. Go to Cloud DLP by visiting https://console.cloud.google.com/dlp/landing/dataProfiles/configurations. +2. Click "Create Configuration" +3. For projects follow https://cloud.google.com/dlp/docs/profile-project. For organizations or folders follow https://cloud.google.com/dlp/docs/profile-org-folder + +Review findings: + +- Columns or tables with high data risk have evidence of sensitive information without additional protections. To lower the data risk score, consider doing the following: + - For columns containing sensitive data, apply a BigQuery policy tag to restrict access to accounts with specific access rights. + - De-identify the raw sensitive data using de-identification techniques like masking and tokenization. + +Incorporate findings into your security and governance operations: + +- Enable sending findings into your security and posture services. You can publish data profiles to Security Command Center and Chronicle. +- Automate remediation or enable alerting of new or changed data risk with Pub/Sub. + +## References + +1. https://cloud.google.com/dlp/docs/data-profiles +2. https://cloud.google.com/dlp/docs/analyze-data-profiles +3. https://cloud.google.com/dlp/docs/data-profiles-remediation +4. https://cloud.google.com/dlp/docs/send-profiles-to-scc +5. https://cloud.google.com/dlp/docs/profile-org-folder#chronicle +6. https://cloud.google.com/dlp/docs/profile-org-folder#publish-pubsub + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.1 Establish and Maintain a Data Management Process | X | X | X | +| v8 | 3.7 Establish and Maintain a Data Classification Scheme | | X | X | +| v7 | 5.1 Establish Secure Configurations | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-8.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-8.1/SKILL.md new file mode 100644 index 0000000000..026d6d9fb0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Cloud_Platform_Foundation_Benchmark_v4.0.0/cis-gcp-foundations-8.1/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-gcp-foundations-8.1 +description: "Ensure That Dataproc Cluster Is Encrypted Using Customer-Managed Encryption Key" +category: cis-gcp-foundations +version: "4.0.0" +author: cyberstrike-official +tags: [cis, gcp, dataproc, encryption, cmek] +cis_id: "8.1" +cis_benchmark: "CIS Google Cloud Platform Foundation Benchmark v4.0.0" +tech_stack: [gcp] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1 Ensure That Dataproc Cluster Is Encrypted Using Customer-Managed Encryption Key (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +When you use Dataproc, cluster and job data is stored on Persistent Disks (PDs) associated with the Compute Engine VMs in your cluster and in a Cloud Storage staging bucket. This PD and bucket data is encrypted using a Google-generated data encryption key (DEK) and key encryption key (KEK). The CMEK feature allows you to create, use, and revoke the key encryption key (KEK). Google still controls the data encryption key (DEK). + +## Rationale + +"Cloud services offer the ability to protect data related to those services using encryption keys managed by the customer within Cloud KMS. These encryption keys are called customer-managed encryption keys (CMEK). When you protect data in Google Cloud services with CMEK, the CMEK key is within your control. + +## Impact + +Using Customer Managed Keys involves additional overhead in maintenance by administrators. + +## Audit + +### From Google Cloud Console + +1. Login to the GCP Console and navigate to the Dataproc Cluster page by visiting https://console.cloud.google.com/dataproc/clusters. +2. Select the project from the project dropdown list. +3. On the `Dataproc Clusters` page, select the cluster and click on the Name attribute value that you want to examine. +4. On the `details` page, select the `Configurations` tab. +5. On the `Configurations` tab, check the `Encryption type` configuration attribute value. If the value is set to `Google-managed key`, then Dataproc Cluster is not encrypted with Customer managed encryption keys. + +Repeat step no. 3 - 5 for other Dataproc Clusters available in the selected project. + +6. Change the project from the project dropdown list and repeat the audit procedure for other projects. + +### From Google Cloud CLI + +1. Run clusters list command to list all the Dataproc Clusters available in the region: + +```bash +gcloud dataproc clusters list --region='us-central1' +``` + +2. Run clusters describe command to get the key details of the selected cluster: + +```bash +gcloud dataproc clusters describe --region=us-central1 --flatten=config.encryptionConfig.gcePdKmsKeyName +``` + +3. If the above command output return "null", then the selected cluster is not encrypted with Customer managed encryption keys. + +4. Repeat step no. 2 and 3 for other Dataproc Clusters available in the selected region. Change the region by updating --region and repeat step no. 2 for other clusters available in the project. Change the project by running the below command and repeat the audit procedure for other Dataproc clusters available in other projects: + +```bash +gcloud config set project " +``` + +## Remediation + +### From Google Cloud Console + +1. Login to the GCP Console and navigate to the Dataproc Cluster page by visiting https://console.cloud.google.com/dataproc/clusters. +2. Select the project from the projects dropdown list. +3. On the `Dataproc Cluster` page, click on the `Create Cluster` to create a new cluster with Customer managed encryption keys. +4. On `Create a cluster` page, perform below steps: + +- Inside `Set up cluster` section perform below steps: + - In the `Name` textbox, provide a name for your cluster. + - From `Location` select the location in which you want to deploy a cluster. + - Configure other configurations as per your requirements. +- Inside `Configure Nodes` and `Customize cluster` section configure the settings as per your requirements. +- Inside `Manage security` section, perform below steps: + - From `Encryption`, select `Customer-managed key`. + - Select a customer-managed key from dropdown list. + - Ensure that the selected KMS Key have Cloud KMS CryptoKey Encrypter/Decrypter role assign to Dataproc Cluster service account ("serviceAccount:service-@compute-system.iam.gserviceaccount.com"). + - Click on `Create` to create a cluster. + +### From Google Cloud CLI + +```bash +gcloud dataproc clusters create --region=us-central1 --gce-pd-kms-key= +``` + +## Default Value + +By default, Dataproc Clusters are encrypted using Google-managed key. + +## References + +1. https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/customer-managed-encryption +2. https://cloud.google.com/docs/security/encryption/default-encryption + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.1.1/SKILL.md new file mode 100644 index 0000000000..118a6f2cd1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.1.1/SKILL.md @@ -0,0 +1,69 @@ +--- +name: cis-gcp-cos-1.1.1.1 +description: "Ensure mounting of udf filesystems is disabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options] +cis_id: "1.1.1.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.1.1 Ensure mounting of udf filesystems is disabled (Automated) + +## Description + +The `udf` filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats. + +## Rationale + +Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it. + +## Audit Procedure + +Run the following commands and verify the output is as indicated: + +```bash +# modprobe -n -v udf +install /bin/true +# lsmod | grep udf + +``` + +## Expected Result + +- `modprobe -n -v udf` should return `install /bin/true` +- `lsmod | grep udf` should return no output + +## Remediation + +Edit or create a file in the `/etc/modprobe.d/` directory ending in `.conf`. +Example: `vim /etc/modprobe.d/udf.conf` +and add the following line: + +``` +install udf /bin/true +``` + +Run the following command to unload the `udf` module: + +```bash +# rmmod udf +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software - Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function. | | x | x | +| v8 | 5.5 Establish and Maintain an Inventory of Service Accounts - Establish and maintain an inventory of service accounts. The inventory, at a minimum, must contain department owner, review date, and purpose. Perform service account reviews to validate that all active accounts are authorized, on a recurring schedule at a minimum quarterly, or more frequently. | | x | x | +| v7 | 3.3 Protect Dedicated Assessment Accounts - Use a dedicated account for authenticated vulnerability scans, which should not be used for any other administrative activities and should be tied to specific machines at specific IP addresses. | | x | x | + +## Profile + +Level 2 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.10/SKILL.md new file mode 100644 index 0000000000..72f7fa3d5f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.10/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-1.1.10 +description: "Ensure nodev option set on /dev/shm partition" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, shm] +cis_id: "1.1.10" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.10 Ensure nodev option set on /dev/shm partition (Automated) + +## Description + +The `nodev` mount option specifies that the filesystem cannot contain special devices. + +## Rationale + +Since the `/dev/shm` filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create special devices in `/dev/shm` partitions. + +## Audit Procedure + +Verify that the `nodev` option is set if a `/dev/shm` partition exists. +Run the following command and verify that nothing is returned: + +```bash +# mount | grep -E '\s/dev/shm\s' | grep -v nodev +``` + +## Expected Result + +The command should return no output, confirming that the `nodev` option is set on the `/dev/shm` partition. + +## Remediation + +Run the following command to remount `/dev/shm`: + +```bash +# mount -o remount,nodev /dev/shm +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 5.1 Establish Secure Configurations - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.11/SKILL.md new file mode 100644 index 0000000000..415766f6d0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.11/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-1.1.11 +description: "Ensure nosuid option set on /dev/shm partition" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, shm] +cis_id: "1.1.11" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.11 Ensure nosuid option set on /dev/shm partition (Automated) + +## Description + +The `nosuid` mount option specifies that the filesystem cannot contain `setuid` files. + +## Rationale + +Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them. + +## Audit Procedure + +Verify that the `nosuid` option is set if a `/dev/shm` partition exists. +Run the following command and verify that nothing is returned: + +```bash +# mount | grep -E '\s/dev/shm\s' | grep -v nosuid +``` + +## Expected Result + +The command should return no output, confirming that the `nosuid` option is set on the `/dev/shm` partition. + +## Remediation + +Run the following command to remount `/dev/shm`: + +```bash +# mount -o remount,nosuid /dev/shm +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 5.1 Establish Secure Configurations - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.12/SKILL.md new file mode 100644 index 0000000000..34fd9455a6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.12/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-1.1.12 +description: "Ensure noexec option set on /dev/shm partition" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, shm] +cis_id: "1.1.12" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.12 Ensure noexec option set on /dev/shm partition (Automated) + +## Description + +The `noexec` mount option specifies that the filesystem cannot contain executable binaries. + +## Rationale + +Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system. + +## Audit Procedure + +Verify that the `noexec` option is set if a `/dev/shm` partition exists. +Run the following command and verify that nothing is returned: + +```bash +# mount | grep -E '\s/dev/shm\s' | grep -v noexec +``` + +## Expected Result + +The command should return no output, confirming that the `noexec` option is set on the `/dev/shm` partition. + +## Remediation + +Run the following command to remount `/dev/shm`: + +```bash +# mount -o remount,noexec /dev/shm +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.3 Address Unauthorized Software - Ensure that unauthorized software is either removed from use on enterprise assets or receives a documented exception. Review monthly, or more frequently. | x | x | x | +| v7 | 2.6 Address unapproved software - Ensure that unauthorized software is either removed or the inventory is updated in a timely manner. | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.13/SKILL.md new file mode 100644 index 0000000000..954a94cec9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.13/SKILL.md @@ -0,0 +1,60 @@ +--- +name: cis-gcp-cos-1.1.13 +description: "Disable Automounting" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, automounting] +cis_id: "1.1.13" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.13 Disable Automounting (Automated) + +## Description + +`autofs` allows automatic mounting of devices, typically including CD/DVDs and USB drives. + +## Rationale + +With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves. + +## Impact + +The use of portable hard drives is very common for workstation users. If your organization allows the use of portable storage or media on workstations and physical access controls to workstations is considered adequate there is little value add in turning off automounting. + +## Audit Procedure + +Run the following command and verify result is not "enabled": + +```bash +# systemctl is-enabled autofs +disabled +``` + +## Expected Result + +The command should return `disabled` (not `enabled`). + +## Remediation + +Run the following command to disable `autofs`: + +```bash +# systemctl disable autofs +``` + +## Default Value + +Additional methods of disabling a service exist. Consult your distribution documentation for appropriate methods. + +This control should align with the tolerance of the use of portable drives and optical media in the organization. On a server requiring an admin to manually mount media can be part of defense-in-depth to reduce the risk of unapproved software or information being introduced or proprietary software or information being exfiltrated. If admins commonly use flash drives and Server access has sufficient physical controls, requiring manual mounting may not increase security. + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.2/SKILL.md new file mode 100644 index 0000000000..1895c54395 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.2/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-gcp-cos-1.1.2 +description: "Ensure /tmp is configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, tmp] +cis_id: "1.1.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.2 Ensure /tmp is configured (Automated) + +## Description + +The `/tmp` directory is a world-writable directory used for temporary storage by all users and some applications. + +## Rationale + +Making /tmp its own file system allows an administrator to set the noexec option on the mount, making /tmp useless for an attacker to install executable code. It would also prevent an attacker from establishing a hardlink to a system setuid program and wait for it to be updated. Once the program was updated, the hardlink would be broken and the attacker would have his own copy of the program. If the program happened to have a security vulnerability, the attacker could continue to exploit the known flaw. + +This can be accomplished by either mounting tmpfs to /tmp, or creating a separate partition for /tmp. + +## Impact + +Since the `/tmp` directory is intended to be world-writable, there is a risk of resource exhaustion if it is not bound to a separate partition. + +Running out of /tmp space is a problem regardless of what kind of filesystem lies under it, but in a default installation a disk-based /tmp will essentially have the whole disk available, as it only creates a single / partition. On the other hand, a RAM-based /tmp as with tmpfs will almost certainly be much smaller, which can lead to applications filling up the filesystem much more easily. + +/tmp utilizing tmpfs can be resized using the size={size} parameter on the Options line on the tmp.mount file. + +## Audit Procedure + +Run the following command and verify output shows `/tmp` is mounted: + +```bash +# mount | grep -E '\s/tmp\s' +tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,relatime) +``` + +Run the following command and verify that output shows `static`: + +```bash +# systemctl is-enabled tmp.mount +static +``` + +## Expected Result + +- `mount | grep -E '\s/tmp\s'` should show tmpfs mounted on /tmp with appropriate options (rw,nosuid,nodev,noexec,relatime) +- `systemctl is-enabled tmp.mount` should return `static` + +## Remediation + +Run the following commands to configure mount options: + +```bash +systemctl edit tmp.mount +``` + +Edit the file to define the options that needs to be set. For example: + +``` +[Mount] +Options= +Options=mode=1777,strictatime,noexec,nodev,nosuid +``` + +Restart the tmp.mount: + +```bash +systemctl daemon-reload # might be optional +systemctl restart tmp.mount +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## References + +1. AJ Lewis, "LVM HOWTO", http://tldp.org/HOWTO/LVM-HOWTO/ +2. https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 5.1 Establish Secure Configurations - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.3/SKILL.md new file mode 100644 index 0000000000..828a9eb9c4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.3/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-1.1.3 +description: "Ensure nodev option set on /tmp partition" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, tmp] +cis_id: "1.1.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.3 Ensure nodev option set on /tmp partition (Automated) + +## Description + +The `nodev` mount option specifies that the filesystem cannot contain special devices. + +## Rationale + +Since the `/tmp` filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in `/tmp`. + +## Audit Procedure + +Verify that the `nodev` option is set if a `/tmp` partition exists. +Run the following command and verify that nothing is returned: + +```bash +# mount | grep -E '\s/tmp\s' | grep -v nodev +``` + +## Expected Result + +The command should return no output, confirming that the `nodev` option is set on the `/tmp` partition. + +## Remediation + +Run the following command to remount `/tmp`: + +```bash +# mount -o remount,nodev /tmp +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 5.1 Establish Secure Configurations - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.4/SKILL.md new file mode 100644 index 0000000000..4479c4f2cf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.4/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-1.1.4 +description: "Ensure nosuid option set on /tmp partition" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, tmp] +cis_id: "1.1.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.4 Ensure nosuid option set on /tmp partition (Automated) + +## Description + +The `nosuid` mount option specifies that the filesystem cannot contain `setuid` files. + +## Rationale + +Since the `/tmp` filesystem is only intended for temporary file storage, set this option to ensure that users cannot create `setuid` files in `/tmp`. + +## Audit Procedure + +Verify that the `nosuid` option is set if a `/tmp` partition exists. +Run the following command and verify that nothing is returned: + +```bash +# mount | grep -E '\s/tmp\s' | grep -v nosuid +``` + +## Expected Result + +The command should return no output, confirming that the `nosuid` option is set on the `/tmp` partition. + +## Remediation + +Run the following command to remount `/tmp`: + +```bash +# mount -o remount,nosuid /tmp +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 5.1 Establish Secure Configurations - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.5/SKILL.md new file mode 100644 index 0000000000..7fcd07bd25 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.5/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-1.1.5 +description: "Ensure noexec option set on /tmp partition" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, tmp] +cis_id: "1.1.5" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.5 Ensure noexec option set on /tmp partition (Automated) + +## Description + +The `noexec` mount option specifies that the filesystem cannot contain executable binaries. + +## Rationale + +Since the `/tmp` filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from `/tmp`. + +## Audit Procedure + +Verify that the `noexec` option is set if a `/tmp` partition exists. +Run the following command and verify that nothing is returned: + +```bash +# mount | grep -E '\s/tmp\s' | grep -v noexec +``` + +## Expected Result + +The command should return no output, confirming that the `noexec` option is set on the `/tmp` partition. + +## Remediation + +Run the following command to remount `/tmp`: + +```bash +# mount -o remount,noexec /tmp +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.3 Address Unauthorized Software - Ensure that unauthorized software is either removed from use on enterprise assets or receives a documented exception. Review monthly, or more frequently. | x | x | x | +| v7 | 2.6 Address unapproved software - Ensure that unauthorized software is either removed or the inventory is updated in a timely manner. | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.6/SKILL.md new file mode 100644 index 0000000000..91ee30afcc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.6/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-1.1.6 +description: "Ensure nosuid option set on /var partition" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, var] +cis_id: "1.1.6" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.6 Ensure nosuid option set on /var partition (Automated) + +## Description + +The `nosuid` mount option specifies that the filesystem cannot contain `setuid` files. + +## Rationale + +Since the `/var` filesystem is only intended for temporary dynamic data, set this option to ensure that users cannot create `setuid` files in `/var`. + +## Audit Procedure + +Verify that the `nosuid` option is set if a `/var` partition exists. +Run the following command and verify that nothing is returned: + +```bash +# mount | grep -E '\s/var\s' | grep -v nosuid +``` + +## Expected Result + +The command should return no output, confirming that the `nosuid` option is set on the `/var` partition. + +## Remediation + +Run the following command to remount `/var`: + +```bash +# mount -o remount,nosuid /var +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 5.1 Establish Secure Configurations - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +Level 2 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.7/SKILL.md new file mode 100644 index 0000000000..f0c6c1ba12 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.7/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-1.1.7 +description: "Ensure noexec option set on /var partition" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, var] +cis_id: "1.1.7" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.7 Ensure noexec option set on /var partition (Automated) + +## Description + +The `noexec` mount option specifies that the filesystem cannot contain executable binaries. + +## Rationale + +Since the `/var` filesystem is only intended for services to write data and not execute, set this option to ensure that users cannot run executable binaries from `/var`. + +## Audit Procedure + +Verify that the `noexec` option is set if a `/var` partition exists. +Run the following command and verify that nothing is returned: + +```bash +# mount | grep -E '\s/var\s' | grep -v noexec +``` + +## Expected Result + +The command should return no output, confirming that the `noexec` option is set on the `/var` partition. + +## Remediation + +Run the following command to remount `/var`: + +```bash +# mount -o remount,noexec /var +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.3 Address Unauthorized Software - Ensure that unauthorized software is either removed from use on enterprise assets or receives a documented exception. Review monthly, or more frequently. | x | x | x | +| v7 | 2.6 Address unapproved software - Ensure that unauthorized software is either removed or the inventory is updated in a timely manner. | x | x | x | + +## Profile + +Level 2 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.8/SKILL.md new file mode 100644 index 0000000000..b864b94804 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.8/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-1.1.8 +description: "Ensure nodev option set on /var partition" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, var] +cis_id: "1.1.8" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.8 Ensure nodev option set on /var partition (Automated) + +## Description + +The `nodev` mount option specifies that the filesystem cannot contain special devices. + +## Rationale + +Since the `/var` filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in `/var`. + +## Audit Procedure + +Verify that the `nodev` option is set if a `/var` partition exists. +Run the following command and verify that nothing is returned: + +```bash +# mount | grep -E '\s/var\s' | grep -v nodev +``` + +## Expected Result + +The command should return no output, confirming that the `nodev` option is set on the `/var` partition. + +## Remediation + +Run the following command to remount `/var`: + +```bash +# mount -o remount,nodev /var +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 5.1 Establish Secure Configurations - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +Level 2 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.9/SKILL.md new file mode 100644 index 0000000000..900075e12a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.1.9/SKILL.md @@ -0,0 +1,63 @@ +--- +name: cis-gcp-cos-1.1.9 +description: "Ensure nodev option set on /home partition" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, filesystem, partitions, mount-options, home] +cis_id: "1.1.9" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.9 Ensure nodev option set on /home partition (Automated) + +## Description + +The `nodev` mount option specifies that the filesystem cannot contain special devices. + +## Rationale + +Since the user partitions are not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices. + +## Audit Procedure + +Verify that the `nodev` option is set if a `/home` partition exists. +Run the following command and verify that nothing is returned: + +```bash +# mount | grep -E '\s/home\s' | grep -v nodev +``` + +## Expected Result + +The command should return no output, confirming that the `nodev` option is set on the `/home` partition. + +## Remediation + +Run the following command to remount /home: + +```bash +# mount -o remount,nodev /home +``` + +**Note:** `/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## Default Value + +The actions in this recommendation refer to the `/home` partition, which is the default user partition that is defined in many distributions. If you have created other user partitions, it is recommended that the Remediation and Audit steps be applied to these partitions as well. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 5.1 Establish Secure Configurations - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.2.1/SKILL.md new file mode 100644 index 0000000000..72c10f9c86 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.2.1/SKILL.md @@ -0,0 +1,62 @@ +--- +name: cis-gcp-cos-1.2.1 +description: "Ensure dm-verity is enabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, dm-verity, integrity, filesystem] +cis_id: "1.2.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.2.1 Ensure dm-verity is enabled (Automated) + +## Description + +device-mapper-verity (dm-verity) kernel feature provides transparent integrity checking of block devices using a cryptographic digest provided by the kernel crypto API. When a dm-verity device is configured, it is expected that the caller has been authenticated in some way (cryptographic signatures, etc). After instantiation, all hashes will be verified on-demand during disk access. If they cannot be verified up to the root node of the tree, the root hash, then the I/O will fail. This should detect tampering with any data on the device and the hash data. + +## Rationale + +The Container-Optimized OS root filesystem is always mounted as read-only. Additionally, its checksum is computed at build time and verified by the kernel on each boot. This mechanism prevents against attackers from "owning" the machine through permanent local changes. + +## Audit Procedure + +Verify dm-verity is enabled in kernel config with the following command: + +```bash +# zcat /proc/config.gz | grep CONFIG_DM_VERITY +CONFIG_DM_VERITY=y +``` + +## Expected Result + +The output should show `CONFIG_DM_VERITY=y`. + +## Remediation + +An OS image update that has the dm-verity enabled kernel is required. + +## References + +1. AIDE stable manual: http://aide.sourceforge.net/stable/manual.html + +## Additional Information + +The prelinking feature can interfere with AIDE because it alters binaries to speed up their start up times. Run `prelink -ua` to restore the binaries to their prelinked state, thus avoiding false positives from AIDE. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.14 Log Sensitive Data Access | | | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 14.9 Enforce Detail Logging for Access or Changes to Sensitive Data | | | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.3.1/SKILL.md new file mode 100644 index 0000000000..e95292acc3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.3.1/SKILL.md @@ -0,0 +1,58 @@ +--- +name: cis-gcp-cos-1.3.1 +description: "Ensure authentication required for single user mode" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, secure-boot, authentication, single-user-mode] +cis_id: "1.3.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.3.1 Ensure authentication required for single user mode (Automated) + +## Description + +Single user mode (rescue mode) is used for recovery when the system detects an issue during boot or by manual selection from the bootloader. + +## Rationale + +Requiring authentication in single user mode (rescue mode) prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials. + +## Audit Procedure + +Run the following commands and verify that `/sbin/sulogin` or `/usr/sbin/sulogin` is used as shown: + +```bash +# grep /systemd-sulogin-shell /usr/lib/systemd/system/rescue.service + +ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue + +# grep /systemd-sulogin-shell /usr/lib/systemd/system/emergency.service + +ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency +``` + +## Expected Result + +The output should show `ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue` for rescue.service and `ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency` for emergency.service. + +## Remediation + +Rootfs is read-only file system. Therefore, update to an OS image which requires single user mode authentication. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.7 Manage Default Accounts on Enterprise Assets and Software | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.4.1/SKILL.md new file mode 100644 index 0000000000..6007584381 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.4.1/SKILL.md @@ -0,0 +1,91 @@ +--- +name: cis-gcp-cos-1.4.1 +description: "Ensure core dumps are restricted" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, core-dumps, process-hardening] +cis_id: "1.4.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.4.1 Ensure core dumps are restricted (Automated) + +## Description + +A core dump is the memory of an executable program. It is generally used to determine why a program aborted. It can also be used to glean confidential information from a core file. The system provides the ability to set a soft limit for core dumps, but this can be overridden by the user. + +## Rationale + +Setting a hard limit on core dumps prevents users from overriding the soft variable. If core dumps are required, consider setting limits for user groups (see `limits.conf(5)`). In addition, setting the `fs.suid_dumpable` variable to 0 will prevent setuid programs from dumping core. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# grep "hard core" /etc/security/limits.conf /etc/security/limits.d/* +* hard core 0 + +# sysctl fs.suid_dumpable +fs.suid_dumpable = 0 +``` + +Run the following commands to check if systemd-coredump is installed: + +```bash +# systemctl is-enabled systemd-coredump@.service +# systemctl is-enabled systemd-coredump.socket +``` + +If `static` is returned systemd-coredump is installed. + +## Expected Result + +- `* hard core 0` should be present in limits.conf or limits.d files. +- `fs.suid_dumpable = 0` should be the output of sysctl. +- systemd-coredump should not be enabled unless properly configured. + +## Remediation + +Add the following line to `/etc/security/limits.conf` or a `/etc/security/limits.d/*` file: + +``` +* hard core 0 +``` + +Run the following command to set the active kernel parameter: + +```bash +# sysctl -w fs.suid_dumpable=0 +``` + +If systemd-coredump@ is installed, edit `/etc/systemd/coredump.conf` and add/modify the following lines: + +``` +Storage=none +ProcessSizeMax=0 +``` + +Run the command: + +```bash +systemctl daemon-reload +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 2 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.4.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.4.2/SKILL.md new file mode 100644 index 0000000000..c00f74b4ae --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.4.2/SKILL.md @@ -0,0 +1,66 @@ +--- +name: cis-gcp-cos-1.4.2 +description: "Ensure XD/NX support is enabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, xd-nx, process-hardening, buffer-overflow] +cis_id: "1.4.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.4.2 Ensure XD/NX support is enabled (Automated) + +## Description + +The NX bit (no-execute) is a technology used in CPUs to segregate areas of memory for use by either storage of processor instructions or for storage of data. An operating system with support for the NX bit may mark certain areas of memory as non-executable. The processor will then refuse to execute any code residing in these areas of memory. This ability can help prevent exploitation of buffer overflow vulnerabilities and should be activated whenever possible. + +Recent processors in the x86 family support the ability to prevent code execution on a per memory page basis. On AMD processors, this ability is called No Execute (NX), on Intel processors it is called Execute Disable (XD) and on ARM processors it is called Execute Never (XN). Extra steps must be taken to ensure that this protection is enabled, particularly on 32-bit x86 systems. Other processors, such as Itanium and POWER, have included such support since inception and the standard kernel for those platforms supports the feature. Starting from ARMv6, the XN bit is supported by default and the kernel cannot disable it. For this reason, this recommend is not applicable for Container-Optimized OS ARM images. + +## Rationale + +Enabling any feature that can protect against buffer overflow attacks enhances the security of the system. + +## Audit Procedure + +Run the following command and verify your kernel has identified and activated NX/XD protection: + +```bash +# journalctl | grep 'protection: active' + +kernel: NX (Execute Disable) protection: active +``` + +OR on systems without journalctl: + +```bash +[[ -n $(grep noexec[0-9]*=off /proc/cmdline) || -z $(grep -E -i ' (pae|nx) ' /proc/cpuinfo) || -n $(grep '\sNX\s.*\sprotection:\s' /var/log/dmesg | grep -v active) ]] && echo "NX Protection is not active" +``` + +## Expected Result + +The output should show `kernel: NX (Execute Disable) protection: active`. Nothing should be returned from the alternative command. + +## Remediation + +On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit systems. If necessary configure your bootloader to load the new kernel and reboot the system. You may need to enable NX or XD support in your bios. + +## Additional Information + +Ensure your system supports the XD or NX bit and has PAE support before implementing this recommendation as this may prevent it from booting if these are not supported by your hardware. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 10.5 Enable Anti-Exploitation Features | | x | x | +| v7 | 8.3 Enable Operating System Anti-Exploitation Features/Deploy Anti-Exploit Technologies | | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.4.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.4.3/SKILL.md new file mode 100644 index 0000000000..9c8ac966fd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.4.3/SKILL.md @@ -0,0 +1,66 @@ +--- +name: cis-gcp-cos-1.4.3 +description: "Ensure address space layout randomization (ASLR) is enabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, aslr, process-hardening, exploit-mitigation] +cis_id: "1.4.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.4.3 Ensure address space layout randomization (ASLR) is enabled (Automated) + +## Description + +Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process. + +## Rationale + +Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting. + +## Audit Procedure + +Run the following command and verify output matches: + +```bash +# sysctl kernel.randomize_va_space +kernel.randomize_va_space = 2 + +# grep "kernel\.randomize_va_space" /etc/sysctl.conf /etc/sysctl.d/* +kernel.randomize_va_space = 2 +``` + +## Expected Result + +`kernel.randomize_va_space = 2` should be the output of both commands. + +## Remediation + +Set the following parameter in `/etc/sysctl.conf` or a `/etc/sysctl.d/*` file: + +``` +kernel.randomize_va_space = 2 +``` + +Run the following command to set the active kernel parameter: + +```bash +# sysctl -w kernel.randomize_va_space=2 +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 10.5 Enable Anti-Exploitation Features | | x | x | +| v7 | 8.3 Enable Operating System Anti-Exploitation Features/Deploy Anti-Exploit Technologies | | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.1/SKILL.md new file mode 100644 index 0000000000..462656426b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.1/SKILL.md @@ -0,0 +1,61 @@ +--- +name: cis-gcp-cos-1.5.1.1 +description: "Ensure message of the day is configured properly" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, banners, motd, information-disclosure] +cis_id: "1.5.1.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.5.1.1 Ensure message of the day is configured properly (Automated) + +## Description + +The contents of the `/etc/motd` file are displayed to users after login and function as a message of the day for authenticated users. + +Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If `mingetty(8)` supports the following options, they display operating system information: `\m` - machine architecture `\r` - operating system release `\s` - operating system name `\v` - operating system version + +## Rationale + +Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the `uname -a` command once they have logged in. + +## Audit Procedure + +Run the following command and verify that the contents match site policy: + +```bash +# cat /etc/motd +``` + +Run the following command and verify no results are returned: + +```bash +# grep -E -i "(\\v|\\r|\\m|\\s|$(grep '^ID=' /etc/os-release | cut -d= -f2 | sed -e 's/"//g'))" /etc/motd +``` + +## Expected Result + +The `/etc/motd` file should contain the appropriate site policy message. The grep command should return no results (no OS information leakage). + +## Remediation + +Edit the `/etc/motd` file with the appropriate contents according to your site policy, remove any instances of `\m`, `\r`, `\s`, `\v` or references to the `OS platform`. + +`/etc` is stateless on Container-Optimized OS. Therefore, the steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 2 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.2/SKILL.md new file mode 100644 index 0000000000..dfc81a986f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.2/SKILL.md @@ -0,0 +1,65 @@ +--- +name: cis-gcp-cos-1.5.1.2 +description: "Ensure local login warning banner is configured properly" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, banners, login-banner, information-disclosure] +cis_id: "1.5.1.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.5.1.2 Ensure local login warning banner is configured properly (Automated) + +## Description + +The contents of the `/etc/issue` file are displayed to users prior to login for local terminals. + +Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If `mingetty(8)` supports the following options, they display operating system information: `\m` - machine architecture `\r` - operating system release `\s` - operating system name `\v` - operating system version - or the operating system's name + +## Rationale + +Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the `uname -a` command once they have logged in. + +## Audit Procedure + +Run the following command and verify that the contents match site policy: + +```bash +# cat /etc/issue +``` + +Run the following command and verify no results are returned: + +```bash +# grep -E -i "(\\v|\\r|\\m|\\s|$(grep '^ID=' /etc/os-release | cut -d= -f2 | sed -e 's/"//g'))" /etc/issue +``` + +## Expected Result + +The `/etc/issue` file should contain the appropriate site policy message. The grep command should return no results (no OS information leakage). + +## Remediation + +Edit the `/etc/issue` file with the appropriate contents according to your site policy, remove any instances of `\m`, `\r`, `\s`, `\v` or references to the `OS platform`. + +```bash +# echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, the steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.3/SKILL.md new file mode 100644 index 0000000000..1325839fb5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.3/SKILL.md @@ -0,0 +1,65 @@ +--- +name: cis-gcp-cos-1.5.1.3 +description: "Ensure remote login warning banner is configured properly" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, banners, login-banner, remote-login, information-disclosure] +cis_id: "1.5.1.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.5.1.3 Ensure remote login warning banner is configured properly (Automated) + +## Description + +The contents of the `/etc/issue.net` file are displayed to users prior to login for remote connections from configured services. + +Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If `mingetty(8)` supports the following options, they display operating system information: `\m` - machine architecture `\r` - operating system release `\s` - operating system name `\v` - operating system version + +## Rationale + +Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the `uname -a` command once they have logged in. + +## Audit Procedure + +Run the following command and verify that the contents match site policy: + +```bash +# cat /etc/issue.net +``` + +Run the following command and verify no results are returned: + +```bash +# grep -E -i "(\\v|\\r|\\m|\\s|$(grep '^ID=' /etc/os-release | cut -d= -f2 | sed -e 's/"//g'))" /etc/issue.net +``` + +## Expected Result + +The `/etc/issue.net` file should contain the appropriate site policy message. The grep command should return no results (no OS information leakage). + +## Remediation + +Edit the `/etc/issue.net` file with the appropriate contents according to your site policy, remove any instances of `\m`, `\r`, `\s`, `\v` or references to the `OS platform`. + +```bash +# echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue.net +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, the steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.4/SKILL.md new file mode 100644 index 0000000000..d15d7c865e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.4/SKILL.md @@ -0,0 +1,60 @@ +--- +name: cis-gcp-cos-1.5.1.4 +description: "Ensure permissions on /etc/motd are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, banners, motd, file-permissions] +cis_id: "1.5.1.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.5.1.4 Ensure permissions on /etc/motd are configured (Automated) + +## Description + +The contents of the `/etc/motd` file are displayed to users after login and function as a message of the day for authenticated users. + +## Rationale + +If the `/etc/motd` file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information. + +## Audit Procedure + +Run the following command and verify `Uid` and `Gid` are both `0/root` and `Access` is `644`: + +```bash +# stat /etc/motd +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +The output should show `Access: (0644/-rw-r--r--)`, `Uid: ( 0/ root)`, and `Gid: ( 0/ root)`. + +## Remediation + +Run the following commands to set permissions on `/etc/motd`: + +```bash +# chown root:root /etc/motd +# chmod 644 /etc/motd +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, the steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 2 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.5/SKILL.md new file mode 100644 index 0000000000..5e69e63891 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.5/SKILL.md @@ -0,0 +1,60 @@ +--- +name: cis-gcp-cos-1.5.1.5 +description: "Ensure permissions on /etc/issue are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, banners, login-banner, file-permissions] +cis_id: "1.5.1.5" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.5.1.5 Ensure permissions on /etc/issue are configured (Automated) + +## Description + +The contents of the `/etc/issue` file are displayed to users prior to login for local terminals. + +## Rationale + +If the `/etc/issue` file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information. + +## Audit Procedure + +Run the following command and verify `Uid` and `Gid` are both `0/root` and `Access` is `644`: + +```bash +# stat /etc/issue +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +The output should show `Access: (0644/-rw-r--r--)`, `Uid: ( 0/ root)`, and `Gid: ( 0/ root)`. + +## Remediation + +Run the following commands to set permissions on `/etc/issue`: + +```bash +# chown root:root /etc/issue +# chmod 644 /etc/issue +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, the steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.6/SKILL.md new file mode 100644 index 0000000000..6c59531a27 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.5.1.6/SKILL.md @@ -0,0 +1,60 @@ +--- +name: cis-gcp-cos-1.5.1.6 +description: "Ensure permissions on /etc/issue.net are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, banners, login-banner, remote-login, file-permissions] +cis_id: "1.5.1.6" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.5.1.6 Ensure permissions on /etc/issue.net are configured (Automated) + +## Description + +The contents of the `/etc/issue.net` file are displayed to users prior to login for remote connections from configured services. + +## Rationale + +If the `/etc/issue.net` file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information. + +## Audit Procedure + +Run the following command and verify `Uid` and `Gid` are both `0/root` and `Access` is `644`: + +```bash +# stat /etc/issue.net +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +The output should show `Access: (0644/-rw-r--r--)`, `Uid: ( 0/ root)`, and `Gid: ( 0/ root)`. + +## Remediation + +Run the following commands to set permissions on `/etc/issue.net`: + +```bash +# chown root:root /etc/issue.net +# chmod 644 /etc/issue.net +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, the steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 2 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.6/SKILL.md new file mode 100644 index 0000000000..4d61f91cea --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-1.6/SKILL.md @@ -0,0 +1,57 @@ +--- +name: cis-gcp-cos-1.6 +description: "Ensure AppArmor is installed" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, apparmor, mandatory-access-control] +cis_id: "1.6" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.6 Ensure AppArmor is installed (Automated) + +## Description + +SELinux and AppArmor provide Mandatory Access Controls. + +## Rationale + +Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available. + +## Audit Procedure + +Verify that AppArmor is installed with the following command: + +```bash +# grep '\"name\": \"apparmor\"' /etc/cos-package-info.json +"name": "apparmor", +``` + +## Expected Result + +The output should show `"name": "apparmor",` confirming AppArmor is installed. + +## Remediation + +Update to an OS image that includes the apparmor package. + +## Additional Information + +SELinux and AppArmor both have several package names in use on different distributions. Research the appropriate packages for your environment. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 - Server | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.1.1/SKILL.md new file mode 100644 index 0000000000..9d05c2e7f7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.1.1/SKILL.md @@ -0,0 +1,61 @@ +--- +name: cis-gcp-cos-2.1.1.1 +description: "Ensure time synchronization is in use" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, time-synchronization, chrony, ntp, services] +cis_id: "2.1.1.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1.1.1 Ensure time synchronization is in use (Manual) + +## Description + +System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them. + +## Rationale + +Time synchronization is important to support time sensitive security mechanisms like Kerberos and also ensures log files have consistent time records across the enterprise, which aids in forensic investigations. + +## Audit Procedure + +On physical systems or virtual systems where host based time synchronization is not available verify that chrony is installed with the following command: + +```bash +# grep '\"name\": \"chrony\"' /etc/cos-package-info.json + +"name": "chrony", +``` + +On virtual systems where host based time synchronization is available consult your virtualization software documentation and verify that host based synchronization is in use. + +## Expected Result + +The command should return `"name": "chrony",` confirming chrony is installed. On virtual systems with host-based time synchronization, verify that host-based synchronization is active. + +## Remediation + +On physical systems or virtual systems where host based time synchronization is not available update to an image that comes with chrony package installed. +On virtual systems where host based time synchronization is available consult your virtualization software documentation and setup host based synchronization. + +**Additional Information:** + +systemd-timesyncd is part of systemd. Some versions of systemd have been compiled without systemd-timesycnd. On these distributions, chrony or NTP should be used instead of systemd-timesycnd. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **8.4 Standardize Time Synchronization** - Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported. | | X | X | +| v7 | **6.1 Utilize Three Synchronized Time Sources** - Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent. | | X | X | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.1.2/SKILL.md new file mode 100644 index 0000000000..fe1de475f5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.1.2/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gcp-cos-2.1.1.2 +description: "Ensure chrony is configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, time-synchronization, chrony, ntp, services] +cis_id: "2.1.1.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1.1.2 Ensure chrony is configured (Automated) + +## Description + +chrony is a daemon which implements the Network Time Protocol (NTP) is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on chrony can be found at http://chrony.tuxfamily.org/. chrony can be configured to be a client and/or a server. + +## Rationale + +If chrony is in use on the system proper configuration is vital to ensuring time synchronization is working properly. + +This recommendation only applies if chrony is in use on the system. + +## Audit Procedure + +Run the following command and verify remote server is configured properly: + +```bash +# grep -E "^(server|pool)" /etc/chrony/chrony.conf +server +``` + +Multiple servers may be configured. + +Run the following command and verify the first field for the `chronyd` process is `ntp` or `chrony`: + +```bash +# ps -ef | grep chronyd +ntp 491 1 0 20:32 ? 00:00:00 /usr/sbin/chronyd +``` + +Or + +```bash +# ps -ef | grep chronyd +chrony 491 1 0 20:32 ? 00:00:00 /usr/sbin/chronyd +``` + +## Expected Result + +The `grep` command should return a configured server or pool entry. The `ps` command should show `chronyd` running under the `ntp` or `chrony` user. + +## Remediation + +Update to an OS image that has the correct chrony configuration. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **8.4 Standardize Time Synchronization** - Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported. | | X | X | +| v7 | **6.1 Utilize Three Synchronized Time Sources** - Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent. | | X | X | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.2/SKILL.md new file mode 100644 index 0000000000..faf9ec4754 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.2/SKILL.md @@ -0,0 +1,56 @@ +--- +name: cis-gcp-cos-2.1.2 +description: "Ensure X Window System is not installed" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, x-window, services] +cis_id: "2.1.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1.2 Ensure X Window System is not installed (Automated) + +## Description + +The X Window System provides a Graphical User Interface (GUI) where users can have multiple windows in which to run programs and various add on. The X Windows system is typically used on workstations where users login, but not on servers where users typically do not login. + +## Rationale + +Unless your organization specifically requires graphical login access via X Windows, remove it to reduce the potential attack surface. + +## Impact + +Many Linux systems run applications which require a Java runtime. Some Linux Java packages have a dependency on specific X Windows xorg-x11-fonts. One workaround to avoid this dependency is to use the "headless" Java packages for your specific Java runtime, if provided by your distribution. + +## Audit Procedure + +Verify X Windows System is not installed. The following command should return empty result. + +```bash +# grep xorg /etc/cos-package-info.json +``` + +## Expected Result + +The command should return no output, confirming that X Window System packages are not installed. + +## Remediation + +An OS image update that does not include X Window System is required. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **2.3 Address Unauthorized Software** - Ensure that unauthorized software is either removed from use on enterprise assets or receives a documented exception. Review monthly, or more frequently. | X | X | X | +| v7 | **2.6 Address unapproved software** - Ensure that unauthorized software is either removed or the inventory is updated in a timely manner | X | X | X | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.3/SKILL.md new file mode 100644 index 0000000000..a47ae451bd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.3/SKILL.md @@ -0,0 +1,72 @@ +--- +name: cis-gcp-cos-2.1.3 +description: "Ensure NFS and RPC are not enabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, nfs, rpc, services] +cis_id: "2.1.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1.3 Ensure NFS and RPC are not enabled (Automated) + +## Description + +The Network File System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network. + +## Rationale + +If the system does not export NFS shares or act as an NFS client, it is recommended that these services be disabled to reduce the remote attack surface. + +## Audit Procedure + +Run the following commands to verify the `nfs-server` and `rpcbind` are not enabled: + +```bash +# systemctl is-enabled nfs-server + +disabled +# systemctl is-enabled rpcbind + +disabled +``` + +Verify result is not "enabled" for both. + +## Expected Result + +Both commands should return `disabled`, confirming that NFS and RPC services are not enabled. + +## Remediation + +Run the following commands to disable the `nfs-server` and `rpcbind`: + +```bash +# systemctl --now disable nfs-server +# systemctl --now disable rpcbind +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, the steps mentioned above needs to be performed after every boot. + +**Additional Information:** + +Additional methods of disabling a service exist. Consult your distribution documentation for appropriate methods. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **4.4 Implement and Manage a Firewall on Servers** - Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent. | X | X | X | +| v8 | **4.5 Implement and Manage a Firewall on End-User Devices** - Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed. | X | X | X | +| v8 | **4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software** - Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function. | | X | X | +| v7 | **9.2 Ensure Only Approved Ports, Protocols and Services Are Running** - Ensure that only network ports, protocols, and services listening on a system with validated business needs, are running on each system. | | X | X | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.4/SKILL.md new file mode 100644 index 0000000000..7853922abf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-2.1.4/SKILL.md @@ -0,0 +1,69 @@ +--- +name: cis-gcp-cos-2.1.4 +description: "Ensure rsync service is not enabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, rsync, services] +cis_id: "2.1.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1.4 Ensure rsync service is not enabled (Automated) + +## Description + +The `rsyncd` service can be used to synchronize files between systems over network links. + +## Rationale + +The `rsyncd` service presents a security risk as it uses unencrypted protocols for communication. + +## Audit Procedure + +Run the following command to verify `rsyncd` is not enabled: + +```bash +# systemctl is-enabled rsyncd +disabled +``` + +Verify result is not "enabled". + +## Expected Result + +The command should return `disabled`, confirming that the rsync service is not enabled. + +## Remediation + +Run the following command to disable `rsyncd`: + +```bash +# systemctl --now disable rsyncd +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, the steps mentioned above needs to be performed after every boot. + +**Additional Information:** + +Additional methods of disabling a service exist. Consult your distribution documentation for appropriate methods. + +On some distributions the rsync service is known as `rsync`, not `rsyncd`. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **4.4 Implement and Manage a Firewall on Servers** - Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent. | X | X | X | +| v8 | **4.5 Implement and Manage a Firewall on End-User Devices** - Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed. | X | X | X | +| v8 | **4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software** - Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function. | | X | X | +| v7 | **9.2 Ensure Only Approved Ports, Protocols and Services Are Running** - Ensure that only network ports, protocols, and services listening on a system with validated business needs, are running on each system. | | X | X | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.1.1/SKILL.md new file mode 100644 index 0000000000..534f7ee7c4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.1.1/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-gcp-cos-3.1.1 +description: "Ensure packet redirect sending is disabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, network, sysctl, icmp, routing] +cis_id: "3.1.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.1 Ensure packet redirect sending is disabled (Automated) + +## Description + +ICMP Redirects are used to send routing information to other hosts. As a host itself does not act as a router (in a host only configuration), there is no need to send redirects. + +## Rationale + +An attacker could use a compromised host to send invalid ICMP redirects to other router devices in an attempt to corrupt routing and have users access a system set up by the attacker as opposed to a valid system. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# sysctl net.ipv4.conf.all.send_redirects +net.ipv4.conf.all.send_redirects = 0 +# sysctl net.ipv4.conf.default.send_redirects +net.ipv4.conf.default.send_redirects = 0 +# grep "net\.ipv4\.conf\.all\.send_redirects" /etc/sysctl.conf /etc/sysctl.d/* +net.ipv4.conf.all.send_redirects = 0 +# grep "net\.ipv4\.conf\.default\.send_redirects" /etc/sysctl.conf /etc/sysctl.d/* +net.ipv4.conf.default.send_redirects= 0 +``` + +## Expected Result + +All sysctl commands should return a value of `0` and grep commands should confirm the settings are persisted in configuration files. + +## Remediation + +Set the following parameters in `/etc/sysctl.conf` or a `/etc/sysctl.d/*` file: + +``` +net.ipv4.conf.all.send_redirects = 0 +net.ipv4.conf.default.send_redirects = 0 +``` + +Run the following commands to set the active kernel parameters: + +```bash +# sysctl -w net.ipv4.conf.all.send_redirects=0 +# sysctl -w net.ipv4.conf.default.send_redirects=0 +# sysctl -w net.ipv4.route.flush=1 +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **12.3 Securely Manage Network Infrastructure** - Securely manage network infrastructure. Example implementations include version-controlled-infrastructure-as-code, and the use of secure network protocols, such as SSH and HTTPS. | | X | X | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | X | X | X | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.1/SKILL.md new file mode 100644 index 0000000000..b9512f6bd1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.1/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-gcp-cos-3.2.1 +description: "Ensure source routed packets are not accepted" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, network, sysctl, routing, ipv6] +cis_id: "3.2.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2.1 Ensure source routed packets are not accepted (Automated) + +## Description + +In networking, source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network. In some cases, systems may not be routable or reachable from some locations (e.g. private addresses vs. Internet routable), and so source routed packets would need to be used. + +## Rationale + +Setting `net.ipv4.conf.all.accept_source_route`, `net.ipv4.conf.default.accept_source_route`, `net.ipv6.conf.all.accept_source_route` and `net.ipv6.conf.default.accept_source_route` to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# sysctl net.ipv4.conf.all.accept_source_route + +net.ipv4.conf.all.accept_source_route = 0 +# sysctl net.ipv4.conf.default.accept_source_route + +net.ipv4.conf.default.accept_source_route = 0 +# sysctl net.ipv6.conf.all.accept_source_route + +net.ipv6.conf.all.accept_source_route = 0 +# sysctl net.ipv6.conf.default.accept_source_route + +net.ipv6.conf.default.accept_source_route = 0 +``` + +## Expected Result + +All four sysctl commands should return a value of `0`, confirming that source routed packets are not accepted for both IPv4 and IPv6. + +## Remediation + +Run the following commands to set the active kernel parameters: + +```bash +# sysctl -w net.ipv4.conf.all.accept_source_route=0 +# sysctl -w net.ipv4.conf.default.accept_source_route=0 +# sysctl -w net.ipv6.conf.all.accept_source_route=0 +# sysctl -w net.ipv6.conf.default.accept_source_route=0 +# sysctl -w net.ipv4.route.flush=1 +# sysctl -w net.ipv6.route.flush=1 +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **12.2 Establish and Maintain a Secure Network Architecture** - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | X | X | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | X | X | X | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.2/SKILL.md new file mode 100644 index 0000000000..a912ce9d7f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.2/SKILL.md @@ -0,0 +1,70 @@ +--- +name: cis-gcp-cos-3.2.2 +description: "Ensure ICMP redirects are not accepted" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, network, sysctl, icmp, routing, ipv6] +cis_id: "3.2.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2.2 Ensure ICMP redirects are not accepted (Automated) + +## Description + +ICMP redirect messages are packets that convey routing information and tell your host (acting as a router) to send packets via an alternate path. It is a way of allowing an outside routing device to update your system routing tables. By setting `net.ipv4.conf.all.accept_redirects` and `net.ipv6.conf.all.accept_redirects` to 0, the system will not accept any ICMP redirect messages, and therefore, won't allow outsiders to update the system's routing tables. + +## Rationale + +Attackers could use bogus ICMP redirect messages to maliciously alter the system routing tables and get them to send packets to incorrect networks and allow your system packets to be captured. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# sysctl net.ipv4.conf.all.accept_redirects +net.ipv4.conf.all.accept_redirects = 0 +# sysctl net.ipv4.conf.default.accept_redirects +net.ipv4.conf.default.accept_redirects = 0 +# sysctl net.ipv6.conf.all.accept_redirects +net.ipv6.conf.all.accept_redirects = 0 +# sysctl net.ipv6.conf.default.accept_redirects +net.ipv6.conf.default.accept_redirects = 0 +``` + +## Expected Result + +All four sysctl commands should return a value of `0`, confirming that ICMP redirects are not accepted for both IPv4 and IPv6. + +## Remediation + +Run the following commands to set the active kernel parameters: + +```bash +# sysctl -w net.ipv4.conf.all.accept_redirects=0 +# sysctl -w net.ipv4.conf.default.accept_redirects=0 +# sysctl -w net.ipv6.conf.all.accept_redirects=0 +# sysctl -w net.ipv6.conf.default.accept_redirects=0 +# sysctl -w net.ipv4.route.flush=1 +# sysctl -w net.ipv6.route.flush=1 +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **12.2 Establish and Maintain a Secure Network Architecture** - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | X | X | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | X | X | X | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.3/SKILL.md new file mode 100644 index 0000000000..168ab431af --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.3/SKILL.md @@ -0,0 +1,63 @@ +--- +name: cis-gcp-cos-3.2.3 +description: "Ensure secure ICMP redirects are not accepted" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, network, sysctl, icmp, routing] +cis_id: "3.2.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2.3 Ensure secure ICMP redirects are not accepted (Automated) + +## Description + +Secure ICMP redirects are the same as ICMP redirects, except they come from gateways listed on the default gateway list. It is assumed that these gateways are known to your system, and that they are likely to be secure. + +## Rationale + +It is still possible for even known gateways to be compromised. Setting `net.ipv4.conf.all.secure_redirects` to 0 protects the system from routing table updates by possibly compromised known gateways. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# sysctl net.ipv4.conf.all.secure_redirects +net.ipv4.conf.all.secure_redirects = 0 +# sysctl net.ipv4.conf.default.secure_redirects +net.ipv4.conf.default.secure_redirects = 0 +``` + +## Expected Result + +Both sysctl commands should return a value of `0`, confirming that secure ICMP redirects are not accepted. + +## Remediation + +Run the following commands to set the active kernel parameters: + +```bash +# sysctl -w net.ipv4.conf.all.secure_redirects=0 +# sysctl -w net.ipv4.conf.default.secure_redirects=0 +# sysctl -w net.ipv4.route.flush=1 +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **12.2 Establish and Maintain a Secure Network Architecture** - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | X | X | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | X | X | X | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.4/SKILL.md new file mode 100644 index 0000000000..1f1a4f2e9a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.4/SKILL.md @@ -0,0 +1,65 @@ +--- +name: cis-gcp-cos-3.2.4 +description: "Ensure suspicious packets are logged" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, network, sysctl, routing] +cis_id: "3.2.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2.4 Ensure suspicious packets are logged (Automated) + +## Description + +When enabled, this feature logs packets with un-routable source addresses to the kernel log. + +## Rationale + +Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# sysctl net.ipv4.conf.all.log_martians +net.ipv4.conf.all.log_martians = 1 +# sysctl net.ipv4.conf.default.log_martians +net.ipv4.conf.default.log_martians = 1 +``` + +## Expected Result + +Both sysctl commands should return a value of `1`, confirming that suspicious (martian) packets are being logged. + +## Remediation + +Run the following commands to set the active kernel parameters: + +```bash +# sysctl -w net.ipv4.conf.all.log_martians=1 +# sysctl -w net.ipv4.conf.default.log_martians=1 +# sysctl -w net.ipv4.route.flush=1 +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **8.2 Collect Audit Logs** - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | X | X | X | +| v8 | **8.5 Collect Detailed Audit Logs** - Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation. | | X | X | +| v7 | **6.2 Activate audit logging** - Ensure that local logging has been enabled on all systems and networking devices. | X | X | X | +| v7 | **6.3 Enable Detailed Logging** - Enable system logging to include detailed information such as an event source, date, user, timestamp, source addresses, destination addresses, and other useful elements. | | X | X | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.5/SKILL.md new file mode 100644 index 0000000000..3fe99c80ca --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.5/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-gcp-cos-3.2.5 +description: "Ensure broadcast ICMP requests are ignored" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, network, sysctl, icmp] +cis_id: "3.2.5" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2.5 Ensure broadcast ICMP requests are ignored (Automated) + +## Description + +Setting `net.ipv4.icmp_echo_ignore_broadcasts` to 1 will cause the system to ignore all ICMP echo and timestamp requests to broadcast and multicast addresses. + +## Rationale + +Accepting ICMP echo and timestamp requests with broadcast or multicast destinations for your network could be used to trick your host into starting (or participating) in a Smurf attack. A Smurf attack relies on an attacker sending large amounts of ICMP broadcast messages with a spoofed source address. All hosts receiving this message and responding would send echo-reply messages back to the spoofed address, which is probably not routable. If many hosts respond to the packets, the amount of traffic on the network could be significantly multiplied. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# sysctl net.ipv4.icmp_echo_ignore_broadcasts +net.ipv4.icmp_echo_ignore_broadcasts = 1 +# grep "net\.ipv4\.icmp_echo_ignore_broadcasts" /etc/sysctl.conf /etc/sysctl.d/* +net.ipv4.icmp_echo_ignore_broadcasts = 1 +``` + +## Expected Result + +The sysctl command should return a value of `1` and the grep command should confirm the setting is persisted in the sysctl configuration files. + +## Remediation + +Set the following parameters in `/etc/sysctl.conf` or a `/etc/sysctl.d/*` file: + +``` +net.ipv4.icmp_echo_ignore_broadcasts = 1 +``` + +Run the following commands to set the active kernel parameters: + +```bash +# sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 +# sysctl -w net.ipv4.route.flush=1 +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **12.2 Establish and Maintain a Secure Network Architecture** - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | X | X | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | X | X | X | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.6/SKILL.md new file mode 100644 index 0000000000..8ddb27b47c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.6/SKILL.md @@ -0,0 +1,70 @@ +--- +name: cis-gcp-cos-3.2.6 +description: "Ensure bogus ICMP responses are ignored" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, network, sysctl, icmp] +cis_id: "3.2.6" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2.6 Ensure bogus ICMP responses are ignored (Automated) + +## Description + +Setting `icmp_ignore_bogus_error_responses` to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages. + +## Rationale + +Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# sysctl net.ipv4.icmp_ignore_bogus_error_responses + +net.ipv4.icmp_ignore_bogus_error_responses = 1 +# grep "net.ipv4.icmp_ignore_bogus_error_responses" /etc/sysctl.conf /etc/sysctl.d/* + +net.ipv4.icmp_ignore_bogus_error_responses = 1 +``` + +## Expected Result + +The sysctl command should return a value of `1` and the grep command should confirm the setting is persisted in the sysctl configuration files. + +## Remediation + +Set the following parameter in `/etc/sysctl.conf` or a `/etc/sysctl.d/*` file: + +``` +net.ipv4.icmp_ignore_bogus_error_responses = 1 +``` + +Run the following commands to set the active kernel parameters: + +```bash +# sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 +# sysctl -w net.ipv4.route.flush=1 +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **12.2 Establish and Maintain a Secure Network Architecture** - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | X | X | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | X | X | X | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.7/SKILL.md new file mode 100644 index 0000000000..d6c93ba360 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.7/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-gcp-cos-3.2.7 +description: "Ensure Reverse Path Filtering is enabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, network, sysctl, routing] +cis_id: "3.2.7" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2.7 Ensure Reverse Path Filtering is enabled (Automated) + +## Description + +Setting `net.ipv4.conf.all.rp_filter` and `net.ipv4.conf.default.rp_filter` to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if `log_martians` is set). + +## Rationale + +Setting these flags is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# sysctl net.ipv4.conf.all.rp_filter +net.ipv4.conf.all.rp_filter = 1 +# sysctl net.ipv4.conf.default.rp_filter +net.ipv4.conf.default.rp_filter = 1 +# grep "net\.ipv4\.conf\.all\.rp_filter" /etc/sysctl.conf /etc/sysctl.d/* +net.ipv4.conf.all.rp_filter = 1 +# grep "net\.ipv4\.conf\.default\.rp_filter" /etc/sysctl.conf /etc/sysctl.d/* +net.ipv4.conf.default.rp_filter = 1 +``` + +## Expected Result + +All sysctl commands should return a value of `1` and grep commands should confirm the settings are persisted in the sysctl configuration files. + +## Remediation + +Set the following parameters in `/etc/sysctl.conf` or a `/etc/sysctl.d/*` file: + +``` +net.ipv4.conf.all.rp_filter = 1 +net.ipv4.conf.default.rp_filter = 1 +``` + +Run the following commands to set the active kernel parameters: + +```bash +# sysctl -w net.ipv4.conf.all.rp_filter=1 +# sysctl -w net.ipv4.conf.default.rp_filter=1 +# sysctl -w net.ipv4.route.flush=1 +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **12.2 Establish and Maintain a Secure Network Architecture** - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | X | X | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | X | X | X | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.8/SKILL.md new file mode 100644 index 0000000000..68c63b0ee4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.8/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-gcp-cos-3.2.8 +description: "Ensure TCP SYN Cookies is enabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, network, sysctl, tcp-syn-cookies] +cis_id: "3.2.8" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2.8 Ensure TCP SYN Cookies is enabled (Automated) + +## Description + +When `tcp_syncookies` is set, the kernel will handle TCP SYN packets normally until the half-open connection queue is full, at which time, the SYN cookie functionality kicks in. SYN cookies work by not using the SYN queue at all. Instead, the kernel simply replies to the SYN with a SYN|ACK, but will include a specially crafted TCP sequence number that encodes the source and destination IP address and port number and the time the packet was sent. A legitimate connection would send the ACK packet of the three way handshake with the specially crafted sequence number. This allows the system to verify that it has received a valid response to a SYN cookie and allow the connection, even though there is no corresponding SYN in the queue. + +## Rationale + +Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. SYN cookies allow the system to keep accepting valid connections, even if under a denial of service attack. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# sysctl net.ipv4.tcp_syncookies +net.ipv4.tcp_syncookies = 1 +# grep "net\.ipv4\.tcp_syncookies" /etc/sysctl.conf /etc/sysctl.d/* +net.ipv4.tcp_syncookies = 1 +``` + +## Expected Result + +The sysctl command should return a value of `1` and the grep command should confirm the setting is persisted in the sysctl configuration files. + +## Remediation + +Set the following parameters in `/etc/sysctl.conf` or a `/etc/sysctl.d/*` file: + +``` +net.ipv4.tcp_syncookies = 1 +``` + +Run the following commands to set the active kernel parameters: + +```bash +# sysctl -w net.ipv4.tcp_syncookies=1 +# sysctl -w net.ipv4.route.flush=1 +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **12.2 Establish and Maintain a Secure Network Architecture** - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | X | X | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | X | X | X | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.9/SKILL.md new file mode 100644 index 0000000000..60818c8bdb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.2.9/SKILL.md @@ -0,0 +1,62 @@ +--- +name: cis-gcp-cos-3.2.9 +description: "Ensure IPv6 router advertisements are not accepted" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, network, sysctl, ipv6, routing] +cis_id: "3.2.9" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2.9 Ensure IPv6 router advertisements are not accepted (Automated) + +## Description + +This setting disables the system's ability to accept IPv6 router advertisements. + +## Rationale + +It is recommended that systems do not accept router advertisements as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes. + +## Audit Procedure + +Run the following commands and verify output matches: + +```bash +# sysctl net.ipv6.conf.all.accept_ra +net.ipv6.conf.all.accept_ra = 0 +# sysctl net.ipv6.conf.default.accept_ra +net.ipv6.conf.default.accept_ra = 0 +``` + +## Expected Result + +Both sysctl commands should return a value of `0`, confirming that IPv6 router advertisements are not accepted. + +## Remediation + +Run the following commands to set the active kernel parameters: + +```bash +# sysctl -w net.ipv6.conf.all.accept_ra=0 +# sysctl -w net.ipv6.conf.default.accept_ra=0 +# sysctl -w net.ipv6.route.flush=1 +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **12.2 Establish and Maintain a Secure Network Architecture** - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | X | X | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.1/SKILL.md new file mode 100644 index 0000000000..24aa89f62c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.1/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-gcp-cos-3.3.1.1 +description: "Ensure IPv6 default deny firewall policy" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, firewall, ip6tables, ipv6, network-security, default-deny] +cis_id: "3.3.1.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.3.1.1 Ensure IPv6 default deny firewall policy (Automated) + +## Description + +A default deny all policy on connections ensures that any unconfigured network usage will be rejected. + +## Rationale + +With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage. + +## Impact + +Changing firewall settings while connected over network can result in being locked out of the system. + +Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well. + +## Audit Procedure + +Run the following command and verify that the policy for the INPUT, OUTPUT, and FORWARD chains is DROP or REJECT: + +```bash +ip6tables -L +``` + +## Expected Result + +``` +Chain INPUT (policy DROP) +Chain FORWARD (policy DROP) +Chain OUTPUT (policy DROP) +``` + +## Remediation + +Run the following commands to implement a default DROP policy: + +```bash +ip6tables -P INPUT DROP +ip6tables -P OUTPUT DROP +ip6tables -P FORWARD DROP +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **4.4 Implement and Manage a Firewall on Servers** - Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent. | x | x | x | +| v7 | **9.4 Apply Host-based Firewalls or Port Filtering** - Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.2/SKILL.md new file mode 100644 index 0000000000..ce4e4e985b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.2/SKILL.md @@ -0,0 +1,83 @@ +--- +name: cis-gcp-cos-3.3.1.2 +description: "Ensure IPv6 loopback traffic is configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, firewall, ip6tables, ipv6, network-security, loopback] +cis_id: "3.3.1.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.3.1.2 Ensure IPv6 loopback traffic is configured (Automated) + +## Description + +Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (::1). + +## Rationale + +Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (::1) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure. + +## Impact + +Changing firewall settings while connected over network can result in being locked out of the system. + +Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well. + +## Audit Procedure + +Run the following commands and verify output includes the listed rules in order (packet and byte counts may differ): + +```bash +ip6tables -L INPUT -v -n +``` + +``` +Chain INPUT (policy DROP 0 packets, 0 bytes) +pkts bytes target prot opt in out source destination + 0 0 ACCEPT all lo * ::/0 ::/0 + 0 0 DROP all * * ::1 ::/0 +``` + +```bash +ip6tables -L OUTPUT -v -n +``` + +``` +Chain OUTPUT (policy DROP 0 packets, 0 bytes) +pkts bytes target prot opt in out source destination + 0 0 ACCEPT all * lo ::/0 ::/0 +``` + +## Expected Result + +- INPUT chain accepts all traffic on loopback interface (`lo`) +- INPUT chain drops all traffic from source `::1` +- OUTPUT chain accepts all traffic on loopback interface (`lo`) + +## Remediation + +Run the following commands to implement the loopback rules: + +```bash +ip6tables -A INPUT -i lo -j ACCEPT +ip6tables -A OUTPUT -o lo -j ACCEPT +ip6tables -A INPUT -s ::1 -j DROP +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **4.4 Implement and Manage a Firewall on Servers** - Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent. | x | x | x | +| v7 | **9.4 Apply Host-based Firewalls or Port Filtering** - Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.3/SKILL.md new file mode 100644 index 0000000000..08ffe64a1b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.3/SKILL.md @@ -0,0 +1,67 @@ +--- +name: cis-gcp-cos-3.3.1.3 +description: "Ensure IPv6 outbound and established connections are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, firewall, ip6tables, ipv6, network-security, outbound, established-connections] +cis_id: "3.3.1.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.3.1.3 Ensure IPv6 outbound and established connections are configured (Manual) + +## Description + +Configure the firewall rules for new outbound, and established IPv6 connections. + +## Rationale + +If rules are not in place for new outbound, and established connections all packets will be dropped by the default policy preventing network usage. + +## Impact + +Changing firewall settings while connected over network can result in being locked out of the system. + +Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well. + +## Audit Procedure + +Run the following command and verify all rules for new outbound, and established connections match site policy: + +```bash +ip6tables -L -v -n +``` + +## Expected Result + +Verify that outbound and established connections are configured in accordance with site policy. The output should show rules allowing NEW and ESTABLISHED outbound connections and ESTABLISHED inbound connections for tcp, udp, and icmp protocols. + +## Remediation + +Configure iptables in accordance with site policy. The following commands will implement a policy to allow all outbound connections and all established connections: + +```bash +ip6tables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT +ip6tables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT +ip6tables -A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT +ip6tables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT +ip6tables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT +ip6tables -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **4.4 Implement and Manage a Firewall on Servers** - Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent. | x | x | x | +| v7 | **9.4 Apply Host-based Firewalls or Port Filtering** - Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.4/SKILL.md new file mode 100644 index 0000000000..2da8375436 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.1.4/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-gcp-cos-3.3.1.4 +description: "Ensure IPv6 firewall rules exist for all open ports" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, firewall, ip6tables, ipv6, network-security, open-ports] +cis_id: "3.3.1.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.3.1.4 Ensure IPv6 firewall rules exist for all open ports (Manual) + +## Description + +Any ports that have been opened on non-loopback addresses need firewall rules to govern traffic. + +## Rationale + +Without a firewall rule configured for open ports default firewall policy will drop all packets to these ports. + +## Impact + +Changing firewall settings while connected over network can result in being locked out of the system. + +Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well. + +The remediation command opens up the port to traffic from all sources. Consult iptables documentation and set any restrictions in compliance with site policy. + +## Audit Procedure + +Run the following command to determine open ports: + +```bash +ss -6tuln +``` + +Example output: + +``` +Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port +udp UNCONN 0 0 ::1:123 :::* +udp UNCONN 0 0 :::123 :::* +tcp LISTEN 0 128 :::22 :::* +tcp LISTEN 0 20 ::1:25 :::* +``` + +Run the following command to determine firewall rules: + +```bash +ip6tables -L INPUT -v -n +``` + +Example output: + +``` +Chain INPUT (policy DROP 0 packets, 0 bytes) + pkts bytes target prot opt in out source destination + 0 0 ACCEPT all lo * ::/0 ::/0 + 0 0 DROP all * * ::1 ::/0 + 0 0 ACCEPT tcp * * ::/0 ::/0 +tcp dpt:22 state NEW +``` + +Verify all open ports listening on non-localhost addresses have at least one firewall rule. The last line identified by the "tcp dpt:22 state NEW" identifies it as a firewall rule for new connections on tcp port 22. + +## Expected Result + +All open ports listening on non-localhost addresses should have at least one corresponding firewall rule allowing inbound connections. + +## Remediation + +For each port identified in the audit which does not have a firewall rule establish a proper rule for accepting inbound connections: + +```bash +ip6tables -A INPUT -p --dport -m state --state NEW -j ACCEPT +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **4.4 Implement and Manage a Firewall on Servers** - Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent. | x | x | x | +| v8 | **12.2 Establish and Maintain a Secure Network Architecture** - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | x | x | +| v7 | **9.4 Apply Host-based Firewalls or Port Filtering** - Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.2.1/SKILL.md new file mode 100644 index 0000000000..13c6d3e290 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.2.1/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-gcp-cos-3.3.2.1 +description: "Ensure default deny firewall policy" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, firewall, iptables, ipv4, network-security, default-deny] +cis_id: "3.3.2.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.3.2.1 Ensure default deny firewall policy (Automated) + +## Description + +A default deny all policy on connections ensures that any unconfigured network usage will be rejected. + +## Rationale + +With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage. + +## Impact + +Changing firewall settings while connected over network can result in being locked out of the system. + +Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well. + +## Audit Procedure + +Run the following command and verify that the policy for the `INPUT`, `OUTPUT`, and `FORWARD` chains is `DROP` or `REJECT`: + +```bash +iptables -L +``` + +## Expected Result + +``` +Chain INPUT (policy DROP) +Chain FORWARD (policy DROP) +Chain OUTPUT (policy DROP) +``` + +## Remediation + +Run the following commands to implement a default DROP policy: + +```bash +iptables -P INPUT DROP +iptables -P OUTPUT DROP +iptables -P FORWARD DROP +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **4.4 Implement and Manage a Firewall on Servers** - Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent. | x | x | x | +| v7 | **9.4 Apply Host-based Firewalls or Port Filtering** - Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.2.2/SKILL.md new file mode 100644 index 0000000000..dbe51cff99 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.2.2/SKILL.md @@ -0,0 +1,83 @@ +--- +name: cis-gcp-cos-3.3.2.2 +description: "Ensure loopback traffic is configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, firewall, iptables, ipv4, network-security, loopback] +cis_id: "3.3.2.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.3.2.2 Ensure loopback traffic is configured (Automated) + +## Description + +Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8). + +## Rationale + +Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure. + +## Impact + +Changing firewall settings while connected over network can result in being locked out of the system. + +Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well. + +## Audit Procedure + +Run the following commands and verify output includes the listed rules in order (packet and byte counts may differ): + +```bash +iptables -L INPUT -v -n +``` + +``` +Chain INPUT (policy DROP 0 packets, 0 bytes) + pkts bytes target prot opt in out source destination + 0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0 + 0 0 DROP all -- * * 127.0.0.0/8 0.0.0.0/0 +``` + +```bash +iptables -L OUTPUT -v -n +``` + +``` +Chain OUTPUT (policy DROP 0 packets, 0 bytes) + pkts bytes target prot opt in out source destination + 0 0 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0 +``` + +## Expected Result + +- INPUT chain accepts all traffic on loopback interface (`lo`) +- INPUT chain drops all traffic from source `127.0.0.0/8` +- OUTPUT chain accepts all traffic on loopback interface (`lo`) + +## Remediation + +Run the following commands to implement the loopback rules: + +```bash +iptables -A INPUT -i lo -j ACCEPT +iptables -A OUTPUT -o lo -j ACCEPT +iptables -A INPUT -s 127.0.0.0/8 -j DROP +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **4.4 Implement and Manage a Firewall on Servers** - Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent. | x | x | x | +| v7 | **9.4 Apply Host-based Firewalls or Port Filtering** - Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.2.3/SKILL.md new file mode 100644 index 0000000000..66b738282a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.2.3/SKILL.md @@ -0,0 +1,67 @@ +--- +name: cis-gcp-cos-3.3.2.3 +description: "Ensure outbound and established connections are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, firewall, iptables, ipv4, network-security, outbound, established-connections] +cis_id: "3.3.2.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.3.2.3 Ensure outbound and established connections are configured (Manual) + +## Description + +Configure the firewall rules for new outbound, and established connections. + +## Rationale + +If rules are not in place for new outbound, and established connections all packets will be dropped by the default policy preventing network usage. + +## Impact + +Changing firewall settings while connected over network can result in being locked out of the system. + +Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well. + +## Audit Procedure + +Run the following command and verify all rules for new outbound, and established connections match site policy: + +```bash +iptables -L -v -n +``` + +## Expected Result + +Verify that outbound and established connections are configured in accordance with site policy. The output should show rules allowing NEW and ESTABLISHED outbound connections and ESTABLISHED inbound connections for tcp, udp, and icmp protocols. + +## Remediation + +Configure iptables in accordance with site policy. The following commands will implement a policy to allow all outbound connections and all established connections: + +```bash +iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT +iptables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT +iptables -A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT +iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT +iptables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT +iptables -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **4.4 Implement and Manage a Firewall on Servers** - Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent. | x | x | x | +| v7 | **9.4 Apply Host-based Firewalls or Port Filtering** - Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.3/SKILL.md new file mode 100644 index 0000000000..ee1641c6ae --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-3.3.3/SKILL.md @@ -0,0 +1,54 @@ +--- +name: cis-gcp-cos-3.3.3 +description: "Ensure iptables is installed" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, firewall, iptables, ip6tables, network-security, package-management] +cis_id: "3.3.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.3.3 Ensure iptables is installed (Automated) + +## Description + +`iptables` allows configuration of the IPv4 and IPv6 tables in the linux kernel and the rules stored within them. Most firewall configuration utilities operate as a front end to `iptables`. + +## Rationale + +iptables is required for firewall management and configuration. + +## Audit Procedure + +Run the following command and verify iptables is installed: + +```bash +grep '"name": "iptables"' /etc/cos-package-info.json +``` + +## Expected Result + +``` +"name": "iptables" +``` + +## Remediation + +Update to an OS image that includes the iptables package. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **4.4 Implement and Manage a Firewall on Servers** - Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent. | x | x | x | +| v7 | **9.4 Apply Host-based Firewalls or Port Filtering** - Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed. | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.1.1/SKILL.md new file mode 100644 index 0000000000..251ba1d84a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.1.1/SKILL.md @@ -0,0 +1,65 @@ +--- +name: cis-gcp-cos-4.1.1.1 +description: "Ensure correct container image is set for stackdriver logging agent" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, logging, stackdriver] +cis_id: "4.1.1.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.1.1 Ensure correct container image is set for stackdriver logging agent (Automated) + +## Description + +`stackdriver-logging` service runs stackdriver container image to export logs to Cloud Logging. + +Note: This recommendation is not applicable for COS images using Fluent-bit as it isn't containerized. + +## Rationale + +If the logging agent is not set correctly, the logs cannot be exported to Cloud Logging. + +## Audit Procedure + +Verify `LOGGING_AGENT_DOCKER_IMAGE` is set to a correct stackdriver container image. Use the following command to verify: + +```bash +# grep LOGGING_AGENT_DOCKER_IMAGE /etc/stackdriver/env_vars +LOGGING_AGENT_DOCKER_IMAGE="gcr.io/stackdriver-agents/stackdriver-logging-agent:" +``` + +## Expected Result + +The output should show `LOGGING_AGENT_DOCKER_IMAGE` set to a valid `gcr.io/stackdriver-agents/stackdriver-logging-agent:` image. + +## Remediation + +Edit the `LOGGING_AGENT_DOCKER_IMAGE` variable in the `/etc/stackdriver/env_vars` file to set the correct logging agent. + +Run the following command to restart `stackdriver-logging` service: + +```bash +# systemctl restart stackdriver-logging +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **8.2 Collect Audit Logs** - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | x | x | x | +| v8 | **8.5 Collect Detailed Audit Logs** - Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation. | | x | x | +| v7 | **6.2 Activate audit logging** - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | +| v7 | **6.3 Enable Detailed Logging** - Enable system logging to include detailed information such as an event source, date, user, timestamp, source addresses, destination addresses, and other useful elements. | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.1.2/SKILL.md new file mode 100644 index 0000000000..eb67e65c9c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.1.2/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-gcp-cos-4.1.1.2 +description: "Ensure Logging Service is Running" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, logging, stackdriver, journald] +cis_id: "4.1.1.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.1.2 Ensure Logging Service is Running (Manual) + +## Description + +Some form of logging for the OS should be used. On COS Stackdriver-logging agent or fluent-bit logging agent are provided and can be activated simply by following the guides. It is not require to use these for logging but they are simple to set up and will work well. + +## Rationale + +If no logging is running, their will be less of a trail for audit if things go wrong. It is a good practice to have logging enabled for better visibility. + +## Audit Procedure + +This audit procedure is only if you are using one of the supporting logging services described. + +**Stackdriver-Logging Agent** + +Run the following command to verify `stackdriver-logging` is running: + +```bash +# systemctl status stackdriver-logging | grep Active +Active: active (running) since +``` + +**Fluent-bit Logging** + +Or if your system has fluent-bit, run the following command to verify `fluent-bit` is running: + +```bash +# systemctl status fluent-bit | grep Active +Active: active (running) since +``` + +## Expected Result + +The output should show `Active: active (running)` for either `stackdriver-logging` or `fluent-bit`. + +## Remediation + +This remediation is only if you want to use one of the supported logging services described. + +**Stackdriver-logging Agent** + +Run the following command to enable `stackdriver-logging`: + +```bash +# systemctl start stackdriver-logging +``` + +**Fluent-bit Logging** + +Run the following command to enable `fluent-bit`: + +```bash +# systemctl start fluent-bit +``` + +**Works for Both** + +Simply update the instance metadata to enable logging as follows: + +```bash +# gcloud compute instances add-metadata \ + --zone \ + --metadata google-logging-enabled=true +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **8.2 Collect Audit Logs** - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | x | x | x | +| v8 | **8.5 Collect Detailed Audit Logs** - Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation. | | x | x | +| v7 | **6.2 Activate audit logging** - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | +| v7 | **6.3 Enable Detailed Logging** - Enable system logging to include detailed information such as an event source, date, user, timestamp, source addresses, destination addresses, and other useful elements. | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.1.3/SKILL.md new file mode 100644 index 0000000000..e8078d5238 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.1.3/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-gcp-cos-4.1.1.3 +description: "Ensure logging is configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, logging, stackdriver, log-files] +cis_id: "4.1.1.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.1.3 Ensure logging is configured (Manual) + +## Description + +For an image using stackdriver, the `/etc/stackdriver/logging.config.d/*.conf` files specifies rules for logging and which files are to be used to log certain classes of messages. An image using fluent-bit uses `/usr/share/fluent-bit/fluent-bit.conf` for the same purpose. + +## Rationale + +A great deal of important security-related information is sent via logging (e.g., successful and failed su attempts, failed login attempts, root login attempts, etc.). + +## Audit Procedure + +Review the contents of the `/etc/stackdriver/logging.config.d/*.conf` if using an image with stackdriver or `/usr/share/fluent-bit/fluent-bit.conf` if using an image with fluent-bit to ensure appropriate logging is set. In addition, run the following command and verify that the log files are logging information: + +```bash +# ls -l /var/log/ +``` + +## Expected Result + +The output should show log files with recent timestamps, indicating active logging. + +## Remediation + +Edit the contents of `/etc/stackdriver/logging.config.d/*.conf` if using an image with stackdriver or `/usr/share/fluent-bit/fluent-bit.conf` if using an image with fluent-bit as appropriate for your environment. + +Then run the following commands to reload the logging configuration: + +For stackdriver-logging: + +```bash +# systemctl restart stackdriver-logging +``` + +For fluent-bit: + +```bash +# systemctl restart fluent-bit +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above need to be performed after every boot for images using stackdriver. This is not the case for fluent-bit as the logging agent is in `/usr/share/` which isn't stateless so changes will be persistent across reboots. + +## References + +1. See the rsyslog.conf(5) man page for more information. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **8.2 Collect Audit Logs** - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | x | x | x | +| v8 | **8.5 Collect Detailed Audit Logs** - Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation. | | x | x | +| v7 | **6.2 Activate audit logging** - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | +| v7 | **6.3 Enable Detailed Logging** - Enable system logging to include detailed information such as an event source, date, user, timestamp, source addresses, destination addresses, and other useful elements. | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.2.1/SKILL.md new file mode 100644 index 0000000000..42aaa37b39 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.2.1/SKILL.md @@ -0,0 +1,73 @@ +--- +name: cis-gcp-cos-4.1.2.1 +description: "Ensure journald is configured to compress large log files" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, logging, journald, log-files] +cis_id: "4.1.2.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.2.1 Ensure journald is configured to compress large log files (Automated) + +## Description + +The journald system includes the capability of compressing overly large files to avoid filling up the system with logs or making the logs unmanageably large. + +## Rationale + +Uncompressed large files may unexpectedly fill a filesystem leading to resource unavailability. Compressing logs prior to write can prevent sudden, unexpected filesystem impacts. + +## Audit Procedure + +Review `/etc/systemd/journald.conf` and verify that large files will be compressed: + +```bash +# grep -e Compress /etc/systemd/journald.conf +# Compress=yes +``` + +## Expected Result + +The output should show `Compress=yes`. + +## Remediation + +Edit the `/etc/systemd/journald.conf` file and add the following line: + +``` +Compress=yes +``` + +Reload the configuration to be effective. + +```bash +# systemctl force-reload systemd-journald +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## Default Value + +The main configuration file `/etc/systemd/journald.conf` is read before any of the custom \*.conf files. If there are custom configs present, they override the main configuration parameters. + +## References + +1. https://github.com/konstruktoid/hardening/blob/master/systemd.adoc#etcsystemdjournaldconf + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **8.3 Ensure Adequate Audit Log Storage** - Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process. | x | x | x | +| v7 | **6.4 Ensure adequate storage for logs** - Ensure that all systems that store logs have adequate storage space for the logs generated. | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.2.2/SKILL.md new file mode 100644 index 0000000000..f1e446a016 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.2.2/SKILL.md @@ -0,0 +1,69 @@ +--- +name: cis-gcp-cos-4.1.2.2 +description: "Ensure journald is configured to write logfiles to persistent disk" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, logging, journald, log-files] +cis_id: "4.1.2.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.2.2 Ensure journald is configured to write logfiles to persistent disk (Automated) + +## Description + +Data from journald may be stored in volatile memory or persisted locally on the server. Logs in memory will be lost upon a system reboot. By persisting logs to local disk on the server they are protected from loss. + +## Rationale + +Writing log data to disk will provide the ability to forensically reconstruct events which may have impacted the operations or security of a system even after a system crash or reboot. + +## Audit Procedure + +Review `/etc/systemd/journald.conf` and verify that logs are persisted to disk: + +```bash +# grep -e Storage /etc/systemd/journald.conf +# Storage=persistent +``` + +## Expected Result + +The output should show `Storage=persistent`. + +## Remediation + +Edit the `/etc/systemd/journald.conf` file and add the following line: + +``` +Storage=persistent +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## Default Value + +The main configuration file `/etc/systemd/journald.conf` is read before any of the custom \*.conf files. If there are custom configs present, they override the main configuration parameters. + +## References + +1. https://github.com/konstruktoid/hardening/blob/master/systemd.adoc#etcsystemdjournaldconf + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **8.2 Collect Audit Logs** - Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets. | x | x | x | +| v8 | **8.5 Collect Detailed Audit Logs** - Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation. | | x | x | +| v7 | **6.2 Activate audit logging** - Ensure that local logging has been enabled on all systems and networking devices. | x | x | x | +| v7 | **6.3 Enable Detailed Logging** - Enable system logging to include detailed information such as an event source, date, user, timestamp, source addresses, destination addresses, and other useful elements. | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.3/SKILL.md new file mode 100644 index 0000000000..2f11aee173 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.1.3/SKILL.md @@ -0,0 +1,60 @@ +--- +name: cis-gcp-cos-4.1.3 +description: "Ensure permissions on all logfiles are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, logging, log-files, auditing] +cis_id: "4.1.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.3 Ensure permissions on all logfiles are configured (Automated) + +## Description + +Log files stored in /var/log/ contain logged information from many services on the system, or on log hosts others as well. + +## Rationale + +It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected. + +## Audit Procedure + +Run the following command and verify that other has no permissions on any files and group does not have write or execute permissions on any files: + +```bash +# find /var/log -type f -ls +``` + +## Expected Result + +The output should show that no files have permissions allowing other users to read, write, or execute, and group does not have write or execute permissions. + +## Remediation + +Run the following commands to set permissions on all existing log files: + +```bash +find /var/log -type f -exec chmod g-wx,o-rwx "{}" + -o -type d -exec chmod g-w,o-rwx "{}" + +``` + +## Default Value + +You may also need to change the configuration for your logging software or services for any logs that had incorrect permissions. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **3.3 Configure Data Access Control Lists** - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.2/SKILL.md new file mode 100644 index 0000000000..553952c9b0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-4.2/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-4.2 +description: "Ensure logrotate is configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, logging, logrotate, log-files] +cis_id: "4.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2 Ensure logrotate is configured (Manual) + +## Description + +The system includes the capability of rotating log files regularly to avoid filling up the system with logs or making the logs unmanageably large. + +## Rationale + +By keeping the log files smaller and more manageable, a system administrator can easily archive these files to another system and spend less time looking through inordinately large log files. + +## Audit Procedure + +Review `/etc/logrotate.conf` and `/etc/logrotate.d/*` and verify logs are rotated according to site policy. + +```bash +# cat /etc/logrotate.conf +# ls /etc/logrotate.d/ +``` + +## Expected Result + +The output should show logrotate configuration files with appropriate rotation policies (e.g., daily, weekly, rotate count, compress settings) matching site policy. + +## Remediation + +Edit `/etc/logrotate.conf` and `/etc/logrotate.d/*` to ensure logs are rotated according to site policy. + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## Default Value + +If no `maxage` setting is set for logrotate a situation can occur where logrotate is interrupted and fails to delete rotated logfiles. It is recommended to set this to a value greater than the longest any log file should exist on your system to ensure that any such logfile is removed but standard rotation settings are not overridden. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **8.3 Ensure Adequate Audit Log Storage** - Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process. | x | x | x | +| v7 | **6.4 Ensure adequate storage for logs** - Ensure that all systems that store logs have adequate storage space for the logs generated. | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.1/SKILL.md new file mode 100644 index 0000000000..582d97f4cf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.1/SKILL.md @@ -0,0 +1,60 @@ +--- +name: cis-gcp-cos-5.1.1 +description: "Ensure permissions on /etc/ssh/sshd_config are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, permissions] +cis_id: "5.1.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.1 Ensure permissions on /etc/ssh/sshd_config are configured (Automated) + +## Description + +The `/etc/ssh/sshd_config` file contains configuration specifications for `sshd`. The command below sets the owner and group of the file to root. + +## Rationale + +The `/etc/ssh/sshd_config` file needs to be protected from unauthorized changes by non-privileged users. + +## Audit Procedure + +Run the following command and verify `Uid` and `Gid` are both `0/root` and `Access` does not grant permissions to `group` or `other`: + +```bash +# stat /etc/ssh/sshd_config +Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +- `Uid` is `0/root` +- `Gid` is `0/root` +- Access is `0600/-rw-------` (no permissions for group or other) + +## Remediation + +Run the following commands to set ownership and permissions on `/etc/ssh/sshd_config`: + +```bash +# chown root:root /etc/ssh/sshd_config +# chmod og-rwx /etc/ssh/sshd_config +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.10/SKILL.md new file mode 100644 index 0000000000..c476628b95 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.10/SKILL.md @@ -0,0 +1,62 @@ +--- +name: cis-gcp-cos-5.1.10 +description: "Ensure SSH root login is disabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, authentication] +cis_id: "5.1.10" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.10 Ensure SSH root login is disabled (Automated) + +## Description + +The `PermitRootLogin` parameter specifies if the root user can log in using ssh. The default is no. + +## Rationale + +Disallowing root logins over SSH requires system admins to authenticate using their own individual account, then escalating to root via `sudo` or `su`. This in turn limits opportunity for non-repudiation and provides a clear audit trail in the event of a security incident. + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# sshd -T | grep permitrootlogin + +PermitRootLogin no +``` + +## Expected Result + +Output should show `PermitRootLogin no`. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +PermitRootLogin no +``` + +## Default Value + +PermitRootLogin without-password + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.11/SKILL.md new file mode 100644 index 0000000000..d931c5c80e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.11/SKILL.md @@ -0,0 +1,62 @@ +--- +name: cis-gcp-cos-5.1.11 +description: "Ensure SSH PermitEmptyPasswords is disabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, authentication] +cis_id: "5.1.11" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.11 Ensure SSH PermitEmptyPasswords is disabled (Automated) + +## Description + +The `PermitEmptyPasswords` parameter specifies if the SSH server allows login to accounts with empty password strings. + +## Rationale + +Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system. + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# sshd -T | grep permitemptypasswords + +PermitEmptyPasswords no +``` + +## Expected Result + +Output should show `PermitEmptyPasswords no`. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +PermitEmptyPasswords no +``` + +## Default Value + +PermitEmptyPasswords no + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.12/SKILL.md new file mode 100644 index 0000000000..1d202f667b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.12/SKILL.md @@ -0,0 +1,62 @@ +--- +name: cis-gcp-cos-5.1.12 +description: "Ensure SSH PermitUserEnvironment is disabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, authentication] +cis_id: "5.1.12" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.12 Ensure SSH PermitUserEnvironment is disabled (Automated) + +## Description + +The `PermitUserEnvironment` option allows users to present environment options to the `ssh` daemon. + +## Rationale + +Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has `ssh` executing trojan'd programs). + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# sshd -T | grep permituserenvironment + +PermitUserEnvironment no +``` + +## Expected Result + +Output should show `PermitUserEnvironment no`. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +PermitUserEnvironment no +``` + +## Default Value + +PermitUserEnvironment no + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.13/SKILL.md new file mode 100644 index 0000000000..3cba93d5ca --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.13/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-gcp-cos-5.1.13 +description: "Ensure only strong Ciphers are used" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, encryption, ciphers] +cis_id: "5.1.13" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.13 Ensure only strong Ciphers are used (Automated) + +## Description + +This variable limits the ciphers that SSH can use during communication. + +## Rationale + +Weak ciphers that are used for authentication to the cryptographic module cannot be relied upon to provide confidentiality or integrity, and system data may be compromised. + +The DES, Triple DES, and Blowfish ciphers, as used in SSH, have a birthday bound of approximately four billion blocks, which makes it easier for remote attackers to obtain cleartext data via a birthday attack against a long-duration encrypted session, aka a "Sweet32" attack. + +The RC4 algorithm, as used in the TLS protocol and SSL protocol, does not properly combine state data with key data during the initialization phase, which makes it easier for remote attackers to conduct plaintext-recovery attacks against the initial bytes of a stream by sniffing network traffic that occasionally relies on keys affected by the Invariance Weakness, and then using a brute-force approach involving LSB values, aka the "Bar Mitzvah" issue. + +The passwords used during an SSH session encrypted with RC4 can be recovered by an attacker who is able to capture and replay the session. + +Error handling in the SSH protocol; Client and Server, when using a block cipher algorithm in Cipher Block Chaining (CBC) mode, makes it easier for remote attackers to recover certain plaintext data from an arbitrary block of ciphertext in an SSH session via unknown vectors. + +The mm_newkeys_from_blob function in monitor_wrap.c, when an AES-GCM cipher is used, does not properly initialize memory for a MAC context data structure, which allows remote authenticated users to bypass intended ForceCommand and login-shell restrictions via packet data that provides a crafted callback address. + +## Audit Procedure + +Run the following command and verify that output does not contain any of the listed weak ciphers: + +```bash +# sshd -T | grep ciphers +``` + +Weak Ciphers: + +``` +3des-cbc +aes128-cbc +aes192-cbc +aes256-cbc +arcfour +arcfour128 +arcfour256 +blowfish-cbc +cast128-cbc +rijndael-cbc@lysator.liu.se +``` + +## Expected Result + +Output should not contain any of the listed weak ciphers. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file add/modify the `Ciphers` line to contain a comma separated list of the site approved ciphers. Example: + +``` +Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr +``` + +## Default Value + +ciphers aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr + +## References + +1. https://nvd.nist.gov/vuln/detail/CVE-2016-2183 +2. https://nvd.nist.gov/vuln/detail/CVE-2015-2808 +3. https://www.kb.cert.org/vuls/id/565052 +4. https://www.openssh.com/txt/cbc.adv +5. https://nvd.nist.gov/vuln/detail/CVE-2008-5161 +6. https://nvd.nist.gov/vuln/detail/CVE-2013-4548 +7. https://www.kb.cert.org/vuls/id/565052 +8. https://www.openssh.com/txt/cbc.adv +9. SSHD_CONFIG(5) + +## Additional Information + +Some organizations may have stricter requirements for approved ciphers. Ensure that ciphers used are in compliance with site policy. + +The only "strong" ciphers currently FIPS 140-2 compliant are: aes256-ctr,aes192-ctr,aes128-ctr + +CVE-2013-4548 referenced above applies to OpenSSH versions 6.2 and 6.3. If running these versions of Open SSH, Please upgrade to version 6.4 or later to fix the vulnerability, or disable AES-GCM in the server configuration. + +The following are the supported ciphers in openSSH: + +``` +3des-cbc +aes128-cbc +aes192-cbc +aes256-cbc +aes128-ctr +aes192-ctr +aes256-ctr +aes128-gcm@openssh.com +aes256-gcm@openssh.com +arcfour +arcfour128 +arcfour256 +blowfish-cbc +cast128-cbc +rijndael-cbc@lysator.liu.se +chacha20-poly1305@openssh.com +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.14/SKILL.md new file mode 100644 index 0000000000..d5f9ac1849 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.14/SKILL.md @@ -0,0 +1,114 @@ +--- +name: cis-gcp-cos-5.1.14 +description: "Ensure only strong MAC algorithms are used" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, encryption, mac] +cis_id: "5.1.14" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.14 Ensure only strong MAC algorithms are used (Automated) + +## Description + +This variable limits the types of MAC algorithms that SSH can use during communication. + +## Rationale + +MD5 and 96-bit MAC algorithms are considered weak and have been shown to increase exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of attention as a weak spot that can be exploited with expanded computing power. An attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the SSH tunnel and capture credentials and information. + +## Audit Procedure + +Run the following command and verify that output does not contain any of the listed weak MAC algorithms: + +```bash +# sshd -T | grep -i "MACs" +``` + +Weak MAC algorithms: + +``` +hmac-md5 +hmac-md5-96 +hmac-ripemd160 +hmac-sha1 +hmac-sha1-96 +umac-64@openssh.com +umac-128@openssh.com +hmac-md5-etm@openssh.com +hmac-md5-96-etm@openssh.com +hmac-ripemd160-etm@openssh.com +hmac-sha1-etm@openssh.com +hmac-sha1-96-etm@openssh.com +umac-64-etm@openssh.com +umac-128-etm@openssh.com +``` + +## Expected Result + +Output should not contain any of the listed weak MAC algorithms. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file and add/modify the MACs line to contain a comma separated list of the site approved MACs. Example: + +``` +MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512,hmac-sha2-256 +``` + +## Default Value + +macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 + +## References + +1. More information on SSH downgrade attacks can be found here: http://www.mitls.org/pages/attacks/SLOTH +2. SSHD_CONFIG(5) + +## Additional Information + +Some organizations may have stricter requirements for approved MACs. Ensure that MACs used are in compliance with site policy. + +The only "strong" MACs currently FIPS 140-2 approved are hmac-sha2-256 and hmac-sha2-512. + +The Supported MACs are: + +``` +hmac-md5 +hmac-md5-96 +hmac-ripemd160 +hmac-sha1 +hmac-sha1-96 +hmac-sha2-256 +hmac-sha2-512 +umac-64@openssh.com +umac-128@openssh.com +hmac-md5-etm@openssh.com +hmac-md5-96-etm@openssh.com +hmac-ripemd160-etm@openssh.com +hmac-sha1-etm@openssh.com +hmac-sha1-96-etm@openssh.com +hmac-sha2-256-etm@openssh.com +hmac-sha2-512-etm@openssh.com +umac-64-etm@openssh.com +umac-128-etm@openssh.com +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | +| v7 | 16.5 Encrypt Transmittal of Username and Authentication Credentials | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.15/SKILL.md new file mode 100644 index 0000000000..75f8088f02 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.15/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-gcp-cos-5.1.15 +description: "Ensure only strong Key Exchange algorithms are used" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, encryption, kex] +cis_id: "5.1.15" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.15 Ensure only strong Key Exchange algorithms are used (Automated) + +## Description + +Key exchange is any method in cryptography by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm. If the sender and receiver wish to exchange encrypted messages, each must be equipped to encrypt messages to be sent and decrypt messages received. + +## Rationale + +Key exchange methods that are considered weak should be removed. A key exchange method may be weak because too few bits are used, or the hashing algorithm is considered too weak. Using weak algorithms could expose connections to man-in-the-middle attacks. + +## Audit Procedure + +Run the following command and verify that output does not contain any of the listed weak Key Exchange algorithms: + +```bash +# sshd -T | grep kexalgorithms +``` + +Weak Key Exchange Algorithms: + +``` +diffie-hellman-group1-sha1 +diffie-hellman-group14-sha1 +diffie-hellman-group-exchange-sha1 +``` + +## Expected Result + +Output should not contain any of the listed weak Key Exchange algorithms. + +## Remediation + +Edit the /etc/ssh/sshd_config file add/modify the KexAlgorithms line to contain a comma separated list of the site approved key exchange algorithms. Example: + +``` +KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 +``` + +## Default Value + +kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256 + +## Additional Information + +Kex algorithms have a higher preference the earlier they appear in the list. + +Some organizations may have stricter requirements for approved Key exchange algorithms. Ensure that Key exchange algorithms used are in compliance with site policy. + +The only Key Exchange Algorithms currently FIPS 140-2 approved are: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256 + +The Key Exchange algorithms supported by OpenSSH 7 are: + +``` +curve25519-sha256 +curve25519-sha256@libssh.org +diffie-hellman-group1-sha1 +diffie-hellman-group14-sha1 +diffie-hellman-group-exchange-sha1 +diffie-hellman-group-exchange-sha256 +ecdh-sha2-nistp256 +ecdh-sha2-nistp384 +ecdh-sha2-nistp521 +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.16/SKILL.md new file mode 100644 index 0000000000..f332a45b7e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.16/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gcp-cos-5.1.16 +description: "Ensure SSH Idle Timeout Interval is configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config] +cis_id: "5.1.16" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.16 Ensure SSH Idle Timeout Interval is configured (Automated) + +## Description + +The two options `ClientAliveInterval` and `ClientAliveCountMax` control the timeout of ssh sessions. When the `ClientAliveInterval` variable is set, ssh sessions that have no activity for the specified length of time are terminated. When the `ClientAliveCountMax` variable is set, `sshd` will send client alive messages at every `ClientAliveInterval` interval. When the number of consecutive client alive messages are sent with no response from the client, the `ssh` session is terminated. For example, if the `ClientAliveInterval` is set to 15 seconds and the `ClientAliveCountMax` is set to 3, the client `ssh` session will be terminated after 45 seconds of idle time. + +## Rationale + +Having no timeout value associated with a connection could allow an unauthorized user access to another user's `ssh` session (e.g. user walks away from their computer and doesn't lock the screen). Setting a timeout value at least reduces the risk of this happening. + +While the recommended setting is 300 seconds (5 minutes), set this timeout value based on site policy. The recommended setting for `ClientAliveCountMax` is 0. In this case, the client session will be terminated after 5 minutes of idle time and no keepalive messages will be sent. + +## Audit Procedure + +Run the following commands and verify `ClientAliveInterval` is between 1 and 300 and `ClientAliveCountMax` is 3 or less: + +```bash +# sshd -T | grep clientaliveinterval + +ClientAliveInterval 300 + +# sshd -T | grep clientalivecountmax + +ClientAliveCountMax 0 +``` + +## Expected Result + +- `ClientAliveInterval` is between 1 and 300 +- `ClientAliveCountMax` is 3 or less + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameters according to site policy: + +``` +ClientAliveInterval 300 +ClientAliveCountMax 0 +``` + +## Default Value + +ClientAliveInterval 420 +ClientAliveCountMax 3 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.3 Configure Automatic Session Locking on Enterprise Assets | x | x | x | +| v7 | 16.11 Lock Workstation Sessions After Inactivity | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.17/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.17/SKILL.md new file mode 100644 index 0000000000..9b4b91af27 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.17/SKILL.md @@ -0,0 +1,61 @@ +--- +name: cis-gcp-cos-5.1.17 +description: "Ensure SSH LoginGraceTime is set to one minute or less" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, authentication] +cis_id: "5.1.17" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.17 Ensure SSH LoginGraceTime is set to one minute or less (Automated) + +## Description + +The `LoginGraceTime` parameter specifies the time allowed for successful authentication to the SSH server. The longer the Grace period is the more open unauthenticated connections can exist. Like other session controls in this session the Grace Period should be limited to appropriate organizational limits to ensure the service is available for needed access. + +## Rationale + +Setting the `LoginGraceTime` parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. It will also limit the number of concurrent unauthenticated connections. While the recommended setting is 60 seconds (1 Minute), set the number based on site policy. + +## Audit Procedure + +Run the following command and verify that output `LoginGraceTime` is between 1 and 60: + +```bash +# sshd -T | grep logingracetime + +LoginGraceTime 60 +``` + +## Expected Result + +Output should show `LoginGraceTime` between 1 and 60. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +LoginGraceTime 60 +``` + +## Default Value + +LoginGraceTime 120 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.18/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.18/SKILL.md new file mode 100644 index 0000000000..78b5e39302 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.18/SKILL.md @@ -0,0 +1,57 @@ +--- +name: cis-gcp-cos-5.1.18 +description: "Ensure SSH warning banner is configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config] +cis_id: "5.1.18" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.18 Ensure SSH warning banner is configured (Automated) + +## Description + +The `Banner` parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed. + +## Rationale + +Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system. + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# sshd -T | grep banner + +Banner /etc/issue.net +``` + +## Expected Result + +Output should show `Banner /etc/issue.net`. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +Banner /etc/issue.net +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.19/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.19/SKILL.md new file mode 100644 index 0000000000..a6ff2ae72f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.19/SKILL.md @@ -0,0 +1,66 @@ +--- +name: cis-gcp-cos-5.1.19 +description: "Ensure SSH PAM is enabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, authentication] +cis_id: "5.1.19" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.19 Ensure SSH PAM is enabled (Automated) + +## Description + +UsePAM Enables the Pluggable Authentication Module interface. If set to "yes" this will enable PAM authentication using ChallengeResponseAuthentication and PasswordAuthentication in addition to PAM account and session module processing for all authentication types. + +## Rationale + +When usePAM is set to yes, PAM runs through account and session types properly. This is important if you want to restrict access to services based off of IP, time or other factors of the account. Additionally, you can make sure users inherit certain environment variables on login or disallow access to the server. + +## Impact + +If UsePAM is enabled, you will not be able to run sshd(8) as a non-root user. + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# sshd -T | grep -i usepam + +usepam yes +``` + +## Expected Result + +Output should show `usepam yes`. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +UsePAM yes +``` + +## Default Value + +usePAM yes + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.2/SKILL.md new file mode 100644 index 0000000000..ca28ef7087 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.2/SKILL.md @@ -0,0 +1,84 @@ +--- +name: cis-gcp-cos-5.1.2 +description: "Ensure permissions on SSH private host key files are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, permissions, authentication] +cis_id: "5.1.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.2 Ensure permissions on SSH private host key files are configured (Automated) + +## Description + +An SSH private key is one of two files used in SSH public key authentication. In this authentication method, the possession of the private key is proof of identity. Only a private key that corresponds to a public key will be able to authenticate successfully. The private keys need to be stored and handled carefully, and no copies of the private key should be distributed. + +## Rationale + +If an unauthorized user obtains the private SSH host key file, the host could be impersonated. + +## Audit Procedure + +Run the following command and verify Uid is 0/root and Gid is 0/root. Ensure group and other do not have permissions: + +```bash +# find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec stat {} \; + + File: '/etc/ssh/ssh_host_rsa_key' + Size: 1679 Blocks: 8 IO Block: 4096 regular file +Device: ca01h/51713d Inode: 8628138 Links: 1 +Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/root) +Access: 2018-10-22 18:24:56.861750616 +0000 +Modify: 2018-10-22 18:24:56.861750616 +0000 +Change: 2018-10-22 18:24:56.873750616 +0000 + Birth: - + File: '/etc/ssh/ssh_host_ecdsa_key' + Size: 227 Blocks: 8 IO Block: 4096 regular file +Device: ca01h/51713d Inode: 8631760 Links: 1 +Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/root) +Access: 2018-10-22 18:24:56.897750616 +0000 +Modify: 2018-10-22 18:24:56.897750616 +0000 +Change: 2018-10-22 18:24:56.905750616 +0000 + Birth: - + File: '/etc/ssh/ssh_host_ed25519_key' + Size: 387 Blocks: 8 IO Block: 4096 regular file +Device: ca01h/51713d Inode: 8631762 Links: 1 +Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/root) +Access: 2018-10-22 18:24:56.945750616 +0000 +Modify: 2018-10-22 18:24:56.945750616 +0000 +Change: 2018-10-22 18:24:56.957750616 +0000 + Birth: - +``` + +## Expected Result + +- All private host key files have `Uid` of `0/root` +- All private host key files have `Gid` of `0/root` +- Access is `0600/-rw-------` (no permissions for group or other) + +## Remediation + +Run the following commands to set ownership and permissions on the private SSH host key files: + +```bash +# find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec chown root:root {} \; +# find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec chmod 0600 {} \; +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.20/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.20/SKILL.md new file mode 100644 index 0000000000..620e96c382 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.20/SKILL.md @@ -0,0 +1,73 @@ +--- +name: cis-gcp-cos-5.1.20 +description: "Ensure SSH AllowTcpForwarding is disabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config] +cis_id: "5.1.20" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.20 Ensure SSH AllowTcpForwarding is disabled (Automated) + +## Description + +SSH port forwarding is a mechanism in SSH for tunneling application ports from the client to the server, or servers to clients. It can be used for adding encryption to legacy applications, going through firewalls, and some system administrators and IT professionals use it for opening backdoors into the internal network from their home machines. + +## Rationale + +Leaving port forwarding enabled can expose the organization to security risks and backdoors. + +SSH connections are protected with strong encryption. This makes their contents invisible to most deployed network monitoring and traffic filtering solutions. This invisibility carries considerable risk potential if it is used for malicious purposes such as data exfiltration. Cybercriminals or malware could exploit SSH to hide their unauthorized communications, or to exfiltrate stolen data from the target network. + +## Impact + +SSH tunnels are widely used in many corporate environments that employ mainframe systems as their application backends. In those environments the applications themselves may have very limited native support for security. By utilizing tunneling, compliance with SOX, HIPAA, PCI-DSS, and other standards can be achieved without having to modify the applications. + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# sshd -T | grep -i allowtcpforwarding + +AllowTcpForwarding no +``` + +## Expected Result + +Output should show `AllowTcpForwarding no`. + +## Remediation + +Edit the /etc/ssh/sshd_config file to set the parameter as follows: + +``` +AllowTcpForwarding no +``` + +## Default Value + +AllowTcpForwarding yes + +## References + +1. https://www.ssh.com/ssh/tunneling/example + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | x | x | x | +| v8 | 4.5 Implement and Manage a Firewall on End-User Devices | x | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.21/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.21/SKILL.md new file mode 100644 index 0000000000..41cc667fd9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.21/SKILL.md @@ -0,0 +1,56 @@ +--- +name: cis-gcp-cos-5.1.21 +description: "Ensure SSH MaxStartups is configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config] +cis_id: "5.1.21" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.21 Ensure SSH MaxStartups is configured (Automated) + +## Description + +The `MaxStartups` parameter specifies the maximum number of concurrent unauthenticated connections to the SSH daemon. + +## Rationale + +To protect a system from denial of service due to a large number of pending authentication connection attempts, use the rate limiting function of MaxStartups to protect availability of sshd logins and prevent overwhelming the daemon. + +## Audit Procedure + +Run the following command and verify that output `MaxStartups` is `10:30:60` or matches site policy: + +```bash +# sshd -T | grep -i maxstartups +# maxstartups 10:30:60 +``` + +## Expected Result + +Output should show `maxstartups 10:30:60` or match site policy. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +maxstartups 10:30:60 +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.22/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.22/SKILL.md new file mode 100644 index 0000000000..8a8f82556f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.22/SKILL.md @@ -0,0 +1,56 @@ +--- +name: cis-gcp-cos-5.1.22 +description: "Ensure SSH MaxSessions is set to 4 or less" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config] +cis_id: "5.1.22" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.22 Ensure SSH MaxSessions is set to 4 or less (Automated) + +## Description + +The `MaxSessions` parameter specifies the maximum number of open sessions permitted from a given connection. + +## Rationale + +To protect a system from denial of service due to a large number of concurrent sessions, use the rate limiting function of MaxSessions to protect availability of sshd logins and prevent overwhelming the daemon. + +## Audit Procedure + +Run the following command and verify that output `MaxSessions` is 4 or less, or matches site policy: + +```bash +# sshd -T | grep -i maxsessions +# maxsessions 4 +``` + +## Expected Result + +Output should show `maxsessions 4` or less, or match site policy. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +MaxSessions 4 +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.3/SKILL.md new file mode 100644 index 0000000000..b9465dd711 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.3/SKILL.md @@ -0,0 +1,84 @@ +--- +name: cis-gcp-cos-5.1.3 +description: "Ensure permissions on SSH public host key files are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, permissions, authentication] +cis_id: "5.1.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.3 Ensure permissions on SSH public host key files are configured (Automated) + +## Description + +An SSH public key is one of two files used in SSH public key authentication. In this authentication method, a public key is a key that can be used for verifying digital signatures generated using a corresponding private key. Only a public key that corresponds to a private key will be able to authenticate successfully. + +## Rationale + +If a public host key file is modified by an unauthorized user, the SSH service may be compromised. + +## Audit Procedure + +Run the following command and verify Access does not grant write or execute permissions to group or other for all returned files: + +```bash +# find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec stat {} \; + + File: '/etc/ssh/ssh_host_rsa_key.pub' + Size: 382 Blocks: 8 IO Block: 4096 regular file +Device: ca01h/51713d Inode: 8631758 Links: 1 +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +Access: 2018-10-22 18:24:56.861750616 +0000 +Modify: 2018-10-22 18:24:56.861750616 +0000 +Change: 2018-10-22 18:24:56.881750616 +0000 + Birth: - + File: '/etc/ssh/ssh_host_ecdsa_key.pub' + Size: 162 Blocks: 8 IO Block: 4096 regular file +Device: ca01h/51713d Inode: 8631761 Links: 1 +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +Access: 2018-10-22 18:24:56.897750616 +0000 +Modify: 2018-10-22 18:24:56.897750616 +0000 +Change: 2018-10-22 18:24:56.917750616 +0000 + Birth: - + File: '/etc/ssh/ssh_host_ed25519_key.pub' + Size: 82 Blocks: 8 IO Block: 4096 regular file +Device: ca01h/51713d Inode: 8631763 Links: 1 +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +Access: 2018-10-22 18:24:56.945750616 +0000 +Modify: 2018-10-22 18:24:56.945750616 +0000 +Change: 2018-10-22 18:24:56.961750616 +0000 + Birth: - +``` + +## Expected Result + +- All public host key files have `Uid` of `0/root` +- All public host key files have `Gid` of `0/root` +- Access is `0644/-rw-r--r--` (no write or execute for group or other) + +## Remediation + +Run the following commands to set permissions and ownership on the SSH host public key files: + +```bash +# find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chmod 0644 {} \; +# find /etc/ssh -xdev -type f -name 'ssh_host_*_key.pub' -exec chown root:root {} \; +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.4/SKILL.md new file mode 100644 index 0000000000..74ce07b7b3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.4/SKILL.md @@ -0,0 +1,64 @@ +--- +name: cis-gcp-cos-5.1.4 +description: "Ensure SSH Protocol is set to 2" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, encryption] +cis_id: "5.1.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.4 Ensure SSH Protocol is set to 2 (Automated) + +## Description + +Older versions of SSH support two different and incompatible protocols: SSH1 and SSH2. SSH1 was the original protocol and was subject to security issues. SSH2 is more advanced and secure. + +## Rationale + +SSH v1 suffers from insecurities that do not affect SSH v2. + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# grep ^Protocol /etc/ssh/sshd_config + +Protocol 2 +``` + +## Expected Result + +Output should show `Protocol 2`. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +Protocol 2 +``` + +## Default Value + +This command no longer exists in newer versions of SSH. This check is still being included for systems that may be running an older version of SSH. As of openSSH version 7.4 this parameter will not cause an issue when included. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v8 | 4.6 Securely Manage Enterprise Assets and Software | x | x | x | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.5/SKILL.md new file mode 100644 index 0000000000..3a27499bd1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.5/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-gcp-cos-5.1.5 +description: "Ensure SSH LogLevel is appropriate" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, authentication] +cis_id: "5.1.5" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.5 Ensure SSH LogLevel is appropriate (Automated) + +## Description + +`INFO` level is the basic level that only records login activity of SSH users. In many situations, such as Incident Response, it is important to determine when a particular user was active on a system. The logout record can eliminate those users who disconnected, which helps narrow the field. + +`VERBOSE` level specifies that login and logout activity as well as the key fingerprint for any SSH key used for login will be logged. This information is important for SSH key management, especially in legacy environments. + +## Rationale + +SSH provides several logging levels with varying amounts of verbosity. `DEBUG` is specifically not recommended other than strictly for debugging SSH communications since it provides so much data that it is difficult to identify important security information. + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# sshd -T | grep loglevel +LogLevel VERBOSE + +OR + +loglevel INFO +``` + +## Expected Result + +Output should show `LogLevel VERBOSE` or `loglevel INFO`. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +LogLevel VERBOSE +``` + +OR + +``` +LogLevel INFO +``` + +## Default Value + +LogLevel INFO + +## References + +1. https://www.ssh.com/ssh/sshd_config/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.6/SKILL.md new file mode 100644 index 0000000000..6b882b6bdb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.6/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-5.1.6 +description: "Ensure SSH X11 forwarding is disabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config] +cis_id: "5.1.6" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.6 Ensure SSH X11 forwarding is disabled (Automated) + +## Description + +The X11Forwarding parameter provides the ability to tunnel X11 traffic through the connection to enable remote graphic connections. + +## Rationale + +Disable X11 forwarding unless there is an operational requirement to use X11 applications directly. There is a small risk that the remote X11 servers of users who are logged in via SSH with X11 forwarding could be compromised by other users on the X11 server. Note that even if X11 forwarding is disabled, users can always install their own forwarders. + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# sshd -T | grep x11forwarding + +X11Forwarding no +``` + +## Expected Result + +Output should show `X11Forwarding no`. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +X11Forwarding no +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | x | x | x | +| v8 | 4.5 Implement and Manage a Firewall on End-User Devices | x | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.7/SKILL.md new file mode 100644 index 0000000000..54b60aeb9c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.7/SKILL.md @@ -0,0 +1,62 @@ +--- +name: cis-gcp-cos-5.1.7 +description: "Ensure SSH MaxAuthTries is set to 4 or less" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, authentication] +cis_id: "5.1.7" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.7 Ensure SSH MaxAuthTries is set to 4 or less (Automated) + +## Description + +The `MaxAuthTries` parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the `journald` logs detailing the login failure. + +## Rationale + +Setting the `MaxAuthTries` parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy. + +## Audit Procedure + +Run the following command and verify that output `MaxAuthTries` is 4 or less: + +```bash +# sshd -T | grep maxauthtries + +MaxAuthTries 4 +``` + +## Expected Result + +Output should show `MaxAuthTries` set to 4 or less. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +MaxAuthTries 4 +``` + +## Default Value + +MaxAuthTries 6 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v7 | 16.13 Alert on Account Login Behavior Deviation | | | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.8/SKILL.md new file mode 100644 index 0000000000..02ce64b0c6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.8/SKILL.md @@ -0,0 +1,63 @@ +--- +name: cis-gcp-cos-5.1.8 +description: "Ensure SSH IgnoreRhosts is enabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, authentication] +cis_id: "5.1.8" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.8 Ensure SSH IgnoreRhosts is enabled (Automated) + +## Description + +The `IgnoreRhosts` parameter specifies that `.rhosts` and `.shosts` files will not be used in `RhostsRSAAuthentication` or `HostbasedAuthentication`. + +## Rationale + +Setting this parameter forces users to enter a password when authenticating with ssh. + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# sshd -T | grep ignorerhosts + +IgnoreRhosts yes +``` + +## Expected Result + +Output should show `IgnoreRhosts yes`. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +IgnoreRhosts yes +``` + +## Default Value + +IgnoreRhosts yes + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | x | x | x | +| v8 | 4.5 Implement and Manage a Firewall on End-User Devices | x | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.9/SKILL.md new file mode 100644 index 0000000000..60aa63942c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.1.9/SKILL.md @@ -0,0 +1,62 @@ +--- +name: cis-gcp-cos-5.1.9 +description: "Ensure SSH HostbasedAuthentication is disabled" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, ssh, sshd, sshd-config, authentication] +cis_id: "5.1.9" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.9 Ensure SSH HostbasedAuthentication is disabled (Automated) + +## Description + +The `HostbasedAuthentication` parameter specifies if authentication is allowed through trusted hosts via the user of `.rhosts`, or `/etc/hosts.equiv`, along with successful public key client host authentication. This option only applies to SSH Protocol Version 2. + +## Rationale + +Even though the `.rhosts` files are ineffective if support is disabled in `/etc/pam.conf`, disabling the ability to use `.rhosts` files in SSH provides an additional layer of protection. + +## Audit Procedure + +Run the following command and verify that output matches: + +```bash +# sshd -T | grep hostbasedauthentication + +HostbasedAuthentication no +``` + +## Expected Result + +Output should show `HostbasedAuthentication no`. + +## Remediation + +Edit the `/etc/ssh/sshd_config` file to set the parameter as follows: + +``` +HostbasedAuthentication no +``` + +## Default Value + +HostbasedAuthentication no + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.2.1/SKILL.md new file mode 100644 index 0000000000..68a670d9fc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.2.1/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-gcp-cos-5.2.1 +description: "Ensure password creation requirements are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, pam, password-policy, password-complexity] +cis_id: "5.2.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.2.1 Ensure password creation requirements are configured (Automated) + +## Description + +The `pam_passwdqc.so` module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more based on the following options set in the `/etc/security/passwdqc.conf`: + +- `min=disabled,disabled,disabled,disabled,14` - The password must be 14 characters or more and consists of four character classes. +- `max=40` - The maximum allowed password length is 40. +- `passphrase=3` - The number of words required for a passphrase is at least 3. +- `match=4` - The length of common substring required to conclude that a password is at least partially based on information found in a character string is 4. +- `similar=deny` - The password that is similar to the old one is going to be denied. +- `random=47` - The size of randomly-generated passphrases in bits is 47. +- `enforce=everyone` - Warn everyone for weak passwords. +- `retry=3` - Let the user provide a password 3 times if the user fails to provide a sufficiently strong password and enter it twice the first time. + +For more details, refer to pam_passwdqc module documentation. The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies. + +## Rationale + +Strong passwords protect systems from being hacked through brute force methods. + +## Audit Procedure + +Verify password creation requirements conform to organization policy in `/etc/security/passwdqc.conf` with the following command. + +```bash +# cat /etc/security/passwdqc.conf + +min=disabled,disabled,disabled,disabled,14 +max=40 +passphrase=3 +match=4 +similar=deny +random=47 +enforce=everyone +retry=3 +``` + +Run the following command and verify that the output is similar to: + +```bash +grep pam_passwdqc.so /etc/pam.d/system-auth +password required pam_passwdqc.so config=/etc/security/passwdqc.conf +``` + +## Expected Result + +The `/etc/security/passwdqc.conf` file should contain password complexity settings conforming to site policy. The `pam_passwdqc.so` module should be configured in `/etc/pam.d/system-auth`. + +## Remediation + +Edit the file `/etc/security/passwdqc.conf` and add or modify the following lines for password length and complexity to conform to site policy: + +``` +min=disabled,disabled,disabled,disabled,14 +max=40 +passphrase=3 +match=4 +similar=deny +random=47 +enforce=everyone +retry=3 +``` + +Edit the `/etc/pam.d/system-auth` files to include the appropriate options for pam_passwdqc.so and to conform to site policy: + +``` +password required pam_passwdqc.so config=/etc/security/passwdqc.conf +``` + +Additional Information: + +Consult your documentation for the appropriate PAM file and module. + +Additional module options may be set, recommendation requirements only cover including `try_first_pass` and `minlen` set to 14 or more. + +Settings in `/etc/security/pwquality.conf` must use spaces around the `=` symbol. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **5.2 Use Unique Passwords** - Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA. | x | x | x | +| v7 | **4.4 Use Unique Passwords** - Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system. | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.2.2/SKILL.md new file mode 100644 index 0000000000..89c6b58c6c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.2.2/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-5.2.2 +description: "Ensure password reuse is limited" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, pam, password-policy, password-reuse] +cis_id: "5.2.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.2.2 Ensure password reuse is limited (Manual) + +## Description + +The `/etc/security/opasswd` file stores the users' old passwords and can be checked to ensure that users are not recycling recent passwords. + +## Rationale + +Forcing users not to reuse their past 5 passwords make it less likely that an attacker will be able to guess the password. + +Note that these change only apply to accounts configured on the local system. + +## Audit Procedure + +Verify remembered password history is 5 or more. This setting is commonly configured with the `pam_unix.so` or `pam_pwhistory.so` remember options found in `/etc/pam.d/common-password` or `/etc/pam.d/system-auth`. Examples: + +```bash +password required pam_pwhistory.so remember=5 +password required pam_unix.so remember=5 +``` + +## Expected Result + +The `remember` option should be set to 5 or more in the PAM configuration for `pam_pwhistory.so` or `pam_unix.so`. + +## Remediation + +Set remembered password history to conform to site policy. Many distributions provide tools for updating PAM configuration, consult your documentation for details. If no tooling is provided edit the appropriate `/etc/pam.d/` configuration file and add or modify the `pam_pwhistory.so` or `pam_unix.so` lines to include the `remember` option: + +``` +password required pam_pwhistory.so remember=5 +password required pam_unix.so remember=5 +``` + +Additional Information: + +Consult your documentation for the appropriate PAM file and module. + +Additional module options may be set, recommendation only covers those listed here. + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.2.3/SKILL.md new file mode 100644 index 0000000000..bfccc79fdf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.2.3/SKILL.md @@ -0,0 +1,72 @@ +--- +name: cis-gcp-cos-5.2.3 +description: "Ensure password hashing algorithm is SHA-512" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, pam, password-policy, hashing] +cis_id: "5.2.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.2.3 Ensure password hashing algorithm is SHA-512 (Manual) + +## Description + +The commands below change password encryption from `md5` to `sha512` (a much stronger hashing algorithm). All existing accounts will need to perform a password change to upgrade the stored hashes to the new algorithm. + +## Rationale + +The SHA-512 algorithm provides much stronger hashing than MD5, thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords. + +Note that these changes only apply to accounts configured on the local system. + +## Audit Procedure + +Verify password hashing algorithm is sha512. This setting is commonly configured with the `pam_unix.so sha512` option found in `/etc/pam.d/common-password` or `/etc/pam.d/system-auth` and `/etc/pam.d/password-auth`. Example: + +```bash +password required pam_unix.so sha512 +``` + +## Expected Result + +The `pam_unix.so` module should include the `sha512` option in the PAM password configuration. + +## Remediation + +Set password hashing algorithm to sha512. Many distributions provide tools for updating PAM configuration, consult your documentation for details. If no tooling is provided edit the appropriate `/etc/pam.d/` configuration file and add or modify the `pam_unix.so` lines to include the sha512 option: + +``` +password required pam_unix.so sha512 +``` + +Additional Information: + +Consult your documentation for the appropriate PAM file and module. + +Additional module options may be set, recommendation only covers those listed here. + +If it is determined that the password algorithm being used is not SHA-512, once it is changed, it is recommended that all user ID's be immediately expired and forced to change their passwords on next login. To accomplish that, the following commands can be used. Any system accounts that need to be expired should be carefully done separately by the system administrator to prevent any potential problems. + +```bash +# cat /etc/passwd | awk -F: '( $3 >= 500 && $1 != "nfsnobody" ) { print $1 }' | xargs -n 1 chage -d 0 +``` + +This command assumes a system UID split at 500. Some distributions split at `UID 1000` instead, consult your documentation and/or the `UID_MIN` setting in `/etc/login.defs` to determine which is appropriate for you. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **3.11 Encrypt Sensitive Data at Rest** - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. | | x | x | +| v7 | **16.4 Encrypt or Hash all Authentication Credentials** - Encrypt or hash with a salt all authentication credentials when stored. | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.1/SKILL.md new file mode 100644 index 0000000000..97d3386117 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.1/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-gcp-cos-5.3.1.1 +description: "Ensure password expiration is 365 days or less" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, shadow, password-expiration, user-accounts] +cis_id: "5.3.1.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.3.1.1 Ensure password expiration is 365 days or less (Automated) + +## Description + +The `PASS_MAX_DAYS` parameter in `/etc/login.defs` allows an administrator to force passwords to expire once they reach a defined age. It is recommended that the `PASS_MAX_DAYS` parameter be set to less than or equal to 365 days. + +## Rationale + +The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity. + +## Audit Procedure + +Run the following command and verify `PASS_MAX_DAYS` conforms to site policy (no more than 365 days): + +```bash +# grep PASS_MAX_DAYS /etc/login.defs + +PASS_MAX_DAYS 365 +``` + +Run the following command and Review list of users and PASS_MAX_DAYS to verify that all users' PASS_MAX_DAYS conforms to site policy (no more than 365 days): + +```bash +# grep -E '^[^:]+:[^!*]' /etc/shadow | cut -d: -f1,5 + +: +``` + +## Expected Result + +`PASS_MAX_DAYS` should be 365 or less in `/etc/login.defs` and for all users with a password in `/etc/shadow`. + +## Remediation + +Set the `PASS_MAX_DAYS` parameter to conform to site policy in `/etc/login.defs`: + +``` +PASS_MAX_DAYS 365 +``` + +Modify user parameters for all users with a password set to match: + +```bash +# chage --maxdays 365 +``` + +Additional Information: + +You can also check this setting in `/etc/shadow` directly. The 5th field should be 365 or less for all users with a password. + +Note: A value of -1 will disable password expiration. Additionally the password expiration must be greater than the minimum days between password changes or users will be unable to change their password. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **5.2 Use Unique Passwords** - Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA. | x | x | x | +| v7 | **4.4 Use Unique Passwords** - Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system. | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.2/SKILL.md new file mode 100644 index 0000000000..a98dae1432 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.2/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gcp-cos-5.3.1.2 +description: "Ensure minimum days between password changes is 7 or more" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, shadow, password-expiration, user-accounts] +cis_id: "5.3.1.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.3.1.2 Ensure minimum days between password changes is 7 or more (Automated) + +## Description + +The `PASS_MIN_DAYS` parameter in `/etc/login.defs` allows an administrator to prevent users from changing their password until a minimum number of days have passed since the last time the user changed their password. It is recommended that `PASS_MIN_DAYS` parameter be set to 7 or more days. + +## Rationale + +By restricting the frequency of password changes, an administrator can prevent users from repeatedly changing their password in an attempt to circumvent password reuse controls. + +## Audit Procedure + +Run the following command and verify `PASS_MIN_DAYS` conforms to site policy (no less than 7 days): + +```bash +# grep PASS_MIN_DAYS /etc/login.defs + +PASS_MIN_DAYS 7 +``` + +Run the following command and Review list of users and PASS_MIN_DAYS to Verify that all users' PASS_MIN_DAYS conforms to site policy (no less than 7 days): + +```bash +# grep -E '^[^:]+:[^\!*]' /etc/shadow | cut -d: -f1,4 + +: +``` + +## Expected Result + +`PASS_MIN_DAYS` should be 7 or more in `/etc/login.defs` and for all users with a password in `/etc/shadow`. + +## Remediation + +Set the `PASS_MIN_DAYS` parameter to 7 in `/etc/login.defs`: + +``` +PASS_MIN_DAYS 7 +``` + +Modify user parameters for all users with a password set to match: + +```bash +# chage --mindays 7 +``` + +Additional Information: + +You can also check this setting in `/etc/shadow` directly. The 4th field should be 7 or more for all users with a password. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **5.2 Use Unique Passwords** - Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA. | x | x | x | +| v7 | **4.4 Use Unique Passwords** - Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system. | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.3/SKILL.md new file mode 100644 index 0000000000..96a95d4058 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.3/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-gcp-cos-5.3.1.3 +description: "Ensure password expiration warning days is 7 or more" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, shadow, password-expiration, user-accounts] +cis_id: "5.3.1.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.3.1.3 Ensure password expiration warning days is 7 or more (Automated) + +## Description + +The `PASS_WARN_AGE` parameter in `/etc/login.defs` allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the `PASS_WARN_AGE` parameter be set to 7 or more days. + +## Rationale + +Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered. + +## Audit Procedure + +Run the following command and verify `PASS_WARN_AGE` conforms to site policy (No less than 7 days): + +```bash +# grep PASS_WARN_AGE /etc/login.defs + +PASS_WARN_AGE 7 +``` + +Verify all users with a password have their number of days of warning before password expires set to 7 or more: + +Run the following command and Review list of users and PASS_WARN_AGE to verify that all users' `PASS_WARN_AGE` conforms to site policy (No less than 7 days): + +```bash +# grep -E '^[^:]+:[^\!*]' /etc/shadow | cut -d: -f1,6 + +: +``` + +## Expected Result + +`PASS_WARN_AGE` should be 7 or more in `/etc/login.defs` and for all users with a password in `/etc/shadow`. + +## Remediation + +Set the `PASS_WARN_AGE` parameter to 7 in `/etc/login.defs`: + +``` +PASS_WARN_AGE 7 +``` + +Modify user parameters for all users with a password set to match: + +```bash +# chage --warndays 7 +``` + +Additional Information: + +You can also check this setting in `/etc/shadow` directly. The 6th field should be 7 or more for all users with a password. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **5.2 Use Unique Passwords** - Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA. | x | x | x | +| v7 | **4.4 Use Unique Passwords** - Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system. | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.4/SKILL.md new file mode 100644 index 0000000000..fd7069bc04 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.4/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-gcp-cos-5.3.1.4 +description: "Ensure inactive password lock is 30 days or less" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, shadow, password-expiration, user-accounts] +cis_id: "5.3.1.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.3.1.4 Ensure inactive password lock is 30 days or less (Automated) + +## Description + +User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled. + +## Rationale + +Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies. + +## Audit Procedure + +Run the following command and verify `INACTIVE` conforms to site policy (no more than 30 days): + +```bash +# useradd -D | grep INACTIVE + +INACTIVE=30 +``` + +Verify all users with a password have Password inactive no more than 30 days after password expires: + +Run the following command and Review list of users and INACTIVE to verify that all users' INACTIVE conforms to site policy (no more than 30 days): + +```bash +# grep -E '^[^:]+:[^\!*]' /etc/shadow | cut -d: -f1,7 + +: +``` + +## Expected Result + +`INACTIVE` should be 30 or less from `useradd -D` and for all users with a password in `/etc/shadow`. + +## Remediation + +Run the following command to set the default password inactivity period to 30 days: + +```bash +# useradd -D -f 30 +``` + +Modify user parameters for all users with a password set to match: + +```bash +# chage --inactive 30 +``` + +Additional Information: + +You can also check this setting in `/etc/shadow` directly. The 7th field should be 30 or less for all users with a password. + +Note: A value of -1 would disable this setting. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **5.2 Use Unique Passwords** - Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA. | x | x | x | +| v7 | **4.4 Use Unique Passwords** - Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system. | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.5/SKILL.md new file mode 100644 index 0000000000..e03e43e125 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.1.5/SKILL.md @@ -0,0 +1,52 @@ +--- +name: cis-gcp-cos-5.3.1.5 +description: "Ensure all users last password change date is in the past" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, shadow, password-expiration, user-accounts] +cis_id: "5.3.1.5" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.3.1.5 Ensure all users last password change date is in the past (Automated) + +## Description + +All users should have a password change date in the past. + +## Rationale + +If a users recorded password change date is in the future then they could bypass any set password expiration. + +## Audit Procedure + +Run the following command and verify nothing is returned: + +```bash +# for usr in $(cut -d: -f1 /etc/shadow); do [[ $(chage --list $usr | grep '^Last password change' | cut -d: -f2) > $(date) ]] && echo "$usr :$(chage --list $usr | grep '^Last password change' | cut -d: -f2)"; done +``` + +## Expected Result + +No output should be returned. If any users are listed, their last password change date is set in the future. + +## Remediation + +Investigate any users with a password change date in the future and correct them. Locking the account, expiring the password, or resetting the password manually may be appropriate. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **5.2 Use Unique Passwords** - Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA. | x | x | x | +| v7 | **4.4 Use Unique Passwords** - Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system. | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.2/SKILL.md new file mode 100644 index 0000000000..f8f07299d8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.2/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-gcp-cos-5.3.2 +description: "Ensure system accounts are secured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, shadow, user-accounts, shell-timeout] +cis_id: "5.3.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.3.2 Ensure system accounts are secured (Automated) + +## Description + +There are a number of accounts provided with most distributions that are used to manage applications and are not intended to provide an interactive shell. + +## Rationale + +It is important to make sure that accounts that are not being used by regular users are prevented from being used to provide an interactive shell. By default, most distributions set the password field for these accounts to an invalid string, but it is also recommended that the shell field in the password file be set to the `nologin` shell. This prevents the account from potentially being used to run any commands. + +## Audit Procedure + +Run the following commands and verify no results are returned: + +```bash +awk -F: '($1!="root" && $1!="sync" && $1!="shutdown" && $1!="halt" && $1!~/^\+/ && $3>='"$(awk '/^\s*SYS_UID_MIN/{print $2}' /etc/login.defs)"' && $3<='"$(awk '/^\s*SYS_UID_MAX/{print $2}' /etc/login.defs)"' && $7!="'"$(which nologin)"'" && $7!="/bin/false") {print}' /etc/passwd +awk -F: '($1!="root" && $1!~/^\+/ && $3>='"$(awk '/^\s*SYS_UID_MIN/{print $2}' /etc/login.defs)"' && $3<='"$(awk '/^\s*SYS_UID_MAX/{print $2}' /etc/login.defs)"') {print $1}' /etc/passwd | xargs -I '{}' passwd -S '{}' | awk '($2!="L" && $2!="LK") {print $1}' +``` + +## Expected Result + +No output should be returned. All system accounts should have `nologin` or `/bin/false` as their shell and should be locked. + +## Remediation + +Run the commands appropriate for your distribution: + +Set the shell for any accounts returned by the audit to nologin: + +```bash +# usermod -s $(which nologin) +``` + +Lock any non root accounts returned by the audit: + +```bash +# usermod -L +``` + +The following command will set all system accounts to a non login shell: + +```bash +awk -F: '($1!="root" && $1!="sync" && $1!="shutdown" && $1!="halt" && $1!~/^\+/ && $3>='"$(awk '/^\s*SYS_UID_MIN/{print $2}' /etc/login.defs)"' && $3<='"$(awk '/^\s*SYS_UID_MAX/{print $2}' /etc/login.defs)"' && $7!="'"$(which nologin)"'" && $7!="/bin/false") {print $1}' /etc/passwd | while read user; do usermod -s $(which nologin) $user; done +``` + +The following command will automatically lock not root system accounts: + +```bash +awk -F: '($1!="root" && $1!~/^\+/ && $3>='"$(awk '/^\s*SYS_UID_MIN/{print $2}' /etc/login.defs)"' && $3<='"$(awk '/^\s*SYS_UID_MAX/{print $2}' /etc/login.defs)"') {print $1}' /etc/passwd | xargs -I '{}' passwd -S '{}' | awk '($2!="L" && $2!="LK") {print $1}' | while read user; do usermod -L $user; done +``` + +Additional Information: + +The `root`, `sync`, `shutdown`, and `halt` users are exempted from requiring a non-login shell. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **6.1 Establish an Access Granting Process** - Establish and follow a process, preferably automated, for granting access to enterprise assets upon new hire, rights grant, or role change of a user. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.3/SKILL.md new file mode 100644 index 0000000000..58f2ac5c56 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.3/SKILL.md @@ -0,0 +1,57 @@ +--- +name: cis-gcp-cos-5.3.3 +description: "Ensure default group for the root account is GID 0" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, shadow, user-accounts, umask] +cis_id: "5.3.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.3.3 Ensure default group for the root account is GID 0 (Automated) + +## Description + +The usermod command can be used to specify which group the root user belongs to. This affects permissions of files that are created by the root user. + +## Rationale + +Using GID 0 for the `root` account helps prevent `root`-owned files from accidentally becoming accessible to non-privileged users. + +## Audit Procedure + +Run the following command and verify the result is `0`: + +```bash +# grep "^root:" /etc/passwd | cut -f4 -d: +0 +``` + +## Expected Result + +The command should return `0`, confirming that root's default group is GID 0. + +## Remediation + +Run the following command to set the `root` user default group to GID `0`: + +```bash +# usermod -g 0 root +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **3.3 Configure Data Access Control Lists** - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.4/SKILL.md new file mode 100644 index 0000000000..405bf39ff8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.4/SKILL.md @@ -0,0 +1,65 @@ +--- +name: cis-gcp-cos-5.3.4 +description: "Ensure default user umask is 027 or more restrictive" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, shadow, user-accounts, umask] +cis_id: "5.3.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.3.4 Ensure default user umask is 027 or more restrictive (Automated) + +## Description + +The default `umask` determines the permissions of files created by users. The user creating the file has the discretion of making their files and directories readable by others via the chmod command. Users who wish to allow their files and directories to be readable by others by default may choose a different default umask by inserting the `umask` command into the standard shell configuration files (`.profile`, `.bashrc`, etc.) in their home directories. + +## Rationale + +Setting a very secure default value for `umask` ensures that users make a conscious choice about their file permissions. A default `umask` setting of `077` causes files and directories created by users to not be readable by any other user on the system. A `umask` of `027` would make files and directories readable by users in the same Unix group, while a `umask` of `022` would make files readable by every user on the system. + +## Audit Procedure + +Run the following commands and verify all umask lines returned are 027 or more restrictive. + +```bash +# grep "umask" /etc/bash/bashrc +umask 027 +# grep "umask" /etc/profile /etc/profile.d/*.sh +umask 027 +``` + +## Expected Result + +All umask values returned should be `027` or more restrictive (e.g., `077`). + +## Remediation + +Edit the `/etc/bash/bashrc`, `/etc/profile` and `/etc/profile.d/*.sh` files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: + +``` +umask 027 +``` + +Additional Information: + +The audit and remediation in this recommendation apply to bash and shell. If other shells are supported on the system, it is recommended that their configuration files also are checked. + +Other methods of setting a default user umask exist however the shell configuration files are the last run and will override other settings if they exist therefor our recommendation is to configure in the shell configuration files. If other methods are in use in your environment they should be audited and the shell configs should be verified to not override. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **3.3 Configure Data Access Control Lists** - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.5/SKILL.md new file mode 100644 index 0000000000..82a25e30eb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.3.5/SKILL.md @@ -0,0 +1,66 @@ +--- +name: cis-gcp-cos-5.3.5 +description: "Ensure default user shell timeout is 900 seconds or less" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, shadow, user-accounts, shell-timeout] +cis_id: "5.3.5" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.3.5 Ensure default user shell timeout is 900 seconds or less (Automated) + +## Description + +The default `TMOUT` determines the shell timeout for users. The TMOUT value is measured in seconds. + +## Rationale + +Having no timeout value associated with a shell could allow an unauthorized user access to another user's shell session (e.g. user walks away from their computer and doesn't lock the screen). Setting a timeout value at least reduces the risk of this happening. + +## Audit Procedure + +Run the following commands and verify all TMOUT lines returned are 900 or less and at least one exists in each file. + +```bash +# grep "^TMOUT" /etc/bash/bashrc +TMOUT=900 + +# grep "^TMOUT" /etc/profile +TMOUT=900 +``` + +## Expected Result + +`TMOUT` should be set to 900 or less in both `/etc/bash/bashrc` and `/etc/profile`. + +## Remediation + +Edit the `/etc/bash/bashrc` and `/etc/profile` files (and the appropriate files for any other shell supported on your system) and add or edit any umask parameters as follows: + +``` +TMOUT=900 +``` + +Additional Information: + +The audit and remediation in this recommendation apply to bash and shell. If other shells are supported on the system, it is recommended that their configuration files also are checked. Other methods of setting a timeout exist for other shells not covered here. + +Ensure that the timeout conforms to your local policy. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **4.3 Configure Automatic Session Locking on Enterprise Assets** - Configure automatic session locking on enterprise assets after a defined period of inactivity. For general purpose operating systems, the period must not exceed 15 minutes. For mobile end-user devices, the period must not exceed 2 minutes. | x | x | x | +| v7 | **16.11 Lock Workstation Sessions After Inactivity** - Automatically lock workstation sessions after a standard period of inactivity. | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.4/SKILL.md new file mode 100644 index 0000000000..2df078061e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.4/SKILL.md @@ -0,0 +1,50 @@ +--- +name: cis-gcp-cos-5.4 +description: "Ensure root login is restricted to system console" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, root-login, access-control] +cis_id: "5.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.4 Ensure root login is restricted to system console (Manual) + +## Description + +The file `/etc/securetty` contains a list of valid terminals that may be logged in directly as root. + +## Rationale + +Since the system console has special properties to handle emergency situations, it is important to ensure that the console is in a physically secure location and that unauthorized consoles have not been defined. + +## Audit Procedure + +```bash +# cat /etc/securetty +``` + +## Expected Result + +Only consoles that are in a physically secure location should be listed in `/etc/securetty`. + +## Remediation + +Remove entries for any consoles that are not in a physically secure location. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts** - Restrict administrator privileges to dedicated administrator accounts on enterprise assets. Conduct general computing activities, such as internet browsing, email, and productivity suite use, from the user's primary, non-privileged account. | x | x | x | +| v7 | **5.1 Establish Secure Configurations** - Maintain documented, standard security configuration standards for all authorized operating systems and software. | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.5/SKILL.md new file mode 100644 index 0000000000..187a9bf57a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-5.5/SKILL.md @@ -0,0 +1,65 @@ +--- +name: cis-gcp-cos-5.5 +description: "Ensure access to the su command is restricted" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, su, access-control] +cis_id: "5.5" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.5 Ensure access to the su command is restricted (Automated) + +## Description + +The `su` command allows a user to run a command or shell as another user. The program has been superseded by `sudo`, which allows for more granular control over privileged access. Normally, the `su` command can be executed by any user. By uncommenting the `pam_wheel.so` statement in `/etc/pam.d/su`, the `su` command will only allow users in the wheel group to execute `su`. + +## Rationale + +Restricting the use of `su`, and using `sudo` in its place, provides system administrators better control of the escalation of user privileges to execute privileged commands. The sudo utility also provides a better logging and audit mechanism, as it can log each command executed via `sudo`, whereas `su` can only record that a user executed the `su` program. + +## Audit Procedure + +Run the following command and verify output includes matching line: + +```bash +# grep pam_wheel.so /etc/pam.d/su +auth required pam_wheel.so use_uid +``` + +Run the following command and verify users in `wheel` group match site policy: + +```bash +# grep wheel /etc/group +wheel:!:10:root, +``` + +## Expected Result + +The `/etc/pam.d/su` file should contain `auth required pam_wheel.so use_uid` and the wheel group in `/etc/group` should only contain authorized users. + +## Remediation + +Add the following line to the `/etc/pam.d/su` file: + +``` +auth required pam_wheel.so use_uid +``` + +Create a comma separated list of users in the wheel statement in the `/etc/group` file: + +``` +wheel:!:10:root, +``` + +`/etc` is stateless on Container-Optimized OS. Therefore, `/etc` cannot be used to make these changes persistent across reboots. The steps mentioned above needs to be performed after every boot. + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.1/SKILL.md new file mode 100644 index 0000000000..6dd9e842f6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.1/SKILL.md @@ -0,0 +1,58 @@ +--- +name: cis-gcp-cos-6.1.1 +description: "Ensure permissions on /etc/passwd are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, file-permissions, passwd, system-files] +cis_id: "6.1.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.1 Ensure permissions on /etc/passwd are configured (Automated) + +## Description + +The `/etc/passwd` file contains user account information that is used by many system utilities and therefore must be readable for these utilities to operate. + +## Rationale + +It is critical to ensure that the `/etc/passwd` file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions. + +## Audit Procedure + +Run the following command and verify `Uid` and `Gid` are both `0/root` and `Access` is `644`: + +```bash +# stat /etc/passwd +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +`Uid` and `Gid` should both be `0/root` and `Access` should be `644`. + +## Remediation + +Run the following command to set permissions on `/etc/passwd`: + +```bash +# chown root:root /etc/passwd +# chmod 644 /etc/passwd +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.2/SKILL.md new file mode 100644 index 0000000000..6d7c4b9ff1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.2/SKILL.md @@ -0,0 +1,60 @@ +--- +name: cis-gcp-cos-6.1.2 +description: "Ensure permissions on /etc/shadow are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, file-permissions, shadow, system-files] +cis_id: "6.1.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.2 Ensure permissions on /etc/shadow are configured (Automated) + +## Description + +The `/etc/shadow` file is used to store the information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information. + +## Rationale + +If attackers can gain read access to the `/etc/shadow` file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the `/etc/shadow` file (such as expiration) could also be useful to subvert the user accounts. + +## Audit Procedure + +Run the following command and verify verify `Uid` is `0/root`, `Gid` is `0/root` or `/shadow`, and `Access` is `640` or more restrictive: + +```bash +# stat /etc/shadow +Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +`Uid` should be `0/root`, `Gid` should be `0/root` or `/shadow`, and `Access` should be `640` or more restrictive. + +## Remediation + +Run the one of the following chown commands as appropriate and the chmod to set permissions on `/etc/shadow`: + +```bash +# chown root:root /etc/shadow +# chown root:shadow /etc/shadow + +# chmod o-rwx,g-wx /etc/shadow +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.3/SKILL.md new file mode 100644 index 0000000000..3184a54509 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.3/SKILL.md @@ -0,0 +1,58 @@ +--- +name: cis-gcp-cos-6.1.3 +description: "Ensure permissions on /etc/group are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, file-permissions, group, system-files] +cis_id: "6.1.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.3 Ensure permissions on /etc/group are configured (Automated) + +## Description + +The `/etc/group` file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else. + +## Rationale + +The `/etc/group` file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs. + +## Audit Procedure + +Run the following command and verify `Uid` and `Gid` are both `0/root` and `Access` is `644`: + +```bash +# stat /etc/group +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +`Uid` and `Gid` should both be `0/root` and `Access` should be `644`. + +## Remediation + +Run the following command to set permissions on `/etc/group`: + +```bash +# chown root:root /etc/group +# chmod 644 /etc/group +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.4/SKILL.md new file mode 100644 index 0000000000..edfe6c4b33 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.4/SKILL.md @@ -0,0 +1,60 @@ +--- +name: cis-gcp-cos-6.1.4 +description: "Ensure permissions on /etc/gshadow are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, file-permissions, gshadow, system-files] +cis_id: "6.1.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.4 Ensure permissions on /etc/gshadow are configured (Automated) + +## Description + +The `/etc/gshadow` file is used to store the information about groups that is critical to the security of those accounts, such as the hashed password and other security information. + +## Rationale + +If attackers can gain read access to the `/etc/gshadow` file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the `/etc/gshadow` file (such as group administrators) could also be useful to subvert the group. + +## Audit Procedure + +Run the following command and verify verify `Uid` is `0/root`, `Gid` is `0/root` or `/shadow`, and `Access` is `640` or more restrictive: + +```bash +# stat /etc/gshadow +Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +`Uid` should be `0/root`, `Gid` should be `0/root` or `/shadow`, and `Access` should be `640` or more restrictive. + +## Remediation + +Run the one of the following chown commands as appropriate and the chmod to set permissions on `/etc/gshadow`: + +```bash +# chown root:root /etc/gshadow +# chown root:shadow /etc/gshadow + +# chmod o-rwx,g-rw /etc/gshadow +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.5/SKILL.md new file mode 100644 index 0000000000..bea1ce2c8d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.5/SKILL.md @@ -0,0 +1,59 @@ +--- +name: cis-gcp-cos-6.1.5 +description: "Ensure permissions on /etc/passwd- are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, file-permissions, passwd, system-files] +cis_id: "6.1.5" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.5 Ensure permissions on /etc/passwd- are configured (Automated) + +## Description + +The `/etc/passwd-` file contains backup user account information. + +## Rationale + +It is critical to ensure that the `/etc/passwd-` file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions. + +## Audit Procedure + +Run the following command and verify `Uid` and `Gid` are both `0/root` and `Access` is `644` or more restrictive: + +```bash +# stat /etc/passwd- +Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +`Uid` and `Gid` should both be `0/root` and `Access` should be `644` or more restrictive. + +## Remediation + +Run the following command to set permissions on `/etc/passwd-`: + +```bash +# chown root:root /etc/passwd- + +# chmod u-x,go-wx /etc/passwd- +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.6/SKILL.md new file mode 100644 index 0000000000..718d8910f6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.6/SKILL.md @@ -0,0 +1,60 @@ +--- +name: cis-gcp-cos-6.1.6 +description: "Ensure permissions on /etc/shadow- are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, file-permissions, shadow, system-files] +cis_id: "6.1.6" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.6 Ensure permissions on /etc/shadow- are configured (Automated) + +## Description + +The `/etc/shadow-` file is used to store backup information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information. + +## Rationale + +It is critical to ensure that the `/etc/shadow-` file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions. + +## Audit Procedure + +Run the following command and verify verify `Uid` is `0/root`, `Gid` is `0/root` or `/shadow`, and `Access` is `640` or more restrictive: + +```bash +# stat /etc/shadow- +Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +`Uid` should be `0/root`, `Gid` should be `0/root` or `/shadow`, and `Access` should be `640` or more restrictive. + +## Remediation + +Run the one of the following chown commands as appropriate and the chmod to set permissions on `/etc/shadow-`: + +```bash +# chown root:root /etc/shadow- +# chown root:shadow /etc/shadow- + +# chmod o-rwx,g-rw /etc/shadow- +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.7/SKILL.md new file mode 100644 index 0000000000..168fddb556 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.7/SKILL.md @@ -0,0 +1,58 @@ +--- +name: cis-gcp-cos-6.1.7 +description: "Ensure permissions on /etc/group- are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, file-permissions, group, system-files] +cis_id: "6.1.7" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.7 Ensure permissions on /etc/group- are configured (Automated) + +## Description + +The `/etc/group-` file contains a backup list of all the valid groups defined in the system. + +## Rationale + +It is critical to ensure that the `/etc/group-` file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions. + +## Audit Procedure + +Run the following command and verify `Uid` and `Gid` are both `0/root` and `Access` is `644` or more restrictive: + +```bash +# stat /etc/group- +Access: (0644/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +`Uid` and `Gid` should both be `0/root` and `Access` should be `644` or more restrictive. + +## Remediation + +Run the following command to set permissions on `/etc/group-`: + +```bash +# chown root:root /etc/group- +# chmod u-x,go-wx /etc/group- +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.8/SKILL.md new file mode 100644 index 0000000000..6250be712d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.1.8/SKILL.md @@ -0,0 +1,60 @@ +--- +name: cis-gcp-cos-6.1.8 +description: "Ensure permissions on /etc/gshadow- are configured" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, file-permissions, gshadow, system-files] +cis_id: "6.1.8" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1.8 Ensure permissions on /etc/gshadow- are configured (Automated) + +## Description + +The `/etc/gshadow-` file is used to store backup information about groups that is critical to the security of those accounts, such as the hashed password and other security information. + +## Rationale + +It is critical to ensure that the `/etc/gshadow-` file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions. + +## Audit Procedure + +Run the following command and verify verify `Uid` is `0/root`, `Gid` is `0/root` or `/shadow`, and `Access` is `640` or more restrictive: + +```bash +# stat /etc/gshadow- +Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 0/ root) +``` + +## Expected Result + +`Uid` should be `0/root`, `Gid` should be `0/root` or `/shadow`, and `Access` should be `640` or more restrictive. + +## Remediation + +Run the one of the following chown commands as appropriate and the chmod to set permissions on `/etc/gshadow-`: + +```bash +# chown root:root /etc/gshadow- +# chown root:shadow /etc/gshadow- + +# chmod o-rwx,g-rw /etc/gshadow- +``` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.1/SKILL.md new file mode 100644 index 0000000000..41c3e7c7fe --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.1/SKILL.md @@ -0,0 +1,58 @@ +--- +name: cis-gcp-cos-6.2.1 +description: "Ensure password fields are not empty" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, password-fields] +cis_id: "6.2.1" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.1 Ensure password fields are not empty (Automated) + +## Description + +An account with an empty password field means that anybody may log in as that user without providing a password. + +## Rationale + +All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user. + +## Audit Procedure + +Run the following command and verify that no output is returned: + +```bash +# awk -F: '($2 == "" ) { print $1 " does not have a password "}' /etc/shadow +``` + +## Expected Result + +No output should be returned. + +## Remediation + +If any accounts in the `/etc/shadow` file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: + +```bash +# passwd -l +``` + +Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------ | ---- | ---- | ---- | +| v8 | 5.2 Use Unique Passwords | x | x | x | +| v7 | 4.4 Use Unique Passwords | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.10/SKILL.md new file mode 100644 index 0000000000..7d629c688e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.10/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gcp-cos-6.2.10 +description: "Ensure users' dot files are not group or world writable" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, dot-files] +cis_id: "6.2.10" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.10 Ensure users' dot files are not group or world writable (Automated) + +## Description + +While the system administrator can establish secure permissions for users' "dot" files, the users can easily override these. + +## Rationale + +Group or world-writable user configuration files may enable malicious users to steal or modify other users' data or to gain another user's system privileges. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +grep -E -v '^(halt|sync|shutdown)' /etc/passwd | awk -F: '($7 != "'"$(which nologin)"'" && $7 != "/bin/false") { print $1 " " $6 }' | while read user dir; do + if [ ! -d "$dir" ]; then + echo "The home directory ($dir) of user $user does not exist." + else + for file in $dir/.[A-Za-z0-9]*; do + if [ ! -h "$file" -a -f "$file" ]; then + fileperm=$(ls -ld $file | cut -f1 -d" ") + + if [ $(echo $fileperm | cut -c6) != "-" ]; then + echo "Group Write permission set on file $file" + fi + if [ $(echo $fileperm | cut -c9) != "-" ]; then + echo "Other Write permission set on file $file" + fi + fi + done + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user dot file permissions and determine the action to be taken in accordance with site policy. + +## Additional Information + +On some distributions the `/sbin/nologin` should be replaced with `/usr/sbin/nologin`. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.11/SKILL.md new file mode 100644 index 0000000000..0c493e917c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.11/SKILL.md @@ -0,0 +1,66 @@ +--- +name: cis-gcp-cos-6.2.11 +description: "Ensure no users have .forward files" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, forward-files] +cis_id: "6.2.11" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.11 Ensure no users have .forward files (Automated) + +## Description + +The `.forward` file specifies an email address to forward the user's mail to. + +## Rationale + +Use of the `.forward` file poses a security risk in that sensitive data may be inadvertently transferred outside the organization. The `.forward` file also poses a risk as it can be used to execute commands that may perform unintended actions. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +grep -E -v '^(root|halt|sync|shutdown)' /etc/passwd | awk -F: '($7 != "'"$(which nologin)"'" && $7 != "/bin/false") { print $1 " " $6 }' | while read user dir; do + if [ ! -d "$dir" ]; then + echo "The home directory ($dir) of user $user does not exist." + else + if [ ! -h "$dir/.forward" -a -f "$dir/.forward" ]; then + echo ".forward file $dir/.forward exists" + fi + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user `.forward` files and determine the action to be taken in accordance with site policy. + +## Additional Information + +On some distributions the `/sbin/nologin` should be replaced with `/usr/sbin/nologin`. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.1 Establish and Maintain a Secure Configuration Process | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.12/SKILL.md new file mode 100644 index 0000000000..d3534e2abc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.12/SKILL.md @@ -0,0 +1,66 @@ +--- +name: cis-gcp-cos-6.2.12 +description: "Ensure no users have .netrc files" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, netrc] +cis_id: "6.2.12" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.12 Ensure no users have .netrc files (Automated) + +## Description + +The `.netrc` file contains data for logging into a remote host for file transfers via FTP. + +## Rationale + +The `.netrc` file presents a significant security risk since it stores passwords in unencrypted form. Even if FTP is disabled, user accounts may have brought over `.netrc` files from other systems which could pose a risk to those systems. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +grep -E -v '^(root|halt|sync|shutdown)' /etc/passwd | awk -F: '($7 != "'"$(which nologin)"'" && $7 != "/bin/false") { print $1 " " $6 }' | while read user dir; do + if [ ! -d "$dir" ]; then + echo "The home directory ($dir) of user $user does not exist." + else + if [ ! -h "$dir/.netrc" -a -f "$dir/.netrc" ]; then + echo ".netrc file $dir/.netrc exists" + fi + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user `.netrc` files and determine the action to be taken in accordance with site policy. + +## Additional Information + +On some distributions the `/sbin/nologin` should be replaced with `/usr/sbin/nologin`. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.13/SKILL.md new file mode 100644 index 0000000000..9100580d91 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.13/SKILL.md @@ -0,0 +1,88 @@ +--- +name: cis-gcp-cos-6.2.13 +description: "Ensure users' .netrc Files are not group or world accessible" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, netrc] +cis_id: "6.2.13" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.13 Ensure users' .netrc Files are not group or world accessible (Automated) + +## Description + +While the system administrator can establish secure permissions for users' `.netrc` files, the users can easily override these. + +## Rationale + +`.netrc` files may contain unencrypted passwords that may be used to attack other systems. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +grep -E -v '^(root|halt|sync|shutdown)' /etc/passwd | awk -F: '($7 != "'"$(which nologin)"'" && $7 != "/bin/false") { print $1 " " $6 }' | while read user dir; do + if [ ! -d "$dir" ]; then + echo "The home directory ($dir) of user $user does not exist." + else + for file in $dir/.netrc; do + if [ ! -h "$file" -a -f "$file" ]; then + fileperm=$(ls -ld $file | cut -f1 -d" ") + if [ $(echo $fileperm | cut -c5) != "-" ]; then + echo "Group Read set on $file" + fi + if [ $(echo $fileperm | cut -c6) != "-" ]; then + echo "Group Write set on $file" + fi + if [ $(echo $fileperm | cut -c7) != "-" ]; then + echo "Group Execute set on $file" + fi + if [ $(echo $fileperm | cut -c8) != "-" ]; then + echo "Other Read set on $file" + fi + if [ $(echo $fileperm | cut -c9) != "-" ]; then + echo "Other Write set on $file" + fi + if [ $(echo $fileperm | cut -c10) != "-" ]; then + echo "Other Execute set on $file" + fi + fi + done + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user `.netrc` file permissions and determine the action to be taken in accordance with site policy. + +## Additional Information + +While the complete removal of .netrc files is recommended if any are required on the system secure permissions must be applied. + +On some distributions the `/sbin/nologin` should be replaced with `/usr/sbin/nologin`. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.14/SKILL.md new file mode 100644 index 0000000000..255bdd1633 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.14/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-gcp-cos-6.2.14 +description: "Ensure no users have .rhosts files" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, rhosts] +cis_id: "6.2.14" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.14 Ensure no users have .rhosts files (Automated) + +## Description + +While no `.rhosts` files are shipped by default, users can easily create them. + +## Rationale + +This action is only meaningful if `.rhosts` support is permitted in the file `/etc/pam.conf`. Even though the `.rhosts` files are ineffective if support is disabled in `/etc/pam.conf`, they may have been brought over from other systems and could contain information useful to an attacker for those other systems. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +grep -E -v '^(root|halt|sync|shutdown)' /etc/passwd | awk -F: '($7 != "'"$(which nologin)"'" && $7 != "/bin/false") { print $1 " " $6 }' | while read user dir; do + if [ ! -d "$dir" ]; then + echo "The home directory ($dir) of user $user does not exist." + else + for file in $dir/.rhosts; do + if [ ! -h "$file" -a -f "$file" ]; then + echo ".rhosts file in $dir" + fi + done + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user `.rhosts` files and determine the action to be taken in accordance with site policy. + +## Additional Information + +On some distributions the `/sbin/nologin` should be replaced with `/usr/sbin/nologin`. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 16.4 Encrypt or Hash all Authentication Credentials | | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.15/SKILL.md new file mode 100644 index 0000000000..baec9d528d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.15/SKILL.md @@ -0,0 +1,52 @@ +--- +name: cis-gcp-cos-6.2.15 +description: "Ensure all groups in /etc/passwd exist in /etc/group" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, group-settings, user-accounts] +cis_id: "6.2.15" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.15 Ensure all groups in /etc/passwd exist in /etc/group (Automated) + +## Description + +Over time, system administration errors and changes can lead to groups being defined in `/etc/passwd` but not in `/etc/group`. + +## Rationale + +Groups defined in the `/etc/passwd` file but not in the `/etc/group` file pose a threat to system security since group permissions are not properly managed. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +for i in $(cut -s -d: -f4 /etc/passwd | sort -u ); do + grep -q ":$i:" /etc/group + if [ $? -ne 0 ]; then + echo "Group $i is referenced by /etc/passwd but does not exist in /etc/group" + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Analyze the output of the Audit step above and perform the appropriate action to correct any discrepancies found. + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.16/SKILL.md new file mode 100644 index 0000000000..c023599bb3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.16/SKILL.md @@ -0,0 +1,54 @@ +--- +name: cis-gcp-cos-6.2.16 +description: "Ensure no duplicate UIDs exist" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, duplicate-ids] +cis_id: "6.2.16" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.16 Ensure no duplicate UIDs exist (Automated) + +## Description + +Although the `useradd` program will not let you create a duplicate User ID (UID), it is possible for an administrator to manually edit the `/etc/passwd` file and change the UID field. + +## Rationale + +Users must be assigned unique UIDs for accountability and to ensure appropriate access protections. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +cut -f3 -d":" /etc/passwd | sort -n | uniq -c | while read x ; do + [ -z "$x" ] && break + set - $x + if [ $1 -gt 1 ]; then + users=$(awk -F: '($3 == n) { print $1 }' n=$2 /etc/passwd | xargs) + echo "Duplicate UID ($2): $users" + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Based on the results of the audit script, establish unique UIDs and review all files owned by the shared UIDs to determine which UID they are supposed to belong to. + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.17/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.17/SKILL.md new file mode 100644 index 0000000000..4f0ff204df --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.17/SKILL.md @@ -0,0 +1,58 @@ +--- +name: cis-gcp-cos-6.2.17 +description: "Ensure no duplicate GIDs exist" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, group-settings, duplicate-ids] +cis_id: "6.2.17" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.17 Ensure no duplicate GIDs exist (Automated) + +## Description + +Although the `groupadd` program will not let you create a duplicate Group ID (GID), it is possible for an administrator to manually edit the `/etc/group` file and change the GID field. + +## Rationale + +User groups must be assigned unique GIDs for accountability and to ensure appropriate access protections. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +cut -f3 -d":" /etc/group | sort -n | uniq -c | while read x ; do + [ -z "$x" ] && break + set - $x + if [ $1 -gt 1 ]; then + groups=$(awk -F: '($3 == n) { print $1 }' n=$2 /etc/group | xargs) + echo "Duplicate GID ($2): $groups" + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Based on the results of the audit script, establish unique GIDs and review all files owned by the shared GID to determine which group they are supposed to belong to. + +## Additional Information + +You can also use the `grpck` command to check for other inconsistencies in the `/etc/group` file. + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.18/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.18/SKILL.md new file mode 100644 index 0000000000..a3e0178917 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.18/SKILL.md @@ -0,0 +1,54 @@ +--- +name: cis-gcp-cos-6.2.18 +description: "Ensure no duplicate user names exist" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, duplicate-ids] +cis_id: "6.2.18" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.18 Ensure no duplicate user names exist (Automated) + +## Description + +Although the `useradd` program will not let you create a duplicate user name, it is possible for an administrator to manually edit the `/etc/passwd` file and change the user name. + +## Rationale + +If a user is assigned a duplicate user name, it will create and have access to files with the first UID for that username in `/etc/passwd`. For example, if "test4" has a UID of 1000 and a subsequent "test4" entry has a UID of 2000, logging in as "test4" will use UID 1000. Effectively, the UID is shared, which is a security problem. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +cut -f1 -d":" /etc/passwd | sort -n | uniq -c | while read x ; do + [ -z "$x" ] && break + set - $x + if [ $1 -gt 1 ]; then + uids=$(awk -F: '($1 == n) { print $3 }' n=$2 /etc/passwd | xargs) + echo "Duplicate User Name ($2): $uids" + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Based on the results of the audit script, establish unique user names for the users. File ownerships will automatically reflect the change as long as the users have unique UIDs. + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.19/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.19/SKILL.md new file mode 100644 index 0000000000..6e1f0f22f2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.19/SKILL.md @@ -0,0 +1,54 @@ +--- +name: cis-gcp-cos-6.2.19 +description: "Ensure no duplicate group names exist" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, group-settings, duplicate-ids] +cis_id: "6.2.19" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.19 Ensure no duplicate group names exist (Automated) + +## Description + +Although the `groupadd` program will not let you create a duplicate group name, it is possible for an administrator to manually edit the `/etc/group` file and change the group name. + +## Rationale + +If a group is assigned a duplicate group name, it will create and have access to files with the first GID for that group in `/etc/group`. Effectively, the GID is shared, which is a security problem. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +cut -f1 -d":" /etc/group | sort -n | uniq -c | while read x ; do + [ -z "$x" ] && break + set - $x + if [ $1 -gt 1 ]; then + gids=$(gawk -F: '($1 == n) { print $3 }' n=$2 /etc/group | xargs) + echo "Duplicate Group Name ($2): $gids" + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Based on the results of the audit script, establish unique names for the user groups. File group ownerships will automatically reflect the change as long as the groups have unique GIDs. + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.2/SKILL.md new file mode 100644 index 0000000000..24099189cf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.2/SKILL.md @@ -0,0 +1,52 @@ +--- +name: cis-gcp-cos-6.2.2 +description: 'Ensure no legacy "+" entries exist in /etc/passwd' +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, legacy-entries] +cis_id: "6.2.2" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.2 Ensure no legacy "+" entries exist in /etc/passwd (Automated) + +## Description + +The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms. + +## Rationale + +These entries may provide an avenue for attackers to gain privileged access on the system. + +## Audit Procedure + +Run the following command and verify that no output is returned: + +```bash +# grep '^\+:' /etc/passwd +``` + +## Expected Result + +No output should be returned. + +## Remediation + +Remove any legacy '+' entries from `/etc/passwd` if they exist. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | x | x | +| v7 | 16.2 Configure Centralized Point of Authentication | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.20/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.20/SKILL.md new file mode 100644 index 0000000000..15774aac7b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.20/SKILL.md @@ -0,0 +1,52 @@ +--- +name: cis-gcp-cos-6.2.20 +description: "Ensure shadow group is empty" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, group-settings, user-accounts] +cis_id: "6.2.20" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.20 Ensure shadow group is empty (Automated) + +## Description + +The shadow group allows system programs which require access the ability to read the /etc/shadow file. No users should be assigned to the shadow group. + +## Rationale + +Any users assigned to the shadow group would be granted read access to the /etc/shadow file. If attackers can gain read access to the `/etc/shadow` file, they can easily run a password cracking program against the hashed passwords to break them. Other security information that is stored in the `/etc/shadow` file (such as expiration) could also be useful to subvert additional user accounts. + +## Audit Procedure + +Run the following commands and verify no results are returned: + +```bash +# grep ^shadow:[^:]*:[^:]*:[^:]+ /etc/group +# awk -F: '($4 == "") { print }' /etc/passwd +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Remove all users from the shadow group, and change the primary group of any users with shadow as their primary group. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.3/SKILL.md new file mode 100644 index 0000000000..994c11576c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.3/SKILL.md @@ -0,0 +1,52 @@ +--- +name: cis-gcp-cos-6.2.3 +description: 'Ensure no legacy "+" entries exist in /etc/shadow' +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, legacy-entries] +cis_id: "6.2.3" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.3 Ensure no legacy "+" entries exist in /etc/shadow (Automated) + +## Description + +The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms. + +## Rationale + +These entries may provide an avenue for attackers to gain privileged access on the system. + +## Audit Procedure + +Run the following command and verify that no output is returned: + +```bash +# grep '^\+:' /etc/shadow +``` + +## Expected Result + +No output should be returned. + +## Remediation + +Remove any legacy '+' entries from `/etc/shadow` if they exist. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | x | x | +| v7 | 16.2 Configure Centralized Point of Authentication | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.4/SKILL.md new file mode 100644 index 0000000000..61b7e87046 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.4/SKILL.md @@ -0,0 +1,52 @@ +--- +name: cis-gcp-cos-6.2.4 +description: 'Ensure no legacy "+" entries exist in /etc/group' +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, group-settings, legacy-entries] +cis_id: "6.2.4" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.4 Ensure no legacy "+" entries exist in /etc/group (Automated) + +## Description + +The character + in various files used to be markers for systems to insert data from NIS maps at a certain point in a system configuration file. These entries are no longer required on most systems, but may exist in files that have been imported from other platforms. + +## Rationale + +These entries may provide an avenue for attackers to gain privileged access on the system. + +## Audit Procedure + +Run the following command and verify that no output is returned: + +```bash +# grep '^\+:' /etc/group +``` + +## Expected Result + +No output should be returned. + +## Remediation + +Remove any legacy '+' entries from `/etc/group` if they exist. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | x | x | +| v7 | 16.2 Configure Centralized Point of Authentication | | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.5/SKILL.md new file mode 100644 index 0000000000..fd2d522e66 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.5/SKILL.md @@ -0,0 +1,54 @@ +--- +name: cis-gcp-cos-6.2.5 +description: "Ensure root is the only UID 0 account" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, duplicate-ids] +cis_id: "6.2.5" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.5 Ensure root is the only UID 0 account (Automated) + +## Description + +Any account with UID 0 has superuser privileges on the system. + +## Rationale + +This access must be limited to only the default `root` account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 5.6 Ensure access to the su command is restricted. + +## Audit Procedure + +Run the following command and verify that only "root" is returned: + +```bash +# awk -F: '($3 == 0) { print $1 }' /etc/passwd + +root +``` + +## Expected Result + +Only "root" should be returned. + +## Remediation + +Remove any users other than `root` with UID `0` or assign them a new UID if appropriate. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 1 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.6/SKILL.md new file mode 100644 index 0000000000..4f324ddbe9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.6/SKILL.md @@ -0,0 +1,69 @@ +--- +name: cis-gcp-cos-6.2.6 +description: "Ensure root PATH Integrity" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, home-directories] +cis_id: "6.2.6" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.6 Ensure root PATH Integrity (Automated) + +## Description + +The `root` user can execute any command on the system and could be fooled into executing programs unintentionally if the `PATH` is not set correctly. + +## Rationale + +Including the current working directory (.) or other writable directory in `root`'s executable path makes it likely that an attacker can gain superuser access by forcing an administrator operating as `root` to execute a Trojan horse program. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +PATH="$(sudo -Hiu root env | grep '^PATH' | cut -d= -f2)" +echo "$PATH" | grep -q "::" && echo "Empty directory in PATH (::)" +echo "$PATH" | grep -q ":$" && echo "Trailing : in PATH" +for dir in $(echo "$PATH" | tr ":" " "); do + if [ -d "$dir" ]; then + ls -ldH "$dir" | awk 'substr($1,6,1) != "-" {print $9, "is group writable"} + substr($1,9,1) != "-" {print $9, "is world writable"} + $3 != "root" {print $9, "is not owned by root"}' + else + base_dir=$(echo "$dir" | cut -d "/" -f2) + # Ignore if directory is on read-only partition + rw=$(findmnt -T "/$base_dir" | sed '1d' | grep -v "\sro,") + if [ -n "$rw" ]; then + echo "$dir is not a directory" + fi + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Correct or justify any items discovered in the Audit step. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.7/SKILL.md new file mode 100644 index 0000000000..d93539dac4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.7/SKILL.md @@ -0,0 +1,62 @@ +--- +name: cis-gcp-cos-6.2.7 +description: "Ensure all users' home directories exist" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, home-directories] +cis_id: "6.2.7" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.7 Ensure all users' home directories exist (Automated) + +## Description + +Users can be defined in `/etc/passwd` without a home directory or with a home directory that does not actually exist. + +## Rationale + +If the user's home directory does not exist or is unassigned, the user will be placed in "/" and will not be able to write any files or have local environment variables set. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash +grep -E -v '^(halt|sync|shutdown)' /etc/passwd | awk -F: '($7 != "'"$(which nologin)"'" && $7 != "/bin/false") { print $1 " " $6 }' | while read -r user dir; do + if [ ! -d "$dir" ]; then + echo "The home directory ($dir) of user $user does not exist." + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +If any users' home directories do not exist, create them and make sure the respective user owns the directory. Users without an assigned home directory should be removed or assigned a home directory as appropriate. + +## Additional Information + +The audit script checks all users UID 500 and above except nfsnobody. Some distributions split at `UID 1000` instead, consult your documentation and/or the `UID_MIN` setting in `/etc/login.defs` to determine which is appropriate for you. + +On some distributions the `/sbin/nologin` should be replaced with `/usr/sbin/nologin`. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------- | ---- | ---- | ---- | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.8/SKILL.md new file mode 100644 index 0000000000..235fafda7a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.8/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gcp-cos-6.2.8 +description: "Ensure users' home directories permissions are 750 or more restrictive" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, home-directories] +cis_id: "6.2.8" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.8 Ensure users' home directories permissions are 750 or more restrictive (Automated) + +## Description + +While the system administrator can establish secure permissions for users' home directories, the users can easily override these. + +## Rationale + +Group or world-writable user home directories may enable malicious users to steal or modify other users' data or to gain another user's system privileges. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash +grep -E -v '^(halt|sync|shutdown)' /etc/passwd | awk -F: '($7 != "'"$(which nologin)"'" && $7 != "/bin/false") { print $1 " " $6 }' | while read user dir; do + if [ ! -d "$dir" ]; then + echo "The home directory ($dir) of user $user does not exist." + else + dirperm=$(ls -ld $dir | cut -f1 -d" ") + if [ $(echo $dirperm | cut -c6) != "-" ]; then + echo "Group Write permission set on the home directory ($dir) of user $user" + fi + if [ $(echo $dirperm | cut -c8) != "-" ]; then + echo "Other Read permission set on the home directory ($dir) of user $user" + fi + if [ $(echo $dirperm | cut -c9) != "-" ]; then + echo "Other Write permission set on the home directory ($dir) of user $user" + fi + if [ $(echo $dirperm | cut -c10) != "-" ]; then + echo "Other Execute permission set on the home directory ($dir) of user $user" + fi + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Making global modifications to user home directories without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user file permissions and determine the action to be taken in accordance with site policy. + +## Additional Information + +On some distributions the `/sbin/nologin` should be replaced with `/usr/sbin/nologin`. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.9/SKILL.md new file mode 100644 index 0000000000..5dd3c8bae5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Cloud_Platform/CIS_Google_Container-Optimized_OS_Benchmark_v1.2.0/cis-gcp-cos-6.2.9/SKILL.md @@ -0,0 +1,67 @@ +--- +name: cis-gcp-cos-6.2.9 +description: "Ensure users own their home directories" +category: cis-gcp-cos +version: "1.2.0" +author: cyberstrike-official +tags: [cis, gcp, container-optimized-os, user-accounts, home-directories] +cis_id: "6.2.9" +cis_benchmark: "CIS Google Container-Optimized OS Benchmark v1.2.0" +tech_stack: [gcp, linux] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2.9 Ensure users own their home directories (Automated) + +## Description + +The user home directory is space defined for the particular user to set local environment variables and to store personal files. + +## Rationale + +Since the user is accountable for files stored in the user home directory, the user must be the owner of the directory. + +## Audit Procedure + +Run the following script and verify no results are returned: + +```bash +#!/bin/bash + +grep -E -v '^(halt|sync|shutdown)' /etc/passwd | awk -F: '($7 != "'"$(which nologin)"'" && $7 != "/bin/false") { print $1 " " $6 }' | while read user dir; do + if [ ! -d "$dir" ]; then + echo "The home directory ($dir) of user $user does not exist." + else + owner=$(stat -L -c "%U" "$dir") + if [ "$owner" != "$user" ]; then + echo "The home directory ($dir) of user $user is owned by $owner." + fi + fi +done +``` + +## Expected Result + +No results should be returned. + +## Remediation + +Change the ownership of any home directories that are not owned by the defined user to the correct user. + +## Additional Information + +On some distributions the `/sbin/nologin` should be replaced with `/usr/sbin/nologin`. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Level 2 - Server diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.1.1/SKILL.md new file mode 100644 index 0000000000..1c54f12fde --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.1.1/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-gworkspace-1.1.1 +description: "Ensure more than one Super Admin account exists" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, admin, super-admin, directory, users, sharing] +cis_id: "1.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.1 Ensure more than one Super Admin account exists (Manual) + +## Description + +Having more than one Super Admin account is needed primarily so that a single point of failure can be avoided. Also, for larger organizations, having multiple Super Admins can be useful for workload balancing purposes. + +## Rationale + +From a security point of view, having only a single Super Admin Account can be problematic if this user were unavailable for an extended period of time. Also, Super Admin accounts should never be shared amongst multiple users. + +## Impact + +There should be no user impact, but Administrators should have a normal (low privilege) and an Administrative (high privilege) account. + +## Audit Procedure + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Go to `Directory` and click on `Users`, this will show a list of all users +3. Click on `+ Add a filter`, select `Admin role`, check the `Super admin` box, and then select `Apply` +4. The list of Users displayed will only be those with the `Super Admin` role +5. Make sure more than one (1) user is listed + +## Expected Result + +More than one (1) user should be listed with the `Super Admin` role. + +## Remediation + +Create at least one additional account with a Super Admin role. + +**NOTE:** A new account should be created vs adding this role to an existing account since Administration tasks should be done through separate Admin accounts. + +## Default Value + +All Google Workspace tenants will have one Super Admin initially. + +## References + +- https://support.google.com/a/answer/33325 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.1 Establish and Maintain an Inventory of Accounts | x | x | x | +| v7 | 4.1 Maintain Inventory of Administrative Accounts | | x | x | + +## Profile + +- Enterprise Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.1.2/SKILL.md new file mode 100644 index 0000000000..7877541374 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.1.2/SKILL.md @@ -0,0 +1,66 @@ +--- +name: cis-gworkspace-1.1.2 +description: "Ensure no more than 4 Super Admin accounts exist" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, admin, super-admin, directory, users, sharing] +cis_id: "1.1.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.2 Ensure no more than 4 Super Admin accounts exist (Manual) + +## Description + +Having more than one Super Admin account is needed primarily so that a single point of failure can be avoided, but having too many should be avoided. + +## Rationale + +From a security point of view, having a large number of Super Admin accounts is a bad practice. In general, all users should be assigned the least privileges needed to do their job. This includes Administrators since not everyone that needs to "Administer Something" needs to be a Super Admin. Google Workspaces provides many predefined Administration Roles and also allows the creation of Custom Roles with very granular permission selection. + +## Impact + +There should be no user impact, but Administrators should have a normal (low privilege) and an Administrative (high privilege) account. + +## Audit Procedure + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Go to `Directory` and click on `Users`, this will show a list of all users +3. Click on `+ Add a filter`, select `Admin role`, check the `Super admin` box, and then select `Apply` +4. The list of Users displayed will only be those with the `Super Admin` role +5. Make sure no more than four (4) users are listed + +## Expected Result + +No more than four (4) users should be listed with the `Super Admin` role. + +## Remediation + +Reduce the number of accounts with a "Super Admin" role. + +## Default Value + +All Google Workspace tenants will have one Super Admin initially. + +## References + +- https://support.google.com/a/answer/33325 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.1 Establish and Maintain an Inventory of Accounts | x | x | x | +| v7 | 4.1 Maintain Inventory of Administrative Accounts | | x | x | + +## Profile + +- Enterprise Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.1.3/SKILL.md new file mode 100644 index 0000000000..c2344236ac --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.1.3/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gworkspace-1.1.3 +description: "Ensure super admin accounts are used only for super admin activities" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, admin, super-admin, directory, users, sharing] +cis_id: "1.1.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.1.3 Ensure super admin accounts are used only for super admin activities (Manual) + +## Description + +Super admin accounts have access to all features in the Google Admin console and Admin API and can manage every aspect of your organization's account. Super admins also have full access to all users' calendars and event details. + +It is recommended to give each super administrator two accounts. One for their super admin account and a second account for daily activities. Users should only sign in to a super admin account to perform super admin tasks, such as setting up 2-Step Verification (2SV), managing billing and user licenses, or helping another admin recover their account. Super administrators should use a separate, non-admin account for day-to-day activities. + +Super admins should sign in as needed to do specific tasks and then sign out. Leaving super admin accounts sign-in can increase exposure to phishing attacks. + +## Rationale + +Use the super admin account only when needed. Delegate administrator tasks to user accounts with limited admin roles. Use the least privilege approach, where each user has access to the resources and tools needed for their typical tasks. For example, you could grant an admin permissions to create user accounts and reset passwords, but not let them delete user accounts. + +## Impact + +Super admin users will have to switch accounts as well as utilize login/logout functionality when performing administrative tasks. + +## Audit Procedure + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Go to `Directory` and click on `Users`, this will show a list of all users +3. Click on `+ Add a filter`, select `Admin role`, check the `Super admin` box, and then select `Apply` +4. The list of Users displayed will only be those with the `Super Admin` role +5. Click on `+ Add a filter`, select `Admin role`, check the `Delegated admin` box, and then select `Apply` +6. Verify that there are no users in both the `Super admin` and `Delegated admin` roles + +## Expected Result + +No users should appear in both the `Super admin` and `Delegated admin` roles simultaneously. + +## Remediation + +For every `Super admin` that is also a `Delegated admin` account, either create a `Delegated admin` account for the user of elevate or their existing non-admin account to a `Delegated admin` account. + +## Default Value + +N/A + +## References + +1. https://support.google.com/a/answer/179832?hl=en + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v7 | 4.1 Maintain Inventory of Administrative Accounts | | x | x | + +## Profile + +- Enterprise Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.2.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.2.1.1/SKILL.md new file mode 100644 index 0000000000..919e9ae247 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-1.2.1.1/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-gworkspace-1.2.1.1 +description: "Ensure directory data access is externally restricted" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, admin, super-admin, directory, users, sharing] +cis_id: "1.2.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 1.2.1.1 Ensure directory data access is externally restricted (Manual) + +## Description + +Configure Google Workspace's external directory sharing to prevent unrestricted directory data access. + +## Rationale + +If your organization uses third-party apps that integrate with your Google services, you control how much Directory information the external apps can access. + +If you allow directory access, your users have a better experience with external apps. For example, when they use a third-party mail app, they want to find domain contacts and have email addresses automatically complete. The app needs access to Directory data to make this happen. However, this has the ability to share ALL domain AND public data with the connected third-party app. + +- **Public data and authenticated user basic profile fields** -- Share publicly visible domain profile data with external apps and APIs. Also share the authenticated user's name, photo, and email address to enable Google Sign-In if the appropriate scopes are granted. Other non-public profile fields for the authenticated user aren't shared. All the non-public profile information of other users in the domain aren't shared. +- **Domain and public data** -- (Default) Share all Directory information that's shared with your domain and public data. This information includes profile information for users in your domain, shared external contacts, and Google+ profile names and photos. + +## Impact + +The External directory sharing setting applies only to the following APIs and the Apps Scripts or third-party Marketplace apps that use those APIs: + +- Google People API +- Google CardDAV API +- Google Contacts API v3 + +The setting applies only to third-party apps, such as iOS Mail and iOS Contacts (when enrolled on an iOS device via Add Account and then Google), third-party Contacts apps (on Android). + +The setting doesn't apply to Google products, including mobile apps, such as the following: + +- Gmail, Contacts (on Android), Inbox, Meet, and other Google mobile apps +- iOS Mail and iOS Contacts using Google Sync (when enrolled on an iOS device through Add Account and then Exchange) +- Workspace Sync for Microsoft Outlook + +## Audit Procedure + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Open the collapsed menu via "hamburger button \ 3 horizontal lines" +3. Under `Directory`, select `Directory settings` +4. Under `Sharing settings`, select `External Directory sharing` +5. Ensure `Domain and public data` is **not** selected +6. Select `Save` + +## Expected Result + +`Domain and public data` should NOT be selected. `Public data and authenticated user basic profile fields` should be selected instead. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Open the collapsed menu via "hamburger button \ 3 horizontal lines" +3. Under `Directory`, select `Directory settings` +4. Under `Sharing settings`, select `External Directory sharing` +5. Select `Public data and authenticated user basic profile fields` + +## Default Value + +`External Directory sharing` = `Domain and public data` + +## References + +- https://support.google.com/a/answer/60218 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Enterprise Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.1.1/SKILL.md new file mode 100644 index 0000000000..446c2d1412 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.1.1/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-3.1.1.1.1 +description: "Ensure external sharing options for primary calendars are configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, calendar, sharing, external-sharing, offline] +cis_id: "3.1.1.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.1.1.1 Ensure external sharing options for primary calendars are configured (Manual) + +## Description + +Control how much calendar information users in your organization can share externally. + +## Rationale + +Prevent data leakage by restricting the amount of information that is externally viewable when a user shares their calendar with someone external to your organization. + +## Impact + +- Once you limit external sharing for your organization, users can't exceed these limits when sharing individual events. For example, if you limit your organization's external sharing to Free/Busy, events with Public visibility are only shared as Free/Busy. +- External mobile users who previously synced events may keep seeing restricted details. That access stops when their device is wiped and re-synced. +- If you lower the external sharing level, people outside your organization may lose access to calendars they could previously see. + +## Audit Procedure + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `Sharing settings`, select `External sharing options for primary calendars` +6. Ensure `Only free/busy information (hide event details)` is selected + +## Expected Result + +`Only free/busy information (hide event details)` should be selected for external sharing options for primary calendars. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `Sharing settings`, select `External sharing options for primary calendars` +6. Select `Only free/busy information (hide event details)` +7. Select `Save` + +## Default Value + +`External sharing options for primary calendars` is `Only free/busy information (hide event details)` + +## References + +- https://support.google.com/a/answer/60765 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Enterprise Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.1.2/SKILL.md new file mode 100644 index 0000000000..e1e05ed3d8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.1.2/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.1.1.2 +description: "Ensure internal sharing options for primary calendars are configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, calendar, sharing, external-sharing, offline] +cis_id: "3.1.1.1.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.1.1.2 Ensure internal sharing options for primary calendars are configured (Manual) + +## Description + +Control how much calendar information users in your organization can share internally. + +## Rationale + +In general, not everyone in the organization needs to know the schedule details of everyone else (operational security). Free/busy indication is enough for most people. + +## Impact + +This will be the default for the user's primary calendar. The user can override this setting to allow other specific users greater visibility of their calendar. + +## Audit Procedure + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `Sharing settings`, select `Internal sharing options for primary calendars` +6. Ensure `Only free/busy information (hide event details)` is selected + +## Expected Result + +`Only free/busy information (hide event details)` should be selected for internal sharing options for primary calendars. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `Sharing settings`, select `Internal sharing options for primary calendars` +6. Select `Only free/busy information (hide event details)` +7. Select `Save` + +## Default Value + +`Internal sharing options for primary calendars` is `Share all information` + +## References + +- https://support.google.com/a/answer/60765 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Enterprise Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.1.3/SKILL.md new file mode 100644 index 0000000000..364e5082b0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.1.3/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.1.1.3 +description: "Ensure external invitation warnings for Google Calendar are configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, calendar, sharing, external-sharing, offline] +cis_id: "3.1.1.1.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.1.1.3 Ensure external invitation warnings for Google Calendar are configured (Manual) + +## Description + +Configure Google Calendar to warn users when inviting guest outside your domain. + +## Rationale + +When your users create a Google Calendar event that includes one or more guests from outside of your domain, they are prompted to confirm whether it's OK to include external guests in the event invitation, assisting in the prevention of unintentional data leakage. + +## Impact + +Users will be prompted to allow the inclusion of external guests in an event invitation. + +## Audit Procedure + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `Sharing settings`, select `External invitations` +6. Ensure `Warn users when inviting guests outside of the domain` is checked + +## Expected Result + +`Warn users when inviting guests outside of the domain` should be checked. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `Sharing settings`, select `External Invitations` +6. Set `Warn users when inviting guests outside of the domain` to checked +7. Select `Save` + +## Default Value + +`Warn users when inviting guests outside of the domain` is checked + +## References + +- https://support.google.com/a/answer/60765 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Enterprise Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.2.1/SKILL.md new file mode 100644 index 0000000000..4e9481bd46 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.2.1/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-3.1.1.2.1 +description: "Ensure external sharing options for secondary calendars are configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, calendar, sharing, external-sharing, offline] +cis_id: "3.1.1.2.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.1.2.1 Ensure external sharing options for secondary calendars are configured (Manual) + +## Description + +Control how much calendar information users in your organization can share externally. + +## Rationale + +Prevent data leakage by restricting the amount of information is externally viewable when a user shares their calendar with someone external to your organization. + +## Impact + +- Once you limit external sharing for your organization, users can't exceed these limits when sharing individual events. For example, if you limit your organization's external sharing to Free/Busy, events with Public visibility are only shared as Free/Busy. +- External mobile users who previously synced events may keep seeing restricted details. That access stops when their device is wiped and re-synced. +- If you lower the external sharing level, people outside your organization may lose access to calendars they could previously see. + +## Audit Procedure + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `General settings`, select `External sharing options for secondary calendars` +6. Ensure `Only free/busy information (hide event details)` is selected + +## Expected Result + +`Only free/busy information (hide event details)` should be selected for external sharing options for secondary calendars. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `General settings`, select `External sharing options for secondary calendars` +6. Select `Only free/busy information (hide event details)` +7. Select `Save` + +## Default Value + +`External sharing options for secondary calendars` is `Share all information, but outsiders cannot change calendars` + +## References + +- https://support.google.com/a/answer/60765 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Enterprise Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.2.2/SKILL.md new file mode 100644 index 0000000000..9a3577c494 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.2.2/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.1.2.2 +description: "Ensure internal sharing options for secondary calendars are configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, calendar, sharing, external-sharing, offline] +cis_id: "3.1.1.2.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.1.2.2 Ensure internal sharing options for secondary calendars are configured (Manual) + +## Description + +Control how much calendar information users in your organization can share internally. + +## Rationale + +In general, not everyone in the organization needs to know the schedule details of everyone else (operational security). Free/busy indication is enough for most people. + +## Impact + +This will be the default for the user's secondary calendars. The user can override this setting to allow other specific users greater visibility of their calendars. + +## Audit Procedure + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `General settings`, select `Internal sharing options for secondary calendars` +6. Ensure `Only free/busy information (hide event details)` is selected + +## Expected Result + +`Only free/busy information (hide event details)` should be selected for internal sharing options for secondary calendars. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `General settings`, select `Internal sharing options for secondary calendars` +6. Select `Only free/busy information (hide event details)` +7. Select `Save` + +## Default Value + +`Internal sharing options for secondary calendars` is `Share all information` + +## References + +- https://support.google.com/a/answer/60765 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Enterprise Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.3.1/SKILL.md new file mode 100644 index 0000000000..aad7e32cc7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.1.3.1/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.1.3.1 +description: "Ensure calendar web offline is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, calendar, sharing, external-sharing, offline] +cis_id: "3.1.1.3.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.1.3.1 Ensure calendar web offline is disabled (Manual) + +## Description + +Limit who is allowed offline calendar access. + +## Rationale + +When enabled, users can turn on offline use for each computer they use. Data is stored on the computer until offline use is turned off by the user. In this case, the organization can lose control of where its data is stored (for this user). Care should be taken regarding which users and groups have this capability enabled. + +## Impact + +Users will not be able to access their calendars offline. + +## Audit Procedure + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `Advanced settings`, select `Calendar web offline` +6. Ensure `Allow using Calendar on the web when offline` is unchecked + +## Expected Result + +`Allow using Calendar on the web when offline` should be unchecked. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Calendar` +5. Under `Advanced settings`, select `Calendar web offline` +6. Set `Allow using Calendar on the web when offline` to unchecked +7. Select `Save` + +## Default Value + +`Allow using Calendar on the web when offline` is checked + +## References + +- https://support.google.com/a/answer/60765 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +- Enterprise Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.1/SKILL.md new file mode 100644 index 0000000000..8c892f9b9a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.1/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-3.1.2.1.1.1 +description: "Ensure users are warned when they share a file outside their domain" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, sharing, file-access] +cis_id: "3.1.2.1.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.1.1.1 Ensure users are warned when they share a file outside their domain + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +Warn the user when they try and share a file and/or shared drive externally. + +## Rationale + +The user may not realize the potential account is external to the organization. Providing a warning allows the user an opportunity to know this and possibly reassess this sharing. + +## Impact + +None, except an additional warning. Sharing can still occur. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Drive and Docs` +4. Select `Sharing Settings` +5. Select `Sharing Options` +6. Under `Sharing outside of ` +7. Ensure `ON - Files owned by users in can be shared outside of . This applies to files in all shared drives as well.` is `checked`. Also, ensure the sub-setting `For files owned by users in warn when sharing outside of ` is `checked`. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Drive and Docs` +4. Select `Sharing Settings` +5. Select `Sharing Options` +6. Under `Sharing outside of ` +7. Set `ON - Files owned by users in can be shared outside of . This applies to files in all shared drives as well.` to `checked`. Also, set the sub-setting `For files owned by users in warn when sharing outside of ` to `checked`. +8. Select `Save` + +## Default Value + +`For files owned by users in warn when sharing outside of ` is `checked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.2/SKILL.md new file mode 100644 index 0000000000..d48b950719 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.2/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-3.1.2.1.1.2 +description: "Ensure users cannot publish files to the web or make visible to the world as public or unlisted" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, sharing, file-access] +cis_id: "3.1.2.1.1.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.1.1.2 Ensure users cannot publish files to the web or make visible to the world as public or unlisted + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +You should control the publishing of documents to the web or making them visable to the world as public or unlisted. + +## Rationale + +Attackers will often attempt to expose sensitive information to external entities through sharing, and restricting the methods that your users can share documents with will reduce that surface area. + +This setting is only applicable if `ON - Files owned by users in can be shared outside of . This applies to files in all shared drives as well` is `selected`, but should be configured as described below to prevent unintentional document publishing. + +## Impact + +Enabling this feature will prevent users from publishing documents on the web or making them visible to the world as public or unlisted files. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Under `Sharing settings`, select `Sharing options` +6. Under `Sharing outside of ` - `ON - Files owned by users in can be shared outside of . This applies to files in all shared drives as well`, ensure `When sharing outside of is allowed, users in can make files and published web content visible to anyone with the link` is `unchecked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Under `Sharing settings`, select `Sharing options` +6. Under `Sharing outside of ` - `ON - Files owned by users in can be shared outside of . This applies to files in all shared drives as well`, set `When sharing outside of is allowed, users in can make files and published web content visible to anyone with the link` to `unchecked` +7. Select `Save` + +## Default Value + +`When sharing outside of is allowed, users in can make files and published web content visible to anyone with the link` is `Checked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.3/SKILL.md new file mode 100644 index 0000000000..41f596de5a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.3/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-3.1.2.1.1.3 +description: "Ensure document sharing is being controlled by domain with allowlists" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, sharing, file-access] +cis_id: "3.1.2.1.1.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.1.1.3 Ensure document sharing is being controlled by domain with allowlists + +## Level + +L2 + +## Profile Applicability + +- Enterprise Level 2 + +## Type + +Manual + +## Description + +You should control sharing of documents to external domains by either blocking domains or only allowing sharing with specific named domains. + +## Rationale + +Attackers will often attempt to expose sensitive information to external entities through sharing, and restricting the domains that your users can share documents with will reduce that surface area. + +## Impact + +Enabling this feature will prevent users from sharing documents with domains outside of the organization unless allowed. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Under `Sharing settings`, select `Sharing options` +6. Under `Sharing outside of `, ensure `ALLOWLISTED DOMAINS - Files owned by users in can be shared with Google Accounts in compatible allowlisted domains.` is `selected` +7. Ensure `Warn when files owned by users or shared drives in are shared with users in allowlisted domains` is `checked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Under `Sharing settings`, select `Sharing options` +6. Under `Sharing outside of `, select `ALLOWLISTED DOMAINS - Files owned by users in can be shared with Google Accounts in compatible allowlisted domains.` +7. Set `Warn when files owned by users or shared drives in are shared with users in allowlisted domains` to `checked` +8. Select `Save` + +## Default Value + +`Sharing outside of ` is `ON - Files owned by users in can be shared outside of . This applies to files in all shared drives as well.` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.4/SKILL.md new file mode 100644 index 0000000000..cccfd1f758 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.4/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-3.1.2.1.1.4 +description: "Ensure users are warned when they share a file with users in an allowlisted domain" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, sharing, file-access] +cis_id: "3.1.2.1.1.4" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.1.1.4 Ensure users are warned when they share a file with users in an allowlisted domain + +## Level + +L2 + +## Profile Applicability + +- Enterprise Level 2 + +## Type + +Manual + +## Description + +Warn the user when they try and share a file and/or shared drive with users in an allowlisted domain. + +## Rationale + +The user may not realize the potential account is external to the organization. Providing a warning allows the user an opportunity to know this and possibly reassess this sharing. + +## Impact + +None, except an additional warning. Sharing can still occur. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Drive and Docs` +4. Select `Sharing Settings` +5. Select `Sharing Options` +6. Under `Sharing outside of ` +7. Ensure `ALLOWLISTED DOMAINS - Files owned by users or shared drives in BMDT-Group can be shared with Google accounts in compatible allowlisted domains` is `checked`. Also, ensure the sub-setting `Warn when files owned by users or shared drives in are shared with users in allowlisted domains` is `checked`. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Drive and Docs` +4. Select `Sharing Settings` +5. Select `Sharing Options` +6. Under `Sharing outside of ` +7. Set `ALLOWLISTED DOMAINS - Files owned by users or shared drives in BMDT-Group can be shared with Google accounts in compatible allowlisted domains.` to `checked`. Also, set the sub-setting `Warn when files owned by users or shared drives in are shared with users in allowlisted domains` to `checked`. +8. Select `Save` + +## Default Value + +`For files owned by users in warn when sharing outside of ` is `checked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.5/SKILL.md new file mode 100644 index 0000000000..412a772363 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.5/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-3.1.2.1.1.5 +description: "Ensure Access Checker is configured to limit file access" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, sharing, file-access] +cis_id: "3.1.2.1.1.5" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.1.1.5 Ensure Access Checker is configured to limit file access + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +When a user shares a file via a Google product other than Docs or Drive (e.g. by pasting a link in Gmail), Google can check that the recipients have access. If not, when possible, Google will ask the user to pick how they want to share the file. + +## Rationale + +In general, access should be restricted to the smallest group possible. In this case recipients only. + +## Impact + +Only recipients can access files. Recipients cannot share access with others by forwarding the email/link. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Drive and Docs` +4. Select `Sharing Settings` +5. Select `Sharing Options` +6. Under `Access Checker` +7. Ensure `Recipients only.` is `checked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Drive and Docs` +4. Select `Sharing Settings` +5. Select `Sharing Options` +6. Under `Access Checker` +7. Set `Recipients only.` to `checked` +8. Select `Save` + +## Default Value + +`Recipients only, suggested target audience, or public (no Google account required).` is `checked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.6/SKILL.md new file mode 100644 index 0000000000..8922775ca2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.1.6/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-3.1.2.1.1.6 +description: "Ensure only users inside your organization can distribute content externally" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, sharing, file-access] +cis_id: "3.1.2.1.1.6" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.1.1.6 Ensure only users inside your organization can distribute content externally + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +You should control who is allowed to distribute organizational content to shared drives owned by another organization. + +## Rationale + +Sharing and collaboration are key; however, only your users should have the authority over where company content is shared with to prevent unauthorized disclosures of information. + +## Impact + +Only people in your organization with Manager access to a shared drive can move files from that shared drive to a Drive location in a different organization. + +In addition, users in the selected organizational unit or group can copy content from their My Drive to a shared drive owned by a different organization. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Under `Sharing settings`, select `Sharing options` +6. Under `Distributing content outside of `, ensure `Only users in ` is `selected` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Under `Sharing settings`, select `Sharing options` +6. Under `Distributing content outside of `, select `Only users in ` +7. Select `Save` + +## Default Value + +`Distributing content outside of ` is `Anyone` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.1/SKILL.md new file mode 100644 index 0000000000..a8f361517b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.1/SKILL.md @@ -0,0 +1,72 @@ +--- +name: cis-gworkspace-3.1.2.1.2.1 +description: "Ensure users can create new shared drives" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, shared-drives] +cis_id: "3.1.2.1.2.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.1.2.1 Ensure users can create new shared drives + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +All users should have the ability to create new shared drives. + +## Rationale + +By default, when a user account is deleted all the data in their personal drive is deleted as well. By allowing any user to create new shared drives aids in preventing data loss when user accounts are deleted. + +## Impact + +Disabling this feature will prevent users from creating new shared drives. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Under `Sharing settings`, select `Shared drive creation` +6. Ensure `Prevent users in from creating new shared drives` is `un-checked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Under `Sharing settings`, select `Shared drive creation` +6. Set `Prevent users in from creating new shared drives` to `unchecked` +7. Select `Save` + +## Default Value + +`Prevent users in from creating new shared drives` is `unchecked` + +## CIS Controls + +This recommendation is not mapped to any CIS Controls. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.2/SKILL.md new file mode 100644 index 0000000000..478c732875 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.2/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.2.1.2.2 +description: "Ensure manager access members cannot modify shared drive settings" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, shared-drives, file-access] +cis_id: "3.1.2.1.2.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.1.2.2 Ensure manager access members cannot modify shared drive settings + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +Only administrators should be able to modify shared drive settings. + +## Rationale + +Allowing manager access members to override or modify shared drive settings can allow intentional and unintentional data access by unauthorized users. + +## Impact + +Disabling this feature will prevent manager access members from modifying shared drive settings, requiring administrators to perform settings modifications as required. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Sharing settings` +6. Under `Shared drive creation`, ensure `Allow members with manager access to override the settings below` is `unchecked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Sharing settings` +6. Under `Shared drive creation`, set `Allow members with manager access to override the settings below` to `unchecked` +7. Select `Save` + +## Default Value + +`Allow members with manager access to override the settings below` is `checked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.3/SKILL.md new file mode 100644 index 0000000000..cc6844598a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.3/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.2.1.2.3 +description: "Ensure shared drive file access is restricted to members only" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, shared-drives, file-access] +cis_id: "3.1.2.1.2.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.1.2.3 Ensure shared drive file access is restricted to members only + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +Shared drive file access should be restricted to that shared drive's members. + +## Rationale + +Preventing unauthorized users from access sensitive data is paramount in preventing unauthorized or unintentional information disclosures. + +## Impact + +Disabling this feature will prevent shared drive non-members from accessing content in shared drives where they are not a member. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Sharing settings` +6. Under `Shared drive creation`, ensure `Allow people who aren't shared drive members to be added to files` is `unchecked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Sharing settings` +6. Under `Shared drive creation`, set `Allow people who aren't shared drive members to be added to files` to `unchecked` +7. Select `Save` + +## Default Value + +`Allow people who aren't shared drive members to be added to files` is `checked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.4/SKILL.md new file mode 100644 index 0000000000..2b5a716d51 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.1.2.4/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.2.1.2.4 +description: "Ensure viewers and commenters ability to download, print, and copy files is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, shared-drives, file-access] +cis_id: "3.1.2.1.2.4" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.1.2.4 Ensure viewers and commenters ability to download, print, and copy files is disabled + +## Level + +L2 + +## Profile Applicability + +- Enterprise Level 2 + +## Type + +Manual + +## Description + +Limit what viewers/commenters on a shared document can do with it. + +## Rationale + +In many cases when sharing a document it might be fine for the users to do what they want with the document on the shared drive (Download, Print, etc.). In more restricted environments these capabilities may need to be prevented (Protected Intellectual property, Personally Identifiable Information, etc.). + +## Impact + +Users of this shared drive will be restricted to only reading and commenting on the existing files. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Sharing settings` +6. Under `Shared drive creation`, ensure `Allow viewers and commenters to download, print, and copy files` is `unchecked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Sharing settings` +6. Under `Shared drive creation`, set `Allow viewers and commenters to download, print, and copy files` to `unchecked` +7. Select `Save` + +## Default Value + +`Allow viewers and commenters to download, print, and copy files` is `unchecked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.2.1/SKILL.md new file mode 100644 index 0000000000..094ba2a23f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.2.1/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-gworkspace-3.1.2.2.1 +description: "Ensure offline access to documents is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, offline] +cis_id: "3.1.2.2.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.2.1 Ensure offline access to documents is disabled + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +Prevent documents from being locally accessible on an unconnected device. + +## Rationale + +This setting prevents an organization's files from being stored locally, thus limiting data loss issues if the device is lost or stolen. + +## Impact + +Copies of recent files are only synced and saved on devices if you've defined a managed policy to do so. + +**NOTE:** All users will lose access to offline documents on all devices if managed devices policies are not set. + +**NOTE:** Setting up policies to control offline access on individual devices is outside the scope of this Benchmark. Additional information on doing this for various device types can be found in Google documentation. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Features and Applications` +6. Select `Offline` +7. Ensure `Control offline access using device policies` is `checked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Features and Applications` +6. Select `Offline` +7. Set `Control offline access using device policies.` to `checked` +8. Select `Save` + +## Default Value + +`Control offline access using device policies` is `unchecked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.2.2/SKILL.md new file mode 100644 index 0000000000..a68d588ec8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.2.2/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-gworkspace-3.1.2.2.2 +description: "Ensure desktop access to Drive is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, desktop-access] +cis_id: "3.1.2.2.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.2.2 Ensure desktop access to Drive is disabled + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +Prevent documents from being locally accessible on an unconnected device. + +## Rationale + +This setting prevents an organization's files from being stored locally, thus limiting data loss issues if the device is lost or stolen. + +**NOTE:** The Google Drive desktop application has its own way of handling "Offline" files and does not obey the `Drive and Doc` > `Offline` > `Control offline access using device policies` setting. Not allowing Google Drive for desktop on the device will prevent this channel. + +## Impact + +The end user will not be able to use Google Drive for desktop and its convenient integration into the Windows file explorer. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Features and Applications` +6. Select `Google Drive for desktop` +7. Ensure `Allow Google Drive for desktop in your organization` is `unchecked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Features and Applications` +6. Select `Google Drive for desktop` +7. Set `Allow Google Drive for desktop in your organization` to `unchecked` +8. Select `Save` + +## Default Value + +`Allow Google Drive for desktop in your organization` is `checked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.2.3/SKILL.md new file mode 100644 index 0000000000..85a7e958e7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.2.2.3/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-gworkspace-3.1.2.2.3 +description: "Ensure Add-Ons is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, drive, docs, add-ons] +cis_id: "3.1.2.2.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.2.2.3 Ensure Add-Ons is disabled + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +Prevent users to install Google Docs add-ons from add-ons store. + +**NOTE:** This setting controls add-on access from outside your organization. + +## Rationale + +Allowing uses to install unapproved Add-Ons puts the organization at risk. If users need a specific Add-On this can be handled on a case by case basis as the need, and the add-on, is approved. + +## Impact + +The end user will not be able to use Google Drive for desktop and its convenient integration into the Windows file explorer. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Features and Applications` +6. Select `Add-Ons` +7. Ensure `Allow users to install Google Docs add-ons from add-ons store.` is `unchecked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Drive and Docs` +5. Select `Features and Applications` +6. Select `Add-Ons` +7. Set `Allow users to install Google Docs add-ons from add-ons store.` to `unchecked` +8. Select `Save` + +## Default Value + +`Allow users to install Google Docs add-ons from add-ons store.` is `checked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.1.1/SKILL.md new file mode 100644 index 0000000000..ef2f54503f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.1.1/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gworkspace-3.1.3.1.1 +description: "Ensure users cannot delegate access to their mailbox" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, delegation, email-security] +cis_id: "3.1.3.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.1.1 Ensure users cannot delegate access to their mailbox + +## Overview + +| Property | Value | +| ------------------------- | --------------------- | +| **CIS ID** | 3.1.3.1.1 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > User Settings | + +## Description + +Mail delegation allows the delegate to read, send, and delete messages on their behalf. For example, a manager can delegate Gmail access to another person in their organization, such as an administrative assistant. + +## Rationale + +Only administrators should be able to delegate access to a user's mailboxes. + +## Impact + +Existing delegations will be hidden, when this feature is disabled. + +## Default Value + +`Let users delegate access to their mailbox to other users in the domain` is **unchecked** + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `User Settings` - `Mail delegation`, ensure `Let users delegate access to their mailbox to other users in the domain` is **unchecked** + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `User Settings` - `Mail delegation`, set `Let users delegate access to their mailbox to other users in the domain` to **unchecked** +6. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.1.2/SKILL.md new file mode 100644 index 0000000000..0b9daf594b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.1.2/SKILL.md @@ -0,0 +1,73 @@ +--- +name: cis-gworkspace-3.1.3.1.2 +description: "Ensure offline access to Gmail is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, offline, email-security] +cis_id: "3.1.3.1.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.1.2 Ensure offline access to Gmail is disabled + +## Overview + +| Property | Value | +| ------------------------- | --------------------- | +| **CIS ID** | 3.1.3.1.2 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > User Settings | + +## Description + +Disables the user's ability to utilize various Gmail functions (read, write, search, delete, and label email messages) while not connected to the internet. + +## Rationale + +Prevents the organization's data (user's email) from being copied to remote computers. + +## Impact + +Users will need internet access to use Gmail. + +## Default Value + +`Enable Gmail web offline` is **unchecked** + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Gmail** +4. Select **User Settings** +5. Under `Gmail web offline` +6. Ensure `Enable Gmail web offline` is **unchecked** + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Gmail** +4. Select **User Settings** +5. Select `Gmail web offline` +6. Set `Enable Gmail web offline` to **unchecked** +7. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.2.1/SKILL.md new file mode 100644 index 0000000000..7cb08b72a3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.2.1/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-gworkspace-3.1.3.2.1 +description: "Ensure that DKIM is enabled for all mail enabled domains" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, dkim, email-security] +cis_id: "3.1.3.2.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [cis-gworkspace-3.1.3.2.2, cis-gworkspace-3.1.3.2.3] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.2.1 Ensure that DKIM is enabled for all mail enabled domains + +## Overview + +| Property | Value | +| ------------------------- | -------------------------- | +| **CIS ID** | 3.1.3.2.1 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Authenticate email | + +## Description + +DKIM adds an encrypted signature to the header of all outgoing messages. Email servers that get signed messages use DKIM to decrypt the message header, and verify the message was not changed after it was sent. + +## Rationale + +Spoofing is a common unauthorized use of email, so some email servers require DKIM to prevent email spoofing. + +## Impact + +There should be no impact of setting up DKIM however, organizations should ensure appropriate setup to ensure continuous mail-flow. + +## Default Value + +None + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Authenticate email`, ensure a DKIM record exists for each mail enabled domain + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Authenticate email`, select `Generate new record` +6. Under `Select DKIM key bit length`, select the appropriate key bit length (2048 is recommended if supported) +7. Under `Prefix selector (optional)`, enter the appropriate prefix selector +8. Use the text at TXT record value to update the DNS record at your domain host +9. Select `Start Authentication` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.5 Implement DMARC | | x | x | +| v7 | 7.8 Implement DMARC and Enable Receiver-Side Verification | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.2.2/SKILL.md new file mode 100644 index 0000000000..dc31bf1f18 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.2.2/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.3.2.2 +description: "Ensure the SPF record is configured for all mail enabled domains" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, spf, email-security] +cis_id: "3.1.3.2.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [cis-gworkspace-3.1.3.2.1, cis-gworkspace-3.1.3.2.3] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.2.2 Ensure the SPF record is configured for all mail enabled domains + +## Overview + +| Property | Value | +| ------------------------- | -------------------------- | +| **CIS ID** | 3.1.3.2.2 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Authenticate email | + +## Description + +For all the email domains configured in Google Workspace, a corresponding Sender Policy Framework (SPF) record should be created. + +**NOTE:** There are a number of ways SPF can be configured, this document presents a most basic method. For more information on setting up SPF for Google Workspace please refer to the Google documentation. + +## Rationale + +SPF records allow Gmail and other mail systems to know where messages from your domains are allowed to originate. This information can be used by that system to determine how to treat the message based on if it is being spoofed or is valid. + +## Impact + +There should be minimal impact of setting up SPF records however, organizations should ensure proper SPF record setup as email could be flagged as spam if SPF is not set up appropriately. + +## Default Value + +None + +## Audit + +Check the DNS records for each domain. + +1. Use a Domain Name System (DNS) lookup tool to review the current configuration for your domain (DNS Records). This information can be discovered in a variety of ways: + - Reviewing the DNS Record information at your domain registrar (GoDaddy, etc.) + - Using an OS based `nslookup` tool on your workstation OS + - Using Google **Dig** tool available from the Google Admin Toolbox site +2. Using the chosen tool, enter your email domain name (ex. domain1.com) +3. In the results displayed, ensure that a TXT Record with the value of `v=spf1 include:_spf.google.com ~all` exists and designates Google Gmail as an authorized sender. + +## Remediation + +Configure the DNS record for each domain. + +- If all email in your domain is sent from and received by Google Gmail, add the following TXT record for each domain: + +``` +v=spf1 include:_spf.google.com ~all +``` + +**NOTE:** This will likely need to be configured at your domain registrar (Godaddy, etc.). + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.5 Implement DMARC | | x | x | +| v7 | 7.8 Implement DMARC and Enable Receiver-Side Verification | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.2.3/SKILL.md new file mode 100644 index 0000000000..5ed44dadb1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.2.3/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-gworkspace-3.1.3.2.3 +description: "Ensure the DMARC record is configured for all mail enabled domains" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, dmarc, email-security] +cis_id: "3.1.3.2.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [cis-gworkspace-3.1.3.2.1, cis-gworkspace-3.1.3.2.2] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.2.3 Ensure the DMARC record is configured for all mail enabled domains + +## Overview + +| Property | Value | +| ------------------------- | -------------------------- | +| **CIS ID** | 3.1.3.2.3 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Authenticate email | + +## Description + +For all email domains configured in Google Workspace, a corresponding Domain-Based Message Authentication, Reporting and Conformance (DMARC) record should be created. + +**NOTE:** There are a number of ways DMARC can be configured, this document presents a most basic method. For more information on setting up DMARC for Google Workspace please refer to the Google documentation. + +## Rationale + +DMARC works with Sender Policy Framework (SPF) and Domain Keys Identified Mail (DKIM) to authenticate mail senders and ensure that destination email systems trust messages sent from your domain. Spammers can spoof your domain or organization to send fake messages that impersonate your organization. DMARC tells receiving mail servers what to do when they get a message that appears to be from your organization, but doesn't pass authentication checks, or doesn't meet the authentication requirements in your DMARC policy record. Messages that aren't authenticated might be impersonating your organization, or might be sent from unauthorized servers. + +## Impact + +There should be minimal impact of setting up DMARC records however, organizations should ensure proper DMARC record setup as email could be flagged as spam if DMARC is not set up appropriately. + +## Default Value + +None + +## Audit + +Check the DNS records for each domain. + +1. Use a Domain Name System (DNS) lookup tool to review the current configuration for your domain (DNS Records). This information can be discovered in a variety of ways: + - Reviewing the DNS Record information at your domain registrar (GoDaddy, etc.) + - Using an OS based `nslookup` tool on your workstation OS + - **Preferred**: Using Google **Dig** tool available from the Google Admin Toolbox site +2. Using the chosen tool, enter your email domain name (ex. domain1.com) +3. In the results displayed, ensure that a TXT Record with the value of `v=DMARC1; p=none; rua=mailto:` exists. This designates Google Gmail as an authorized sender. + +**NOTE:** The **p=none** sets DMARC to non-enforcing. This is a relaxed DMARC policy that lets you start getting reports without risking messages from your domain being rejected or marked as spam by receiving servers. Start with a none policy that only monitors email flow, and then eventually change to a policy that rejects all unauthenticated messages (`p=reject`). + +**NOTE:** The **rua=mailto:** entry is optional but setting it to a valid email address is recommended. RUA reports provide a comprehensive view of all of a domain's traffic. At a minimum, organizations should configure their DMARC record to receive RUA reports. + +## Remediation + +Configure the DNS record for each domain. + +1. If all email in your domain is sent from and received by Google Gmail, add the following TXT record for the domain: + +``` +v=DMARC1; p=none; rua=mailto: +``` + +**NOTE:** This will likely need to be configured at your domain registrar (Godaddy, etc.). + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.5 Implement DMARC | | x | x | +| v7 | 7.8 Implement DMARC and Enable Receiver-Side Verification | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.3.1/SKILL.md new file mode 100644 index 0000000000..18b9163a14 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.3.1/SKILL.md @@ -0,0 +1,69 @@ +--- +name: cis-gworkspace-3.1.3.3.1 +description: "Enable quarantine admin notifications for Gmail" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, quarantine, email-security] +cis_id: "3.1.3.3.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.3.1 Enable quarantine admin notifications for Gmail + +## Overview + +| Property | Value | +| ------------------------- | -------------------------- | +| **CIS ID** | 3.1.3.3.1 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Manage Quarantines | + +## Description + +Quarantines can help prevent spam, minimize data loss, and protect confidential information. They can also help moderate message attachments so users don't send, open, or click something they shouldn't. + +## Rationale + +Admins should be notified periodically when messages are quarantined so they can take the appropriate actions. + +## Impact + +Admins will begin receiving quarantine notifications as emails are quarantined. + +## Default Value + +`Notify periodically when messages are quarantined` is **unchecked** + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Manage quarantines`, ensure each quarantine has `Notify periodically when messages are quarantined` is **checked** + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Manage quarantines`, set `Notify periodically when messages are quarantined` to **checked** + +As required, give appropriate users the `Access Admin Quarantine` and/or `Access restricted quarantine` roles. + +## CIS Controls + +This control does not map directly to a specific CIS Controls v8/v7 safeguard. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.1.1/SKILL.md new file mode 100644 index 0000000000..a751e4077f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.1.1/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gworkspace-3.1.3.4.1.1 +description: "Ensure protection against encrypted attachments from untrusted senders is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, attachments, phishing, email-security] +cis_id: "3.1.3.4.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [cis-gworkspace-3.1.3.4.1.2, cis-gworkspace-3.1.3.4.1.3] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.1.1 Ensure protection against encrypted attachments from untrusted senders is enabled + +## Overview + +| Property | Value | +| ------------------------- | ---------------------------- | +| **CIS ID** | 3.1.3.4.1.1 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Attachments | + +## Description + +As a Google Workspace administrator, you can protect incoming mail against phishing and harmful software (malware). You can also choose what action to take based on the type of threat detected. + +## Rationale + +You should protect your users from potentially malicious attachments. + +## Impact + +Users will be warned when they receive an encrypted attachment from an untrusted sender. + +## Default Value + +`Protect against encrypted attachments from untrusted senders` is **checked** + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Attachments`, ensure `Protect against encrypted attachments from untrusted senders` is **checked** + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Attachments`, set `Protect against encrypted attachments from untrusted senders` to **checked** +6. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------- | ---- | ---- | ---- | +| v8 | 9.6 Block Unnecessary File Types | | x | x | +| v7 | 7.9 Block Unnecessary File Types | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.1.2/SKILL.md new file mode 100644 index 0000000000..4d93e728d6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.1.2/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gworkspace-3.1.3.4.1.2 +description: "Ensure protection against attachments with scripts from untrusted senders is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, attachments, phishing, email-security] +cis_id: "3.1.3.4.1.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [cis-gworkspace-3.1.3.4.1.1, cis-gworkspace-3.1.3.4.1.3] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.1.2 Ensure protection against attachments with scripts from untrusted senders is enabled + +## Overview + +| Property | Value | +| ------------------------- | ---------------------------- | +| **CIS ID** | 3.1.3.4.1.2 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Attachments | + +## Description + +As a Google Workspace administrator, you can protect incoming mail against phishing and harmful software (malware). You can also choose what action to take based on the type of threat detected. + +## Rationale + +You should protect your users from potentially malicious attachments. + +## Impact + +Users will be warned when they receive an attachments with scripts from an untrusted sender. + +## Default Value + +`Protect against attachments with scripts from untrusted senders is enabled` is **checked** + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Attachments`, ensure `Protect against attachments with scripts from untrusted senders` is **checked** + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Attachments`, set `Protect against attachments with scripts from untrusted senders` to **checked** +6. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------- | ---- | ---- | ---- | +| v8 | 9.6 Block Unnecessary File Types | | x | x | +| v7 | 7.9 Block Unnecessary File Types | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.1.3/SKILL.md new file mode 100644 index 0000000000..3674a2dd4d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.1.3/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gworkspace-3.1.3.4.1.3 +description: "Ensure protection against anomalous attachment types in emails is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, attachments, phishing, email-security] +cis_id: "3.1.3.4.1.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [cis-gworkspace-3.1.3.4.1.1, cis-gworkspace-3.1.3.4.1.2] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.1.3 Ensure protection against anomalous attachment types in emails is enabled + +## Overview + +| Property | Value | +| ------------------------- | ---------------------------- | +| **CIS ID** | 3.1.3.4.1.3 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Attachments | + +## Description + +As a Google Workspace administrator, you can protect incoming mail against phishing and harmful software (malware). You can also choose what action to take based on the type of threat detected. + +## Rationale + +You should protect your users from potentially malicious attachments. + +## Impact + +Users will be warned when they receive an anomalous attachment. + +## Default Value + +`Protect against anomalous attachment types in emails` is **Unchecked** + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Attachments`, ensure `Protect against anomalous attachment types in emails` is **checked** + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Attachments`, set `Protect against anomalous attachment types in emails` to **checked** +6. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------- | ---- | ---- | ---- | +| v8 | 9.6 Block Unnecessary File Types | | x | x | +| v7 | 7.9 Block Unnecessary File Types | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.2.1/SKILL.md new file mode 100644 index 0000000000..f40da90b7e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.2.1/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gworkspace-3.1.3.4.2.1 +description: "Ensure link identification behind shortened URLs is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, links, phishing, email-security] +cis_id: "3.1.3.4.2.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [cis-gworkspace-3.1.3.4.2.2, cis-gworkspace-3.1.3.4.2.3] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.2.1 Ensure link identification behind shortened URLs is enabled + +## Overview + +| Property | Value | +| ------------------------- | ------------------------------------------ | +| **CIS ID** | 3.1.3.4.2.1 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Links and external images | + +## Description + +Identify links behind short URLs, and display a warning when you click links to untrusted domains. + +## Rationale + +You should protect your users from potentially malicious links. + +## Impact + +Users will be warned when they click links to untrusted domains. + +## Default Value + +`Identify links behind shortened URLs` is **checked** + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Links and external images`, ensure `Identify links behind shortened URLs` is **checked** + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Links and external images`, set `Identify links behind shortened URLs` to **checked** +6. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.3 Maintain and Enforce Network-Based URL Filters | | x | x | +| v7 | 7.4 Maintain and Enforce Network-Based URL Filters | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.2.2/SKILL.md new file mode 100644 index 0000000000..fed08f3a73 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.2.2/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gworkspace-3.1.3.4.2.2 +description: "Ensure scan linked images for malicious content is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, links, phishing, email-security] +cis_id: "3.1.3.4.2.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [cis-gworkspace-3.1.3.4.2.1, cis-gworkspace-3.1.3.4.2.3] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.2.2 Ensure scan linked images for malicious content is enabled + +## Overview + +| Property | Value | +| ------------------------- | ------------------------------------------ | +| **CIS ID** | 3.1.3.4.2.2 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Links and external images | + +## Description + +Scan linked images for malicious content, and display a warning when you click links to untrusted domains. + +## Rationale + +You should protect your users from potentially malicious links. + +## Impact + +Users will be warned when they click links to untrusted domains. + +## Default Value + +`Scan linked images` is **checked** + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Links and external images`, ensure `Scan linked images` is **checked** + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Links and external images`, set `Scan linked images` to **checked** +6. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.3 Maintain and Enforce Network-Based URL Filters | | x | x | +| v7 | 7.4 Maintain and Enforce Network-Based URL Filters | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.2.3/SKILL.md new file mode 100644 index 0000000000..276f9f1170 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.2.3/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-gworkspace-3.1.3.4.2.3 +description: "Ensure warning prompt is shown for any click on links to untrusted domains" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, links, phishing, email-security] +cis_id: "3.1.3.4.2.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [cis-gworkspace-3.1.3.4.2.1, cis-gworkspace-3.1.3.4.2.2] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.2.3 Ensure warning prompt is shown for any click on links to untrusted domains + +## Overview + +| Property | Value | +| ------------------------- | ------------------------------------------ | +| **CIS ID** | 3.1.3.4.2.3 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Links and external images | + +## Description + +Display a warning when you click links to untrusted domains. + +## Rationale + +You should protect your users from potentially malicious links. + +## Impact + +Users will be warned when they click links to untrusted domains. + +## Default Value + +`Show warning prompt for any click on links to untrusted domains` is **checked** + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Links and external images`, ensure `Show warning prompt for any click on links to untrusted domains` is **checked** + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Links and external images`, set `Show warning prompt for any click on links to untrusted domains` is **checked** +6. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.3 Maintain and Enforce Network-Based URL Filters | | x | x | +| v7 | 7.4 Maintain and Enforce Network-Based URL Filters | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.1/SKILL.md new file mode 100644 index 0000000000..5cc73eb112 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.1/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.3.4.3.1 +description: "Ensure protection against domain spoofing based on similar domain names is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, spoofing, phishing, email-security] +cis_id: "3.1.3.4.3.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: + [cis-gworkspace-3.1.3.4.3.2, cis-gworkspace-3.1.3.4.3.3, cis-gworkspace-3.1.3.4.3.4, cis-gworkspace-3.1.3.4.3.5] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.3.1 Ensure protection against domain spoofing based on similar domain names is enabled + +## Overview + +| Property | Value | +| ------------------------- | -------------------------------------------- | +| **CIS ID** | 3.1.3.4.3.1 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Spoofing and authentication | + +## Description + +Moves domain spoofing emails to spam folder. + +## Rationale + +You should protect your users from domain spoofing emails. + +## Impact + +Domain spoofed emails will be moved to a user's spam folder. + +## Default Value + +- `Protect against domain spoofing based on similar domain names` is **checked** +- `Action` is `Keep email in inbox and show warning (default)` + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Spoofing and authentication`, ensure `Protect against domain spoofing based on similar domain names` is **checked** +6. Ensure `Action` is `Move email to spam` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Spoofing and authentication`, set `Protect against domain spoofing based on similar domain names` to **checked** +6. Set `Action` to `Move email to spam` +7. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.3 Maintain and Enforce Network-Based URL Filters | | x | x | +| v7 | 7.4 Maintain and Enforce Network-Based URL Filters | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.2/SKILL.md new file mode 100644 index 0000000000..e31ae981a3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.2/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.3.4.3.2 +description: "Ensure protection against spoofing of employee names is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, spoofing, phishing, email-security] +cis_id: "3.1.3.4.3.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: + [cis-gworkspace-3.1.3.4.3.1, cis-gworkspace-3.1.3.4.3.3, cis-gworkspace-3.1.3.4.3.4, cis-gworkspace-3.1.3.4.3.5] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.3.2 Ensure protection against spoofing of employee names is enabled + +## Overview + +| Property | Value | +| ------------------------- | -------------------------------------------- | +| **CIS ID** | 3.1.3.4.3.2 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Spoofing and authentication | + +## Description + +Moves employee spoofing emails to spam folder. + +## Rationale + +You should protect your users from employee spoofing emails. + +## Impact + +Employee spoofed emails will be moved to a user's spam folder. + +## Default Value + +- `Protect against spoofing of employee names` = **checked** +- `Action` = `Keep email in inbox and show warning (default)` + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Spoofing and authentication`, ensure `Protect against spoofing of employee names` is **checked** +6. Ensure `Action` is `Move email to spam` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Spoofing and authentication`, set `Protect against spoofing of employee names` to **checked** +6. Set `Action` to `Move email to spam` +7. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.3 Maintain and Enforce Network-Based URL Filters | | x | x | +| v7 | 7.4 Maintain and Enforce Network-Based URL Filters | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.3/SKILL.md new file mode 100644 index 0000000000..6d5831c127 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.3/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.3.4.3.3 +description: "Ensure protection against inbound emails spoofing your domain is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, spoofing, phishing, email-security] +cis_id: "3.1.3.4.3.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: + [cis-gworkspace-3.1.3.4.3.1, cis-gworkspace-3.1.3.4.3.2, cis-gworkspace-3.1.3.4.3.4, cis-gworkspace-3.1.3.4.3.5] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.3.3 Ensure protection against inbound emails spoofing your domain is enabled + +## Overview + +| Property | Value | +| ------------------------- | -------------------------------------------- | +| **CIS ID** | 3.1.3.4.3.3 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Spoofing and authentication | + +## Description + +Moves inbound emails spoofing your domain to spam folder. + +## Rationale + +You should protect your users from inbound company domain spoofing emails. + +## Impact + +Inbound company domain spoofed emails will be moved to a user's spam folder. + +## Default Value + +- `Protect against inbound emails spoofing your domain` = **checked** +- `Action` = `Keep email in inbox and show warning (default)` + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Spoofing and authentication`, ensure `Protect against inbound emails spoofing your domain` is **checked** +6. Ensure `Action` is `Move email to spam` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Spoofing and authentication`, set `Protect against inbound emails spoofing your domain` to **checked** +6. Set `Action` to `Move email to spam` +7. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.3 Maintain and Enforce Network-Based URL Filters | | x | x | +| v7 | 7.4 Maintain and Enforce Network-Based URL Filters | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.4/SKILL.md new file mode 100644 index 0000000000..bf2e8d64a8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.4/SKILL.md @@ -0,0 +1,72 @@ +--- +name: cis-gworkspace-3.1.3.4.3.4 +description: "Ensure protection against any unauthenticated emails is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, spoofing, phishing, email-security] +cis_id: "3.1.3.4.3.4" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: + [cis-gworkspace-3.1.3.4.3.1, cis-gworkspace-3.1.3.4.3.2, cis-gworkspace-3.1.3.4.3.3, cis-gworkspace-3.1.3.4.3.5] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.3.4 Ensure protection against any unauthenticated emails is enabled + +## Overview + +| Property | Value | +| ------------------------- | -------------------------------------------- | +| **CIS ID** | 3.1.3.4.3.4 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Spoofing and authentication | + +## Description + +Displays a warning when any message is not authenticated (SPF or DKIM). + +## Rationale + +You should protect your users from any emails that aren't authenticated (SPF or DKIM). + +## Impact + +Emails that aren't authenticated (SPF or DKIM) display a warning message to the recipient. + +## Default Value + +`Protect against any unauthenticated emails` = **unchecked** + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Spoofing and authentication`, ensure `Protect against any unauthenticated emails` is **checked** + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Spoofing and authentication`, set `Protect against any unauthenticated emails` to **checked** +6. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.5 Implement DMARC | | x | x | +| v7 | 7.8 Implement DMARC and Enable Receiver-Side Verification | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.5/SKILL.md new file mode 100644 index 0000000000..a43913b691 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.4.3.5/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-gworkspace-3.1.3.4.3.5 +description: "Ensure groups are protected from inbound emails spoofing your domain" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, spoofing, phishing, email-security] +cis_id: "3.1.3.4.3.5" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: + [cis-gworkspace-3.1.3.4.3.1, cis-gworkspace-3.1.3.4.3.2, cis-gworkspace-3.1.3.4.3.3, cis-gworkspace-3.1.3.4.3.4] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.3.4.3.5 Ensure groups are protected from inbound emails spoofing your domain + +## Overview + +| Property | Value | +| ------------------------- | -------------------------------------------- | +| **CIS ID** | 3.1.3.4.3.5 | +| **Level** | L1 | +| **Profile Applicability** | Enterprise Level 1 | +| **Assessment Type** | Manual | +| **Section** | Gmail > Safety > Spoofing and authentication | + +## Description + +If a group receives an email that is spoofing your domain it is sent to the spam folder. + +## Rationale + +You should protect your groups from any emails that spoofing your domain. + +## Impact + +Emails that are spoofing your domain and are received by a group are sent to the spam folder. + +## Default Value + +Not specified in benchmark. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Spoofing and authentication`, ensure `Protect your Groups from inbound emails spoofing your domain` is **checked** +6. Ensure `Action` is set to `Move email to spam` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to [https://admin.google.com](https://admin.google.com) as an administrator +2. Select **Apps** +3. Select **Google Workspace** +4. Select **Gmail** +5. Under `Safety` - `Spoofing and authentication`, set `Protect your Groups from inbound emails spoofing your domain` to **checked** +6. Set `Action` to `Move email to spam` +7. Select **Save** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.5 Implement DMARC | | x | x | +| v7 | 7.8 Implement DMARC and Enable Receiver-Side Verification | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.1/SKILL.md new file mode 100644 index 0000000000..3f25864c12 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.1/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gworkspace-3.1.3.5.1 +description: "Ensure POP and IMAP access is disabled for all users" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, pop, imap] +cis_id: "3.1.3.5.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure POP and IMAP access is disabled for all users (Manual) + +## Description + +POP and IMAP may allow users to access Gmail using legacy or unapproved email clients that do not support modern authentication mechanisms, such as multifactor authentication. + +## Rationale + +Disabling POP and IMAP prevents use of legacy and unapproved email clients with weaker authentication mechanisms that would increase the risk of email account credential compromise. + +## Impact + +If you have Apple iOS or Android device users in your organization and you turn IMAP off, let them know that they're no longer syncing Google Workspace mail to the iOS or Android Mail app. They might not get a notification on their device. Additionally, new users can't manually add the Google Account they use for work or school to the device. + +If your Google Workspace users want to use desktop clients, such as Microsoft Outlook and Apple Mail, to access their Google Workspace mail, you need to enable POP or IMAP access in the Google Admin console. You can enable access for everyone in your organization or only for users in specific organizational units. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Under `End User Access` - `POP and IMAP Access` +6. Ensure `Enable IMAP access for all users` is **unchecked** +7. Ensure `Enable POP access for all users` is **unchecked** + +### Expected Result + +Both `Enable IMAP access for all users` and `Enable POP access for all users` should be unchecked. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Under `End User Access` - `POP and IMAP Access` +6. Set `Enable IMAP access for all users` to **unchecked** +7. Set `Enable POP access for all users` to **unchecked** +8. Select `Save` + +## Default Value + +- `Enable IMAP access for all users` is **checked** +- `Enable POP access for all users` is **checked** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.2/SKILL.md new file mode 100644 index 0000000000..be42934aed --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.2/SKILL.md @@ -0,0 +1,69 @@ +--- +name: cis-gworkspace-3.1.3.5.2 +description: "Ensure automatic forwarding options are disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, forwarding] +cis_id: "3.1.3.5.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure automatic forwarding options are disabled (Manual) + +## Description + +You should disable automatic forwarding to prevent users from auto-forwarding mail. + +## Rationale + +In the event that an attacker gains control of an end-user account they could create rules to ex-filtrate data from your environment. + +## Impact + +Care should be taken before implementation to ensure there is no business need for case-by-case auto-forwarding. Disabling auto-forwarding to remote domains will affect all users and in an organization. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Under `End User Access` - `Automatic forwarding`, ensure `Allow users to automatically forward incoming email to another address` is **unchecked** + +### Expected Result + +`Allow users to automatically forward incoming email to another address` should be unchecked. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Under `End User Access` - `Automatic forwarding`, set `Allow users to automatically forward incoming email to another address` to **unchecked** +6. Select `Save` + +## Default Value + +`Allow users to automatically forward incoming email to another address` is **checked** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.3/SKILL.md new file mode 100644 index 0000000000..bb29294e56 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.3/SKILL.md @@ -0,0 +1,66 @@ +--- +name: cis-gworkspace-3.1.3.5.3 +description: "Ensure per-user outbound gateways is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, forwarding] +cis_id: "3.1.3.5.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure per-user outbound gateways is disabled (Manual) + +## Description + +A per-user outbound gateway is a mail server, other than the Google Workspace mail servers, that delivers outgoing mail for a user in your domain. + +## Rationale + +Mail sent via external SMTP will circumvent your outbound gateway. + +## Impact + +Care should be taken before implementation to ensure there is no business need for mail sent via external SMTP gateway. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Under `End User Access` - `Allow per-user outbound gateways`, ensure `Allow users to send mail through an external SMTP server when configuring a "from" address hosted outside your email domain` is **unchecked** + +### Expected Result + +`Allow users to send mail through an external SMTP server when configuring a "from" address hosted outside your email domain` should be unchecked. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Under `End User Access` - `Allow per-user outbound gateways`, set `Allow users to send mail through an external SMTP server when configuring a "from" address hosted outside your email domain` to **unchecked** +6. Select `Save` + +## Default Value + +`Allow users to send mail through an external SMTP server when configuring a "from" address hosted outside your email domain` is **unchecked** + +## CIS Controls + +This control does not have explicit CIS Controls mappings in the PDF. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.4/SKILL.md new file mode 100644 index 0000000000..44a92222e1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.5.4/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-3.1.3.5.4 +description: "Ensure external recipient warnings are enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, forwarding] +cis_id: "3.1.3.5.4" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure external recipient warnings are enabled (Manual) + +## Description + +Gmail adds an image or colored border to external addresses. + +## Rationale + +As an admin for your organization, you can turn alerts on or off for messages that include external recipients (people with email addresses outside of your organization). These alerts help people avoid unintentional replies, and remind them to treat external messages with caution. + +## Impact + +When this setting is on, Gmail shows warnings (colored border) when: + +- An email thread includes external recipients (not available on iOS). +- Replying to a message from an external recipient. +- Composing a new message to an external recipient (not available on iOS). + +Gmail doesn't show a warning if the external recipient is in your organization's Directory, personal Contacts, or other Contacts. Warnings aren't displayed for secondary domain or domain alias addresses. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Select `End User Access` +6. Under `Warn for external recipients`, ensure `Highlight any external recipients in a conversation. Warn users before they reply to email with external recipients who aren't in their contacts.` is **ON** + +### Expected Result + +`Highlight any external recipients in a conversation. Warn users before they reply to email with external recipients who aren't in their contacts.` should be ON. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Select `End User Access` +6. Select `Warn for external recipients` +7. Set `Highlight any external recipients in a conversation. Warn users before they reply to email with external recipients who aren't in their contacts.` to **checked** +8. Select `Save` + +## Default Value + +`Highlight any external recipients in a conversation. Warn users before they reply to email with external recipients who aren't in their contacts.` is **ON** + +## CIS Controls + +This control does not have explicit CIS Controls mappings in the PDF. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.6.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.6.1/SKILL.md new file mode 100644 index 0000000000..63a41f1439 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.6.1/SKILL.md @@ -0,0 +1,72 @@ +--- +name: cis-gworkspace-3.1.3.6.1 +description: "Ensure enhanced pre-delivery message scanning is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, spam] +cis_id: "3.1.3.6.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure enhanced pre-delivery message scanning is enabled (Manual) + +## Description + +Enables improved detection of suspicious content prior to delivery. + +## Rationale + +As an administrator, you can increase Gmail's ability to identify suspicious content with enhanced pre-delivery message scanning. Typically, when Gmail identifies a possible phishing message, a warning is displayed and the message might be moved to spam. + +## Impact + +With the Enhanced pre-delivery message scanning option, when Gmail detects suspicious content, message delivery is slightly delayed so that Gmail can do additional security checks on the message. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Select `Spam, phishing, and malware` +6. Ensure `Enhanced pre-delivery message scanning.` is **ON** + +### Expected Result + +`Enhanced pre-delivery message scanning.` should be ON. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Select `Spam, phishing, and malware` +6. Select `Enhanced pre-delivery message scanning.` +7. Set `Enables improved detection of suspicious content prior to delivery` to **checked** +8. Select `Save` + +## Default Value + +`Enhanced pre-delivery message scanning.` is **ON** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 9.7 Deploy and Maintain Email Server Anti-Malware Protections | | | x | +| v7 | 7.10 Sandbox All Email Attachments | | | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.6.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.6.2/SKILL.md new file mode 100644 index 0000000000..083631631f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.6.2/SKILL.md @@ -0,0 +1,70 @@ +--- +name: cis-gworkspace-3.1.3.6.2 +description: "Ensure spam filters are not bypassed for internal senders" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, spam] +cis_id: "3.1.3.6.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure spam filters are not bypassed for internal senders (Manual) + +## Description + +You can configure your advanced Gmail settings to bypass, or not bypass, spam filters for messages received from internal senders. + +## Rationale + +Turning off this setting reduces the risk of spoofing and phishing/whaling. + +## Impact + +Your users will be better protected by filtering their email for spam and minimizing the chances for spoofing and phishing/whaling attacks. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Select `Spam, phishing, and malware` +6. Under `Spam`, select `Configure` +7. Ensure `Bypass spam filters for messages received from internal senders.` is **unchecked** + +### Expected Result + +`Bypass spam filters for messages received from internal senders.` should be unchecked. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Select `Spam, phishing, and malware` +6. Under `Spam`, select `Configure` +7. Set `Bypass spam filters for messages received from internal senders.` to **unchecked** +8. Select `Save` + +## Default Value + +`Bypass spam filters for messages received from internal senders.` is **checked** + +## CIS Controls + +This control does not have explicit CIS Controls mappings in the PDF. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.7.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.7.1/SKILL.md new file mode 100644 index 0000000000..e0b8391b9d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.7.1/SKILL.md @@ -0,0 +1,73 @@ +--- +name: cis-gworkspace-3.1.3.7.1 +description: "Ensure comprehensive mail storage is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, compliance, mail-storage] +cis_id: "3.1.3.7.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure comprehensive mail storage is enabled (Manual) + +## Description + +Comprehensive mail storage ensures messages sent by other core services appear in users' sent folders and are therefore accessible to Vault. + +## Rationale + +As an administrator, you can ensure that a copy of all sent or received messages in your domain--including messages sent or received by non-Gmail mailboxes--is stored in the associated users' Gmail mailboxes. + +## Impact + +There are some important considerations to carefully review before enabling comprehensive mail storage: + +- You should not enable comprehensive mail storage if you have compliance routing rules that change the recipient (and don't want the original recipient to receive a copy of the email). +- When you have the SMTP Relay service enabled, user mailboxes will keep a copy of the message in the sent folder (for example, when sending mail from a scanner) if comprehensive mail storage is enabled. This might cause accounts to exceed storage limits if your account's edition has storage limits. +- You should enable comprehensive mail storage if you only use Gmail for the Vault feature and forward email to your on-premise mail server or other email provider. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Select `Compliance` +6. Under `Comprehensive mail storage`, ensure `Ensure that a copy of all sent and received mail is stored in associated users' mailboxes` is **ON** + +### Expected Result + +`Ensure that a copy of all sent and received mail is stored in associated users' mailboxes` should be ON. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Select `Compliance` +6. Select `Comprehensive mail storage` +7. Set `Ensure that a copy of all sent and received mail is stored in associated users' mailboxes` to **checked** +8. Select `Save` + +## Default Value + +`Copy of all sent and received mail is stored in associated users' mailboxes` is **OFF** + +## CIS Controls + +This control does not have explicit CIS Controls mappings in the PDF. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.7.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.7.2/SKILL.md new file mode 100644 index 0000000000..95ad1f812f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.3.7.2/SKILL.md @@ -0,0 +1,86 @@ +--- +name: cis-gworkspace-3.1.3.7.2 +description: "Ensure 'Send email over a secure TLS connection' Is Enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, gmail, tls, compliance] +cis_id: "3.1.3.7.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Send email over a secure TLS connection' Is Enabled (Manual) + +## Description + +The default is that Gmail always tries to send messages over a secure TLS connection. If the receiving server doesn't use TLS, Gmail still sends messages with TLS but the connection isn't secure. + +This setting allows the option to require a CA-signed certificate, verify the hostname associated with the certificate, and test the TLS connection. + +A padlock image will appear next to the recipient address if the message will be sent with TLS. The padlock shows only for accounts with a Google Workspace subscription that supports S/MIME encryption. + +Google Workspace supports TLS versions 1.0, 1.1, 1.2, and 1.3. + +## Rationale + +Transport Layer Security (TLS) encrypts email messages for security and privacy and prevents unauthorized access of messages when they're sent over internet connections. + +## Impact + +This should not have an impact on the usage of Gmail. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Select `Compliance` +6. Under `Secure transport (TLS) compliance`, select `Configure` +7. Under `Email messages to affect` ensure `Inbound - all messages` and `Outbound - all messages` are **ON** + +### Expected Result + +Both `Inbound - all messages` and `Outbound - all messages` should be ON under Secure transport (TLS) compliance. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Gmail` +5. Select `Compliance` +6. Select `Secure transport (TLS) compliance` +7. Select `Configure` +8. Set `Inbound - all messages` and `Outbound - all messages` to **checked** +9. Select `Save` + +**Note:** Enabling the `Inbound - all messages` and `Outbound - all messages` configurations will also, by default, enable `Require CA-signed certificate when delivering outbound messages to the TLS-enabled domains specified above`. This is not a required configuration, but it is recommended. + +## Default Value + +This setting is not configured by default. + +## References + +1. https://support.google.com/a/answer/2520500 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.1.1/SKILL.md new file mode 100644 index 0000000000..1f0722ad87 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.1.1/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-gworkspace-3.1.4.1.1 +description: "Ensure external filesharing in Google Chat and Hangouts is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, google-chat, filesharing] +cis_id: "3.1.4.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure external filesharing in Google Chat and Hangouts is disabled (Manual) + +## Description + +Control how files are shared externally in Google Chat and Hangouts. + +## Rationale + +Files often contain confidential information, and some organizations, particularly in regulated industries, need to control the flow of this information within and outside of their organization. + +## Impact + +Users will not be able to share files via chat externally. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `Chat File Sharing` +5. Under `Setting`, verify `External filesharing` is set to `No files` + +### Expected Result + +`External filesharing` should be set to `No files`. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `Chat File Sharing` +5. Under `Setting`, set `External filesharing` to `No files` +6. Select `Save` + +## Default Value + +`External filesharing` is `Allow all files` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.1.2/SKILL.md new file mode 100644 index 0000000000..f1b16a8337 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.1.2/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-gworkspace-3.1.4.1.2 +description: "Ensure internal filesharing in Google Chat and Hangouts is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, google-chat, filesharing] +cis_id: "3.1.4.1.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure internal filesharing in Google Chat and Hangouts is disabled (Manual) + +## Description + +Control how files are shared internally in Google Chat and Hangouts. + +## Rationale + +Files often contain confidential information, and some organizations, particularly in regulated industries, need to control the flow of this information within and outside of their organization. + +## Impact + +Users will not be able to share files via chat internally. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `Chat File Sharing` +5. Under `Setting`, verify `Internal filesharing` is set to `No files` + +### Expected Result + +`Internal filesharing` should be set to `No files`. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `Chat File Sharing` +5. Under `Setting`, set `Internal filesharing` to `No files` +6. Select `Save` + +## Default Value + +`Internal filesharing` is `Allow all files` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.2.1/SKILL.md new file mode 100644 index 0000000000..275fcf6ee8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.2.1/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-gworkspace-3.1.4.2.1 +description: "Ensure Google Chat externally is restricted to allowed domains" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, google-chat, external-chat] +cis_id: "3.1.4.2.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Google Chat externally is restricted to allowed domains (Manual) + +## Description + +Control how users chat with people outside of your organization. If you allow your users to chat externally, you can also allow them to create and join spaces with people outside your organization. + +## Rationale + +Restricting external chat to only approved domains potentially limits the spread of company information. + +## Impact + +Users will not be able to chat with users in any external domain, only approved domains. This will require some admin-level approval and allowlist maintenance. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `External Chat Settings` +5. Select `Chat externally` +6. Verify `Allow users to send messages outside ` is **ON** +7. Verify `Only allow this for allowlisted domains` is **checked** + +### Expected Result + +`Allow users to send messages outside ` should be ON, and `Only allow this for allowlisted domains` should be checked. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `External Chat Settings` +5. Select `Chat externally` +6. Set `Allow users to send messages outside ` to **ON** +7. Set `Only allow this for allowlisted domains` to **checked** +8. Select `Save` + +## Default Value + +- `Allow users to send messages outside ` is set to **ON** +- `Only allow this for allowlisted domains` is **unchecked** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.3.1/SKILL.md new file mode 100644 index 0000000000..48b7274423 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.3.1/SKILL.md @@ -0,0 +1,72 @@ +--- +name: cis-gworkspace-3.1.4.3.1 +description: "Ensure external spaces in Google Chat and Hangouts are restricted" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, google-chat, external-chat] +cis_id: "3.1.4.3.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure external spaces in Google Chat and Hangouts are restricted (Manual) + +## Description + +Control whether users can create or join spaces within your organization that include external people outside of your organization. + +## Rationale + +Restricting external spaces to only approved domains potentially limits the spread of company information. + +## Impact + +Users with this setting turned off or who have editions that don't support external spaces can't create these spaces, but they can join existing spaces with external people. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `External Spaces` +5. Under `Setting`, verify `Allow users at to create and join spaces with people outside their organization` is **ON** +6. Verify `Only allow users to add people from allowlisted domains` is **checked** + +### Expected Result + +`Allow users at to create and join spaces with people outside their organization` should be ON, and `Only allow users to add people from allowlisted domains` should be checked. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `External Spaces` +5. Under `Setting`, set `Allow users at to create and join spaces with people outside their organization` to **ON** +6. Set `Only allow users to add people from allowlisted domains` to **checked** +7. Select `Save` + +## Default Value + +- `Allow users at to create and join spaces with people outside their organization` is **ON** +- `Only allow users to add people from allowlisted domains` is **unchecked** + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.4.1/SKILL.md new file mode 100644 index 0000000000..bf6ebf5d02 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.4.1/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-3.1.4.4.1 +description: "Ensure allow users to install Chat apps is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, google-chat, chat-apps] +cis_id: "3.1.4.4.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure allow users to install Chat apps is disabled (Manual) + +## Description + +Control the use of Chat apps in spaces or direct messages to connect to services in Google Chat and look up information, schedule meetings, or complete tasks. Apps are accounts created by Google, users in your organization, or third parties. + +## Rationale + +When a user interacts with an app in Chat, the app can see the user's email address, avatar, other basic user information, user locale, timezone, and interaction information. The app can also see the basic user information of other people in the chat, but it can't see their email address or avatar unless they also interact directly with the app. + +Chat apps that you install from the Google Workspace Marketplace can be made by developers from outside of your organization. + +Using these Chat app need to be carefully controlled (vetted and approved) since a malicious Chat app could allow the exfiltration of company proprietary information. + +## Impact + +By default users will not be able to install Chat apps. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `Chat apps` +5. Under `Chat apps access settings`, verify `Allow users to install Chat apps` is **OFF** + +### Expected Result + +`Allow users to install Chat apps` should be OFF. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `Chat apps` +5. Under `Chat apps access settings`, set `Allow users to install Chat apps` to **OFF** +6. Select `Save` + +## Default Value + +`Allow users to install Chat apps` is **ON** + +## References + +1. https://developers.google.com/chat/concepts/apps + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.4.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.4.2/SKILL.md new file mode 100644 index 0000000000..744a396fa8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.4.4.2/SKILL.md @@ -0,0 +1,65 @@ +--- +name: cis-gworkspace-3.1.4.4.2 +description: "Ensure allow users to add and use incoming webhooks is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, google-chat, webhooks, chat-apps] +cis_id: "3.1.4.4.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure allow users to add and use incoming webhooks is disabled (Manual) + +## Description + +Allow users to configure incoming webhooks and developers to call incoming webhooks to post content. Incoming webhooks let you send asynchronous messages into Google Chat from applications that aren't Chat apps. + +## Rationale + +Webhook usage should be carefully controlled (vetted and approved) since a malicious application could send bogus information to exposed webhooks and ultimately these users. + +## Impact + +By default users will have exposed webhooks. + +## Audit Procedure + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `Chat apps` +5. Under `Chat apps access settings`, verify `Allow users to add and use incoming webhooks` is **OFF** + +### Expected Result + +`Allow users to add and use incoming webhooks` should be OFF. + +## Remediation + +### Using Google Workspace Admin Console + +1. Log in to https://admin.google.com as an administrator +2. Select `Apps` +3. Select `Google Chat and classic Hangouts` +4. Select `Chat apps` +5. Under `Chat apps access settings`, set `Allow users to add and use incoming webhooks` to **OFF** + +## Default Value + +`Allow users to add and use incoming webhooks` is **ON** + +## CIS Controls + +This control does not have explicit CIS Controls mappings in the PDF. + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.6.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.6.1/SKILL.md new file mode 100644 index 0000000000..97474bd742 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.6.1/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-gworkspace-3.1.6.1 +description: "Ensure accessing groups from outside this organization is set to private" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, groups, external-access, permissions] +cis_id: "3.1.6.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.6.1 Ensure accessing groups from outside this organization is set to private + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +Choose whether people outside your organization can access your groups. Group owners can further restrict access as needed. + +## Rationale + +Who can externally view groups internal to the organization should be carefully controlled and their access vetted as needed. + +## Impact + +No one outside your organization can view or search for your groups. External users can email the group if group settings allow. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Groups for Business` +5. Select `Sharing options` +6. Verify `Accessing groups from outside this organization` is `Private` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Groups for Business` +5. Select `Sharing options` +6. Set `Accessing groups from outside this organization` to `Private` +7. Select `Save` + +## Default Value + +`Accessing groups from outside this organization` is `Private` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.6.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.6.2/SKILL.md new file mode 100644 index 0000000000..698166f59f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.6.2/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-gworkspace-3.1.6.2 +description: "Ensure creating groups is restricted" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, groups, permissions, external-access] +cis_id: "3.1.6.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.6.2 Ensure creating groups is restricted + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +Control who is allowed to create Groups in your organization and if they can have external members. + +## Rationale + +The organization should have some control over the organizational groups created and the purpose they are for. + +## Impact + +In a large organization, this may cause too much burden on administrators. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Groups for Business` +5. Select `Creating groups` +6. Verify `Only organization admins can create groups` is `selected` +7. Verify `Group owners can allow external members Organization admins can always add external members` is `unchecked` +8. Verify `Group owners can allow incoming email from outside the organization` is `unchecked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Groups for Business` +5. Select `Creating groups` +6. Select `Only organization admins can create groups` +7. Set `Group owners can allow external members Organization admins can always add external members` to `unchecked` +8. Set `Group owners can allow incoming email from outside the organization` to `unchecked` +9. Select `Save` + +## Default Value + +- `Anyone in the organization can create groups` is `selected` +- `Group owners can allow external members Organization admins can always add external members` is `unchecked` +- `Group owners can allow incoming email from outside the organization` is `unchecked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.6.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.6.3/SKILL.md new file mode 100644 index 0000000000..ed69a0b108 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.6.3/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-gworkspace-3.1.6.3 +description: "Ensure default for permission to view conversations is restricted" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, groups, permissions, external-access] +cis_id: "3.1.6.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.6.3 Ensure default for permission to view conversations is restricted + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +By default, only allow group members to view group conversations. + +## Rationale + +Conversation viewing can always be expanded by exception for certain groups as needed (Need to know), but by default be restricted. + +## Impact + +No practical impact, since Group members can view conversations in the Group. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Groups for Business` +5. Select `Sharing options` +6. Verify `Default for permission to view conversations` is `All group members` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Groups for Business` +5. Select `Sharing options` +6. Set `Default for permission to view conversations` to `All group members` +7. Select `Save` + +## Default Value + +`Default for permission to view conversations` is `All organization users` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.7.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.7.1/SKILL.md new file mode 100644 index 0000000000..91eae615bb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.7.1/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-gworkspace-3.1.7.1 +description: "Ensure service status for Google Sites is set to off" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, sites, permissions] +cis_id: "3.1.7.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.7.1 Ensure service status for Google Sites is set to off + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +By default turn off Google Sites for all users. + +## Rationale + +There is really no reason for every user within an organization to have access to Google Sites. If this capability is needed, it can be enabled and configured for those users and groups by exception as required by the organization to meet specific needs. + +## Impact + +Users will not be have access to Google Sites. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Sites` +5. Select `Service status` +6. Verify `Service status` is `OFF for everyone` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Sites` +5. Select `Service status` +6. Set `Service status` to `OFF for everyone` +7. Select `Save` + +## Default Value + +`Service status` is `ON for everyone` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.8.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.8.1/SKILL.md new file mode 100644 index 0000000000..47bb7018f4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.8.1/SKILL.md @@ -0,0 +1,83 @@ +--- +name: cis-gworkspace-3.1.8.1 +description: "Ensure access to external Google Groups is OFF for Everyone" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, google-groups, external-access, permissions] +cis_id: "3.1.8.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.8.1 Ensure access to external Google Groups is OFF for Everyone + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +Control whether users in your organization can access external groups from their Google Workspace account. External groups are created outside your organization and might include a public community group or a group for a club a user belongs to. + +Control access to external groups by turning on or off the Google Groups additional service -- a legacy service in your Admin console that does only one thing: It allows or blocks users from accessing external groups from their Google Workspace account. + +NOTE: This service has no effect on your organization's internal groups. + +## Rationale + +In general, most of the organization's personnel do not need to assess external groups. They can be allowed by exception as needed by the business. + +## Impact + +Users can't access external groups from their Google Workspace account. However, they do continue to receive email digests from groups they're already subscribed to when you turn off the service. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Additional Google services` +5. Scroll down to `Google Groups` +6. Verify it is `OFF for everyone` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace` +4. Select `Additional Google services` +5. Scroll down to `Google Groups` +6. Set it to `OFF for everyone` +7. Select `Save` + +## Default Value + +`Google Groups` is `ON for Everyone` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.8 Uninstall or Disable Unnecessary Services on Enterprise Assets and Software | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.9.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.9.1.1/SKILL.md new file mode 100644 index 0000000000..ac551b1bb9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-3.1.9.1.1/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-3.1.9.1.1 +description: "Ensure users access to Google Workspace Marketplace apps is restricted" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, marketplace, permissions, external-access] +cis_id: "3.1.9.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1.9.1.1 Ensure users access to Google Workspace Marketplace apps is restricted + +## Level + +L1 + +## Profile Applicability + +- Enterprise Level 1 + +## Type + +Manual + +## Description + +Restrict what Google Marketplace apps a user can install. + +## Rationale + +Users should only be allowed to install approved and vetted apps. This will limit the overall attack surface for the organization. + +## Impact + +Users can only install approved Google Marketplace apps. This list will have to be created and maintained. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace Marketplace apps` +4. Select `Settings` +5. Under `Manage Google Workspace Marketplace allowlist access`, verify `Settings to install third-party Google Workspace Marketplace apps:` is set to `Allow users to install and run only selected apps from the Marketplace` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Apps` +3. Select `Google Workspace Marketplace apps` +4. Select `Settings` +5. Under `Manage Google Workspace Marketplace allowlist access`, set `Settings to install third-party Google Workspace Marketplace apps:` to `Allow users to install and run only selected apps from the Marketplace` +6. Select `Save` + +## Default Value + +`Settings to install third-party Google Workspace Marketplace apps:` is `Allow users to install and run any app from the Marketplace` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.1.1/SKILL.md new file mode 100644 index 0000000000..8947274741 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.1.1/SKILL.md @@ -0,0 +1,84 @@ +--- +name: cis-gworkspace-4.1.1.1 +description: "Ensure 2-Step Verification (MFA) is enforced for all users in administrative roles" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, mfa, 2fa, authentication] +cis_id: "4.1.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.1.1 Ensure 2-Step Verification (MFA) is enforced for all users in administrative roles + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Enforce 2-Step Verification (Multi-Factor Authentication) for all users assigned administrative roles. These include roles such as: + +- Help Desk Admin +- Groups Admin +- Super Admin +- Services Admin +- User Management Admin +- Mobile Admin +- Android Admin +- Custom Admin Roles + +## Rationale + +Add an extra layer of security to users accounts by asking users to verify their identity when they enter a username and password. 2-Step Verification (Multi-factor authentication) requires an individual to present a minimum of two separate forms of authentication before access is granted. 2-Step Verification provides additional assurance that the individual attempting to gain access is who they claim to be. With 2-Step Verification, an attacker would need to compromise at least two different authentication mechanisms, increasing the difficulty of compromise and thus reducing the risk. + +## Impact + +Implementation of 2-Step Verification (multi-factor authentication) for all users in administrative roles will necessitate a change to user routine. All users in administrative roles will be required to enroll in 2-Step Verification using phone, SMS, or an authentication application. After enrollment, use of 2-Step Verification will be required for future access to the environment. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Go to `Security` and click on `2-Step Verification` +3. Select the appropriate group with `ALL ADMIN ROLES` -- Create this group if needed +4. Under `Authentication`, ensure `Allow users to turn on 2-Step Verification` is `checked` +5. Ensure `Enforcement` is set to `On` +6. Ensure `New user enrollment period` is set to `2 weeks` +7. Under `Frequency`, ensure `Allow user to trust device` is `unchecked` +8. Under `Methods`, ensure `Any except verification codes via text, phone call` is `selected` + +## Remediation + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Go to `Security` and click on `2-Step Verification` +3. Select the appropriate group with `ALL ADMIN ROLES` -- Create this group if needed +4. Under `Authentication`, set `Allow users to turn on 2-Step Verification` to `checked` +5. Set `Enforcement` to `On` +6. Set `New user enrollment period` is set to `2 weeks` +7. Under `Frequency`, set `Allow user to trust device` to `unchecked` +8. Under `Methods`, set `Any except verification codes via text, phone call` to `selected` +9. Select `Save` + +## Default Value + +- `Allow users to turn on 2-Step Verification` is `checked` +- `Enforcement` is `Off` +- `New user enrollment period` is `None` +- `Frequency - Allow user to trust device` is `checked` +- `Methods` is `Any` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.5 Require MFA for Administrative Access | x | x | x | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.1.2/SKILL.md new file mode 100644 index 0000000000..82a5754b34 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.1.2/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-gworkspace-4.1.1.2 +description: "Ensure hardware security keys are used for all users in administrative roles and other high-value accounts" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, mfa, 2fa, security-keys, authentication] +cis_id: "4.1.1.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.1.2 Ensure hardware security keys are used for all users in administrative roles and other high-value accounts + +## Profile Applicability + +- Enterprise Level 2 + +## Description + +A hardware security key connects to a user's device using USB (A & C), Lightning, NFC, or Bluetooth connection. Also, many Android phones and Apple iPhones have built-in security keys accessible via Bluetooth and that can be assigned to a Google Workspace account. + +The purpose of a physical security key is to provide an additional security layer to high value accounts; in the event of a compromise of a user's credentials (username and password) without the associated security key, the authentication process cannot be successfully completed. + +## Rationale + +The purpose of a physical security key is to provide an additional security layer to high value accounts; in the event of a compromise of a user's credentials (username and password) without the associated security key, the authentication process cannot be successfully completed. + +Hardware security keys help to protect high value accounts from targeted attacks, including phishing attempts. + +Adding a hardware security key requirement to your Google privileged accounts adds another layer of depth of protection greater than any other form of two-factor authentication. + +## Impact + +Users with hardware security keys enabled will need to have physical access to the hardware key in order complete the authentication process and this will force users to adopt a practice of making sure that the physical key is available to them at any point in time that they need to be able to log in. + +If a hardware security key is lost or stolen, the impacted user can gain access to their Google account by using a backup MFA process and then remove the lost/stolen key and add another one. + +If a hardware security key is stolen, the user's account is not automatically compromised as the hardware key works in conjunction with the user's account credentials (username & password). + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Go to `Security` and click on `Authentication` +3. Under `Authentication`, select `2-Step Verification` +4. Ensure the option to `Allow users to turn on 2-Step Verification` is checked +5. Ensure that the `Enforcement` option is set to either `'On'` or `'On from'` with a valid date present +6. Under `Methods` ensure that `Only security key` is selected +7. Under `2-Step Verification policy suspension grace period` ensure that `1 day` is selected +8. Under `Security codes` ensure that `Don't allow users to generate security codes` is selected + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Go to `Security` and click on `Authentication` +3. Under `Authentication`, select `2-Step Verification` +4. Select the option to `Allow users to turn on 2-Step Verification` +5. Under `Enforcement`, enable either `'On'` or else `'On from'` and configure a valid date +6. Under `Methods`, select `Only security key` to force the use of a security key +7. Under `2-Step Verification policy suspension grace period`, select `1 day` +8. Under `Security codes`, select `Don't allow users to generate security codes` +9. Select `Save` + +## Default Value + +- `Allow users to turn on 2-Step Verification` is `checked` +- `Enforcement` is `Off` +- `New user enrollment period` is `None` +- `Frequency - Allow user to trust device` is `checked` +- `Methods` is `Any` + +## References + +1. https://support.google.com/accounts/answer/6103523?hl=En + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.5 Require MFA for Administrative Access | x | x | x | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.1.3/SKILL.md new file mode 100644 index 0000000000..af609974e8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.1.3/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-4.1.1.3 +description: "Ensure 2-Step Verification (MFA) is enforced for all users" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, mfa, 2fa, authentication] +cis_id: "4.1.1.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.1.3 Ensure 2-Step Verification (MFA) is enforced for all users + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Enforce 2-Step Verification (Multi-Factor Authentication) for all users. + +## Rationale + +Add an extra layer of security to users accounts by asking users to verify their identity when they enter a username and password. 2-Step Verification (Multi-factor authentication) requires an individual to present a minimum of two separate forms of authentication before access is granted. 2-Step Verification provides additional assurance that the individual attempting to gain access is who they claim to be. With 2-Step Verification, an attacker would need to compromise at least two different authentication mechanisms, increasing the difficulty of compromise and thus reducing the risk. + +## Impact + +Implementation of 2-Step Verification (multi-factor authentication) for all users will necessitate a change to user routine. All users will be required to enroll in 2-Step Verification using phone, SMS, or an authentication application. After enrollment, use of 2-Step Verification will be required for future access to the environment. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `2-Step Verification` +4. Under `Authentication`, ensure `Allow users to turn on 2-Step Verification` is `checked` +5. Ensure `Enforcement` is set to `On` +6. Ensure `New user enrollment period` is set to `2 weeks` +7. Under `Frequency`, ensure `Allow user to trust device` is `not checked` +8. Under `Methods`, ensure `Any except verification codes via text, phone call` is `selected` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `2-Step Verification` +4. Under `Authentication`, check `Allow users to turn on 2-Step Verification` +5. Set `Enforcement` to `On` +6. Set `New user enrollment period` to `2 weeks` +7. Under `Frequency`, uncheck `Allow user to trust device` +8. Under `Methods`, select `Any except verification codes via text, phone call` +9. Select `Save` + +## Default Value + +- `Allow users to turn on 2-Step Verification` is `checked` +- `Enforcement` is `Off` +- `New user enrollment period` is `None` +- `Frequency - Allow user to trust device` is `checked` +- `Methods` is `Any` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.2.1/SKILL.md new file mode 100644 index 0000000000..33c7b3462d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.2.1/SKILL.md @@ -0,0 +1,65 @@ +--- +name: cis-gworkspace-4.1.2.1 +description: "Ensure Super Admin account recovery is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, account-recovery, authentication] +cis_id: "4.1.2.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.2.1 Ensure Super Admin account recovery is disabled + +## Profile Applicability + +- Enterprise Level 2 + +## Description + +This option allows Super Admin users to recover access to their accounts if their password has been forgotten. + +The option is not available if either _Single Sign On_ or _Password Sync_ is in use. + +## Rationale + +Allowing Super Admins to recover access to their accounts when they have forgotten their passwords reduces the number of support tickets generated by users, and reduces the amount of down time spent waiting on the account recovery process to initiate and complete. + +## Impact + +The potential impact to Super Admins being allowed to recover their accounts includes: + +1. The Super Admins are now empowered to reset their passwords. +2. The Super Admins will no longer need to call a helpdesk or open a support ticket to regain access to their account. + +An organization that allows users to recover their account will realize less time spent by administrative staff working on these tasks. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select `Security`. +3. Select `Authentication`. +4. Under `Account recovery` select `Super admin account recovery`. +5. Ensure `Allow super admins to recover their account` is `unchecked`. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select `Security`. +3. Select `Authentication`. +4. Under `Account recovery` select `Super admin account recovery`. +5. Set `Allow super admins to recover their account` to `unchecked`. +6. Click `Save`. + +## Default Value + +`Allow super admins to recover their account` is `OFF` diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.2.2/SKILL.md new file mode 100644 index 0000000000..1329f306eb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.2.2/SKILL.md @@ -0,0 +1,64 @@ +--- +name: cis-gworkspace-4.1.2.2 +description: "Ensure User account recovery is enabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, account-recovery, authentication] +cis_id: "4.1.2.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.2.2 Ensure User account recovery is enabled + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +This option allows non-Super Admin users to recover access to their accounts if their password has been forgotten. + +The option is not available if either _Single Sign On_ or _Password Sync_ is in use. + +## Rationale + +Allowing users to recover access to their accounts when they have forgotten their passwords reduces the number of support tickets generated by users, and reduces the amount of down time spent waiting on the account recovery process to initiate and complete. + +## Impact + +The potential impact to users being allowed to recover their accounts includes: + +1. The user is now empowered to reset their passwords. +2. The user will no longer need to call a helpdesk or open a support ticket to regain access to their account. + +An organization that allows users to recover their account will realize less time spent by administrative staff working on these tasks. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select `Security`. +3. Select `User account recovery` +4. Verify `Allow users and non-super admins to recover their account` is checked. + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select `Security`. +3. Select `User account recovery` +4. Select either the pencil icon or the setting itself. +5. Set `Allow users and non-super admins to recover their account` to checked. +6. Select `Save`. + +## Default Value + +`Allow users and non-super admins to recover their account` is `OFF` diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.3.1/SKILL.md new file mode 100644 index 0000000000..cc8f924146 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.3.1/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-gworkspace-4.1.3.1 +description: "Ensure Advanced Protection Program is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, advanced-protection, security-keys, authentication] +cis_id: "4.1.3.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.3.1 Ensure Advanced Protection Program is configured + +## Profile Applicability + +- Enterprise Level 2 + +## Description + +Enable Google's Advanced Protection Platform for all users and prevent the use of security codes where applicable. + +## Rationale + +Sophisticated phishing tactics can trick the most savvy users into giving their sign-in credentials to attackers. Advanced Protection requires you to use a security key, which is a hardware device or special software on your phone used to verify your identity, to sign in to your Google Account. Unauthorized users won't be able to sign in without your security key, even if they have your username and password. + +The Advanced Protection Program includes a curated group of high-security policies that are applied to enrolled accounts. Additional policies may be added to the Advanced Protection Program to ensure the protections are current. + +Advanced Protection allows you to apply all of these protections at once, and override similar settings you may have configured manually. These policies include: + +- Strong authentication with security keys +- Use of security codes with security keys (as needed) +- Restrictions on third-party access to account data +- Deep Gmail scans +- Google Safe Browsing protections in Chrome (when users are signed into Chrome using the same identity as their Advanced Protection Program identity) +- Account recovery through admin + +## Impact + +### User Impact + +- You need your security key when you sign in for the first time on a computer, browser, or device. If you stay signed in, you may not be asked to use your security key the next time you log in. +- Limits third-party app access to your data, puts stronger checks on suspicious downloads, and tightens account recovery security to help prevent unauthorized access. + +### Security Keys - 2 Required + +- Android: With an Android 7.0+ phone, you can enroll in a few taps by registering your phone's built-in security key. +- iPhone: If you have an iPhone running iOS 10.0+, install the `Google Smart Lock` app to register your security key first, then enroll. +- Two security keys are required for added assurance. If one key is lost or damaged, users can use the second key to regain account access. + +### Third-Party iDP + +- You can use the Advanced Protection Program with accounts that federate from an IdP using SAML. When users with these accounts enroll in the Advanced Protection Program, we'll require security key use after the user signs in on the IdP. Note that SAML users can select Remember the device to avoid challenges on a browser or device. + +### Security Codes + +- Before allowing users to generate security codes, carefully evaluate if your organization needs them. Using security keys with security codes increases the risk of phishing. However, if your organization has important workflows where security keys can't be used directly, enabling security codes for those situations may help improve your security posture overall. + +### Using 'Sign in with Google' with other apps and services + +- You can still sign into apps and services with Google. If they request access to your Gmail or Drive data, access is denied. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Advanced Protection Program` +4. Under `Enrollment - Allow users to enroll in the Advanced Protection Program`, ensure `Enable user enrollment` is `selected` for the desired organizational unit or group +5. Under `Security Codes`, ensure `Do not allow users to generate security codes` is `selected` for the desired organizational unit or group + +## Remediation + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Advanced Protection Program` +4. Under `Enrollment - Allow users to enroll in the Advanced Protection Program`, set `Enable user enrollment` to `selected` for the desired organizational unit or group +5. Under `Security Codes`, set `Do not allow users to generate security codes` to `selected` for the desired organizational unit or group +6. Select `Save` + +## Default Value + +- `Allow users to enroll in the Advanced Protection Platform` is `selected` +- `Security codes` is `Allow security codes without remote access` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.4.1/SKILL.md new file mode 100644 index 0000000000..00bb3ad1cf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.4.1/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-gworkspace-4.1.4.1 +description: "Ensure login challenges are enforced" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, login-challenges, authentication, sso] +cis_id: "4.1.4.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.4.1 Ensure login challenges are enforced + +## Profile Applicability + +- Enterprise Level 2 + +## Description + +Configure Google Workspace to verify a user's identity post-sso. + +## Rationale + +Many organizations use third-party identity providers (IdPs) to authenticate users who use single sign on (SSO) through SAML. The third-party IdP authenticates users and no additional risk-based challenges are presented to them. Any Google 2-Step Verification (2SV) configuration is ignored. This is the default behavior. You can set a policy to allow additional risk-based authentication challenges and 2SV if it's configured. If Google receives a valid SAML assertion (authentication information about the user) from the IdP during user sign-in, Google can present additional challenges to the user. + +Login challenges requires users have a recovery phone number or email account associated with their organizational account. If not previously configured, users will be prompted to enter this information periodically until provided. + +One login challenge option prompts users to enter their employee ID. This method is susceptible to information gathering attacks, should a list of employee IDs ever be leaked. + +## Impact + +The potential impact associated with implementation of this setting is dependent upon the existing 2-Step Verification (2SV) polices. + +- If you have existing 2SV policies, such as 2SV enforcement, those policies apply immediately. +- Users affected by the new policy and who are enrolled in 2SV get a 2SV challenge at sign-in. +- Based on Google sign-in risk analysis, users might see risk-based challenges at sign-in. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Login Challenges` +4. Under `Post-SSO verification`, ensure `Logins using SSO are subject to additional verifications (if appropriate) and 2-Step Verification (if configured)` is `checked` +5. Under `Login challenges`, ensure `Use employee ID to keep my users more secure` is `unchecked` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Login Challenges` +4. Under `Post-SSO verification`, set `Logins using SSO are subject to additional verifications (if appropriate) and 2-Step Verification (if configured)` is `checked` +5. Select `Save` +6. Under `Login challenges`, set `Use employee ID to keep my users more secure` to `unchecked` +7. Select `Save` + +## Default Value + +- `Post-SSO verification` is `Logins using SSO bypass additional verifications` +- `Use employee ID to keep my users more secure` is `unchecked` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.5.1/SKILL.md new file mode 100644 index 0000000000..8499ea3cdd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.1.5.1/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-gworkspace-4.1.5.1 +description: "Ensure password policy is configured for enhanced security" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, password-policy, authentication] +cis_id: "4.1.5.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1.5.1 Ensure password policy is configured for enhanced security + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configure Google Workspace Password Policy with a more secure length and is enforced upon next sign-in to protect against the use of common password attacks. + +## Rationale + +Strong password policies protect an organization by prohibiting the use of weak passwords. + +## Impact + +The potential impact associated with implementation of this setting is dependent upon the existing password policies in place in the environment. For environments that have strong password policies in place, the impact will be minimal. For organizations that do not have strong password policies in place, enhancing the password policy may require users to change passwords, and adhere to more stringent requirements than they have been accustomed to. + +Configuring passwords to expire at a 1 year mark ensures that users are not forced to change passwords so often that easily discerned patterns are used in the creation of the passwords. The day-to-day impact on users will be that they have to manage fewer passwords changing on a frequent basis. + +**NOTE:** Password should be changed immediately on any indication of system compromise, when a user role changes, and when a user leaves the organization. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Password management` +4. Under `Strength`, ensure `Enforce strong passwords` is `checked` +5. Under `Length`, ensure `Minimum Length` is set to `14+` +6. Under `Strength and Length enforcement`, ensure `Enforce password policy at next sign-in` is set to `checked` +7. Under `Reuse`, ensure `Allow password reuse` is `unchecked` +8. Under `Expiration`, ensure `Password reset frequency` is set to `365 Days` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Password management` +4. Under `Strength`, set `Enforce strong passwords` to `checked` +5. Under `Length`, set `Minimum Length` to `14` or greater +6. Under `Strength and Length enforcement`, set `Enforce password policy at next sign-in` is `checked` +7. Under `Reuse`, set `Allow password reuse` to `unchecked` +8. Under `Expiration`, set `Password reset frequency` to `365 Days` +9. Select `Save` + +## Default Value + +- `Enforce strong password` is `checked` +- `Minimum length` is `8` +- `Maximum length` is `100` +- `Enforce password policy at next sign-in` is `not checked` +- `Allow password reuse` is `not checked` +- `Expiration` is `Never expires` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------ | ---- | ---- | ---- | +| v8 | 5.2 Use Unique Passwords | x | x | x | +| v7 | 4.4 Use Unique Passwords | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.1/SKILL.md new file mode 100644 index 0000000000..12e06bef5e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.1/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-gworkspace-4.2.1.1 +description: "Ensure application access to Google services is restricted" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, api-controls, oauth, access-control] +cis_id: "4.2.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2.1.1 Ensure application access to Google services is restricted + +## Profile Applicability + +- Enterprise Level 2 + +## Description + +Prevent unrestricted application access to Google services. + +## Rationale + +You can restrict (or leave unrestricted) access to most Workspace services, including Google Cloud Platform services such as Machine Learning. For Gmail and Google Drive, you can specifically restrict access to high-risk scopes (for example, sending Gmail or deleting files in Drive). While users are prompted to consent to apps, if an app uses restricted scopes and you haven't specifically trusted it, users can't add it. + +## Impact + +The potential impact associated with implementation of this setting is that any previously installed apps that you haven't trusted stop working and tokens are revoked. When a user tries to install an app that has a restricted scope, they're notified that it's blocked. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `API Controls`, then select `App access control` +5. Under `Overview`, select `MANAGE GOOGLE SERVICES` +6. Ensure `ALL` applicable Google Services have `Restricted` in the `Access` column + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `API Controls`, then select `App access control` +5. Under `Overview`, select `MANAGE GOOGLE SERVICES` +6. Select `ALL` applicable Google Services +7. Click `Change access` +8. Select `Restricted: Only trusted apps can access a service` + +## Default Value + +`Access` is `Unrestricted` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.2/SKILL.md new file mode 100644 index 0000000000..b472bd5127 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.2/SKILL.md @@ -0,0 +1,67 @@ +--- +name: cis-gworkspace-4.2.1.2 +description: "Review third-party applications periodically" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, api-controls, oauth, third-party-apps] +cis_id: "4.2.1.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2.1.2 Review third-party applications periodically + +## Profile Applicability + +- Enterprise Level 2 + +## Description + +Weekly review connected applications for potential malicious or unintended access or connections. + +## Rationale + +Performing a periodic review of connected applications and their permission scopes ensures only permitted and required applications can access organizational data or resources. Attackers commonly attempt to persuade or trick users to grant their application access to organizational data resources by asking for their consent. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `API Controls`, then select `App access control` +5. Under `Overview`, select `MANAGE THIRD-PARTY APP ACCESS` +6. Ensure all listed applications have been properly vetted and authorized by the appropriate personnel + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `API Controls`, then select `App access control` +5. Under `Overview`, select `MANAGE THIRD-PARTY APP ACCESS` +6. Select `Change Access` for the application you wish to remove +7. Select `Blocked: Can't access any Google service` +8. Log in to the Google Cloud Platform - Resource Manager `https://console.cloud.google.com/cloud-resource-manager` as an administrator +9. Now `Delete` the desired application + +## Default Value + +None + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.1 Establish and Maintain a Software Inventory | x | x | x | +| v8 | 2.3 Address Unauthorized Software | x | x | x | +| v7 | 2.1 Maintain Inventory of Authorized Software | x | x | x | +| v7 | 2.6 Address unapproved software | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.3/SKILL.md new file mode 100644 index 0000000000..e7f044da57 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.3/SKILL.md @@ -0,0 +1,61 @@ +--- +name: cis-gworkspace-4.2.1.3 +description: "Ensure internal apps can access Google Workspace APIs" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, api-controls, oauth, internal-apps] +cis_id: "4.2.1.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2.1.3 Ensure internal apps can access Google Workspace APIs + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Enable access to Google Workspace APIs for customer-owned / developed applications. + +## Rationale + +All organization-built internal apps (owned by your organization), can be trusted to access restricted Google Workspace APIs. That way, the organization does not have to trust them all individually. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `API Controls`, then select `App access control` +5. Under `Settings`, verify `Trust internal, domain-owned apps` is `selected` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `API Controls`, then select `App access control` +5. Under `Settings`, select `Trust internal, domain-owned apps` +6. Select `Save` + +## Default Value + +`Trust internal, domain-owned apps` is `selected` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.4/SKILL.md new file mode 100644 index 0000000000..c0d208083d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.1.4/SKILL.md @@ -0,0 +1,63 @@ +--- +name: cis-gworkspace-4.2.1.4 +description: "Review domain-wide delegation for applications periodically" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, api-controls, oauth, domain-wide-delegation] +cis_id: "4.2.1.4" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2.1.4 Review domain-wide delegation for applications periodically + +## Profile Applicability + +- Enterprise Level 2 + +## Description + +Weekly review domain-wide delegations for applications for potentially malicious or unintended access or connections. + +## Rationale + +Domain-wide delegation is a powerful feature that allows apps to access users' data across your organization's entire Workspace account. Performing a periodic review of domain-wide delegations for applications and their permission scopes ensures only permitted and required applications can access organizational data or resources. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `API Controls` +5. Under `Domain wide delegation`, select `MANAGE DOMAIN WIDE DELEGATION` +6. Ensure all listed applications have been properly vetted and authorized by the appropriate personnel + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `API Controls` +5. Under `Domain wide delegation`, select `MANAGE DOMAIN WIDE DELEGATION` +6. Select `Change Access` for the application you wish to remove +7. Now `Delete` the desired application + +## Default Value + +None + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.2.1/SKILL.md new file mode 100644 index 0000000000..3ffd6cdd16 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.2.1/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-gworkspace-4.2.2.1 +description: "Ensure blocking access from unapproved geographic locations" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, context-aware-access, geo-restriction, access-control] +cis_id: "4.2.2.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2.2.1 Ensure blocking access from unapproved geographic locations + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Restrict access to selected Google applications by geographic location. + +## Rationale + +Restricting access to known/approved geographic locations is a simple way to limit where attacks can originate from. Especially for smaller organizations that do not need global access to applications. + +## Impact + +Valid/approved users traveling to a geographic region outside of those defined in the Access Level will not be able to access their applications. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +### Verify an appropriate Access Level has been defined + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Context-Aware Access` +5. Select `Access levels` +6. Review the list of Access Levels displayed and determine if there is an appropriate restriction on geographic access + +### Verify the appropriate Access Level has been assigned to the application(s) that need the restriction + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Context-Aware Access` +5. Select `Assign access levels` +6. Review the list of Google Applications displayed and make sure the appropriate access level for geographic access is assigned to each + +**NOTE:** CIS recommends geographically restricting access to the following Google applications at minimum: + +1. Admin Console +2. Drives and Docs +3. Gmail +4. Google Vault + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +### Create an appropriate Access Level + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Context-Aware Access` +5. Select `Access levels` +6. Select `Create Access Level` +7. Under Details - Name the Access Level (Suggested using a clear name - ex. "Restrict to USA") +8. Under Conditions - Select `Basic` +9. Under Condition 1 - Select `Meet attributes` +10. Under Condition 1 - Select `Add Attribute` +11. Click on the `Add Attribute` drop-down box and select `Geographic origin` +12. Click on the far right drop-down box and select the region, or regions, to be allowed (ex. United States) +13. Click `Save` + +### Assign the defined Access Level to the application(s) that need the restriction + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Context-Aware Access` +5. Select `Assign access levels` +6. For each application listed that needs this restriction, select `Assign` +7. Under, `Access is granted when a user meets conditions in at least one of the selected access levels`, ensure the previously named Access Level (ex. "Restrict to USA") is `checked` +8. Also, ensure `Apply to Google desktop and mobile apps` is `checked` + +**NOTE:** CIS recommends geographically restricting access to the following Google applications at minimum: + +1. Admin Console +2. Drives and Docs +3. Gmail +4. Google Vault + +## Default Value + +None + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v7 | 16.13 Alert on Account Login Behavior Deviation | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.3.1/SKILL.md new file mode 100644 index 0000000000..e288330cd8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.3.1/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-gworkspace-4.2.3.1 +description: "Ensure DLP policies for Google Drive are configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, dlp, data-protection, google-drive] +cis_id: "4.2.3.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2.3.1 Ensure DLP policies for Google Drive are configured + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Enabling Data Loss Prevention (DLP) policies for Google Drive allows organizations to control the content that users can share in Google Drive files outside the organization. + +## Rationale + +Enabling DLP policies alerts users and administrators that specific types of data should not be exposed, helping to protect the data from accidental exposure. DLP gives you control over what users can share, and prevents unintended exposure of sensitive information such as credit card numbers or identity numbers. + +## Impact + +Configuring a DLP policy for Google Drive will detect or block sensitive information. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Data protection` +5. Select `Manage Rules` +6. Ensure data protection rules `exist` and are `enabled` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Data protection` +5. Select `Manage Rules` +6. Select `ADD RULE`, then select either `New rule` or `New rule from template` + +### New rule + +Examples can be found in Google documentation. + +1. Set the rule `Name` +2. Optionally - Set the rule `Description` +3. Set the `Scope` as appropriate +4. Select `Continue` +5. Set `Triggers` by checking `File modified` under `Google Drive` +6. Select `ADD CONDITION` and configure values (`Field`, `Comparison Operator`, `Content to match`) - Repeat as appropriate +7. Select `Continue` +8. Under `Actions`, select the desired action to take for each incident +9. Under `Alerting`, select the desired severity level +10. Under `Alerting`, Select `Send to alert center` +11. Select `Continue` +12. Select `Create` + +### New rule from template + +1. Select the desired rule template +2. Optionally set the `Name` as desired +3. Optionally set the `Description` as desired +4. Set the `Scope` as appropriate +5. Select `Continue` +6. Modify preconfigured `Conditions` as desired, or add additional conditions +7. Select `Continue` +8. Under `Alerting`, Select `Send to alert center` +9. Select `Continue` +10. Select `Create` + +## Default Value + +No DLP policies for Google Drive are configured by default + +## References + +1. https://apps.google.com/supportwidget/articlehome?article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F10846568%3Fvisit_id%3D638058685723082013-4065283876&product_context=10846568&product_name=UnuFlow&trigger_context=a +2. https://workspaceupdates.googleblog.com/2020/10/data-protection-dlp-reports.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.13 Deploy a Data Loss Prevention Solution | | | x | +| v7 | 14.7 Enforce Access Control to Data through Automated Tools | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.4.1/SKILL.md new file mode 100644 index 0000000000..191506bc61 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.4.1/SKILL.md @@ -0,0 +1,73 @@ +--- +name: cis-gworkspace-4.2.4.1 +description: "Ensure Google session control is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, session-control, access-control] +cis_id: "4.2.4.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2.4.1 Ensure Google session control is configured + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configure Google Workspace's session control to strengthen session expiration. + +## Rationale + +As an administrator, you can control how long users can access Google services, such as Gmail on the web, without having to sign in again. For example, for users that work remotely or from untrusted locations, you might want to limit the time that they can access sensitive resources by applying a shorter web session length. If users want to continue accessing a resource when a session ends, they're prompted to sign in again and start a new session. + +How the settings work on mobile devices varies by device and app. + +## Impact + +The potential impact associated with implementation of this setting are: + +- When a web session expires for a user, they see the Verify it's you page and must sign in again. +- When you change the session length, users need to sign out and in again for settings to take effect. +- If you set the session to never expire, users never have to sign in again. +- If you need some users to sign in more frequently than others, place them in different organizational units. Then, apply different session lengths to them. That way, certain users won't be interrupted to sign in when it isn't necessary. +- If a Google Meet meeting starts within 2 hours of a session's scheduled expiration, the user is forced to sign in again before the start of the meeting. This helps avoid an interruption to the meeting while in-progress. +- If you're using a third-party identity provider (IdP), such as Okta or Ping, and you set web session lengths for your users, you need to set the IdP session length parameter to expire before the Google session expires. That way, your users will be forced to sign in again. If the third-party IdP session is still valid when the Google session expires, the Google session might be renewed automatically without the user signing in again. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Google session control` +5. Verify `Web session duration`, is `12 hours` or less + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Google session control` +5. Set `Web session duration` to `12 hours` or less +6. Select `Save` + +## Default Value + +`Web session duration` is `14 days` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.3 Configure Automatic Session Locking on Enterprise Assets | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.5.1/SKILL.md new file mode 100644 index 0000000000..ed07744ebe --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.5.1/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gworkspace-4.2.5.1 +description: "Ensure Google Cloud session control is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, session-control, google-cloud, access-control] +cis_id: "4.2.5.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2.5.1 Ensure Google Cloud session control is configured + +## Profile Applicability + +- Enterprise Level 2 + +## Description + +Configure Google cloud session control to strengthen session expiration. + +## Rationale + +As an administrator, you can control how long different users can access the Google Cloud console and Cloud SDK without having to re-authenticate. For example, you might want users with elevated privileges, like project owners, billing administrators, or others with administrator roles, to re-authenticate more frequently than regular users. If you set a session length, they're prompted to sign in again to start a new session. + +## Impact + +The potential impact associated with implementation of this setting are: + +- When a Google cloud session expires for a user, they see the Verify it's you page and must sign in again. +- If you require a security key, users who do not have one cannot use the GCP Console or Cloud SDK until they set it up. Once they have a security key, they can switch to using their password instead if they want. + +### If you're using a third-party identity provider (IdP): + +- With the GCP Console -- If you require a user to re-authenticate using their password, they're redirected to the identity provider (IdP). The IdP might not require the user to re-enter their password to start another console session, if the user already has a session active with the IdP -- because they are using another application that caused the session to remain active. If a user must re-authenticate by touching their security key, they can do this while using the console. They will not be redirected to the IdP. +- With the Cloud SDK -- If a password is required for re-authentication, gcloud will require the user to execute the gcloud auth login command to renew the session. This will bring up a browser window, and the user will be taken to the IdP, where they may be prompted for credentials if there's no active session with the IdP. If a user must reauthenticate by touching their security key, they can do this on the Cloud SDK. They will not be redirected to the IdP. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Google Cloud session control` +5. Under `Reauthentication policy`, ensure `Require reauthentication` is `selected` and `Exempt Trusted apps` is `unchecked` +6. Verify `Reauthentication frequency`, is `16 hours (recommended)` +7. Verify `Reauthentication method` is `Security key` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Google Cloud session control` +5. Under `Reauthentication policy`, set `Require reauthentication` to selected and `Exempt Trusted apps` is `unchecked` +6. Set `Reauthentication frequency` to `16 hours (recommended)` +7. Set `Reauthentication method` to `Security key` +8. Select `Override` + +## Default Value + +`Reauthentication policy` is `Never require reauthentication` + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.3 Configure Automatic Session Locking on Enterprise Assets | x | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.6.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.6.1/SKILL.md new file mode 100644 index 0000000000..ca3c720d33 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.2.6.1/SKILL.md @@ -0,0 +1,58 @@ +--- +name: cis-gworkspace-4.2.6.1 +description: "Ensure less secure app access is disabled" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, less-secure-apps, oauth, access-control] +cis_id: "4.2.6.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2.6.1 Ensure less secure app access is disabled + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configure Google Workspace security settings to prevent access to less secure apps. + +## Rationale + +You can block sign-in attempts from some apps or devices that are less secure. Apps that are less secure don't use modern security standards, such as OAuth. Using apps and devices that don't use modern security standards increases the risk of accounts being compromised. Blocking these apps and devices helps keep your users and data safe. + +## Impact + +The potential impact associated with implementation of this setting is that users won't be able to turn on access to less secure apps. When you disable access to less secure apps while a less secure app has an open connection with a user account, the app will time out when it tries to refresh the connection. Timeout periods vary per app. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Less secure apps` +5. Ensure `Disable access to less secure apps (Recommended)` is `selected` + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Access and Data Control` +4. Select `Less secure apps` +5. Select `Disable access to less secure apps (Recommended)` +6. Click `Save` to commit this configuration change. + +## Default Value + +`Disable access to less secure apps (Recommended)` is `selected` diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.3.1/SKILL.md new file mode 100644 index 0000000000..14810a0298 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.3.1/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-gworkspace-4.3.1 +description: "Ensure the Dashboard is reviewed regularly for anomalies" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, security-center, monitoring, dashboard] +cis_id: "4.3.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.3.1 Ensure the Dashboard is reviewed regularly for anomalies + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +As an administrator, you can use the security dashboard to see an overview of different security reports. By default, each security report panel displays data from the last 7 days. You can customize the dashboard to view data from Today, Yesterday, This week, Last week, This month, Last month, or Days ago (up to 180 days). + +Charts/reports available (Minimum, but could be many more depending on account type): + +- DLP incidents +- Top policy incidents +- Failed device password attempts +- Compromised device events +- Suspicious device activities +- OAuth scope grants by product (beta customers only) +- OAuth grant activity +- OAuth grants to new apps +- User login attempts -- Challenge method +- User login attempts -- Failed +- User login attempts -- Suspicious + +Details on what each of these charts/reports mean can be found in Google documentation. This report should be reviewed weekly. + +**NOTE:** The availability of each individual report on the security dashboard depends on your Google Workspace edition. See Google documentation for more details. + +**NOTE:** In larger organizations reviewing this entire report weekly may not be possible. At a minimum, all Administrator and Super Administrator users should be reviewed, since they are a higher risk. These can be filtered from the overall user list. + +## Rationale + +The Security report provides a comprehensive view of how people share and access data and whether they take appropriate security precautions. For example, you can review who installs external apps, shares numerous files, skips 2-Step Verification, and uses security keys. + +## Impact + +No user impact. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select `Reporting` +3. Select `Reports` +4. Select `User Reports` +5. Select `Security`, and a table of results will be displayed with the fields listed in the Recommendation description above. +6. Review the displayed users and values for anomalies + +## Remediation + +The remediation for any anomalies in the various fields varies widely (different sections of the Google Workspace Admin UI). Please refer to Google's documentation for specifics. + +**NOTE:** Many of these settings will be remedied by implementing other sections of this Benchmark. For example, an Admin not enrolled in 2-Step Verification can be remedied by implementing the Remediation procedure for the recommendation **Ensure 2-Step Verification (Multi-Factor Authentication) is enforced for all users in administrative roles**. + +## Default Value + +The report will display all users and fields. + +## References + +1. https://apps.google.com/supportwidget/articlehome?article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F7492330&assistant_id=generic-unu&product_context=7492330&product_name=UnuFlow&trigger_context=a + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------ | ---- | ---- | ---- | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.7 Regularly Review Logs | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.3.2/SKILL.md new file mode 100644 index 0000000000..2e8788c36b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-4.3.2/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-gworkspace-4.3.2 +description: "Ensure the Security health is reviewed regularly for anomalies" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, security, security-center, monitoring, security-health] +cis_id: "4.3.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.3.2 Ensure the Security health is reviewed regularly for anomalies + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +As an administrator, the security health page enables you to monitor the configuration of your Admin console settings from one location. For example, you can check the status of settings like automatic email forwarding, device encryption, Drive sharing settings, and much more. + +Settings reported (Minimum, but could be many more depending on account type): + +- Blocking of compromised mobile devices +- Mobile management +- Mobile password requirements +- Device encryption +- Mobile inactivity reports +- Auto account wipe +- Application verification +- Installation of mobile applications from unknown sources +- External media storage +- Two-step verification for users +- Two-step verification for admins +- Security key enforcement for admins + +Details on what each of these report entries mean can be found in Google documentation. This report should be reviewed weekly. + +**NOTE:** The availability of each individual report on the security dashboard depends on your Google Workspace edition. See Google documentation for more details. + +## Rationale + +The security health page provides visibility into your Admin console settings to help you better understand and manage security risks. If needed, you can make adjustments to your domain's settings based on general security guidelines and best practices, while balancing these guidelines with your organization's business needs and risk management policy. + +## Impact + +No user impact. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Security Center` +4. Select `Security Health` +5. Review the security health page for any anomalies or settings that are not configured according to your organization's security policies + +## Remediation + +To configure this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator +2. Select `Security` +3. Select `Security Center` +4. Select `Security Health` +5. Review each setting and follow the recommended actions for any items flagged as requiring attention +6. Refer to Google's documentation for specific remediation steps for each setting + +## Default Value + +The security health page displays all monitored settings and their current status. diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-5.1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-5.1.1.1/SKILL.md new file mode 100644 index 0000000000..994232b215 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-5.1.1.1/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-gworkspace-5.1.1.1 +description: "Ensure the App Usage Report is reviewed regularly for anomalies" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, reporting, app-usage, anomalies, monitoring] +cis_id: "5.1.1.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.1.1 Ensure the App Usage Report is reviewed regularly for anomalies + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +As an administrator, you can use Apps usage reports to get an in-depth understanding of how your users use Google Workspace apps. + +Fields Available: + +- User +- Gmail storage used (MB) +- Drive storage used (MB) +- Photos storage used (MB) +- Total storage used (MB) +- Storage used (%) +- Classroom - last used time +- Classes created +- Posts created +- Total emails +- Emails sent +- Emails received +- Gmail (IMAP) - last used time +- Gmail (POP) - last used time +- Gmail (Web) - last used time +- Files edited +- Files viewed +- Drive - last active time +- Files added +- Other types added +- Google Docs added +- Google Sheets added +- Google Slides added +- Google Forms added +- Google Drawings added +- Posts +- +1s +- +1s received +- Comments +- Comments received +- Reshares +- Reshares received +- Search queries +- Search queries from web +- Search queries from Android +- Search queries from iOS + +This report should be reviewed weekly. + +**NOTE:** In larger organizations reviewing this entire report weekly may not be possible. At a minimum, all Administrator and Super Administrator users should be reviewed, since they are a higher risk. These can be filtered from the overall user list. + +## Rationale + +The App usage report can allow administrator to discover user that are potentially using application that they do not have access to and/or using in atypical ways. + +## Impact + +No user impact. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Reporting**. +3. Select **Reports**. +4. Select **User Reports**. +5. Select **App usage**, and a table of results will be displayed with the fields listed in the Recommendation description above. +6. Review the displayed users and values for anomalies. + +## Remediation + +The remediation for any anomalies in the various fields varies widely (different sections of the Google Workspace Admin UI). Please refer to Google's documentation for specifics. + +**NOTE:** Many of these settings will be remedied by implementing other sections of this Benchmark. For example, an Admin showing recent Gmail (IMAP) - last used time and/or Gmail (POP) - last used time can be remedied by implementing the Remediation procedure for the recommendation _Ensure POP and IMAP access is disabled for all users_. + +## Default Value + +The report will display all users and fields. + +## References + +1. https://support.google.com/a/answer/4579578 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------ | ---- | ---- | ---- | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.7 Regularly Review Logs | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-5.1.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-5.1.1.2/SKILL.md new file mode 100644 index 0000000000..59d3d94289 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-5.1.1.2/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-gworkspace-5.1.1.2 +description: "Ensure the Security Report is reviewed regularly for anomalies" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, reporting, security-report, anomalies, monitoring] +cis_id: "5.1.1.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1.1.2 Ensure the Security Report is reviewed regularly for anomalies + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +As your organization's administrator, you can monitor your users' exposure to data compromise by reviewing the security report. + +Fields Available: + +- User +- External apps +- 2-Step verification enrollment +- 2-Step verification enforcement +- Password length compliance +- Password strength +- User account status +- Admin status +- Security keys enrolled +- Less secure apps access +- Gmail (IMAP) - last used time +- Gmail (POP) - last used time +- Gmail (Web) - last used time +- External shares +- Internal shares +- Public +- Anyone with link +- Outside domain +- Anyone in domain shares +- Anyone in domain with link shares +- Within domain shares +- Private shares + +This report should be reviewed weekly. + +**NOTE:** In larger organizations reviewing this entire report weekly may not be possible. At a minimum, all Administrator and Super Administrator users should be reviewed, since they are a higher risk. These can be filtered from the overall user list. + +## Rationale + +The Security report provides a comprehensive view of how people share and access data and whether they take appropriate security precautions. For example, you can review who installs external apps, shares numerous files, skips 2-Step Verification, and uses security keys. + +## Impact + +No user impact. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Reporting**. +3. Select **Reports**. +4. Select **User Reports**. +5. Select **Security**, and a table of results will be displayed with the fields listed in the Recommendation description above. +6. Review the displayed users and values for anomalies. + +## Remediation + +The remediation for any anomalies in the various fields varies widely (different sections of the Google Workspace Admin UI). Please refer to Google's documentation for specifics. + +**NOTE:** Many of these settings will be remedied by implementing other sections of this Benchmark. For example, an Admin not enrolled in 2-Step Verification can be remedied by implementing the Remediation procedure for the recommendation _Ensure 2-Step Verification (Multi-Factor Authentication) is enforced for all users in administrative roles_. + +## Default Value + +The report will display all users and fields. + +## References + +1. https://support.google.com/a/answer/6000269 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------ | ---- | ---- | ---- | +| v8 | 8.11 Conduct Audit Log Reviews | | x | x | +| v7 | 6.7 Regularly Review Logs | | x | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.1/SKILL.md new file mode 100644 index 0000000000..523a25e276 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.1/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gworkspace-6.1 +description: "Ensure User's password changed is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, rules, alerts, password-change] +cis_id: "6.1" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1 Ensure User's password changed is configured + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configuring and enabling the setting that an alert will be generated when a user's password has changed. + +## Rationale + +Ensuring that administrators are alerted when user passwords are changed provides organizations with the ability to detect and halt potential attacks involving credential compromise and account takeover. + +## Impact + +This setting should have no impact on the end user but will send emails to super administrators when triggered. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **User's password changed** and select it. +5. Ensure that **Alerts** is set to **On**. +6. Ensure the **Severity** is set to **Medium**. +7. Ensure that **Email Notifications** is set to **On**. +8. Ensure that **Email notification recipients** is set to **All super administrators**. + +## Remediation + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **User's password changed** and select it. +5. Within the **Actions** pane, click the edit pencil on the right side of the pane. +6. Select **Send to alert center** (This will result in the alert being set to On). +7. Set the alert severity to **Medium**. +8. To enable emails when this alert condition is met, select **Send email notifications**. Once enabled, the **All super administrators** option is selected by default. +9. Click **Review** to confirm the values. +10. Click **Update Rule**. +11. Confirm that the **User's password changed** shows an Alert status of **On** in the list. + +## Default Value + +User's password changed is **OFF**. + +## References + +1. https://support.google.com/a/answer/3230421 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v7 | 16.13 Alert on Account Login Behavior Deviation | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.2/SKILL.md new file mode 100644 index 0000000000..2d01c733fa --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.2/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-gworkspace-6.2 +description: "Ensure Government-backed attacks is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, rules, alerts, government-attacks] +cis_id: "6.2" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2 Ensure Government-backed attacks is configured + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configuring and enabling the setting that an alert will be generated when Google believes your users are being targeted by a government-backed attack. + +## Rationale + +Ensuring that administrators are alerted that they may be being targeted by a government-backed entity allows them time to check their defenses and potentially up their sensitivity for anomalies. + +**NOTE:** Google sends these out of an abundance of caution -- the notice does not necessarily mean that the account has been compromised or that there is a widespread attack. Rather, the notice reflects Google's assessment that a government-backed attacker has likely attempted to access the user's account or computer through phishing or malware, for example. + +## Impact + +This setting should have no impact on the end user but will send emails to super administrators when triggered. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **Government-backed attacks** and select it. +5. Ensure that **Alerts** is set to **On**. +6. Ensure the **Severity** is set to **High**. +7. Ensure that **Email Notifications** is set to **On**. +8. Ensure that **Email notification recipients** is set to **All super administrators**. + +## Remediation + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **Government-backed attacks** and select it. +5. Within the **Actions** pane, click the edit pencil on the right side of the pane. +6. Select **Send to alert center** (This will result in the alert being set to On). +7. Set the alert severity to **High**. +8. To enable emails when this alert condition is met, select **Send email notifications**. Once enabled, the **All super administrators** option is selected by default. +9. Click **Review** to confirm the values. +10. Click **Update Rule**. +11. Confirm that the **Government-backed attacks** shows an Alert status of **On** in the list. + +## Default Value + +Government-backed attacks is **ON**. + +## References + +1. https://support.google.com/a/answer/3230421 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v7 | 16.13 Alert on Account Login Behavior Deviation | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.3/SKILL.md new file mode 100644 index 0000000000..3d28f3506c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.3/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gworkspace-6.3 +description: "Ensure User suspended due to suspicious activity is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, rules, alerts, suspicious-activity] +cis_id: "6.3" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.3 Ensure User suspended due to suspicious activity is configured + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configuring and enabling the setting that an alert will be generated when Google suspended a user's account due to a potential compromise detected. + +## Rationale + +Ensuring that administrators are alerted when the account was suspended by Google. The reason for this should be investigated ASAP, since it could be a possible indication of malicious activity. In any case, the user's account was suspended and something will need to be done to allow the user to resume work. + +## Impact + +Emails will be sent to all super administrators when triggered. Also, the user's account will be suspended and something will need to be done about that based on company policy (investigated, re-enabled, etc.). + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **User suspended due to suspicious activity** and select it. +5. Ensure that **Alerts** is set to **On**. +6. Ensure the **Severity** is set to **High**. +7. Ensure that **Email Notifications** is set to **On**. +8. Ensure that **Email notification recipients** is set to **All super administrators**. + +## Remediation + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **User suspended due to suspicious activity** and select it. +5. Within the **Actions** pane, click the edit pencil on the right side of the pane. +6. Select **Send to alert center** (This will result in the alert being set to On). +7. Set the alert severity to **High**. +8. To enable emails when this alert condition is met, select **Send email notifications**. Once enabled, the **All super administrators** option is selected by default. +9. Click **Review** to confirm the values. +10. Click **Update Rule**. +11. Confirm that the **User suspended due to suspicious activity** shows an Alert status of **On** in the list. + +## Default Value + +User suspended due to suspicious activity is **ON**. + +## References + +1. https://support.google.com/a/answer/3230421 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v7 | 16.13 Alert on Account Login Behavior Deviation | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.4/SKILL.md new file mode 100644 index 0000000000..7e86e0216a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.4/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gworkspace-6.4 +description: "Ensure User granted Admin privilege is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, rules, alerts, admin-privilege] +cis_id: "6.4" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.4 Ensure User granted Admin privilege is configured + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configuring and enabling the setting that an alert will be generated when a user has been granted an admin privilege. + +## Rationale + +Ensuring that administrators are alerted when a user is given increased privileges could be an indication of compromise unless this access has been approved. + +## Impact + +This setting should have no impact on the end user but will send emails to super administrators when triggered. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **User granted Admin privilege** and select it. +5. Ensure that **Alerts** is set to **On**. +6. Ensure the **Severity** is set to **Medium**. +7. Ensure that **Email Notifications** is set to **On**. +8. Ensure that **Email notification recipients** is set to **All super administrators**. + +## Remediation + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **User granted Admin privilege** and select it. +5. Within the **Actions** pane, click the edit pencil on the right side of the pane. +6. Select **Send to alert center** (This will result in the alert being set to On). +7. Set the alert severity to **Medium**. +8. To enable emails when this alert condition is met, select **Send email notifications**. Once enabled, the **All super administrators** option is selected by default. +9. Click **Review** to confirm the values. +10. Click **Update Rule**. +11. Confirm that the **User granted Admin privilege** shows an Alert status of **On** in the list. + +## Default Value + +User granted Admin privilege is **OFF**. + +## References + +1. https://support.google.com/a/answer/3230421 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v7 | 16.13 Alert on Account Login Behavior Deviation | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.5/SKILL.md new file mode 100644 index 0000000000..b51200034c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.5/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gworkspace-6.5 +description: "Ensure Suspicious programmatic login is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, rules, alerts, programmatic-login] +cis_id: "6.5" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.5 Ensure Suspicious programmatic login is configured + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configuring and enabling the setting that an alert will be generated when Google detects suspicious login attempts from applications or computer programs. + +## Rationale + +Ensuring that administrators are alerted when suspicious login attempts occur. This could be an indication of an active attack on the company by an adversary using previously obtained credentials. + +## Impact + +This setting should have no impact on the end user but will send emails to super administrators when triggered. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **Suspicious programmatic login** and select it. +5. Ensure that **Alerts** is set to **On**. +6. Ensure the **Severity** is set to **Low**. +7. Ensure that **Email Notifications** is set to **On**. +8. Ensure that **Email notification recipients** is set to **All super administrators**. + +## Remediation + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **Suspicious programmatic login** and select it. +5. Within the **Actions** pane, click the edit pencil on the right side of the pane. +6. Select **Send to alert center** (This will result in the alert being set to On). +7. Set the alert severity to **Low**. +8. To enable emails when this alert condition is met, select **Send email notifications**. Once enabled, the **All super administrators** option is selected by default. +9. Click **Review** to confirm the values. +10. Click **Update Rule**. +11. Confirm that the **Suspicious programmatic login** shows an Alert status of **On** in the list. + +## Default Value + +Suspicious programmatic login is **ON**. + +## References + +1. https://support.google.com/a/answer/3230421 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v7 | 16.13 Alert on Account Login Behavior Deviation | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.6/SKILL.md new file mode 100644 index 0000000000..bb34eceeb9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.6/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gworkspace-6.6 +description: "Ensure Suspicious login is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, rules, alerts, suspicious-activity] +cis_id: "6.6" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.6 Ensure Suspicious login is configured + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configuring and enabling the setting that an alert will be generated when Google detects a sign-in attempt that doesn't match a user's normal behavior, such as a sign-in from an unusual location. + +## Rationale + +Ensuring that administrators are alerted when suspicious login attempts occur. This could be an indication of an active attack on the company by an adversary using previously obtained credentials. + +## Impact + +This setting should have no impact on the end user but will send emails to super administrators when triggered. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **Suspicious login** and select it. +5. Ensure that **Alerts** is set to **On**. +6. Ensure the **Severity** is set to **Low**. +7. Ensure that **Email Notifications** is set to **On**. +8. Ensure that **Email notification recipients** is set to **All super administrators**. + +## Remediation + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **Suspicious login** and select it. +5. Within the **Actions** pane, click the edit pencil on the right side of the pane. +6. Select **Send to alert center** (This will result in the alert being set to On). +7. Set the alert severity to **Low**. +8. To enable emails when this alert condition is met, select **Send email notifications**. Once enabled, the **All super administrators** option is selected by default. +9. Click **Review** to confirm the values. +10. Click **Update Rule**. +11. Confirm that the **Suspicious login** shows an Alert status of **On** in the list. + +## Default Value + +Suspicious login is **ON**. + +## References + +1. https://support.google.com/a/answer/3230421 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v7 | 16.13 Alert on Account Login Behavior Deviation | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.7/SKILL.md new file mode 100644 index 0000000000..f3e3a6ce56 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.7/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gworkspace-6.7 +description: "Ensure Leaked password is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, rules, alerts, leaked-password] +cis_id: "6.7" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.7 Ensure Leaked password is configured + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configuring and enabling the setting that an alert will be generated when Google detects compromised credentials requiring a reset of a user's password. + +## Rationale + +Ensuring that administrators are alerted when Google detects that a user's credentials have been compromised due to a publicized breach. This is usually because the user has reused their credentials at another site that was breached. + +## Impact + +Emails will be sent to super administrators when triggered and in these cases, the user's password will need to be changed. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **Leaked password** and select it. +5. Ensure that **Alerts** is set to **On**. +6. Ensure the **Severity** is set to **Medium**. +7. Ensure that **Email Notifications** is set to **On**. +8. Ensure that **Email notification recipients** is set to **All super administrators**. + +## Remediation + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **Leaked password** and select it. +5. Within the **Actions** pane, click the edit pencil on the right side of the pane. +6. Select **Send to alert center** (This will result in the alert being set to On). +7. Set the alert severity to **High**. +8. To enable emails when this alert condition is met, select **Send email notifications**. Once enabled, the **All super administrators** option is selected by default. +9. Click **Review** to confirm the values. +10. Click **Update Rule**. +11. Confirm that the **Leaked password** shows an Alert status of **On** in the list. + +## Default Value + +Leaked password is **ON**. + +## References + +1. https://support.google.com/a/answer/3230421 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v7 | 16.13 Alert on Account Login Behavior Deviation | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.8/SKILL.md new file mode 100644 index 0000000000..e367e54271 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Google_Workspace/CIS_Google_Workspace_Foundations_Benchmark_v1.3.0/cis-gworkspace-6.8/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-gworkspace-6.8 +description: "Ensure Gmail potential employee spoofing is configured" +category: cis-gworkspace +version: "1.3.0" +author: cyberstrike-official +tags: [cis, gcp, google-workspace, rules, alerts, spoofing] +cis_id: "6.8" +cis_benchmark: "CIS Google Workspace Foundations Benchmark v1.3.0" +tech_stack: [gcp, google-workspace] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.8 Ensure Gmail potential employee spoofing is configured + +## Profile Applicability + +- Enterprise Level 1 + +## Description + +Configuring and enabling the setting that an alert will be generated when Google detects incoming messages are received where a sender's name is in your Google Workspace directory, but the mail is not from your company's domains or domain aliases. + +## Rationale + +Ensuring that administrators are alerted when the email is being spoofed since this could be an indication of a phishing attempt. + +## Impact + +This setting should have no impact on the end user but will send emails to super administrators when triggered. + +## Audit + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **Gmail potential employee spoofing** and select it. +5. Ensure that **Alerts** is set to **On**. +6. Ensure the **Severity** is set to **Medium**. +7. Ensure that **Email Notifications** is set to **On**. +8. Ensure that **Email notification recipients** is set to **All super administrators**. + +## Remediation + +To verify this setting via the Google Workspace Admin Console: + +1. Log in to `https://admin.google.com` as an administrator. +2. Select **Rules**. +3. Under **Google protects you by default** select **View list**. +4. Scroll to **Gmail potential employee spoofing** and select it. +5. Within the **Actions** pane, click the edit pencil on the right side of the pane. +6. Select **Send to alert center** (This will result in the alert being set to On). +7. Set the alert severity to **Medium**. +8. To enable emails when this alert condition is met, select **Send email notifications**. Once enabled, the **All super administrators** option is selected by default. +9. Click **Review** to confirm the values. +10. Click **Update Rule**. +11. Confirm that the **Gmail potential employee spoofing** shows an Alert status of **On** in the list. + +## Default Value + +Gmail potential employee spoofing is **ON**. + +## References + +1. https://support.google.com/a/answer/3230421 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v7 | 16.13 Alert on Account Login Behavior Deviation | | | x | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.1/SKILL.md new file mode 100644 index 0000000000..f44e86df37 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.1/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-azure-compute-15.1 +description: "Ensure Batch account is set to use customer-managed keys to encrypt data" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, batch] +cis_id: "15.1" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Batch account is set to use customer-managed keys to encrypt data + +## Description + +Customer-managed keys introduce additional depth to security by providing a means to manage access control for encryption keys. Where compliance and security frameworks indicate the need, and organizational capacity allows, sensitive data at rest can be encrypted using customer-managed keys (CMK) rather than Microsoft-managed keys. + +While it is possible to automate the assessment of this recommendation, the assessment status for this recommendation remains 'Manual' due to ideally limited scope. The scope of application -- which workloads CMK is applied to -- should be carefully considered to account for organizational capacity and targeted to workloads with specific need for CMK. + +## Rationale + +By default in Azure, data at rest tends to be encrypted using Microsoft-managed keys. If your organization wants to control and manage encryption keys for compliance and defense-in-depth, customer-managed keys can be established. + +## Impact + +If the key expires due to setting the 'activation date' and 'expiration date', the key must be rotated manually. + +Using customer-managed keys may also incur additional man-hour requirements to create, store, manage, and protect the keys as needed. + +## Audit Procedure + +### Using Azure Portal + +1. Login to Azure Portal using https://portal.azure.com +2. Navigate to `Batch accounts` + +For each Batch account perform the following: + +1. Under the `Settings` section, click on `Encryption` +2. Ensure that the `Customer-managed key` radio button is selected +3. Ensure that a key vault key is set and valid + +If no key vault key is set, the configuration fails this audit procedure. + +### Using Azure CLI + +The following command should return the Key URL and source Key Vault: + +```bash +az batch account show --name --resource-group --query "keyVaultReference" +``` + +If the result is `null` or `Empty`, the configuration fails this audit procedure. + +### Using Azure PowerShell + +```powershell +Set-AzBatchAccount -ResourceGroupName -AccountName ` + -KeyVaultReferenceId "/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults/" ` + -KeyVaultReferenceUrl "https://.vault.azure.net/keys/" +``` + +## Expected Result + +The Batch account should have `Customer-managed key` encryption selected with a valid key vault key configured. The `keyVaultReference` should not be `null` or empty. + +## Remediation + +### Using Azure Portal + +1. Login to Azure Portal using https://portal.azure.com +2. Navigate to `Batch accounts` + +For each Batch account: + +1. Under the `Settings` section, click on `Encryption` +2. Select the `Customer-managed key` radio button +3. Use either `Enter key URI` or `Select from key vault` to select and set the encryption key. + +### Using Azure CLI + +```bash +# Link CMK to Batch account +az batch account set \ + --resource-group \ + --name \ + --encryption-key-identifier https://.vault.azure.net/keys// +``` + +### Using Azure PowerShell + +```powershell +Set-AzBatchAccount -ResourceGroupName -AccountName ` + -KeyVaultReferenceId "/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults/" ` + -KeyVaultReferenceUrl "https://.vault.azure.net/keys/" +``` + +## Default Value + +Azure Batch accounts uses Microsoft-managed keys (service-managed encryption) for data at rest by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/batch/batch-customer-managed-key + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.2/SKILL.md new file mode 100644 index 0000000000..b0e5518101 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.2/SKILL.md @@ -0,0 +1,163 @@ +--- +name: cis-azure-compute-15.2 +description: "Ensure Batch pools disk encryption is set enabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, batch] +cis_id: "15.2" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Batch pools disk encryption is set enabled + +## Description + +Azure Batch pools must have disk encryption enabled to protect data at rest on both OS and temporary disks, using Azure-managed encryption keys by default. + +## Rationale + +Enabling disk encryption meets compliance requirements, follows security best practices, and safeguards against unauthorized access to cached data and task outputs stored on VM disks. + +## Impact + +This ensures automatic encryption with minimal performance impact, though it requires pool recreation and is unsupported on Basic A-series VMs. + +## Audit Procedure + +### Using Azure Portal + +1. Login to Azure portal https://portal.azure.com +2. Navigate to `Batch Accounts` + +For each Batch account perform the following: + +1. Expand the `Features` section then click on `Pools` +2. For each Pool ID, click the name to open the pool +3. Under the `Configuration` section, check `Disk Encryption` + +If the pool is encrypted, it should display "OS disk" and/or "Temporary disk" `encryption enabled`. + +### Using Azure CLI + +Run the following commands: + +```bash +# List all pools and their encryption status +az batch pool list \ + --account-name \ + --query "[].{id:id, encryption:deploymentConfiguration.virtualMachineConfiguration.diskEncryptionConfiguration}" \ + --output table +``` + +Expected Output: "OsDisk" and/or "TemporaryDisk" should be listed under `encryption.targets`. + +### Using Azure PowerShell + +Run the following command: + +```powershell +# Get Batch account context +$batchContext = Get-AzBatchAccount -AccountName "" + +# List all pools and check encryption +Get-AzBatchPool -BatchContext $batchContext | ForEach-Object { + $pool = $_ + $encryptionConfig = $pool.DeploymentConfiguration.VirtualMachineConfiguration.DiskEncryptionConfiguration + [PSCustomObject]@{ + PoolId = $pool.Id + OsDiskEncrypted = $encryptionConfig.Targets -contains "OsDisk" + TempDiskEncrypted = $encryptionConfig.Targets -contains "TemporaryDisk" + } +} +``` + +Expected Output: OsDiskEncrypted and TempDiskEncrypted should be `True`. + +## Expected Result + +All Batch pools should have disk encryption enabled with "OsDisk" and/or "TemporaryDisk" listed as encryption targets. + +## Remediation + +**NOTE:** Encrypted pools must be created as replacements for unencrypted pools. Please ensure that necessary precautions are taken to backup and restore data from persistent disk pools. + +### Using Azure Portal + +1. Navigate to `Azure Batch accounts` +2. Select your Batch account +3. Click `Pools` in the left menu +4. For each unencrypted pool, click `Create new pool` +5. Under `Advanced settings`, enable `Disk encryption and select OS disk or All disks` +6. Configure all other settings to match your existing pool +7. Click `Create` to deploy the encrypted pool +8. Resize the old unencrypted pool to 0 nodes after verifying the new pool is operational + +Repeat steps 4-8 for each unencrypted pool. + +### Using Azure CLI + +1. Get pool configuration: + +```bash +config=$(az batch pool show --pool-id --query "{vmSize:vmSize,image:virtualMachineConfiguration.imageReference,nodeCount:targetDedicatedNodes}") +``` + +2. Create encrypted replacement: + +```bash +az batch pool create \ + --id "-encrypted" \ + --vm-size $(jq -r '.vmSize' <<< "$config") \ + --image-reference "$(jq -r '.image.publisher + ":" + .image.offer + ":" + .image.sku + ":" + .image.version' <<< "$config")" \ + --node-count $(jq -r '.nodeCount' <<< "$config") \ + --disk-encryption-target OsDisk +``` + +3. Decommission old pool: + +```bash +az batch pool resize --pool-id --target-dedicated-nodes 0 +``` + +### Using Azure PowerShell + +1. Get pool configuration: + +```powershell +$pool = Get-AzBatchPool -Id "" -BatchContext $context +``` + +2. Create encrypted replacement: + +```powershell +$newConfig = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolConfiguration +$newConfig.VirtualMachineConfiguration = $pool.VirtualMachineConfiguration.Clone() +$newConfig.VirtualMachineConfiguration.DiskEncryptionConfiguration = New-Object Microsoft.Azure.Commands.Batch.Models.PSDiskEncryptionConfiguration +$newConfig.VirtualMachineConfiguration.DiskEncryptionConfiguration.Targets = "OsDisk" +New-AzBatchPool -Id "-encrypted" -PoolConfiguration $newConfig -BatchContext $context +``` + +3. Decommission old pool: + +```powershell +Set-AzBatchPool -Id "" -TargetDedicatedComputeNodes 0 -BatchContext $context +``` + +## Default Value + +Disk encryption is **disabled** by default for new Azure Batch pools. + +## References + +1. https://docs.microsoft.com/en-us/azure/batch/disk-encryption +2. https://docs.microsoft.com/en-us/cli/azure/batch/pool#az-batch-pool-create + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.3/SKILL.md new file mode 100644 index 0000000000..ce14a5ad10 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.3/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-azure-compute-15.3 +description: "Ensure local authentication methods for accounts are disabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, batch] +cis_id: "15.3" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure local authentication methods for accounts are disabled + +## Description + +This recommendation disables local authentication and ensures that a centralized identity provider is used. + +## Rationale + +Identity and Authentication silos with stale or persistent keys and tokens can increase vulnerability and risk by preventing detection mechanisms from capturing anomalous activity and may not produce an auditable trail of evidence that can be used for pattern detection and forensic investigation. Centralized Identity providers such as Microsoft Entra ID are strongly preferred for all identity, authentication, authorization, and accountability (IAAA) systems and activities. + +## Impact + +This control does not have an explicitly stated impact section. Disabling local authentication may affect existing automation or scripts that rely on Shared Key or Task Authentication Token methods. + +## Audit Procedure + +### Using Azure Portal + +1. Login to Azure portal `https://portal.azure.com` +2. Navigate to `Batch Accounts` + +For each Batch Account shown: + +1. Click the Batch Account name +2. Under the Settings section, click on `Authentication modes` +3. In the main window, click the Authentication Mode drop-down list, and review which options are checked. + +Expected Output: Only `Microsoft Entra ID` should be **checked**. + +### Using Azure CLI + +Check Local Authentication Status for Batch Accounts: + +```bash +az batch account list \ +--query "[].{name:name, resourceGroup:resourceGroup, authModes:allowedAuthenticationModes}" +``` + +Expected Output: + +- **SHOULD** contain "AAD" (Microsoft Entra ID) +- Should **NOT** contain "SharedKey" or other entries + +### Using Azure PowerShell + +List Authentication Methods for All Batch Accounts using script: + +```powershell +Get-AzBatchAccount | ForEach-Object +{ + $authModes = (Get-AzBatchAccount -Name $_.AccountName -ResourceGroupName $_.ResourceGroupName).AllowedAuthenticationModes + [PSCustomObject]@{ + AccountName = $_.AccountName + ResourceGroup = $_.ResourceGroupName + AuthenticationModes = $authModes -join ", " + } +} +``` + +## Expected Result + +Only `Microsoft Entra ID` (AAD) should be listed as an allowed authentication mode. `SharedKey` and `Task Authentication Token` should not be enabled. + +## Remediation + +### Using Azure Portal + +1. Login to Azure portal `https://portal.azure.com` +2. Navigate to `Batch Accounts` + +For each Batch Account shown: + +1. Click the Batch Account name +2. Under the Settings section, click on `Authentication modes` +3. In the main window, click the Authentication Mode drop-down list +4. Check the box for `Microsoft Entra ID` (or other centralized IdP) +5. (If checked) Uncheck the box for `Shared Key` +6. (If checked) Uncheck the box for `Task Authentication Token` +7. Click `Save` + +## Default Value + +Local authentication methods are **enabled** by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/batch/security-best-practices#batch-account-authentication + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.4/SKILL.md new file mode 100644 index 0000000000..99f0476fa0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.4/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-azure-compute-15.4 +description: "Ensure Private endpoints are considered for Batch accounts" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, batch] +cis_id: "15.4" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Private endpoints are considered for Batch accounts + +## Description + +Private endpoints for Azure Batch accounts ensure all network communication occurs over private networks rather than the public internet. + +## Rationale + +Configuring private endpoints for Azure Batch accounts ensures all network traffic remains within the Microsoft Azure backbone network, eliminating exposure to public internet threats. This meets zero-trust security principles by enforcing network-level isolation and reducing the attack surface. The configuration also enables precise network monitoring through Azure Network Watcher and NSG flow logs. + +## Impact + +Private endpoints come with an increased cost and complexity. + +## Audit Procedure + +### Using Azure Portal + +1. Login to Azure Portal `https://portal.azure.com/` +2. Navigate to `Batch Accounts` + +For each Batch Account, perform the following: + +1. Under Settings, click on `Networking` +2. Click the `Private access` tab +3. For each Private Endpoint listed, ensure that the connection state is `Approved` + +### Using Azure CLI + +To list Private Endpoints from CLI: + +```bash +az network private-endpoint list \ + --resource-group \ + --query "[?privateLinkServiceConnections[?contains(properties.privateLinkServiceId, 'Microsoft.Batch/batchAccounts/')]]" +``` + +Expected: Should return at least one private endpoint configuration. + +### Using Azure PowerShell + +To list Private Endpoints from PowerShell: + +```powershell +Get-AzPrivateEndpoint -ResourceGroupName | + Where-Object { $_.PrivateLinkServiceConnections.PrivateLinkServiceId -match "Microsoft.Batch/batchAccounts/" } +``` + +## Expected Result + +At least one private endpoint should be configured and in `Approved` connection state for each Batch account. + +## Remediation + +### Using Azure Portal + +1. Navigate to your Batch account +2. Under the Settings drop down, click `Networking` +3. Click the `Private access` tab +4. Click `+ Private endpoint` +5. Configure: + - Virtual network and subnet + - DNS integration (auto-approved recommended) + - Target subresource: batchAccount + +### Using Azure CLI + +```bash +az network private-endpoint create \ + --name batch-pe \ + --resource-group \ + --vnet-name \ + --subnet \ + --private-connection-resource-id /subscriptions//resourceGroups//providers/Microsoft.Batch/batchAccounts/ \ + --group-id batchAccount \ + --connection-name batch-connection +``` + +## Default Value + +Private endpoints are not configured by default. + +## References + +1. https://docs.microsoft.com/en-us/azure/batch/private-connectivity + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.5/SKILL.md new file mode 100644 index 0000000000..d55212918c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.5/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-azure-compute-15.5 +description: "Ensure public network access is disabled for Batch accounts" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, batch] +cis_id: "15.5" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure public network access is disabled for Batch accounts + +## Description + +Disabling public network access ensures all connectivity occurs through private endpoints or approved virtual networks. + +## Rationale + +Public network access exposes Batch accounts to internet threats like DDoS attacks and unauthorized access, violating Zero Trust principles and compliance requirements for secure data processing environments. + +## Impact + +A virtual network or private endpoint should be implemented for the Batch account prior to disabling public network access. + +## Audit Procedure + +### Using Azure Portal + +1. Login to `https://portal.azure.com` +2. For each Batch Account, click on the Batch account name +3. Navigate to the `Settings` drop-down, then click `Networking`. +4. Under the `Public access` tab, ensure that Public Network Access is set to `Disabled`. + +Repeat for each Batch account in scope. + +### Using Azure CLI + +```bash +az batch account show \ + --name \ + --resource-group \ + --query "publicNetworkAccess" +``` + +### Using Azure PowerShell + +```powershell +(Get-AzBatchAccount -Name "").PublicNetworkAccess +``` + +Expected Output: **Disabled** + +## Expected Result + +The `publicNetworkAccess` setting should be `Disabled` for all Batch accounts. + +## Remediation + +### Using Azure Portal + +1. Login to `https://portal.azure.com` +2. For each Batch Account, click on the Batch account name +3. Navigate to the `Settings` drop-down, then click `Networking`. +4. Under the `Public access` tab, ensure that Public Network Access is set to `Disabled`. +5. Click `Save` + +Repeat for each Batch account in scope. + +### Using Azure CLI + +```bash +az batch account update \ + --name \ + --resource-group \ + --public-network-access Disabled +``` + +### Using Azure PowerShell + +```powershell +Update-AzBatchAccount -Name -ResourceGroupName -PublicNetworkAccess Disabled +``` + +## Default Value + +Public network access is **enabled** by default for new Batch accounts. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/batch-security-baseline#ns-4 +2. https://learn.microsoft.com/en-us/azure/batch/private-connectivity + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.6/SKILL.md new file mode 100644 index 0000000000..2b3a1c6380 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.6/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-azure-compute-15.6 +description: "Ensure private DNS zones for private endpoints that connect to Batch accounts are configured" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, batch] +cis_id: "15.6" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure private DNS zones for private endpoints that connect to Batch accounts are configured + +## Description + +Private DNS zones for Azure Batch private endpoints provide secure internal name resolution, preventing public internet exposure. When a private endpoint is created for a Batch account, Azure requires a private DNS zone (privatelink..batch.azure.com) to map the Batch service's domain name to a private IP address within your virtual network (VNet). + +## Rationale + +To enable secure and private access to Azure Batch accounts, private DNS zones must be properly configured for private endpoints so as not to expose them publicly and allow for internal name resolution. Proper configuration of DNS provides assurance that DNS resolves to private IPs, reducing data exposure risk and support for security policy adherence. In the absence of proper DNS configuration, Batch services are open to connectivity failure, job interruption, or misconfigured public internet routing. Well-meshed private DNS zones hold traffic within the virtual network as intended, as a Zero Trust architecture and regulatory standard would dictate. Organizations need to audit and automate the configurations for secure and stable Batch processing. + +## Impact + +**NOTE:** This recommendation assumes that a Private DNS Zone already exists. If one has not yet been created for Batch accounts [e.g. privatelink.batch.azure.com], that must be completed before it can be assigned to a Batch account's Private Endpoint. + +Network architecture must be carefully considered when deploying Private DNS Zones. DNS Zones should be used to associate like services. Private DNS zones should not be used to resolve public endpoints. + +## Audit Procedure + +### Using Azure Portal + +1. Login to Azure portal `https://portal.azure.com` +2. Navigate to `Batch accounts` in the Azure portal + +For each batch account perform the following: + +1. Expand `Settings` then click on `Networking` +2. Click the `Private access` tab + +If no Private endpoints exist, the configuration fails this audit procedure. + +For each Private endpoint perform the following: + +1. Click the name of the Private Endpoint +2. Expand `Settings` then click on `DNS Configuration` +3. Scroll to the bottom where a table of `Configuration entries` is found + +Ensure that there is an entry populated in the `Private DNS Zone` column (e.g. `privatelink.batch.azure.com`). + +## Expected Result + +Each Private Endpoint connected to a Batch account should have a Private DNS Zone configured (e.g. `privatelink.batch.azure.com`) with valid DNS entries. + +## Remediation + +### Using Azure Portal + +**NOTE:** This instruction assumes a Private Endpoint already exists for the Batch Account, and that a Private DNS Zone has already been created. + +1. Login to Azure portal `https://portal.azure.com` +2. Navigate to `Batch accounts` in the Azure portal + +For each batch account perform the following: + +1. Expand `Settings` then click on `Networking` +2. Click the `Private access` tab + +_[If no Private Endpoints exist, one must be created before proceeding. Instructions for configuring Private Endpoints on Batch Accounts can be found in the recommendation titled "Ensure to Configure Batch accounts with private endpoints"]_ + +For each Private endpoint perform the following: + +1. Click the name of the Private Endpoint +2. Expand `Settings` then click on `DNS Configuration` +3. Click the `+ Add Configuration` button +4. Select each field appropriately (e.g. Private DNS zone "privatelink.batch.azure.com" - other zone names in additional information below) and enter a custom Configuration Name if desired +5. Click the `Add` button then allow a moment for deployment + +Refresh the DNS Configuration page, then scroll down and ensure an entry exists (e.g. "privatelink.batch.azure.com") under the `Private DNS zone` column in the Configuration entry table. + +## Default Value + +Azure DNS zones are not configured by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns +2. https://learn.microsoft.com/en-us/azure/batch/private-connectivity +3. Commercial Zone Names: https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns#compute +4. Government Zone Names: https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns#compute-1 +5. China Zone Names: https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns#compute-2 + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.7/SKILL.md new file mode 100644 index 0000000000..469f2a29f3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-15.7/SKILL.md @@ -0,0 +1,132 @@ +--- +name: cis-azure-compute-15.7 +description: "Ensure Diagnostics settings logs for Batch accounts are enabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, batch] +cis_id: "15.7" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Diagnostics settings logs for Batch accounts are enabled + +## Description + +Azure Batch resource logs give important operational data such as job scheduling, pool management, and node communication. Having these logs enabled is necessary for monitoring, troubleshooting, and compliance auditing. + +## Rationale + +Enable resource logging for: + +- Operational Visibility -- Keep track of any job failures, node allocation issues, or API activities. +- Security Compliance -- Needed for audits (ISO 27001, SOC 2, GDPR). +- Forensic Investigations -- Acts as evidence in case of security incidents or performance bottlenecks. + +## Impact + +Costs for monitoring varies with Log Volume and storage destination. Not every resource needs to have logging enabled. It is important to determine the security classification of the data being processed by the given resource and adjust the logging based on which events need to be tracked. This is typically determined by governance and compliance requirements. + +Retention is not addressed in this recommendation and should be considered depending on the needs of your organization. A 30-day minimum is recommended and longer may be required depending on the security or compliance framework your organization is following. + +## Audit Procedure + +### Using Azure Portal + +1. Login to Azure portal `https://portal.azure.com` +2. Go to `Batch Accounts` + +For each Batch account perform the following: + +1. Expand the `Monitoring` section and click on `Diagnostic settings` + +If no named `Diagnostic setting` exists in the table, the configuration fails this audit procedure. + +Review the named `Diagnostics settings` in the table to ensure that the following categories are enabled: + +- ServiceLog (Tracks Batch service operations) +- AuditLog (Records management-plane activities) + +Ensure that each is configured to send to a valid destination: + +- Log Analytics workspace (Recommended for querying) +- Storage account (For long-term retention) +- Event Hub (For real-time streaming) + +### Using Azure CLI + +```bash +az batch account list --query "[].id" | xargs -I {} az monitor diagnostic-settings list --resource {} --query "value[].{account:{split('/')[8]}, name:name, enabled:logs[?enabled]}" -o tsv +``` + +### Using Azure PowerShell + +```powershell +Get-AzBatchAccount | ForEach-Object { + $settings = Get-AzDiagnosticSetting -ResourceId $_.Id + [PSCustomObject]@{ + AccountName = $_.AccountName + HasDiagnostics = ($settings -ne $null) + LogsEnabled = ($settings.Logs | Where-Object Enabled).Count -gt 0 + } +} +``` + +## Expected Result + +Each Batch account should have Diagnostic settings configured with ServiceLog and AuditLog categories enabled, sending to at least one valid destination (Log Analytics workspace, Storage account, or Event Hub). + +## Remediation + +### Using Azure Portal + +1. Login to Azure portal `https://portal.azure.com` +2. Go to `Batch Accounts` + +For each Batch account perform the following: + +1. Expand the `Monitoring` section and click on `Diagnostic settings` +2. Click `+Add diagnostic setting` +3. Enter an appropriate name, then ensure that the following categories are checked: + - ServiceLog (Tracks Batch service operations) + - AuditLog (Records management-plane activities) +4. Configure to send to a valid destination based on what is used within your tenant: + - Log Analytics workspace (Recommended for querying) + - Storage account (For long-term retention) + - Event Hub (For real-time streaming) +5. Click `Save` + +### Using Azure CLI + +```bash +az monitor diagnostic-settings create \ + --name "" \ + --resource $(az batch account show --name --resource-group --query id -o tsv) \ + --logs '[{"category": "AuditLog", "enabled": true}, {"category": "ServiceLog", "enabled": true}]' \ + --workspace $(az monitor log-analytics workspace show --resource-group --name --query id -o tsv) \ +``` + +### Using Azure PowerShell + +```powershell +$batchAccountId = (Get-AzBatchAccount -AccountName "" -ResourceGroupName "").Id +New-AzDiagnosticSetting -Name "BatchLogs" -ResourceId $batchAccountId -Log @(@{Category="AuditLog";Enabled=$true}, @{Category="ServiceLog";Enabled=$true}) -WorkspaceId (Get-AzOperationalInsightsWorkspace -Name "").ResourceId +``` + +## Default Value + +Resource logs are not configured by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/batch/monitoring-overview#diagnostic-logs +2. https://learn.microsoft.com/en-us/azure/batch/batch-diagnostics#service-logs + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.1/SKILL.md new file mode 100644 index 0000000000..2b03aeef2c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.1/SKILL.md @@ -0,0 +1,139 @@ +--- +name: cis-azure-compute-2.1.1 +description: "Ensure 'Java version' is currently supported (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, java, runtime-version, patch-management] +cis_id: "2.1.1" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Java version' is currently supported (if in use) + +## Description + +Periodically, older versions of Java may be deprecated and no longer supported. Using a supported version of Java for App Service apps is recommended to avoid potential unpatched vulnerabilities. + +## Rationale + +Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable. + +## Impact + +If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, ensure that for a `Stack` of `Java`, the `Major Version` and `Minor Version` reflect a currently supported release, and that the `Java web server version` is set to the `auto-update` option. +5. Repeat steps 1-4 for each app. + +**NOTE:** No action is required if `Java version` is set to `Off`, as Java is not used by your app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to check the Java version: + +``` +az webapp config show --resource-group --name --query "{LinuxFxVersion:linuxFxVersion, WindowsFxVersion:windowsFxVersion, JavaVersion:javaVersion, JavaContainerVersion:javaContainerVersion, JavaContainer:javaContainer}" +``` + +If Java is in use, ensure the version is currently supported. + +### Using Azure PowerShell + +For each application, store the application information within an object, and then interrogate the `SiteConfig` information for that application object: + +``` +$app = Get-AzWebApp -Name -ResourceGroup + +$app.SiteConfig |Select-Object LinuxFXVersion, WindowsFxVersion, JavaVersion, JavaContainerVersion, JavaContainer +``` + +If Java is in use, ensure the version is currently supported. + +## Expected Result + +The Java version in use should be a currently supported release as listed at https://www.oracle.com/java/technologies/java-se-support-roadmap.html. + +## Remediation + +### Using Azure Portal + +1. Login to Azure Portal using https://portal.azure.com +2. Go to `App Services` +3. Click on each App +4. Under `Settings` section, click on `Configuration` +5. Click on the `General settings` pane and ensure that for a `Stack` of `Java` the `Major Version` and `Minor Version` reflect a currently supported release, and that the `Java web server version` is set to the `auto-update` option. + +**NOTE:** No action is required if `Java version` is set to `Off`, as Java is not used by your app. + +### Using Azure CLI + +To see the list of supported runtimes: + +``` +az webapp list-runtimes +``` + +To set a currently supported Java version for an existing app, run the following command: + +``` +az webapp config set --resource-group --name [--java-version --java-container --java-container-version [--windows-fx-version ] [--linux-fx-version ] +``` + +If creating a new application to use a currently supported version of Java, run the following commands. + +To create an app service plan: + +``` +az appservice plan create --resource-group --name --location [--is-linux --number-of-workers --sku ] [--hyper-v --sku ] +``` + +Get the app service plan ID: + +``` +az appservice plan list --query "[].{Name:name, ID:id, SKU:sku, Location:location}" +``` + +To create a new Java web application using the retrieved app service ID: + +``` +az webapp create --resource-group --plan --name [--linux-fx-version ] [--windows-fx-version ] +``` + +### Using Azure PowerShell + +As of this writing, there is no way to update an existing application's `SiteConfig` or set a new application's `SiteConfig` settings during creation via PowerShell. + +## Default Value + +The version is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-language-java-deploy-run +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-3-define-and-establish-secure-configurations-for-compute-resources +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-6-rapidly-and-automatically-remediate-vulnerabilities +4. https://www.oracle.com/java/technologies/java-se-support-roadmap.html +5. https://learn.microsoft.com/en-us/cli/azure/webapp + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.10/SKILL.md new file mode 100644 index 0000000000..424f909b00 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.10/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-azure-compute-2.1.10 +description: "Ensure 'Remote debugging' is set to 'Off'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, remote-debugging, attack-surface, security-hardening] +cis_id: "2.1.10" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Remote debugging' is set to 'Off' + +## Description + +Remote debugging allows an App Service app to be debugged in real-time directly in the Azure environment. When remote debugging is enabled, it opens a communication channel that could potentially be exploited by unauthorized users if not properly secured. + +## Rationale + +Disabling remote debugging on an App Service app is primarily about enhancing security. + +Remote debugging opens a communication channel that can be exploited by attackers. By disabling it, you reduce the number of potential entry points for unauthorized access. + +If remote debugging is enabled without proper access controls, it can allow unauthorized users to connect to your application, potentially leading to data breaches or malicious code execution. + +During a remote debugging session, sensitive information might be exposed. Disabling remote debugging helps ensure that such data remains secure. This minimizes the use of remote access tools to reduce risk. + +## Impact + +You will not be able to connect to your application from a remote location to diagnose and fix issues in real-time. You will not be able to step through code, set breakpoints, or inspect variables and the call stack while the application is running on the server. Remote debugging is particularly useful for diagnosing issues that only occur in the production environment. Without it, you will need to rely on logs and other diagnostic tools. + +## Audit Procedure + +### Using Azure Portal + +1. Login to Azure Portal using https://portal.azure.com +2. Go to `App Services` +3. Click on each App +4. Under `Setting` section, Click on `Configuration` +5. Under the `General settings` tab, check the `Remote debugging` option. Ensure it is set to `Off`. + +### Using Azure CLI + +To check remote debugging status for an existing app, run the following command: + +``` +az webapp config show --resource-group --name --query remoteDebuggingEnabled +``` + +The output should be `false` if remote debugging is disabled. + +### Using Azure PowerShell + +To check remote debugging status for an existing app, run the following command: + +``` +Get-AzWebApp -ResourceGroupName -Name |Select-Object -ExpandProperty SiteConfig +``` + +The output of `remoteDebuggingEnabled` should be `false` if remote debugging is disabled. + +## Expected Result + +The `remoteDebuggingEnabled` setting should return `false`. + +## Remediation + +### Using Azure Portal + +1. Login to Azure Portal using https://portal.azure.com +2. Go to `App Services` +3. Click on each App +4. Under `Setting` section, Click on `Configuration` +5. Under the `General settings` tab, set the `Remote debugging` option to `Off`. + +### Using Azure CLI + +To set remote debugging status to off, run the following command: + +``` +az webapp config set --resource-group --name --remote-debugging-enabled false +``` + +### Using Azure PowerShell + +To set remote debugging status to off, run the following command: + +``` +Set-AzWebApp -ResourceGroupName -Name -RemoteDebuggingEnabled $false +``` + +## Default Value + +By default, remote debugging is set to `off`. + +## References + +1. https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-azure-app-service +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-2-audit-and-enforce-secure-configurations +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp +5. https://learn.microsoft.com/en-us/powershell/module/az.websites/set-azwebapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.11/SKILL.md new file mode 100644 index 0000000000..1f011ec196 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.11/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-azure-compute-2.1.11 +description: "Ensure incoming client certificates are enabled and required (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, client-certificates, mutual-tls, authentication] +cis_id: "2.1.11" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure incoming client certificates are enabled and required (if in use) + +## Description + +Client certificates allow for the app to request a certificate for incoming requests. Only clients that have a valid certificate will be able to reach the app. + +## Rationale + +The TLS mutual authentication technique in enterprise environments ensures the authenticity of clients to the server. If incoming client certificates are enabled, then only an authenticated client with valid certificates can access the app. + +## Impact + +Utilizing and maintaining client certificates will require additional work to obtain and manage replacement and key rotation. + +**NOTE:** This recommendation cannot be implemented if following the recommendation titled "Ensure 'HTTP Version' is set to '2.0' (if in use)." This recommendation should only be considered for scenarios where HTTP versions prior to 2.0 are required for an app, and mutual certificate authentication is desired for validating clients. + +## Audit Procedure + +### Using Azure Portal + +1. Login to Azure Portal using https://portal.azure.com +2. Go to `App Services` +3. Click on each App +4. Under the Settings section, Click on `Configuration`, then `General settings` +5. Ensure that the option `Client certificate mode` located under Incoming client certificates is set to `Require` + +### Using Azure CLI + +To check Incoming client certificates value for an existing app, run the following command: + +``` +az webapp show --resource-group --name --query clientCertEnabled +``` + +The output should return `true` if Incoming client certificates value is set to `On`. + +### Using Azure PowerShell + +List all web apps: + +``` +Get-AzWebApp +``` + +For each web app run the following command: + +``` +Get-AzWebApp -ResourceGroup -Name +``` + +Make sure the `ClientCertEnabled` is set to `True`. + +## Expected Result + +The `clientCertEnabled` setting should return `true` and `Client certificate mode` should be set to `Require`. + +## Remediation + +### Using Azure Portal + +1. Login to Azure Portal using https://portal.azure.com +2. Go to `App Services` +3. Click on each App +4. Under the Settings section, Click on `Configuration`, then `General settings` +5. Set the option `Client certificate mode` located under Incoming client certificates to `Require` + +### Using Azure CLI + +To set Incoming client certificates value for an existing app, run the following command: + +``` +az webapp update --resource-group --name --set clientCertEnabled=true +``` + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +By default, incoming client certificates are disabled. + +## References + +1. https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-identity-management#im-4-authenticate-server-and-services +2. https://learn.microsoft.com/en-us/azure/app-service/app-service-web-configure-tls-mutual-auth +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.12/SKILL.md new file mode 100644 index 0000000000..57d0d02e22 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.12/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-azure-compute-2.1.12 +description: "Ensure 'App Service authentication' is set to 'Enabled'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, authentication, identity, access-control] +cis_id: "2.1.12" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'App Service authentication' is set to 'Enabled' + +## Description + +App Service authentication can prevent anonymous HTTP requests from reaching an app, or authenticate those with tokens before they reach the app. If an anonymous request is received from a browser, App Service will redirect to a login page. To handle the login process, a choice from a set of identity providers can be made, or a custom authentication mechanism can be implemented. + +## Rationale + +By enabling authentication, every incoming HTTP request passes through it before being handled by the application code. It also handles authentication of users with the specified provider (Entra ID, Facebook, Google, Microsoft Account, and Twitter), validation, storage and refreshing of tokens, managing the authenticated sessions, and injecting identity information into request headers. + +## Impact + +This is only required for apps that require authentication. Enabling it on a site like a marketing or support website will prevent unauthenticated access, which would be undesirable. + +Adding an authentication requirement will increase costs and require additional security components to facilitate the authentication. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Authentication`. +4. Ensure that `App Service authentication` is set to `Enabled`. +5. Repeat steps 1-4 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the authentication setting: + +For v1 auth commands: + +``` +az webapp auth show --resource-group --name --query enabled +``` + +For v2 auth commands: + +``` +az webapp auth show --resource-group --name --query properties.platform.enabled +``` + +Ensure that `true` is returned. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Expected Result + +App Service authentication should be enabled (`true`). + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Authentication`. +4. If an identity provider is not configured: + 1. Click `Add identity provider`. + 2. Provide appropriate configuration for an identity provider and click `Add`. +5. If `App Service authentication` is set to `Disabled`: + 1. Click `Enable authentication`. +6. Repeat steps 1-5 for each app requiring remediation. + +### Using Azure CLI + +For each app requiring remediation, run the following command to enable authentication: + +``` +az webapp auth update --resource-group --name --enabled true +``` + +**Note**: In order to access `App Service authentication` settings for an app using the Microsoft API, the `Website Contributor` permission at the subscription level is required. A custom role can be created instead of `Website Contributor` to provide more specific permissions and maintain the principle of least privilege access. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +By default, `App Service authentication` is set to `Disabled`. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-authentication-authorization +2. https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#website-contributor +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +5. https://learn.microsoft.com/en-us/cli/azure/webapp/auth + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.13/SKILL.md new file mode 100644 index 0000000000..44623f3314 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.13/SKILL.md @@ -0,0 +1,131 @@ +--- +name: cis-azure-compute-2.1.13 +description: "Ensure managed identities are configured" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, managed-identity, entra-id, credential-management] +cis_id: "2.1.13" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure managed identities are configured + +## Description + +Managed identities from Microsoft Entra ID allow App Service apps to securely access other Azure services without the need to provision or rotate any secrets. + +## Rationale + +Using managed identities with App Service apps eliminates the need to store and manage credentials to access Azure resources. + +## Impact + +Minor administrative overhead to configure and manage role assignments for managed identities. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Identity`. +4. Ensure that in the `System assigned` pane, the `Status` is set to `On`, and an `Object (principal) ID` is displayed, or that in the `User assigned` pane, a managed identity is listed. +5. Repeat steps 1-4 for each app. + +### Using Azure CLI + +Run the following command to list web apps: + +``` +az webapp list +``` + +For each web app, run the following command: + +``` +az webapp identity show --resource-group --name --query type +``` + +Ensure the command returns `SystemAssigned`, `UserAssigned`, or both. + +### Using Azure PowerShell + +Run the following command to list web apps: + +``` +Get-AzWebApp +``` + +Run the following command to get the web app in a resource group with a given name: + +``` +Get-AzWebapp -ResourceGroupName -Name +``` + +Run the following command to get the assigned identity type for a web app: + +``` +$webapp.Identity.Type +``` + +Ensure the command returns `SystemAssigned`, `UserAssigned`, or both. + +## Expected Result + +The identity type should return `SystemAssigned`, `UserAssigned`, or both. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Identity`. +4. To add a system assigned managed identity: + 1. In the `System assigned` pane, under `Status`, click `On`. + 2. Click `Save`. + 3. Click `Yes`. +5. To add a user assigned managed identity: + 1. In the `User assigned` pane, click `Add`. + 2. Use the filter box to search for a managed identity. + 3. Select the identity. + 4. Click `Add`. +6. Repeat steps 1-5 for each app requiring remediation. + +### Using Azure CLI + +For each web app requiring remediation, run the following command to assign a managed identity: + +``` +az webapp identity assign --resource-group --name +``` + +### Using Azure PowerShell + +For each web app requiring remediation, run the following command to assign a managed identity: + +``` +Set-AzWebApp -AssignIdentity $True -ResourceGroupName -Name +``` + +## Default Value + +Managed identities are disabled by default for App Service apps. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-1-use-centralized-identity-and-authentication-system +2. https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp +5. https://learn.microsoft.com/en-us/powershell/module/az.websites/set-azwebapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.14/SKILL.md new file mode 100644 index 0000000000..2fbc26c04a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.14/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-azure-compute-2.1.14 +description: "Ensure public network access is disabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, public-network-access, network-security, private-endpoint] +cis_id: "2.1.14" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure public network access is disabled + +## Description + +Disable public network access to prevent exposure to the internet and reduce the risk of unauthorized access. Use private endpoints to securely manage access within trusted networks. + +## Rationale + +Disabling public network access improves security by ensuring that the service is not directly exposed to the public Internet. This has the added benefit of providing more granular control over security settings and configurations for those additional layers of separation. + +## Impact + +**NOTE:** Prior to disabling public network access, it is strongly recommended that, for each App Service App, either: + +- complete virtual network integration as described in "Ensure app is integrated with a virtual network" + +OR + +- set up private endpoints/links as described in "Ensure private endpoints are used to access App Service apps." + +Disabling public network access restricts direct access to the service. This enhances security but will require the configuration of a virtual network and/or private endpoints for any services or users needing access within trusted networks. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Networking`. +4. Under `Inbound traffic configuration`, ensure that `Public network access` is set to `Disabled`. +5. Repeat steps 1-4 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the public network access setting: + +``` +az webapp show --resource-group --name --query "publicNetworkAccess" +``` + +Ensure that the command returns `"Disabled"`. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Expected Result + +The `publicNetworkAccess` property should return `"Disabled"`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Networking`. +4. Under `Inbound traffic configuration`, click the text next to `Public network access`. +5. Select the radio button next to `Disabled`. +6. Click `Save`. +7. Check the box to confirm the change. +8. Click `Continue`. +9. Repeat steps 1-8 for each app requiring remediation. + +### Using Azure CLI + +For each app requiring remediation, run the following command to disable public network access: + +``` +az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.publicNetworkAccess=Disabled +``` + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +By default, public network access is enabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/networking-features +2. https://learn.microsoft.com/en-us/cli/azure/webapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.15/SKILL.md new file mode 100644 index 0000000000..917eeeb19a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.15/SKILL.md @@ -0,0 +1,146 @@ +--- +name: cis-azure-compute-2.1.15 +description: "Ensure App Service plan SKU supports private endpoints" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, private-endpoint, sku, app-service-plan, network-security] +cis_id: "2.1.15" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure App Service plan SKU supports private endpoints + +## Description + +Ensure that your App Service plan SKU supports private endpoints. Private endpoints provide secure access over Azure Private Link, which keeps traffic on the Microsoft backbone network and eliminates exposure to the public internet. Note that not all SKUs support private endpoints. + +## Rationale + +An appropriately configured private endpoint eliminates public exposure and helps prevent data exfiltration. + +## Impact + +App Service plan costs vary based on the selected SKU. + +- App Service on Linux pricing: https://azure.microsoft.com/en-us/pricing/details/app-service/linux/ +- App Service on Windows pricing: https://azure.microsoft.com/en-us/pricing/details/app-service/windows/ + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. In the `Properties` pane, under `Hosting`, next to `SKU and size`, ensure that the plan tier is one of the following: `Basic`, `Standard`, `ElasticPremium`, `Premium`, `PremiumV2`, `Premium0V3`, `PremiumV3`, `PremiumMV3`, `IsolatedV2`, `IsolatedMV2`, `WorkflowStandard`, `FlexConsumption`, and that the plan name is one of the following: `B1`, `B2`, `B3`, `S1`, `S2`, `S3`, `EP1`, `EP2`, `EP3`, `P1`, `P2`, `P3`, `P1V2`, `P2V2`, `P3V2`, `P0V3`, `P1V3`, `P2V3`, `P3V3`, `P1MV3`, `P2MV3`, `P3MV3`, `P4MV3`, `P5MV3`, `I1V2`, `I2V2`, `I3V2`, `I4V2`, `I5V2`, `I6V2`, `I1MV2`, `I2MV2`, `I3MV2`, `I4MV2`, `I5MV2`, `WS1`, `WS2`, `WS3`, `FC1`. +4. Repeat steps 1-3 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the App Service plan ID: + +``` +az webapp show --resource-group --name --query appServicePlanId +``` + +For each App Service plan, run the following command to get the plan SKU tier and name: + +``` +az appservice plan show --resource-group --name --query "{tier:sku.tier,name:sku.name}" +``` + +Ensure that the plan tier is one of the following: `Basic`, `Standard`, `ElasticPremium`, `Premium`, `PremiumV2`, `Premium0V3`, `PremiumV3`, `PremiumMV3`, `IsolatedV2`, `IsolatedMV2`, `WorkflowStandard`, `FlexConsumption`, and that the plan name is one of the following: `B1`, `B2`, `B3`, `S1`, `S2`, `S3`, `EP1`, `EP2`, `EP3`, `P1`, `P2`, `P3`, `P1V2`, `P2V2`, `P3V2`, `P0V3`, `P1V3`, `P2V3`, `P3V3`, `P1MV3`, `P2MV3`, `P3MV3`, `P4MV3`, `P5MV3`, `I1V2`, `I2V2`, `I3V2`, `I4V2`, `I5V2`, `I6V2`, `I1MV2`, `I2MV2`, `I3MV2`, `I4MV2`, `I5MV2`, `WS1`, `WS2`, `WS3`, `FC1`. + +### Using Azure PowerShell + +Run the following command to list apps: + +``` +Get-AzWebApp +``` + +Run the following command to get the app in a resource group with a given name: + +``` +$app = Get-AzWebApp -ResourceGroupName -Name +``` + +Run the following command to get the App Service plan ID: + +``` +$app.ServerFarmId +``` + +Run the following command to get the App Service plan in a resource group with a given name: + +``` +$plan = Get-AzAppServicePlan -ResourceGroupname -Name +``` + +Run the following command to get the plan SKU tier and name: + +``` +$plan.Sku | select-object Tier, Name +``` + +Ensure that the plan tier and name match the supported values listed above. Repeat for each app. + +## Expected Result + +The App Service plan SKU tier and name should be one that supports private endpoints (Basic or higher). + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. In the `Properties` pane, under `Hosting`, next to `Name`, click the App Service plan name. +4. Under `Current App Service plan`, next to `Name`, click the App Service plan name. +5. Under `Essentials`, next to `Pricing plan`, click the pricing plan name. +6. Select a pricing plan where the plan tier is one of the following: `Basic`, `Standard`, `ElasticPremium`, `Premium`, `PremiumV2`, `Premium0V3`, `PremiumV3`, `PremiumMV3`, `IsolatedV2`, `IsolatedMV2`, `WorkflowStandard`, `FlexConsumption`, and the plan name is one of the supported values. +7. Click `Select`. +8. Click `Downgrade` or `Upgrade` to confirm the change. +9. Repeat steps 1-8 for each app and App Service plan requiring remediation. + +### Using Azure CLI + +For each App Service plan requiring remediation, run the following command to update the SKU: + +``` +az appservice plan update --resource-group --name --sku +``` + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +The App Service plan is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-hosting-plans +2. https://learn.microsoft.com/en-us/azure/app-service/overview-private-endpoint +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/cli/azure/appservice/plan +5. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp +6. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azappserviceplan +7. https://azure.microsoft.com/en-us/pricing/details/app-service/linux/ +8. https://azure.microsoft.com/en-us/pricing/details/app-service/windows/ + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.16/SKILL.md new file mode 100644 index 0000000000..9f968c466c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.16/SKILL.md @@ -0,0 +1,119 @@ +--- +name: cis-azure-compute-2.1.16 +description: "Ensure private endpoints are used to access App Service apps" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, private-endpoint, private-link, network-security, vnet] +cis_id: "2.1.16" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure private endpoints are used to access App Service apps + +## Description + +Use private endpoints to allow clients and services to securely access data located over a network via an encrypted Private Link. To do this, the private endpoint uses an IP address from the VNet for each service. Network traffic between disparate services securely traverses encrypted over the VNet. This VNet can also link addressing space, extending your network and accessing resources on it. Similarly, it can be a tunnel through public networks to connect remote infrastructures together. This creates further security through segmenting network traffic and preventing outside sources from accessing it. + +## Rationale + +Securing traffic between services through encryption protects the data from easy interception and reading. + +## Impact + +If an Azure Virtual Network is not implemented correctly, this may result in the loss of critical network traffic. + +Private endpoints are charged per hour of use. Refer to https://azure.microsoft.com/en-us/pricing/details/private-link/ and https://azure.microsoft.com/en-us/pricing/calculator/ to estimate potential costs. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Networking`. +4. Under `Inbound traffic configuration`, click the link next to `Private endpoints`. +5. Ensure that at least one private endpoint is listed with a `Connection state` of `Approved`. +6. Repeat steps 1-5 for each app. + +### Using Azure CLI + +Run the following command to list apps IDs: + +``` +az webapp list --query [*].id +``` + +Run the following command to list private link service IDs and connection states: + +``` +az network private-endpoint list --query [*].privateLinkServiceConnections[*].[privateLinkServiceId,privateLinkServiceConnectionState.status] +``` + +Ensure that a private endpoint exists for each app with a connection state of `Approved`. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Expected Result + +At least one private endpoint should exist for each app with a connection state of `Approved`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Networking`. +4. Under `Inbound traffic configuration`, click the link next to `Private endpoints`. +5. Click `+ Add`. +6. From the drop-down menu, select `Express` or `Advanced`. +7. If selecting `Express`: + 1. Provide a `Name`, and select a `Subscription`, `Virtual network`, and `Subnet`. + 2. Click `OK`. +8. If selecting `Advanced`: + 1. Select a `Subscription` and `Resource group`, provide an instance `Name` and `Network Interface Name`, and select a `Region`. + 2. Click `Next : Resource >`. + 3. Select a `Target sub-resource`. + 4. Click `Next : Virtual Network >`. + 5. Select a `Virtual network` and a `Subnet`. + 6. Click `Next : DNS >`. + 7. Optionally update the DNS configuration. + 8. Click `Next : Tags >`. + 9. Optionally configure tags. + 10. Click `Next : Review + create >`. + 11. Click `Create`. + +### Using Azure CLI + +For each app requiring remediation, run the following command to create a private endpoint: + +``` +az network private-endpoint create --resource-group --location --name --vnet-name --subnet --private-connection-resource-id --connection-name --group-id sites +``` + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +By default, private endpoints are not configured for apps. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-private-endpoint +2. https://azure.microsoft.com/en-us/pricing/details/private-link/ +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/cli/azure/network/private-endpoint + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.17/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.17/SKILL.md new file mode 100644 index 0000000000..2e440d372a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.17/SKILL.md @@ -0,0 +1,92 @@ +--- +name: cis-azure-compute-2.1.17 +description: "Ensure private endpoints used to access App Service apps use private DNS zones" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, private-endpoint, private-dns, dns, network-security] +cis_id: "2.1.17" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure private endpoints used to access App Service apps use private DNS zones + +## Description + +Use private DNS zones to override DNS resolution for a private endpoint. A private DNS zone links a virtual network to an App Service app. + +This recommendation assumes application of, and should be applied in conjunction with, the recommendation titled "Ensure private endpoints are used to access App Service apps." + +## Rationale + +It's important to correctly configure DNS settings to ensure that the fully qualified domain name (FQDN) of the App Service app resolves to the private endpoint IP address. + +## Impact + +Incorrectly configured DNS settings may result in unintentional exposure of traffic to the public internet. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Networking`. +4. Under `Inbound traffic configuration`, click the link next to `Private endpoints`. +5. Click the name of a private endpoint. +6. Under `Settings`, click `DNS configuration`. +7. Ensure a configuration is displayed with a value for `Private DNS zone`. +8. Repeat steps 1-7 for each app and private endpoint. + +### Using Azure CLI + +Not specifically documented for this control. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Expected Result + +Each private endpoint should have a private DNS zone configured. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Networking`. +4. Under `Inbound traffic configuration`, click the link next to `Private endpoints`. +5. Click the name of a private endpoint. +6. Under `Settings`, click `DNS configuration`. +7. Click `+ Add configuration`. +8. Select a `Subscription`, `Private DNS zone`, and provide a `DNS zone group` and `Configuration name`. +9. Click `Add`. +10. Repeat steps 1-9 for each app and private endpoint requiring remediation. + +### Using Azure CLI + +Not specifically documented for this control. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +Not configured by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-private-endpoint#dns +2. https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.18/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.18/SKILL.md new file mode 100644 index 0000000000..d042915de8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.18/SKILL.md @@ -0,0 +1,157 @@ +--- +name: cis-azure-compute-2.1.18 +description: "Ensure app is integrated with a virtual network" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, vnet-integration, virtual-network, network-security] +cis_id: "2.1.18" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure app is integrated with a virtual network + +## Description + +Integrate App Service apps with a virtual network to enable access to resources in or through a non-internet-routable virtual network. + +## Rationale + +Integrate App Service apps with a virtual network for increased security and control. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Networking`. +4. Under `Outbound traffic configuration`, next to `Virtual network integration`, ensure that a virtual network and subnet name are displayed. +5. Repeat steps 1-4 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the virtual network subnet ID: + +``` +az webapp show --resource-group --name --query "virtualNetworkSubnetId" +``` + +Ensure that a virtual network subnet ID is returned. + +### Using Azure PowerShell + +Run the following command to list apps: + +``` +Get-AzWebApp +``` + +Run the following command to get the app in a resource group with a given name: + +``` +$app = Get-AzWebapp -ResourceGroupName -Name +``` + +Run the following command to get the virtual network subnet ID: + +``` +$app.virtualNetworkSubnetId +``` + +Ensure that a virtual network subnet ID is returned. Repeat for each app. + +## Expected Result + +A virtual network subnet ID should be returned, indicating the app is integrated with a virtual network. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Networking`. +4. Under `Outbound traffic configuration`, next to `Virtual network integration`, click `Not configured`. +5. Click `Add virtual network integration`. +6. Select an existing App Service Plan connection, or select `New connection` and select a subscription, virtual network, and subnet. +7. Click `Connect`. +8. Repeat steps 1-7 for each app requiring remediation. + +### Using Azure CLI + +For each app requiring remediation, run the following command to integrate with a virtual network: + +``` +az webapp vnet-integration add --resource-group --name --vnet --subnet +``` + +### Using Azure PowerShell + +For each app requiring remediation, run the following commands to integrate with a virtual network: + +Prepare parameters: + +``` +$siteName = '' +$vNetResourceGroupName = '' +$appResourceGroupName = '' +$vNetName = '' +$integrationSubnetName = '' +$vNetSubscriptionId = '' +``` + +Check if the subnet is delegated to `Microsoft.Web/serverFarms`: + +``` +$vnet = Get-AzVirtualNetwork -Name $vNetName -ResourceGroupName $vNetResourceGroupName +$subnet = Get-AzVirtualNetworkSubnetConfig -Name $integrationSubnetName -VirtualNetwork $vnet +Get-AzDelegation -Subnet $subnet +``` + +Add delegation: + +``` +$subnet = Add-AzDelegation -Name "myDelegation" -ServiceName "Microsoft.Web/serverFarms" -Subnet $subnet +Set-AzVirtualNetwork -VirtualNetwork $vnet +``` + +Configure virtual network integration: + +``` +$subnetResourceId = "/subscriptions/$vNetSubscriptionId/resourceGroups/$vNetResourceGroupName/providers/Microsoft.Network/virtualNetworks/$vNetName/subnets/$integrationSubnetName" +$app = Get-AzResource -ResourceType Microsoft.Web/sites -ResourceGroupName $appResourceGroupName -ResourceName $siteName +$app.Properties.virtualNetworkSubnetId = $subnetResourceId +$app.Properties.vnetRouteAllEnabled = 'true' +$app | Set-AzResource -Force +``` + +## Default Value + +By default, virtual network integration is not configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration +2. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-enable +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.19/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.19/SKILL.md new file mode 100644 index 0000000000..88d55d3a23 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.19/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-azure-compute-2.1.19 +description: "Ensure configuration is routed through the virtual network integration" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, vnet-integration, configuration-routing, content-share, image-pull] +cis_id: "2.1.19" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure configuration is routed through the virtual network integration + +## Description + +By default, configuration traffic for App Service apps goes directly over the public route. Container image pulls and content sharing can be routed through the virtual network integration. + +This recommendation should be applied after integrating an App Service app with a virtual network. + +## Rationale + +Route container image pulls and content sharing through a virtual network integration for increased security and control. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the container image share and content share settings: + +``` +az webapp show --resource-group --name --query "[vnetImagePullEnabled,vnetContentShareEnabled]" +``` + +Ensure that `[true,true]` is returned. + +### Using Azure Portal + +Not specifically documented with portal-only steps for this control. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Expected Result + +Both `vnetImagePullEnabled` and `vnetContentShareEnabled` should return `true`. + +## Remediation + +### Using Azure CLI + +For each app requiring remediation, run the following command to route container image pulls and content sharing through the virtual network integration: + +``` +az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.vnetImagePullEnabled=true --set properties.vnetContentShareEnabled=true +``` + +### Using Azure Portal + +Not specifically documented with portal-only steps for this control. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +By default, configuration traffic goes directly over the public route. + +## Additional Information + +In addition to configuring the routing for content sharing, you must also ensure that any firewall or Network Security Group configured on traffic from the subnet allow traffic to port 443 and 445. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration#routes +2. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-routing#configure-configuration-routing +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.2/SKILL.md new file mode 100644 index 0000000000..95847f3227 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.2/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-azure-compute-2.1.2 +description: "Ensure 'Python version' is currently supported (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, python, runtime-version, patch-management] +cis_id: "2.1.2" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Python version' is currently supported (if in use) + +## Description + +Periodically, older versions of Python may be deprecated and no longer supported. Using a supported version of Python for App Service apps is recommended to avoid potential unpatched vulnerabilities. + +## Rationale + +Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable. + +## Impact + +If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, ensure that for a `Stack` of `Python`, the `Major version` and `Minor version` reflect a currently supported release. +5. Repeat steps 1-4 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the Python version: + +``` +az webapp config show --resource-group --name --query "{LinuxFxVersion:linuxFxVersion,WindowsFxVersion:windowsFxVersion,PythonVersion:pythonVersion}" +``` + +If Python is in use, ensure the version is currently supported. + +### Using Azure PowerShell + +``` +$app = Get-AzWebApp -Name -ResourceGroup +$app.SiteConfig |Select-Object LinuxFXVersion, WindowsFxVersion, PythonVersion +``` + +If Python is in use, ensure the version is currently supported. + +## Expected Result + +The Python version in use should have a status of "security" or higher as listed at https://devguide.python.org/versions/. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, for a `Stack` of `Python`, set the `Major version` and `Minor version` to a currently supported release. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each app requiring remediation. + +**Note:** No action is required if Python is not in use. + +### Using Azure CLI + +Run the following command to list supported runtimes: + +``` +az webapp list-runtimes +``` + +For each app requiring remediation, run the following command with the appropriate parameters to update the Python version: + +``` +az webapp config set --resource-group --name [--windows-fx-version "PYTHON|"] [--linux-fx-version "PYTHON|"] +``` + +### Using Azure PowerShell + +Not applicable for Python version updates via PowerShell at this time. + +## Default Value + +The version is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-common#configure-language-stack-settings +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities +3. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-3-establish-secure-configurations-for-compute-resources +4. https://devguide.python.org/versions/ +5. https://learn.microsoft.com/en-us/cli/azure/webapp +6. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.20/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.20/SKILL.md new file mode 100644 index 0000000000..5110e66fef --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.20/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-azure-compute-2.1.20 +description: "Ensure all traffic is routed through the virtual network" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, vnet-integration, outbound-traffic, route-all, network-security] +cis_id: "2.1.20" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure all traffic is routed through the virtual network + +## Description + +Enable `vnetRouteAllEnabled` to ensure all outbound traffic is routed through the integrated virtual network. + +This recommendation should be applied after integrating an App Service app with a virtual network. + +## Rationale + +Routing all outbound traffic through the virtual network enhances security. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Networking`. +4. Under `Outbound traffic configuration`, next to `Virtual network integration`, click the virtual network and subnet name. +5. Under `Application routing`, ensure that the box next to `Outbound internet traffic` is checked. +6. Repeat steps 1-5 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the virtual network traffic routing setting: + +``` +az webapp show --resource-group --name --query vnetRouteAllEnabled +``` + +Ensure that `true` is returned. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Expected Result + +The `vnetRouteAllEnabled` setting should return `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Networking`. +4. Under `Outbound traffic configuration`, next to `Virtual network integration`, click the virtual network and subnet name. +5. Under `Application routing`, check the box next to `Outbound internet traffic`. +6. Click `Apply`. +7. Repeat steps 1-6 for each app requiring remediation. + +### Using Azure CLI + +For each app requiring remediation, run the following command to route all traffic through the virtual network: + +``` +az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.vnetRouteAllEnabled=true +``` + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +For apps integrated with a virtual network, all traffic is routed through the virtual network by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-routing#configure-application-routing +2. https://learn.microsoft.com/en-us/cli/azure/webapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.21/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.21/SKILL.md new file mode 100644 index 0000000000..ab1c33a9df --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.21/SKILL.md @@ -0,0 +1,129 @@ +--- +name: cis-azure-compute-2.1.21 +description: "Ensure cross-origin resource sharing does not allow all origins" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, cors, cross-origin, web-security, csrf] +cis_id: "2.1.21" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure cross-origin resource sharing does not allow all origins + +## Description + +Cross-origin resource sharing (CORS) is a security feature that controls how applications interact with resources hosted on different domains. + +## Rationale + +Restrict CORS to only trusted origins to help enforce proper access control and reduce exposure to malicious cross-origin requests. + +## Impact + +Configuration is required to ensure that the appropriate origins have access. + +Setting up a proper CORS policy can be fairly complex and an incorrect setting could permit Cross-Site Request Forgery (CSRF). The "caveat" is that if the app being deployed is a PUBLIC API, a wildcard "\*" CORS policy is absolutely necessary. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Service`. +2. Click the name of an app. +3. Under `API`, click `CORS`. +4. Ensure `Allowed Origins` does not include `*`. +5. Repeat steps 1-4 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the CORS allowed origins setting: + +``` +az webapp show --resource-group --name --query siteConfig.cors.allowedOrigins +``` + +Ensure that the response does not include `*`. + +### Using Azure PowerShell + +Run the following command to list apps: + +``` +Get-AzWebApp +``` + +Run the following command to get the app in a resource group with a given name: + +``` +$app = Get-AzWebapp -ResourceGroupName -Name +``` + +Run the following command to get the CORS allowed origins setting: + +``` +$app.SiteConfig.Cors.AllowedOrigins +``` + +Ensure that the response does not include `*`. Repeat for each app. + +## Expected Result + +The CORS allowed origins should not include a wildcard `*` entry. + +## Remediation + +### Using Azure Portal + +1. Go to `App Service`. +2. Click the name of an app. +3. Under `API`, click `CORS`. +4. Under `Allowed Origins`, delete the entry that equals `*`. +5. Specify the origins that should be allowed to make cross-origin calls. +6. Click `Save`. +7. Repeat steps 1-6 for each app requiring remediation. + +### Using Azure CLI + +For each app requiring remediation, run the following command: + +``` +az webapp cors remove --resource-group --name --allowed-origins "*" +``` + +Use the following command to specify the origins that should be allowed: + +``` +az webapp cors add --resource-group --name --allowed-origins +``` + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +By default, CORS is not configured. + +## References + +1. https://learn.microsoft.com/en-gb/azure/app-service/app-service-web-tutorial-rest-api +2. https://learn.microsoft.com/en-us/cli/azure/webapp/cors +3. https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html +4. https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS +5. https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.3/SKILL.md new file mode 100644 index 0000000000..1bc7e4fe89 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.3/SKILL.md @@ -0,0 +1,137 @@ +--- +name: cis-azure-compute-2.1.3 +description: "Ensure 'PHP version' is currently supported (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, php, runtime-version, patch-management] +cis_id: "2.1.3" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'PHP version' is currently supported (if in use) + +## Description + +Periodically, older versions of PHP may be deprecated and no longer supported. Using a supported version of PHP for App Service apps is recommended to avoid potential unpatched vulnerabilities. + +## Rationale + +Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable. + +## Impact + +If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, ensure that for a `Stack` of `PHP`, the `Major version` and `Minor version` reflect a currently supported release. +5. Repeat steps 1-4 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the PHP version: + +``` +az webapp config show --resource-group --name --query "{LinuxFxVersion:linuxFxVersion,PhpVersion:phpVersion}" +``` + +If PHP is in use, ensure the version is currently supported. + +### Using Azure PowerShell + +Run the following command to list apps: + +``` +Get-AzWebApp +``` + +Run the following command to get the app in a resource group with a given name: + +``` +$app = Get-AzWebApp -ResourceGroupName -Name +``` + +Run the following command to get the PHP version: + +``` +$app.SiteConfig | select-object LinuxFXVersion, PhpVersion +``` + +If PHP is in use, ensure the version is currently supported. Repeat for each app. + +## Expected Result + +The PHP version in use should be a currently supported release as listed at https://www.php.net/supported-versions.php. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, for a `Stack` of `PHP`, set the `Major version` and `Minor version` to a currently supported release. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each app requiring remediation. + +**Note:** No action is required if PHP is not in use. + +### Using Azure CLI + +Run the following command to list supported runtimes: + +``` +az webapp list-runtimes +``` + +For each app requiring remediation, run the following command with the appropriate parameters to update the PHP version: + +``` +az webapp config set --resource-group --name [--linux-fx-version ][--php-version ] +``` + +### Using Azure PowerShell + +For each app requiring remediation, run the following command to update the PHP version: + +``` +Set-AzWebApp -ResourceGroupName -Name -phpVersion +``` + +**Note:** Currently, there is no way to update an app's `Linux FX Version` setting using PowerShell. + +## Default Value + +The version is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-common#general-settings +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities +3. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-3-establish-secure-configurations-for-compute-resources +4. https://www.php.net/supported-versions.php +5. https://learn.microsoft.com/en-us/cli/azure/webapp +6. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp +7. https://learn.microsoft.com/en-us/powershell/module/az.websites/set-azwebapp + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.4/SKILL.md new file mode 100644 index 0000000000..bf9b02fec0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.4/SKILL.md @@ -0,0 +1,140 @@ +--- +name: cis-azure-compute-2.1.4 +description: "Ensure 'Basic Authentication Publishing Credentials' are 'Disabled'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, authentication, basic-auth, publishing-credentials, identity] +cis_id: "2.1.4" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Basic Authentication Publishing Credentials' are 'Disabled' + +## Description + +Basic Authentication Publishing Credentials provides the ability to publish -- or deploy to -- an App Service app without a centralized Identity Provider. For a more effective, capable, and secure solution for Identity, Authentication, Authorization, and Accountability, a centralized Identity Provider such as Entra ID is strongly advised. + +## Rationale + +Basic Authentication introduces an identity silo for privileged access to a resource and produces logging which may not provide a full chain of accountability. This can be exploited in numerous ways and represents a significant vulnerability and attack vector. + +## Impact + +Disabling 'Basic Auth Publishing Credentials' will prevent the following deployment methods from working: + +FTP Basic Auth Publishing Credentials: + +- FTP +- FTPS + +SCM Basic Auth Publishing Credentials: + +- Local Git +- GitHub +- Azure Repos +- Bitbucket +- Visual Studio (Version 17.12 and earlier) + +If this recommendation cannot be implemented because one of the above listed deployment methods is necessary and cannot be adapted, compensating controls (e.g. using FTPS Only and disabling only "SCM Basic Auth Publishing Credentials") are recommended to reduce potential attack surface. + +An Identity Provider that can be used by the App Service app for authenticating users is required. + +## Audit Procedure + +### Using Azure Portal + +1. Search for, and open `App Services` from the search bar. +2. For each App Service listed: +3. Click on the App Service name. +4. Under the `Settings` menu item, click on `Configuration` +5. Under the `General settings` tab, scroll down to locate the two Basic Auth settings: + - `SCM Basic Auth Publishing Credentials` + - `FTP Basic Auth Publishing Credentials` + +Both radio buttons should indicate a status of `Off`. +Repeat this procedure for each App Service. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the basic authentication for FTP setting: + +``` +az resource show --resource-group --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/ --query properties.allow +``` + +Ensure that `false` is returned. + +For each app, run the following command to get the basic authentication for SCM setting: + +``` +az resource show --resource-group --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/ --query properties.allow +``` + +Ensure that `false` is returned. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Expected Result + +Both FTP and SCM basic authentication publishing credentials should return `false` (disabled). + +## Remediation + +### Using Azure Portal + +1. Search for, and open `App Services` from the search bar. +2. For each App Service listed: +3. Click on the App Service name. +4. Under the `Settings` menu item, click on `Configuration` +5. Under the `General settings` tab, scroll down to locate the two Basic Auth settings: + - Set the `SCM Basic Auth Publishing Credentials` radio button to `Off` + - Set the `FTP Basic Auth Publishing Credentials` radio button to `Off` + +**CAUTION:** The new settings are not yet applied. Applying them may cause your App Service resource to restart - proceed with caution. Click the `Save` button, then click `Continue` to apply the updated configuration. +Repeat this procedure for each App Service. + +### Using Azure CLI + +For each app requiring remediation, run the following command to disable basic authentication for FTP: + +``` +az resource update --resource-group --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/ --set properties.allow=false +``` + +For each app requiring remediation, run the following command to disable basic authentication for SCM: + +``` +az resource update --resource-group --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/ --set properties.allow=false +``` + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +Basic authentication is disabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-basic-auth-disable +2. https://learn.microsoft.com/en-us/cli/azure/webapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.5/SKILL.md new file mode 100644 index 0000000000..230b2bfabb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.5/SKILL.md @@ -0,0 +1,120 @@ +--- +name: cis-azure-compute-2.1.5 +description: "Ensure 'FTP State' is set to 'FTPS only' or 'Disabled'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, ftp, ftps, encryption, data-in-transit] +cis_id: "2.1.5" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'FTP State' is set to 'FTPS only' or 'Disabled' + +## Description + +By default, App Service supports deployment over FTP. If FTP is essential for a deployment workflow, FTPS should be enforced for all App Service apps. + +If FTPS is not explicitly required, the recommended setting is `Disabled`. + +## Rationale + +FTP is an unencrypted network protocol that transmits data -- including passwords -- in clear text. The use of this protocol can lead to both data and credential compromise and can present opportunities for exfiltration, persistence, and lateral movement. + +## Impact + +Deployment workflows that rely on FTP or FTPS rather than WebDeploy or HTTPS endpoints may be affected. + +## Audit Procedure + +### Using Azure Portal + +1. Go to the Azure Portal +2. Select `App Services` +3. Click on an app +4. Select `Settings` and then `Configuration` +5. Under `General Settings`, for the `Platform Settings`, the `FTP state` should not be set to `All allowed` + +### Using Azure CLI + +List webapps to obtain the ids: + +``` +az webapp list +``` + +List the publish profiles to obtain the username, password, and ftp server url: + +``` +az webapp deployment list-publishing-profiles --ids +``` + +### Using Azure PowerShell + +List all Web Apps: + +``` +Get-AzWebApp +``` + +For each app: + +``` +Get-AzWebApp -ResourceGroupName -Name | Select-Object -ExpandProperty SiteConfig +``` + +In the output, look for the value of **FtpsState**. If its value is **AllAllowed** the setting is out of compliance. Any other value is considered in compliance with this check. + +## Expected Result + +FTP state should be set to `FtpsOnly` or `Disabled`, not `AllAllowed`. + +## Remediation + +### Using Azure Portal + +1. Go to the Azure Portal +2. Select `App Services` +3. Click on an app +4. Select `Settings` and then `Configuration` +5. Under `General Settings`, for the `Platform Settings`, the `FTP state` should be set to `Disabled` or `FTPS Only` + +### Using Azure CLI + +For each out of compliance application, run the following choosing either 'disabled' or 'FtpsOnly' as appropriate: + +``` +az webapp config set --resource-group --name --ftps-state [disabled|FtpsOnly] +``` + +### Using Azure PowerShell + +For each out of compliance application, run the following: + +``` +Set-AzWebApp -ResourceGroupName -Name -FtpsState +``` + +## Default Value + +By default, FTP state is set to `FTPS only`. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/deploy-ftp +2. https://learn.microsoft.com/en-us/azure/app-service/overview-security +3. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-4-encrypt-sensitive-information-in-transit +4. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities +5. https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/create-or-update-configuration#ftpsstate +6. https://learn.microsoft.com/en-us/cli/azure/webapp +7. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp +8. https://learn.microsoft.com/en-us/powershell/module/az.websites/set-azwebapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.6/SKILL.md new file mode 100644 index 0000000000..7b3bddd7b1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.6/SKILL.md @@ -0,0 +1,125 @@ +--- +name: cis-azure-compute-2.1.6 +description: "Ensure 'HTTP version' is set to '2.0' (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, http, http2, protocol-version] +cis_id: "2.1.6" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'HTTP version' is set to '2.0' (if in use) + +## Description + +Periodically, newer versions are released for HTTP, either due to security flaws or to include additional functionalities. Using the latest HTTP version allows apps to take advantage of security fixes, if any, and/or new functionalities of the newer version. + +## Rationale + +Newer versions may contain security enhancements and additional functionalities. Using the latest version is recommended in order to take advantage of enhancements and new capabilities. With each software installation, organizations need to determine if a given update meets their requirements. They must also verify the compatibility and support provided for any additional software against the update revision that is selected. + +HTTP 2.0 has additional performance improvements for the head-of-line blocking problem of the old HTTP version, header compression, and request prioritization. HTTP 2.0 no longer supports HTTP 1.1's chunked transfer encoding mechanism, as it provides its own, more efficient mechanisms for data streaming. + +## Impact + +Most modern browsers support the HTTP/2 protocol over TLS only, while non-encrypted traffic continues to use HTTP/1.1. To ensure that client browsers connect to your app with HTTP/2, either purchase an App Service Certificate for your app's custom domain or bind a third-party certificate. + +**NOTE:** HTTP/2 cannot be used in tandem with mutual authentication or client certificates. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, ensure that `HTTP version` is set to `2.0`. +5. Repeat steps 1-4 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the `http20Enabled` setting: + +``` +az webapp config show --resource-group --name --query http20Enabled +``` + +Ensure that `true` is returned. + +### Using Azure PowerShell + +Run the following command to list apps: + +``` +Get-AzWebApp +``` + +Run the following command to get the app in a resource group with a given name: + +``` +$app = Get-AzWebApp -ResourceGroupName -Name +``` + +Run the following command to get the `Http20Enabled` setting: + +``` +$app.SiteConfig.Http20Enabled +``` + +Ensure that `True` is returned. Repeat for each app. + +## Expected Result + +The `http20Enabled` setting should return `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, set `HTTP version` to `2.0`. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each app requiring remediation. + +### Using Azure CLI + +For each app requiring remediation, run the following command to enable `http20Enabled`: + +``` +az webapp config set --resource-group --name --http20-enabled true +``` + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +By default, `HTTP version` is set to `1.1`. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-common#general-settings +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-3-define-and-establish-secure-configurations-for-compute-resources +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-6-rapidly-and-automatically-remediate-vulnerabilities +4. https://learn.microsoft.com/en-us/cli/azure/webapp +5. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.7/SKILL.md new file mode 100644 index 0000000000..068d25cf04 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.7/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-azure-compute-2.1.7 +description: "Ensure 'HTTPS Only' is set to 'On'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, https, tls, encryption, data-in-transit] +cis_id: "2.1.7" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'HTTPS Only' is set to 'On' + +## Description + +Azure App Service allows apps to run under both HTTP and HTTPS by default. Apps can be accessed by anyone using non-secure HTTP links by default. Non-secure HTTP requests can be restricted and all HTTP requests redirected to the secure HTTPS port. It is recommended to enforce HTTPS-only traffic. + +## Rationale + +Enabling HTTPS-only traffic will redirect all non-secure HTTP requests to HTTPS ports. HTTPS uses the TLS/SSL protocol to provide a secure connection which is both encrypted and authenticated. It is therefore important to support HTTPS for the security benefits. + +## Impact + +When it is enabled, every incoming HTTP request is redirected to the HTTPS port. This means an extra level of security will be added to the HTTP requests made to the app. + +## Audit Procedure + +### Using Azure Portal + +1. Login to Azure Portal using https://portal.azure.com +2. Go to `App Services` +3. For each App Service +4. Under `Setting` section, click on `Configuration` +5. Under the `General Settings` tab, ensure that `HTTPS Only` is set to `On` under `Platform Settings` + +### Using Azure CLI + +To check HTTPS-only traffic value for an existing app, run the following command: + +``` +az webapp show --resource-group --name --query httpsOnly +``` + +The output should return `true` if HTTPS-only traffic value is set to `On`. + +### Using Azure PowerShell + +List all the web apps configured within the subscription: + +``` +Get-AzWebApp | Select-Object ResourceGroup, Name, HttpsOnly +``` + +For each web app review the `HttpsOnly` setting and make sure it is set to `True`. + +## Expected Result + +The `httpsOnly` setting should return `true`. + +## Remediation + +### Using Azure Portal + +1. Login to Azure Portal using https://portal.azure.com +2. Go to `App Services` +3. For each App Service +4. Under `Setting` section, click on `Configuration` +5. Under the `General Settings` tab, set `HTTPS Only` to `On` under `Platform Settings` + +### Using Azure CLI + +To set HTTPS-only traffic value for an existing app, run the following command: + +``` +az webapp update --resource-group --name --set httpsOnly=true +``` + +### Using Azure PowerShell + +``` +Set-AzWebApp -ResourceGroupName -Name -HttpsOnly $true +``` + +## Default Value + +`HTTPS Only` is disabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-security#https-and-certificates +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-3-encrypt-sensitive-data-in-transit +3. https://techcommunity.microsoft.com/t5/azure-paas-blog/enable-https-setting-on-azure-app-service-using-azure-policy/ba-p/3286603 +4. https://learn.microsoft.com/en-us/cli/azure/webapp +5. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp +6. https://learn.microsoft.com/en-us/powershell/module/az.websites/set-azwebapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.8/SKILL.md new file mode 100644 index 0000000000..69362ee9d3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.8/SKILL.md @@ -0,0 +1,127 @@ +--- +name: cis-azure-compute-2.1.8 +description: "Ensure 'Minimum Inbound TLS Version' is set to '1.2' or higher" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, tls, encryption, minimum-tls-version, data-in-transit] +cis_id: "2.1.8" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Minimum Inbound TLS Version' is set to '1.2' or higher + +## Description + +The TLS (Transport Layer Security) protocol secures the transmission of data over the internet using standard encryption technology. App Service apps use TLS 1.2 for the `Minimum Inbound TLS Version` by default and allow for the use of TLS versions 1.0, 1.1, and 1.3. NIST strongly suggests the use of TLS 1.2 and recommends the adoption of TLS 1.3. + +## Rationale + +TLS 1.0 and 1.1 are outdated and vulnerable to security risks. Since TLS 1.2 and TLS 1.3 provide enhanced security and improved performance, it is highly recommended to use TLS 1.2 or higher whenever possible. + +## Impact + +Using the latest TLS version may affect compatibility with clients and backend services. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, ensure that `Minimum Inbound TLS Version` is set to `1.2` or higher. +5. Repeat steps 1-4 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the TLS version setting: + +``` +az webapp config show --resource-group --name --query minTlsVersion +``` + +Ensure that `"1.2"` or higher is returned. + +### Using Azure PowerShell + +Run the following command to list apps: + +``` +Get-AzWebApp +``` + +Run the following command to get the app in a resource group with a given name: + +``` +$app = Get-AzWebApp -ResourceGroupName -Name +``` + +Run the following command to get the TLS version setting: + +``` +$app.SiteConfig.MinTlsVersion +``` + +Ensure that the command returns `1.2` or higher. Repeat for each app. + +## Expected Result + +The minimum TLS version should be `1.2` or higher. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, click the drop-down next to `Minimum Inbound TLS Version` and select `1.2` or higher. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each app requiring remediation. + +### Using Azure CLI + +For each app requiring remediation, run the following command to update the TLS version: + +``` +az webapp config set --resource-group --name --min-tls-version <1.2|1.3> +``` + +### Using Azure PowerShell + +For each app requiring remediation, run the following command to update the TLS version: + +``` +Set-AzWebApp -ResourceGroupName -Name -MinTlsVersion <1.2|1.3> +``` + +## Default Value + +By default, TLS version is set to 1.2. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-bindings#how-can-i-change-the-minimum-tls-versions-for-the-app +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-8-detect-and-disable-insecure-services-and-protocols +4. https://learn.microsoft.com/en-us/cli/azure/webapp +5. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp +6. https://learn.microsoft.com/en-us/powershell/module/az.websites/set-azwebapp +7. https://csrc.nist.gov/news/2019/nist-publishes-sp-800-52-revision-2 + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.9/SKILL.md new file mode 100644 index 0000000000..aa0de7e3a6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.1.9/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-azure-compute-2.1.9 +description: "Ensure end-to-end TLS encryption is enabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, tls, e2e-encryption, data-in-transit] +cis_id: "2.1.9" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure end-to-end TLS encryption is enabled + +## Description + +End-to-end (E2E) TLS encryption ensures that front-end to worker communication within App Service apps is encrypted using TLS. Without this feature, while incoming HTTPS requests are encrypted to the front ends, the traffic from front ends to workers running the application workloads would travel unencrypted inside Azure's infrastructure. + +## Rationale + +E2E TLS helps ensure full encryption of traffic between: + +- Clients and front ends +- Front ends and worker processes hosting the application + +## Impact + +Enabling end-to-end TLS encryption may introduce minimal latency and require additional configuration of certificates and HTTPS settings to ensure compatibility. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, ensure that `Enable end-to-end TLS encryption` is set to `On`. +5. Repeat steps 1-4 for each app. + +### Using Azure CLI + +Run the following command to list apps: + +``` +az webapp list +``` + +For each app, run the following command to get the end-to-end TLS encryption setting: + +``` +az webapp show --resource-group --name --query endToEndEncryptionEnabled +``` + +Ensure that the command returns `true`. + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Expected Result + +The `endToEndEncryptionEnabled` setting should return `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, next to `Enable end-to-end TLS encryption`, click the radio button next to `On`. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each app requiring remediation. + +### Using Azure CLI + +For each app requiring remediation, run the following command to enable end-to-end TLS encryption: + +``` +az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.endToEndEncryptionEnabled=true +``` + +### Using Azure PowerShell + +Not specifically documented for this control. + +## Default Value + +By default, end-to-end TLS encryption is disabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-tls#end-to-end-tls-encryption +2. https://learn.microsoft.com/en-us/cli/azure/webapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.10/SKILL.md new file mode 100644 index 0000000000..dea8b294ea --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.10/SKILL.md @@ -0,0 +1,102 @@ +--- +name: cis-azure-compute-2.10 +description: "Ensure App Service Environment has TLS cipher suite ordering configured" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service-environment, ase] +cis_id: "2.10" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure App Service Environment has TLS cipher suite ordering configured + +## Description + +App Service Environment supports changing the cipher suite from the default. The default set of ciphers is the same set that is used in the multi-tenant App Service. Changing the cipher suite is only possible with App Service Environment, the single-tenant offering, not the multi-tenant offering, because changing it affects the entire App Service deployment. + +There are two cipher suites that are required for an App Service Environment: `TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384` and `TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256`. Additionally, you should include the following cipher suites, which are required for TLS 1.3: `TLS_AES_256_GCM_SHA384` and `TLS_AES_128_GCM_SHA256`. + +## Rationale + +Configuring your App Service Environment to use only the ciphers it requires helps to keep the environment secure. + +## Impact + +If incorrect values are set for the cipher suite that SChannel cannot understand, all TLS communication to your server might stop functioning. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Resource Explorer`. +2. Locate an App Service Environment from the left pane. +3. Ensure the `clusterSettings` attribute includes: + +```json +{ + "name": "FrontEndSSLCipherSuiteOrder", + "value": "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" +} +``` + +4. Repeat steps 1-3 for each App Service Environment. + +### Using Azure CLI + +Run the following command to list App Service Environments: + +```bash +az appservice ase list +``` + +For each App Service Environment, ensure that `clusterSettings` includes: + +```json +{ + "name": "FrontEndSSLCipherSuiteOrder", + "value": "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" +} +``` + +## Expected Result + +The `clusterSettings` should include a `FrontEndSSLCipherSuiteOrder` entry with the appropriate strong cipher suites listed. + +## Remediation + +### Using Azure Portal + +1. Go to `Resource Explorer`. +2. Locate an App Service Environment from the left pane. +3. In the right pane, click `Read/Write` to allow editing. +4. Click `Edit` to edit the resource. +5. Update the `clusterSettings` attribute to include: + +```json +{ + "name": "FrontEndSSLCipherSuiteOrder", + "value": "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" +} +``` + +6. Click `PUT` to commit the change. +7. Repeat steps 1-7 for each App Service Environment requiring remediation. + +## Default Value + +TLS cipher suite ordering is not configured by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/environment/app-service-app-service-environment-custom-settings +2. https://learn.microsoft.com/en-us/cli/azure/appservice/ase + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.1/SKILL.md new file mode 100644 index 0000000000..9d8199ec66 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.1/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-azure-compute-2.2.1 +description: "Ensure 'Java version' is currently supported (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, java, runtime-version, software-support] +cis_id: "2.2.1" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Java version' is currently supported (if in use) + +## Description + +Periodically, older versions of Java may be deprecated and no longer supported. Using a supported version of Java for App Service deployment slots is recommended to avoid potential unpatched vulnerabilities. + +## Rationale + +Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable. + +## Impact + +If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly. + +## Audit Procedure + +Take note of currently supported versions of Java here: +https://www.oracle.com/java/technologies/java-se-support-roadmap.html + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, ensure that for a `Stack` of `Java`, the `Major version` reflects a currently supported release, and that the `Java web server version` is set to the `auto-update` option. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the Java version: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.[javaContainer,javaContainerVersion,javaVersion,linuxFxVersion,windowsFxVersion] +``` + +If Java is in use, ensure the version is currently supported. + +## Expected Result + +The Java version configured for the deployment slot should be a currently supported release as listed on the Oracle Java SE Support Roadmap. The `Java web server version` should be set to `auto-update`. + +## Remediation + +**Note:** No action is required if Java is not in use. + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, for a `Stack` of `Java`, set the `Major version` to a currently supported release, and set the `Java web server version` to the `auto-update` option. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +Run the following command to list supported runtimes: + +```bash +az webapp list-runtimes +``` + +For each deployment slot requiring remediation, run the following command with the appropriate parameters to update the Java version: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.[javaContainer|javaContainerVersion|javaVersion|linuxFxVersion|windowsFxVersion]="" +``` + +## Default Value + +The version is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-language-java-deploy-run +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-3-define-and-establish-secure-configurations-for-compute-resources +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-6-rapidly-and-automatically-remediate-vulnerabilities +4. https://www.oracle.com/java/technologies/java-se-support-roadmap.html +5. https://learn.microsoft.com/en-us/cli/azure/webapp +6. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.10/SKILL.md new file mode 100644 index 0000000000..95ece5d032 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.10/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-azure-compute-2.2.10 +description: "Ensure 'Remote debugging' is set to 'Off'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, remote-debugging, attack-surface, security-hardening] +cis_id: "2.2.10" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Remote debugging' is set to 'Off' + +## Description + +Remote debugging allows an App Service deployment slot to be debugged in real-time directly in the Azure environment. When remote debugging is enabled, it opens a communication channel that could potentially be exploited by unauthorized users if not properly secured. + +## Rationale + +Disabling remote debugging on an App Service deployment slot is primarily about enhancing security. + +Remote debugging opens a communication channel that can be exploited by attackers. By disabling it, you reduce the number of potential entry points for unauthorized access. + +If remote debugging is enabled without proper access controls, it can allow unauthorized users to connect to your deployment slot, potentially leading to data breaches or malicious code execution. + +During a remote debugging session, sensitive information might be exposed. Disabling remote debugging helps ensure that such data remains secure. This minimizes the use of remote access tools to reduce risk. + +## Impact + +You will not be able to connect to your deployment slot from a remote location to diagnose and fix issues in real-time. You will not be able to step through code, set breakpoints, or inspect variables and the call stack while the deployment slot is running on the server. Remote debugging is particularly useful for diagnosing issues that only occur in the production environment. Without it, you will need to rely on logs and other diagnostic tools. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Debugging`, ensure that `Remote debugging` is set to `Off`. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the remote debugging setting: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.remoteDebuggingEnabled +``` + +Ensure that `false` is returned. + +## Expected Result + +The `remoteDebuggingEnabled` property should return `false`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Debugging`, set `Remote debugging` to `Off`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to disable remote debugging: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.remoteDebuggingEnabled=false +``` + +## Default Value + +By default, remote debugging is set to `off`. + +## References + +1. https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-azure-app-service +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-2-audit-and-enforce-secure-configurations +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.11/SKILL.md new file mode 100644 index 0000000000..23e5e28d08 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.11/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-azure-compute-2.2.11 +description: "Ensure incoming client certificates are enabled and required (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, client-certificates, mutual-tls, authentication] +cis_id: "2.2.11" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure incoming client certificates are enabled and required (if in use) + +## Description + +Client certificates allow for the deployment slot to request a certificate for incoming requests. Only clients that have a valid certificate will be able to reach the deployment slot. + +## Rationale + +The TLS mutual authentication technique in enterprise environments ensures the authenticity of clients to the server. If incoming client certificates are enabled, then only an authenticated client with valid certificates can access the deployment slot. + +## Impact + +Utilizing and maintaining client certificates will require additional work to obtain and manage replacement and key rotation. + +**NOTE:** This recommendation cannot be implemented if following the recommendation titled "Ensure 'HTTP Version' is set to '2.0' (if in use)." This recommendation should only be considered for scenarios where HTTP versions prior to 2.0 are required for a deployment slot, and mutual certificate authentication is desired for validating clients. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Incoming client certificates`, ensure that `Client certificate mode` is set to `Required`. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `clientCertEnabled` is set to `true`, and `clientCertMode` is set to `Required`. + +## Expected Result + +The `clientCertEnabled` property should be `true` and `clientCertMode` should be `Required`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Incoming client certificates`, set `Client certificate mode` to `Required`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to enable and require incoming client certificates: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.clientCertEnabled=true --set properties.clientCertMode=Required +``` + +## Default Value + +By default, incoming client certificates are disabled. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-identity-management#im-4-authenticate-server-and-services +2. https://learn.microsoft.com/en-gb/azure/app-service/app-service-web-configure-tls-mutual-auth +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.12/SKILL.md new file mode 100644 index 0000000000..7e264e96fb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.12/SKILL.md @@ -0,0 +1,134 @@ +--- +name: cis-azure-compute-2.2.12 +description: "Ensure managed identities are configured" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, managed-identity, entra-id, credential-management] +cis_id: "2.2.12" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure managed identities are configured + +## Description + +Managed identities from Microsoft Entra ID allow App Service deployment slots to securely access other Azure services without the need to provision or rotate any secrets. + +## Rationale + +Using managed identities with App Service deployment slots eliminates the need to store and manage credentials to access Azure resources. + +## Impact + +Minor administrative overhead to configure and manage role assignments for managed identities. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Identity`. +6. Ensure that in the `System assigned` pane, the `Status` is set to `On`, and an `Object (principal) ID` is displayed, or that in the `User assigned` pane, a managed identity is listed. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `identity` contains `type` set to `SystemAssigned`, `UserAssigned`, or both. + +### Using Azure PowerShell + +Run the following command to list apps: + +```powershell +Get-AzWebApp +``` + +Run the following command to list deployment slots for an app: + +```powershell +Get-AzWebAppSlot -ResourceGroupName -Name +``` + +Run the following command to get the deployment slot with a given name: + +```powershell +$slot = Get-AzWebAppSlot -ResourceGroupName -Name -Slot +``` + +Run the following command to get the identity type setting for the deployment slot: + +```powershell +$slot.identity.Type +``` + +Ensure the command returns `SystemAssigned`, `UserAssigned`, or both. Repeat for each app and deployment slot. + +## Expected Result + +The `identity.Type` property should return `SystemAssigned`, `UserAssigned`, or `SystemAssigned, UserAssigned`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Identity`. +6. To add a system assigned managed identity: + 1. In the `System assigned` pane, under `Status`, click `On`. + 2. Click `Save`. + 3. Click `Yes`. +7. To add a user assigned managed identity: + 1. In the `User assigned` pane, click `Add`. + 2. Use the filter box to search for a managed identity. + 3. Select the identity. + 4. Click `Add`. +8. Repeat steps 1-7 for each app and deployment slot requiring remediation. + +### Using Azure PowerShell + +For each deployment slot requiring remediation, run the following command to assign a system-assigned managed identity: + +```powershell +Set-AzWebAppSlot -ResourceGroupName -Name -Slot -AssignIdentity $true +``` + +## Default Value + +Managed identities are disabled by default for App Service deployment slots. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-1-use-centralized-identity-and-authentication-system +2. https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebapp +5. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebappslot +6. https://learn.microsoft.com/en-us/powershell/module/az.websites/set-azwebappslot + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.13/SKILL.md new file mode 100644 index 0000000000..39a696ee19 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.13/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-azure-compute-2.2.13 +description: "Ensure public network access is disabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, public-network-access, network-security, private-endpoints] +cis_id: "2.2.13" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure public network access is disabled + +## Description + +Disable public network access to prevent exposure to the internet and reduce the risk of unauthorized access. Use private endpoints to securely manage access within trusted networks. + +## Rationale + +Disabling public network access improves security by ensuring that the service is not directly exposed to the public Internet. This has the added benefit of providing more granular control over security settings and configurations for those additional layers of separation. + +## Impact + +**NOTE:** Prior to disabling public network access, it is strongly recommended that, for each App Service deployment slot, either: + +- complete virtual network integration as described in **"Ensure app is integrated with a virtual network"** + +OR + +- set up private endpoints/links as described in **"Ensure private endpoints are used to access App Service apps."** + +Disabling public network access restricts direct access to the service. This enhances security but will require the configuration of a virtual network and/or private endpoints for any services or users needing access within trusted networks. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Inbound traffic configuration`, ensure that `Public network access` is set to `Disabled`. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `publicNetworkAccess` is set to `Disabled`. + +## Expected Result + +The `publicNetworkAccess` property should be set to `Disabled`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Inbound traffic configuration`, click the text next to `Public network access`. +7. Select the radio button next to `Disabled`. +8. Click `Save`. +9. Check the box to confirm the change. +10. Click `Continue`. +11. Repeat steps 1-10 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to disable public network access: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.publicNetworkAccess=Disabled +``` + +## Default Value + +By default, public network access is enabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/networking-features +2. https://learn.microsoft.com/en-us/cli/azure/webapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.14/SKILL.md new file mode 100644 index 0000000000..75eaf87880 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.14/SKILL.md @@ -0,0 +1,91 @@ +--- +name: cis-azure-compute-2.2.14 +description: "Ensure deployment slot is integrated with a virtual network" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, vnet-integration, network-security, virtual-network] +cis_id: "2.2.14" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure deployment slot is integrated with a virtual network + +## Description + +Integrate App Service deployment slots with a virtual network to enable access to resources in or through a non-internet-routable virtual network. + +## Rationale + +Integrate App Service deployment slots with a virtual network for increased security and control. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Outbound traffic configuration`, next to `Virtual network integration`, ensure that a virtual network and subnet name are displayed. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `virtualNetworkSubnetId` is set to a virtual network subnet ID. + +## Expected Result + +The `virtualNetworkSubnetId` property should contain a valid virtual network subnet resource ID (not null or empty). + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Outbound traffic configuration`, next to `Virtual network integration`, click `Not configured`. +7. Click `Add virtual network integration`. +8. Select an existing App Service Plan connection, or select `New connection` and select a subscription, virtual network, and subnet. +9. Click `Connect`. +10. Repeat steps 1-9 for each app and deployment slot requiring remediation. + +## Default Value + +By default, virtual network integration is not configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration +2. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-enable +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/cli/azure/webapp/deployment/slot + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.15/SKILL.md new file mode 100644 index 0000000000..03f018f1a8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.15/SKILL.md @@ -0,0 +1,82 @@ +--- +name: cis-azure-compute-2.2.15 +description: "Ensure configuration is routed through the virtual network integration" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, vnet-integration, configuration-routing, network-security] +cis_id: "2.2.15" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure configuration is routed through the virtual network integration + +## Description + +By default, configuration traffic for App Service deployment slots goes directly over the public route. Container image pulls and content sharing can be routed through the virtual network integration. + +This recommendation should be applied after integrating an App Service deployment slot with a virtual network. + +## Rationale + +Route container image pulls and content sharing through a virtual network integration for increased security and control. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `vnetImagePullEnabled` and `vnetContentShareEnabled` are set to `true`. + +## Expected Result + +Both `vnetImagePullEnabled` and `vnetContentShareEnabled` properties should be set to `true`. + +## Remediation + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to route container image pulls and content sharing through the virtual network integration: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.vnetImagePullEnabled=true --set properties.vnetContentShareEnabled=true +``` + +## Default Value + +By default, configuration traffic goes directly over the public route. + +## Additional Information + +In addition to configuring the routing for content sharing, you must also ensure that any firewall or Network Security Group configured on traffic from the subnet allow traffic to port 443 and 445. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration#routes +2. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-routing#configure-configuration-routing +3. https://learn.microsoft.com/en-us/cli/azure/webapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.16/SKILL.md new file mode 100644 index 0000000000..dd151093a0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.16/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-azure-compute-2.2.16 +description: "Ensure all traffic is routed through the virtual network" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, vnet-integration, outbound-traffic, network-routing] +cis_id: "2.2.16" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure all traffic is routed through the virtual network + +## Description + +Enable `vnetRouteAllEnabled` to ensure all outbound traffic is routed through the integrated virtual network. + +This recommendation should be applied after integrating an App Service deployment slot with a virtual network. + +## Rationale + +Routing all outbound traffic through the virtual network enhances security. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Outbound traffic configuration`, next to `Virtual network integration`, click the virtual network and subnet name. +7. Under `Application routing`, ensure that the box next to `Outbound internet traffic` is checked. +8. Repeat steps 1-7 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `vnetRouteAllEnabled` is set to `true`. + +## Expected Result + +The `vnetRouteAllEnabled` property should be set to `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Outbound traffic configuration`, next to `Virtual network integration`, click the virtual network and subnet name. +7. Under `Application routing`, check the box next to `Outbound internet traffic`. +8. Click `Apply`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to route all traffic through the virtual network: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.vnetRouteAllEnabled=true +``` + +## Default Value + +For deployment slots integrated with a virtual network, all traffic is routed through the virtual network by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-routing#configure-application-routing +2. https://learn.microsoft.com/en-us/cli/azure/webapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.17/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.17/SKILL.md new file mode 100644 index 0000000000..c77a23f6fb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.17/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-azure-compute-2.2.17 +description: "Ensure cross-origin resource sharing does not allow all origins" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, cors, cross-origin, web-security, csrf] +cis_id: "2.2.17" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure cross-origin resource sharing does not allow all origins + +## Description + +Cross-origin resource sharing (CORS) is a security feature that controls how applications interact with resources hosted on different domains. + +## Rationale + +Restrict CORS to only trusted origins to help enforce proper access control and reduce exposure to malicious cross-origin requests. + +## Impact + +Configuration is required to ensure that the appropriate origins have access. + +Setting up a proper CORS policy can be fairly complex and an incorrect setting could permit Cross-Site Request Forgery (CSRF). The "caveat" is that if the app being deployed is a PUBLIC API, a wildcard "\*" CORS policy is absolutely necessary. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Service`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `API`, click `CORS`. +6. Ensure `Allowed Origins` does not include `*`. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the CORS allowed origins setting: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.cors.allowedOrigins +``` + +Ensure that the response does not include `*`. + +## Expected Result + +The `cors.allowedOrigins` property should not contain the wildcard `*`. It should either be empty/not configured or contain only specific trusted origin URLs. + +## Remediation + +### Using Azure Portal + +1. Go to `App Service`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `API`, click `CORS`. +6. Under `Allowed Origins`, delete the entry that equals `*`. +7. Specify the origins that should be allowed to make cross-origin calls. +8. Click `Save`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to update the allowed origins array to contain only the origins that should be allowed: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.cors.allowedOrigins="['']" +``` + +## Default Value + +By default, CORS is not configured. + +## References + +1. https://learn.microsoft.com/en-gb/azure/app-service/app-service-web-tutorial-rest-api +2. https://learn.microsoft.com/en-us/cli/azure/webapp +3. https://learn.microsoft.com/en-us/cli/azure/resource +4. https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html +5. https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS +6. https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.2/SKILL.md new file mode 100644 index 0000000000..2be53bf4e0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.2/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-azure-compute-2.2.2 +description: "Ensure 'Python version' is currently supported (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, python, runtime-version, software-support] +cis_id: "2.2.2" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Python version' is currently supported (if in use) + +## Description + +Periodically, older versions of Python may be deprecated and no longer supported. Using a supported version of Python for App Service deployment slots is recommended to avoid potential unpatched vulnerabilities. + +## Rationale + +Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable. + +## Impact + +If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly. + +## Audit Procedure + +Take note of the currently supported versions (given a status of "security") of Python here: +https://devguide.python.org/versions/ + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, ensure that for a `Stack` of `Python`, the `Major version` and `Minor version` reflect a currently supported release. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the Python version: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.[linuxFxVersion,pythonVersion,windowsFxVersion] +``` + +If Python is in use, ensure the version is currently supported. + +## Expected Result + +The Python version configured for the deployment slot should be a currently supported release as listed on the Python Developer's Guide versions page with a status of "security" or higher. + +## Remediation + +**Note:** No action is required if Python is not in use. + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, for a `Stack` of `Python`, set the `Major version` and `Minor version` to a currently supported release. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +Run the following command to list supported runtimes: + +```bash +az webapp list-runtimes +``` + +For each deployment slot requiring remediation, run the following command with the appropriate parameters to update the Python version: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.[linuxFxVersion|windowsFxVersion]="PYTHON|" +``` + +## Default Value + +The version is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-common#configure-language-stack-settings +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities +3. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-3-establish-secure-configurations-for-compute-resources +4. https://devguide.python.org/versions/ +5. https://learn.microsoft.com/en-us/cli/azure/webapp +6. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.3/SKILL.md new file mode 100644 index 0000000000..9aecd84502 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.3/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-azure-compute-2.2.3 +description: "Ensure 'PHP version' is currently supported (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, php, runtime-version, software-support] +cis_id: "2.2.3" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'PHP version' is currently supported (if in use) + +## Description + +Periodically, older versions of PHP may be deprecated and no longer supported. Using a supported version of PHP for App Service deployment slots is recommended to avoid potential unpatched vulnerabilities. + +## Rationale + +Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable. + +## Impact + +If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly. + +## Audit Procedure + +Take note of the currently supported versions of PHP here: +https://www.php.net/supported-versions.php + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, ensure that for a `Stack` of `PHP`, the `Major version` and `Minor version` reflect a currently supported release. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the PHP version: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.[linuxFxVersion,phpVersion] +``` + +If PHP is in use, ensure the version is currently supported. + +## Expected Result + +The PHP version configured for the deployment slot should be a currently supported release as listed on the PHP Supported Versions page. + +## Remediation + +**Note:** No action is required if PHP is not in use. + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, for a `Stack` of `PHP`, set the `Major version` and `Minor version` to a currently supported release. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +Run the following command to list supported runtimes: + +```bash +az webapp list-runtimes +``` + +For each deployment slot requiring remediation, run the following command with the appropriate parameters to update the PHP version: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.[linuxFxVersion|phpVersion]="" +``` + +## Default Value + +The version is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-common#general-settings +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities +3. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-3-establish-secure-configurations-for-compute-resources +4. https://www.php.net/supported-versions.php +5. https://learn.microsoft.com/en-us/cli/azure/webapp +6. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.4/SKILL.md new file mode 100644 index 0000000000..a46064f660 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.4/SKILL.md @@ -0,0 +1,136 @@ +--- +name: cis-azure-compute-2.2.4 +description: "Ensure 'Basic Authentication Publishing Credentials' are 'Disabled'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, basic-auth, authentication, publishing-credentials] +cis_id: "2.2.4" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Basic Authentication Publishing Credentials' are 'Disabled' + +## Description + +Basic Authentication Publishing Credentials provides the ability to publish -- or deploy to -- an App Service deployment slot without a centralized Identity Provider. For a more effective, capable, and secure solution for Identity, Authentication, Authorization, and Accountability, a centralized Identity Provider such as Entra ID is strongly advised. + +## Rationale + +Basic Authentication introduces an identity silo for privileged access to a resource and produces logging which may not provide a full chain of accountability. This can be exploited in numerous ways and represents a significant vulnerability and attack vector. + +## Impact + +Disabling 'Basic Auth Publishing Credentials' will prevent the following deployment methods from working: + +FTP Basic Auth Publishing Credentials: + +- FTP +- FTPS + +SCM Basic Auth Publishing Credentials: + +- Local Git +- GitHub +- Azure Repos +- Bitbucket +- Visual Studio (Version 17.12 and earlier) + +If this recommendation cannot be implemented because one of the above listed deployment methods is necessary and cannot be adapted, compensating controls (e.g. using FTPS Only and disabling only "SCM Basic Auth Publishing Credentials") are recommended to reduce potential attack surface. + +An Identity Provider that can be used by the App Service deployment slot for authenticating users is required. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` tab, under `Platform settings`, ensure that `SCM Basic Auth Publishing Credentials` and `FTP Basic Auth Publishing Credentials` are set to `Off`. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the basic authentication for FTP setting: + +```bash +az resource show --resource-group --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites//slots/ --query properties.allow +``` + +Ensure that `false` is returned. + +For each deployment slot, run the following command to get the basic authentication for SCM setting: + +```bash +az resource show --resource-group --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites//slots/ --query properties.allow +``` + +Ensure that `false` is returned. + +## Expected Result + +Both `SCM Basic Auth Publishing Credentials` and `FTP Basic Auth Publishing Credentials` should return `false`, indicating they are disabled. + +## Remediation + +**CAUTION:** Applying changes may cause your App Service resource to restart. + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` tab, under `Platform settings`, set `SCM Basic Auth Publishing Credentials` and `FTP Basic Auth Publishing Credentials` to `Off`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to disable basic authentication for FTP: + +```bash +az resource update --resource-group --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites//slots/ --set properties.allow=false +``` + +For each deployment slot requiring remediation, run the following command to disable basic authentication for SCM: + +```bash +az resource update --resource-group --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites//slots/ --set properties.allow=false +``` + +## Default Value + +Basic authentication is enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-basic-auth-disable +2. https://learn.microsoft.com/en-us/cli/azure/webapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.5/SKILL.md new file mode 100644 index 0000000000..47aa1dca75 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.5/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-azure-compute-2.2.5 +description: "Ensure 'FTP state' is set to 'FTPS only' or 'Disabled'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, ftp, ftps, encryption, data-in-transit] +cis_id: "2.2.5" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'FTP state' is set to 'FTPS only' or 'Disabled' + +## Description + +By default, App Service supports deployment over FTP. If FTP is essential for a deployment workflow, FTPS should be enforced for all App Service deployment slots. + +If FTPS is not explicitly required, the recommended setting is `Disabled`. + +## Rationale + +FTP is an unencrypted network protocol that transmits data -- including passwords -- in clear text. The use of this protocol can lead to both data and credential compromise and can present opportunities for exfiltration, persistence, and lateral movement. + +## Impact + +Deployment workflows that rely on FTP or FTPS rather than WebDeploy or HTTPS endpoints may be affected. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment Slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, ensure that `FTP state` is set to `FTPS only` or `Disabled`. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the FTPS state setting: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.ftpsState +``` + +Ensure that `"FtpsOnly"` or `"Disabled"` is returned. + +## Expected Result + +The `ftpsState` property should return `"FtpsOnly"` or `"Disabled"`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment Slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, set `FTP state` to `FTPS only` or `Disabled`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to set FTPS state to `FtpsOnly` or `Disabled`: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.ftpsState= +``` + +## Default Value + +By default, FTP state is set to `FTPS only`. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/deploy-ftp +2. https://learn.microsoft.com/en-us/azure/app-service/overview-security +3. https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/create-or-update-configuration#ftpsstate +4. https://learn.microsoft.com/en-us/cli/azure/webapp +5. https://learn.microsoft.com/en-us/cli/azure/resource +6. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-4-encrypt-sensitive-information-in-transit +7. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.6/SKILL.md new file mode 100644 index 0000000000..4e98aaf380 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.6/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-azure-compute-2.2.6 +description: "Ensure 'HTTP version' is set to '2.0' (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, http, http2, protocol-version] +cis_id: "2.2.6" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'HTTP version' is set to '2.0' (if in use) + +## Description + +Periodically, newer versions are released for HTTP, either due to security flaws or to include additional functionalities. Using the latest HTTP version allows apps to take advantage of security fixes, if any, and/or new functionalities of the newer version. + +## Rationale + +Newer versions may contain security enhancements and additional functionalities. Using the latest version is recommended in order to take advantage of enhancements and new capabilities. With each software installation, organizations need to determine if a given update meets their requirements. They must also verify the compatibility and support provided for any additional software against the update revision that is selected. + +HTTP 2.0 has additional performance improvements for the head-of-line blocking problem of the old HTTP version, header compression, and request prioritization. HTTP 2.0 no longer supports HTTP 1.1's chunked transfer encoding mechanism, as it provides its own, more efficient mechanisms for data streaming. + +## Impact + +Most modern browsers support the HTTP/2 protocol over TLS only, while non-encrypted traffic continues to use HTTP/1.1. To ensure that client browsers connect to your app with HTTP/2, either purchase an App Service Certificate for your app's custom domain or bind a third-party certificate. + +**NOTE:** HTTP/2 cannot be used in tandem with mutual authentication or client certificates. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, ensure that `HTTP version` is set to `2.0`. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the `http20Enabled` setting: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.http20Enabled +``` + +Ensure that `true` is returned. + +## Expected Result + +The `http20Enabled` property should return `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, set `HTTP version` to `2.0`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to enable `http20Enabled`: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.http20Enabled=true +``` + +## Default Value + +By default, `HTTP version` is set to `1.1`. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-common#general-settings +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-3-define-and-establish-secure-configurations-for-compute-resources +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-6-rapidly-and-automatically-remediate-vulnerabilities +4. https://learn.microsoft.com/en-us/cli/azure/webapp +5. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.7/SKILL.md new file mode 100644 index 0000000000..d542af8fda --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.7/SKILL.md @@ -0,0 +1,137 @@ +--- +name: cis-azure-compute-2.2.7 +description: "Ensure 'HTTPS Only' is set to 'On'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, https, tls, encryption, data-in-transit] +cis_id: "2.2.7" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'HTTPS Only' is set to 'On' + +## Description + +Azure App Service allows deployment slots to run under both HTTP and HTTPS by default. Deployment slots can be accessed by anyone using non-secure HTTP links by default. Non-secure HTTP requests can be restricted and all HTTP requests redirected to the secure HTTPS port. It is recommended to enforce HTTPS-only traffic. + +## Rationale + +Enabling HTTPS-only traffic will redirect all non-secure HTTP requests to HTTPS ports. HTTPS uses the TLS/SSL protocol to provide a secure connection which is both encrypted and authenticated. It is therefore important to support HTTPS for the security benefits. + +## Impact + +When it is enabled, every incoming HTTP request is redirected to the HTTPS port. This means an extra level of security will be added to the HTTP requests made to the deployment slot. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` tab, under `Platform settings`, ensure that `HTTPS Only` is set to `On`. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `httpsOnly` is set to `true`. + +### Using Azure PowerShell + +Run the following command to list apps: + +```powershell +Get-AzWebApp +``` + +Run the following command to list deployment slots for an app: + +```powershell +Get-AzWebAppSlot -ResourceGroupName -Name +``` + +Run the following command to get the deployment slot with a given name: + +```powershell +$slot = Get-AzWebAppSlot -ResourceGroupName -Name -Slot +``` + +Run the following command to get the HTTPS setting for the deployment slot: + +```powershell +$slot.httpsOnly +``` + +Ensure that the command returns `True`. Repeat for each app and deployment slot. + +## Expected Result + +The `httpsOnly` property should return `True`, indicating that HTTPS-only traffic is enforced. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` tab, under `Platform settings`, next to `HTTPS Only`, select the radio button next to `On`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to enable HTTPS Only: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.httpsOnly=true +``` + +### Using Azure PowerShell + +For each deployment slot requiring remediation, run the following command to enable HTTPS Only: + +```powershell +Set-AzWebAppSlot -ResourceGroupName -Name -Slot -HttpsOnly $true +``` + +## Default Value + +`HTTPS Only` is disabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-security#https-and-certificates +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-3-encrypt-sensitive-data-in-transit +3. https://techcommunity.microsoft.com/t5/azure-paas-blog/enable-https-setting-on-azure-app-service-using-azure-policy/ba-p/3286603 +4. https://learn.microsoft.com/en-us/cli/azure/webapp +5. https://learn.microsoft.com/en-us/powershell/module/az.websites/get-azwebappslot +6. https://learn.microsoft.com/en-us/powershell/module/az.websites/set-azwebappslot +7. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.8/SKILL.md new file mode 100644 index 0000000000..f00db22ebf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.8/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-azure-compute-2.2.8 +description: "Ensure 'Minimum Inbound TLS Version' is set to '1.2' or higher" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, tls, encryption, minimum-tls-version, data-in-transit] +cis_id: "2.2.8" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Minimum Inbound TLS Version' is set to '1.2' or higher + +## Description + +The TLS (Transport Layer Security) protocol secures the transmission of data over the internet using standard encryption technology. App Service deployment slots use TLS 1.2 for the `Minimum Inbound TLS Version` by default and allow for the use of TLS versions 1.0, 1.1, and 1.3. NIST strongly suggests the use of TLS 1.2 and recommends the adoption of TLS 1.3. + +## Rationale + +TLS 1.0 and 1.1 are outdated and vulnerable to security risks. Since TLS 1.2 and TLS 1.3 provide enhanced security and improved performance, it is highly recommended to use TLS 1.2 or higher whenever possible. + +## Impact + +Using the latest TLS version may affect compatibility with clients and backend services. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, ensure that `Minimum Inbound TLS Version` is set to `1.2` or higher. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the TLS version setting: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.minTlsVersion +``` + +Ensure that `"1.2"` or higher is returned. + +## Expected Result + +The `minTlsVersion` property should return `"1.2"` or `"1.3"`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, click the drop-down next to `Minimum Inbound TLS Version` and select `1.2` or higher. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to update the TLS version: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.minTlsVersion=<1.2|1.3> +``` + +## Default Value + +By default, TLS version is set to 1.2. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-bindings#how-can-i-change-the-minimum-tls-versions-for-the-app +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-8-detect-and-disable-insecure-services-and-protocols +4. https://learn.microsoft.com/en-us/cli/azure/webapp +5. https://learn.microsoft.com/en-us/cli/azure/resource +6. https://csrc.nist.gov/news/2019/nist-publishes-sp-800-52-revision-2 + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.9/SKILL.md new file mode 100644 index 0000000000..f97f4fcdce --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.2.9/SKILL.md @@ -0,0 +1,100 @@ +--- +name: cis-azure-compute-2.2.9 +description: "Ensure end-to-end TLS encryption is enabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service, deployment-slots, tls, e2e-encryption, data-in-transit] +cis_id: "2.2.9" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure end-to-end TLS encryption is enabled + +## Description + +End-to-end (E2E) TLS encryption ensures that front-end to worker communication within App Service deployment slots is encrypted using TLS. Without this feature, while incoming HTTPS requests are encrypted to the front ends, the traffic from front ends to workers running the application workloads would travel unencrypted inside Azure's infrastructure. + +## Rationale + +E2E TLS helps ensure full encryption of traffic between: + +- Clients and front ends +- Front ends and worker processes hosting the application + +## Impact + +Enabling end-to-end TLS encryption may introduce minimal latency and require additional configuration of certificates and HTTPS settings to ensure compatibility. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, ensure that `Enable end-to-end TLS encryption` is set to `On`. +7. Repeat steps 1-6 for each app and deployment slot. + +### Using Azure CLI + +Run the following command to list apps: + +```bash +az webapp list +``` + +For each app, run the following command to list deployment slots: + +```bash +az webapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `endToEndEncryptionEnabled` is set to `true`. + +## Expected Result + +The `endToEndEncryptionEnabled` property should be set to `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, next to `Enable end-to-end TLS encryption`, click the radio button next to `On`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to enable end-to-end TLS encryption: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.endToEndEncryptionEnabled=true +``` + +## Default Value + +By default, end-to-end TLS encryption is disabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-tls#end-to-end-tls-encryption +2. https://learn.microsoft.com/en-us/cli/azure/webapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.1/SKILL.md new file mode 100644 index 0000000000..d4d1cad5c2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.1/SKILL.md @@ -0,0 +1,129 @@ +--- +name: cis-azure-compute-2.3.1 +description: "Ensure 'Java version' is currently supported (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, java, runtime-version, software-lifecycle] +cis_id: "2.3.1" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Java version' is currently supported (if in use) + +## Description + +Periodically, older versions of Java may be deprecated and no longer supported. Using a supported version of Java for function apps is recommended to avoid potential unpatched vulnerabilities. + +## Rationale + +Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable. + +## Impact + +If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, ensure that for a `Stack` of `Java`, the `Java Version` reflects a currently supported release. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the Java version: + +```bash +az functionapp show --resource-group --name --query siteConfig.[javaContainer,javaContainerVersion,javaVersion,linuxFxVersion] +``` + +If Java is in use, ensure the version is currently supported. + +### Using Azure PowerShell + +Run the following command to list function apps: + +```powershell +Get-AzFunctionApp +``` + +Run the following command to get the function app in a resource group with a given name: + +```powershell +$app = Get-AzFunctionApp -ResourceGroupName -Name +``` + +Run the following command to get the Java version: + +```powershell +$app.SiteConfig | Select-Object JavaContainer, JavaContainerVersion, JavaVersion, LinuxFXVersion, WindowsFxVersion +``` + +If Java is in use, ensure the version is currently supported. Repeat for each function app. + +Take note of currently supported versions of Java here: +https://www.oracle.com/java/technologies/java-se-support-roadmap.html + +## Expected Result + +If Java is in use, the Java version should reflect a currently supported release. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, for a `Stack` of `Java`, set the `Java Version` to a currently supported release. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each function app requiring remediation. + +**Note:** No action is required if Java is not in use. + +### Using Azure CLI + +Run the following command to list supported runtimes: + +```bash +az functionapp list-runtimes +``` + +For each function app requiring remediation, run the following command with the appropriate parameters to update the Java version: + +```bash +az functionapp config set --resource-group --name [--java-container --java-container-version --java-version ] [--linux-fx-version ] +``` + +## Default Value + +The version is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-language-java-deploy-run +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-3-define-and-establish-secure-configurations-for-compute-resources +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-6-rapidly-and-automatically-remediate-vulnerabilities +4. https://www.oracle.com/java/technologies/java-se-support-roadmap.html +5. https://learn.microsoft.com/en-us/cli/azure/functionapp +6. https://learn.microsoft.com/en-us/powershell/module/az.functions/get-azfunctionapp + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.10/SKILL.md new file mode 100644 index 0000000000..9057e097e1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.10/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-azure-compute-2.3.10 +description: "Ensure incoming client certificates are enabled and required (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, client-certificates, mutual-tls, authentication] +cis_id: "2.3.10" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure incoming client certificates are enabled and required (if in use) + +## Description + +Client certificates allow for the function app to request a certificate for incoming requests. Only clients that have a valid certificate will be able to reach the app. + +## Rationale + +The TLS mutual authentication technique in enterprise environments ensures the authenticity of clients to the server. If incoming client certificates are enabled, then only an authenticated client with valid certificates can access the app. + +## Impact + +Utilizing and maintaining client certificates will require additional work to obtain and manage replacement and key rotation. + +**NOTE:** This recommendation cannot be implemented if following the recommendation titled "Ensure 'HTTP Version' is set to '2.0' (if in use)." This recommendation should only be considered for scenarios where HTTP versions prior to 2.0 are required for an app, and mutual certificate authentication is desired for validating clients. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Incoming client certificates`, ensure that `Client certificate mode` is set to `Required`. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the `clientCertEnabled` and `clientCertMode` settings: + +```bash +az functionapp show --resource-group --name --query "[clientCertEnabled, clientCertMode]" +``` + +Ensure that `[true,"Required"]` is returned. + +## Expected Result + +Client certificate mode should be enabled and set to `Required` (`[true,"Required"]`). + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Incoming client certificates`, set `Client certificate mode` to `Required`. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to enable and require incoming client certificates: + +```bash +az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.clientCertEnabled=true --set properties.clientCertMode=Required +``` + +## Default Value + +By default, incoming client certificates are disabled. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-identity-management#im-4-authenticate-server-and-services +2. https://learn.microsoft.com/en-gb/azure/app-service/app-service-web-configure-tls-mutual-auth +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.11/SKILL.md new file mode 100644 index 0000000000..748f15c59f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.11/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-azure-compute-2.3.11 +description: "Ensure 'App Service authentication' is set to 'Enabled'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, app-service-auth, authentication, identity] +cis_id: "2.3.11" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'App Service authentication' is set to 'Enabled' + +## Description + +App Service authentication can prevent anonymous HTTP requests from reaching an app, or authenticate those with tokens before they reach the app. If an anonymous request is received from a browser, App Service will redirect to a login page. To handle the login process, a choice from a set of identity providers can be made, or a custom authentication mechanism can be implemented. + +## Rationale + +By enabling authentication, every incoming HTTP request passes through it before being handled by the application code. It also handles authentication of users with the specified provider (Entra ID, Facebook, Google, Microsoft Account, and Twitter), validation, storage and refreshing of tokens, managing the authenticated sessions, and injecting identity information into request headers. + +## Impact + +This is only required for apps that require authentication. Enabling it on a site like a marketing or support website will prevent unauthenticated access, which would be undesirable. + +Adding an authentication requirement will increase costs and require additional security components to facilitate the authentication. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Authentication`. +4. Ensure that `App Service authentication` is set to `Enabled`. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the authentication setting: + +For v1 auth commands: + +```bash +az webapp auth show --resource-group --name --query enabled +``` + +For v2 auth commands: + +```bash +az webapp auth show --resource-group --name --query properties.platform.enabled +``` + +Ensure that `true` is returned. + +## Expected Result + +App Service authentication should be `enabled` (return `true`). + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Authentication`. +4. If an identity provider is not configured: + 1. Click `Add identity provider`. + 2. Provide appropriate configuration for an identity provider and click `Add`. +5. If `App Service authentication` is set to `Disabled`: + 1. Click `Enable authentication`. +6. Repeat steps 1-5 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to enable authentication: + +```bash +az webapp auth update --resource-group --name --enabled true +``` + +**Note:** In order to access `App Service authentication` settings for an app using the Microsoft API, the `Website Contributor` permission at the subscription level is required. A custom role can be created instead of `Website Contributor` to provide more specific permissions and maintain the principle of least privileged access. + +## Default Value + +By default, `App Service authentication` is set to `Disabled`. + +## Additional Information + +You're not required to use App Service for authentication and authorization. Many web frameworks come with security features built in, and you can use them if you like. If you need more flexibility than App Service provides, you can also write your own utilities. Secure authentication and authorization require a deep understanding of security, including federation, encryption, JSON Web Token (JWT) management, grant types, and so on. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-authentication-authorization +2. https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#website-contributor +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +5. https://learn.microsoft.com/en-us/cli/azure/webapp/auth + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.12/SKILL.md new file mode 100644 index 0000000000..9b66daf16c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.12/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-azure-compute-2.3.12 +description: "Ensure managed identities are configured" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, managed-identity, entra-id, credential-management] +cis_id: "2.3.12" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure managed identities are configured + +## Description + +Managed identities from Microsoft Entra ID allow function apps to securely access other Azure services without the need to provision or rotate any secrets. + +## Rationale + +Using managed identities with function apps eliminates the need to store and manage credentials to access Azure resources. + +## Impact + +Minor administrative overhead to configure and manage role assignments for managed identities. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Identity`. +4. Ensure that in the `System assigned` pane, the `Status` is set to `On`, and an `Object (principal) ID` is displayed, or that in the `User assigned` pane, a managed identity is listed. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the identity setting: + +```bash +az functionapp show --resource-group --name --query "identity" +``` + +Ensure that `type` is set to `SystemAssigned`, `UserAssigned`, or both. + +## Expected Result + +The identity `type` should be set to `SystemAssigned`, `UserAssigned`, or both. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Identity`. +4. To add a system assigned managed identity: + 1. In the `System assigned` pane, under `Status`, click `On`. + 2. Click `Save`. + 3. Click `Yes`. +5. To add a user assigned managed identity: + 1. In the `User assigned` pane, click `Add`. + 2. Use the filter box to search for a managed identity. + 3. Select the identity. + 4. Click `Add`. +6. Repeat steps 1-5 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to assign a system-assigned managed identity: + +```bash +az functionapp identity assign --resource-group --name +``` + +### Using Azure PowerShell + +For each function app requiring remediation, run the following command to assign a system-assigned managed identity: + +```powershell +Update-AzFunctionApp -ResourceGroupName -Name -IdentityType SystemAssigned -Force +``` + +## Default Value + +Managed identities are disabled by default for function apps. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-1-use-centralized-identity-and-authentication-system +2. https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/powershell/module/az.functions/update-azfunctionapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.13/SKILL.md new file mode 100644 index 0000000000..3ac4480f09 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.13/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-azure-compute-2.3.13 +description: "Ensure public network access is disabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, public-network-access, network-security, private-endpoints] +cis_id: "2.3.13" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure public network access is disabled + +## Description + +Disable public network access to prevent exposure to the internet and reduce the risk of unauthorized access. Use private endpoints to securely manage access within trusted networks. + +## Rationale + +Disabling public network access improves security by ensuring that the service is not directly exposed to the public Internet. This has the added benefit of providing more granular control over security settings and configurations for those additional layers of separation. + +## Impact + +**NOTE:** Prior to disabling public network access, it is strongly recommended that, for each function app, either: + +- complete virtual network integration as described in "Ensure app is integrated with a virtual network" + +OR + +- set up private endpoints/links as described in "Ensure private endpoints are used to access App Service apps." + +Disabling public network access restricts direct access to the service. This enhances security but will require the configuration of a virtual network and/or private endpoints for any services or users needing access within trusted networks. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Networking`. +4. Under `Inbound traffic configuration`, ensure that `Public network access` is set to `Disabled`. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the public network access setting: + +```bash +az functionapp show --resource-group --name --query "publicNetworkAccess" +``` + +Ensure the command returns `"Disabled"`. + +## Expected Result + +The `publicNetworkAccess` setting should return `"Disabled"`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Networking`. +4. Under `Inbound traffic configuration`, click the text next to `Public network access`. +5. Select the radio button next to `Disabled`. +6. Click `Save`. +7. Check the box to confirm the change. +8. Click `Continue`. +9. Repeat steps 1-8 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to disable public network access: + +```bash +az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.publicNetworkAccess=Disabled +``` + +## Default Value + +By default, public network access is enabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/networking-features +2. https://learn.microsoft.com/en-us/cli/azure/functionapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.14/SKILL.md new file mode 100644 index 0000000000..03a23251dd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.14/SKILL.md @@ -0,0 +1,160 @@ +--- +name: cis-azure-compute-2.3.14 +description: "Ensure function app is integrated with a virtual network" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, vnet-integration, network-security, virtual-network] +cis_id: "2.3.14" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure function app is integrated with a virtual network + +## Description + +Integrate function apps with a virtual network to enable access to resources in or through a non-internet-routable virtual network. + +This recommendation does not apply to function apps created on the consumption hosting plan, which does not support virtual networking. + +## Rationale + +Integrate function apps with a virtual network for increased security and control. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Networking`. +4. Under `Outbound traffic configuration`, next to `Virtual network integration`, ensure that a virtual network and subnet name are displayed. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the virtual network subnet ID: + +```bash +az functionapp show --resource-group --name --query "virtualNetworkSubnetId" +``` + +Ensure that a virtual network subnet ID is returned. + +### Using Azure PowerShell + +Run the following command to list function apps: + +```powershell +Get-AzFunctionApp +``` + +Run the following command to get the function app in a resource group with a given name: + +```powershell +$app = Get-AzFunctionApp -ResourceGroupName -Name +``` + +Run the following command to get the virtual network subnet ID: + +```powershell +$app.virtualNetworkSubnetId +``` + +Ensure that a virtual network subnet ID is returned. Repeat for each function app. + +## Expected Result + +A virtual network subnet ID should be returned (not null or empty). + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Networking`. +4. Under `Outbound traffic configuration`, next to `Virtual network integration`, click `Not configured`. +5. Click `Add virtual network integration`. +6. Select an existing App Service Plan connection, or select `New connection` and select a subscription, virtual network, and subnet. +7. Click `Connect`. +8. Repeat steps 1-7 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to integrate with a virtual network: + +```bash +az functionapp vnet-integration add --resource-group --name --vnet --subnet +``` + +### Using Azure PowerShell + +For each function app requiring remediation, run the following commands to integrate with a virtual network: + +Prepare parameters: + +```powershell +$siteName = '' +$vNetResourceGroupName = '' +$functionAppResourceGroupName = '' +$vNetName = '' +$integrationSubnetName = '' +$vNetSubscriptionId = '' +``` + +Check if the subnet is delegated to `Microsoft.Web/serverFarms`: + +```powershell +$vnet = Get-AzVirtualNetwork -Name $vNetName -ResourceGroupName $vNetResourceGroupName +$subnet = Get-AzVirtualNetworkSubnetConfig -Name $integrationSubnetName -VirtualNetwork $vnet +Get-AzDelegation -Subnet $subnet +``` + +Add delegation: + +```powershell +$subnet = Add-AzDelegation -Name "myDelegation" -ServiceName "Microsoft.Web/serverFarms" -Subnet $subnet +Set-AzVirtualNetwork -VirtualNetwork $vnet +``` + +Configure virtual network integration: + +```powershell +$subnetResourceId = "/subscriptions/$vNetSubscriptionId/resourceGroups/$vNetResourceGroupName/providers/Microsoft.Network/virtualNetworks/$vNetName/subnets/$integrationSubnetName" +$functionApp = Get-AzResource -ResourceType Microsoft.Web/sites -ResourceGroupName $functionAppResourceGroupName -ResourceName $siteName +$functionApp.Properties.virtualNetworkSubnetId = $subnetResourceId +$functionApp.Properties.vnetRouteAllEnabled = 'true' +$functionApp | Set-AzResource -Force +``` + +## Default Value + +By default, virtual network integration is not configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-functions/functions-networking-options +2. https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration +3. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-enable +4. https://learn.microsoft.com/en-us/cli/azure/functionapp +5. https://learn.microsoft.com/en-us/powershell/module/az.functions/get-azfunctionapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.15/SKILL.md new file mode 100644 index 0000000000..afca4d8bfb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.15/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-azure-compute-2.3.15 +description: "Ensure configuration is routed through the virtual network integration" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, vnet-routing, configuration-routing, network-security] +cis_id: "2.3.15" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure configuration is routed through the virtual network integration + +## Description + +By default, configuration traffic for function apps goes directly over the public route. Container image pulls and content sharing can be routed through the virtual network integration. + +This recommendation should be applied after integrating a function app with a virtual network. + +## Rationale + +Route container image pulls and content sharing through a virtual network integration for increased security and control. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the container image share and content share settings: + +```bash +az functionapp show --resource-group --name --query "[vnetImagePullEnabled,vnetContentShareEnabled]" +``` + +Ensure that `[true,true]` is returned. + +### Using Azure Portal + +There is no specific Azure Portal audit procedure documented for this control. Use the Azure CLI method. + +## Expected Result + +Both `vnetImagePullEnabled` and `vnetContentShareEnabled` should return `true` (`[true,true]`). + +## Remediation + +### Using Azure CLI + +For each function app requiring remediation, run the following command to route container image pulls and content sharing through the virtual network integration: + +```bash +az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.vnetImagePullEnabled=true --set properties.vnetContentShareEnabled=true +``` + +### Using Azure Portal + +There is no specific Azure Portal remediation procedure documented for this control. Use the Azure CLI method. + +## Additional Information + +In addition to configuring the routing for content sharing, you must also ensure that any firewall or Network Security Group configured on traffic from the subnet allow traffic to port 443 and 445. + +## Default Value + +By default, configuration traffic goes directly over the public route. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration#routes +2. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-routing#configure-configuration-routing +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.16/SKILL.md new file mode 100644 index 0000000000..40026ebeb4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.16/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-azure-compute-2.3.16 +description: "Ensure all traffic is routed through the virtual network" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, vnet-route-all, outbound-traffic, network-security] +cis_id: "2.3.16" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure all traffic is routed through the virtual network + +## Description + +Enable `vnetRouteAllEnabled` to ensure all outbound traffic is routed through the integrated virtual network. + +This recommendation should be applied after integrating a function app with a virtual network. + +## Rationale + +Routing all outbound traffic through the virtual network enhances security. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Networking`. +4. Under `Outbound traffic configuration`, next to `Virtual network integration`, click the virtual network and subnet name. +5. Under `Application routing`, ensure that the box next to `Outbound internet traffic` is checked. +6. Repeat steps 1-5 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the virtual network traffic routing setting: + +```bash +az functionapp show --resource-group --name --query vnetRouteAllEnabled +``` + +Ensure that `true` is returned. + +## Expected Result + +The `vnetRouteAllEnabled` setting should return `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Networking`. +4. Under `Outbound traffic configuration`, next to `Virtual network integration`, click the virtual network and subnet name. +5. Under `Application routing`, check the box next to `Outbound internet traffic`. +6. Click `Apply`. +7. Repeat steps 1-6 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to route all traffic through the virtual network: + +```bash +az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.vnetRouteAllEnabled=true +``` + +## Default Value + +For function apps integrated with a virtual network, all traffic is routed through the virtual network by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-routing#configure-application-routing +2. https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#vnetrouteallenabled +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.17/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.17/SKILL.md new file mode 100644 index 0000000000..67a160b91f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.17/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-azure-compute-2.3.17 +description: "Ensure cross-origin resource sharing does not allow all origins" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, cors, cross-origin, web-security, csrf] +cis_id: "2.3.17" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure cross-origin resource sharing does not allow all origins + +## Description + +Cross-origin resource sharing (CORS) is a security feature that controls how applications interact with resources hosted on different domains. + +## Rationale + +Restrict CORS to only trusted origins to help enforce proper access control and reduce exposure to malicious cross-origin requests. + +## Impact + +Configuration is required to ensure that the appropriate origins have access. + +Setting up a proper CORS policy can be fairly complex and an incorrect setting could permit Cross-Site Request Forgery (CSRF). The "caveat" is that if the app being deployed is a PUBLIC API, a wildcard "\*" CORS policy is absolutely necessary. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Service` or `Function App`. +2. Click the name of a function app. +3. Under `API`, click `CORS`. +4. Ensure `Allowed Origins` does not include `*`. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the CORS allowed origins setting: + +```bash +az functionapp show --resource-group --name --query siteConfig.cors.allowedOrigins +``` + +Ensure that the response does not include `*`. + +## Expected Result + +The CORS allowed origins should not include a wildcard `*` entry. + +## Remediation + +### Using Azure Portal + +1. Go to `App Service` or `Function App`. +2. Click the name of a function app. +3. Under `API`, click `CORS`. +4. Under `Allowed Origins`, delete the entry that equals `*`. +5. Specify the origins that should be allowed to make cross-origin calls. +6. Click `Save`. +7. Repeat steps 1-6 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to remove the wildcard origin: + +```bash +az functionapp cors remove --resource-group --name --allowed-origins "*" +``` + +Use the following command to specify the origins that should be allowed: + +```bash +az functionapp cors add --resource-group --name --allowed-origins +``` + +## Default Value + +By default, `Allowed Origins` is set to `https://portal.azure.com`. + +## References + +1. https://learn.microsoft.com/en-gb/azure/app-service/app-service-web-tutorial-rest-api +2. https://learn.microsoft.com/en-us/cli/azure/functionapp/cors +3. https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html +4. https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS +5. https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.2/SKILL.md new file mode 100644 index 0000000000..aacd83e04f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.2/SKILL.md @@ -0,0 +1,128 @@ +--- +name: cis-azure-compute-2.3.2 +description: "Ensure 'Python version' is currently supported (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, python, runtime-version, software-lifecycle] +cis_id: "2.3.2" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Python version' is currently supported (if in use) + +## Description + +Periodically, older versions of Python may be deprecated and no longer supported. Using a supported version of Python for function apps is recommended to avoid potential unpatched vulnerabilities. + +## Rationale + +Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable. + +## Impact + +If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, ensure that for a `Stack` of `Python`, the `Python Version` reflects a currently supported release. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the Python version: + +```bash +az functionapp config show --resource-group --name --query "{LinuxFxVersion:linuxFxVersion,PythonVersion:pythonVersion}" +``` + +If Python is in use, ensure the version is currently supported. + +### Using Azure PowerShell + +Run the following command to list function apps: + +```powershell +Get-AzFunctionApp +``` + +Run the following command to get the function app in a resource group with a given name: + +```powershell +$app = Get-AzFunctionApp -ResourceGroupName -Name +``` + +Run the following command to get the Python version: + +```powershell +$app.SiteConfig | Select-Object LinuxFXVersion, PythonVersion +``` + +If Python is in use, ensure the version is currently supported. Repeat for each function app. + +Take note of the currently supported versions (given a status of "security") of Python here: https://devguide.python.org/versions/ + +## Expected Result + +If Python is in use, the Python version should reflect a currently supported release. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, for a `Stack` of `Python`, set the `Python Version` to a currently supported release. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each function app requiring remediation. + +**Note:** No action is required if Python is not in use. + +### Using Azure CLI + +Run the following command to list supported runtimes: + +```bash +az functionapp list-runtimes +``` + +For each function app requiring remediation, run the following command with the appropriate parameters to update the Python version: + +```bash +az functionapp config set --resource-group --name --linux-fx-version "PYTHON|" +``` + +## Default Value + +The version is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-common#configure-language-stack-settings +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities +3. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-3-establish-secure-configurations-for-compute-resources +4. https://devguide.python.org/versions/ +5. https://learn.microsoft.com/en-us/cli/azure/functionapp +6. https://learn.microsoft.com/en-us/powershell/module/az.functions/get-azfunctionapp + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.3/SKILL.md new file mode 100644 index 0000000000..f3a01f2d7c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.3/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-compute-2.3.3 +description: "Ensure 'Basic Authentication Publishing Credentials' are 'Disabled'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, basic-auth, publishing-credentials, authentication] +cis_id: "2.3.3" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Basic Authentication Publishing Credentials' are 'Disabled' + +## Description + +Basic Authentication Publishing Credentials provides the ability to publish -- or deploy to -- a function app without a centralized Identity Provider. For a more effective, capable, and secure solution for Identity, Authentication, Authorization, and Accountability, a centralized Identity Provider such as Entra ID is strongly advised. + +## Rationale + +Basic Authentication introduces an identity silo for privileged access to a resource and produces logging which may not provide a full chain of accountability. This can be exploited in numerous ways and represents a significant vulnerability and attack vector. + +## Impact + +Disabling 'Basic Auth Publishing Credentials' will prevent the following deployment methods from working: + +FTP Basic Auth Publishing Credentials: + +- FTP +- FTPS + +SCM Basic Auth Publishing Credentials: + +- Local Git +- GitHub +- Azure Repos +- Bitbucket +- Visual Studio (Version 17.12 and earlier) + +If this recommendation cannot be implemented because one of the above listed deployment methods is necessary and cannot be adapted, compensating controls (e.g. using FTPS Only and disabling only "SCM Basic Auth Publishing Credentials") are recommended to reduce potential attack surface. + +An Identity Provider that can be used by the function app for authenticating users is required. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, ensure that `SCM Basic Auth Publishing Credentials` and `FTP Basic Auth Publishing Credentials` are set to `Off`. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the basic authentication for FTP setting: + +```bash +az resource show --resource-group --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/ --query properties.allow +``` + +Ensure that `false` is returned. + +For each function app, run the following command to get the basic authentication for SCM setting: + +```bash +az resource show --resource-group --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/ --query properties.allow +``` + +Ensure that `false` is returned. + +## Expected Result + +Both FTP and SCM basic authentication publishing credentials should return `false`. + +## Remediation + +**CAUTION:** Applying changes may cause your function app to restart. + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, set `SCM Basic Auth Publishing Credentials` and `FTP Basic Auth Publishing Credentials` to `Off`. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to disable basic authentication for FTP: + +```bash +az resource update --resource-group --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/ --set properties.allow=false +``` + +For each function app requiring remediation, run the following command to disable basic authentication for SCM: + +```bash +az resource update --resource-group --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/ --set properties.allow=false +``` + +## Default Value + +Basic authentication is disabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-basic-auth-disable +2. https://learn.microsoft.com/en-us/cli/azure/functionapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.4/SKILL.md new file mode 100644 index 0000000000..dac1a1c53b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.4/SKILL.md @@ -0,0 +1,121 @@ +--- +name: cis-azure-compute-2.3.4 +description: "Ensure 'FTP state' is set to 'FTPS only' or 'Disabled'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, ftp, ftps, encryption, data-in-transit] +cis_id: "2.3.4" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'FTP state' is set to 'FTPS only' or 'Disabled' + +## Description + +By default, App Service supports deployment over FTP. If FTP is essential for a deployment workflow, FTPS should be enforced for all function apps. + +If FTPS is not explicitly required, the recommended setting is `Disabled`. + +## Rationale + +FTP is an unencrypted network protocol that transmits data -- including passwords -- in clear text. The use of this protocol can lead to both data and credential compromise and can present opportunities for exfiltration, persistence, and lateral movement. + +## Impact + +Deployment workflows that rely on FTP or FTPS rather than WebDeploy or HTTPS endpoints may be affected. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, ensure that `FTP state` is set to `FTPS only` or `Disabled`. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the FTPS state setting: + +```bash +az functionapp show --resource-group --name --query siteConfig.ftpsState +``` + +Ensure that `"FtpsOnly"` or `"Disabled"` is returned. + +### Using Azure PowerShell + +Run the following command to list function apps: + +```powershell +Get-AzFunctionApp +``` + +Run the following command to get the function app in a resource group with a given name: + +```powershell +$app = Get-AzFunctionApp -ResourceGroupName -Name +``` + +Run the following command to get the FTP state setting: + +```powershell +$app.SiteConfig.FtpsState +``` + +Ensure that `"FtpsOnly"` or `"Disabled"` is returned. Repeat for each function app. + +## Expected Result + +The FTP state should be `FtpsOnly` or `Disabled`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, set `FTP state` to `FTPS only` or `Disabled`. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to set FTPS state to `FtpsOnly` or `Disabled`: + +```bash +az functionapp config set --resource-group --name --ftps-state +``` + +## Default Value + +By default, FTP state is set to `FTPS only`. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/deploy-ftp +2. https://learn.microsoft.com/en-us/azure/app-service/overview-security +3. https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-use-azure-function-app-settings#ftps-deployment-settings +4. https://learn.microsoft.com/en-us/cli/azure/functionapp +5. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-4-encrypt-sensitive-information-in-transit +6. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities +7. https://learn.microsoft.com/en-us/powershell/module/az.functions/get-azfunctionapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.5/SKILL.md new file mode 100644 index 0000000000..16d6a31326 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.5/SKILL.md @@ -0,0 +1,121 @@ +--- +name: cis-azure-compute-2.3.5 +description: "Ensure 'HTTP version' is set to '2.0' (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, http2, http-version, performance, security] +cis_id: "2.3.5" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'HTTP version' is set to '2.0' (if in use) + +## Description + +Periodically, newer versions are released for HTTP, either due to security flaws or to include additional functionalities. Using the latest HTTP version allows apps to take advantage of security fixes, if any, and/or new functionalities of the newer version. + +## Rationale + +Newer versions may contain security enhancements and additional functionalities. Using the latest version is recommended in order to take advantage of enhancements and new capabilities. With each software installation, organizations need to determine if a given update meets their requirements. They must also verify the compatibility and support provided for any additional software against the update revision that is selected. + +HTTP 2.0 has additional performance improvements for the head-of-line blocking problem of the old HTTP version, header compression, and request prioritization. HTTP 2.0 no longer supports HTTP 1.1's chunked transfer encoding mechanism, as it provides its own, more efficient mechanisms for data streaming. + +## Impact + +Most modern browsers support the HTTP/2 protocol over TLS only, while non-encrypted traffic continues to use HTTP/1.1. To ensure that client browsers connect to your app with HTTP/2, either purchase an App Service Certificate for your app's custom domain or bind a third-party certificate. + +**NOTE:** HTTP/2 cannot be used in tandem with mutual authentication or client certificates. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, ensure that `HTTP version` is set to `2.0`. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the `http20Enabled` setting: + +```bash +az functionapp config show --resource-group --name --query http20Enabled +``` + +Ensure that `true` is returned. + +### Using Azure PowerShell + +Run the following command to list function apps: + +```powershell +Get-AzFunctionApp +``` + +Run the following command to get the function app in a resource group with a given name: + +```powershell +$app = Get-AzFunctionApp -ResourceGroupName -Name +``` + +Run the following command to get the `Http20Enabled` setting: + +```powershell +$app.SiteConfig.Http20Enabled +``` + +Ensure that `True` is returned. Repeat for each function app. + +## Expected Result + +The `http20Enabled` setting should return `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, set `HTTP version` to `2.0`. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to enable `http20Enabled`: + +```bash +az functionapp config set --resource-group --name --http20-enabled true +``` + +## Default Value + +By default, `HTTP version` is set to `1.1`. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-common#general-settings +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-3-define-and-establish-secure-configurations-for-compute-resources +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-6-rapidly-and-automatically-remediate-vulnerabilities +4. https://learn.microsoft.com/en-us/cli/azure/functionapp +5. https://learn.microsoft.com/en-us/powershell/module/az.functions/get-azfunctionapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.6/SKILL.md new file mode 100644 index 0000000000..60e4f3c539 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.6/SKILL.md @@ -0,0 +1,119 @@ +--- +name: cis-azure-compute-2.3.6 +description: "Ensure 'HTTPS Only' is set to 'On'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, https, tls, encryption, data-in-transit] +cis_id: "2.3.6" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'HTTPS Only' is set to 'On' + +## Description + +Azure App Service allows function apps to run under both HTTP and HTTPS by default. Function apps can be accessed by anyone using non-secure HTTP links by default. Non-secure HTTP requests can be restricted and all HTTP requests redirected to the secure HTTPS port. It is recommended to enforce HTTPS-only traffic. + +## Rationale + +Enabling HTTPS-only traffic will redirect all non-secure HTTP requests to HTTPS ports. HTTPS uses the TLS/SSL protocol to provide a secure connection which is both encrypted and authenticated. It is therefore important to support HTTPS for the security benefits. + +## Impact + +When it is enabled, every incoming HTTP request is redirected to the HTTPS port. This means an extra level of security will be added to the HTTP requests made to the deployment slot. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` tab, under `Platform settings`, ensure that `HTTPS Only` is set to `On`. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the HTTPS setting: + +```bash +az functionapp show --resource-group --name --query "httpsOnly" +``` + +Ensure that the command returns `true`. + +### Using Azure PowerShell + +Run the following command to list function apps: + +```powershell +Get-AzFunctionApp +``` + +Run the following command to get the function app with a given name: + +```powershell +$app = Get-AzFunctionApp -ResourceGroupName -Name +``` + +Run the following command to get the HTTPS setting for the function app: + +```powershell +$app.httpsOnly +``` + +Ensure that the command returns `True`. Repeat for each function app. + +## Expected Result + +The `httpsOnly` setting should return `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` tab, under `Platform settings`, next to `HTTPS Only`, select the radio button next to `On`. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to enable `HTTPS Only`: + +```bash +az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.httpsOnly=true +``` + +## Default Value + +`HTTPS Only` is enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-security#https-and-certificates +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-3-encrypt-sensitive-data-in-transit +3. https://techcommunity.microsoft.com/t5/azure-paas-blog/enable-https-setting-on-azure-app-service-using-azure-policy/ba-p/3286603 +4. https://learn.microsoft.com/en-us/cli/azure/functionapp +5. https://learn.microsoft.com/en-us/powershell/module/az.functions/get-azfunctionapp +6. https://learn.microsoft.com/en-us/azure/azure-functions/security-concepts +7. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.7/SKILL.md new file mode 100644 index 0000000000..88397e9b05 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.7/SKILL.md @@ -0,0 +1,118 @@ +--- +name: cis-azure-compute-2.3.7 +description: "Ensure 'Minimum Inbound TLS Version' is set to '1.2' or higher" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, tls, encryption, minimum-tls-version, data-in-transit] +cis_id: "2.3.7" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Minimum Inbound TLS Version' is set to '1.2' or higher + +## Description + +The TLS (Transport Layer Security) protocol secures the transmission of data over the internet using standard encryption technology. Function apps use TLS 1.2 for the `Minimum Inbound TLS Version` by default and allow for the use of TLS versions 1.0, 1.1, and 1.3. NIST strongly suggests the use of TLS 1.2 and recommends the adoption of TLS 1.3. + +## Rationale + +TLS 1.0 and 1.1 are outdated and vulnerable to security risks. Since TLS 1.2 and TLS 1.3 provide enhanced security and improved performance, it is highly recommended to use TLS 1.2 or higher whenever possible. + +## Impact + +Using the latest TLS version may affect compatibility with clients and backend services. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, ensure that `Minimum Inbound TLS Version` is set to `1.2` or higher. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the TLS version setting: + +```bash +az functionapp config show --resource-group --name --query minTlsVersion +``` + +Ensure that `"1.2"` or higher is returned. + +### Using Azure PowerShell + +Run the following command to list function apps: + +```powershell +Get-AzFunctionApp +``` + +Run the following command to get the function app in a resource group with a given name: + +```powershell +$app = Get-AzFunctionApp -ResourceGroupName -Name +``` + +Run the following command to get the TLS version setting: + +```powershell +$app.SiteConfig.MinTlsVersion +``` + +Ensure that the command returns `1.2` or higher. Repeat for each function app. + +## Expected Result + +The minimum TLS version should be `1.2` or higher. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Platform settings`, click the drop-down next to `Minimum Inbound TLS Version` and select `1.2` or higher. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to update the TLS version: + +```bash +az functionapp config set --resource-group --name --min-tls-version <1.2|1.3> +``` + +## Default Value + +By default, TLS version is set to 1.2. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-bindings#how-can-i-change-the-minimum-tls-versions-for-the-app +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-8-detect-and-disable-insecure-services-and-protocols +4. https://learn.microsoft.com/en-us/cli/azure/functionapp +5. https://learn.microsoft.com/en-us/powershell/module/az.functions/get-azfunctionapp +6. https://csrc.nist.gov/news/2019/nist-publishes-sp-800-52-revision-2 + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.8/SKILL.md new file mode 100644 index 0000000000..d5ceb27dc9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.8/SKILL.md @@ -0,0 +1,86 @@ +--- +name: cis-azure-compute-2.3.8 +description: "Ensure end-to-end TLS encryption is enabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, tls, e2e-encryption, data-in-transit] +cis_id: "2.3.8" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure end-to-end TLS encryption is enabled + +## Description + +End-to-end (E2E) TLS encryption ensures that front-end to worker communication within function apps is encrypted using TLS. Without this feature, while incoming HTTPS requests are encrypted to the front ends, the traffic from front ends to workers running the application workloads would travel unencrypted inside Azure's infrastructure. + +## Rationale + +E2E TLS helps ensure full encryption of traffic between: + +- Clients and front ends +- Front ends and worker processes hosting the application + +## Impact + +Enabling end-to-end TLS encryption may introduce minimal latency and require additional configuration of certificates and HTTPS settings to ensure compatibility. + +## Audit Procedure + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the end-to-end TLS encryption setting: + +```bash +az functionapp show --resource-group --name --query endToEndEncryptionEnabled +``` + +Ensure that the command returns `true`. + +### Using Azure Portal + +There is no Azure Portal audit procedure documented for this control. Use the Azure CLI or Azure Policy methods. + +## Expected Result + +The `endToEndEncryptionEnabled` setting should return `true`. + +## Remediation + +### Using Azure CLI + +For each function app requiring remediation, run the following command to enable end-to-end TLS encryption: + +```bash +az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.endToEndEncryptionEnabled=true +``` + +### Using Azure Portal + +There is no Azure Portal remediation procedure documented for this control. Use the Azure CLI method. + +## Default Value + +By default, end-to-end TLS encryption is disabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-tls#end-to-end-tls-encryption +2. https://learn.microsoft.com/en-us/cli/azure/functionapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.9/SKILL.md new file mode 100644 index 0000000000..758e210fb0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.3.9/SKILL.md @@ -0,0 +1,122 @@ +--- +name: cis-azure-compute-2.3.9 +description: "Ensure 'Remote debugging' is set to 'Off'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, function-apps, remote-debugging, attack-surface, security-hardening] +cis_id: "2.3.9" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Remote debugging' is set to 'Off' + +## Description + +Remote debugging allows a function app to be debugged in real-time directly in the Azure environment. When remote debugging is enabled, it opens a communication channel that could potentially be exploited by unauthorized users if not properly secured. + +## Rationale + +Disabling remote debugging on a function app is primarily about enhancing security. + +Remote debugging opens a communication channel that can be exploited by attackers. By disabling it, you reduce the number of potential entry points for unauthorized access. + +If remote debugging is enabled without proper access controls, it can allow unauthorized users to connect to your function app, potentially leading to data breaches or malicious code execution. + +During a remote debugging session, sensitive information might be exposed. Disabling remote debugging helps ensure that such data remains secure. This minimizes the use of remote access tools to reduce risk. + +## Impact + +You will not be able to connect to your function app from a remote location to diagnose and fix issues in real-time. You will not be able to step through code, set breakpoints, or inspect variables and the call stack while the function app is running on the server. Remote debugging is particularly useful for diagnosing issues that only occur in the production environment. Without it, you will need to rely on logs and other diagnostic tools. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Debugging`, ensure that `Remote debugging` is set to `Off`. +5. Repeat steps 1-4 for each function app. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to get the remote debugging setting: + +```bash +az functionapp show --resource-group --name --query siteConfig.remoteDebuggingEnabled +``` + +Ensure that `false` is returned. + +### Using Azure PowerShell + +Run the following command to list function apps: + +```powershell +Get-AzFunctionApp +``` + +Run the following command to get the function app in a resource group with a given name: + +```powershell +$app = Get-AzFunctionApp -ResourceGroupName -Name +``` + +Run the following command to get the remote debugging setting: + +```powershell +$app.SiteConfig.RemoteDebuggingEnabled +``` + +Ensure that `False` is returned. Repeat for each function app. + +## Expected Result + +The remote debugging setting should return `false`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Settings`, click `Configuration`. +4. In the `General settings` pane, under `Debugging`, set `Remote debugging` to `Off`. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each function app requiring remediation. + +### Using Azure CLI + +For each function app requiring remediation, run the following command to disable remote debugging: + +```bash +az functionapp config set --resource-group --name --remote-debugging-enabled false +``` + +## Default Value + +By default, remote debugging is set to `off`. + +## References + +1. https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-azure-app-service +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-2-audit-and-enforce-secure-configurations +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/powershell/module/az.functions/get-azfunctionapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.1/SKILL.md new file mode 100644 index 0000000000..063f921279 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.1/SKILL.md @@ -0,0 +1,115 @@ +--- +name: cis-azure-compute-2.4.1 +description: "Ensure 'Java version' is currently supported (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.1" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Java version' is currently supported (if in use) + +## Description + +Periodically, older versions of Java may be deprecated and no longer supported. Using a supported version of Java for function app deployment slots is recommended to avoid potential unpatched vulnerabilities. + +## Rationale + +Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable. + +## Impact + +If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, ensure that for a `Stack` of `Java`, the `Java Version` reflects a currently supported release. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the Java version: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.[javaContainer,javaContainerVersion,javaVersion,linuxFxVersion] +``` + +If Java is in use, ensure the version is currently supported. + +Take note of currently supported versions of Java here: +https://www.oracle.com/java/technologies/java-se-support-roadmap.html + +## Expected Result + +If Java is in use, the Java version should reflect a currently supported release. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, for a `Stack` of `Java`, set the `Java Version` to a currently supported release. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +Run the following command to list supported runtimes: + +```bash +az functionapp list-runtimes +``` + +For each deployment slot requiring remediation, run the following command with the appropriate parameters to update the Java version: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.[javaContainer|javaContainerVersion|javaVersion|linuxFxVersion]="" +``` + +## Default Value + +The version is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-language-java-deploy-run +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-3-define-and-establish-secure-configurations-for-compute-resources +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-6-rapidly-and-automatically-remediate-vulnerabilities +4. https://www.oracle.com/java/technologies/java-se-support-roadmap.html +5. https://learn.microsoft.com/en-us/cli/azure/functionapp +6. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.10/SKILL.md new file mode 100644 index 0000000000..6960c8f4a0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.10/SKILL.md @@ -0,0 +1,102 @@ +--- +name: cis-azure-compute-2.4.10 +description: "Ensure incoming client certificates are enabled and required (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.10" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure incoming client certificates are enabled and required (if in use) + +## Description + +Client certificates allow for the deployment slot to request a certificate for incoming requests. Only clients that have a valid certificate will be able to reach the deployment slot. + +This recommendation applies to function apps using the Consumption, Premium, or Dedicated (App Service) plans, which support deployment slots. + +## Rationale + +The TLS mutual authentication technique in enterprise environments ensures the authenticity of clients to the server. If incoming client certificates are enabled, then only an authenticated client with valid certificates can access the deployment slot. + +## Impact + +Utilizing and maintaining client certificates will require additional work to obtain and manage replacement and key rotation. + +NOTE: This recommendation cannot be implemented if following the recommendation titled "Ensure 'HTTP version' is set to '2.0' (if in use)." This recommendation should only be considered for scenarios where HTTP versions prior to 2.0 are required for a deployment slot, and mutual certificate authentication is desired for validating clients. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Incoming client certificates`, ensure that `Client certificate mode` is set to `Required`. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `clientCertEnabled` is set to `true`, and `clientCertMode` is set to `Required`. + +## Expected Result + +The `clientCertEnabled` should be `true` and `clientCertMode` should be `Required`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Incoming client certificates`, set `Client certificate mode` to `Required`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to enable and require incoming client certificates: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.clientCertEnabled=true --set properties.clientCertMode=Required +``` + +## Default Value + +By default, incoming client certificates are disabled. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-identity-management#im-4-authenticate-server-and-services +2. https://learn.microsoft.com/en-gb/azure/app-service/app-service-web-configure-tls-mutual-auth +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.11/SKILL.md new file mode 100644 index 0000000000..e16c45c84d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.11/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-azure-compute-2.4.11 +description: "Ensure managed identities are configured" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.11" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure managed identities are configured + +## Description + +Managed identities from Microsoft Entra ID allow function app deployment slots to securely access other Azure services without the need to provision or rotate any secrets. + +This recommendation applies to function apps using the Consumption, Premium, or Dedicated (App Service) plans, which support deployment slots. + +## Rationale + +Using managed identities with function app deployment slots eliminates the need to store and manage credentials to access Azure resources. + +## Impact + +Minor administrative overhead to configure and manage role assignments for managed identities. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Identity`. +6. Ensure that in the `System assigned` pane, the `Status` is set to `On`, and an `Object (principal) ID` is displayed, or that in the `User assigned` pane, a managed identity is listed. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `identity` contains `type` set to `SystemAssigned`, `UserAssigned`, or both. + +## Expected Result + +The deployment slot should have a managed identity configured, either system-assigned, user-assigned, or both. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Identity`. +6. To add a system assigned managed identity: + 1. In the `System assigned` pane, under `Status`, click `On`. + 2. Click `Save`. + 3. Click `Yes`. +7. To add a user assigned managed identity: + 1. In the `User assigned` pane, click `Add`. + 2. Use the filter box to search for a managed identity. + 3. Select the identity. + 4. Click `Add`. +8. Repeat steps 1-7 for each function app and deployment slot requiring remediation. + +### Using Azure PowerShell + +For each deployment slot requiring remediation, run the following command to assign a system-assigned managed identity: + +```powershell +Set-AzWebAppSlot -ResourceGroupName -Name -Slot -AssignIdentity $true +``` + +## Default Value + +Managed identities are disabled by default for function app deployment slots. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-1-use-centralized-identity-and-authentication-system +2. https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/powershell/module/az.websites/set-azwebappslot + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.12/SKILL.md new file mode 100644 index 0000000000..1b152a0ede --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.12/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-azure-compute-2.4.12 +description: "Ensure public network access is disabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.12" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure public network access is disabled + +## Description + +Disable public network access to prevent exposure to the internet and reduce the risk of unauthorized access. Use private endpoints to securely manage access within trusted networks. + +This recommendation applies to function apps using the Consumption, Premium, or Dedicated (App Service) plans, which support deployment slots. + +## Rationale + +Disabling public network access improves security by ensuring that the service is not directly exposed to the public Internet. This has the added benefit of providing more granular control over security settings and configurations for those additional layers of separation. + +## Impact + +NOTE: Prior to disabling public network access, it is strongly recommended that, for each function app deployment slot, either: + +- complete virtual network integration as described in "Ensure app is integrated with a virtual network" + +OR + +- set up private endpoints/links as described in "Ensure private endpoints are used to access App Service apps." + +Disabling public network access restricts direct access to the service. This enhances security but will require the configuration of a virtual network and/or private endpoints for any services or users needing access within trusted networks. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Inbound traffic configuration`, ensure that `Public network access` is set to `Disabled`. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `publicNetworkAccess` is set to `Disabled`. + +## Expected Result + +The `publicNetworkAccess` property should be set to `Disabled`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Inbound traffic configuration`, click the text next to `Public network access`. +7. Select the radio button next to `Disabled`. +8. Click `Save`. +9. Check the box to confirm the change. +10. Click `Continue`. +11. Repeat steps 1-10 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to disable public network access: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.publicNetworkAccess=Disabled +``` + +## Default Value + +By default, public network access is enabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/networking-features +2. https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-slots +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.13/SKILL.md new file mode 100644 index 0000000000..172f06809a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.13/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-azure-compute-2.4.13 +description: "Ensure deployment slot is integrated with a virtual network" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.13" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure deployment slot is integrated with a virtual network + +## Description + +Integrate function app deployment slots with a virtual network to enable access to resources in or through a non-internet-routable virtual network. + +This recommendation applies to function apps using the Premium or Dedicated (App Service) plans, which support deployment slots and virtual networking. + +## Rationale + +Integrate function app deployment slots with a virtual network for increased security and control. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Outbound traffic configuration`, next to `Virtual network integration`, ensure that a virtual network and subnet name are displayed. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `virtualNetworkSubnetId` is set to a virtual network subnet ID. + +## Expected Result + +The `virtualNetworkSubnetId` property should be set to a valid virtual network subnet ID. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Outbound traffic configuration`, next to `Virtual network integration`, click `Not configured`. +7. Click `Add virtual network integration`. +8. Select an existing App Service Plan connection, or select `New connection` and select a subscription, virtual network, and subnet. +9. Click `Connect`. +10. Repeat steps 1-9 for each function app and deployment slot requiring remediation. + +## Default Value + +By default, virtual network integration is not configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-functions/functions-networking-options +2. https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration +3. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-enable +4. https://learn.microsoft.com/en-us/cli/azure/functionapp + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.14/SKILL.md new file mode 100644 index 0000000000..b6fe0b8797 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.14/SKILL.md @@ -0,0 +1,84 @@ +--- +name: cis-azure-compute-2.4.14 +description: "Ensure configuration is routed through the virtual network integration" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.14" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure configuration is routed through the virtual network integration + +## Description + +By default, configuration traffic for function app deployment slots goes directly over the public route. Container image pulls and content sharing can be routed through the virtual network integration. + +This recommendation applies to function apps using the Premium or Dedicated (App Service) plans, which support deployment slots and virtual networking. + +This recommendation should be applied after integrating a function app deployment slot with a virtual network. + +## Rationale + +Route container image pulls and content sharing through a virtual network integration for increased security and control. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `vnetImagePullEnabled` and `vnetContentShareEnabled` are set to `true`. + +## Expected Result + +Both `vnetImagePullEnabled` and `vnetContentShareEnabled` should be set to `true`. + +## Remediation + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to route container image pulls and content sharing through the virtual network integration: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.vnetImagePullEnabled=true --set properties.vnetContentShareEnabled=true +``` + +## Default Value + +By default, configuration traffic goes directly over the public route. + +## Additional Information + +In addition to configuring the routing for content sharing, you must also ensure that any firewall or Network Security Group configured on traffic from the subnet allow traffic to port 443 and 445. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration#routes +2. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-routing#configure-configuration-routing +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.15/SKILL.md new file mode 100644 index 0000000000..a6e90c893c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.15/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-azure-compute-2.4.15 +description: "Ensure all traffic is routed through the virtual network" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.15" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure all traffic is routed through the virtual network + +## Description + +Enable `vnetRouteAllEnabled` to ensure all outbound traffic is routed through the integrated virtual network. + +This recommendation should be applied after integrating a function app deployment slot with a virtual network. + +## Rationale + +Routing all outbound traffic through the virtual network enhances security. + +## Impact + +Additional configuration may be required to ensure that traffic is routed properly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Outbound traffic configuration`, next to `Virtual network integration`, click the virtual network and subnet name. +7. Under `Application routing`, ensure that the box next to `Outbound internet traffic` is checked. +8. Repeat steps 1-7 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `vnetRouteAllEnabled` is set to `true`. + +## Expected Result + +The `vnetRouteAllEnabled` property should be set to `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Networking`. +6. Under `Outbound traffic configuration`, next to `Virtual network integration`, click the virtual network and subnet name. +7. Under `Application routing`, check the box next to `Outbound internet traffic`. +8. Click `Apply`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to route all traffic through the virtual network: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.vnetRouteAllEnabled=true +``` + +## Default Value + +For deployment slots integrated with a virtual network, all traffic is routed through the virtual network by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-routing#configure-application-routing +2. https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#vnetrouteallenabled +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.16/SKILL.md new file mode 100644 index 0000000000..77f4f801f7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.16/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-azure-compute-2.4.16 +description: "Ensure cross-origin resource sharing does not allow all origins" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.16" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure cross-origin resource sharing does not allow all origins + +## Description + +Cross-origin resource sharing (CORS) is a security feature that controls how applications interact with resources hosted on different domains. + +This recommendation applies to function apps using the Consumption, Premium, or Dedicated (App Service) plans, which support deployment slots. + +## Rationale + +Restrict CORS to only trusted origins to help enforce proper access control and reduce exposure to malicious cross-origin requests. + +## Impact + +Configuration is required to ensure that the appropriate origins have access. + +Setting up a proper CORS policy can be fairly complex and an incorrect setting could permit Cross-Site Request Forgery (CSRF). The "caveat" is that if the app being deployed is a PUBLIC API, a wildcard "\*" CORS policy is absolutely necessary. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Service` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of deployment slot. +5. Under `API`, click `CORS`. +6. Ensure `Allowed Origins` does not include `*`. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the CORS allowed origins setting: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.cors.allowedOrigins +``` + +Ensure that the response does not include `*`. + +## Expected Result + +The `allowedOrigins` array should not contain `*` (wildcard). + +## Remediation + +### Using Azure Portal + +1. Go to `App Service` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of deployment slot. +5. Under `API`, click `CORS`. +6. Under `Allowed Origins`, delete the entry that equals `*`. +7. Specify the origins that should be allowed to make cross-origin calls. +8. Click `Save`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to update the allowed origins array to contain only the origins that should be allowed: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.cors.allowedOrigins="['']" +``` + +## Default Value + +By default, `Allowed Origins` is set to `https://portal.azure.com`. + +## References + +1. https://learn.microsoft.com/en-gb/azure/app-service/app-service-web-tutorial-rest-api +2. https://learn.microsoft.com/en-us/cli/azure/functionapp +3. https://learn.microsoft.com/en-us/cli/azure/resource +4. https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html +5. https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS +6. https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.2/SKILL.md new file mode 100644 index 0000000000..b1065c4488 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.2/SKILL.md @@ -0,0 +1,114 @@ +--- +name: cis-azure-compute-2.4.2 +description: "Ensure 'Python version' is currently supported (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.2" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Python version' is currently supported (if in use) + +## Description + +Periodically, older versions of Python may be deprecated and no longer supported. Using a supported version of Python for function app deployment slots is recommended to avoid potential unpatched vulnerabilities. + +## Rationale + +Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable. + +## Impact + +If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, ensure that for a `Stack` of `Python`, the `Python Version` reflects a currently supported release. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the Python version: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.[linuxFxVersion,pythonVersion] +``` + +If Python is in use, ensure the version is currently supported. + +Take note of the currently supported versions (given a status of "security") of Python here: https://devguide.python.org/versions/ + +## Expected Result + +If Python is in use, the Python version should reflect a currently supported release. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, for a `Stack` of `Python`, set the `Python Version` to a currently supported release. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +Run the following command to list supported runtimes: + +```bash +az functionapp list-runtimes +``` + +For each deployment slot requiring remediation, run the following command with the appropriate parameters to update the Python version: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.linuxFxVersion="PYTHON|" +``` + +## Default Value + +The version is selected during creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-common#configure-language-stack-settings +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities +3. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-3-establish-secure-configurations-for-compute-resources +4. https://devguide.python.org/versions/ +5. https://learn.microsoft.com/en-us/cli/azure/functionapp +6. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.3/SKILL.md new file mode 100644 index 0000000000..e3455e25a0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.3/SKILL.md @@ -0,0 +1,136 @@ +--- +name: cis-azure-compute-2.4.3 +description: "Ensure 'Basic Authentication Publishing Credentials' are 'Disabled'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.3" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Basic Authentication Publishing Credentials' are 'Disabled' + +## Description + +Basic Authentication Publishing Credentials provides the ability to publish -- or deploy to -- a function app deployment slot without a centralized Identity Provider. For a more effective, capable, and secure solution for Identity, Authentication, Authorization, and Accountability, a centralized Identity Provider such as Entra ID is strongly advised. + +This recommendation applies to function apps using the Consumption, Premium, or Dedicated (App Service) plans, which support deployment slots. + +## Rationale + +Basic Authentication introduces an identity silo for privileged access to a resource and produces logging which may not provide a full chain of accountability. This can be exploited in numerous ways and represents a significant vulnerability and attack vector. + +## Impact + +Disabling 'Basic Auth Publishing Credentials' will prevent the following deployment methods from working: + +FTP Basic Auth Publishing Credentials: + +- FTP +- FTPS + +SCM Basic Auth Publishing Credentials: + +- Local Git +- GitHub +- Azure Repos +- Bitbucket +- Visual Studio (Version 17.12 and earlier) + +If this recommendation cannot be implemented because one of the above listed deployment methods is necessary and cannot be adapted, compensating controls (e.g. using FTPS Only and disabling only "SCM Basic Auth Publishing Credentials") are recommended to reduce potential attack surface. + +An Identity Provider that can be used by the function app deployment slot for authenticating users is required. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of an app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, ensure that `SCM Basic Auth Publishing Credentials` and `FTP Basic Auth Publishing Credentials` are set to `Off`. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the basic authentication for FTP setting: + +```bash +az resource show --resource-group --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites//slots/ --query properties.allow +``` + +Ensure that `false` is returned. + +For each deployment slot, run the following command to get the basic authentication for SCM setting: + +```bash +az resource show --resource-group --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites//slots/ --query properties.allow +``` + +Ensure that `false` is returned. + +## Expected Result + +Both FTP and SCM basic authentication publishing credentials should return `false` for `properties.allow`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, set `SCM Basic Auth Publishing Credentials` and `FTP Basic Auth Publishing Credentials` to `Off`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to disable basic authentication for FTP: + +```bash +az resource update --resource-group --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites//slots/ --set properties.allow=false +``` + +For each deployment slot requiring remediation, run the following command to disable basic authentication for SCM: + +```bash +az resource update --resource-group --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites//slots/ --set properties.allow=false +``` + +## Default Value + +Basic authentication is enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-basic-auth-disable +2. https://learn.microsoft.com/en-us/cli/azure/functionapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.4/SKILL.md new file mode 100644 index 0000000000..40ed098b77 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.4/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-azure-compute-2.4.4 +description: "Ensure 'FTP state' is set to 'FTPS only' or 'Disabled'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.4" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'FTP state' is set to 'FTPS only' or 'Disabled' + +## Description + +By default, App Service supports deployment over FTP. If FTP is essential for a deployment workflow, FTPS should be enforced for all function app deployment slots. + +If FTPS is not explicitly required, the recommended setting is `Disabled`. + +## Rationale + +FTP is an unencrypted network protocol that transmits data -- including passwords -- in clear text. The use of this protocol can lead to both data and credential compromise and can present opportunities for exfiltration, persistence, and lateral movement. + +## Impact + +Deployment workflows that rely on FTP or FTPS rather than WebDeploy or HTTPS endpoints may be affected. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment Slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, ensure that `FTP state` is set to `FTPS only` or `Disabled`. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the FTPS state setting: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.ftpsState +``` + +Ensure that `"FtpsOnly"` or `"Disabled"` is returned. + +## Expected Result + +The `ftpsState` property should return `"FtpsOnly"` or `"Disabled"`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment Slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, set `FTP state` to `FTPS only` or `Disabled`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to set FTPS state to `FtpsOnly` or `Disabled`: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.ftpsState= +``` + +## Default Value + +By default, FTP state is set to `FTPS only`. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/deploy-ftp +2. https://learn.microsoft.com/en-us/azure/app-service/overview-security +3. https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-use-azure-function-app-settings#ftps-deployment-settings +4. https://learn.microsoft.com/en-us/cli/azure/functionapp +5. https://learn.microsoft.com/en-us/cli/azure/resource +6. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-4-encrypt-sensitive-information-in-transit +7. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-posture-vulnerability-management#pv-7-rapidly-and-automatically-remediate-software-vulnerabilities + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.5/SKILL.md new file mode 100644 index 0000000000..e8fc399dff --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.5/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-azure-compute-2.4.5 +description: "Ensure 'HTTP version' is set to '2.0' (if in use)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.5" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'HTTP version' is set to '2.0' (if in use) + +## Description + +Periodically, newer versions are released for HTTP, either due to security flaws or to include additional functionalities. Using the latest HTTP version allows apps to take advantage of security fixes, if any, and/or new functionalities of the newer version. + +## Rationale + +Newer versions may contain security enhancements and additional functionalities. Using the latest version is recommended in order to take advantage of enhancements and new capabilities. With each software installation, organizations need to determine if a given update meets their requirements. They must also verify the compatibility and support provided for any additional software against the update revision that is selected. + +HTTP 2.0 has additional performance improvements for the head-of-line blocking problem of the old HTTP version, header compression, and request prioritization. HTTP 2.0 no longer supports HTTP 1.1's chunked transfer encoding mechanism, as it provides its own, more efficient mechanisms for data streaming. + +## Impact + +Most modern browsers support the HTTP/2 protocol over TLS only, while non-encrypted traffic continues to use HTTP/1.1. To ensure that client browsers connect to your app with HTTP/2, either purchase an App Service Certificate for your app's custom domain or bind a third-party certificate. + +NOTE: HTTP/2 cannot be used in tandem with mutual authentication or client certificates. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, ensure that `HTTP version` is set to `2.0`. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the `http20Enabled` setting: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.http20Enabled +``` + +Ensure that `true` is returned. + +## Expected Result + +The `http20Enabled` property should return `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, set `HTTP version` to `2.0`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to enable `http20Enabled`: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.http20Enabled=true +``` + +## Default Value + +By default, `HTTP version` is set to `1.1`. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-common#general-settings +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-3-define-and-establish-secure-configurations-for-compute-resources +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-6-rapidly-and-automatically-remediate-vulnerabilities +4. https://learn.microsoft.com/en-us/cli/azure/functionapp +5. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.6/SKILL.md new file mode 100644 index 0000000000..e1ba47a02a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.6/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-azure-compute-2.4.6 +description: "Ensure 'HTTPS Only' is set to 'On'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.6" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'HTTPS Only' is set to 'On' + +## Description + +Azure App Service allows function app deployment slots to run under both HTTP and HTTPS by default. Function app deployment slots can be accessed by anyone using non-secure HTTP links by default. Non-secure HTTP requests can be restricted and all HTTP requests redirected to the secure HTTPS port. It is recommended to enforce HTTPS-only traffic. + +This recommendation applies to function apps using the Consumption, Premium, or Dedicated (App Service) plans, which support deployment slots. + +## Rationale + +Enabling HTTPS-only traffic will redirect all non-secure HTTP requests to HTTPS ports. HTTPS uses the TLS/SSL protocol to provide a secure connection which is both encrypted and authenticated. It is therefore important to support HTTPS for the security benefits. + +## Impact + +When it is enabled, every incoming HTTP request is redirected to the HTTPS port. This means an extra level of security will be added to the HTTP requests made to the deployment slot. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` tab, under `Platform settings`, ensure that `HTTPS Only` is set to `On`. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `httpsOnly` is set to `true`. + +## Expected Result + +The `httpsOnly` property should be set to `true`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` tab, under `Platform settings`, next to `HTTPS Only`, select the radio button next to `On`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to enable `HTTPS Only`: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.httpsOnly=true +``` + +## Default Value + +`HTTPS Only` is enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-security#https-and-certificates +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-3-encrypt-sensitive-data-in-transit +3. https://techcommunity.microsoft.com/t5/azure-paas-blog/enable-https-setting-on-azure-app-service-using-azure-policy/ba-p/3286603 +4. https://learn.microsoft.com/en-us/azure/azure-functions/security-concepts +5. https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-slots +6. https://learn.microsoft.com/en-us/cli/azure/functionapp +7. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.7/SKILL.md new file mode 100644 index 0000000000..c163ab5136 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.7/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-azure-compute-2.4.7 +description: "Ensure 'Minimum Inbound TLS Version' is set to '1.2' or higher" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.7" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Minimum Inbound TLS Version' is set to '1.2' or higher + +## Description + +The TLS (Transport Layer Security) protocol secures the transmission of data over the internet using standard encryption technology. Function app deployment slots use TLS 1.2 for the `Minimum Inbound TLS Version` by default and allow for the use of TLS versions 1.0, 1.1, and 1.3. NIST strongly suggests the use of TLS 1.2 and recommends the adoption of TLS 1.3. + +## Rationale + +TLS 1.0 and 1.1 are outdated and vulnerable to security risks. Since TLS 1.2 and TLS 1.3 provide enhanced security and improved performance, it is highly recommended to use TLS 1.2 or higher whenever possible. + +## Impact + +Using the latest TLS version may affect compatibility with clients and backend services. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, ensure that `Minimum Inbound TLS Version` is set to `1.2` or higher. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the TLS version setting: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.minTlsVersion +``` + +Ensure that `"1.2"` or higher is returned. + +## Expected Result + +The `minTlsVersion` property should return `"1.2"` or higher. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Platform settings`, click the drop-down next to `Minimum Inbound TLS Version` and select `1.2` or higher. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to update the TLS version: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.minTlsVersion=<1.2|1.3> +``` + +## Default Value + +By default, TLS version is set to 1.2. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-bindings#how-can-i-change-the-minimum-tls-versions-for-the-app +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-8-detect-and-disable-insecure-services-and-protocols +4. https://learn.microsoft.com/en-us/cli/azure/functionapp +5. https://learn.microsoft.com/en-us/cli/azure/resource +6. https://csrc.nist.gov/news/2019/nist-publishes-sp-800-52-revision-2 + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.8/SKILL.md new file mode 100644 index 0000000000..73964eaaf6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.8/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-compute-2.4.8 +description: "Ensure end-to-end TLS encryption is enabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.8" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure end-to-end TLS encryption is enabled + +## Description + +End-to-end (E2E) TLS encryption ensures that front-end to worker communication within function app deployment slots is encrypted using TLS. Without this feature, while incoming HTTPS requests are encrypted to the front ends, the traffic from front ends to workers running the application workloads would travel unencrypted inside Azure's infrastructure. + +This recommendation applies to function apps using the Consumption, Premium, or Dedicated (App Service) plans, which support deployment slots. + +## Rationale + +E2E TLS helps ensure full encryption of traffic between: + +- Clients and front ends +- Front ends and worker processes hosting the application + +## Impact + +Enabling end-to-end TLS encryption may introduce minimal latency and require additional configuration of certificates and HTTPS settings to ensure compatibility. + +## Audit Procedure + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, ensure that `endToEndEncryptionEnabled` is set to `true`. + +## Expected Result + +The `endToEndEncryptionEnabled` property should be set to `true`. + +## Remediation + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to enable end-to-end TLS encryption: + +```bash +az resource update --resource-group --name /slots/ --resource-type "Microsoft.Web/sites" --set properties.endToEndEncryptionEnabled=true +``` + +## Default Value + +By default, end-to-end TLS encryption is disabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/overview-tls#end-to-end-tls-encryption +2. https://learn.microsoft.com/en-us/cli/azure/functionapp +3. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.9/SKILL.md new file mode 100644 index 0000000000..b0dde2979b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.4.9/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-azure-compute-2.4.9 +description: "Ensure 'Remote debugging' is set to 'Off'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, functions, deployment-slots] +cis_id: "2.4.9" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Remote debugging' is set to 'Off' + +## Description + +Remote debugging allows a function app deployment slot to be debugged in real-time directly in the Azure environment. When remote debugging is enabled, it opens a communication channel that could potentially be exploited by unauthorized users if not properly secured. + +## Rationale + +Disabling remote debugging on a function app deployment slot is primarily about enhancing security. + +Remote debugging opens a communication channel that can be exploited by attackers. By disabling it, you reduce the number of potential entry points for unauthorized access. + +If remote debugging is enabled without proper access controls, it can allow unauthorized users to connect to your deployment slot, potentially leading to data breaches or malicious code execution. + +During a remote debugging session, sensitive information might be exposed. Disabling remote debugging helps ensure that such data remains secure. This minimizes the use of remote access tools to reduce risk. + +## Impact + +You will not be able to connect to your deployment slot from a remote location to diagnose and fix issues in real-time. You will not be able to step through code, set breakpoints, or inspect variables and the call stack while the deployment slot is running on the server. Remote debugging is particularly useful for diagnosing issues that only occur in the production environment. Without it, you will need to rely on logs and other diagnostic tools. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Debugging`, ensure that `Remote debugging` is set to `Off`. +7. Repeat steps 1-6 for each function app and deployment slot. + +### Using Azure CLI + +Run the following command to list function apps: + +```bash +az functionapp list +``` + +For each function app, run the following command to list deployment slots: + +```bash +az functionapp deployment slot list --resource-group --name +``` + +For each deployment slot, run the following command to get the remote debugging setting: + +```bash +az resource show --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --query properties.remoteDebuggingEnabled +``` + +Ensure that `false` is returned. + +## Expected Result + +The `remoteDebuggingEnabled` property should return `false`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Services` or `Function App`. +2. Click the name of a function app. +3. Under `Deployment`, click `Deployment slots`. +4. Click the name of a deployment slot. +5. Under `Settings`, click `Configuration`. +6. In the `General settings` pane, under `Debugging`, set `Remote debugging` to `Off`. +7. Click `Save`. +8. Click `Continue`. +9. Repeat steps 1-8 for each function app and deployment slot requiring remediation. + +### Using Azure CLI + +For each deployment slot requiring remediation, run the following command to disable remote debugging: + +```bash +az resource update --name web --resource-group --namespace Microsoft.Web --resource-type config --parent sites//slots/ --set properties.remoteDebuggingEnabled=false +``` + +## Default Value + +By default, remote debugging is set to `off`. + +## References + +1. https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-azure-app-service +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-2-audit-and-enforce-secure-configurations +3. https://learn.microsoft.com/en-us/cli/azure/functionapp +4. https://learn.microsoft.com/en-us/cli/azure/resource + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.5/SKILL.md new file mode 100644 index 0000000000..c7ec558fd8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.5/SKILL.md @@ -0,0 +1,125 @@ +--- +name: cis-azure-compute-2.5 +description: "Ensure Azure Key Vaults are Used to Store Secrets" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, key-vault, secrets] +cis_id: "2.5" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Azure Key Vaults are Used to Store Secrets + +## Description + +Azure Key Vault will store multiple types of sensitive information such as encryption keys, certificate thumbprints, and Managed Identity Credentials. Access to these 'Secrets' can be controlled through granular permissions. + +## Rationale + +The credentials given to an application have permissions to create, delete, or modify data stored within the systems they access. If these credentials are stored within the application itself, anyone with access to the application or a copy of the code has access to them. Storing within Azure Key Vault as secrets increases security by controlling access. This also allows for updates of the credentials without redeploying the entire application. + +## Impact + +Integrating references to secrets within the key vault are required to be specifically integrated within the application code. This will require additional configuration to be made during the writing of an application, or refactoring of an already written one. There are also additional costs that are charged per 10000 requests to the Key Vault. + +## Audit Procedure + +### Using Azure Portal + +1. Login to Azure Portal. +2. In the expandable menu on the left go to `Key Vaults`. +3. View the Key Vaults listed. + +### Using Azure CLI + +To list key vaults and/or HSMs within a subscription run the following command: + +```bash +az keyvault list [--resource-type] --subscription +``` + +`--resource-type` could be either `__vault__` or `__hsm__`. When parameter is missing all types of vaults will be listed. + +To list the secrets within a target key vault run the following command: + +```bash +az keyvault secret list [--vault-name / --id] +``` + +To list the certificates within a target key vault run the following command: + +```bash +az keyvault certificate list [--vault-name / --id] +``` + +To list the keys within a target key vault run the following command: + +```bash +az keyvault secret list [--vault-name / --id] +``` + +`--id` represents the full URI of the vault. `--vault-name` represents the name and must be present if `--id` is missing. + +### Using Azure PowerShell + +To list key vaults within a subscription run the following command: + +```powershell +Get-AzKeyVault +``` + +To list all secrets in a key vault run the following command: + +```powershell +Get-AzKeyVaultSecret -VaultName '' +``` + +## Expected Result + +Azure Key Vaults should be created and secrets should be stored within them rather than in application code or configuration files. + +## Remediation + +Remediation has 2 steps: + +1. Set up the Key Vault +2. Set up the App Service to use the Key Vault + +### Step 1: Set up the Key Vault + +#### Using Azure CLI + +```bash +az keyvault create --name "" --resource-group "" --location myLocation +``` + +#### Using Azure PowerShell + +```powershell +New-AzKeyvault -name -ResourceGroupName -Location +``` + +### Step 2: Set up the App Service to use the Key Vault + +Configure the App Service to reference secrets from Key Vault using Key Vault references in application settings. Use a system-assigned managed identity with appropriate access policies granting "get" permission on secrets. + +## Default Value + +By default, no Azure Key Vaults are created. + +## References + +1. https://docs.microsoft.com/en-us/azure/app-service/app-service-key-vault-references +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-3-manage-application-identities-securely-and-automatically +3. https://docs.microsoft.com/en-us/cli/azure/keyvault?view=azure-cli-latest +4. https://docs.microsoft.com/en-us/cli/azure/keyvault?view=azure-cli-latest + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.6/SKILL.md new file mode 100644 index 0000000000..7b84346d42 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.6/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-azure-compute-2.6 +description: "Ensure App Service Environment is deployed with an internal load balancer" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service-environment, ase] +cis_id: "2.6" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure App Service Environment is deployed with an internal load balancer + +## Description + +App Service Environment apps should not be reachable over public internet. To ensure apps deployed in an App Service Environment are not accessible over public internet, one should deploy App Service Environment with an IP address in virtual network. To set the IP address to a virtual network IP, the App Service Environment must be deployed with an internal load balancer. + +## Rationale + +Disabling public network access improves security by ensuring that a service is not exposed on the public internet. + +## Impact + +Disabling public network access restricts access to the service. This enhances security but may require the configuration of private endpoints for any services or users needing access within trusted networks. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Service Environments`. +2. For each App Service Environment, ensure that `Virtual IP Type` is set to `Internal`. + +### Using Azure CLI + +Run the following command to list App Service Environments: + +```bash +az appservice ase list +``` + +For each App Service Environment, ensure that `internalLoadBalancingMode` is not set to `None`. + +## Expected Result + +The `internalLoadBalancingMode` should not be set to `None`. The `Virtual IP Type` should be `Internal`. + +## Remediation + +It is not possible to change the virtual IP configuration of a deployed App Service Environment. + +When deploying an App Service Environment, next to `Virtual IP`, select `Internal: The endpoint is an internal load balancer (ILB ASE)`. + +## Default Value + +When deploying an App Service Environment, `Internal: The endpoint is an internal load balancer (ILB ASE)` is the default selected option for `Virtual IP`. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/environment/creation + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.7/SKILL.md new file mode 100644 index 0000000000..4809768841 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.7/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-azure-compute-2.7 +description: "Ensure App Service Environment is provisioned with v3 or higher" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service-environment, ase] +cis_id: "2.7" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure App Service Environment is provisioned with v3 or higher + +## Description + +Ensure App Service Environment is provisioned with v3 or higher to benefit from the latest enhancements. + +## Rationale + +Older versions of App Service Environment require manual management of Azure resources and have greater scaling limitations. + +## Impact + +Manual configuration may be required to complete the migration and to optimize your App Service plan SKU choice to meet your needs. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Service Environments`. +2. Click the name of an App Service Environment. +3. Ensure that `Version` displays `App Service Environment v3` or higher. +4. Repeat steps 1-3 for each App Service Environment. + +### Using Azure CLI + +Run the following command to list App Service Environments: + +```bash +az appservice ase list +``` + +For each App Service Environment, ensure that `kind` is set to `ASEV3` or higher. + +## Expected Result + +The `kind` property should be `ASEV3` or higher. The `Version` should display `App Service Environment v3`. + +## Remediation + +### Using Azure Portal + +When creating an App Service Environment from the portal, after clicking `+ Add`, ensure that `Create App Service Environment v3` is displayed. + +## Default Value + +The default version is currently App Service Environment v3. + +## Additional Information + +App Service Environment v1 and v2 were retired as of 31 August, 2024. As of September 1, 2024, Azure auto-migrated any remaining App Service Environment v1 and v2 on a best-effort basis. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/environment/overview +2. https://azure.microsoft.com/en-gb/updates?id=App-Service-Environment-v1v2-Retirement-Update-1 +3. https://learn.microsoft.com/en-us/azure/app-service/environment/auto-migration +4. https://learn.microsoft.com/en-us/cli/azure/appservice/ase + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.8/SKILL.md new file mode 100644 index 0000000000..2c22885367 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.8/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-azure-compute-2.8 +description: "Ensure App Service Environment has internal encryption enabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service-environment, ase] +cis_id: "2.8" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure App Service Environment has internal encryption enabled + +## Description + +The App Service Environment operates as a black box system where you cannot see the internal components or the communication within the system. To enable higher throughput, encryption is not enabled by default between internal components. The system is secure as the traffic is inaccessible to being monitored or accessed. + +However, if you have a compliance requirement that requires complete encryption of the data path from end to end, you can enable encryption of the complete data path with a clusterSetting. + +## Rationale + +Setting InternalEncryption to true encrypts internal network traffic in your App Service Environment between the front ends and workers, encrypts the pagefile, and also encrypts the worker disks. + +## Impact + +At the point that this setting becomes desirable, an architectural review to evaluate a move to Azure Confidential Computing should be considered. + +After the InternalEncryption clusterSetting is enabled, there can be an impact to your system performance and the additional resource demand will likely also increase the associated cost. When you make the change to enable InternalEncryption, your App Service Environment will be in an unstable state until the change is fully propagated. Complete propagation of the change can take a few hours to complete, depending on how many instances you have in your App Service Environment. Azure recommends that you do not enable InternalEncryption on an App Service Environment while it is in use. If you need to enable InternalEncryption on an actively used App Service Environment, Azure recommends that you divert traffic to a backup environment until the operation completes. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Service Environments`. +2. Click the name of an App Service Environment. +3. Under `Settings`, click `Configuration`. +4. Ensure that `Internal encryption` is set to `On`. +5. Repeat steps 1-4 for each App Service Environment. + +### Using Azure CLI + +Run the following command to list App Service Environments: + +```bash +az appservice ase list +``` + +For each App Service Environment, ensure that `clusterSettings` includes: + +```json +{ + "name": "InternalEncryption", + "value": "true" +} +``` + +## Expected Result + +The `clusterSettings` should include an `InternalEncryption` setting with value `"true"`. In the portal, `Internal encryption` should be set to `On`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Service Environments`. +2. Click the name of an App Service Environment. +3. Under `Settings`, click `Configuration`. +4. Next to `Internal encryption`, click the radio button next to `On`. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each App Service Environment requiring remediation. + +## Default Value + +Internal encryption is disabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/environment/app-service-app-service-environment-custom-settings +2. https://learn.microsoft.com/en-us/cli/azure/appservice/ase + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.9/SKILL.md new file mode 100644 index 0000000000..6a147a776d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-2.9/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-azure-compute-2.9 +description: "Ensure App Service Environment has TLS 1.0 and 1.1 disabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, app-service-environment, ase] +cis_id: "2.9" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure App Service Environment has TLS 1.0 and 1.1 disabled + +## Description + +The TLS (Transport Layer Security) protocol secures the transmission of data over the internet using standard encryption technology. TLS versions 1.0 and 1.1 have been deprecated, and their use is generally discouraged. Disable all inbound TLS 1.0 and TLS 1.1 traffic for all the apps in an App Service Environment. + +## Rationale + +TLS 1.0 and 1.1 are outdated and vulnerable to security risks. + +## Impact + +Disallowing TLS 1.0 and 1.1 may affect compatibility with clients and backend services. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Service Environments`. +2. Click the name of an App Service Environment. +3. Under `Settings`, click `Configuration`. +4. Ensure that `Allow TLS 1.0 and 1.1` is set to `Off`. +5. Repeat steps 1-4 for each App Service Environment. + +### Using Azure CLI + +Run the following command to list App Service Environments: + +```bash +az appservice ase list +``` + +For each App Service Environment, ensure that `clusterSettings` includes: + +```json +{ + "name": "DisableTls1.0", + "value": "1" +} +``` + +## Expected Result + +The `clusterSettings` should include a `DisableTls1.0` setting with value `"1"`. In the portal, `Allow TLS 1.0 and 1.1` should be set to `Off`. + +## Remediation + +### Using Azure Portal + +1. Go to `App Service Environments`. +2. Click the name of an App Service Environment. +3. Under `Settings`, click `Configuration`. +4. Next to `Allow TLS 1.0 and 1.1`, click the radio button next to `Off`. +5. Click `Save`. +6. Click `Continue`. +7. Repeat steps 1-6 for each App Service Environment requiring remediation. + +## Default Value + +TLS 1.0 and 1.1 are allowed by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/environment/app-service-app-service-environment-custom-settings +2. https://learn.microsoft.com/en-us/cli/azure/appservice/ase + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.1/SKILL.md new file mode 100644 index 0000000000..25fe99bfde --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.1/SKILL.md @@ -0,0 +1,102 @@ +--- +name: cis-azure-compute-20.1 +description: "Ensure Virtual Machines are utilizing Managed Disks" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.1" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Virtual Machines are utilizing Managed Disks + +## Description + +Migrate blob-based VHDs to Managed Disks on Virtual Machines to exploit the default features of this configuration. The features include: + +1. Default Disk Encryption +2. Resilience, as Microsoft will manage the disk storage and move around if underlying hardware goes faulty +3. Reduction of costs over storage accounts + +## Rationale + +Managed disks are by default encrypted on the underlying hardware, so no additional encryption is required for basic protection. It is available if additional encryption is required. Managed disks are by design more resilient than storage accounts. + +For ARM-deployed Virtual Machines, Azure Adviser will at some point recommend moving VHDs to managed disks both from a security and cost management perspective. + +## Impact + +There are additional costs for managed disks based off of disk space allocated. When converting to managed disks, VMs will be powered off and back on. + +## Audit Procedure + +### Using Azure Portal + +1. Using the search feature, go to `Virtual Machines` +2. Click the `Manage view` dropdown, then select `Edit columns` +3. Add `Uses managed disks` to the selected columns +4. Select `Save` +5. Ensure all virtual machines listed are using managed disks + +### Using Azure PowerShell + +```powershell +Get-AzVM | ForEach-Object {"Name: " + $_.Name;"ManagedDisk Id: " + $_.StorageProfile.OsDisk.ManagedDisk.Id;""} +``` + +Example output: + +``` +Name: vm1 +ManagedDisk Id: /disk1/id + +Name: vm2 +ManagedDisk Id: /disk2/id +``` + +If the 'ManagedDisk Id' field is empty the os disk for that vm is not managed. + +## Expected Result + +All Virtual Machines should have a non-empty `ManagedDisk Id` value, indicating they are using managed disks. + +## Remediation + +### Using Azure Portal + +1. Using the search feature, go to `Virtual Machines` +2. Select the virtual machine you would like to convert +3. Select `Disks` in the menu for the VM +4. At the top select `Migrate to managed disks` +5. You may follow the prompts to convert the disk and finish by selecting `Migrate` to start the process + +**NOTE** VMs will be stopped and restarted after migration is complete. + +### Using Azure PowerShell + +```powershell +Stop-AzVM -ResourceGroupName $rgName -Name $vmName -Force +ConvertTo-AzVMManagedDisk -ResourceGroupName $rgName -VMName $vmName +Start-AzVM -ResourceGroupName $rgName -Name $vmName +``` + +## Default Value + +Managed disks or are an option upon the creation of VMs. + +## References + +1. https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-4-enable-data-at-rest-encryption-by-default +3. https://docs.microsoft.com/en-us/azure/virtual-machines/faq-for-disks +4. https://azure.microsoft.com/en-us/pricing/details/managed-disks/ + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.10/SKILL.md new file mode 100644 index 0000000000..c6ac3a5d10 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.10/SKILL.md @@ -0,0 +1,169 @@ +--- +name: cis-azure-compute-20.10 +description: "Ensure Trusted Launch is enabled on Virtual Machines" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.10" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Trusted Launch is enabled on Virtual Machines + +## Description + +When **Secure Boot** and **vTPM** are enabled together, they provide a strong foundation for protecting your VM from boot attacks. For example, if an attacker attempts to replace the bootloader with a malicious version, Secure Boot will prevent the VM from booting. If the attacker is able to bypass Secure Boot and install a malicious bootloader, vTPM can be used to detect the intrusion and alert you. + +## Rationale + +Secure Boot and vTPM work together to protect your VM from a variety of boot attacks, including bootkits, rootkits, and firmware rootkits. Not enabling Trusted Launch in Azure VM can lead to increased vulnerability to rootkits and boot-level malware, reduced ability to detect and prevent unauthorized changes to the boot process, and a potential compromise of system integrity and data security. + +## Impact + +Secure Boot and vTPM are not currently supported for Azure Generation 1 VMs. + +**IMPORTANT:** Before enabling Secure Boot and vTPM on a Generation 2 VM which does not already have both enabled, it is highly recommended to create a restore point of the VM prior to remediation. + +## Audit Procedure + +### Using Azure Portal + +1. Go to Virtual Machines +2. For each VM, under Settings, click on Configuration on the left blade +3. Under Security Type, make sure security type is not standard and if it is Trusted Launch Virtual Machines then make sure Enable Secure Boot & Enable vTPM are checked + +### Using Azure CLI + +Run the following command to list VM names and security profile settings: + +```bash +az vm list --query [*].[name,securityProfile] +``` + +For each VM, ensure that `securityType` is set to `TrustedLaunch`, `uefiSettings.secureBootEnabled` is set to `true`, and `uefiSettings.vTpmEnabled` is set to `true`. + +### Using Azure PowerShell + +Run the following command to list VMs: + +```powershell +Get-AzVm +``` + +Run the following command to get the VM in a resource group with a given name: + +```powershell +$vm = Get-AzVm -ResourceGroupName -Name +``` + +Run the following command to get the security profile settings for the VM: + +```powershell +$vm.SecurityProfile +``` + +Ensure that `SecurityType` is set to `TrustedLaunch`. + +Run the following command to get the UEFI settings for the VM: + +```powershell +$vm.SecurityProfile.UefiSettings +``` + +Ensure that `SecureBootEnabled` and `VTpmEnabled` are set to `True`. +Repeat for each VM. + +## Expected Result + +All VMs should have `securityType` set to `TrustedLaunch` with both `secureBootEnabled` and `vTpmEnabled` set to `true`. + +## Remediation + +**Note:** Trusted launch on existing virtual machines (VMs) is currently not supported for Azure Generation 1 VMs. + +### Using Azure Portal + +1. Go to Virtual Machines. +2. For each VM, under Settings, click on Configuration on the left blade. +3. Under Security Type, select 'Trusted Launch Virtual Machines'. +4. Make sure Enable Secure Boot & Enable vTPM are checked. +5. Click on Apply. + +### Using Azure CLI + +Ensure that it is safe to change the state of the VM. + +Run the following command to deallocate the VM: + +```bash +az vm deallocate --resource-group --name +``` + +Run the following command to update the VM, setting security type to `TrustedLaunch` and enabling `secure boot` and `vTPM`: + +```bash +az vm update --resource-group --name --enable-secure-boot true --enable-vtpm true --security-type TrustedLaunch +``` + +Run the following command to restart the VM: + +```bash +az vm start --resource-group --name +``` + +Repeat for each VM requiring remediation. + +### Using Azure PowerShell + +Ensure it is safe to change the state of the VM. + +Run the following command to stop the VM: + +```powershell +Stop-AzVm -ResourceGroupName -Name -Force +``` + +Run the following command to get the VM in a resource group with a given name: + +```powershell +$vm = Get-AzVM -ResourceGroupName -Name +``` + +Run the following command to update the VM, setting security type to `TrustedLaunch` and enabling `secure boot` and `vTPM`: + +```powershell +Update-AzVm -ResourceGroupName -VM $vm -EnableSecureBoot 1 -EnableVtpm 1 -SecurityType TrustedLaunch +``` + +Run the following command to start the VM: + +```powershell +Start-AzVm -ResourceGroupName -Name +``` + +Repeat for each VM requiring remediation. + +## Default Value + +On Azure Generation 2 VMs, vTPM is enabled by default. Secure Boot is not enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/virtual-machines/trusted-launch-existing-vm?tabs=portal +2. https://learn.microsoft.com/en-us/azure/virtual-machines/trusted-launch-existing-vm?tabs=portal#enable-trusted-launch-on-existing-vm +3. https://learn.microsoft.com/en-us/azure/virtual-machines/trusted-launch#secure-boot +4. https://learn.microsoft.com/en-us/cli/azure/vm +5. https://learn.microsoft.com/en-us/powershell/module/az.compute/get-azvm +6. https://learn.microsoft.com/en-us/powershell/module/az.compute/stop-azvm +7. https://learn.microsoft.com/en-us/powershell/module/az.compute/update-azvm +8. https://learn.microsoft.com/en-us/powershell/module/az.compute/start-azvm + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.11/SKILL.md new file mode 100644 index 0000000000..f419396c28 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.11/SKILL.md @@ -0,0 +1,184 @@ +--- +name: cis-azure-compute-20.11 +description: "Ensure that encryption at host is enabled" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.11" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that encryption at host is enabled + +## Description + +Encryption at host enhances Azure Disk Storage Server-Side Encryption to ensure that all temporary disks and disk caches are encrypted at rest and flow encrypted to the storage clusters. + +## Rationale + +Encryption at host provides an additional layer of security to protect sensitive information. + +## Impact + +- Virtual machines must be deallocated for encryption at host to be enabled. +- Encryption at host does not use virtual machine CPU, and does not impact virtual machine performance. +- Encryption at host cannot be enabled on virtual machines that have ever had Azure Disk Encryption enabled. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Virtual machines`. +2. Click the name of a virtual machine. +3. In the `Properties` pane, under `Disk`, ensure that `Encryption at host` is set to `Enabled`. +4. Repeat steps 1-3 for each virtual machine. + +### Using Azure CLI + +Run the following command to list VM names and security profile settings: + +```bash +az vm list --query [*].[name,securityProfile] +``` + +For each VM, ensure that `encryptionAtHost` is set to `true`. + +### Using Azure PowerShell + +Run the following command to list VMs: + +```powershell +Get-AzVm +``` + +Run the following command to get the VM in a resource group with a given name: + +```powershell +$vm = Get-AzVm -ResourceGroupName -Name +``` + +Run the following command to get the security profile settings for the VM: + +```powershell +$vm.SecurityProfile +``` + +Ensure that `EncryptionAtHost` is set to `True`. +Repeat for each VM. + +## Expected Result + +All VMs should have `encryptionAtHost` set to `true` in the security profile. + +## Remediation + +**Note:** Encryption at host must first be enabled in a subscription before it can be used for virtual machines. + +1. From Azure Portal, select the Cloud Shell icon. +2. Run the following command to set the context to the current subscription: + +```powershell +Set-AzContext -SubscriptionId +``` + +3. Run the following command to register the encryption at host feature for the subscription: + +```powershell +Register-AzProviderFeature -FeatureName "EncryptionAtHost" -ProviderNamespace "Microsoft.Compute" +``` + +4. Run the following command to confirm that the `RegistrationState` is `Registered`: + +```powershell +Get-AzProviderFeature -FeatureName "EncryptionAtHost" -ProviderNamespace "Microsoft.Compute" +``` + +### Using Azure Portal + +**Note:** Ensure that it is safe to change the state of the VM. + +1. Go to `Virtual machines`. +2. Click the name of a virtual machine. +3. Click `Stop`. +4. Click `Yes`. +5. Under `Settings`, click `Disks`. +6. Click `Additional settings`. +7. Next to `Encryption at host`, select `Yes`. +8. Click `Save`. +9. Click `Overview`. +10. Click `Start`. +11. Repeat steps 1-10 for each virtual machine requiring remediation. + +### Using Azure CLI + +**Note:** Ensure that it is safe to change the state of the VM. + +Run the following command to deallocate the VM: + +```bash +az vm deallocate --resource-group --name +``` + +Run the following command to update the VM, enabling `encryptionAtHost`: + +```bash +az vm update --resource-group --name --set securityProfile.encryptionAtHost=true +``` + +Run the following command to restart the VM: + +```bash +az vm start --resource-group --name +``` + +Repeat for each VM requiring remediation. + +### Using Azure PowerShell + +**Note:** Ensure that it is safe to change the state of the VM. + +Run the following command to stop the VM: + +```powershell +Stop-AzVm -ResourceGroupName -Name -Force +``` + +Run the following command to get the VM in a resource group with a given name: + +```powershell +$vm = Get-AzVM -ResourceGroupName -Name +``` + +Run the following command to update the VM, enabling `encryptionAtHost`: + +```powershell +Update-AzVm -ResourceGroupName -VM $vm -EncryptionAtHost 1 +``` + +Run the following command to start the VM: + +```powershell +Start-AzVm -ResourceGroupName -Name +``` + +Repeat for each VM requiring remediation. + +## Default Value + +Encryption at host is disabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/virtual-machines/disk-encryption-overview +2. https://learn.microsoft.com/en-us/azure/virtual-machines/disk-encryption#encryption-at-host---end-to-end-encryption-for-your-vm-data +3. https://learn.microsoft.com/en-us/azure/virtual-machines/disks-enable-host-based-encryption-portal + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.2/SKILL.md new file mode 100644 index 0000000000..ec92839cbd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.2/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-azure-compute-20.2 +description: "Ensure that 'OS and Data' disks are encrypted with Customer Managed Key (CMK)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.2" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that 'OS and Data' disks are encrypted with Customer Managed Key (CMK) + +## Description + +Ensure that OS disks (boot volumes) and data disks (non-boot volumes) are encrypted with CMK (Customer Managed Keys). Customer Managed keys can be either ADE or Server Side Encryption (SSE). + +## Rationale + +Encrypting the IaaS VM's OS disk (boot volume) and Data disks (non-boot volume) ensures that the entire content is fully unrecoverable without a key, thus protecting the volume from unwanted reads. PMK (Platform Managed Keys) are enabled by default in Azure-managed disks and allow encryption at rest. CMK is recommended because it gives the customer the option to control which specific keys are used for the encryption and decryption of the disk. The customer can then change keys and increase security by disabling them instead of relying on the PMK key that remains unchanging. There is also the option to increase security further by using automatically rotating keys so that access to disk is ensured to be limited. Organizations should evaluate what their security requirements are, however, for the data stored on the disk. For high-risk data using CMK is a must, as it provides extra steps of security. If the data is low risk, PMK is enabled by default and provides sufficient data security. + +## Impact + +Using CMK/BYOK will entail additional management of keys. + +**NOTE:** You must have your key vault set up to utilize this. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Virtual machines`. +2. For each virtual machine, go to `Settings`. +3. Click on `Disks`. +4. Ensure that the `OS disk` and `Data disks` have encryption set to CMK. + +### Using Azure PowerShell + +```powershell +$ResourceGroupName="yourResourceGroupName" +$DiskName="yourDiskName" + +$disk=Get-AzDisk -ResourceGroupName $ResourceGroupName -DiskName $DiskName +$disk.Encryption.Type +``` + +## Expected Result + +The encryption type for all OS and Data disks should indicate Customer Managed Key (CMK) encryption, not Platform Managed Key (PMK). + +## Remediation + +### Using Azure Portal + +**Note:** Disks must be detached from VMs to have encryption changed. + +1. Go to `Virtual machines` +2. For each virtual machine, go to `Settings` +3. Click on `Disks` +4. Click the ellipsis `(...)`, then click `Detach` to detach the disk from the VM +5. Now search for `Disks` and locate the unattached disk +6. Click the disk then select `Encryption` +7. Change your encryption type, then select your encryption set +8. Click `Save` +9. Go back to the VM and re-attach the disk + +### Using Azure PowerShell + +```powershell +$KVRGname = 'MyKeyVaultResourceGroup'; +$VMRGName = 'MyVirtualMachineResourceGroup'; +$vmName = 'MySecureVM'; +$KeyVaultName = 'MySecureVault'; +$KeyVault = Get-AzKeyVault -VaultName $KeyVaultName -ResourceGroupName $KVRGname; +$diskEncryptionKeyVaultUrl = $KeyVault.VaultUri; +$KeyVaultResourceId = $KeyVault.ResourceId; + +Set-AzVMDiskEncryptionExtension -ResourceGroupName $VMRGname -VMName $vmName -DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $KeyVaultResourceId; +``` + +**NOTE:** During encryption it is likely that a reboot will be required. It may take up to 15 minutes to complete the process. For Linux machines you may need to set the `-skipVmBackup` parameter. + +## Default Value + +By default, Azure disks are encrypted using SSE with PMK. + +## References + +1. https://docs.microsoft.com/azure/security/fundamentals/azure-disk-encryption-vms-vmss +2. https://docs.microsoft.com/en-us/azure/security-center/security-center-disk-encryption?toc=%2fazure%2fsecurity%2ftoc.json +3. https://docs.microsoft.com/azure/security/fundamentals/data-encryption-best-practices#protect-data-at-rest +4. https://docs.microsoft.com/en-us/rest/api/compute/disks/delete +5. https://docs.microsoft.com/en-us/rest/api/compute/disks/update#encryptionsettings +6. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-5-use-customer-managed-key-option-in-data-at-rest-encryption-when-required +7. https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-enable-customer-managed-keys-powershell +8. https://docs.microsoft.com/en-us/azure/virtual-machines/disk-encryption + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.3/SKILL.md new file mode 100644 index 0000000000..fea1b5bfb7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.3/SKILL.md @@ -0,0 +1,84 @@ +--- +name: cis-azure-compute-20.3 +description: "Ensure that 'Unattached disks' are encrypted with 'Customer Managed Key' (CMK)" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.3" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that 'Unattached disks' are encrypted with 'Customer Managed Key' (CMK) + +## Description + +Ensure that unattached disks in a subscription are encrypted with a Customer Managed Key (CMK). + +## Rationale + +Managed disks are encrypted by default with Platform-managed keys. Using Customer-managed keys may provide an additional level of security or meet an organization's regulatory requirements. Encrypting managed disks ensures that its entire content is fully unrecoverable without a key and thus protects the volume from unwarranted reads. Even if the disk is not attached to any of the VMs, there is always a risk where a compromised user account with administrative access to VM service can mount/attach these data disks, which may lead to sensitive information disclosure and tampering. + +## Impact + +**NOTE:** You must have your key vault set up to utilize this. Encryption is available only on Standard tier VMs. This might cost you more. + +Utilizing and maintaining Customer-managed keys will require additional work to create, protect, and rotate keys. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Disks` +2. Click on `Add Filter` +3. In the `filter` field select `Disk state` +4. In the `Value` field select `Unattached` +5. Click `Apply` +6. For each disk listed ensure that `Encryption type` in the `encryption` blade is `Encryption at-rest with a customer-managed key` + +### Using Azure CLI + +Ensure command below does not return any output. + +```bash +az disk list --query '[? diskstate == `Unattached`].{encryptionSettings:encryptionSettings, name: name}' -o json +``` + +## Expected Result + +All unattached disks should have encryption type set to `Encryption at-rest with a customer-managed key`. The `encryptionSettings` should not be `null`. + +## Remediation + +If data stored in the disk is no longer useful, refer to Azure documentation to delete unattached data disks at: + +- https://docs.microsoft.com/en-us/rest/api/compute/disks/delete +- https://docs.microsoft.com/en-us/cli/azure/disk?view=azure-cli-latest#az-disk-delete + +If data stored in the disk is important, to encrypt the disk refer to azure documentation at: + +- https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-customer-managed-keys-portal +- https://docs.microsoft.com/en-us/rest/api/compute/disks/update#encryptionsettings + +## Default Value + +By default, managed disks are encrypted with a Platform-managed key. + +## References + +1. https://docs.microsoft.com/en-us/azure/security/fundamentals/azure-disk-encryption-vms-vmss +2. https://docs.microsoft.com/en-us/azure/security-center/security-center-disk-encryption?toc=%2fazure%2fsecurity%2ftoc.json +3. https://docs.microsoft.com/en-us/rest/api/compute/disks/delete +4. https://docs.microsoft.com/en-us/cli/azure/disk?view=azure-cli-latest#az-disk-delete +5. https://docs.microsoft.com/en-us/rest/api/compute/disks/update#encryptionsettings +6. https://docs.microsoft.com/en-us/cli/azure/disk?view=azure-cli-latest#az-disk-update +7. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-5-use-customer-managed-key-option-in-data-at-rest-encryption-when-required + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.4/SKILL.md new file mode 100644 index 0000000000..5dc75b6594 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.4/SKILL.md @@ -0,0 +1,147 @@ +--- +name: cis-azure-compute-20.4 +description: "Ensure that 'Disk Network Access' is NOT set to 'Enable public access from all networks'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.4" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that 'Disk Network Access' is NOT set to 'Enable public access from all networks' + +## Description + +Virtual Machine Disks and snapshots can be configured to allow access from different network resources. + +## Rationale + +The setting 'Enable public access from all networks' is, in many cases, an overly permissive setting on Virtual Machine Disks that presents atypical attack, data infiltration, and data exfiltration vectors. If a disk to network connection is required, the preferred setting is to 'Disable public access and enable private access.' + +## Impact + +The setting 'Disable public access and enable private access' will require configuring a private link (URL in references below). + +The setting 'Disable public and private access' is most secure and preferred where disk network access is not needed. + +## Audit Procedure + +### Using Azure Portal + +Part A. Select the Virtual Machine to Evaluate + +1. Using the search bar, search for and open the `Virtual Machines` service. +2. Click on the name of the Virtual Machine to be audited. + +Part B. Evaluate each Virtual Machine Disk individually + +1. From the selected Virtual Machine resource window, expand the `Settings` menu item and click `Disks`. +2. For each disk, click the name of the disk to open the disk resource window. +3. From the selected Disk resource window, expand the `Settings` menu item, and click `Networking`. + +Ensure that Network access is **NOT** set to `Enable public access from all networks`. + +Repeat Part B for each Disk attached to a VM. +Repeat Parts A and B to evaluate all Disks in all VMs. + +### Using Azure PowerShell + +For each managed disk, run the following PowerShell command: + +```powershell +Get-AzDisk -ResourceGroupName '' -DiskName '' +``` + +Ensure the `PublicNetworkAccess` setting is `Disabled` and the `NetworkAccessPolicy` is set to `AllowPrivate` or `DenyAll`. + +### Using Azure CLI + +For each managed disk, run the following command: + +```bash +az disk show --disk-name '' --resource-group '' +``` + +Ensure the `publicNetworkAccess` setting is set to `Disabled` and the `networkAccessPolicy` setting is set to `AllowPrivate` or `DenyAll`. + +## Expected Result + +All VM disks should have `publicNetworkAccess` set to `Disabled` and `networkAccessPolicy` set to either `AllowPrivate` or `DenyAll`. + +## Remediation + +### Using Azure Portal + +Part A. Select the Virtual Machine to Remediate + +1. Using the search bar, search for and open the `Virtual Machines` service. +2. Click on the name of the Virtual Machine to be remediated. + +Part B. Remediate each Virtual Machine Disk individually + +1. From the selected Virtual Machine resource window, expand the `Settings` menu item and click `Disks`. +2. For each disk, click the name of the disk to open the disk resource window. +3. From the selected Disk resource window, expand the `Settings` menu item, and click `Networking`. + +Under Network access, select the radio button for either: + +- Disable public access and enable private access +- Disable public and private access + +Repeat Part B for each Disk attached to a VM. +Repeat Parts A and B to remediate all Disks in all VMs. + +### Using Azure PowerShell + +To disable `PublicNetworkAccess` and to set a `DenyAll` setting for the disk's `NetworkAccessPolicy` for each managed disk, run the following command: + +```powershell +$disk = Get-AzDisk -ResourceGroupName '' -DiskName '' +$disk.NetworkAccessPolicy = 'DenyAll' +$disk.PublicNetworkAccess = 'Disabled' +Update-AzDisk -ResourceGroup '' -DiskName $disk.Name -Disk $disk +``` + +To disable `PublicNetworkAccess` and to set an `AllowPrivate` setting for the disk's `NetworkAccessPolicy` for each managed disk, run the following command: + +```powershell +$disk = Get-AzDisk -ResourceGroupName '' -DiskName '' +$disk.NetworkAccessPolicy = 'AllowPrivate' +$disk.PublicNetworkAccess = 'Disabled' +$disk.DiskAccessId = '/subscriptions//resourceGroups//providers/Microsoft.Compute/diskAccesses/' +Update-AzDisk -ResourceGroup '' -DiskName $disk.Name -Disk $disk +``` + +### Using Azure CLI + +To configure a disk to allow private access only, run the following command making sure you have the `Disk Access ID` from a private disk access end point. + +```bash +az disk update --name --resource-group --network-access-policy AllowPrivate --disk-access +``` + +To completely disable public and private access for a disk, run the following command (still in preview) for each disk: + +```bash +az disk update --name --resource-group --public-network-access Disabled --network-access-policy DenyAll +``` + +## Default Value + +By default, Disk Network access is set to `Enable public access from all networks`. + +## References + +1. https://learn.microsoft.com/en-us/azure/virtual-machines/disks-enable-private-links-for-import-export-portal +2. https://learn.microsoft.com/en-us/azure/virtual-machines/linux/disks-export-import-private-links-cli +3. https://learn.microsoft.com/en-us/azure/virtual-machines/disks-restrict-import-export-overview + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.5/SKILL.md new file mode 100644 index 0000000000..df8614fddf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.5/SKILL.md @@ -0,0 +1,130 @@ +--- +name: cis-azure-compute-20.5 +description: "Ensure 'Enable Data Access Authentication Mode' is 'Checked'" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.5" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Enable Data Access Authentication Mode' is 'Checked' + +## Description + +Data Access Authentication Mode provides a method of uploading or exporting Virtual Machine Disks. + +## Rationale + +Enabling `data access authentication mode` adds a layer of protection using an Entra ID role to further restrict users from creating and using Secure Access Signature (SAS) tokens for exporting a detached managed disk or virtual machine state. Users will need the `Data operator for managed disk` role within Entra ID in order to download a VHD or VM Guest state using a secure URL. + +## Impact + +To apply this setting, the virtual machine to which the disk or disks are attached will need to be powered down and have its disk detached. Users without the `Data operator for managed disk` role within Entra ID will not be able to export VHD or VM guest state using the secure download URL. + +The following restrictions apply and must be considered when determining if this recommendation is appropriate for your environment: + +- VHDs can't be uploaded to empty snapshots. +- Azure Backup doesn't currently support disks secured with Microsoft Entra ID. +- Azure Site Recovery doesn't currently support disks secured with Microsoft Entra ID. + +## Audit Procedure + +### Using Azure Portal + +Part A. Select the Virtual Machine to Evaluate + +1. Using the search bar, search for and open the `Virtual Machines` service. +2. Click on the name of the Virtual Machine to be audited. + +Part B. Evaluate each Virtual Machine Disk individually + +1. From the selected Virtual Machine resource window, expand the `Settings` menu item and click `Disks`. +2. For each disk, click the name of the disk to open the disk resource window. +3. From the selected Disk resource window, expand the `Settings` menu item, and click `Disk Export`. + +Ensure that `Enable Data Access Authentication Mode` is `checked`. + +Repeat Part B for each Disk attached to a VM. +Repeat Parts A and B to evaluate all Disks in all VMs. + +### Using Azure PowerShell + +Run the following command for each disk: + +```powershell +Get-AzDisk -ResourceGroupName -DiskName +``` + +Ensure the `DataAccessAuthMode` setting displays `AzureActiveDirectory` next to it. + +### Using Azure CLI + +Run the following command for each disk: + +```bash +az disk show --disk-name --resource-group +``` + +Ensure the `dataAccessAuthMode` setting is set to `AzureActiveDirectory`. + +## Expected Result + +The `dataAccessAuthMode` setting should be set to `AzureActiveDirectory` for all VM disks. + +## Remediation + +### Using Azure Portal + +Part A. Select the Virtual Machine to Remediate + +1. Using the search bar, search for and open the `Virtual Machines` service. +2. Click on the name of the Virtual Machine to be remediated. + +Part B. Remediate each Virtual Machine Disk individually + +1. From the selected Virtual Machine resource window, expand the `Settings` menu item and click `Disks`. +2. For each disk, click the name of the disk to open the disk resource window. +3. From the selected Disk resource window, expand the `Settings` menu item, and click `Disk Export`. + +`check` the checkbox next to `Enable Data Access Authentication Mode`. + +Repeat Part B for each Disk attached to a VM. +Repeat Parts A and B to remediate all Disks in all VMs. + +### Using Azure PowerShell + +Ensure that each disk is detached from its associated `Virtual Machine` before proceeding. Once detached, run the following for each disk: + +```powershell +$disk = Get-AzDisk -ResourceGroupName -DiskName +$disk.DataAccessAuthMode = 'AzureActiveDirectory' +Update-AzDisk -ResourceGroup -DiskName $disk.Name -Disk $disk +``` + +### Using Azure CLI + +Ensure that each disk is detached from its associated `Virtual Machine` before proceeding. Once detached, run the following for each disk: + +```bash +az disk update --name --resource-group --data-access-auth-mode AzureActiveDirectory +``` + +## Default Value + +By default, Data Access Authentication Mode is `Disabled`. + +## References + +1. https://learn.microsoft.com/en-us/azure/virtual-machines/linux/download-vhd?tabs=azure-portal#secure-downloads-and-uploads-with-microsoft-entra-id +2. https://learn.microsoft.com/en-us/azure/virtual-machines/windows/download-vhd?tabs=azure-portal#secure-downloads-and-uploads-with-microsoft-entra-id + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.6/SKILL.md new file mode 100644 index 0000000000..82e990948d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.6/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-azure-compute-20.6 +description: "Ensure that Only Approved Extensions Are Installed" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.6" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Only Approved Extensions Are Installed + +## Description + +For added security, only install organization-approved extensions on VMs. + +## Rationale + +Azure virtual machine extensions are small applications that provide post-deployment configuration and automation tasks on Azure virtual machines. These extensions run with administrative privileges and could potentially access anything on a virtual machine. The Azure Portal and community provide several such extensions. Each organization should carefully evaluate these extensions and ensure that only those that are approved for use are actually implemented. + +## Impact + +Functionality by unsupported extensions will be disabled. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Virtual machines`. +2. For each virtual machine, click on the server name to select it. +3. In the new column menu, under `Settings` Click on `Extensions + applications`. +4. Ensure that all the listed extensions are approved by your organization for use. + +### Using Azure CLI + +Use the below command to list the extensions attached to a VM, and ensure the listed extensions are approved for use. + +```bash +az vm extension list --vm-name --resource-group --query [*].name +``` + +### Using Azure PowerShell + +Get a list of VMs. + +```powershell +Get-AzVM +``` + +For each VM run the following command. + +```powershell +Get-AzVMExtension -ResourceGroupName -VMName +``` + +Review each `Name`, `ExtensionType`, and `ProvisioningState` to make sure no unauthorized extensions are installed on any virtual machines. + +## Expected Result + +Only organization-approved extensions should be installed on virtual machines. No unauthorized or unapproved extensions should be present. + +## Remediation + +### Using Azure Portal + +1. Go to `Virtual machines`. +2. For each virtual machine, go to `Settings`. +3. Click on `Extensions + applications`. +4. If there are unapproved extensions, uninstall them. + +### Using Azure CLI + +From the audit command identify the unapproved extensions, and use the below CLI command to remove an unapproved extension attached to VM. + +```bash +az vm extension delete --resource-group --vm-name --name +``` + +### Using Azure PowerShell + +For each VM and each insecure extension from the Audit Procedure run the following command. + +```powershell +Remove-AzVMExtension -ResourceGroupName -Name -VMName +``` + +## Default Value + +By default, no extensions are added to the virtual machines. + +## References + +1. https://docs.microsoft.com/en-us/azure/virtual-machines/windows/extensions-features +2. https://docs.microsoft.com/en-us/powershell/module/az.compute/?view=azps-7.5.0#vm-extensions +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-asset-management#am-2-use-only-approved-services +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-asset-management#am-5-use-only-approved-applications-in-virtual-machine + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.7/SKILL.md new file mode 100644 index 0000000000..733e8749da --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.7/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-azure-compute-20.7 +description: "Ensure that Endpoint Protection for all Virtual Machines is installed" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.7" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Endpoint Protection for all Virtual Machines is installed + +## Description + +Install endpoint protection for all virtual machines. + +## Rationale + +Installing endpoint protection systems (like anti-malware for Azure) provides for real-time protection capability that helps identify and remove viruses, spyware, and other malicious software. These also offer configurable alerts when known-malicious or unwanted software attempts to install itself or run on Azure systems. + +## Impact + +Endpoint protection will incur an additional cost to you. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Security Center` +2. Click the `Recommendations` blade +3. Ensure that there are no recommendations for `Endpoint Protection not installed on Azure VMs` + +### Using Azure CLI + +```bash +az vm show -g -n -d --query "resources[?type=='Microsoft.Compute/virtualMachines/extensions'].{ExtensionName:name}" -o table +``` + +If extensions are installed, it will list the installed extensions. + +Look for extensions such as: +`EndpointSecurity || TrendMicroDSA* || Antimalware || EndpointProtection || SCWPAgent || PortalProtectExtension* || FileSecurity*` + +Alternatively, you can employ your own endpoint protection tool for your OS. + +## Expected Result + +All virtual machines should have at least one endpoint protection extension installed, or an equivalent endpoint protection tool deployed. + +## Remediation + +### Using Azure Portal + +Follow Microsoft Azure documentation to install endpoint protection from the security center. Alternatively, you can employ your own endpoint protection tool for your OS. + +## Default Value + +By default Endpoint Protection is disabled. + +## References + +1. https://docs.microsoft.com/en-us/azure/security-center/security-center-install-endpoint-protection +2. https://docs.microsoft.com/en-us/azure/security/azure-security-antimalware +3. https://docs.microsoft.com/en-us/cli/azure/vm/extension?view=azure-cli-latest#az_vm_extension_list +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-endpoint-security#es-1-use-endpoint-detection-and-response-edr + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.8/SKILL.md new file mode 100644 index 0000000000..ea96af940b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.8/SKILL.md @@ -0,0 +1,130 @@ +--- +name: cis-azure-compute-20.8 +description: "[Legacy] Ensure that VHDs are Encrypted" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.8" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# [Legacy] Ensure that VHDs are Encrypted + +## Description + +**NOTE: This is a legacy recommendation. Managed Disks are encrypted by default and recommended for all new VM implementations.** + +VHD (Virtual Hard Disks) are stored in blob storage and are the old-style disks that were attached to Virtual Machines. The blob VHD was then leased to the VM. By default, storage accounts are not encrypted, and Microsoft Defender will then recommend that the OS disks should be encrypted. Storage accounts can be encrypted as a whole using PMK or CMK. This should be turned on for storage accounts containing VHDs. + +## Rationale + +While it is recommended to use Managed Disks which are encrypted by default, "legacy" VHDs may exist for a variety of reasons and may need to remain in VHD format. VHDs are not encrypted by default, so this recommendation intends to address the security of these disks. In these niche cases, VHDs should be encrypted using the procedures in this recommendation to encrypt and protect the data content. + +If a virtual machine is using a VHD and can be converted to a managed disk, instructions for this procedure can be found in the resources section of this recommendation under the title "Convert VHD to Managed Disk." + +## Impact + +Depending on how the encryption is implemented will change the size of the impact. If provider-managed keys(PMK) are utilized, the impact is relatively low, but processes need to be put in place to regularly rotate the keys. If Customer-managed keys(CMK) are utilized, a key management process needs to be implemented to store and manage key rotation, thus the impact is medium to high depending on user maturity with key management. + +## Audit Procedure + +### Using Azure CLI + +For each virtual machine identify if the VM is using a legacy VHD by reviewing the _VHD_ parameter in the output of the following command. The _VHD_ parameter will contain the Storage Account name used for the VHD. + +```bash +az vm show --name --resource-group +``` + +Next, identify if the storage account from the _VHD_ parameter is encrypted by reviewing the _encryption --> services --> blob --> enabled_ within the output of the following command and make sure its value is _True_. + +```bash +az storage account show --name --resource-group +``` + +### Using Azure PowerShell + +Determine whether the VM is using a VHD for the OS Disk and any Data disks. + +```powershell +$virtualMachine = Get-AzVM --Name --ResourceGroup |Select-Object -ExpandProperty StorageProfile + +$virtualMachine.OsDisk +$virtualMachine.DataDisks +``` + +Next, use the value from _VHD_ to see if the storage blob holding the VHD is encrypted. + +```powershell +$storageAccount = Get-AzStorageAccount -Name -ResourceGroupName + +$storageAccount.Encryption.Services.Blob +``` + +## Expected Result + +If the VM uses a VHD, the storage account holding the VHD should have blob encryption enabled (`enabled` = `True`). + +## Remediation + +### Using Azure Portal + +1. Navigate to the `storage account` that you wish to encrypt +2. Select `encryption` +3. Select the `encryption type` that you wish to use + +If you wish to use a Microsoft-managed key (the default), you can save at this point and encryption will be applied to the account. + +If you select `Customer-managed keys`, it will ask for the location of the key (The default is an Azure Key Vault) and the key name. Once these are captured, save the configuration and the account will be encrypted using the provided key. + +### Using Azure CLI + +Create the Key Vault: + +```bash +az keyvault create --name --resource-group --location --enabled-for-disk-encryption +``` + +Encrypt the disk and store the key in Key Vault: + +```bash +az vm encryption enable -g --name --disk-encryption-keyvault myKV +``` + +### Using Azure PowerShell + +This process uses a Key Vault to store the keys. + +Create the Key Vault: + +```powershell +New-AzKeyvault -name -ResourceGroupName -Location -EnabledForDiskEncryption +``` + +Encrypt the disk and store the key in Key Vault: + +```powershell +$KeyVault = Get-AzKeyVault -VaultName -ResourceGroupName +Set-AzVMDiskEncryptionExtension -ResourceGroupName -VMName -DiskEncryptionKeyVaultUrl $KeyVault.VaultUri -DiskEncryptionKeyVaultId $KeyVault.ResourceId +``` + +## Default Value + +The default value for encryption is "NO Encryption" + +## References + +1. CLI: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disk-encryption-cli-quickstart +2. Powershell: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disk-encryption-powershell-quickstart +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-4-enable-data-at-rest-encryption-by-default +4. Convert VHD to Managed Disk: https://docs.microsoft.com/en-us/previous-versions/azure/virtual-machines/scripts/virtual-machines-powershell-sample-create-managed-disk-from-vhd + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.9/SKILL.md new file mode 100644 index 0000000000..7935adab9d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-20.9/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-azure-compute-20.9 +description: "Ensure only MFA enabled identities can access privileged Virtual Machine" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm, disks, encryption] +cis_id: "20.9" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure only MFA enabled identities can access privileged Virtual Machine + +## Description + +Verify identities without MFA that can log in to a privileged virtual machine using separate login credentials. An adversary can leverage the access to move laterally and perform actions with the virtual machine's managed identity. Make sure the virtual machine only has necessary permissions, and revoke the admin-level permissions according to the least privileges principal. + +## Rationale + +Integrating multi-factor authentication (MFA) as part of the organizational policy can greatly reduce the risk of an identity gaining control of valid credentials that may be used for additional tactics such as initial access, lateral movement, and collecting information. MFA can also be used to restrict access to cloud resources and APIs. + +An Adversary may log into accessible cloud services within a compromised environment using Valid Accounts that are synchronized to move laterally and perform actions with the virtual machine's managed identity. The adversary may then perform management actions or access cloud-hosted resources as the logged-on managed identity. + +## Impact + +This recommendation requires the Entra ID P2 license to implement. + +Ensure that identities that are provisioned to a virtual machine utilizes an RBAC/ABAC group and is allocated a role using Azure PIM, and the Role settings require MFA or use another third-party PAM solution for accessing Virtual Machines. + +## Audit Procedure + +### Using Azure Portal + +1. Log in to the Azure portal. +2. Select the `Subscription`, then click on `Access control (IAM)`. +3. Click `Role : All` and click `All` to display the drop-down menu. +4. Type `Virtual Machine Administrator Login` and select `Virtual Machine Administrator Login`. +5. Review the list of identities that have been assigned the `Virtual Machine Administrator Login` role. +6. Go to `Microsoft Entra ID`. +7. For `Per-user MFA`: + 1. Under `Manage`, click `Users`. + 2. Click `Per-user MFA`. + 3. Ensure that none of the identities assigned the `Virtual Machine Administrator Login` role from step 4 have `Status` set to `disabled`. +8. For `Conditional Access`: + 1. Under `Manage`, click `Security`. + 2. Under `Protect`, click `Conditional Access`. + 3. Ensure that none of the identities assigned the `Virtual Machine Administrator Login` role from step 4 are exempt from a Conditional Access policy requiring MFA for all users. + +## Expected Result + +All identities with the `Virtual Machine Administrator Login` role should have MFA enabled, either through Per-user MFA or Conditional Access policies. + +## Remediation + +### Using Azure Portal + +1. Log in to the Azure portal. +2. This can be remediated by enabling MFA for user, Removing user access or Reducing access of managed identities attached to virtual machines. + +- **Case I**: Enable MFA for users having access on virtual machines. + 1. Go to `Microsoft Entra ID`. + 2. For `Per-user MFA`: + 1. Under `Manage`, click `Users`. + 2. Click `Per-user MFA`. + 3. For each user requiring remediation, check the box next to their name. + 4. Click `Enable MFA`. + 5. Click `Enable`. + 3. For `Conditional Access`: + 1. Under `Manage`, click `Security`. + 2. Under `Protect`, click `Conditional Access`. + 3. Update the Conditional Access policy requiring MFA for all users, removing each user requiring remediation from the `Exclude` list. + +- **Case II**: Removing user access on a virtual machine. + 1. Select the `Subscription`, then click on `Access control (IAM)`. + 2. Select `Role assignments` and search for `Virtual Machine Administrator Login` or `Virtual Machine User Login` or any role that provides access to log into virtual machines. + 3. Click on `Role Name`, Select `Assignments`, and remove identities with no MFA configured. + +- **Case III**: Reducing access of managed identities attached to virtual machines. + 1. Select the `Subscription`, then click on `Access control (IAM)`. + 2. Select `Role Assignments` from the top menu and apply filters on `Assignment type` as `Privileged administrator roles` and `Type` as `Virtual Machines`. + 3. Click on `Role Name`, Select `Assignments`, and remove identities access make sure this follows the least privileges principal. + +## Default Value + +By default, MFA is not enforced for Virtual Machine access. + +## References + +No specific references listed in the benchmark for this control. + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-3.1/SKILL.md new file mode 100644 index 0000000000..47dd6e7e77 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-3.1/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-azure-compute-3.1 +description: "Ensure Private Virtual Networks are used for Container Instances" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, container-instances, aci] +cis_id: "3.1" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Private Virtual Networks are used for Container Instances + +## Description + +Private Virtual Networks (vNets) ensure that services and hosts within the subscription environment are appropriately segmented in private subnets. Public IP addressing for container instances should be handled through a NAT gateway and/or Firewall. In addition to the use of a private vNet for container instances, ensure that a Network Security Group (NSG) is configured and applied to your container instance vNet. The NSG will need to be configured with inbound and outbound TCP/UDP traffic rules which reflect the needs of the services running in your container instance. + +## Rationale + +Network segmentation reduces threat surface and limits potential lateral movement in the case of breach. Container instances with Public IP addresses present significant threat surface and should be avoided. + +## Impact + +A well-architected Cloud network will require documentation and consideration for subnetting. The use of vNets and NSGs have a minimal impact on cost, but the use of Firewalls and public-facing gateways will increase that cost. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Container Instances`. +2. Select a named container instance. +3. Click on `Properties` under the Settings section. +4. Ensure the `IP address` property indicates `(Private)`. +5. Repeat these steps for each named container instance. + +### Using Azure CLI + +Run the following command: + +```bash +az container list +``` + +For each Container Instance, ensure `"type": "Private"` is indicated under the `"ipAddress"` section. + +## Expected Result + +All Container Instances should have `"type": "Private"` in the `"ipAddress"` section, indicating they are deployed within a private virtual network. + +## Remediation + +### Using Azure Portal + +Container Instances which have been created with Public IP addresses will need to be re-created with private IP addresses. During the initial creation of a Container Instance, ensure that the Networking Type of "Private" is selected prior to creating the Container Instance. + +### Using Azure CLI + +Container Instances must be re-created with the appropriate vNet and subnet configuration. Use the `--vnet` and `--subnet` parameters during `az container create` to deploy into a private virtual network. + +## Default Value + +By default, the "Public" Networking type is selected when creating a Container Instance from Azure Portal. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/container-instances-security-baseline?toc=%2Fazure%2Fcontainer-instances%2FTOC.json +2. https://learn.microsoft.com/en-us/azure/container-instances/container-instances-vnet + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-3.2/SKILL.md new file mode 100644 index 0000000000..c51ea77daf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-3.2/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-azure-compute-3.2 +description: "Ensure a Managed Identity is used for interactions with other Azure services" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, container-instances, aci] +cis_id: "3.2" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure a Managed Identity is used for interactions with other Azure services + +## Description + +For containers that require access to other resources, or other resources accessing a container, an identity/credential may be required. The Managed Identity prevents needing to store credentials in code within the Container Instance. There are two types of Managed Identities for Container Instances: + +1. **System Assigned**: System Assigned Managed Identities provide an infrastructure integrated identity which is unique to the resource. It is assigned to the Container Instance and persists for the lifecycle of the resource. Permissions can be assigned, revoked, and tuned using Azure role-based access control. +2. **User Assigned**: User Assigned Managed Identities are not unique to the resource, and exist as independent Azure resources with their own lifecycle. If a Container Identity is decommissioned, the User Assigned Managed Identity will need to be decommissioned separately. User Assigned Managed Identities are not necessarily unique, and can be used across multiple resources. + +## Rationale + +Identities or credentials stored within a Container Instance or the code running on the Container Instance introduce a risk of compromise. If that identity or credential is stored in plain text, the risk is further amplified. + +## Impact + +To ensure that a Managed Identity is able to access a destination resource, the permissions and/or role assigned to that Managed Identity will need to be evaluated. + +## Audit Procedure + +### Using Azure Portal + +For each Container Instance that uses an identity or credential: + +1. Open the `Container Instances` blade. +2. Select a named container instance. +3. Click on `Identity` under the Settings section. +4. Review the `System Assigned` and `User Assigned` tabs for assigned identities: + - If using `System Assigned` identities, ensure status is set to `On`. + - If using `User Assigned` identities, ensure only necessary user identities are assigned. + +### Using Azure CLI + +Run the following command: + +```bash +az container list +``` + +For each Container Instance that uses an identity or credential, ensure `"identity":` is not `"null"`. + +## Expected Result + +Container Instances that interact with other Azure services should have a Managed Identity configured (either System Assigned or User Assigned). The `"identity"` field should not be `null`. + +## Remediation + +### Using Azure Portal + +For each Container Instance that requires an identity or credential: + +1. Open the `Container Instances` blade. +2. Select a named container instance. +3. Click on `Identity` under the Settings section, then: + - For a System Assigned identity, click the `System Assigned` tab then set status to `On`. + - For User Assigned identities, click the `User Assigned` tab then click the `Add` button. Search for the required user managed identity, then click the `Add` button at the bottom of the window. + +### Using Azure CLI + +To assign Managed Identities to Container Instances by CLI, the Managed Identity will need to be specified at the time of creation. If a Container Instance requires a Managed Identity, but does not already have one, it will need to be re-created with the Managed Identity specified. + +System Assigned Identity: + +```bash +az container create -g --name --image --assign-identity [system] +``` + +User Assigned Identities: + +```bash +az container create -g --name --image --assign-identity +``` + +BOTH System and User Assigned Identities: + +```bash +az container create -g --name --image --assign-identity [system] +``` + +## Default Value + +By default, Managed Identities are not configured on Container Instances. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/container-instances-security-baseline?toc=%2Fazure%2Fcontainer-instances%2FTOC.json#identity-management +2. https://learn.microsoft.com/en-us/azure/container-instances/using-azure-container-registry-mi + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-3.3/SKILL.md new file mode 100644 index 0000000000..e933dc875e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-3.3/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-compute-3.3 +description: "Ensure the principle of least privilege is used when assigning roles to a Managed Identity" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, container-instances, aci] +cis_id: "3.3" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure the principle of least privilege is used when assigning roles to a Managed Identity + +## Description + +When using either a user-assigned or system-assigned managed identity, those identities may require a role or privilege assignment to perform a desired function. The roles or privileges assigned to that identity should be assigned with the principle of least privilege in mind - the identity is given the minimum levels of access or permissions needed to perform the job. + +## Rationale + +Threat actors may attempt to compromise service accounts as anomalous activity on these accounts can sometimes be more challenging to detect. Limiting the permissions or roles available to a managed identity or service account assists in mitigating the systemic exploitation that a service account can perform if compromised. + +## Impact + +All service accounts should be inventoried and reviewed from time to time for necessity and role or privilege assignment. + +## Audit Procedure + +### Using Azure Portal + +For each Container Instance that uses an identity or credential: + +1. Open the `Container Instances` blade. +2. Select a named container instance. +3. Click on `Identity` under the Settings section. +4. Review the `System Assigned` and `User Assigned` tabs for assigned identities. + +For a System Assigned identity, click on `Azure role assignments` and review the assigned roles for appropriate restriction. + +For User assigned identities, click on the name of each User assigned managed identity, then click on `Azure role assignments` in the left panel to review assigned roles for appropriate restriction. + +## Expected Result + +All managed identities assigned to Container Instances should have only the minimum required roles and permissions necessary for their intended function. + +## Remediation + +### Using Azure Portal + +**NOTE**: Remediation will vary based on the needs of your environment. Before remediating, determine the scope and requirements of the Role Assignments necessary for your environment: https://learn.microsoft.com/en-us/azure/active-directory/roles/permissions-reference + +For each Container Instance that uses an identity or credential: + +1. Open the `Container Instances` blade. +2. Select a named container instance. +3. Click on `Identity` under the Settings section. +4. Review the `System Assigned` and `User Assigned` tabs for assigned identities. + +For a System Assigned identity, click on `Azure role assignments` and Add or Remove assigned roles for appropriate restriction. + +For User assigned identities, click on the name of each User assigned managed identity, then click on `Azure role assignments` in the left panel to Add or Remove assigned roles for appropriate restriction. + +## Default Value + +By default, Managed Identities are not configured on Container Instances. + +## References + +1. https://learn.microsoft.com/en-us/azure/container-instances/container-instances-managed-identity +2. https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal +3. https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal-managed-identity +4. https://learn.microsoft.com/en-us/azure/active-directory/roles/permissions-reference + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-4.1/SKILL.md new file mode 100644 index 0000000000..07b8acdd2f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Compute_Services_Benchmark_v2.0.0/cis-azure-compute-4.1/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-azure-compute-4.1 +description: "Ensure SSL is configured for CycleCloud" +category: cis-azure-compute +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, cyclecloud] +cis_id: "4.1" +cis_benchmark: "CIS Microsoft Azure Compute Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure SSL is configured for CycleCloud + +## Description + +The use of SSL ensures that data in transit to and from the Azure CycleCloud server is encrypted. + +## Rationale + +Encryption of data in transit provides integrity and confidentiality of that data. If unencrypted data is intercepted in transit it is highly vulnerable to exposure and exploitation. + +## Impact + +If using self-signed certificates, users accessing CycleCloud will receive a warning that the SSL certificate is untrusted; they will need to accept the certificate to access the web console. Depending on your environment and use of CycleCloud, you may wish to procure a signed and trusted certificate from a Certificate Authority. + +## Audit Procedure + +### From SSH + +1. Establish a secure shell session with the Azure CycleCloud server. +2. Navigate to the CycleCloud installation directory. +3. Use a text editor (e.g. Vim, Nano, Emacs) to open the `cycle_server.properties` file. +4. Review the file for the following properties: + +``` +webServerEnableHttps=true +webServerRedirectHttp=true +``` + +Note that if these properties are defined in the file multiple times, only the **last** instance of that property definition will be in effect. + +If either property is set to `false`, SSL is NOT configured for the CycleCloud server. + +## Expected Result + +Both `webServerEnableHttps` and `webServerRedirectHttp` should be set to `true` in the `cycle_server.properties` file. + +## Remediation + +### From SSH + +1. Establish a secure shell session with the Azure CycleCloud server. +2. Navigate to the CycleCloud installation directory. +3. Use a text editor (e.g. Vim, Nano, Emacs) to open the `cycle_server.properties` file. +4. Edit the following properties to reflect `true`: + +``` +webServerEnableHttps=true +webServerRedirectHttp=true +``` + +5. Save and exit from the text editor. +6. Restart the CycleCloud service to enable the new property definitions: + +```bash +/opt/cycle_server/cycle_server restart +``` + +## Default Value + +By default, CycleCloud is configured to use Java IO HTTPS with a Let's Encrypt SSL certificate, or self-signed certificate. + +## References + +1. https://learn.microsoft.com/en-us/azure/cyclecloud/how-to/ssl-configuration?view=cyclecloud-8 +2. https://learn.microsoft.com/en-us/azure/cyclecloud/concepts/security-best-practices?view=cyclecloud-8 + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.1/SKILL.md new file mode 100644 index 0000000000..3f18ecc394 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.1/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-azure-database-2.1 +description: "Ensure 'Microsoft Entra Authentication' is 'Enabled'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, redis, cache] +cis_id: "2.1" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1 Ensure 'Microsoft Entra Authentication' is 'Enabled' (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Ensuring that Microsoft Entra Authentication is 'Enabled' provides a natively integrated use of identities already defined with Microsoft Entra ID. + +## Rationale + +The use of a centralized Identity and Access Management (IAM) solution such as Microsoft Entra ID is highly recommended for all activity related to Identity, Authentication, Authorization, and Accountability. + +Decentralized IAM -- such as local authentication methods -- may present additional vulnerability and introduce avoidable administrative complexity. + +## Impact + +Free tiers exist for the licensing of Microsoft Entra ID if required. + +## Audit Procedure + +### Audit From Azure Portal + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, click on **Authentication** +5. Review the checkbox next to `Enable Microsoft Entra Authentication` + +If the checkbox is **Checked**, the configuration for that instance is compliant. + +## Expected Result + +The checkbox next to `Enable Microsoft Entra Authentication` should be **Checked** for each Azure Cache for Redis instance. + +## Remediation + +### Remediate From Azure Portal + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, click on **Authentication** +5. **Check** the checkbox next to `Enable Microsoft Entra Authentication` + +## Default Value + +By default, Microsoft Entra Authentication is **Checked** during setup. + +## References + +1. [https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management](https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management) +2. [https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-azure-active-directory-for-authentication](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-azure-active-directory-for-authentication) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | X | X | +| v7 | 16.2 Configure Centralized Point of Authentication | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.10/SKILL.md new file mode 100644 index 0000000000..8fec675a75 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.10/SKILL.md @@ -0,0 +1,135 @@ +--- +name: cis-azure-database-2.10 +description: "Ensure 'Update Channel' is set to 'Stable'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, redis, cache] +cis_id: "2.10" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.10 Ensure 'Update Channel' is set to 'Stable' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Ensure all Azure Cache for Redis instances are configured to use the stable update channel. + +## Rationale + +By using the stable update channel, organizations minimize the risk of introducing issues that may exist in preview update streams. The stable update channel improves security posture and reduces exposure to vulnerabilities. + +## Impact + +Updates and new features will take longer to arrive when using the stable update channel. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Azure Cache for Redis`. +2. Select the name of a cache. +3. Under **Settings**, select **Schedule updates**. +4. Ensure `Update Channel` is set to **Stable**. +5. Repeat steps 1-4 for each cache. + +### Audit from Azure CLI + +Run the following command to list caches: + +```bash +az redis list +``` + +For each cache, run the following command to get the `updateChannel` setting: + +```bash +az redis show --resource-group --name --query updateChannel +``` + +Ensure `"Stable"` is returned. + +### Audit from PowerShell + +Run the following command to list caches: + +```powershell +Get-AzRedisCache +``` + +Run the following command to get the cache in a resource group with a given name: + +```powershell +$cache = Get-AzRedisCache -ResourceGroupName -Name +``` + +Run the following command to get the `UpdateChannel` setting: + +```powershell +$cache.UpdateChannel +``` + +Ensure `Stable` is returned. + +Repeat for each cache. + +## Expected Result + +The `Update Channel` should be set to **Stable** for each Azure Cache for Redis instance. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Azure Cache for Redis`. +2. Select the name of a cache. +3. Under **Settings**, select **Schedule updates**. +4. Set `Update Channel` to **Stable**. +5. Select **Save**. +6. Repeat steps 1-5 for each cache requiring remediation. + +### Remediate from Azure CLI + +For each cache requiring remediation, run the following command to set `updateChannel` to `Stable`: + +```bash +az redis update --resource-group --name --set "updateChannel=Stable" +``` + +### Remediate from PowerShell + +For each cache requiring remediation, run the following command to set `UpdateChannel` to `Stable`: + +```powershell +Set-AzRedisCache -ResourceGroupName -Name -UpdateChannel Stable +``` + +## Default Value + +By default, 'Update Channel' is set to 'Stable'. + +## References + +1. [https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-administration#update-channel-and-schedule-updates](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-administration#update-channel-and-schedule-updates) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.2 Ensure Authorized Software is Currently Supported | X | X | X | +| v7 | 2.2 Ensure Software is Supported by Vendor | X | X | X | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1190 | TA0001 | M1051 | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.2/SKILL.md new file mode 100644 index 0000000000..2dd173e3cc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.2/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-database-2.2 +description: "Ensure that 'Allow access only via SSL' is set to 'Yes'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, redis, cache] +cis_id: "2.2" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.2 Ensure that 'Allow access only via SSL' is set to 'Yes' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Setting 'Allow access only via SSL' to 'Yes' ensures that data in transit to and from Azure Cache for Redis is encrypted using TLS. + +## Rationale + +Data in transit which is not encrypted is vulnerable to attacks including adversary-in-the-middle (AITM or MITM), eavesdropping, or session hijack. These attacks can result in the compromise and exfiltration of data. + +## Impact + +No additional cost is required to implement this recommendation. Aside from expected network changes (no unencrypted communications), performance should not be impacted. + +## Audit Procedure + +### Audit From Azure Portal + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, under Settings, click on **Advanced Settings** +5. Review the setting under `Allow access only via SSL` + +If **Yes** is selected, the configuration for that instance is compliant. + +### Audit From Azure Policy + +- **Policy ID:** `22bee202-a82f-4305-9a2a-6d7f44d4dedb` - **Name:** 'Only secure connections to your Azure Cache for Redis should be enabled' +- **Policy ID:** `766f5de3-c6c0-4327-9f4d-042ab8ae846c` - **Name:** 'Configure Azure Cache for Redis to disable non SSL ports' + +## Expected Result + +The `Allow access only via SSL` setting should be set to **Yes** for each Azure Cache for Redis instance. + +## Remediation + +### Remediate From Azure Portal + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, under Settings, click on **Advanced Settings** +5. Select **Yes** under `Allow access only via SSL` heading + +## Default Value + +By default, 'Allow access only via SSL' is set to 'Yes'. + +## References + +1. [https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-best-practices-development](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-best-practices-development) +2. [https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/azure-cache-for-redis-security-baseline#microsoft-defender-for-cloud-monitoring-1](https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/azure-cache-for-redis-security-baseline#microsoft-defender-for-cloud-monitoring-1) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.3/SKILL.md new file mode 100644 index 0000000000..86de02dd22 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.3/SKILL.md @@ -0,0 +1,82 @@ +--- +name: cis-azure-database-2.3 +description: "Ensure that 'Minimum TLS version' is set to TLS v1.2 (or higher)" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, redis, cache] +cis_id: "2.3" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.3 Ensure that 'Minimum TLS version' is set to TLS v1.2 (or higher) (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Setting the 'Minimum TLS version' helps reduce (but not eliminate) TLS protocol vulnerabilities by preventing the use of significantly outdated versions of TLS. + +## Rationale + +The Secure Sockets Layer (SSL) protocol encrypts network traffic transiting between server and client. + +Using only the most recent versions of SSL protocols (TLS version 1.2 and higher) eliminates susceptibility to known exploited vulnerabilities of outdated versions of TLS. If TLS 1.2 does not provide additional granular configuration options for supported cipher suites, there's a chance that default ciphers which employ Cipher Block Chaining (CBC) mode may be enabled which would introduce Padding Oracle types of vulnerabilities. TLS 1.3 does not support CBC mode ciphers by default and by default supports GCM ciphers which include an extra authentication step during the clear text to cipher text encryption process. + +TLS version 1.3 is preferable where it is possible to implement. + +Versions 1.0 and 1.1 of TLS are no longer considered secure. These versions should not be used or permitted where data integrity and confidentiality are required. + +## Impact + +This configuration setting should not result in any perceptible changes to cost or performance. + +## Audit Procedure + +### Audit From Azure Portal + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance listed, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, under Settings, click on **Advanced Settings** +5. Review the setting under `Minimum TLS version` + +If `1.2 (Recommended)` (or a higher version) is selected, the configuration for that instance is compliant. + +## Expected Result + +The `Minimum TLS version` should be set to `1.2 (Recommended)` or higher for each Azure Cache for Redis instance. + +## Remediation + +### Remediate From Azure Portal + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance listed, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, under Settings, click on **Advanced Settings** +5. Click the drop-down menu under `Minimum TLS version` +6. Select `1.2 (Recommended)` (higher versions are preferred when available) + +## Default Value + +By default, 'Minimum TLS version' is set to TLS 1.2. + +## References + +1. [https://www.rfc-editor.org/rfc/pdfrfc/rfc8446.txt.pdf](https://www.rfc-editor.org/rfc/pdfrfc/rfc8446.txt.pdf) +2. [https://nvd.nist.gov/vuln/detail/CVE-2016-0701](https://nvd.nist.gov/vuln/detail/CVE-2016-0701) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.4/SKILL.md new file mode 100644 index 0000000000..3214914c5c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.4/SKILL.md @@ -0,0 +1,72 @@ +--- +name: cis-azure-database-2.4 +description: "Ensure that 'Access Policies' are Implemented and Reviewed Periodically" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, redis, cache] +cis_id: "2.4" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.4 Ensure that 'Access Policies' are Implemented and Reviewed Periodically (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Access Policies provide an Access Control List (ACL) functionality allowing administrators to define which identities or identity groups have access to what data and commands. This is an implementation of the Role Based Access Control (RBAC) concept and will require careful consideration to deploy and maintain. + +## Rationale + +Role Based Access Control (RBAC) using Access Control Lists (ACLs) is a method of implementing the principle of least privilege by ensuring that users and user groups with differing needs are presented with the privilege that fulfills their needs and any unnecessary access or functionality is prevented. + +## Impact + +Implementing RBAC for any system requires a careful analysis of 'who' needs access to the system, and 'what' privileges or functionality they need to perform. The time required to implement RBAC will increase based on the complexity and size of an environment. + +If RBAC is deployed without careful analysis, it may prevent users from accessing data or functionality that they require from the system. Conversely, it may present privilege which is unnecessary and introduce vulnerability to a system. + +Once RBAC has been deployed, there should be periodically scheduled access review. During the access review, all entries in the Access Control List and all identities are reviewed for fitness and necessity. + +## Audit Procedure + +### Audit From Azure Portal + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, under Settings, click on **Data Access Configuration** +5. Click on the tab titled `Access Policies` and review the access policies for fitness and necessity. + +**Please note:** No more specific definition can be presented here because the definitions of fitness and necessity are judgments that must be made by the administrators and security personnel with knowledge of the identities and functionality required of the system being evaluated. + +## Expected Result + +Access Policies should be configured with appropriate least-privilege permissions and reviewed periodically for fitness and necessity. + +## Remediation + +No prescriptive remediation is available due to the specific and unique nature of implementing RBAC for any given system. Implementing RBAC for any system requires a careful analysis of 'who' needs access to the system, and 'what' privileges or functionality they require. The time required to implement RBAC will increase based on the complexity and size of an environment. + +## Default Value + +By default, no Access Policies exist. + +## References + +1. [https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-configure-role-based-access-control](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-configure-role-based-access-control) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | X | +| v7 | 14.7 Enforce Access Control to Data through Automated Tools | | | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.5/SKILL.md new file mode 100644 index 0000000000..b2e7074d11 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.5/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-azure-database-2.5 +description: "Ensure that 'System Assigned Managed Identity' is set to 'On'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, redis, cache] +cis_id: "2.5" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.5 Ensure that 'System Assigned Managed Identity' is set to 'On' (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +System Assigned Managed Identities provide the Azure Cache for Redis instance with a unique account like a service principle but automatically assigned and managed by Azure. These identities are unique to the resource instance they are created for, and removed when the resource is deleted. + +## Rationale + +The System Assigned Managed Identity is authenticated with Entra ID, and allows for privileges required for the instance of Azure Cache for Redis to be granted or restricted using Azure Role Based Access Control (RBAC). Additionally, the managed identity provides a means for the Azure Cache for Redis instance to authenticate without storing credentials in code. + +## Impact + +No additional cost or performance impact is expected. + +## Audit Procedure + +### Audit From Azure Portal + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, under Settings, click on **Identity** +5. Under the `System assigned` tab, ensure that `Status` is set to **On**. + +If **Yes** is selected and `Object (principal) ID` is populated, the configuration for that instance is compliant. + +## Expected Result + +The `System assigned` managed identity `Status` should be set to **On** and an `Object (principal) ID` should be populated. + +## Remediation + +### Remediate From Azure Portal + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, under Settings, click on **Identity** +5. Under the `System assigned` tab, toggle the status to **On** +6. Click the **Save** button +7. In the pop-up dialog titled `Enable system assigned managed identity` that appears after clicking save, click the **Yes** button. + +## Default Value + +By default, System Assigned Managed Identity of **Off**. + +## References + +1. [https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-managed-identity](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-managed-identity) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.5 Establish and Maintain an Inventory of Service Accounts | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.6/SKILL.md new file mode 100644 index 0000000000..8f041aa2d6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.6/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-azure-database-2.6 +description: "Ensure that 'Public Network Access' is 'Disabled'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, redis, cache] +cis_id: "2.6" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.6 Ensure that 'Public Network Access' is 'Disabled' (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Disabling public network access restricts the service from accessing public networks. + +## Rationale + +A secure network architecture requires carefully constructed network segmentation. Public Network Access tends to be overly permissive and introduces unintended vectors for threat activity. + +## Impact + +Disabling 'Public Network Access' forces the requirement of the use of Private Endpoints for network connectivity which will require some additional consideration from a network architecture perspective and will introduce cost based on the inbound/outbound data being processed by the Private Endpoint. + +**IMPORTANT NOTE:** If Azure Cache for Redis has been deployed in a VNet, this recommendation cannot be implemented. See additional information below for more detail. + +## Audit Procedure + +### Audit From Azure Portal + +**NOTE:** This procedure applies only to instances that are not using VNets. + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, click on **Private Endpoint** +5. Review the button to the right of `+ Private Endpoint` + +If the button is titled `enable public network access`, the configuration for that instance is currently disabled and compliant. + +### Audit From Azure Policy + +- **Policy ID:** `470baccb-7e51-4549-8b1a-3e5be069f663` - **Name:** 'Azure Cache for Redis should disable public network access' + +## Expected Result + +The button next to `+ Private Endpoint` should display `enable public network access`, indicating public network access is currently disabled. + +## Remediation + +### Remediate From Azure Portal + +**NOTE:** A Private Endpoint must exist before the "Disable public network access" button allows the configuration change to be performed via Portal. + +1. Search for and open the `Azure Cache for Redis` service +2. For each instance, repeat the remaining steps +3. Click on the name of the instance +4. In the blade menu on the left, click on **Private Endpoint** +5. Click the `Disable public network access` button. + +## Default Value + +By default Public Network Access is **Disabled** when creating an Azure Cache for Redis instance. + +## References + +1. [https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-network-security#ns-2-secure-cloud-services-with-network-controls](https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-network-security#ns-2-secure-cloud-services-with-network-controls) +2. [https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-network-isolation](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-network-isolation) +3. [https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-private-link#how-can-i-change-my-private-endpoint-to-be-disabled-or-enabled-from-public-network-access](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-private-link#how-can-i-change-my-private-endpoint-to-be-disabled-or-enabled-from-public-network-access) + +## Additional Information + +For Azure Cache for Redis instances deployed in classic VNets (Virtual Network injection), public network access cannot be disabled. In these cases, an equivalent control using restrictive Access Control Lists (ACLs) in Network Security Groups (NSGs) and/or Azure Firewall is recommended. If it is feasible, the Azure Cache for Redis instance can also be deleted and re-created with a new instance using Private Endpoints instead of VNets. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | X | X | X | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.7/SKILL.md new file mode 100644 index 0000000000..9db8474d00 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.7/SKILL.md @@ -0,0 +1,149 @@ +--- +name: cis-azure-database-2.7 +description: "Ensure Azure Cache for Redis is Using a Private Link" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, redis, cache] +cis_id: "2.7" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.7 Ensure Azure Cache for Redis is Using a Private Link (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Private links make resources available via a private endpoint to a network you select. Tunneling between subscriptions, resource groups, without the need for traditional network routing. + +## Rationale + +Networking communication should be segmented to prevent undesired interception. + +## Impact + +If improperly configured network communication between your Azure Cache for Redis and other resources may be interrupted. This is only concerning resources or services being offered to other Azure tenants. + +## Audit Procedure + +### Audit From Azure Portal + +1. Go to `Azure Cache for Redis`. +2. Select the name of a cache. +3. Expand the `Administration` menu in the left column. +4. Select **Networking**. +5. View the private endpoints associated with the cache. + +### Audit From PowerShell + +1. Run the following code block with the identifying information for your environment. + +```powershell +Get-AzPrivateEndpoint -ResourceGroupName | +Where-Object{ +$_.PrivateLinkServiceConnections.PrivateLinkServiceId -eq + +} +``` + +2. View the private endpoints associated with the cache. + +### Audit From Azure Policy + +- **Policy ID:** `960e650e-9ce3-4316-9590-8ee2c016ca2f` - **Name:** 'Azure Cache for Redis should use private link' + +## Expected Result + +At least one private endpoint should be associated with the Azure Cache for Redis instance. + +## Remediation + +### Remediate From Azure Portal + +1. Go to `Azure Cache for Redis`. +2. Select the name of a cache. +3. In the left column expand **Administration**. +4. Select **Networking**. +5. In the top heading select `Private Endpoints`. +6. Select `+ Private Endpoint`. +7. Select your subscription and resource group then select `Next : Resource >`. +8. Select `Connect to an Azure resource in my directory.` +9. Enter your subscription id or select from the dropdown. +10. Under Resource type select Microsoft.Cache/redisEnterprise from the dropdown. +11. Select your resource and your sub-resource of `redisEnterprise`. +12. Select your desired virtual network. +13. Select your desired subnet. +14. Determine whether you want to dynamically or statically allocate an IP address. +15. Select your network application security group or select `+ Create` to create a new one, the select **Next**. +16. Determine if you want to create a dns entry in a private DNS zone or on your own DNS servers. If in a private DNS zone select the desired subscription and resource group. Select next. +17. Enter any tags necessary, then click next. +18. Review the settings and select **Create**. +19. After creation your Cache will be available in your network at the FQDN and IP address listed under **Settings** and **DNS configuration**. + +### Remediate From PowerShell + +```powershell +$resourceGroup = "" +$virtualNetName = "" +$subnetName = "" +$redisName = "" +$privateEndpointName = "" +$dnsZoneName = "" +$dnsLinkName = "" + +# Get existing resources +$vnet = Get-AzVirtualNetwork -Name $virtualNetName -ResourceGroupName $resourceGroup +$subnet = Get-AzVirtualNetworkSubnetConfig -VirtualNetwork $virtualNetName -Name $subnetName +$redis = Get-AzRedisCache -Name $redisName -ResourceGroupName $resourceGroup + +# Validate Redis resource ID for Private Endpoint connection +$redisResourceId = $redis.Id + +# Link DNS Zone to Virtual Network +$link = New-AzPrivateDnsVirtualNetworkLink ` + -ZoneName $dnsZoneName ` + -ResourceGroupName $resourceGroup ` + -Name $dnsLinkName ` + -VirtualNetworkId $vnet.Id ` + -EnableRegistration false + +# Create the Private Endpoint +$privateLinkConnection = New-AzPrivateLinkServiceConnection ` + -Name $privateEndpointName ` + -PrivateLinkServiceId $redisResourceId ` + -GroupId "redisCache" + +$privateEndpoint = New-AzPrivateEndpoint ` + -Name $privateEndpointName ` + -ResourceGroupName $resourceGroup ` + -Location $location ` + -Subnet $subnet ` + -PrivateLinkServiceConnection $privateLinkConnection +``` + +## Default Value + +Unless configured at resource creation, by default no private links are used in Azure Cache for Redis. + +## References + +1. [https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-private-link](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-private-link) +2. [https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/azure-cache-for-redis-security-baseline](https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/azure-cache-for-redis-security-baseline) +3. [https://learn.microsoft.com/en-us/cli/azure/network/private-endpoint?view=azure-cli-latest](https://learn.microsoft.com/en-us/cli/azure/network/private-endpoint?view=azure-cli-latest) +4. [https://learn.microsoft.com/en-us/powershell/module/az.network/get-azprivateendpoint?view=azps-14.6.0](https://learn.microsoft.com/en-us/powershell/module/az.network/get-azprivateendpoint?view=azps-14.6.0) +5. [https://learn.microsoft.com/en-us/azure/private-link/private-link-overview](https://learn.microsoft.com/en-us/azure/private-link/private-link-overview) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | X | X | +| v7 | 14.1 Segment the Network Based on Sensitivity | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.8/SKILL.md new file mode 100644 index 0000000000..5b311e5c07 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.8/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-azure-database-2.8 +description: "Ensure that Azure Cache for Redis is Using Customer-Managed Keys" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, redis, cache] +cis_id: "2.8" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.8 Ensure that Azure Cache for Redis is Using Customer-Managed Keys (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Customer Managed Keys allow you more granular control over the encryption of your information. + +## Rationale + +Customer Managed Keys increase security of your disk encryption by offering features like custom managed expiration dates, allowing you to set your own key lifecycle. + +## Impact + +This comes with an increased cost, as only Enterprise tier Azure Cache for Redis supports customer managed keys. + +## Audit Procedure + +### Audit From Azure Portal + +1. Select your Redis Cache. +2. In the left column select **Encryption**. +3. View the keys listed, and determine if the checkbox for 'Customer Managed Key' is selected. + +### Audit From PowerShell + +1. Run the following command to determine if your Azure Cache for Redis is using a Customer Managed Key. + +```powershell +Get-AzRedisEnterpriseCache -ResourceGroupName "" -Name +"" | Select-Object -ExpandProperty +EnableCustomerManagedKey +``` + +2. If the command returns true, you are using a customer managed key. + +### Audit From Azure Policy + +- **Policy ID:** `09aa11bb-87ec-409f-bf0b-49b7c1561a87` - **Name:** 'Azure Cache for Redis Enterprise should use customer-managed keys for encrypting disk data' + +## Expected Result + +The 'Customer Managed Key' checkbox should be selected, or the PowerShell command should return `true`. + +## Remediation + +### Remediate From Azure Portal + +1. Select your Redis Cache. +2. In the left column select **Encryption**. +3. Select the checkbox to enable Customer Managed keys. +4. Select **Add** to assign a user managed identity with permissions to access your Azure key vault. +5. Select your subscription and Azure Key vault that contains your customer managed key. Ensure this is in the same region as your Azure Cache for Redis. +6. Select your customer managed key. +7. Click **Save**. + +### Remediate From PowerShell + +1. In Azure Key Vault find the full URL for a key you have created. Then run the following command with the information for your environment. + +```powershell +Update-AzRedisEnterpriseCache -ClusterName "" +-ResourceGroupName "" - +CustomerManagedKeyEncryptionKeyUrl "" +``` + +## Default Value + +By default Azure Cache for Redis uses Microsoft Managed Keys for all Redis services. + +## Additional Information + +Be certain to set your expiration dates and other settings for the Customer Managed Key within your Azure Key Vault for optimal security. + +## References + +1. [https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-encryption](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-encryption) +2. [https://learn.microsoft.com/en-us/powershell/module/az.redisenterprisecache/get-azredisenterprisecache](https://learn.microsoft.com/en-us/powershell/module/az.redisenterprisecache/get-azredisenterprisecache) +3. [https://learn.microsoft.com/en-us/powershell/module/az.redisenterprisecache/update-azredisenterprisecache](https://learn.microsoft.com/en-us/powershell/module/az.redisenterprisecache/update-azredisenterprisecache) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.9/SKILL.md new file mode 100644 index 0000000000..1bd9e2b44e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-2.9/SKILL.md @@ -0,0 +1,146 @@ +--- +name: cis-azure-database-2.9 +description: "Ensure 'Access Keys Authentication' is set to 'Disabled'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, redis, cache] +cis_id: "2.9" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.9 Ensure 'Access Keys Authentication' is set to 'Disabled' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Ensure access key authentication is disabled for Azure Cache for Redis instances. Use Microsoft Entra for secure cache authentication. + +## Rationale + +Access keys introduce security risks and management challenges, as they are long-lived secrets vulnerable to expose or misuse. Microsoft Entra authentication provides centralized identity and access management, reducing risk and improving overall security. + +## Impact + +Disabling access key authentication terminates all existing client connections. Ensure retry mechanisms are in place for reconnection via Microsoft Entra. + +Ensure Microsoft Entra authentication is enabled and configured before disabling access key authentication. + +Refer to the recommendation in this section titled **"Ensure 'Microsoft Entra Authentication' is 'Enabled'"** for details. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Azure Cache for Redis`. +2. Select the name of a cache. +3. Under **Settings**, select **Authentication**. +4. Select **Access keys**. +5. Ensure `Disable Access Keys Authentication` is checked. +6. Repeat steps 1-5 for each cache. + +### Audit from Azure CLI + +Run the following command to list caches: + +```bash +az redis list +``` + +For each cache, run the following command to get the `disableAccessKeyAuthentication` setting: + +```bash +az redis show --resource-group --name --query disableAccessKeyAuthentication +``` + +Ensure `true` is returned. + +### Audit from PowerShell + +Run the following command to list caches: + +```powershell +Get-AzRedisCache +``` + +Run the following command to get the cache in a resource group with a given name: + +```powershell +$cache = Get-AzRedisCache -ResourceGroupName -Name +``` + +Run the following command to get the `DisableAccessKeyAuthentication` setting: + +```powershell +$cache.DisableAccessKeyAuthentication +``` + +Ensure `True` is returned. + +Repeat for each cache. + +### Audit From Azure Policy + +- **Policy ID:** `3827af20-8f80-4b15-8300-6db0873ec901` - **Name:** 'Azure Cache for Redis should not use access keys for authentication' + +## Expected Result + +The `Disable Access Keys Authentication` checkbox should be checked, or CLI/PowerShell should return `true`/`True`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Azure Cache for Redis`. +2. Select the name of a cache. +3. Under **Settings**, select **Authentication**. +4. Select **Access keys**. +5. Check `Disable Access Keys Authentication`. +6. Select **Save**. +7. Select **Yes** to confirm. +8. Repeat steps 1-7 for each cache. + +### Remediate from Azure CLI + +For each cache requiring remediation, run the following command to disable access key authentication: + +```bash +az redis update --resource-group --name --set "disableAccessKeyAuthentication=true" +``` + +### Remediate from PowerShell + +For each cache requiring remediation, run the following command to disable access key authentication: + +```powershell +Set-AzRedisCache -ResourceGroupName -Name -DisableAccessKeyAuthentication $true +``` + +## Default Value + +By default, access key authentication is disabled. + +## References + +1. [https://learn.microsoft.com/en-gb/azure/azure-cache-for-redis/cache-azure-active-directory-for-authentication](https://learn.microsoft.com/en-gb/azure/azure-cache-for-redis/cache-azure-active-directory-for-authentication) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | X | X | +| v7 | 16.2 Configure Centralized Point of Authentication | | X | X | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1134 | TA0004 | M1018 | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.1/SKILL.md new file mode 100644 index 0000000000..51a0afa868 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.1/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-azure-database-3.1 +description: "Ensure That 'Firewalls & Networks' Is Limited to Use Selected Networks Instead of All Networks" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, cosmos-db, nosql] +cis_id: "3.1" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.1 Ensure That 'Firewalls & Networks' Is Limited to Use Selected Networks Instead of All Networks (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Limiting your Cosmos DB to only communicate on whitelisted networks lowers its attack footprint. + +## Rationale + +Selecting certain networks for your Cosmos DB to communicate restricts the number of networks including the internet that can interact with what is stored within the database. + +## Impact + +**WARNING:** Failure to whitelist the correct networks will result in a connection loss. If using NoSQL / Table / Graph APIs for Cosmos DB Data Explorer end user IPs must be allowed. Other APIs are proxied and shouldn't require end user IPs. + +**WARNING:** Changes to Cosmos DB firewalls may take up to 15 minutes to apply. Ensure that sufficient time is planned for remediation or changes to avoid disruption. + +## Audit Procedure + +### Audit From Azure Portal + +1. Open the portal menu. +2. Select the Azure Cosmos DB blade +3. Select a Cosmos DB to audit. +4. Select **Networking**. +5. Under `Public network access`, ensure `Selected networks` is selected. +6. Under `Virtual networks`, ensure appropriate virtual networks are configured. + +### Audit From Azure CLI + +Retrieve a list of all CosmosDB database names: + +```bash +az cosmosdb list +``` + +For each database listed, run the following command: + +```bash +az cosmosdb show +``` + +For each database, ensure that `isVirtualNetworkFilterEnabled` is set to `true`. + +### Audit From Azure Policy + +- **Policy ID:** `862e97cf-49fc-4a5c-9de4-40d4e2e7c8eb` - **Name:** 'Azure Cosmos DB accounts should have firewall rules' + +## Expected Result + +`isVirtualNetworkFilterEnabled` should be set to `true` and `Public network access` should be set to `Selected networks` with appropriate virtual networks configured. + +## Remediation + +### Remediate From Azure Portal + +1. Open the portal menu. +2. Select the Azure Cosmos DB blade. +3. Select a Cosmos DB account to audit. +4. Select **Networking**. +5. Under `Public network access`, select **Selected networks**. +6. Under `Virtual networks`, select `+ Add existing virtual network` or `+ Add a new virtual network`. +7. For existing networks, select subscription, virtual network, subnet and click **Add**. For new networks, provide a name, update the default values if required, and click **Create**. +8. Click **Save**. + +## Default Value + +By default, Cosmos DBs are set to have access all networks. + +## References + +1. [https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-private-endpoints](https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-private-endpoints) +2. [https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-vnet-service-endpoint](https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-vnet-service-endpoint) +3. [https://docs.microsoft.com/en-us/cli/azure/cosmosdb?view=azure-cli-latest#az-cosmosdb-show](https://docs.microsoft.com/en-us/cli/azure/cosmosdb?view=azure-cli-latest#az-cosmosdb-show) +4. [https://docs.microsoft.com/en-us/cli/azure/cosmosdb/database?view=azure-cli-latest#az-cosmosdb-database-list](https://docs.microsoft.com/en-us/cli/azure/cosmosdb/database?view=azure-cli-latest#az-cosmosdb-database-list) +5. [https://docs.microsoft.com/en-us/powershell/module/az.cosmosdb/?view=azps-8.1.0](https://docs.microsoft.com/en-us/powershell/module/az.cosmosdb/?view=azps-8.1.0) +6. [https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls](https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | X | X | X | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | X | X | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | X | X | X | +| v7 | 14.1 Segment the Network Based on Sensitivity | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.2/SKILL.md new file mode 100644 index 0000000000..cc8116d8fe --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.2/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-azure-database-3.2 +description: "Ensure that Cosmos DB uses Private Endpoints where possible" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, cosmos-db, nosql] +cis_id: "3.2" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.2 Ensure that Cosmos DB uses Private Endpoints where possible (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Private endpoints limit network traffic to approved sources. + +## Rationale + +For sensitive data, private endpoints allow granular control of which services can communicate with Cosmos DB and ensure that this network traffic is private. This can be set this up on a case by case basis for each service to be connected. + +## Impact + +Only whitelisted services will have access to communicate with the Cosmos DB. + +## Audit Procedure + +### Audit From Azure Portal + +1. Open the portal menu. +2. Select the Azure Cosmos DB blade. +3. Select the Azure Cosmos DB account. +4. Select **Networking**. +5. Ensure `Public network access` is set to `Selected networks`. +6. Ensure the listed networks are set appropriately. +7. Select **Private access**. +8. Ensure a private endpoint exists and `Connection state` is **Approved**. + +### Audit From Azure Policy + +- **Policy ID:** `58440f8a-10c5-4151-bdce-dfbaad4a20b7` - **Name:** 'CosmosDB accounts should use private link' + +## Expected Result + +A private endpoint should exist with `Connection state` set to **Approved**, and `Public network access` should be set to `Selected networks`. + +## Remediation + +### Remediate From Azure Portal + +1. Open the portal menu. +2. Select the Azure Cosmos DB blade. +3. Select the Azure Cosmos DB account. +4. Select **Networking**. +5. Select **Private access**. +6. Click `+ Private Endpoint`. +7. Provide a Name. +8. Click **Next**. +9. From the Resource type drop down, select `Microsoft.AzureCosmosDB/databaseAccounts`. +10. From the Resource drop down, select the Cosmos DB account. +11. Click **Next**. +12. Provide appropriate Virtual Network details. +13. Click **Next**. +14. Provide appropriate DNS details. +15. Click **Next**. +16. Optionally provide Tags. +17. Click `Next : Review + create`. +18. Click **Create**. + +## Default Value + +By default Cosmos DB does not have private endpoints enabled and its traffic is public to the network. + +## References + +1. [https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-private-endpoints](https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-private-endpoints) +2. [https://docs.microsoft.com/en-us/azure/private-link/tutorial-private-endpoint-cosmosdb-portal](https://docs.microsoft.com/en-us/azure/private-link/tutorial-private-endpoint-cosmosdb-portal) +3. [https://docs.microsoft.com/en-us/cli/azure/cosmosdb/private-endpoint-connection?view=azure-cli-latest](https://docs.microsoft.com/en-us/cli/azure/cosmosdb/private-endpoint-connection?view=azure-cli-latest) +4. [https://docs.microsoft.com/en-us/cli/azure/network/private-endpoint?view=azure-cli-latest#az-network-private-endpoint-create](https://docs.microsoft.com/en-us/cli/azure/network/private-endpoint?view=azure-cli-latest#az-network-private-endpoint-create) +5. [https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls](https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | X | X | +| v7 | 14.1 Segment the Network Based on Sensitivity | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.3/SKILL.md new file mode 100644 index 0000000000..7f6f0354fe --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.3/SKILL.md @@ -0,0 +1,128 @@ +--- +name: cis-azure-database-3.3 +description: "Ensure that 'disableLocalAuth' is set to 'true'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, cosmos-db, nosql] +cis_id: "3.3" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.3 Ensure that 'disableLocalAuth' is set to 'true' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Ensure that key-based authentication (including resource owner password credential authentication) is disabled for Azure Cosmos DB accounts by setting `disableLocalAuth` to `true`. Instead, use Microsoft Entra ID for authentication, as it provides stronger security through managed credentials, multi-factor authentication (MFA), centralized access control, and seamless integration with Azure RBAC. + +## Rationale + +Disabling key-based authorization ensures that access to your Azure Cosmos DB account relies on the more secure Microsoft Entra ID authentication, reducing the risk of credential misuse and unauthorized access. + +## Impact + +Administrative overhead in configuring, managing, and monitoring Entra ID authentication and role-based access. + +## Audit Procedure + +### Audit from Azure CLI + +Run the following command to get the `disableLocalAuth` setting for each Cosmos DB account: + +```bash +az cosmosdb list --query "[].{name:name, resourceGroup:resourceGroup, disableLocalAuth:disableLocalAuth}" +``` + +Ensure that `disableLocalAuth` is set to `true` for each Cosmos DB account. + +### Audit from PowerShell + +Run the following command to list Cosmos DB accounts in a resource group: + +```powershell +Get-AzCosmosDBAccount -ResourceGroupName +``` + +Run the following command to get the Cosmos DB account in a resource group with a given name: + +```powershell +$cosmosdb = Get-AzResource -ResourceType Microsoft.DocumentDB/databaseAccounts -ResourceGroupName -ResourceName +``` + +Run the following command to get the `disableLocalAuth` setting for the Cosmos DB account: + +```powershell +$cosmosdb.Properties.disableLocalAuth +``` + +Ensure that the command returns `True`. + +Repeat for each Cosmos DB account. + +### Audit from Azure Policy + +- **Policy ID:** `5450f5bd-9c72-4390-a9c4-a7aba4edfdd2` - **Name:** 'Cosmos DB database accounts should have local authentication methods disabled' + +## Expected Result + +`disableLocalAuth` should be set to `true` for each Cosmos DB account. + +## Remediation + +Map all the resources that currently have access to the Azure Cosmos DB account with keys or access tokens. + +Create an Entra ID identity for each of these resources: + +- For Azure resources, you can create a managed identity. You may choose between system-assigned and user-assigned managed identities. +- For non-Azure resources, create Entra ID service principals. Grant each Entra ID service principal the minimum permissions it requires. We recommend using one of the two built-in role definitions: Cosmos DB Built-in Data Reader or Cosmos DB Built-in Data Contributor. Validate that the new resource is functioning correctly. After new permissions are granted to identities, it may take a few hours for them to propagate. + +When all resources work correctly with the new identities, continue to the next step. + +### Remediate from Azure CLI + +For each Cosmos DB account requiring remediation, run the following command to set `disableLocalAuth` to `true`: + +```bash +az resource update --resource-group --name --resource-type Microsoft.DocumentDB/databaseAccounts --set properties.disableLocalAuth=true +``` + +### Remediate from PowerShell + +For each Cosmos DB account requiring remediation, run the following commands to set `disableLocalAuth` to `True`: + +```powershell +$cosmosdb = Get-AzResource -ResourceType Microsoft.DocumentDB/databaseAccounts -ResourceGroupName -ResourceName +$cosmosdb.Properties.disableLocalAuth = "True" +$cosmosdb | Set-AzResource -Force +``` + +## Default Value + +By default, `disableLocalAuth` is set to `false`. + +## References + +1. [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/security/how-to-disable-key-based-authentication](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/security/how-to-disable-key-based-authentication) +2. [https://learn.microsoft.com/en-us/azure/cosmos-db/role-based-access-control](https://learn.microsoft.com/en-us/azure/cosmos-db/role-based-access-control) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control | | X | X | +| v7 | 16.2 Configure Centralized Point of Authentication | | X | X | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1190 | | | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.4/SKILL.md new file mode 100644 index 0000000000..da08970333 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.4/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-azure-database-3.4 +description: "Ensure 'Public Network Access' is 'Disabled'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, cosmos-db, nosql] +cis_id: "3.4" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.4 Ensure 'Public Network Access' is 'Disabled' (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Setting public networks to disabled prevents requests from the public internet. + +## Rationale + +Allowlisting secures Azure Cosmos DB from the public internet and prevents unauthorized access requests. + +## Impact + +If improperly configured, network communication to the Azure Cosmos DB Account will be interrupted, including Azure web portal access potentially. Be certain to check the additional resources linked here and allowlist appropriate IPs for your environment before selecting apply. + +Disabling 'Public Network Access' forces the requirement of the use of Private Endpoints for network connectivity which will require some additional consideration from a network architecture perspective and will introduce cost based on the inbound/outbound data being processed by the Private Endpoint. + +## Audit Procedure + +### Audit from Azure Portal + +1. Select or search for `Azure CosmosDB`. +2. Select your Azure CosmosDB Account. +3. In the left column expand `> Settings`. +4. Select **Networking**. +5. Determine in the second row if Public Network Access is set to `All Networks`. + +### Audit from PowerShell + +1. Run the following PowerShell command with identifying information for your environment. + +```powershell +Get-AzCosmosDBAccount -Name -ResourceGroupName | Select-Object -Property "PublicNetworkAccess", "IpRules", "IpRangeFilter" +``` + +2. Determine from left to right, if public network access is enabled, which IpRules are set, and which IP Ranges are allowlisted. All must be accurate for your environment for proper functionality. + +### Audit From Azure Policy + +- **Policy ID:** `797b37f7-06b8-444c-b1ad-fc62867f335a` - **Name:** 'Azure Cosmos DB should disable public network access' + +## Expected Result + +Public Network Access should be set to **Disabled**, or if set to `Selected networks`, only appropriate IP addresses should be allowlisted. + +## Remediation + +### Remediate from Azure Portal + +1. Select or search for `Azure CosmosDB`. +2. Select your Azure CosmosDB Account. +3. In the left column expand `> Settings`. +4. Select **Networking**. +5. Under `Public Access` select the radial button **Disabled**. +6. Select **Save** + +### Remediate from PowerShell + +1. Run the following PowerShell as many times as you need with the public network information for your environment to allowlist your ip addresses with CIDR notation, e.g. `0.0.0.0/0`. These must also not be private IP addresses. + +```powershell +Update-AzCosmosDBAccount -name -ResourceGroupName -IPRule +``` + +2. Once all your IP addresses are allowlisted, run the following PowerShell command with identifying information for your environment. + +```powershell +Update-AzCosmosDBAccount -name -ResourceGroupName -PublicNetworkAccess 'Disabled' +``` + +## Default Value + +Unless specified at resource creation, Azure CosmosDB by default allows public network access, but authenticates requests. + +## References + +1. [https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-configure-firewall](https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-configure-firewall) +2. [https://learn.microsoft.com/en-us/powershell/module/az.cosmosdb/update-azcosmosdbaccount?view=azps-15.0.0#-publicnetworkaccess](https://learn.microsoft.com/en-us/powershell/module/az.cosmosdb/update-azcosmosdbaccount?view=azps-15.0.0#-publicnetworkaccess) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | X | X | X | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.5/SKILL.md new file mode 100644 index 0000000000..fd263b0e9f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.5/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-database-3.5 +description: "Ensure critical data is encrypted with customer-managed keys (CMK)" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, cosmos-db, nosql] +cis_id: "3.5" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.5 Ensure critical data is encrypted with customer-managed keys (CMK) (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Customer-managed keys introduce additional depth to security by providing control over encryption keys. Where required, and organizational capacity allows, sensitive data at rest can be encrypted using customer-managed keys. + +While it is possible to automate the assessment of this recommendation, the assessment status remains "Manual" due to ideally limited scope. The scope of application should be carefully considered to account for organizational capacity, and targeted to workloads with specific need for CMK. + +## Rationale + +Customer-managed keys provide greater control over the creation, rotation, and revocation of encryption keys, supporting strict security and compliance requirements. + +## Impact + +Implementing customer-managed keys introduces additional administrative effort to create, rotate, monitor, and secure encryption keys. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Azure Cosmos DB`. +2. Select the name of an Azure Cosmos DB account. +3. Under **Settings**, select **Data Encryption**. +4. Ensure `Encryption Key Type` is set to `Customer-managed key`. +5. Repeat steps 1-4 for each account. + +### Audit from Azure CLI + +Run the following command to list Azure Cosmos DB accounts: + +```bash +az cosmosdb list +``` + +For each account, run the following command to get the Key Vault key URI: + +```bash +az cosmosdb show --resource-group --name --query keyVaultKeyUri +``` + +Ensure an Azure Key Vault key URI is returned. + +### Audit from PowerShell + +Run the following command to get Azure Cosmos DB accounts for a given resource group: + +```powershell +Get-AzCosmosDBAccount -ResourceGroupName +``` + +Run the following command to get the account with a given name: + +```powershell +$cosmosdb = Get-AzCosmosDBAccount -ResourceGroupName -Name +``` + +Run the following command to get the Key Vault key URI: + +```powershell +$cosmosdb.KeyVaultKeyUri +``` + +Ensure an Azure Key Vault key URI is returned. + +Repeat for each account. + +### Audit from Azure Policy + +- **Policy ID:** `1f905d99-2ab7-462c-a6b0-f709acca6c8f` - **Name:** 'Azure Cosmos DB accounts should use customer-managed keys to encrypt data at rest' + +## Expected Result + +`Encryption Key Type` should be set to `Customer-managed key`, or a Key Vault key URI should be returned from CLI/PowerShell. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Azure Cosmos DB`. +2. Select the name of an Azure Cosmos DB account. +3. Under **Settings**, select **Data Encryption**. +4. Set `Encryption Key Type` to `Customer-managed key`. +5. Provide a key URI. +6. Select **Save**. +7. Repeat steps 1-6 for each account requiring remediation. + +## Default Value + +By default, Azure Cosmos DB accounts are encrypted using service-managed keys. + +## References + +1. [https://learn.microsoft.com/en-gb/azure/cosmos-db/how-to-setup-customer-managed-keys-existing-accounts](https://learn.microsoft.com/en-gb/azure/cosmos-db/how-to-setup-customer-managed-keys-existing-accounts) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1041 | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.6/SKILL.md new file mode 100644 index 0000000000..c608537fca --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.6/SKILL.md @@ -0,0 +1,143 @@ +--- +name: cis-azure-database-3.6 +description: "Ensure the firewall does not allow all network traffic" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, cosmos-db, nosql] +cis_id: "3.6" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.6 Ensure the firewall does not allow all network traffic (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Do not allow all network traffic. Restrict access to specific IP addresses or ranges. + +## Rationale + +Allowing all network traffic limits the effectiveness of a firewall. + +## Impact + +Administrative effort to identify and maintain the list of IP addresses and ranges requiring access to the account. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Azure Cosmos DB`. +2. Select the name of an Azure Cosmos DB account. +3. Under **Settings**, select **Networking**. +4. Under `Public access`, if `Public network access` is set to `Selected networks`, ensure `0.0.0.0` is not listed under `Firewall` > `IPs`. +5. Repeat steps 1-4 for each account. + +### Audit from Azure CLI + +Run the following command to list Azure Cosmos DB accounts: + +```bash +az cosmosdb list +``` + +For each account, run the following command to get the list of allowed IP addresses: + +```bash +az cosmosdb show --resource-group --name --query ipRules +``` + +Ensure that the response does not contain `"0.0.0.0"`. + +### Audit from PowerShell + +Run the following command to get Azure Cosmos DB accounts for a given resource group: + +```powershell +Get-AzCosmosDBAccount -ResourceGroupName +``` + +Run the following command to get the account with a given name: + +```powershell +$cosmosdb = Get-AzCosmosDBAccount -ResourceGroupName -Name +``` + +Run the following command to get the list of allowed IP addresses: + +```powershell +$cosmosdb.IpRules +``` + +Ensure that the response does not contain `0.0.0.0`. + +Repeat for each account. + +### Audit from Azure Policy + +- **Policy ID:** `12339a85-a25c-4f17-9f82-4766f13f5c4c` - **Name:** 'Azure Cosmos DB accounts should not allow traffic from all Azure data centers' + +## Expected Result + +The IP rules should not contain `0.0.0.0`, which would allow all network traffic. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Azure Cosmos DB`. +2. Select the name of an Azure Cosmos DB account. +3. Under **Settings**, select **Networking**. +4. Under `Public access`, `Firewall` > `IPs`, select the **Delete** icon next to `0.0.0.0`. +5. Select **Save**. +6. Repeat steps 1-5 for each account requiring remediation. + +### Remediate from Azure CLI + +For each account requiring remediation, run the following command to update the list of allowed IP addresses, excluding `0.0.0.0`: + +```bash +az cosmosdb update --resource-group --name --ip-range-filter +``` + +### Remediate from PowerShell + +For each account requiring remediation, run the following command to update the list of allowed IP addresses, excluding `0.0.0.0`: + +```powershell +Update-AzCosmosDBAccount -ResourceGroupName -Name -IpRule +``` + +## Default Value + +By default, the firewall does not allow all network traffic. + +## Additional Information + +Setting `publicNetworkAccess` to `Disabled` takes precedence over `Accept connections from within public Azure datacenters`. + +## References + +1. [https://learn.microsoft.com/en-gb/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-global-azure-datacenters-or-other-sources-within-azure](https://learn.microsoft.com/en-gb/azure/cosmos-db/how-to-configure-firewall#allow-requests-from-global-azure-datacenters-or-other-sources-within-azure) + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | X | X | X | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | X | X | X | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1037 | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.7/SKILL.md new file mode 100644 index 0000000000..b7c3f0ce25 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.7/SKILL.md @@ -0,0 +1,131 @@ +--- +name: cis-azure-database-3.7 +description: "Ensure that Cosmos DB Logging is Enabled" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, cosmos-db, nosql] +cis_id: "3.7" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 3.7 Ensure that Cosmos DB Logging is Enabled (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Cosmos DB logs should be captured to track events relevant to auditing and diagnostics. + +## Rationale + +Logging of changes, events, and information related to Cosmos DB provides a diagnostic tool and a forensic record of activity. An effective set of logs help provide integrity and availability to the service and contribute to the effectiveness of detective systems such as a SIEM. + +## Impact + +There may be additional storage costs for logging a large amount of events. Potentially only keep logs for a certain timeframe before they are deleted. + +## Audit Procedure + +**NOTE:** This procedure assumes a Log Analytics Workspace or other logging destination already exists. Please see attached resources on this setup. + +### Audit from Azure Portal + +1. From `Azure CosmosDB`, select the database you wish to audit. +2. Scroll down in the left column and select `> Monitoring`. +3. Select **Diagnostic Settings**. +4. Determine if there are any diagnostic settings that are being sent to a logging location. You will need to open each listed and determine if `allLogs` under `Category groups` is checked. + +### Audit from PowerShell + +1. Get the CosmosDB accounts for a specific resource group. Repeat for each resource group as necessary. + +```powershell +Get-AzCosmosDBAccount -ResourceGroupName +``` + +2. For each CosmosDB, determine which log categories are enabled for each account using the _Id_ of each CosmosDB Account. + +```powershell +Get-AzDiagnosticSetting -ResourceId +``` + +3. Within the output of the above command, ensure the log categories have _Enabled_ set to _true_. + +## Expected Result + +Diagnostic settings should be configured with `allLogs` enabled under `Category groups`, sending logs to an appropriate logging destination (Log Analytics Workspace, Storage Account, or Event Hub). + +## Remediation + +**NOTE:** This procedure assumes a Log Analytics Workspace or other logging destination already exists. Please see attached resources on this setup. + +### Remediate from Azure Portal + +1. From `Azure CosmosDB`, select the database you wish to audit. +2. Scroll down in the left column and select `> Monitoring`. +3. Select **Diagnostic Settings**. +4. Select `+ Add Diagnostic Setting` +5. Enter your name for this setting in `Diagnostic Setting Name`. +6. Select `allLogs` under `Category groups` +7. Select `Send to Log Analytics workspace` or other logging solution under `Destination details`. +8. Select your Azure subscription, and your log analytics workspace, or other connection details depending on your logging solution. +9. Select **Save** in the top left corner. + +### Remediate from PowerShell + +For each CosmosDB account out of compliance, enable the logging by running the following command: + +```powershell +$categories = @( + @{ + Category="ControlPlaneRequests"; + Enabled=$true; + RetentionPolicy=@{ Enabled=$false; Days=0 } + }, + @{ + Category="DataPlaneRequests"; + Enabled=$true; + RetentionPolicy=@{ Enabled=$false; Days=0 } + }, + @{ + Category="MongoRequests"; + Enabled=$true; + RetentionPolicy=@{ Enabled=$false; Days=0 } + }, + @{ + Category="SqlRequests"; + Enabled=$true; + RetentionPolicy=@{ Enabled=$false; Days=0 } + }, + @{ + Category="GremlinQueries"; + Enabled=$true; + RetentionPolicy=@{ Enabled=$false; Days=0 } + }, + @{ + Category="TableRequests"; + Enabled=$true; + RetentionPolicy=@{ Enabled=$false; Days=0 } + } +) + +Set-AzDiagnosticSetting -Name -ResourceId -WorkspaceId -Categories $categories -Enabled $true +``` + +## Default Value + +By default, event logging for Azure Cosmos DB is not enabled. + +## References + +1. [https://learn.microsoft.com/en-us/azure/azure-monitor/logs/quick-create-workspace](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/quick-create-workspace) +2. [https://learn.microsoft.com/en-us/azure/cosmos-db/monitor](https://learn.microsoft.com/en-us/azure/cosmos-db/monitor) +3. [https://www.azadvertizer.net/azpolicyadvertizer/45c6bfc7-4520-4d64-a158-730cd92eedbc.html](https://www.azadvertizer.net/azpolicyadvertizer/45c6bfc7-4520-4d64-a158-730cd92eedbc.html) diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.1/SKILL.md new file mode 100644 index 0000000000..fbbca5dbeb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.1/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-azure-database-4.1 +description: "Ensure Data Factory is encrypted using Customer Managed Keys" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, data-factory, adf] +cis_id: "4.1" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1 Ensure Data Factory is encrypted using Customer Managed Keys (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Customer-managed keys introduce additional depth to security by providing a means to manage access control for encryption keys. Where compliance and security frameworks indicate the need, and organizational capacity allows, sensitive data at rest can be encrypted using customer-managed keys (CMK) rather than Microsoft-managed keys. + +## Rationale + +By default in Azure, data at rest tends to be encrypted using Microsoft-managed keys. If your organization wants to control and manage encryption keys for compliance and defense-in-depth, customer-managed keys can be established. + +Configuring the storage account with the activity log export container to use CMKs provides additional confidentiality controls on log data, as a given user must have read permission on the corresponding storage account and must be granted decrypt permission by the CMK. + +While it is possible to automate the assessment of this recommendation, the assessment status for this recommendation remains 'Manual' due to ideally limited scope. The scope of application -- which workloads CMK is applied to -- should be carefully considered to account for organizational capacity and targeted to workloads with specific need for CMK. + +## Impact + +If the key expires due to setting the 'activation date' and 'expiration date', the key must be rotated manually. + +Using customer-managed keys may also incur additional man-hour requirements to create, store, manage, and protect the keys as needed. + +## Audit + +### Audit from Azure Portal + +1. From `Azure Data Factory` select the Data Factory to audit. +2. From the `Overview` selection scroll down and select `Launch Studio`. +3. Select the `wrench and briefcase` icon named `Manage`. +4. In the left column scroll down to under `Security` and select `Customer managed key`. +5. Audit the keys listed here. + +### Audit From Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. + +If referencing a printed copy, you can search Policy IDs from this URL: +https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- **Policy ID:** `4ec52d6d-beb7-40c4-9a9e-fe753254690e` - **Name:** 'Azure data factories should be encrypted with a customer-managed key' + +## Expected Result + +A customer-managed key should be configured and listed under the Security > Customer managed key section in Azure Data Factory Studio. + +## Remediation + +### Remediate from Azure Portal + +1. Retrieve the key identifier for a key in a Key Vault located in the same subscription and region as your Azure Data Factory. +2. From the `Azure Data Factory` service, select the Data Factory to audit. +3. From the `Overview` selection scroll down and select `Launch Studio`. +4. Select the `wrench and briefcase` icon named `Manage`. +5. In the left column scroll down to under `Security` and select `Customer managed key`. +6. Select `Add key`. +7. Under `Azure Key Vault key URL` enter in the key identifier of the key to be used. +8. Select `Save`. + +## Default Value + +By default in Azure, data at rest tends to be encrypted using Microsoft-managed keys. + +## References + +1. https://learn.microsoft.com/en-us/azure/data-factory/enable-customer-managed-key + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1041 | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.2/SKILL.md new file mode 100644 index 0000000000..ce06678061 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.2/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-azure-database-4.2 +description: "Ensure Data Factory is using Managed Identities" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, data-factory, adf] +cis_id: "4.2" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.2 Ensure Data Factory is using Managed Identities (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Managed identities are the roles that Azure services assume to access other services or resources. Access and permissions may be set on these roles to set the scope and reach of what a service can access. Setting a service to use a managed identity also prevents the need to store credentials in code or other less secure options. + +## Rationale + +Managed identities eliminate the need to store and manage credentials to access Azure resources. Scoping permissions of a managed identity to a specific set of resources also prevents unwanted access elsewhere. + +## Impact + +Initial administrative overhead to configure and manage role assignments for managed identities. + +## Audit + +### Audit from Azure Portal + +1. From `Data Factories` select a factory to audit. +2. In the left column expand `> Settings`. +3. Select `Managed identities`. +4. In the top `System assigned` menu, determine if the default identity is in use under `Status`, by whether this is set to `On`. +5. Determine if there are any custom identities assigned to this resource by selecting in the top menu `User Assigned`. + +### Audit From Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. + +If referencing a printed copy, you can search Policy IDs from this URL: +https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- **Policy ID:** `f78ccdb4-7bf4-4106-8647-270491d2978a` - **Name:** 'Azure Data Factory linked services should use system-assigned managed identity authentication when it is supported' + +## Expected Result + +The `Status` under System assigned should be set to `On`, indicating that a managed identity is in use for the Data Factory. + +## Remediation + +### Remediate from Azure Portal + +1. From `Data Factories` select a factory to remediate. +2. In the left column expand `> Settings`. +3. Select `Managed identities`. +4. From the `System Assigned` tab, under `Permissions` select `Azure role assignments`. +5. `Select + Add role assignments (Preview)`. +6. Select a `Scope`, `Subscription` and `Role` to be added. +7. Select `Save`. + +## Default Value + +By default, Data Factories use a system assigned managed identity, with no permissions to resources set. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview +2. https://learn.microsoft.com/en-us/azure/data-factory/data-factory-service-identity diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.3/SKILL.md new file mode 100644 index 0000000000..40f3490dc4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.3/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-azure-database-4.3 +description: "Ensure that Data Factory is using Azure Key Vault to store Credentials and Secrets" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, data-factory, adf] +cis_id: "4.3" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.3 Ensure that Data Factory is using Azure Key Vault to store Credentials and Secrets (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Azure Key Vault is a way to securely store secrets and keys, and create role based access control permissions to services and users to access them. + +## Rationale + +Use of Azure Key Vault is greatly recommended over less secure options like hard coding credentials into code. + +## Impact + +This will create technical overhead as your organization will need to manage the lifecycle, expiration, and rotation of secrets and keys to fit your security baseline. + +## Audit + +### Audit from Azure Portal + +1. From `Data Factories` select a factory to audit. +2. Under the `Overview` selection scroll down in the right pane and select `Launch studio` under `Azure Data Factory Studio`. +3. In the left column select the briefcase and wrench for `Manage`. +4. In the left column select `Linked Services` under `Connections`. +5. Browse the linked services to determine if there is a connection to an Azure key vault. It has a circle icon with a key in it. + +### Audit From Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. + +If referencing a printed copy, you can search Policy IDs from this URL: +https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- **Policy ID:** `127ef6d7-242f-43b3-9eef-947faf1725d0` - **Name:** 'Azure Data Factory linked services should use Key Vault for storing secrets' + +## Expected Result + +A linked service connection to an Azure Key Vault should be present under Manage > Linked Services > Connections in Azure Data Factory Studio. + +## Remediation + +### Remediate from Azure Portal + +#### Retrieve Managed Identity Object ID + +1. From `Azure Data Factories` select a factory to link to an Azure Key Vault. +2. In the left column, expand `> Settings` and select `Properties`. +3. Select `Managed Identity Object ID` and save this code for later. + +#### Set Permissions for Key Vault + +_Note_ this presumes the use of RBAC Access control, not Access policies. + +1. From `Key vaults` select a key vault to grant access to. +2. Select `+ Add`, and select `Add role assignment` from the dropdown. +3. For the `Role`, search for `key vault`. Listed are various permissions to be assigned. Determine your organization's permission need, but `Key Vault Reader` is satisfactory for basic key and secrets access. +4. Select `Next`. +5. In the new screen, next to `Assign access to`, select Managed identity. +6. Next to Members select `+ Select members`. +7. Choose your subscription, and either under `Managed identity` scroll to `Data Factory` and select it, or search by your Data Factory's name. +8. Select your Data Factory. +9. Choose `Select`. +10. Select `Review + assign`. + +#### Create Connection Between Key Vault and Data Factory + +1. From `Data Factories` select your data factory. +2. Under the `Overview` selection scroll down in the right pane and select `Launch studio` under `Azure Data Factory Studio`. +3. In the left column select the briefcase and wrench for `Manage`. +4. In the left column select `Linked Services` under `Connections`. +5. Select `+ New`. +6. Search for `Azure Key Vault` and select it. +7. In the new window, name your connection and enter a desired description. +8. Under `Azure key vault selection method`, choose `From Azure Subscription`. +9. Select your Azure Subscription. +10. Select your key vault by name. +11. Under `Authentication Method` select `System-assigned managed identity` or `User-assigned managed identity` depending on what managed identity is in use on your data factory. +12. Select `Create`. + +## Default Value + +By default Azure Data Factories do not use Azure Key Vault to store credentials or secrets. + +## References + +1. https://learn.microsoft.com/en-us/azure/data-factory/store-credentials-in-key-vault +2. https://learn.microsoft.com/en-us/azure/data-factory/data-factory-service-identity#retrieve-managed-identity diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.4/SKILL.md new file mode 100644 index 0000000000..cd0a3b3cf1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-4.4/SKILL.md @@ -0,0 +1,67 @@ +--- +name: cis-azure-database-4.4 +description: "Ensure that Data Factory is using RBAC to manage privilege assignment" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, data-factory, adf] +cis_id: "4.4" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.4 Ensure that Data Factory is using RBAC to manage privilege assignment (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Role Based Access Control (RBAC) is setting permissions to the role that a user occupies. Often the user is added to a group which the account inherits permissions from. This is different than Access Policies which are used on an individual case by case basis for each user. + +## Rationale + +RBAC enhances security by limiting user privilege to only what is necessary for a job role, reducing the risk of unauthorized access. Additionally, RBAC aids compliance with regulations and provides clear accountability by tracking access activities linked to specific roles. + +## Impact + +There will be a slight increase in technical overhead in that user permissions will need to be manually assigned. However once added to a group, permissions may be edited for every account in the group at one time. + +## Audit + +### Audit from Azure Portal + +1. From `Data Factories` select a data factory to audit. +2. In the left column select `Access control (IAM)`. +3. To check an individual account or group, in the horizontal row, select `Check access`, then search for a user, group, or managed identity. +4. To check all roles, in the horizontal row select `Role assignments`, and scroll through all the roles that have permission to this data factory. + +## Expected Result + +Appropriate RBAC role assignments should be configured for the Data Factory, with roles scoped to the minimum necessary permissions for each user or group. + +## Remediation + +### Remediate from Azure Portal + +1. From `Data Factories` select a data factory to audit. +2. In the left column select `Access control (IAM)`. +3. Select `+ Add \/` and then `Add role assignment`. +4. Select the builtin or custom role to be added. Then select `Next`. +5. Next to `Assign access to` select either `User, group, or service principal` or `Managed identity` to be added to this role. +6. Choose `Select members`, then search for the resource that is to be added to this role. +7. Enter a description if desired. +8. Select `Next`, review your choices, then `Review + assign`. + +## Default Value + +By default, Data factories use RBAC but only with permissions for owners to make changes. + +## References + +1. https://learn.microsoft.com/en-us/azure/data-factory/concepts-roles-permissions diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.1/SKILL.md new file mode 100644 index 0000000000..899af2dba6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.1/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-azure-database-5.1 +description: "Ensure Azure Database for MySQL uses Customer Managed Keys for Encryption at Rest" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, mysql, database] +cis_id: "5.1" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.1 Ensure Azure Database for MySQL uses Customer Managed Keys for Encryption at Rest (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Enable sensitive data encryption at rest using Customer Managed Keys (CMK) rather than Microsoft Managed keys (MMK). + +## Rationale + +By default, data in Azure Database for MySQL is encrypted using Microsoft Service-Managed Keys (MMK) which constitutes an implied trust. If an organization wishes to control and manage encryption keys, however, customer-managed keys (CMK) can be supplied. The provided key is used to protect and control access to the key that encrypts the data. You can also choose to automatically update the key version used for Azure Database for MySQL encryption whenever a new version is available in the associated Key Vault. + +**NOTE:** This is primarily recommended where control of encryption keys is specified by compliance or security framework requirements. In many circumstances, Microsoft Managed Key encryption is an acceptable method of accomplishing encryption at rest. + +## Impact + +If the key expires by setting the 'activation date' and 'expiration date', the user must rotate the key manually. + +Using Customer Managed Keys may also incur additional man-hour requirements to create, store, manage, and protect the keys as needed. + +## Audit + +### Audit from Azure Portal + +1. From `Azure Database for MySQL` select the server you wish to audit. +2. In the left column expand `> Security`. +3. Select `Data Encryption`. +4. Determine if `Customer-managed key` is selected. + +## Expected Result + +The `Customer-managed key` option should be selected under Security > Data Encryption for the Azure Database for MySQL server. + +## Remediation + +### Remediate from Azure Portal + +1. From `Azure Database for MySQL` select the server you wish to audit. +2. In the left column expand `> Security`. +3. Select `Data Encryption`. +4. Select `Customer-managed key`. +5. In the window that opens, use a `User assigned managed identity` by either creating or selecting one. +6. Choose a key selection method. For `Enter a key identifier`, enter the URL for the key in Azure Key vault. For `Select a key`, navigate through the menu and choose the location of your key store by subscription, and whether it is a key vault or managed HSM. +7. Once a key is chosen, select `Save`. Verify on the next window that your changes have taken effect. + +## Default Value + +Unless selected at resource creation, by default Azure Database for MySQL uses Microsoft Managed Keys. + +## References + +1. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-customer-managed-key + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | X | X | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.2/SKILL.md new file mode 100644 index 0000000000..fb77292bc7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.2/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-database-5.2 +description: "Ensure Azure Database for MySQL uses only Microsoft Entra Authentication" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, mysql, database] +cis_id: "5.2" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.2 Ensure Azure Database for MySQL uses only Microsoft Entra Authentication (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Ensuring that Microsoft Entra Authentication is the only authentication method prevents the local MySQL authentication from being used. + +## Rationale + +The use of a centralized Identity and Access Management (IAM) solution such as Microsoft Entra ID is highly recommended for all activity related to Identity, Authentication, Authorization, and Accountability. + +Decentralized IAM -- such as local authentication methods -- may present additional vulnerability and introduce avoidable administrative complexity. + +## Impact + +None specified. + +## Audit + +### Audit from Azure Portal + +1. From `Azure Database for MySQL` select a server to audit. +2. Under the Security section, click `Authentication`. +3. In the main window, under the Authentication header, ensure that "Assign Access to:" reflects the selection of `Microsoft Entra authentication only`. + +### Audit From Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. + +If referencing a printed copy, you can search Policy IDs from this URL: +https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- **Policy ID:** `40e85574-ef33-47e8-a854-7a65c7500560` - **Name:** 'Azure MySQL flexible server should have Microsoft Entra Only Authentication enabled' + +## Expected Result + +The Authentication setting should show `Microsoft Entra authentication only` as the selected access method. + +## Remediation + +### Remediate from Azure Portal + +1. From `Azure Database for MySQL` select a server to remediate. +2. Under the Security section, click `Authentication`. +3. In the main window, under the Authentication header where "Assign Access to:" provides three options, select `Microsoft Entra authentication only`. + +## Default Value + +By default, Azure Database for MySQL uses `MySQL authentication only`. + +## References + +1. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-azure-ad +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | X | X | +| v7 | 16.2 Configure Centralized Point of Authentication | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.3/SKILL.md new file mode 100644 index 0000000000..f39021f568 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.3/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-azure-database-5.3 +description: "Ensure 'Public Network Access' is 'Disabled' for Azure Database for MySQL" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, mysql, database] +cis_id: "5.3" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.3 Ensure 'Public Network Access' is 'Disabled' for Azure Database for MySQL (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Setting public networks to disabled prevents requests from the public internet. + +## Rationale + +Disabling public network access prevents Azure Database for MySQL servers from communicating with the public internet and requires the use of Private endpoints for granular network control and segmentation. + +## Impact + +Disabling 'Public Network Access' forces the requirement of the use of Private Endpoints for network connectivity which will require some additional consideration from a network architecture perspective and will introduce cost based on the inbound/outbound data being processed by the Private Endpoint. + +## Audit + +### Audit from Azure Portal + +1. From `Azure Database for MySQL` select the database you wish to audit. +2. In the left column expand `> Settings`. +3. Select `Networking`. +4. Ensure that Public network access is `not selected`. + +### Audit from PowerShell + +1. Run the following command with the identifying details for your subscription. + +```powershell +Get-AzMySqlFlexibleServer -name -ResourceGroupName | Select-Object -property NetworkPublicNetworkAccess +``` + +2. Ensure that Public network access is `Disabled`. + +### Audit From Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. + +If referencing a printed copy, you can search Policy IDs from this URL: +https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- **Policy ID:** `c9299215-ae47-4f50-9c54-8a392f68a052` - **Name:** 'Public network access should be disabled for MySQL flexible servers' + +## Expected Result + +Public network access should be `Disabled` for the Azure Database for MySQL server. + +## Remediation + +### Remediate from Azure Portal + +1. From `Azure Database for MySQL` select the database you wish to audit. +2. In the left column expand `> Settings`. +3. Select `Networking`. +4. Uncheck the checkbox under `Public Access`. + +## Default Value + +Unless specified at resource creation, Azure Database for MySQL by default allows public network access, but authenticates requests. + +## References + +1. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-networking-private-link-deny-public-access + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | X | X | X | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.4/SKILL.md new file mode 100644 index 0000000000..b11a5dcdfa --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.4/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-database-5.4 +description: "Ensure Private Endpoints Are Used for Azure MySQL Databases" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, mysql, database] +cis_id: "5.4" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.4 Ensure Private Endpoints Are Used for Azure MySQL Databases (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Private links make resources available via a private endpoint to a network you select. Tunneling between subscriptions, resource groups, without the need for traditional network routing. + +## Rationale + +For sensitive data, private endpoints allow granular control of which services can communicate with Azure MySQL and ensure that this network traffic is private. This can be set this up on a case by case basis for each service to be connected. + +## Impact + +A private endpoint will expose your MySQL database to the network selected, where it can be accessed by either IP or FQDN. + +## Audit + +### Audit from Azure Portal + +1. From `Azure Database for MySQL flexible servers` select a server to audit. +2. In the column expand `> Settings`. +3. Select `Networking`. +4. Scroll down to the bottom to determine if there are any private endpoints attached to the server. + +## Expected Result + +One or more private endpoints should be attached to the Azure Database for MySQL server under Settings > Networking. + +## Remediation + +### Remediate from Azure Portal + +1. From `Azure Database for MySQL flexible servers` select a server to audit. +2. In the column expand `> Settings`. +3. Select `Networking`. +4. Scroll down to the bottom, and select `+ Create private endpoint`. +5. Select a subscription and resource group. +6. Enter an instance name, network interface name, and select the same region that your MySQL server is in. +7. Verify that the information on `Resource` is correct. Then select `Next`. +8. Select the virtual network, and subnet and select `Next`. +9. Choose whether to use a dynamic or static IP address and select `Next`. +10. Choose `Yes` or `No` on `Integrate with private DNS zone`. +11. If `Yes` then select the subscription and resource group, then select `Next`. +12. Enter any desired tags, then select `Next`. +13. Verify the information, then select `Create`. + +## Default Value + +Unless specified at resource creation, by default Azure MySQL does not have a private endpoint attached. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-sql/database/private-endpoint-overview?view=azuresql +2. https://learn.microsoft.com/en-us/azure/private-link/create-private-endpoint-powershell?tabs=dynamic-ip + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | X | X | +| v7 | 14.1 Segment the Network Based on Sensitivity | | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.5/SKILL.md new file mode 100644 index 0000000000..f95dcbe6bc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.5/SKILL.md @@ -0,0 +1,120 @@ +--- +name: cis-azure-database-5.5 +description: "Ensure server parameter 'audit_log_enabled' is set to 'ON' for MySQL flexible server" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, mysql, database] +cis_id: "5.5" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.5 Ensure server parameter 'audit_log_enabled' is set to 'ON' for MySQL flexible server (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Enable `audit_log_enabled` on `MySQL flexible servers`. + +## Rationale + +Enabling `audit_log_enabled` helps MySQL Database to log items such as connection attempts to the server, DDL/DML access, and more. Log data can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance. + +## Impact + +There are further costs incurred for storage of logs. For high traffic databases these logs will be significant. Determine your organization's needs before enabling. + +## Audit + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for MySQL Servers`. +3. For each database, under `Settings`, click `Server parameters`. +4. In the filter bar, type `audit_log_enabled`. +5. Ensure that the `VALUE` for `audit_log_enabled` is `ON`. + +### Audit from Azure CLI + +Ensure the below command returns a `value` of `on`: + +```bash +az mysql flexible-server parameter show --resource-group --server-name --name audit_log_enabled +``` + +### Audit from PowerShell + +Ensure the below command returns a `Value` of `on`: + +```powershell +Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name audit_log_enabled +``` + +## Expected Result + +The `audit_log_enabled` server parameter should return a value of `ON`. + +## Remediation + +### Remediate from Azure Portal + +**Part 1 - Turn on audit logs** + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for MySQL flexible servers`. +3. For each database, under `Settings`, click `Server parameters`. +4. Set `audit_log_enabled` to `ON`. +5. Click `Save`. + +**Part 2 - Capture audit logs (diagnostic settings is for example only, send these logs to the appropriate data sink for your logging needs)** + +1. Under Monitoring, select `Diagnostic settings`. +2. Select `+ Add diagnostic setting`. +3. Provide a diagnostic setting name. +4. Under Categories, select `MySQL Audit Logs`. +5. Specify destination details. +6. Click `Save`. + +It may take up to 10 minutes for the logs to appear in the configured destination. + +### Remediate from Azure CLI + +Use the below command to enable `audit_log_enabled`: + +```bash +az mysql flexible-server parameter set --resource-group --server-name --name audit_log_enabled --value on +``` + +### Remediate from PowerShell + +Use the below command to enable `audit_log_enabled`: + +```powershell +Update-AzMySqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name audit_log_enabled -Value on +``` + +## Default Value + +`audit_log_enabled` is set to `OFF` by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-configure-audit +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +3. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-configure-audit#configure-auditing-by-using-the-azure-cli +4. https://www.azadvertizer.net/azpolicyadvertizer/4dc90661-5d91-41f1-be00-d243f6f3fe9c.html + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | X | X | X | +| v7 | 6.2 Activate audit logging | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.6/SKILL.md new file mode 100644 index 0000000000..f5226edfc3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.6/SKILL.md @@ -0,0 +1,118 @@ +--- +name: cis-azure-database-5.6 +description: "Ensure server parameter 'audit_log_events' has 'CONNECTION' set for MySQL flexible server" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, mysql, database] +cis_id: "5.6" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.6 Ensure server parameter 'audit_log_events' has 'CONNECTION' set for MySQL flexible server (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Set `audit_log_events` to include `CONNECTION` on `MySQL flexible servers`. + +## Rationale + +Enabling `CONNECTION` helps MySQL Database to log items such as successful and failed connection attempts to the server. Log data can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance. + +## Impact + +There are further costs incurred for storage of logs. For high traffic databases these logs will be significant. Determine your organization's needs before enabling. + +## Audit + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for MySQL flexible servers`. +3. For each database, under `Settings`, click `Server parameters`. +4. In the filter bar, type `audit_log`. +5. Ensure that the `VALUE` for `audit_log_enabled` is `ON`. +6. Ensure that the `VALUE` for `audit_log_events` includes `CONNECTION`. + +### Audit from Azure CLI + +Ensure the below command returns a `value` that includes `CONNECTION`: + +```bash +az mysql flexible-server parameter show --resource-group --server-name --name audit_log_events +``` + +### Audit from PowerShell + +Ensure the below command returns a `Value` that includes `CONNECTION`: + +```powershell +Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name audit_log_events +``` + +## Expected Result + +The `audit_log_events` server parameter should include `CONNECTION` in its value, and `audit_log_enabled` should be `ON`. + +## Remediation + +### Remediate from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for MySQL flexible servers`. +3. For each database, under `Settings`, click `Server parameters`. +4. In the filter bar, type `audit_log`. +5. Set `audit_log_enabled` to `ON`. +6. In the drop-down next to `audit_log_events`, check `CONNECTION`. +7. Click `Save`. +8. Under `Monitoring`, select `Diagnostic settings`. +9. Select `+ Add diagnostic setting`. +10. Provide a diagnostic setting name. +11. Under `Categories`, select `MySQL Audit Logs`. +12. Specify destination details. +13. Click `Save`. + +It may take up to 10 minutes for the logs to appear in the configured destination. + +### Remediate from Azure CLI + +Use the below command to set `audit_log_events` to `CONNECTION`: + +```bash +az mysql flexible-server parameter set --resource-group --server-name --name audit_log_events --value CONNECTION +``` + +### Remediate from PowerShell + +Use the below command to set `audit_log_events` to `CONNECTION`: + +```powershell +Update-AzMySqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name audit_log_events -Value CONNECTION +``` + +## Default Value + +By default `audit_log_events` is set to `CONNECTION`. + +## References + +1. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-audit-logs +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +3. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-configure-audit +4. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-configure-audit#configure-auditing-by-using-the-azure-cli + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | X | X | X | +| v7 | 6.2 Activate audit logging | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.7/SKILL.md new file mode 100644 index 0000000000..d4c4ba54b4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.7/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-azure-database-5.7 +description: "Ensure server parameter 'error_server_log_file' is Enabled for MySQL Database Server" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, mysql, database] +cis_id: "5.7" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.7 Ensure server parameter 'error_server_log_file' is Enabled for MySQL Database Server (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Enable error logs on MySQL flexible servers. + +## Rationale + +With `error_server_log_file` enabled, MySQL Database will log database errors to a logging solution. These logs assist in producing a forensic trail that can be used for investigation or for detection when paired with a SIEM. + +## Impact + +There are further costs incurred for storage of logs. For high traffic databases these logs will be significant. Determine your organization's needs before enabling. + +## Audit + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for MySQL Servers`. +3. For each database, under `Settings`, click `Server parameters`. +4. In the row under `Save`, select `All`. +5. In the filter bar, type `error_server_log_file`. +6. Ensure that the `VALUE` for `error_server_log_file` is `ON`. + +### Audit from PowerShell + +Ensure the below command returns a `Value` of `on`: + +```powershell +Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name error_server_log_file +``` + +## Expected Result + +The `error_server_log_file` server parameter should return a value of `ON`. + +## Remediation + +### Remediate from Azure Portal + +**Part 1 - Turn on audit logs** + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for MySQL flexible servers`. +3. For each database, under `Settings`, click `Server parameters`. +4. Set `error_server_log_file` to `ON`. +5. Click `Save`. + +**Part 2 - Capture audit logs (diagnostic settings is for example only, send these logs to the appropriate data sink for your logging needs)** + +1. Under Monitoring, select `Diagnostic settings`. +2. Select `+ Add diagnostic setting`. +3. Provide a diagnostic setting name. +4. Under Categories, select `MySQL Audit Logs`. +5. Specify destination details. +6. Click `Save`. + +It may take up to 10 minutes for the logs to appear in the configured destination. + +### Remediate from PowerShell + +Use the below command to enable `error_server_log_file`: + +```powershell +Update-AzMySqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name error_server_log_file -Value on +``` + +## Default Value + +`error_server_log_file` is set to `OFF` by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-configure-audit +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +3. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-error-logs + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | X | X | X | +| v7 | 6.2 Activate audit logging | X | X | X | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.8/SKILL.md new file mode 100644 index 0000000000..e03af60cd4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.8/SKILL.md @@ -0,0 +1,112 @@ +--- +name: cis-azure-database-5.8 +description: "Ensure server parameter 'require_secure_transport' is set to 'ON' for MySQL Server" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, mysql, database] +cis_id: "5.8" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.8 Ensure server parameter 'require_secure_transport' is set to 'ON' for MySQL Server (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enable `require_secure_transport` on `MySQL flexible servers`. + +## Rationale + +The Secure Sockets Layer (SSL) protocol encrypts network traffic transiting between server and client. Enforcing SSL connections between database server and client applications helps protect against "man in the middle" attacks by encrypting the data stream between the server and application. + +## Impact + +None specified. + +## Audit + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for MySQL flexible servers`. +3. For each database, under `Settings`, click `Server parameters`. +4. In the filter bar, type `require_secure_transport`. +5. Ensure that the value for `require_secure_transport` is `ON`. + +### Audit from Azure CLI + +Ensure the below command returns a `value` of `on`: + +```bash +az mysql flexible-server parameter show --resource-group --server-name --name require_secure_transport +``` + +### Audit from PowerShell + +Ensure the below command returns a `Value` of `on`: + +```powershell +Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name require_secure_transport +``` + +## Expected Result + +The `require_secure_transport` server parameter should return a value of `ON`. + +## Remediation + +### Remediate from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for MySQL flexible servers`. +3. For each database, under `Settings`, click `Server parameters`. +4. In the filter bar, type `require_secure_transport`. +5. Set the `VALUE` for `require_secure_transport` to `ON`. +6. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to enable `require_secure_transport`: + +```bash +az mysql flexible-server parameter set --resource-group --server-name --name require_secure_transport --value on +``` + +### Remediate from PowerShell + +Use the below command to enable `require_secure_transport`: + +```powershell +Update-AzMySqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name require_secure_transport -Value on +``` + +## Default Value + +Azure Database for MySQL when provisioned through the Azure portal or CLI will require SSL connections by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking#tls-and-ssl +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | X | X | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------- | ----------- | +| T1040 | TA0006, TA0007 | M1041 | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.9/SKILL.md new file mode 100644 index 0000000000..f8d1941754 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-5.9/SKILL.md @@ -0,0 +1,132 @@ +--- +name: cis-azure-database-5.9 +description: "Ensure server parameter 'tls_version' is set to 'TLSv1.2' (or higher) for MySQL flexible server" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, mysql, database] +cis_id: "5.9" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 5.9 Ensure server parameter 'tls_version' is set to 'TLSv1.2' (or higher) for MySQL flexible server (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Ensure `tls_version` on `MySQL flexible servers` is set to use TLS version 1.2 or higher. + +## Rationale + +The Secure Sockets Layer (SSL) protocol encrypts network traffic transiting between server and client. + +Using only the most recent versions of SSL protocols (TLS version 1.2 and higher) eliminates susceptibility to known exploited vulnerabilities of outdated versions of TLS. If TLS 1.2 does not provide additional granular configuration options for supported cipher suites, there's a chance that default ciphers which employ Cipher Block Chaining (CBC) mode may be enabled which would introduce Padding Oracle types of vulnerabilities. TLS 1.3 does not support CBC mode ciphers by default and by default supports GCM ciphers which include an extra authentication step during the clear text to cipher text encryption process. + +TLS version 1.3 is preferable where it is possible to implement. + +Versions 1.0 and 1.1 of TLS are no longer considered secure. These versions should not be used or permitted where data integrity and confidentiality are required. + +## Impact + +None specified. + +## Audit + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for MySQL flexible servers`. +3. For each database, under `Settings`, click `Server parameters`. +4. In the filter bar, type `tls_version`. +5. Ensure `tls_version` is set to `TLSv1.2` (or higher). + +### Audit from Azure CLI + +Ensure the `value` of the below command contains `TLSv1.2` or higher, and does not contain anything lower than `TLSv1.2`: + +```bash +az mysql flexible-server parameter show --resource-group --server-name --name tls_version +``` + +Example output: + +```json +{ + "allowedValues": "TLSv1,TLSv1.1,TLSv1.2", + "dataType": "Set", + "defaultValue": "TLSv1.2", + "description": "Which protocols the server permits for encrypted connections. By default, TLS 1.2 is enforced", + "id": "/subscriptions//resourceGroups//providers/Microsoft.DBforMySQL/flexibleServers//configurations/tls_version", + "isConfigPendingRestart": "False", + "isDynamicConfig": "False", + "isReadOnly": "False", + "name": "tls_version", + "resourceGroup": "", + "source": "system-default", + "systemData": null, + "type": "Microsoft.DBforMySQL/flexibleServers/configurations", + "value": "TLSv1.2" +} +``` + +### Audit from PowerShell + +Ensure the `Value` of the below command contains `TLSv1.2` or higher, and does not contain anything lower than `TLSv1.2`: + +```powershell +Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name tls_version +``` + +## Expected Result + +The `tls_version` server parameter should be set to `TLSv1.2` or higher, with no versions lower than TLSv1.2 included. + +## Remediation + +### Remediate from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for MySQL flexible servers`. +3. For each database, under `Settings`, click `Server parameters`. +4. In the filter bar, type `tls_version`. +5. Click on the VALUE dropdown next to `tls_version`, and check `TLSv1.2` (or higher). +6. Uncheck anything lower than `TLSv1.2`. +7. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to update MySQL flexible servers to use TLS version 1.2: + +```bash +az mysql flexible-server parameter set --resource-group --server-name --name tls_version --value TLSv1.2 +``` + +## Default Value + +By default, TLS 1.2 is enforced for MySQL flexible servers. + +## References + +1. https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking#tls-and-ssl +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | X | X | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | X | X | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | -------------- | ----------- | +| T1040 | TA0006, TA0007 | M1041 | diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.1/SKILL.md new file mode 100644 index 0000000000..6bcf52464c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.1/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-azure-database-6.1 +description: "Ensure Azure Database for PostgreSQL uses Customer Managed Keys for Encryption at Rest" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.1" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.1 Ensure Azure Database for PostgreSQL uses Customer Managed Keys for Encryption at Rest (Manual) + +## Profile Applicability + +- Level 2 + +## Description + +Enable sensitive data encryption at rest using Customer Managed Keys (CMK) rather than Microsoft Managed keys (MMK). + +## Rationale + +By default, data in Azure Database for PostgreSQL is encrypted using Microsoft Service Managed Keys ('SMK' or 'MMK') which constitutes an implied trust. If an organization wishes to control and manage encryption keys, however, customer-managed keys (CMK) can be supplied. The provided key is used to protect and control access to the key that encrypts the data. You can also choose to automatically update the key version used for Azure Database for MySQL encryption whenever a new version is available in the associated Key Vault. + +**NOTE:** This is primarily recommended where control of encryption keys is specified by compliance or security framework requirements. In many circumstances, Microsoft Managed Key encryption is an acceptable method of accomplishing encryption at rest. + +## Impact + +If the key expires by setting the 'activation date' and 'expiration date', the user must rotate the key manually. + +Using Customer Managed Keys may also incur additional man-hour requirements to create, store, manage, and protect the keys as needed. + +## Audit Procedure + +### Audit from Azure Portal + +1. From `Azure Database for PostgreSQL` select the server you wish to audit. +2. In the left column expand `> Security`. +3. Select `Data Encryption`. +4. Determine if `Customer-managed key` is selected. + +### Audit from Azure Policy + +Policy ID: `12c74c95-0efd-48da-b8d9-2a7d68470c92` +Name: 'PostgreSQL flexible servers should use customer-managed keys to encrypt data at rest' + +## Expected Result + +`Customer-managed key` should be selected for data encryption. + +## Remediation + +### Remediate from Azure Portal + +1. From `Azure Database for PostgreSQL` select the server you wish to audit. +2. In the left column expand `> Security`. +3. Select `Data Encryption`. +4. Select `Customer-managed key`. +5. In the window that opens, use a `User assigned managed identity` by either creating or selecting one. +6. Choose a key selection method. For `Enter a key identifier`, enter the URL for the key in Azure Key vault. For `Select a key`, navigate through the menu and choose the location of your key store by subscription, and whether it is a key vault or managed HSM. +7. Once a key is chosen, select `Save`. Verify on the next window that your changes have taken effect. + +## Default Value + +Unless selected at resource creation, by default Azure Database for PostgreSQL uses Microsoft Managed Keys. + +## References + +1. https://learn.microsoft.com/en-us/azure/postgresql/security/security-data-encryption + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.10/SKILL.md new file mode 100644 index 0000000000..b3151ff89d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.10/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-azure-database-6.10 +description: "Ensure server parameter 'require_secure_transport' is set to 'ON' for PostgreSQL server" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.10" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.10 Ensure server parameter 'require_secure_transport' is set to 'ON' for PostgreSQL server (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enable `require_secure_transport` on `PostgreSQL flexible servers`. + +## Rationale + +SSL connectivity helps to provide a new layer of security by connecting database server to client applications using Secure Sockets Layer (SSL). Enforcing SSL connections between database server and client applications helps protect against "man in the middle" attacks by encrypting the data stream between the server and application. + +## Impact + +None documented. + +## Audit Procedure + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter bar, type `require_secure_transport`. +5. Ensure that the `VALUE` for `require_secure_transport` is set to `ON`. + +### Audit from Azure CLI + +Ensure the below command returns a `value` of `on`: + +```bash +az postgres flexible-server parameter show --resource-group --server-name --name require_secure_transport +``` + +### Audit from PowerShell + +Ensure the below command returns a `Value` of `on`: + +```powershell +Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name require_secure_transport +``` + +### Audit from Azure Policy + +Policy ID: `c29c38cb-74a7-4505-9a06-e588ab86620a` +Name: 'Enforce SSL connection should be enabled for PostgreSQL flexible servers' + +## Expected Result + +The `require_secure_transport` server parameter should be set to `ON`. + +## Remediation + +### Remediate from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter bar, type `require_secure_transport`. +5. Set `VALUE` for `require_secure_transport` to `ON`. +6. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to enable `require_secure_transport`: + +```bash +az postgres flexible-server parameter set --resource-group --server-name --name require_secure_transport --value on +``` + +### Remediate from PowerShell + +```powershell +Update-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name require_secure_transport -Value on +``` + +## Default Value + +By default, secure connectivity is enforced, but some application frameworks may not enable it during deployment. + +## References + +1. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-networking-ssl-tls +2. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-connect-tls-ssl +3. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/get-azpostgresqlflexibleserverconfiguration +4. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/update-azpostgresqlflexibleserverconfiguration +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.11/SKILL.md new file mode 100644 index 0000000000..828bf82513 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.11/SKILL.md @@ -0,0 +1,136 @@ +--- +name: cis-azure-database-6.11 +description: "Ensure server parameter 'ssl_min_protocol_version' is set to 'TLSv1.2' or higher for PostgreSQL server" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.11" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.11 Ensure server parameter 'ssl_min_protocol_version' is set to 'TLSv1.2' or higher for PostgreSQL server (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +**Note:** It is not possible to set the minimal TLS version on PostgreSQL flexible server to lower than 1.2. Incoming connections which try to encrypt the traffic using TLS 1.0 and TLS 1.1 are denied. + +Setting 'ssl_min_protocol_version' to 'TLSv1.2' or higher reduces TLS protocol vulnerabilities by preventing the use of significantly outdated versions of TLS. + +## Rationale + +The Secure Sockets Layer (SSL) protocol encrypts network traffic transiting between server and client. + +Using only the most recent versions of SSL protocols (TLS version 1.2 and higher) eliminates susceptibility to known exploited vulnerabilities of outdated versions of TLS. If TLS 1.2 does not provide additional granular configuration options for supported cipher suites, there's a chance that default ciphers which employ Cipher Block Chaining (CBC) mode may be enabled which would introduce Padding Oracle types of vulnerabilities. TLS 1.3 does not support CBC mode ciphers by default and by default supports GCM ciphers which include an extra authentication step during the clear text to cipher text encryption process. + +TLS version 1.3 is preferable where it is possible to implement. + +Versions 1.0 and 1.1 of TLS are no longer considered secure. These versions should not be used or permitted where data integrity and confidentiality are required. + +## Impact + +TLS 1.3 is not compatible with older versions, so must be supported by all clients to be implemented. + +Cipher suites may be able to be specified for TLS 1.2 if a premium SKU is in use. + +## Audit Procedure + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter box, type `ssl_min_protocol_version`. +5. Ensure `ssl_min_protocol_version` is set to `TLSV1.2` or higher. +6. Repeat steps 1-5 for each server. + +### Audit from Azure CLI + +Run the following command to list PostgreSQL flexible servers: + +```bash +az postgres flexible-server list +``` + +For each server, run the following command to get the `ssl_min_protocol_version` parameter value: + +```bash +az postgres flexible-server parameter show --resource-group --server-name --name ssl_min_protocol_version --query value +``` + +Ensure `"TLSv1.2"` or higher is returned. + +### Audit from PowerShell + +Run the following command to list PostgreSQL flexible servers: + +```powershell +Get-AzPostgreSqlFlexibleServer +``` + +For each server, run the following command to get the `ssl_min_protocol_version` parameter value: + +```powershell +Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name ssl_min_protocol_version | Select -p Value +``` + +Ensure `TLSv1.2` or higher is returned. + +### Audit from Azure Policy + +Policy ID: `a43d5475-c569-45ce-a268-28fa79f4e87a` +Name: 'PostgreSQL flexible servers should be running TLS version 1.2 or newer' + +## Expected Result + +The `ssl_min_protocol_version` should be set to `TLSv1.2` or higher. + +## Remediation + +### Remediate from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter box, type `ssl_min_protocol_version`. +5. Set `ssl_min_protocol_version` to `TLSV1.2` or higher. +6. Select `Save`. +7. Repeat steps 1-6 for each server requiring remediation. + +### Remediate from Azure CLI + +For each server requiring remediation, run the following command to set `ssl_min_protocol_version` to `TLSv1.2` or higher: + +```bash +az postgres flexible-server parameter set --resource-group --server-name --name ssl_min_protocol_version --value TLSv1.2 +``` + +### Remediate from PowerShell + +For each server requiring remediation, run the following command to set `ssl_min_protocol_version` to `TLSv1.2` or higher: + +```powershell +Update-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name ssl_min_protocol_version -Value TLSv1.2 +``` + +## Default Value + +By default, `ssl_min_protocol_version` is set to `TLSv1.2`. + +## References + +1. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/security-connect-tls +2. https://learn.microsoft.com/en-us/azure/postgresql/security/security-tls + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.2/SKILL.md new file mode 100644 index 0000000000..264133b7be --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.2/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-azure-database-6.2 +description: "Ensure Azure Database for PostgreSQL uses only Microsoft Entra Authentication" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.2" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.2 Ensure Azure Database for PostgreSQL uses only Microsoft Entra Authentication (Manual) + +## Profile Applicability + +- Level 1 + +## Description + +Ensuring that Microsoft Entra Authentication is the only authentication method prevents the local PostgreSQL authentication from being used. + +## Rationale + +The use of a centralized Identity and Access Management (IAM) solution such as Microsoft Entra ID is highly recommended for all activity related to Identity, Authentication, Authorization, and Accountability. + +Decentralized IAM -- such as local authentication methods -- may present additional vulnerability and introduce avoidable administrative complexity. + +## Impact + +None documented. + +## Audit Procedure + +### Audit from Azure Portal + +1. From `Azure Database for PostgreSQL` select a server to audit. +2. Under the Security section, click `Authentication`. +3. In the main window, under the Authentication header, ensure that "Authentication method:" reflects the selection of `Microsoft Entra authentication only`. + +## Expected Result + +The "Authentication method" should be set to `Microsoft Entra authentication only`. + +## Remediation + +### Remediate from Azure Portal + +1. From `Azure Database for PostgreSQL` select a server to remediate. +2. Under the Security section, click `Authentication`. +3. In the main window, under the Authentication header where "Authentication method:" provides three options, select `Microsoft Entra authentication only`. + +## Default Value + +By default, Azure Database for PostgreSQL uses `PostgreSQL authentication only`. + +## References + +1. https://learn.microsoft.com/en-us/azure/postgresql/security/security-entra-concepts +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.3/SKILL.md new file mode 100644 index 0000000000..d16cd3337c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.3/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-azure-database-6.3 +description: "Ensure 'Public Network Access' is 'Disabled' for Azure Database for PostgreSQL" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.3" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.3 Ensure 'Public Network Access' is 'Disabled' for Azure Database for PostgreSQL (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Setting public networks to disabled prevents requests from the public internet. + +## Rationale + +Disabling public network access prevents Azure Database for PostgreSQL servers from communicating with the public internet and requires the use of Private endpoints for granular network control and segmentation. + +## Impact + +Disabling 'Public Network Access' forces the requirement of the use of Private Endpoints for network connectivity which will require some additional consideration from a network architecture perspective and will introduce cost based on the inbound/outbound data being processed by the Private Endpoint. + +## Audit Procedure + +### Audit from Azure Portal + +1. From `Azure Database for PostgreSQL` select the database you wish to audit. +2. In the left column expand `> Settings`. +3. Select `Networking`. +4. Ensure that Public network access is `not selected`. + +### Audit from PowerShell + +Run the following command with the identifying details for your subscription: + +```powershell +Get-AzPostgreSqlFlexibleServer -name -ResourceGroupName | Select-Object -property NetworkPublicNetworkAccess +``` + +Ensure that Public network access is `Disabled`. + +### Audit from Azure Policy + +Policy ID: `b52376f7-9612-48a1-81cd-1f0e2bc4b3e5` +Name: 'Public network access should be disabled for PostgreSQL flexible servers' + +## Expected Result + +Public network access should be `Disabled`. + +## Remediation + +### Remediate from Azure Portal + +1. From `Azure Database for PostgreSQL` select the database you wish to audit. +2. In the left column expand `> Settings`. +3. Select `Networking`. +4. Uncheck/deselect the `Public network access` option. +5. Click `Save`. + +### Remediate from PowerShell + +```powershell +Update-AzPostgreSqlFlexibleServer -name -ResourceGroupName -PublicNetworkAccess "Disabled" +``` + +## Default Value + +By default, Public network access is enabled for Azure Database for PostgreSQL. + +## References + +1. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-networking + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.4/SKILL.md new file mode 100644 index 0000000000..e09ac25e1d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.4/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-azure-database-6.4 +description: "Ensure Private Endpoints Are Used for Azure Database for PostgreSQL" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.4" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.4 Ensure Private Endpoints Are Used for Azure Database for PostgreSQL (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Private links make resources available via a private endpoint to a network you select. Tunneling between subscriptions, resource groups, without the need for traditional network routing. + +## Rationale + +For sensitive data, private endpoints allow granular control of which services can communicate with PostgreSQL Servers and ensure that this network traffic is private. This can be set this up on a case by case basis for each service to be connected. + +## Impact + +A private endpoint will expose your PostgreSQL database to the network selected, where it can be accessed by either IP or FQDN. + +## Audit Procedure + +### Audit from Azure Portal + +1. From `Azure Database for PostgreSQL servers` select a server to audit. +2. In the column expand `> Settings`. +3. Select `Networking`. +4. Scroll down to the bottom to determine if there are any private endpoints attached to the server. + +### Audit from Azure Policy + +Policy ID: `5375a5bb-22c6-46d7-8a43-83417cfb4460` +Name: 'Private endpoint should be enabled for PostgreSQL flexible servers' + +## Expected Result + +At least one private endpoint should be attached to the PostgreSQL server. + +## Remediation + +### Remediate from Azure Portal + +1. From `Azure Database for PostgreSQL flexible servers` select a server to audit. +2. In the column expand `> Settings`. +3. Select `Networking`. +4. Scroll down to the bottom, and select `+ Create private endpoint`. +5. Select a subscription and resource group. +6. Enter an instance name, network interface name, and select the same region that your PostgreSQL server is in. +7. Verify that the information on `Resource` is correct. Then select `Next`. +8. Select the virtual network, and subnet and select `Next`. +9. Choose whether to use a dynamic or static IP address and select `Next`. +10. Choose `Yes` or `No` on `Integreate with private DNS zone`. +11. If `Yes` then select the subscription and resource group, then select `Next`. +12. Enter any desired tags, then select `Next`. +13. Verify the information, then select `Create`. + +## Default Value + +Unless specified at resource creation, by default Azure Database for PostgreSQL does not have a private endpoint attached. + +## References + +1. https://learn.microsoft.com/en-us/azure/postgresql/network/concepts-networking-private-link + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.5/SKILL.md new file mode 100644 index 0000000000..751c50e0a5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.5/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-azure-database-6.5 +description: "Ensure server parameter 'connection_throttle.enable' is set to 'ON' for PostgreSQL server" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.5" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.5 Ensure server parameter 'connection_throttle.enable' is set to 'ON' for PostgreSQL server (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enable `connection_throttling` on `PostgreSQL flexible servers`. + +## Rationale + +Enabling `connection_throttling` helps the PostgreSQL Database to set the verbosity of logged messages. This in turn generates query and error logs with respect to concurrent connections that could lead to a successful Denial of Service (DoS) attack by exhausting connection resources. A system can also fail or be degraded by an overload of legitimate users. Query and error logs can be used to identify, troubleshoot, and repair configuration errors and sub-optimal performance. + +## Impact + +None documented. + +## Audit Procedure + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter bar, type `connection_throttle.enable`. +5. Ensure that `VALUE` for `connection_throttle.enable` is set to `ON`. + +### Audit from Azure CLI + +Ensure the below command returns a `value` of `on`: + +```bash +az postgres flexible-server parameter show --resource-group --server-name --name connection_throttle.enable +``` + +### Audit from PowerShell + +Ensure the below command returns a `Value` of `on`: + +```powershell +Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name connection_throttle.enable +``` + +### Audit from Azure Policy + +Policy ID: `dacf07fa-0eea-4486-80bc-b93fae88ac40` +Name: 'Connection throttling should be enabled for PostgreSQL flexible servers' + +## Expected Result + +The `connection_throttle.enable` server parameter should be set to `ON`. + +## Remediation + +### Remediate from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter bar, type `connection_throttle.enable`. +5. Set `connection_throttle.enable` to `ON`. +6. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to enable `connection_throttle.enable`: + +```bash +az postgres flexible-server parameter set --resource-group --server-name --name connection_throttle.enable --value on +``` + +### Remediate from PowerShell + +Use the below command to update `connection_throttling` configuration: + +```powershell +Update-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name connection_throttle.enable -Value on +``` + +## Default Value + +By default, `connection_throttle.enable` is disabled (set to `off`). + +## References + +1. https://learn.microsoft.com/en-us/rest/api/postgresql/flexibleserver/configurations/list-by-server +2. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-configure-server-parameters-using-portal +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +4. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/get-azpostgresqlflexibleserverconfiguration +5. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/update-azpostgresqlflexibleserverconfiguration + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.6/SKILL.md new file mode 100644 index 0000000000..7e3e1e6891 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.6/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-azure-database-6.6 +description: "Ensure server parameter 'logfiles.retention_days' is greater than 3 days for PostgreSQL server" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.6" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.6 Ensure server parameter 'logfiles.retention_days' is greater than 3 days for PostgreSQL server (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Ensure `logfiles.retention_days` on `PostgreSQL flexible servers` is set to an appropriate value. + +## Rationale + +Configuring `logfiles.retention_days` determines the duration in days that Azure Database for PostgreSQL retains log files. Query and error logs can be used to identify, troubleshoot, and repair configuration errors and sub-optimal performance. + +## Impact + +Configuring this setting will result in logs being retained for the specified number of days. If this is configured on a high traffic server, the log may grow quickly to occupy a large amount of disk space. In this case you may want to set this to a lower number. + +## Audit Procedure + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter bar, type `logfiles.retention_days`. +5. Ensure that the `VALUE` is between 4 and 7 (inclusive). + +### Audit from Azure CLI + +Ensure `logfiles.retention_days` value is greater than 3: + +```bash +az postgres flexible-server parameter show --resource-group --server-name --name logfiles.retention_days +``` + +### Audit from PowerShell + +Ensure `logfiles.retention_days` value is greater than 3: + +```powershell +Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name logfiles.retention_days +``` + +## Expected Result + +The `logfiles.retention_days` value should be between 4 and 7 (inclusive). + +## Remediation + +### Remediate from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter bar, type `logfiles.retention_days`. +5. Input a value between 4 and 7 (inclusive). +6. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to update `logfiles.retention_days` configuration: + +```bash +az postgres flexible-server parameter set --resource-group --server-name --name logfiles.retention_days --value <4-7> +``` + +### Remediate from PowerShell + +Use the below command to update `logfiles.retention_days` configuration: + +```powershell +Update-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name logfiles.retention_days -Value <4-7> +``` + +## Default Value + +By default `logfiles.retention_days` is set to `3`. + +## References + +1. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-configure-server-parameters-using-portal +2. https://learn.microsoft.com/en-us/rest/api/postgresql/flexibleserver/configurations/list-by-server +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-6-configure-log-storage-retention +4. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/get-azpostgresqlflexibleserverconfiguration +5. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/update-azpostgresqlflexibleserverconfiguration + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.7/SKILL.md new file mode 100644 index 0000000000..7ca2a07a6b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.7/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-azure-database-6.7 +description: "Ensure server parameter 'log_checkpoints' is set to 'ON' for PostgreSQL server" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.7" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.7 Ensure server parameter 'log_checkpoints' is set to 'ON' for PostgreSQL server (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enable `log_checkpoints` on `PostgreSQL flexible servers`. + +## Rationale + +Enabling `log_checkpoints` helps the PostgreSQL Database to log each checkpoint, which in turn generates query and error logs. However, access to transaction logs is not supported. Query and error logs can be used to identify, troubleshoot, and repair configuration errors and sub-optimal performance. + +## Impact + +None documented. + +## Audit Procedure + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter bar, type `log_checkpoints`. +5. Ensure that `VALUE` for `log_checkpoints` is set to `ON`. + +### Audit from Azure CLI + +Ensure the below command returns a `value` of `on`: + +```bash +az postgres flexible-server parameter show --resource-group --server-name --name log_checkpoints +``` + +### Audit from PowerShell + +Ensure the below command returns a `Value` of `on`: + +```powershell +Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name log_checkpoints +``` + +### Audit from Azure Policy + +Policy ID: `70be9e12-c935-49ac-9bd8-fd64b85c1f87` +Name: 'Log checkpoints should be enabled for PostgreSQL flexible servers' + +## Expected Result + +The `log_checkpoints` server parameter should be set to `ON`. + +## Remediation + +### Remediate from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter bar, type `log_checkpoints`. +5. Set the `VALUE` for `log_checkpoints` to `ON`. +6. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to enable `log_checkpoints`: + +```bash +az postgres flexible-server parameter set --resource-group --server-name --name log_checkpoints --value on +``` + +### Remediate from PowerShell + +```powershell +Update-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name log_checkpoints -Value on +``` + +## Default Value + +By default, `log_checkpoints` is enabled (set to `on`). + +## References + +1. https://learn.microsoft.com/en-us/rest/api/postgresql/flexibleserver/configurations/list-by-server +2. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-configure-server-parameters-using-portal +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +4. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-logging#configure-logging +5. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/get-azpostgresqlflexibleserverconfiguration +6. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/update-azpostgresqlflexibleserverconfiguration + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.8/SKILL.md new file mode 100644 index 0000000000..9a67a3c825 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.8/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-azure-database-6.8 +description: "Ensure server parameter 'log_disconnections' is set to 'ON' for PostgreSQL servers" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.8" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.8 Ensure server parameter 'log_disconnections' is set to 'ON' for PostgreSQL servers (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enable `log_disconnections` on PostgreSQL servers. + +## Rationale + +Enabling `log_disconnections` helps PostgreSQL Database to logs end of a session, including duration, which in turn generates query and error logs. Query and error logs can be used to identify, troubleshoot, and repair configuration errors and sub-optimal performance. + +## Impact + +Enabling this setting will enable a log of all disconnections. If this is enabled for a high traffic server, the log may grow exponentially. + +## Audit Procedure + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. Search for `log_disconnections`. +5. Ensure that `log_disconnections` is set to `ON`. + +### Audit from Azure CLI + +Ensure `log_disconnections` value is set to `ON`: + +```bash +az postgres flexible-server parameter show --resource-group --server-name --name log_disconnections +``` + +### Audit from PowerShell + +Ensure `log_disconnections` value is set to `ON`: + +```powershell +Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name log_disconnections +``` + +### Audit from Azure Policy + +Policy ID: `1d14b021-1bae-4f93-b36b-69695e14984a` +Name: 'Disconnections should be logged for PostgreSQL flexible servers' + +## Expected Result + +The `log_disconnections` server parameter should be set to `ON`. + +## Remediation + +### Remediate from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. Search for `log_disconnections`. +5. Set `log_disconnections` to `ON`. +6. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to update `log_disconnections` configuration: + +```bash +az postgres flexible-server parameter set --resource-group --server-name --name log_disconnections --value on +``` + +### Remediate from PowerShell + +Use the below command to update `log_disconnections` configuration: + +```powershell +Update-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name log_disconnections -Value on +``` + +## Default Value + +By default, `log_disconnections` is disabled (set to `off`). + +## References + +1. https://docs.microsoft.com/en-us/rest/api/postgresql +2. https://docs.microsoft.com/en-us/azure/postgresql/howto-configure-server-parameters-using-portal +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +4. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/get-azpostgresqlconfiguration +5. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/update-azpostgresqlconfiguration + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.9/SKILL.md new file mode 100644 index 0000000000..b19baa51c9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-6.9/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-azure-database-6.9 +description: "Ensure server parameter 'log_connections' is set to 'ON' for PostgreSQL servers" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, postgresql, database] +cis_id: "6.9" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 6.9 Ensure server parameter 'log_connections' is set to 'ON' for PostgreSQL servers (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enable `log_connections` on PostgreSQL servers. + +## Rationale + +Enabling `log_connections` helps PostgreSQL Database to log attempted connection to the server, as well as successful completion of client authentication. Log data can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance. + +## Impact + +None documented. + +## Audit Procedure + +### Audit from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter bar, type `log_connections`. +5. Ensure that `log_connections` is set to `ON`. + +### Audit from Azure CLI + +Ensure the below command returns a `Value` of `on`: + +```bash +az postgres flexible-server parameter show --resource-group --server-name --name log_connections +``` + +### Audit from PowerShell + +Ensure the below command returns a `Value` of `on`: + +```powershell +Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name log_connections +``` + +### Audit from Azure Policy + +Policy ID: `086709ac-11b5-478d-a893-9567a16d2ae3` +Name: 'Log connections should be enabled for PostgreSQL flexible servers' + +## Expected Result + +The `log_connections` server parameter should be set to `ON`. + +## Remediation + +### Remediate from Azure Portal + +1. Login to Azure Portal using https://portal.azure.com. +2. Go to `Azure Database for PostgreSQL servers`. +3. For each server, under `Settings`, click `Server parameters`. +4. In the filter bar, type `log_connections`. +5. Set `log_connections` to `ON`. +6. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to update `log_connections` configuration: + +```bash +az postgres flexible-server parameter set --resource-group --server-name --name log_connections --value on +``` + +### Remediate from PowerShell + +Use the below command to update `log_connections` configuration: + +```powershell +Update-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName -ServerName -Name log_connections -Value on +``` + +## Default Value + +By default, `log_connections` is disabled (set to `off`). + +## References + +1. https://docs.microsoft.com/en-us/rest/api/postgresql/configurations/listbyserver +2. https://docs.microsoft.com/en-us/azure/postgresql/howto-configure-server-parameters-using-portal +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +4. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/get-azpostgresqlconfiguration +5. https://learn.microsoft.com/en-us/powershell/module/az.postgresql/update-azpostgresqlconfiguration + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.1/SKILL.md new file mode 100644 index 0000000000..dbbeb6c687 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.1/SKILL.md @@ -0,0 +1,124 @@ +--- +name: cis-azure-database-9.1 +description: "Ensure that 'Auditing' is set to 'On'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, sql-database, sql-server] +cis_id: "9.1" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 9.1 Ensure that 'Auditing' is set to 'On' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enable auditing on SQL Servers. + +## Rationale + +The Azure platform allows a SQL server to be created as a service. Enabling auditing at the server level ensures that all existing and newly created databases on the SQL server instance are audited. Auditing policy applied on the SQL database does not override auditing policy and settings applied on the particular SQL server where the database is hosted. + +Auditing tracks database events and writes them to an audit log in the Azure storage account. It also helps to maintain regulatory compliance, understand database activity, and gain insight into discrepancies and anomalies that could indicate business concerns or suspected security violations. + +## Impact + +None documented. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `SQL servers`. +2. For each server instance. +3. Click on `Auditing`. +4. Ensure that `Enable Azure SQL Auditing` is set to `On`. + +### Audit from PowerShell + +Get the list of all SQL Servers: + +```powershell +Get-AzSqlServer +``` + +For each Server: + +```powershell +Get-AzSqlServerAudit -ResourceGroupName -ServerName +``` + +Ensure that `BlobStorageTargetState`, `EventHubTargetState`, or `LogAnalyticsTargetState` is set to `Enabled`. + +### Audit from Azure Policy + +Policy ID: `a6fb4358-5bf4-4ad7-ba82-2cd2f41ce5e9` +Name: 'Auditing on SQL server should be enabled' + +## Expected Result + +`Enable Azure SQL Auditing` should be set to `On`. At least one of `BlobStorageTargetState`, `EventHubTargetState`, or `LogAnalyticsTargetState` should be `Enabled`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `SQL servers`. +2. Select the SQL server instance. +3. Under `Security`, click `Auditing`. +4. Click the toggle next to `Enable Azure SQL Auditing`. +5. Select an Audit log destination. +6. Click `Save`. + +### Remediate from PowerShell + +Get the list of all SQL Servers: + +```powershell +Get-AzSqlServer +``` + +For each Server, enable auditing and set the retention for at least 90 days. + +**Log Analytics Example:** + +```powershell +Set-AzSqlServerAudit -ResourceGroupName -ServerName -RetentionInDays -LogAnalyticsTargetState Enabled -WorkspaceResourceId "/subscriptions//resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/" +``` + +**Event Hub Example:** + +```powershell +Set-AzSqlServerAudit -ResourceGroupName "" -ServerName "" -EventHubTargetState Enabled -EventHubName "" -EventHubAuthorizationRuleResourceId "" +``` + +**Blob Storage Example:** + +```powershell +Set-AzSqlServerAudit -ResourceGroupName "" -ServerName "" -BlobStorageTargetState Enabled -StorageAccountResourceId "/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts/" +``` + +## Default Value + +By default, `Enable Azure SQL Auditing` is set to `Off`. + +## References + +1. https://docs.microsoft.com/en-us/azure/security-center/security-center-enable-auditing-on-sql-servers +2. https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/get-azurermsqlserverauditing?view=azurermps-5.2.0 +3. https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/set-azurermsqlserverauditingpolicy?view=azurermps-5.2.0 +4. https://docs.microsoft.com/en-us/azure/sql-database/sql-database-auditing +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.2/SKILL.md new file mode 100644 index 0000000000..425a95a98a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.2/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-azure-database-9.2 +description: "Ensure that 'Public Network Access' is set to 'Disable'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, sql-database, sql-server] +cis_id: "9.2" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 9.2 Ensure that 'Public Network Access' is set to 'Disable' (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Disabling public network access restricts the service from accessing public networks. + +## Rationale + +A secure network architecture requires carefully constructed network segmentation. Public network access is overly permissive and introduces unintended vectors for threat activity. + +## Impact + +Disabling 'Public Network Access' forces the requirement of the use of Private Endpoints for network connectivity which will require some additional consideration from a network architecture perspective and will introduce cost based on the inbound/outbound data being processed by the Private Endpoint. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `SQL servers`. +2. For each SQL server, under `Security`, click `Networking`. +3. Ensure that `Public network access` is set to `Disable`. + +### Audit from Azure CLI + +List all SQL Servers and ensure `publicNetworkAccess` is not `Enabled`: + +```bash +az sql server list --query "[].{name:name, resourceGroup:resourceGroup, publicNetworkAccess:publicNetworkAccess}" +``` + +### Audit from PowerShell + +List all SQL Servers and ensure `PublicNetworkAccess` is not `Enabled`: + +```powershell +Get-AzSqlServer | Select-Object -Property ServerName, ResourceGroupName, PublicNetworkAccess +``` + +### Audit from Azure Policy + +Policy ID: `1b8ca024-1d5c-4dec-8995-b1a932b41780` +Name: 'Public network access on Azure SQL Database should be disabled' + +## Expected Result + +`Public network access` should be set to `Disable`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `SQL servers`. +2. For each SQL server, under `Security`, click `Networking`. +3. Set `Public network access` to `Disable`. +4. Click `Save`. + +### Remediate from Azure CLI + +For each SQL server with `publicNetworkAccess` `Enabled`, set it to `Disabled`: + +```bash +az sql server update -n -g --set publicNetworkAccess="Disabled" +``` + +### Remediate from PowerShell + +For each SQL server with `PublicNetworkAccess` `Enabled`, set it to `Disabled`: + +```powershell +Set-AzSqlServer -ServerName -ResourceGroupName -PublicNetworkAccess "Disabled" +``` + +## Default Value + +By default, Azure SQL Server's public network access is set to `Disable`. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-network-security#ns-2-secure-cloud-services-with-network-controls +2. https://learn.microsoft.com/en-us/azure/azure-sql/database/connectivity-settings?view=azuresql&tabs=azure-portal#deny-public-network-access + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.3/SKILL.md new file mode 100644 index 0000000000..e7e4342e95 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.3/SKILL.md @@ -0,0 +1,141 @@ +--- +name: cis-azure-database-9.3 +description: "Ensure no Azure SQL Database firewall rule is overly permissive" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, sql-database, sql-server] +cis_id: "9.3" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 9.3 Ensure no Azure SQL Database firewall rule is overly permissive (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Ensure that no SQL Databases have overly permissive firewall rules (e.g. rule allowing traffic with start IP address of 0.0.0.0 and end IP address of 255.255.255.255, or other combinations allowing large swathes of IP addresses). + +## Rationale + +The preferred setting for Public Network Access is disabled. If Public Network Access is disabled, this recommendation is moot. In general, the use of well architected Private Endpoints for network traffic management is strongly preferred to allowing any public network access. + +Where Public Network Access must be allowed as an exception, Azure SQL Server provides a firewall to explicitly define traffic allowance and denial. In order to reduce the potential attack surface for a SQL server, firewall rules should be reviewed from time to time to ensure that no rule is overly permissive, and all included rules are justified through association with known and trusted sources and destinations. + +**NOTE:** For some Azure services to work with Azure SQL databases, the `Allow Azure services and resource to access this server` exception may need to be allowed. This exception creates a firewall rule named `AllowAllWindowsAzureIps` that may be considered overly permissive. It should be noted that this exception places implicit trust on a rule which is defined and managed by Microsoft. + +## Impact + +Managing firewall rules will require some consideration from a network architecture perspective to ensure appropriate traffic is allowed. + +## Audit Procedure + +### Audit from Azure Portal + +1. Search for and open `SQL servers`. +2. For each SQL server listed, click on the server name to open the resource management window. +3. Expand the Security section, then click on `Networking`. +4. On the 'Public access' tab, if public network access is set to "Selected Networks," scroll down to review the `Firewall rules`. + +Ensure that no firewall rule exists which allows traffic with a source of `0.0.0.0` or other combinations which permit access to/from wider public IP ranges. + +### Audit from Azure CLI + +List all SQL servers: + +```bash +az sql server list +``` + +For each SQL server run the following command: + +```bash +az sql server firewall-rule list --resource-group --server +``` + +Ensure the output does not contain any firewall `allow` rules with a source of `0.0.0.0` or other combinations which allows access to wider public IP ranges. + +### Audit from PowerShell + +Get the list of all SQL Servers: + +```powershell +Get-AzSqlServer +``` + +For each Server: + +```powershell +Get-AzSqlServerFirewallRule -ResourceGroupName -ServerName +``` + +Ensure that `StartIpAddress` is not set to `0.0.0.0`, `/0` or other combinations which allows access to wider public IP ranges including Azure IP ranges. + +## Expected Result + +No firewall rules should exist with overly permissive IP ranges (e.g., `0.0.0.0` to `255.255.255.255`). + +## Remediation + +### Remediate from Azure Portal + +1. Search for and open `SQL servers`. +2. For each SQL server listed, click on the server name to open the resource management window. +3. Expand the Security section, then click on `Networking`. +4. On the 'Public access' tab, if public network access is set to "Selected Networks," scroll down to the Firewall Rules section. +5. Remove overly permissive firewall rules and ensure that any remaining rules contain only source and destination IPs which are trusted. + +### Remediate from Azure CLI + +Identify the resource group, server name, and firewall rule name which are overly permissive, then delete the identified rule with the following command: + +```bash +az sql server firewall-rule delete --resource-group --server --name +``` + +For trusted IP addresses, use these commands to create or update rules as needed: + +```bash +az sql server firewall-rule create --resource-group --server --name --start-ip-address "" --end-ip-address "" +``` + +### Remediate from PowerShell + +Identify the resource group, server name, and firewall rule name which are overly permissive, then delete the identified rule with the following command: + +```powershell +Remove-AzSqlServerFirewallRule -FirewallRuleName "" -ResourceGroupName -ServerName +``` + +For trusted IP addresses, use these commands to create or update rules as needed: + +```powershell +Set-AzSqlServerFirewallRule -ResourceGroupName -ServerName -FirewallRuleName "" -StartIpAddress "" -EndIpAddress "" +``` + +## Default Value + +By default, no firewall rules exist. + +## References + +1. https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-a-windows-firewall-for-database-engine-access?view=sql-server-2017 +2. https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/get-azurermsqlserverfirewallrule?view=azurermps-5.2.0 +3. https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/set-azurermsqlserverfirewallrule?view=azurermps-5.2.0 +4. https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/remove-azurermsqlserverfirewallrule?view=azurermps-5.2.0 +5. https://learn.microsoft.com/en-us/azure/azure-sql/database/firewall-configure?view=azuresql#connections-from-inside-azure +6. https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-set-database-firewall-rule-azure-sql-database?view=azuresqldb-current +7. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls +8. https://learn.microsoft.com/en-us/azure/azure-sql/database/firewall-configure?view=azuresql + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.4/SKILL.md new file mode 100644 index 0000000000..571183e84a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.4/SKILL.md @@ -0,0 +1,134 @@ +--- +name: cis-azure-database-9.4 +description: "Ensure SQL server's Transparent Data Encryption (TDE) protector is encrypted with Customer-managed key" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, sql-database, sql-server] +cis_id: "9.4" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 9.4 Ensure SQL server's Transparent Data Encryption (TDE) protector is encrypted with Customer-managed key (Automated) + +## Profile Applicability + +- Level 2 + +## Description + +Transparent Data Encryption (TDE) with Customer-managed key support provides increased transparency and control over the TDE Protector, increased security with an HSM-backed external service, and promotion of separation of duties. + +With TDE, data is encrypted at rest with a symmetric key (called the database encryption key) stored in the database or data warehouse distribution. To protect this data encryption key (DEK) in the past, only a certificate that the Azure SQL Service managed could be used. Now, with Customer-managed key support for TDE, the DEK can be protected with an asymmetric key that is stored in the Azure Key Vault. The Azure Key Vault is a highly available and scalable cloud-based key store which offers central key management, leverages FIPS 140-2 Level 2 validated hardware security modules (HSMs), and allows separation of management of keys and data for additional security. + +Based on business needs or criticality of data/databases hosted on a SQL server, it is recommended that the TDE protector is encrypted by a key that is managed by the data owner (Customer-managed key). + +## Rationale + +Customer-managed key support for Transparent Data Encryption (TDE) allows user control of TDE encryption keys and restricts who can access them and when. Azure Key Vault, Azure's cloud-based external key management system, is the first key management service where TDE has integrated support for Customer-managed keys. With Customer-managed key support, the database encryption key is protected by an asymmetric key stored in the Key Vault. The asymmetric key is set at the server level and inherited by all databases under that server. + +## Impact + +Once TDE protector is encrypted with a Customer-managed key, it transfers entire responsibility of respective key management on to you, and hence you should be more careful about doing any operations on the particular key in order to keep data from corresponding SQL server and Databases hosted accessible. + +When deploying Customer Managed Keys, it is prudent to ensure that you also deploy an automated toolset for managing these keys (this should include discovery and key rotation), and Keys should be stored in an HSM or hardware backed keystore, such as Azure Key Vault. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `SQL servers`. + +For the desired server instance: + +2. Click On `Transparent data encryption`. +3. Ensure that `Customer-managed key` is selected. +4. Ensure `Make selected key the default TDE protector` is checked. + +### Audit from Azure CLI + +```bash +az account get-access-token --query "{subscripton:subscription,accessToken:accessToken}" --out tsv | xargs -L1 bash -c 'curl -X GET -H "Authorization: Bearer $1" -H "Content-Type: application/json" https://management.azure.com/subscriptions/$0/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector?api-version=2015-05-01-preview' +``` + +Ensure the output of the command contains properties: + +- `kind` set to `azurekeyvault` +- `serverKeyType` set to `AzureKeyVault` +- `uri` is not null + +### Audit from PowerShell + +```powershell +Get-AzSqlServerTransparentDataEncryptionProtector -ServerName -ResourceGroupName +``` + +Ensure the output of the command contains properties: + +- `Type` set to `AzureKeyVault` +- `ServerKeyVaultKeyName` set to `KeyVaultName_KeyName_KeyIdentifierVersion` +- `KeyId` set to `KeyIdentifier` + +### Audit from Azure Policy + +- Policy ID: `0a370ff3-6cab-4e85-8995-295fd854c5b8` - Name: 'SQL servers should use customer-managed keys to encrypt data at rest' +- Policy ID: `ac01ad65-10e5-46df-bdd9-6b0cad13e1d2` - Name: 'SQL managed instances should use customer-managed keys to encrypt data at rest' + +## Expected Result + +The TDE protector should be encrypted with a Customer-managed key stored in Azure Key Vault. + +## Remediation + +### Remediate from Azure Console + +1. Go to `SQL servers`. + +For the desired server instance: + +2. Click On `Transparent data encryption`. +3. Set `Transparent data encryption` to `Customer-managed key`. +4. Browse through your `key vaults` to Select an existing key or create a new key in the Azure Key Vault. +5. Check `Make selected key the default TDE protector`. + +### Remediate from Azure CLI + +Use the below command to encrypt SQL server's TDE protector with a Customer-managed key: + +```bash +az sql server tde-key set --resource-group --server --server-key-type {AzureKeyVault} --kid +``` + +### Remediate from PowerShell + +Use the below command to encrypt SQL server's TDE protector with a Customer-managed Key Vault key: + +```powershell +Set-AzSqlServerTransparentDataEncryptionProtector -Type AzureKeyVault -KeyId -ServerName -ResourceGroupName +``` + +Select `Y` when prompted. + +## Default Value + +By Default, Microsoft managed TDE protector is enabled for a SQL server. + +## References + +1. https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/transparent-data-encryption-byok-azure-sql +2. https://azure.microsoft.com/en-in/blog/preview-sql-transparent-data-encryption-tde-with-bring-your-own-key-support/ +3. https://winterdom.com/2017/09/07/azure-sql-tde-protector-keyvault +4. https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-data-protection#dp-5-use-customer-managed-key-option-in-data-at-rest-encryption-when-required +5. https://docs.microsoft.com/en-us/azure/key-vault/general/basic-concepts +6. https://docs.microsoft.com/en-us/cli/azure/sql/server/tde-key?view=azure-cli-latest +7. https://learn.microsoft.com/en-us/powershell/module/az.sql/get-azsqlservertransparentdataencryptionprotector?view=azps-9.2.0 +8. https://learn.microsoft.com/en-us/powershell/module/az.sql/set-azsqlservertransparentdataencryptionprotector?view=azps-9.2.0 + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.5/SKILL.md new file mode 100644 index 0000000000..44657f052a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.5/SKILL.md @@ -0,0 +1,130 @@ +--- +name: cis-azure-database-9.5 +description: "Ensure that Microsoft Entra authentication is Configured for SQL Servers" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, sql-database, sql-server] +cis_id: "9.5" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 9.5 Ensure that Microsoft Entra authentication is Configured for SQL Servers (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Use Microsoft Entra authentication for authentication with SQL Database to manage credentials in a single place. + +## Rationale + +Microsoft Entra authentication is a mechanism to connect to Microsoft Azure SQL Database and SQL Data Warehouse by using identities in the Microsoft Entra ID directory. With Entra ID authentication, identities of database users and other Microsoft services can be managed in one central location. Central ID management provides a single place to manage database users and simplifies permission management. + +- It provides an alternative to SQL Server authentication. +- Helps stop the proliferation of user identities across database servers. +- Allows password rotation in a single place. +- Customers can manage database permissions using external (Entra ID) groups. +- It can eliminate storing passwords by enabling integrated Windows authentication and other forms of authentication supported by Microsoft Entra. +- Entra ID authentication uses contained database users to authenticate identities at the database level. +- Entra ID supports token-based authentication for applications connecting to SQL Database. +- Entra ID authentication supports ADFS (domain federation) or native user/password authentication for a local Active Directory without domain synchronization. +- Entra ID supports connections from SQL Server Management Studio that use Active Directory Universal Authentication, which includes Multi-Factor Authentication (MFA). MFA includes strong authentication with a range of easy verification options -- phone call, text message, smart cards with pin, or mobile app notification. + +## Impact + +This will create administrative overhead with user account and permission management. For further security on these administrative accounts, you may want to consider licensing which supports features like Multi Factor Authentication. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `SQL servers`. +2. For each SQL server, click on `Microsoft Entra admin` under the Settings section. +3. Ensure that a value has been set for `Admin Name` under the `Microsoft Entra admin` section. + +### Audit from Azure CLI + +To list SQL Server Admins on a specific server: + +```bash +az sql server ad-admin list --resource-group --server +``` + +### Audit from PowerShell + +Print a list of all SQL Servers to find which one you want to audit: + +```powershell +Get-AzSqlServer +``` + +Audit a list of Administrators on a Specific Server: + +```powershell +Get-AzSqlServerActiveDirectoryAdministrator -ResourceGroupName -ServerName +``` + +Ensure Output shows `DisplayName` set to `AD account`. + +### Audit from Azure Policy + +Policy ID: `1f314764-cb73-4fc9-b863-8eca98ac36e9` +Name: 'An Azure Active Directory administrator should be provisioned for SQL servers' + +## Expected Result + +A Microsoft Entra admin should be configured for each SQL server with a valid `Admin Name`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `SQL servers`. +2. For each SQL server, click on `Microsoft Entra admin`. +3. Click on `Set admin`. +4. Select an admin. +5. Click `Save`. + +### Remediate from Azure CLI + +```bash +az ad user show --id +``` + +For each Server, set AD Admin: + +```bash +az sql server ad-admin create --resource-group --server --display-name --object-id +``` + +### Remediate from PowerShell + +For each Server, set Entra ID Admin: + +```powershell +Set-AzSqlServerActiveDirectoryAdministrator -ResourceGroupName -ServerName -DisplayName "" +``` + +## Default Value + +Entra ID Authentication for SQL Database/Server is not enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-configure +2. https://docs.microsoft.com/en-us/azure/sql-database/sql-database-aad-authentication +3. https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/get-azurermsqlserveractivedirectoryadministrator?view=azurermps-5.2.0 +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-1-use-centralized-identity-and-authentication-system +5. https://docs.microsoft.com/en-us/cli/azure/sql/server/ad-admin?view=azure-cli-latest#az_sql_server_ad_admin_list + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.6/SKILL.md new file mode 100644 index 0000000000..5e0ccfa9c8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.6/SKILL.md @@ -0,0 +1,125 @@ +--- +name: cis-azure-database-9.6 +description: "Ensure that 'Data encryption' is set to 'On' on a SQL Database" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, sql-database, sql-server] +cis_id: "9.6" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 9.6 Ensure that 'Data encryption' is set to 'On' on a SQL Database (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +Enable Transparent Data Encryption on every SQL server. + +## Rationale + +Azure SQL Database transparent data encryption helps protect against the threat of malicious activity by performing real-time encryption and decryption of the database, associated backups, and transaction log files at rest without requiring changes to the application. + +## Impact + +None documented. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `SQL databases`. +2. For each DB instance. +3. Click on `Transparent data encryption`. +4. Ensure that `Data encryption` is set to `On`. + +### Audit from Azure CLI + +Ensure the output of the below command is `Enabled`: + +```bash +az sql db tde show --resource-group --server --database --query status +``` + +### Audit from PowerShell + +Get a list of SQL Servers: + +```powershell +Get-AzSqlServer +``` + +For each server, list the databases: + +```powershell +Get-AzSqlDatabase -ServerName -ResourceGroupName +``` + +For each database not listed as a `Master` database, check for Transparent Data Encryption: + +```powershell +Get-AzSqlDatabaseTransparentDataEncryption -ResourceGroupName -ServerName -DatabaseName +``` + +Make sure `DataEncryption` is `Enabled` for each database except the `Master` database. + +### Audit from Azure Policy + +Policy ID: `17k78e20-9358-41c9-923c-fb736d382a12` +Name: 'Transparent Data Encryption on SQL databases should be enabled' + +## Expected Result + +`Data encryption` should be set to `On` for all SQL databases (except master). + +## Remediation + +### Remediate from Azure Portal + +1. Go to `SQL databases`. +2. For each DB instance. +3. Click on `Transparent data encryption`. +4. Set `Data encryption` to `On`. + +### Remediate from Azure CLI + +Use the below command to enable `Transparent data encryption` for SQL DB instance: + +```bash +az sql db tde set --resource-group --server --database --status Enabled +``` + +### Remediate from PowerShell + +Use the below command to enable `Transparent data encryption` for SQL DB instance: + +```powershell +Set-AzSqlDatabaseTransparentDataEncryption -ResourceGroupName -ServerName -DatabaseName -State 'Enabled' +``` + +**Note:** + +- TDE cannot be used to encrypt the logical master database in SQL Database. The master database contains objects that are needed to perform the TDE operations on the user databases. +- Azure Portal does not show master databases per SQL server. However, CLI/API responses will show master databases. + +## Default Value + +By default, `Data encryption` is set to `On`. + +## References + +1. https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/transparent-data-encryption-with-azure-sql-database +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-4-enable-data-at-rest-encryption-by-default +3. https://learn.microsoft.com/en-us/powershell/module/az.sql/set-azsqldatabasetransparentdataencryption?view=azps-9.2.0 + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.7/SKILL.md new file mode 100644 index 0000000000..dff3c93f65 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.7/SKILL.md @@ -0,0 +1,123 @@ +--- +name: cis-azure-database-9.7 +description: "Ensure that 'Auditing' Retention is 'greater than 90 days'" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, sql-database, sql-server] +cis_id: "9.7" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 9.7 Ensure that 'Auditing' Retention is 'greater than 90 days' (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +SQL Server Audit Retention should be configured to be greater than 90 days. + +## Rationale + +Audit Logs can be used to check for anomalies and give insight into suspected breaches or misuse of information and access. + +## Impact + +None documented. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `SQL servers`. +2. For each server instance. +3. Click on `Auditing`. +4. If storage is selected, expand `Advanced properties`. +5. Ensure `Retention (days)` setting is greater than `90` days or `0` for unlimited retention. + +### Audit from PowerShell + +Get the list of all SQL Servers: + +```powershell +Get-AzSqlServer +``` + +For each Server: + +```powershell +Get-AzSqlServerAudit -ResourceGroupName -ServerName +``` + +Ensure that `RetentionInDays` is set to `more than 90`. + +**Note:** If the SQL server is set with `LogAnalyticsTargetState` setting set to `Enabled`, run the following additional command: + +```powershell +Get-AzOperationalInsightsWorkspace | Where-Object {$_.ResourceId -eq } +``` + +Ensure that `RetentionInDays` is set to `more than 90`. + +### Audit from Azure Policy + +Policy ID: `89099bee-89e0-4b26-a5f4-165451757743` +Name: 'SQL servers with auditing to storage account destination should be configured with 90 days retention or higher' + +## Expected Result + +`Retention (days)` should be greater than `90` days or `0` for unlimited retention. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `SQL servers`. +2. For each server instance. +3. Click on `Auditing`. +4. If storage is selected, expand `Advanced properties`. +5. Set the `Retention (days)` setting greater than `90` days or `0` for unlimited retention. +6. Select `Save`. + +### Remediate from PowerShell + +For each Server, set retention policy to more than 90 days. + +**Log Analytics Example:** + +```powershell +Set-AzSqlServerAudit -ResourceGroupName -ServerName -RetentionInDays -LogAnalyticsTargetState Enabled -WorkspaceResourceId "/subscriptions//resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/" +``` + +**Event Hub Example:** + +```powershell +Set-AzSqlServerAudit -ResourceGroupName "" -ServerName "" -EventHubTargetState Enabled -EventHubName "" -EventHubAuthorizationRuleResourceId "" +``` + +**Blob Storage Example:** + +```powershell +Set-AzSqlServerAudit -ResourceGroupName "" -ServerName "" -BlobStorageTargetState Enabled -StorageAccountResourceId "/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts/" +``` + +## Default Value + +By default, SQL Server audit storage is `disabled`. + +## References + +1. https://docs.microsoft.com/en-us/azure/sql-database/sql-database-auditing +2. https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/get-azurermsqlserverauditing?view=azurermps-5.2.0 +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-6-configure-log-storage-retention + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.8/SKILL.md new file mode 100644 index 0000000000..4fb09eb0e3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-9.8/SKILL.md @@ -0,0 +1,140 @@ +--- +name: cis-azure-database-9.8 +description: "Ensure 'Minimum TLS Version' is set to 'TLS 1.2' or higher" +category: cis-azure-database +version: "2.0.0" +author: cyberstrike-official +tags: [cis, azure, sql-database, sql-server] +cis_id: "9.8" +cis_benchmark: "CIS Microsoft Azure Database Services Benchmark v2.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 9.8 Ensure 'Minimum TLS Version' is set to 'TLS 1.2' or higher (Automated) + +## Profile Applicability + +- Level 1 + +## Description + +**Note:** It is no longer possible to set the minimal TLS version of SQL server to lower than 1.2. Azure ended support for TLS 1.0 and 1.1 in August 2025. + +Setting the 'Minimum TLS version' to 'TLS 1.2' or higher reduces TLS protocol vulnerabilities by preventing the use of significantly outdated versions of TLS. + +## Rationale + +The Secure Sockets Layer (SSL) protocol encrypts network traffic transiting between server and client. + +Using only the most recent versions of SSL protocols (TLS version 1.2 and higher) eliminates susceptibility to known exploited vulnerabilities of outdated versions of TLS. If TLS 1.2 does not provide additional granular configuration options for supported cipher suites, there's a chance that default ciphers which employ Cipher Block Chaining (CBC) mode may be enabled which would introduce Padding Oracle types of vulnerabilities. TLS 1.3 does not support CBC mode ciphers by default and by default supports GCM ciphers which include an extra authentication step during the clear text to cipher text encryption process. + +TLS version 1.3 is preferable where it is possible to implement. + +Versions 1.0 and 1.1 of TLS are no longer considered secure. These versions should not be used or permitted where data integrity and confidentiality are required. + +## Impact + +No impact to cost or performance. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `SQL servers`. +2. Select the name of a SQL server. +3. Under `Security`, select `Networking`. +4. Select `Connectivity`. +5. Under `Encryption in transit`, ensure `Minimum TLS version` is set to `TLS 1.2` or higher. +6. Repeat steps 1-5 for each SQL server. + +### Audit from Azure CLI + +Run the following command to list SQL servers: + +```bash +az sql server list +``` + +For each SQL server, run the following command to get the `minimalTlsVersion` setting: + +```bash +az sql server show --resource-group --name --query minimalTlsVersion +``` + +Ensure `"1.2"` or higher is returned. + +### Audit from PowerShell + +Run the following command to list SQL servers: + +```powershell +Get-AzSqlServer +``` + +Run the following command to get the server in a resource group with a given name: + +```powershell +$server = Get-AzSqlServer -ResourceGroupName -ServerName +``` + +Run the following command to get the `MinimalTlsVersion`: + +```powershell +$server.MinimalTlsVersion +``` + +Ensure `1.2` or higher is returned. Repeat for each SQL server. + +### Audit from Azure Policy + +Policy ID: `32e6bbec-16b6-44c2-be37-c5b672d103cf` +Name: 'Azure SQL Database should be running TLS version 1.2 or newer' + +## Expected Result + +`Minimum TLS version` should be set to `TLS 1.2` or higher. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `SQL servers`. +2. Select the name of a SQL server. +3. Under `Security`, select `Networking`. +4. Select `Connectivity`. +5. Under `Encryption in transit`, select `TLS 1.2` or higher from the dropdown menu next to `Minimum TLS version`. +6. Select `Save`. +7. Repeat steps 1-6 for each SQL server requiring remediation. + +### Remediate from Azure CLI + +For each SQL server requiring remediation, run the following command: + +```bash +az sql server update --resource-group --name --minimal-tls-version 1.2 +``` + +### Remediate from PowerShell + +For each SQL server requiring remediation, run the following command: + +```powershell +Set-AzSqlServer -ResourceGroupName -ServerName -MinimalTlsVersion "1.2" +``` + +## Default Value + +By default, the Minimum TLS version is set to `TLS 1.2`. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-sql/database/connectivity-settings?view=azuresql +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.1/SKILL.md new file mode 100644 index 0000000000..af31d82242 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.1/SKILL.md @@ -0,0 +1,136 @@ +--- +name: cis-azure-foundations-2.1.1 +description: "Ensure Azure Databricks is deployed in a customer-managed VNet" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-2.1.2, cis-azure-foundations-2.1.9, cis-azure-foundations-2.1.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Azure Databricks is deployed in a customer-managed VNet + +## Description + +Networking for Azure Databricks can be set up in a few different ways. Using a customer-managed Virtual Network (VNet) (also known as VNet Injection) ensures that compute clusters and control planes are securely isolated within the organization's network boundary. By default, Databricks creates a managed VNet, which provides limited control over network security policies, firewall configurations, and routing. + +## Rationale + +Using a customer-managed VNet ensures better control over network security and aligns with zero-trust architecture principles. It allows for: + +- Restricted outbound internet access to prevent unauthorized data exfiltration. +- Integration with on-premises networks via VPN or ExpressRoute for hybrid connectivity. +- Fine-grained NSG policies to restrict access at the subnet level. +- Private Link for secure API access, avoiding public internet exposure. + +## Impact + +- Requires additional configuration during Databricks workspace deployment. +- Might increase operational overhead for network maintenance. +- May impact connectivity if misconfigured (e.g., restrictive NSG rules or missing routes). + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to Azure Portal -> Search for Databricks Workspaces. +2. Select the Databricks Workspace to audit. +3. Under Networking, check if the workspace is deployed in a Customer-Managed VNet. +4. If the Virtual Network field shows Databricks-Managed VNet, it is non-compliant. +5. Verify NSG rules and Private Endpoints for fine-grained access control. + +### Audit from Azure CLI + +Run the following command to check if Databricks is using a customer-managed VNet: + +```bash +az network vnet show --resource-group --name +``` + +Ensure that Databricks subnets are present in the VNet configuration. Validate NSG rules attached to the Databricks subnets. + +### Audit from PowerShell + +```powershell +Get-AzDatabricksWorkspace -ResourceGroupName -Name | Select-Object VirtualNetworkId +``` + +If VirtualNetworkId is null or shows a Databricks-Managed VNet, it is non-compliant. + +### Audit from Azure Policy + +- **Policy ID:** `9c25c9e4-ee12-4882-afd2-11fb9d87893f` - **Name:** 'Azure Databricks Workspaces should be in a virtual network' + +## Expected Result + +The workspace should show a customer-managed VNet with properly configured subnets and NSG rules. The VirtualNetworkId should point to an organization-owned VNet resource. + +## Remediation + +### Remediate from Azure Portal + +1. Delete the existing Databricks workspace (migration required). +2. Create a new Databricks workspace with VNet Injection: +3. Go to Azure Portal -> Create Databricks Workspace. +4. Select Advanced Networking. +5. Choose Deploy into your own Virtual Network. +6. Specify a customer-managed VNet and associated subnets. +7. Enable Private Link for secure API access. + +### Remediate from Azure CLI + +Deploy a new Databricks workspace in a custom VNet: + +```bash +az databricks workspace create --name \ + --resource-group \ + --location \ + --managed-resource-group \ + --enable-no-public-ip true \ + --network-security-group-rule "NoAzureServices" \ + --public-network-access Disabled \ + --custom-virtual-network-id /subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/ +``` + +Ensure NSG Rules are correctly configured: + +```bash +az network nsg rule create --resource-group \ + --nsg-name \ + --name "DenyAllOutbound" \ + --direction Outbound \ + --access Deny \ + --priority 4096 +``` + +### Remediate from PowerShell + +```powershell +New-AzDatabricksWorkspace -ResourceGroupName -Name -Location -ManagedResourceGroupName -CustomVirtualNetworkId "/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/" +``` + +## Default Value + +By default, Azure Databricks uses a Databricks-Managed VNet. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/azure-databricks-security-baseline +2. https://learn.microsoft.com/en-us/azure/databricks/security/network/classic/vnet-inject#network-security-group-rules + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 14.1 Segment the Network Based on Sensitivity | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.10/SKILL.md new file mode 100644 index 0000000000..d0f062a9ef --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.10/SKILL.md @@ -0,0 +1,152 @@ +--- +name: cis-azure-foundations-2.1.10 +description: "Ensure 'Allow Public Network Access' is set to 'Disabled'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.10" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-2.1.1, cis-azure-foundations-2.1.9, cis-azure-foundations-2.1.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Allow Public Network Access' is set to 'Disabled' + +## Description + +Disable public network access to prevent exposure to the internet and reduce the risk of unauthorized access. Use private endpoints to securely manage access within trusted networks. + +## Rationale + +Disabling public network access improves security by ensuring that Azure Databricks workspaces are not exposed on the public internet. + +## Impact + +**NOTE:** Prior to disabling public network access, it is strongly recommended that, for each workspace, either: + +- Virtual network integration is completed as described in "Ensure that Azure Databricks is deployed in a customer-managed virtual network (VNet)" + +OR + +- Private endpoints/links are set up as described in "Ensure private endpoints are used to access Azure Databricks workspaces." + +Disabling public network access restricts access to the service. This enhances security but will require the configuration of a virtual network and/or private endpoints for any services or users needing access within trusted networks. + +Before public network access can be disabled, Azure Databricks workspaces must be deployed in a customer-managed virtual network (VNet injection) -- refer to the recommendation `Ensure that Azure Databricks is deployed in a customer-managed virtual network (VNet)`, and `requiredNsgRules` must be set to a value other than `AllRules`. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Azure Databricks`. +2. Click the name of a workspace. +3. Under `Settings` click `Networking`. +4. Under `Network access`, ensure `Allow Public Network Access` is set to `Disabled`. +5. Repeat steps 1-4 for each workspace. + +### Audit from Azure CLI + +Run the following command to list workspaces: + +```bash +az databricks workspace list +``` + +For each workspace, run the following command to get the `publicNetworkAccess` setting: + +```bash +az databricks workspace show --resource-group --name --query publicNetworkAccess +``` + +Ensure that `"Disabled"` is returned. + +### Audit from PowerShell + +Run the following command to list workspaces: + +```powershell +Get-AzDatabricksWorkspace +``` + +Run the following command to get the workspace in a resource group with a given name: + +```powershell +$workspace = Get-AzDatabricksWorkspace -ResourceGroupName -Name +``` + +Run the following command to get the `PublicNetworkAccess` setting: + +```powershell +$workspace.PublicNetworkAccess +``` + +Ensure that `Disabled` is returned. Repeat for each workspace. + +### Audit from Azure Policy + +- **Policy ID:** `0e7849de-b939-4c50-ab48-fc6b0f5eeba2` - **Name:** 'Azure Databricks Workspaces should disable public network access' + +## Expected Result + +The `publicNetworkAccess` setting should return `Disabled` for all Databricks workspaces. Access should only be possible through private endpoints or VNet-integrated paths. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Azure Databricks`. +2. Click the name of a workspace. +3. Under `Settings` click `Networking`. +4. Under `Network access`, next to `Allow Public Network Access`, click the radio button next to `Disabled`. +5. Click `Save`. +6. Repeat steps 1-5 for each workspace requiring remediation. + +### Remediate from Azure CLI + +For each workspace requiring remediation, run the following command to set `publicNetworkAccess` to `Disabled`: + +```bash +az databricks workspace update --resource-group --name --public-network-access Disabled +``` + +### Remediate from PowerShell + +For each workspace requiring remediation, run the following command to set `PublicNetworkAccess` to `Disabled`: + +```powershell +Update-AzDatabricksWorkspace -ResourceGroupName -Name -PublicNetworkAccess Disabled +``` + +## Default Value + +`Allow Public Network Access` is set to `Enabled` by default. + +## References + +1. https://learn.microsoft.com/en-us/cli/azure/databricks/workspace +2. https://learn.microsoft.com/en-us/powershell/module/az.databricks + +## Additional Information + +This recommendation is based on the Common Reference Recommendation `Ensure public network access is Disabled`, from the Common Reference Recommendations > Networking > Virtual Networks (VNets) section. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1037 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.11/SKILL.md new file mode 100644 index 0000000000..053401bd37 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.11/SKILL.md @@ -0,0 +1,159 @@ +--- +name: cis-azure-foundations-2.1.11 +description: "Ensure private endpoints are used to access Azure Databricks workspaces" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.11" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-2.1.1, cis-azure-foundations-2.1.9, cis-azure-foundations-2.1.10] +prerequisites: [] +severity_boost: {} +--- + +# Ensure private endpoints are used to access Azure Databricks workspaces + +## Description + +Use private endpoints for Azure Databricks workspaces to allow clients and services to securely access data located over a network via an encrypted Private Link. To do this, the private endpoint uses an IP address from the VNet for each service. Network traffic between disparate services securely traverses encrypted over the VNet. This VNet can also link addressing space, extending your network and accessing resources on it. Similarly, it can be a tunnel through public networks to connect remote infrastructures together. This creates further security through segmenting network traffic and preventing outside sources from accessing it. + +## Rationale + +Using private endpoints for Azure Databricks workspaces ensures that all communication between clients, services, and data sources occurs over a secure, private IP space within an Azure Virtual Network (VNet). This approach eliminates exposure to the public internet, significantly reducing the attack surface and aligning with Zero Trust principles. Additionally, integrating Databricks with a VNet enables network segmentation, fine-grained access control, and hybrid connectivity through VNet peering or VPN/ExpressRoute. + +## Impact + +If an Azure Virtual Network is not implemented correctly, this may result in the loss of critical network traffic. + +Private endpoints are charged per hour of use. Refer to https://azure.microsoft.com/en-us/pricing/details/private-link/ and https://azure.microsoft.com/en-us/pricing/calculator/ to estimate potential costs. + +Before a private endpoint can be configured, Azure Databricks workspaces: + +- Must be deployed in a customer-managed virtual network (VNet injection) -- refer to the recommendation `Ensure that Azure Databricks is deployed in a customer-managed virtual network (VNet)`. +- Must have secure cluster connectivity enabled -- refer to the recommendation `Ensure 'Enable No Public IP' is set to 'Yes'`. +- Must be on the Premium pricing tier. + +Ensure the requirements and concepts are considered carefully before applying this recommendation. Refer to https://learn.microsoft.com/en-us/azure/databricks/security/network/classic/private-link for more information. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Azure Databricks`. +2. Click the name of a workspace. +3. Under `Settings`, click `Networking`. +4. Click `Private endpoint connections`. +5. Ensure a private endpoint connection exists with a connection state of `Approved`. +6. Repeat steps 1-5 for each workspace. + +### Audit from Azure CLI + +Run the following command to list workspaces: + +```bash +az databricks workspace list +``` + +For each workspace, run the following command to get the `privateEndpointConnections` configuration: + +```bash +az databricks workspace show --resource-group --name --query privateEndpointConnections +``` + +Ensure a private endpoint connection is returned with a `privateLinkServiceConnectionState` status of `Approved`. + +### Audit from PowerShell + +Run the following command to list workspaces: + +```powershell +Get-AzDatabricksWorkspace +``` + +Run the following command to get the workspace in a resource group with a given name: + +```powershell +$workspace = Get-AzDatabricksWorkspace -ResourceGroupName -Name +``` + +Run the following command to get the `PrivateEndpointConnection` configuration: + +```powershell +$workspace.PrivateEndpointConnection | Select-Object -Property Id,PrivateLinkServiceConnectionStateStatus +``` + +Ensure a private endpoint connection is returned with a `PrivateLinkServiceConnectionStateStatus` of `Approved`. Repeat for each workspace. + +### Audit from Azure Policy + +- **Policy ID:** `258823f2-4595-4b52-b333-cc96192710d8` - **Name:** 'Azure Databricks Workspaces should use private link' + +## Expected Result + +Each workspace should have at least one private endpoint connection with a `privateLinkServiceConnectionState` status of `Approved`. No public network paths should be the sole means of access. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Azure Databricks`. +2. Click the name of a workspace. +3. Under `Settings`, click `Networking`. +4. Click `Private endpoint connections`. +5. Click `+ Private endpoint`. +6. Under `Project details`, select a `Subscription` and a `Resource group`. +7. Under `Instance details`, provide a `Name`, `Network Interface Name`, and select a `Region`. +8. Click `Next : Resource >`. +9. Select a `Target sub-resource`. +10. Click `Next : Virtual Network >`. +11. Under `Networking`, select a `Virtual network` and a `Subnet`. +12. Optionally, configure `Private IP configuration` and `Application security group`. +13. Click `Next : DNS >`. +14. Optionally, configure `Private DNS integration`. +15. Click `Next : Tags >`. +16. Optionally, configure tags. +17. Click `Next : Review + create >`. +18. Click `Create`. +19. Repeat steps 1-18 for each workspace requiring remediation. + +### Remediate from Azure CLI + +For each workspace requiring remediation, run the following command to create a private endpoint connection: + +```bash +az network private-endpoint create --resource-group --name --location --vnet-name --subnet --private-connection-resource-id --connection-name --group-id +``` + +## Default Value + +Private endpoints are not configured for Azure Databricks workspaces by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/databricks/security/network/classic/private-link +2. https://learn.microsoft.com/en-us/cli/azure/databricks/workspace +3. https://learn.microsoft.com/en-us/powershell/module/az.databricks + +## Additional Information + +This recommendation is based on the Common Reference Recommendation `Ensure Private Endpoints are used to access {service}`, from the Common Reference Recommendations > Networking > Private Endpoints section. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 14.1 Segment the Network Based on Sensitivity | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1537 | TA0010 | M1037 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.2/SKILL.md new file mode 100644 index 0000000000..500825a2a2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.2/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-azure-foundations-2.1.2 +description: "Ensure network security groups are configured for Databricks subnets" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-2.1.1, cis-azure-foundations-2.1.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure network security groups are configured for Databricks subnets + +## Description + +Network Security Groups (NSGs) should be implemented to control inbound and outbound traffic to Azure Databricks subnets, ensuring only authorized communication. NSGs operate using a rule-based model that includes both explicit allow/deny rules and an implicit deny at the end of the rule list. This means that any traffic not explicitly allowed is automatically denied. To ensure secure and predictable behavior, NSGs should be configured with explicit deny rules for known unwanted traffic, in addition to the default implicit deny, to improve visibility and auditability of blocked traffic. This approach helps enforce least privilege and minimizes the risk of unauthorized access to Databricks resources. + +## Rationale + +Using NSGs with both explicit allow and deny rules provides clear documentation and control over permitted and prohibited traffic. While Azure NSGs implicitly deny all traffic not explicitly allowed, defining explicit deny rules for known malicious or unnecessary sources enhances clarity, simplifies troubleshooting, and supports compliance audits. This layered approach strengthens the security posture of Databricks environments by ensuring only essential communication is permitted. + +## Impact + +- NSGs require ongoing maintenance to ensure rule accuracy and alignment with evolving business and security requirements. +- Misconfigured NSGs -- especially overly broad allow rules or missing explicit denies -- can inadvertently expose Databricks resources or block legitimate traffic. +- Relying solely on implicit deny may obscure the intent behind traffic restrictions, making it harder to audit or troubleshoot network behavior. + +## Audit Procedure + +### Audit from Azure Portal + +1. Navigate to Virtual Networks > Subnets, and review NSG assignments. + +### Audit from Azure CLI + +```bash +az network nsg list --query "[].{Name:name, Rules:securityRules}" +``` + +### Audit from PowerShell + +```powershell +Get-AzNetworkSecurityGroup -ResourceGroupName +``` + +## Expected Result + +Each Databricks subnet should have an NSG assigned with explicit allow and deny rules that enforce least privilege access. The NSG should contain rules specific to Databricks communication requirements. + +## Remediation + +### Remediate from Azure Portal + +1. Assign NSG to Databricks subnets under Networking > NSG Settings. + +## Default Value + +By default, Databricks subnets do not have NSGs assigned. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/azure-databricks-security-baseline +2. https://learn.microsoft.com/en-us/azure/databricks/security/network/classic/vnet-inject#network-security-group-rules + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.4 Implement and Manage a Firewall on Servers | x | x | x | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.3/SKILL.md new file mode 100644 index 0000000000..541efd7abb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.3/SKILL.md @@ -0,0 +1,158 @@ +--- +name: cis-azure-foundations-2.1.3 +description: "Ensure traffic is encrypted between cluster worker nodes" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-2.1.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure traffic is encrypted between cluster worker nodes + +## Description + +By default, data exchanged between worker nodes in an Azure Databricks cluster is not encrypted. To ensure that data is encrypted at all times, whether at rest or in transit, you can create an initialization script that configures your clusters to encrypt traffic between worker nodes using AES 256-bit encryption over a TLS 1.3 connection. + +## Rationale + +- Protects sensitive data during transit between cluster nodes, mitigating risks of data interception or unauthorized access. +- Aligns with organizational security policies and compliance requirements that mandate encryption of data in transit. +- Enhances overall security posture by ensuring that all inter-node communications within the cluster are encrypted. + +## Impact + +- Enabling encryption may introduce a performance penalty due to the computational overhead associated with encrypting and decrypting traffic. This can result in longer query execution times, especially for data-intensive operations. +- Implementing encryption requires creating and managing init scripts, which adds complexity to cluster configuration and maintenance. +- The shared encryption secret is derived from the hash of the keystore stored in DBFS. If the keystore is updated or rotated, all running clusters must be restarted to prevent authentication failures between Spark workers and drivers. + +## Audit Procedure + +### Audit from Azure Portal + +Review cluster init scripts: + +1. Navigate to your Azure Databricks workspace, go to the "Clusters" section, select a cluster, and check the "Advanced Options" for any init scripts that configure encryption settings. + +Verify spark configuration: + +2. Ensure that the following Spark configurations are set: + +``` +spark.authenticate true +spark.authenticate.enableSaslEncryption true +spark.network.crypto.enabled true +spark.network.crypto.keyLength 256 +spark.network.crypto.keyFactoryAlgorithm PBKDF2WithHmacSHA1 +spark.io.encryption.enabled true +``` + +These settings can be found in the cluster's Spark configuration properties. + +Check keystore management: + +3. Verify that the Java KeyStore (JKS) file is securely stored in DBFS and that its integrity is maintained. +4. Ensure that the keystore password is securely managed and not hardcoded in scripts. + +## Expected Result + +All cluster worker nodes should have inter-node encryption enabled with AES 256-bit over TLS 1.3. The Spark configuration should show the required encryption settings, and a valid JKS keystore should be present in DBFS. + +## Remediation + +Create a JKS keystore: + +1. Generate a Java KeyStore (JKS) file that will be used for SSL/TLS encryption. +2. Upload the keystore file to a secure directory in DBFS (e.g. `/dbfs//jetty_ssl_driver_keystore.jks`). + +Develop an init script: + +3. Create an init script that performs the following tasks: + - Retrieves the JKS keystore file and password. + - Derives a shared encryption secret from the keystore. + - Configures Spark driver and executor settings to enable encryption. + +4. Example init script: + +```bash +#!/bin/bash +set -euo pipefail +keystore_dbfs_file="/dbfs//jetty_ssl_driver_keystore.jks" +max_attempts=30 +while [ ! -f ${keystore_dbfs_file} ]; do + if [ "$max_attempts" == 0 ]; then + echo "ERROR: Unable to find the file : $keystore_dbfs_file. Failing the script." + exit 1 + fi + sleep 2s + ((max_attempts--)) +done +sasl_secret=$(sha256sum $keystore_dbfs_file | cut -d' ' -f1) +if [ -z "${sasl_secret}" ]; then + echo "ERROR: Unable to derive the secret. Failing the script." + exit 1 +fi +local_keystore_file="$DB_HOME/keys/jetty_ssl_driver_keystore.jks" +local_keystore_password="gb1gQqZ9ZIHS" +if [[ $DB_IS_DRIVER = "TRUE" ]]; then + driver_conf=${DB_HOME}/driver/conf/spark-branch.conf + echo "Configuring driver conf at $driver_conf" + if [ ! -e $driver_conf ]; then + echo "spark.authenticate true" >> $driver_conf + echo "spark.authenticate.secret $sasl_secret" >> $driver_conf + echo "spark.authenticate.enableSaslEncryption true" >> $driver_conf + echo "spark.network.crypto.enabled true" >> $driver_conf + echo "spark.network.crypto.keyLength 256" >> $driver_conf + echo "spark.network.crypto.keyFactoryAlgorithm PBKDF2WithHmacSHA1" >> $driver_conf + echo "spark.io.encryption.enabled true" >> $driver_conf + echo "spark.ssl.enabled true" >> $driver_conf + echo "spark.ssl.keyPassword $local_keystore_password" >> $driver_conf + echo "spark.ssl.keyStore $local_keystore_file" >> $driver_conf + echo "spark.ssl.keyStorePassword $local_keystore_password" >> $driver_conf + echo "spark.ssl.protocol TLSv1.3" >> $driver_conf + fi +fi +executor_conf=${DB_HOME}/conf/spark.executor.extraJavaOptions +echo "Configuring executor conf at $executor_conf" +if [ ! -e $executor_conf ]; then + echo "-Dspark.authenticate=true" >> $executor_conf + echo "-Dspark.authenticate.secret=$sasl_secret" >> $executor_conf + echo "-Dspark.authenticate.enableSaslEncryption=true" >> $executor_conf + echo "-Dspark.network.crypto.enabled=true" >> $executor_conf + echo "-Dspark.network.crypto.keyLength=256" >> $executor_conf + echo "-Dspark.network.crypto.keyFactoryAlgorithm=PBKDF2WithHmacSHA1" >> $executor_conf + echo "-Dspark.io.encryption.enabled=true" >> $executor_conf + echo "-Dspark.ssl.enabled=true" >> $executor_conf + echo "-Dspark.ssl.keyPassword=$local_keystore_password" >> $executor_conf + echo "-Dspark.ssl.keyStore=$local_keystore_file" >> $executor_conf + echo "-Dspark.ssl.keyStorePassword=$local_keystore_password" >> $executor_conf + echo "-Dspark.ssl.protocol=TLSv1.3" >> $executor_conf +fi +``` + +5. Save the init script and attach it to the cluster configuration. + +## Default Value + +By default, traffic is not encrypted between cluster worker nodes. + +## References + +1. https://learn.microsoft.com/en-us/azure/databricks/security/keys/encrypt-otw + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.4/SKILL.md new file mode 100644 index 0000000000..30905f08e3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.4/SKILL.md @@ -0,0 +1,116 @@ +--- +name: cis-azure-foundations-2.1.4 +description: "Ensure users and groups are synced from Microsoft Entra ID to Azure Databricks" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-2.1.5, cis-azure-foundations-2.1.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure users and groups are synced from Microsoft Entra ID to Azure Databricks + +## Description + +To ensure centralized identity and access management, users and groups from Microsoft Entra ID should be synchronized with Azure Databricks. This is achieved through SCIM provisioning, which automates the creation, update, and deactivation of users and groups in Databricks based on Entra ID assignments. Enabling this integration ensures that access controls in Databricks remain consistent with corporate identity governance policies, reducing the risk of orphaned accounts, stale permissions, and unauthorized access. + +## Rationale + +Syncing users and groups from Microsoft Entra ID centralizes access control, enforces the least privilege principle by automatically revoking unnecessary access, reduces administrative overhead by eliminating manual user management, and ensures auditability and compliance with industry regulations. + +## Impact + +SCIM provisioning requires role mapping to avoid misconfigured user privileges. + +## Audit Procedure + +### Audit from Azure Portal + +Verify SCIM provisioning is enabled: + +1. Go to `Microsoft Entra ID`. +2. Under `Manage`, click `Enterprise applications`. +3. Click the name of the Azure Databricks SCIM application. +4. Under `Provisioning`, confirm that SCIM provisioning is enabled and running. + +Check user sync status in Azure Portal: + +5. Under `Provisioning Logs`, verify the last successful sync and any failed entries. + +Check user sync status in Databricks: + +6. Go to `Admin Console` > `Identity and Access Management`. +7. Confirm that Users and Groups match those assigned in Microsoft Entra ID. + +Ensure role-based access control (RBAC) mapping is correct: + +8. Verify that users are assigned appropriate Databricks roles (e.g. Admin, User, Contributor). +9. Confirm that groups are mapped to workspace access roles. + +## Expected Result + +SCIM provisioning should be enabled and running. Users and groups in Azure Databricks should match those in Microsoft Entra ID. All role assignments should follow the least privilege principle. + +## Remediation + +### Remediate from Azure Portal + +Enable provisioning in Azure Portal: + +1. Go to `Microsoft Entra ID`. +2. Under `Manage`, click `Enterprise applications`. +3. Click the name of the Azure Databricks SCIM application. +4. Under `Provisioning`, select `Automatic` and enter the SCIM endpoint and API token from Databricks. + +Enable provisioning in Databricks: + +5. Navigate to `Admin Console` > `Identity and Access Management`. +6. Enable SCIM provisioning and generate an API token. + +Configure role assignments: + +7. Ensure groups from Entra ID are mapped to appropriate Databricks roles. +8. Restrict administrative privileges to designated security groups. + +Regularly monitor sync logs: + +9. Periodically review sync logs in Microsoft Entra ID and Databricks Admin Console. +10. Configure Azure Monitor alerts for provisioning failures. + +Disable manual user creation in Databricks: + +11. Ensure that all user management is controlled via SCIM sync from Entra ID. +12. Disable personal access token usage for authentication. + +### Remediate from Azure CLI + +Enable SCIM User and Group Provisioning in Azure Databricks: + +```bash +az ad app update --id --set provisioning.provisioningMode=Automatic +``` + +## Default Value + +By default, Azure Databricks does not sync users and groups from Microsoft Entra ID. + +## References + +1. https://learn.microsoft.com/en-us/azure/databricks/administration-guide/users-groups/scim/aad + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | x | x | +| v7 | 16.2 Configure Centralized Point of Authentication | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.5/SKILL.md new file mode 100644 index 0000000000..0fcf9d116c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.5/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-azure-foundations-2.1.5 +description: "Ensure Unity Catalog is configured for Azure Databricks" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-2.1.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Unity Catalog is configured for Azure Databricks + +## Description + +Unity Catalog is a centralized governance model for managing and securing data in Azure Databricks. It provides fine-grained access control to databases, tables, and views using Microsoft Entra ID identities. Unity Catalog also enhances data lineage, audit logging, and compliance monitoring, making it a critical component for security and governance. + +## Rationale + +- Enforces centralized access control policies and reduces data security risks. +- Enables identity-based authentication via Microsoft Entra ID. +- Improves compliance with industry regulations (e.g. GDPR, HIPAA, SOC 2) by providing audit logs and access visibility. +- Prevents unauthorized data access through table-, row-, and column-level security (RLS & CLS). + +## Impact + +- Improperly configured permissions may lead to data exfiltration or unauthorized access. +- Unity Catalog requires structured governance policies to be effective and prevent overly permissive access. + +## Audit Procedure + +### Method 1: Verify Unity Catalog deployment + +1. As an Azure Databricks account admin, log into the account console. +2. Click Workspaces. +3. Find your workspace and check the Metastore column. If a metastore name is present, your workspace is attached to a Unity Catalog metastore and therefore enabled for Unity Catalog. + +### Method 2: Run a SQL query to confirm Unity Catalog enablement + +Run the following SQL query in the SQL query editor or a notebook that is attached to a Unity Catalog-enabled compute resource. No admin role is required. + +```sql +SELECT CURRENT_METASTORE(); +``` + +If the query returns a metastore ID, then your workspace is attached to a Unity Catalog metastore and therefore enabled for Unity Catalog. + +## Expected Result + +The workspace should be attached to a Unity Catalog metastore. The CURRENT_METASTORE() query should return a valid metastore ID. + +## Remediation + +Use the remediation procedure written in this article: https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/get-started. + +## Default Value + +New workspaces have Unity Catalog enabled by default. Existing workspaces may require manual enablement. + +## References + +1. https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/ +2. https://learn.microsoft.com/en-us/azure/databricks/admin/users-groups/ +3. https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/enable-workspaces + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | x | x | +| v8 | 6.7 Centralize Access Control | x | | x | +| v7 | 16.2 Configure Centralized Point of Authentication | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.6/SKILL.md new file mode 100644 index 0000000000..0832e02cbe --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.6/SKILL.md @@ -0,0 +1,121 @@ +--- +name: cis-azure-foundations-2.1.6 +description: "Ensure usage is restricted and expiry is enforced for Databricks personal access tokens" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.6" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-2.1.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure usage is restricted and expiry is enforced for Databricks personal access tokens + +## Description + +Databricks personal access tokens (PATs) provide API-based authentication for users and applications. By default, users can generate API tokens without expiration, leading to potential security risks if tokens are leaked, improperly stored, or not rotated regularly. + +To mitigate these risks, administrators should: + +- Restrict token creation to approved users and service principals. +- Enforce expiration policies to prevent long-lived tokens. +- Monitor token usage and revoke unused or compromised tokens. + +## Rationale + +Restricting usage and enforcing expiry for personal access tokens reduces exposure to long-lived tokens, minimizes the risk of API abuse if compromised, and aligns with security best practices through controlled issuance and enforced expiry. + +## Impact + +If revoked improperly, applications relying on these tokens may fail, requiring a remediation plan for token rotation. Increased administrative effort is required to track and manage API tokens effectively. + +## Audit Procedure + +Azure Databricks administrators can monitor and revoke personal access tokens within their workspace. Detailed instructions are available in the "Monitor and Revoke Personal Access Tokens" section of the Microsoft documentation: https://learn.microsoft.com/en-us/azure/databricks/admin/access-control/tokens. + +To evaluate the usage of personal access tokens in your Azure Databricks account, you can utilize the provided notebook that lists all PATs not rotated or updated in the last 90 days, allowing you to identify tokens that may require revocation. This process is detailed here: https://learn.microsoft.com/en-us/azure/databricks/admin/access-control/tokens. + +Implementing diagnostic logging provides a comprehensive reference of audit log services and events, enabling you to track activities related to personal access tokens. More information can be found in the diagnostic log reference section: https://learn.microsoft.com/en-us/azure/databricks/admin/account-settings/audit-logs. + +## Expected Result + +Personal access tokens should either be disabled or have maximum lifetime policies enforced. Token creation should be restricted to approved users and service principals only. No tokens older than 90 days without rotation should exist. + +## Remediation + +### Remediate from Azure Portal + +Disable personal access tokens: + +If your workspace does not require PATs, you can disable them entirely to prevent their use. + +1. Navigate to your Azure Databricks workspace. +2. Click the `Settings` icon and select `Admin Console`. +3. Go to the `Advanced` tab. +4. Under `Personal Access Tokens`, toggle the setting to `Disabled`. + +Databricks CLI: + +```bash +databricks workspace-conf set-status --json '{"enableTokens": "false"}' +``` + +Control who can create and use personal access tokens: + +Define which users or groups are authorized to create and utilize PATs. + +1. Navigate to your Azure Databricks workspace. +2. Click the `Settings` icon and select `Admin Console`. +3. Go to the `Advanced` tab. +4. Click on `Personal Access Tokens` and then `Permissions`. +5. Assign the appropriate permissions (e.g. No Permissions, Can Use, Can Manage) to users or groups. + +Set maximum lifetime for new personal access tokens: + +Limit the validity period of new tokens to reduce potential misuse. + +Databricks CLI: + +```bash +databricks workspace-conf set-status --json '{"maxTokenLifetimeDays": "90"}' +``` + +Monitor and revoke personal access tokens: + +Periodically review active tokens and revoke any that are unnecessary or potentially compromised. + +Databricks CLI: + +```bash +databricks token list +databricks token delete --token-id +``` + +Transition to OAuth for enhanced security: + +Utilize OAuth tokens for authentication, offering improved security features over PATs. + +## Default Value + +By default, personal access tokens are enabled and users can create the Personal access token and their expiry time. + +## References + +1. https://learn.microsoft.com/en-us/azure/databricks/administration-guide/access-control/tokens +2. https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 6.2 Establish an Access Revoking Process | x | x | x | +| v7 | 16.7 Establish Process for Revoking Access | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.7/SKILL.md new file mode 100644 index 0000000000..5e469380dd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.7/SKILL.md @@ -0,0 +1,184 @@ +--- +name: cis-azure-foundations-2.1.7 +description: "Ensure diagnostic log delivery is configured for Azure Databricks" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.7" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure diagnostic log delivery is configured for Azure Databricks + +## Description + +Azure Databricks Diagnostic Logging provides insights into system operations, user activities, and security events within a Databricks workspace. Enabling diagnostic logs helps organizations: + +- Detect security threats by logging access, job executions, and cluster activities. +- Ensure compliance with industry regulations such as SOC 2, HIPAA, and GDPR. +- Monitor operational performance and troubleshoot issues proactively. + +## Rationale + +Diagnostic logging provides visibility into security and operational activities within Databricks workspaces while maintaining an audit trail for forensic investigations, and it supports compliance with regulatory standards that require logging and monitoring. + +## Impact + +Logs consume storage and may require additional monitoring tools, leading to increased operational overhead and costs. Incomplete log configurations may result in missing critical events, reducing monitoring effectiveness. + +## Audit Procedure + +### Audit from Azure Portal + +Check if diagnostic logging is enabled for the Databricks workspace: + +1. Go to `Azure Databricks`. +2. Select a workspace. +3. In the left-hand menu, select `Monitoring` > `Diagnostic settings`. +4. Verify if a diagnostic setting is configured. If not, diagnostic logging is not enabled. + +Ensure that logging is enabled for the following categories: + +- `accounts`: User account activities. +- `Filesystem`: Databricks Filesystem Logs. +- `clusters`: Cluster state changes and errors. +- `notebook`: Execution events. +- `jobs`: Job execution tracking. + +Verify that logs are being sent to one or more of the following destinations: + +- `Azure Log Analytics workspace`: For analysis and querying. +- `Azure Storage Account`: For long-term retention. +- `Azure Event Hubs`: For integration with SIEM tools. + +### Audit from Azure CLI + +Check if diagnostic logging is enabled for the Databricks workspace: + +```bash +az monitor diagnostic-settings list --resource +``` + +If the output is empty, no diagnostic settings are configured. + +Verify log categories being collected: + +```bash +az monitor diagnostic-settings show --name --resource +``` + +Review the output to confirm that the necessary log categories are enabled. + +Check if logs are stored securely in an approved location: + +```bash +az monitor diagnostic-settings list --resource +``` + +Review the storageAccountId, workspaceId, and eventHubAuthorizationRuleId fields in the output to confirm the log destinations. + +### Audit from PowerShell + +Check if diagnostic logging is enabled for the Databricks workspace: + +```powershell +Get-AzDiagnosticSetting -ResourceId +``` + +An empty result indicates that diagnostic logging is not enabled. + +### Audit from Azure Policy + +- **Policy ID:** `138ff14d-b687-4faa-a81c-898c91a87fa2` - **Name:** 'Resource logs in Azure Databricks Workspaces should be enabled' + +## Expected Result + +Diagnostic settings should be configured with all required log categories enabled. Logs should be delivered to at least one approved destination (Log Analytics, Storage Account, or Event Hubs). + +## Remediation + +### Remediate from Azure Portal + +Enable diagnostic logging for Azure Databricks: + +1. Navigate to your Azure Databricks workspace. +2. In the left-hand menu, select `Monitoring` > `Diagnostic settings`. +3. Click `+ Add diagnostic setting`. +4. Under `Category details`, select the log categories you wish to capture, such as AuditLogs, Clusters, Notebooks, and Jobs. +5. Choose a destination for the logs: + - `Log Analytics workspace`: For advanced querying and monitoring. + - `Storage account`: For long-term retention. + - `Event Hub`: For integration with third-party systems. +6. Provide a `Name` for the diagnostic setting. +7. Click `Save`. + +Implement log retention policies: + +1. Navigate to your Log Analytics workspace. +2. Under `General`, select `Usage and estimated costs`. +3. Click `Data Retention`. +4. Adjust the retention period slider to the desired number of days (up to 730 days). +5. Click `OK`. + +Monitor logs for anomalies: + +1. Navigate to `Azure Monitor`. +2. Select `Alerts` > `+ New alert rule`. +3. Under `Scope`, specify the Databricks resource. +4. Define `Condition` based on log queries that identify anomalies (e.g. unauthorized access attempts). +5. Configure `Actions` to notify stakeholders or trigger automated responses. +6. Provide an Alert rule `name` and `description`. +7. Click `Create alert rule`. + +### Remediate from Azure CLI + +Enable diagnostic logging for Azure Databricks: + +```bash +az monitor diagnostic-settings create --name "DatabricksLogging" --resource --logs '[{"category": "accounts", "enabled": true}, {"category": "Clusters", "enabled": true}, {"category": "Notebooks", "enabled": true}, {"category": "Jobs", "enabled": true}]' --workspace +``` + +Implement log retention policies: + +```bash +az monitor log-analytics workspace update --resource-group --name --retention-time 365 +``` + +Monitor logs for anomalies: + +```bash +az monitor activity-log alert create --name "DatabricksAnomalyAlert" --resource-group --scopes --condition "contains 'UnauthorizedAccess'" +``` + +## Default Value + +By default, diagnostic logging is not enabled for Azure Databricks workspaces. + +## References + +1. https://learn.microsoft.com/en-us/azure/databricks/admin/account-settings/audit-log-delivery +2. https://learn.microsoft.com/en-us/troubleshoot/azure/azure-monitor/log-analytics/billing/configure-data-retention +3. https://docs.azure.cn/en-us/databricks/admin/account-settings/audit-logs +4. https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-logs/microsoft-databricks-workspaces-logs + +## Additional Information + +- Ensure that the Azure Databricks workspace is on the Premium plan to utilize diagnostic logging features. +- Regularly review and update alert rules to adapt to evolving security threats and operational requirements. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.8/SKILL.md new file mode 100644 index 0000000000..3a5453a96e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.8/SKILL.md @@ -0,0 +1,134 @@ +--- +name: cis-azure-foundations-2.1.8 +description: "Ensure critical data in Azure Databricks is encrypted with customer-managed keys (CMK)" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.8" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-2.1.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure critical data in Azure Databricks is encrypted with customer-managed keys (CMK) + +## Description + +Customer-managed keys introduce additional depth to security by providing a means to manage access control for encryption keys. Where compliance and security frameworks indicate the need, and organizational capacity allows, sensitive data at rest can be encrypted using customer-managed keys (CMK) rather than Microsoft-managed keys. + +## Rationale + +By default in Azure, data at rest tends to be encrypted using Microsoft-managed keys. If your organization wants to control and manage encryption keys for compliance and defense-in-depth, customer-managed keys can be established. + +While it is possible to automate the assessment of this recommendation, the assessment status for this recommendation remains 'Manual' due to ideally limited scope. The scope of application -- which workloads CMK is applied to -- should be carefully considered to account for organizational capacity and targeted to workloads with specific need for CMK. + +## Impact + +If the key expires due to setting the 'activation date' and 'expiration date', the key must be rotated manually. + +Using customer-managed keys may also incur additional man-hour requirements to create, store, manage, and protect the keys as needed. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to Azure Portal -> Databricks Workspaces. +2. Select a Databricks Workspace and go to Encryption settings. +3. Check if customer-managed keys (CMK) are enabled under "Managed Disk Encryption". +4. If CMK is not enabled, the workspace is non-compliant. + +### Audit from Azure CLI + +Run the following command to check encryption settings for Databricks workspace: + +```bash +az databricks workspace show --name --resource-group --query encryption +``` + +Ensure that keySource is set to `Microsoft.KeyVault`. + +### Audit from PowerShell + +```powershell +Get-AzDatabricksWorkspace -ResourceGroupName "" -Name "" | Select-Object Encryption +``` + +Verify that encryption is set to `Customer-Managed Keys (CMK)`. + +### Audit from Databricks CLI + +```bash +databricks workspace get-metadata --workspace-id +``` + +Ensure that encryption settings reflect a CMK setup. + +## Expected Result + +The workspace encryption settings should show `Microsoft.KeyVault` as the keySource, indicating customer-managed keys are in use. The encryption type should be CMK, not Microsoft-managed keys. + +## Remediation + +**NOTE:** These remediations assume that an Azure KeyVault already exists in the subscription. + +### Remediate from Azure CLI + +1. Create a dedicated key: + +```bash +az keyvault key create --vault-name --name --protection <"software" or "hsm"> +``` + +2. Assign permissions to Databricks: + +```bash +az keyvault set-policy --name --resource-group --spn --key-permissions get wrapKey unwrapKey +``` + +3. Enable encryption with CMK: + +```bash +az databricks workspace update --name --resource-group --key-source "Microsoft.KeyVault" --key-name --keyvault-uri +``` + +### Remediate from PowerShell + +```powershell +$Key = Add-AzKeyVaultKey -VaultName -Name -Destination <"software" or "hsm"> +Set-AzDatabricksWorkspace -ResourceGroupName "" -WorkspaceName "" -EncryptionKeySource "Microsoft.KeyVault" -KeyVaultUri $Key.Id +``` + +## Default Value + +By default, encryption type is set to Microsoft-managed keys. + +## References + +1. https://learn.microsoft.com/en-us/azure/security/fundamentals/data-encryption-best-practices#protect-data-at-rest +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-5-use-customer-managed-key-option-in-data-at-rest-encryption-when-required +3. https://learn.microsoft.com/en-us/azure/databricks/security/keys/cmk-managed-disks-azure/cmk-managed-disks-azure + +## Additional Information + +This recommendation is based on the Common Reference Recommendation `Ensure critical data is encrypted with customer-managed keys (CMK)`, from the Common Reference Recommendations > Secrets and Keys > Encryption Key Management > Customer Managed Keys section. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1041 | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.9/SKILL.md new file mode 100644 index 0000000000..4b27668961 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-2.1.9/SKILL.md @@ -0,0 +1,139 @@ +--- +name: cis-azure-foundations-2.1.9 +description: "Ensure 'No Public IP' is set to 'Enabled'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, databricks, analytics] +cis_id: "2.1.9" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-2.1.1, cis-azure-foundations-2.1.10, cis-azure-foundations-2.1.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'No Public IP' is set to 'Enabled' + +## Description + +Enable secure cluster connectivity (also known as no public IP) on Azure Databricks workspaces to ensure that clusters do not have public IP addresses and communicate with the control plane over a secure connection. + +## Rationale + +Enabling secure cluster connectivity limits exposure to the public internet, improving security and reducing the risk of external attacks. + +## Impact + +Enabling secure cluster connectivity requires careful network configuration. Before secure cluster connectivity can be enabled, Azure Databricks workspaces must be deployed in a customer-managed virtual network (VNet injection) -- refer to the recommendation `Ensure that Azure Databricks is deployed in a customer-managed virtual network (VNet)`. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Azure Databricks`. +2. Click the name of a workspace. +3. Under `Settings`, click `Networking`. +4. Under `Network access`, ensure that `Deploy Azure Databricks workspace with Secure Cluster Connectivity (No Public IP)` is set to `Enabled`. +5. Repeat steps 1-4 for each workspace. + +### Audit from Azure CLI + +Run the following command to list workspaces: + +```bash +az databricks workspace list +``` + +For each workspace, run the following command to get the `enableNoPublicIp` setting: + +```bash +az databricks workspace show --resource-group --name --query parameters.enableNoPublicIp.value +``` + +Ensure that `true` is returned. + +### Audit from PowerShell + +Run the following command to list workspaces: + +```powershell +Get-AzDatabricksWorkspace +``` + +Run the following command to get the workspace in a resource group with a given name: + +```powershell +$workspace = Get-AzDatabricksWorkspace -ResourceGroupName -Name +``` + +Run the following command to get the `EnableNoPublicIp` setting: + +```powershell +$workspace.EnableNoPublicIP +``` + +Ensure that `True` is returned. Repeat for each workspace. + +### Audit from Azure Policy + +- **Policy ID:** `51c1490f-3319-459c-bbbc-7f391bbed753` - **Name:** 'Azure Databricks Clusters should disable public IP' + +## Expected Result + +The `enableNoPublicIp` parameter should return `true` for all Databricks workspaces. No cluster nodes should have public IP addresses assigned. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Azure Databricks`. +2. Click the name of a workspace. +3. Under `Settings`, click `Networking`. +4. Under `Network access`, next to `Deploy Azure Databricks workspace with Secure Cluster Connectivity (No Public IP)`, click the radio button next to `Enabled`. +5. Click `Save`. +6. Repeat steps 1-5 for each workspace requiring remediation. + +### Remediate from Azure CLI + +For each workspace requiring remediation, run the following command to set `enableNoPublicIp` to `true`: + +```bash +az databricks workspace update --resource-group --name --enable-no-public-ip true +``` + +### Remediate from PowerShell + +For each workspace requiring remediation, run the following command to set `EnableNoPublicIP` to `True`: + +```powershell +Update-AzDatabricksWorkspace -ResourceGroupName -Name -EnableNoPublicIP +``` + +## Default Value + +`No Public IP` is set to `Enabled` by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/databricks/security/network/classic/secure-cluster-connectivity +2. https://learn.microsoft.com/en-us/cli/azure/databricks/workspace +3. https://learn.microsoft.com/en-us/powershell/module/az.databricks + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1530 | TA0009 | M1037 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-3.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-3.1.1/SKILL.md new file mode 100644 index 0000000000..0b52a0ffd4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-3.1.1/SKILL.md @@ -0,0 +1,115 @@ +--- +name: cis-azure-foundations-3.1.1 +description: "Ensure only MFA enabled identities can access privileged Virtual Machine" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, virtual-machines, vm] +cis_id: "3.1.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure only MFA enabled identities can access privileged Virtual Machine + +## Description + +Verify identities without MFA that can log in to a privileged virtual machine using separate login credentials. An adversary can leverage the access to move laterally and perform actions with the virtual machine's managed identity. Make sure the virtual machine only has necessary permissions, and revoke the admin-level permissions according to the principle of least privilege. + +## Rationale + +Integrating multi-factor authentication (MFA) as part of the organizational policy can greatly reduce the risk of an identity gaining control of valid credentials that may be used for additional tactics such as initial access, lateral movement, and collecting information. MFA can also be used to restrict access to cloud resources and APIs. + +An Adversary may log into accessible cloud services within a compromised environment using Valid Accounts that are synchronized to move laterally and perform actions with the virtual machine's managed identity. The adversary may then perform management actions or access cloud-hosted resources as the logged-on managed identity. + +## Impact + +This recommendation requires the Entra ID P2 license to implement. + +Ensure that identities provisioned to a virtual machine utilize an RBAC/ABAC group and are allocated a role using Azure PIM, and that the role settings require MFA or use another third-party PAM solution for accessing virtual machines. + +## Audit Procedure + +### Audit from Azure Portal + +1. Log in to the Azure portal. +2. Select the `Subscription`, then click on `Access control (IAM)`. +3. Click `Role : All` and click `All` to display the drop-down menu. +4. Type `Virtual Machine Administrator Login` and select `Virtual Machine Administrator Login`. +5. Review the list of identities that have been assigned the `Virtual Machine Administrator Login` role. +6. Go to `Microsoft Entra ID`. +7. For `Per-user MFA`: + a) Under `Manage`, click `Users`. + b) Click `Per-user MFA`. + c) Ensure that none of the identities assigned the `Virtual Machine Administrator Login` role from step 4 have `Status` set to `disabled`. +8. For `Conditional Access`: + a) Under `Manage`, click `Security`. + b) Under `Protect`, click `Conditional Access`. + c) Ensure that none of the identities assigned the `Virtual Machine Administrator Login` role from step 4 are exempt from a Conditional Access policy requiring MFA for all users. + +## Expected Result + +All identities with the `Virtual Machine Administrator Login` role should have MFA enabled, either through per-user MFA or Conditional Access policies. No identities with VM admin access should be exempt from MFA requirements. + +## Remediation + +### Remediate from Azure Portal + +1. Log in to the Azure portal. +2. This can be remediated by enabling MFA for user, Removing user access or Reducing access of managed identities attached to virtual machines. + +Case I: Enable MFA for users having access on virtual machines. + +1. Go to `Microsoft Entra ID`. +2. For `Per-user MFA`: + 1. Under `Manage`, click `Users`. + 2. Click `Per-user MFA`. + 3. For each user requiring remediation, check the box next to their name. + 4. Click `Enable MFA`. + 5. Click `Enable`. +3. For `Conditional Access`: + 1. Under `Manage`, click `Security`. + 2. Under `Protect`, click `Conditional Access`. + 3. Update the Conditional Access policy requiring MFA for all users, removing each user requiring remediation from the `Exclude` list. + +Case II: Removing user access on a virtual machine. + +1. Select the `Subscription`, then click on `Access control (IAM)`. +2. Select `Role assignments` and search for `Virtual Machine Administrator Login` or `Virtual Machine User Login` or any role that provides access to log into virtual machines. +3. Click on `Role Name`, Select `Assignments`, and remove identities with no MFA configured. + +Case III: Reducing access of managed identities attached to virtual machines. + +1. Select the `Subscription`, then click on `Access control (IAM)`. +2. Select `Role Assignments` from the top menu and apply filters on `Assignment type` as `Privileged administrator roles` and `Type` as `Virtual Machines`. +3. Click on `Role Name`, Select `Assignments`, and remove identities access make sure this follows the least privileges principal. + +## Default Value + +By default, MFA is not enforced for Virtual Machine Administrator Login role assignments. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-userstates +2. https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#virtual-machine-administrator-login + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.5 Require MFA for Administrative Access | x | x | x | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1078.002, T1078.004 | | | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.1.1/SKILL.md new file mode 100644 index 0000000000..f0bf4cf421 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.1.1/SKILL.md @@ -0,0 +1,116 @@ +--- +name: cis-azure-foundations-5.1.1 +description: "Ensure 'security defaults' is enabled in Microsoft Entra ID" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, mfa] +cis_id: "5.1.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.1.2, cis-azure-foundations-5.1.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'security defaults' is enabled in Microsoft Entra ID + +## Description + +[IMPORTANT - Please read the section overview: If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, F5, or Business Premium, and EM&S E3 or E5 licenses) and CAN use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.] + +Security defaults in Microsoft Entra ID make it easier to be secure and help protect your organization. Security defaults contain preconfigured security settings for common attacks. + +Security defaults is available to everyone. The goal is to ensure that all organizations have a basic level of security enabled at no extra cost. You may turn on security defaults in the Azure portal. + +## Rationale + +Security defaults provide secure default settings that we manage on behalf of organizations to keep customers safe until they are ready to manage their own identity security settings. + +For example, doing the following: + +- Requiring all users and admins to register for MFA. +- Challenging users with MFA - when necessary, based on factors such as location, device, role, and task. +- Disabling authentication from legacy authentication clients, which cannot do MFA. + +## Impact + +This recommendation should be implemented initially and then may be overridden by other service/product specific CIS Benchmarks. Administrators should also be aware that certain configurations in Microsoft Entra ID may impact other Microsoft services such as Microsoft 365. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Browse to `Microsoft Entra ID` > `Properties`. +3. Select `Manage security defaults`. +4. Under `Security defaults`, verify that `Enabled (recommended)` is selected. + +### Using PowerShell + +```powershell +Connect-MgGraph -Scopes "Policy.Read.All" +(Get-MgPolicyIdentitySecurityDefaultEnforcementPolicy).IsEnabled +``` + +Returned value should be `true`. + +### Using Azure CLI + +```bash +az login +az rest --method get --url 'https://graph.microsoft.com/v1.0/policies/identitySecurityDefaultsEnforcementPolicy' --query "isEnabled" +``` + +Returned value should be `true`. + +## Expected Result + +Security defaults should be enabled (IsEnabled = true). The Azure Portal should show `Enabled (recommended)` selected under Security defaults. + +## Remediation + +### Remediate from Azure Portal + +1. From Azure Home select the Portal Menu. +2. Browse to `Microsoft Entra ID` > `Properties`. +3. Select `Manage security defaults`. +4. Under `Security defaults`, select `Enabled (recommended)`. +5. Select `Save`. + +### Remediate from PowerShell + +```powershell +Connect-MgGraph -Scopes "Policy.ReadWrite.ApplicationConfiguration" +Update-MgPolicyIdentitySecurityDefaultEnforcementPolicy -IsEnabled $true +(Get-MgPolicyIdentitySecurityDefaultEnforcementPolicy).IsEnabled +``` + +### Remediate from Azure CLI + +```bash +az rest --method patch --url 'https://graph.microsoft.com/v1.0/policies/identitySecurityDefaultsEnforcementPolicy' --body '{"isEnabled":true}' +az rest --method get --url 'https://graph.microsoft.com/v1.0/policies/identitySecurityDefaultsEnforcementPolicy' --query "isEnabled" +``` + +## Default Value + +If your tenant was created on or after October 22, 2019, security defaults may already be enabled in your tenant. + +## References + +1. https://learn.microsoft.com/en-us/entra/fundamentals/security-defaults +2. https://techcommunity.microsoft.com/t5/azure-active-directory-identity/introducing-security-defaults/ba-p/1061414 +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-2-protect-identity-and-authentication-systems + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 4.1 Establish and Maintain a Secure Configuration Process | x | x | x | +| v7 | 5.1 Establish Secure Configurations | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.1.2/SKILL.md new file mode 100644 index 0000000000..95a9dbcf6f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.1.2/SKILL.md @@ -0,0 +1,92 @@ +--- +name: cis-azure-foundations-5.1.2 +description: "Ensure 'multifactor authentication' is 'enabled' for all users" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, mfa] +cis_id: "5.1.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.1.1, cis-azure-foundations-5.1.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'multifactor authentication' is 'enabled' for all users + +## Description + +[IMPORTANT - Please read the section overview: If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, F5, or Business Premium, and EM&S E3 or E5 licenses) and CAN use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.] + +Enable multifactor authentication for all users. + +Note: Since 2024, Azure has been rolling out mandatory multifactor authentication. For more information: + +- https://azure.microsoft.com/en-us/blog/announcing-mandatory-multi-factor-authentication-for-azure-sign-in +- https://learn.microsoft.com/en-us/entra/identity/authentication/concept-mandatory-multifactor-authentication + +## Rationale + +Multifactor authentication requires an individual to present a minimum of two separate forms of authentication before access is granted. Multifactor authentication provides additional assurance that the individual attempting to gain access is who they claim to be. With multifactor authentication, an attacker would need to compromise at least two different authentication mechanisms, increasing the difficulty of compromise and thus reducing the risk. + +## Impact + +Users would require two forms of authentication before any access is granted. Additional administrative time will be required for managing dual forms of authentication when enabling multifactor authentication. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Under `Manage`, click `Users`. +3. Click `Per-user MFA` from the top menu. +4. Ensure that `Status` is `enabled` for all users. + +### Using PowerShell + +```powershell +get-mguser -All | where {$_.StrongAuthenticationMethods.Count -eq 0} | Select-Object -Property UserPrincipalName +``` + +If the output contains any `UserPrincipalName`, then this recommendation is non-compliant. + +## Expected Result + +All users should have MFA enabled. The PowerShell command should return no results (no users without strong authentication methods). + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Under `Manage`, click `Users`. +3. Click `Per-user MFA` from the top menu. +4. Click the box next to a user with `Status disabled`. +5. Click `Enable MFA`. +6. Click `Enable`. +7. Repeat steps 1-6 for each user requiring remediation. + +## Default Value + +Multifactor authentication is not enabled for all users by default. Starting in 2024, multifactor authentication is enabled for administrative accounts by default. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-mfa-howitworks +2. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-mandatory-multifactor-authentication +3. https://azure.microsoft.com/en-us/blog/announcing-mandatory-multi-factor-authentication-for-azure-sign-in/ +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-4-authenticate-server-and-services + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v8 | 6.4 Require MFA for Remote Network Access | x | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.1.3/SKILL.md new file mode 100644 index 0000000000..e605254f9b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.1.3/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-foundations-5.1.3 +description: "Ensure 'Allow users to remember multifactor authentication on devices they trust' is disabled" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, mfa] +cis_id: "5.1.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.1.1, cis-azure-foundations-5.1.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Allow users to remember multifactor authentication on devices they trust' is disabled + +## Description + +[IMPORTANT - Please read the section overview: If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, F5, or Business Premium, and EM&S E3 or E5 licenses) and CAN use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.] + +Do not allow users to remember multi-factor authentication on devices. + +## Rationale + +Remembering Multi-Factor Authentication (MFA) for devices and browsers allows users to have the option to bypass MFA for a set number of days after performing a successful sign-in using MFA. This can enhance usability by minimizing the number of times a user may need to perform two-step verification on the same device. However, if an account or device is compromised, remembering MFA for trusted devices may affect security. Hence, it is recommended that users not be allowed to bypass MFA. + +## Impact + +For every login attempt, the user will be required to perform multi-factor authentication. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, click `Users`. +4. Click the `Per-user MFA` button on the top bar. +5. Click on `Service settings`. +6. Ensure that `Allow users to remember multi-factor authentication on devices they trust` is not enabled. + +## Expected Result + +The `Allow users to remember multi-factor authentication on devices they trust` checkbox should be unchecked/disabled. + +## Remediation + +### Remediate from Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, click `Users`. +4. Click the `Per-user MFA` button on the top bar. +5. Click on `Service settings`. +6. Uncheck the box next to `Allow users to remember multi-factor authentication on devices they trust`. +7. Click `Save`. + +## Default Value + +By default, `Allow users to remember multi-factor authentication on devices they trust` is disabled. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-mfasettings#remember-multi-factor-authentication-for-devices-that-users-trust +2. https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-identity-management#im-4-use-strong-authentication-controls-for-all-azure-active-directory-based-access +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-6-use-strong-authentication-controls + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v8 | 6.4 Require MFA for Remote Network Access | x | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.10/SKILL.md new file mode 100644 index 0000000000..1fda812244 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.10/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-azure-foundations-5.10 +description: "Ensure 'Notify users on password resets?' is set to 'Yes'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, password-reset, notifications, monitoring] +cis_id: "5.10" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.11, cis-azure-foundations-5.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Notify users on password resets?' is set to 'Yes' + +## Description + +Ensure that users are notified on their primary and alternate emails on password resets. + +## Rationale + +User notification on password reset is a proactive way of confirming password reset activity. It helps the user to recognize unauthorized password reset activities. + +## Impact + +Users will receive emails alerting them to password changes to both their primary and alternate emails. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `Password reset` +5. Under `Manage`, select `Notifications` +6. Ensure that `Notify users on password resets?` is set to `Yes` + +## Expected Result + +`Notify users on password resets?` should be set to `Yes`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `Password reset` +5. Under `Manage`, select `Notifications` +6. Set `Notify users on password resets?` to `Yes` +7. Click `Save` + +## Default Value + +By default, `Notify users on password resets?` is set to "Yes". + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/tutorial-enable-sspr#set-up-notifications-and-customizations +2. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-sspr-howitworks#notifications +3. https://support.microsoft.com/en-us/account-billing/reset-your-work-or-school-password-using-security-info-23dde81f-08bb-4776-ba72-e6b72b9dda9e +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control | | x | x | +| v7 | 16.2 Configure Centralized Point of Authentication | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.11/SKILL.md new file mode 100644 index 0000000000..4ff7c6b383 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.11/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-foundations-5.11 +description: "Ensure 'Notify all admins when other admins reset their password?' is set to 'Yes'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, password-reset, admin-notification, monitoring] +cis_id: "5.11" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.10, cis-azure-foundations-5.26] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Notify all admins when other admins reset their password?' is set to 'Yes' + +## Description + +Ensure that all Global Administrators are notified if any other administrator resets their password. + +## Rationale + +Administrator accounts are sensitive. Any password reset activity notification, when sent to all Administrators, ensures that all Global Administrators can passively confirm if such a reset is a common pattern within their group. For example, if all Administrators change their password every 30 days, any password reset activity before that may require administrator(s) to evaluate any unusual activity and confirm its origin. + +## Impact + +All Global Administrators will receive a notification from Azure every time a password is reset. This is useful for auditing procedures to confirm that there are no out of the ordinary password resets for Administrators. There is additional overhead, however, in the time required for Global Administrators to audit the notifications. This setting is only useful if all Global Administrators pay attention to the notifications and audit each one. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `Password reset` +5. Under `Manage`, select `Notifications` +6. Ensure that `Notify all admins when other admins reset their password?` is set to `Yes` + +## Expected Result + +`Notify all admins when other admins reset their password?` should be set to `Yes`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `Password reset` +5. Under `Manage`, select `Notifications` +6. Set `Notify all admins when other admins reset their password?` to `Yes` +7. Click `Save` + +## Default Value + +By default, `Notify all admins when other admins reset their password?` is set to "No". + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-sspr-howitworks#notifications +2. https://support.microsoft.com/en-us/account-billing/reset-your-work-or-school-password-using-security-info-23dde81f-08bb-4776-ba72-e6b72b9dda9e +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +5. https://learn.microsoft.com/en-us/entra/identity/authentication/tutorial-enable-sspr#set-up-notifications-and-customizations + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v8 | 6.7 Centralize Access Control | | x | x | +| v7 | 4.8 Log and Alert on Changes to Administrative Group Membership | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.12/SKILL.md new file mode 100644 index 0000000000..6d22ae84b3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.12/SKILL.md @@ -0,0 +1,88 @@ +--- +name: cis-azure-foundations-5.12 +description: "Ensure 'User consent for applications' is set to 'Do not allow user consent'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, application-consent, enterprise-apps, permissions] +cis_id: "5.12" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.13, cis-azure-foundations-5.14] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'User consent for applications' is set to 'Do not allow user consent' + +## Description + +Require administrators to provide consent for applications before use. + +## Rationale + +If Microsoft Entra ID is running as an identity provider for third-party applications, permissions and consent should be limited to administrators or pre-approved. Malicious applications may attempt to exfiltrate data or abuse privileged user accounts. + +## Impact + +Enforcing this setting may create additional requests that administrators need to review. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Enterprise applications` +4. Under `Security`, select `Consent and permissions` +5. Under `Manage`, select `User consent settings` +6. Ensure `User consent for applications` is set to `Do not allow user consent` + +### Using PowerShell + +```powershell +Connect-MgGraph +(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | Select-Object -ExpandProperty PermissionGrantPoliciesAssigned +``` + +If the command returns no values in response, the configuration complies with the recommendation. + +## Expected Result + +`User consent for applications` should be set to `Do not allow user consent`. The PowerShell command should return no values. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Enterprise applications` +4. Under `Security`, select `Consent and permissions` +5. Under `Manage`, select `User consent settings` +6. Set `User consent for applications` to `Do not allow user consent` +7. Click `Save` + +## Default Value + +By default, `Users consent for applications` is set to `Allow user consent for apps`. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/configure-user-consent?pivots=ms-powershell#configure-user-consent-to-applications +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------- | ---- | ---- | ---- | +| v8 | 2.3 Address Unauthorized Software | x | x | x | +| v8 | 6.1 Establish an Access Granting Process | x | x | x | +| v7 | 2.6 Address unapproved software | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.13/SKILL.md new file mode 100644 index 0000000000..7d36413500 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.13/SKILL.md @@ -0,0 +1,90 @@ +--- +name: cis-azure-foundations-5.13 +description: "Ensure 'User consent for applications' is set to 'Allow user consent for apps from verified publishers, for selected permissions'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, application-consent, verified-publishers, permissions] +cis_id: "5.13" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.12, cis-azure-foundations-5.14] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'User consent for applications' is set to 'Allow user consent for apps from verified publishers, for selected permissions' + +## Description + +Allow users to provide consent for selected permissions when a request is coming from a verified publisher. + +## Rationale + +If Microsoft Entra ID is running as an identity provider for third-party applications, permissions and consent should be limited to administrators or pre-approved. Malicious applications may attempt to exfiltrate data or abuse privileged user accounts. + +## Impact + +Enforcing this setting may create additional requests that administrators need to review. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Enterprise applications` +4. Under `Security`, select `Consent and permissions` +5. Under `Manage`, select `User consent settings` +6. Under `User consent for applications`, ensure `Allow user consent for apps from verified publishers, for selected permissions` is selected + +### Using PowerShell + +```powershell +Connect-MgGraph +(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | Select-Object -ExpandProperty PermissionGrantPoliciesAssigned +``` + +The command should return either `ManagePermissionGrantsForSelf.microsoft-user-default-low` or a custom app consent policy id if one is in use. + +## Expected Result + +`User consent for applications` should be set to `Allow user consent for apps from verified publishers, for selected permissions`. PowerShell should return `ManagePermissionGrantsForSelf.microsoft-user-default-low`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Enterprise applications` +4. Under `Security`, select `Consent and permissions` +5. Under `Manage`, select `User consent settings` +6. Under `User consent for applications`, select `Allow user consent for apps from verified publishers, for selected permissions` +7. Click `Save` + +## Default Value + +By default, `User consent for applications` is set to `Allow user consent for apps`. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/configure-user-consent?pivots=ms-graph#configure-user-consent-to-applications +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +5. https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.signins/get-mgpolicyauthorizationpolicy?view=graph-powershell-1.0 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------ | ---- | ---- | ---- | +| v8 | 2.3 Address Unauthorized Software | x | x | x | +| v8 | 2.5 Allowlist Authorized Software | | x | x | +| v7 | 2.6 Address unapproved software | x | x | x | +| v7 | 2.7 Utilize Application Whitelisting | | | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.14/SKILL.md new file mode 100644 index 0000000000..b39b8049fd --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.14/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-azure-foundations-5.14 +description: "Ensure 'Users can register applications' is set to 'No'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, application-registration, access-control, least-privilege] +cis_id: "5.14" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.12, cis-azure-foundations-5.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Users can register applications' is set to 'No' + +## Description + +Require administrators or appropriately delegated users to register third-party applications. + +## Rationale + +It is recommended to only allow an administrator to register custom-developed applications. This ensures that the application undergoes a formal security review and approval process prior to exposing Microsoft Entra ID data. Certain users like developers or other high-request users may also be delegated permissions to prevent them from waiting on an administrative user. Your organization should review your policies and decide your needs. + +## Impact + +Enforcing this setting will create additional requests for approval that will need to be addressed by an administrator. If permissions are delegated, a user may approve a malevolent third party application, potentially giving it access to your data. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `User settings` +5. Ensure that `Users can register applications` is set to `No` + +### Using PowerShell + +```powershell +(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | Format-List AllowedToCreateApps +``` + +Command should return the value of `False`. + +## Expected Result + +`Users can register applications` should be set to `No`. PowerShell should return `AllowedToCreateApps: False`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `User settings` +5. Set `Users can register applications` to `No` +6. Click `Save` + +### Using PowerShell + +```powershell +$param = @{ AllowedToCreateApps = "$false" } +Update-MgPolicyAuthorizationPolicy -DefaultUserRolePermissions $param +``` + +## Default Value + +By default, `Users can register applications` is set to "Yes". + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/delegate-app-roles#restrict-who-can-create-applications +2. https://learn.microsoft.com/en-us/entra/identity-platform/how-applications-are-added#who-has-permission-to-add-applications-to-my-azure-ad-instance +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +5. https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.signins/get-mgpolicyauthorizationpolicy?view=graph-powershell-1.0 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.3 Address Unauthorized Software | x | x | x | +| v8 | 2.4 Utilize Automated Software Inventory Tools | | x | x | +| v8 | 6.7 Centralize Access Control | | x | x | +| v7 | 2.6 Address unapproved software | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.15/SKILL.md new file mode 100644 index 0000000000..ed3b9153f2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.15/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-azure-foundations-5.15 +description: "Ensure 'Guest users access restrictions' is set to 'Guest user access is restricted to properties and memberships of their own directory objects'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, guest-access, external-identities, least-privilege] +cis_id: "5.15" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.16] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Guest users access restrictions' is set to 'Guest user access is restricted to properties and memberships of their own directory objects' + +## Description + +Limit guest user permissions. + +## Rationale + +Limiting guest access ensures that guest accounts do not have permission for certain directory tasks, such as enumerating users, groups or other directory resources, and cannot be assigned to administrative roles in your directory. Guest access has three levels of restriction: + +1. Guest users have the same access as members (most inclusive), +2. Guest users have limited access to properties and memberships of directory objects (default value), +3. Guest user access is restricted to properties and memberships of their own directory objects (most restrictive). + +The recommended option is the 3rd, most restrictive: "Guest user access is restricted to their own directory object". + +## Impact + +This may create additional requests for permissions to access resources that administrators will need to approve. Some services (Forms, Project, Yammer, Planner in SharePoint) without current support might have compatibility issues with the new guest restriction setting. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `External Identities` +4. Select `External collaboration settings` +5. Under `Guest user access`, ensure that `Guest user access restrictions` is set to `Guest user access is restricted to properties and memberships of their own directory objects` + +### Using PowerShell + +```powershell +Connect-MgGraph +(Get-MgPolicyAuthorizationPolicy).GuestUserRoleId +``` + +If the `GuestUserRoleId` property does not equal `2af84b1e-32c8-42b7-82bc-daa82404023b` then it is not set to most restrictive. + +## Expected Result + +`Guest user access restrictions` should be set to `Guest user access is restricted to properties and memberships of their own directory objects`. The `GuestUserRoleId` should equal `2af84b1e-32c8-42b7-82bc-daa82404023b`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `External Identities` +4. Select `External collaboration settings` +5. Under `Guest user access`, set `Guest user access restrictions` to `Guest user access is restricted to properties and memberships of their own directory objects` +6. Click `Save` + +### Using PowerShell + +```powershell +Update-MgPolicyAuthorizationPolicy -GuestUserRoleId "2af84b1e-32c8-42b7-82bc-daa82404023b" +``` + +Verify by running: + +```powershell +(Get-MgPolicyAuthorizationPolicy).GuestUserRoleId +``` + +Ensure that the GuestUserRoleId is equal to `2af84b1e-32c8-42b7-82bc-daa82404023b`. + +## Default Value + +By default, `Guest users access restrictions` is set to `Guest users have limited access to properties and memberships of directory objects`. + +## References + +1. https://learn.microsoft.com/en-us/entra/fundamentals/users-default-permissions#member-and-guest-users +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +5. https://learn.microsoft.com/en-us/entra/identity/users/users-restrict-guest-permissions + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.16/SKILL.md new file mode 100644 index 0000000000..f1959fa226 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.16/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-azure-foundations-5.16 +description: "Ensure 'Guest invite restrictions' is set to 'Only users assigned to specific admin roles can invite guest users' or 'No one in the organization can invite guest users'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, guest-invitations, external-identities, access-control] +cis_id: "5.16" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.15] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Guest invite restrictions' is set to 'Only users assigned to specific admin roles can invite guest users' or 'No one in the organization can invite guest users' + +## Description + +Restrict invitations to either users with specific administrative roles or no one. + +## Rationale + +Restricting invitations to users with specific administrator roles ensures that only authorized accounts have access to cloud resources. This helps to maintain "Need to Know" permissions and prevents inadvertent access to data. + +By default the setting `Guest invite restrictions` is set to `Anyone in the organization can invite guest users including guests and non-admins`. This would allow anyone within the organization to invite guests and non-admins to the tenant, posing a security risk. + +## Impact + +With the option of `Only users assigned to specific admin roles can invite guest users` selected, users with specific admin roles will be in charge of sending invitations to the external users, requiring additional overhead by them to manage user accounts. This will mean coordinating with other departments as they are onboarding new users. + +## Audit Procedure + +This setting has 4 levels of restriction: + +- Anyone in the organization can invite guest users including guests and non-admins (most inclusive), +- Member users and users assigned to specific admin roles can invite guest users including guests with member permissions, +- Only users assigned to specific admin roles can invite guest users, +- No one in the organization can invite guest users including admins (most restrictive). + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `External Identities` +4. Select `External collaboration settings` +5. Under `Guest invite settings`, ensure that `Guest invite restrictions` is set to either `Only users assigned to specific admin roles can invite guest users` or `No one in the organization [...]` + +### Using PowerShell + +```powershell +Connect-MgGraph +(Get-MgPolicyAuthorizationPolicy).AllowInvitesFrom +``` + +If the resulting value is `adminsAndGuestInviters` or `none` the configuration complies. + +## Expected Result + +`Guest invite restrictions` should be set to `Only users assigned to specific admin roles can invite guest users` or `No one in the organization can invite guest users including admins`. PowerShell should return `adminsAndGuestInviters` or `none`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `External Identities` +4. Select `External collaboration settings` +5. Under `Guest invite settings`, set `Guest invite restrictions` to either `Only users assigned to specific admin roles can invite guest users` or `No one in the organization [...]` +6. Click `Save` + +### Using PowerShell + +```powershell +Connect-MgGraph +Update-MgPolicyAuthorizationPolicy -AllowInvitesFrom "adminsAndGuestInviters" +``` + +Alternatively, to set this to the most restrictive `No one in the organization [...]`: + +```powershell +Connect-MgGraph +Update-MgPolicyAuthorizationPolicy -AllowInvitesFrom "none" +``` + +## Default Value + +By default, `Guest invite restrictions` is set to `Anyone in the organization can invite guest users including guests and non-admins`. + +## References + +1. https://learn.microsoft.com/en-us/entra/external-id/external-collaboration-settings-configure +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements +5. https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.signins/update-mgpolicyauthorizationpolicy?view=graph-powershell-1.0 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.1 Establish an Access Granting Process | x | x | x | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 16.2 Configure Centralized Point of Authentication | | x | x | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.17/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.17/SKILL.md new file mode 100644 index 0000000000..d9ea4dd833 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.17/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-azure-foundations-5.17 +description: "Ensure 'Restrict access to Microsoft Entra admin center' is set to 'Yes'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, admin-center, access-restriction, least-privilege] +cis_id: "5.17" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.4, cis-azure-foundations-5.26] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Restrict access to Microsoft Entra admin center' is set to 'Yes' + +## Description + +Restrict access to the Microsoft Entra ID administration center to administrators only. + +**NOTE**: This only affects access to the Entra ID administrator's web portal. This setting does not prohibit privileged users from using other methods such as Rest API or Powershell to obtain sensitive information from Microsoft Entra ID. + +## Rationale + +The Microsoft Entra ID administrative center has sensitive data and permission settings. All non-administrators should be prohibited from accessing any Microsoft Entra ID data in the administration center to avoid exposure. + +## Impact + +All administrative tasks will need to be done by Administrators, causing additional overhead in management of users and resources. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `User settings` +5. Under `Administration centre`, ensure that `Restrict access to Microsoft Entra admin center` is set to `Yes` + +## Expected Result + +`Restrict access to Microsoft Entra admin center` should be set to `Yes`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `User settings` +5. Under `Administration centre`, set `Restrict access to Microsoft Entra admin center` to `Yes` +6. Click `Save` + +## Default Value + +By default, `Restrict access to Microsoft Entra admin center` is set to `No`. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.18/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.18/SKILL.md new file mode 100644 index 0000000000..a86a1efcc0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.18/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-azure-foundations-5.18 +description: "Ensure 'Restrict user ability to access groups features in My Groups' is set to 'Yes'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, groups, self-service, access-control] +cis_id: "5.18" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.19, cis-azure-foundations-5.20, cis-azure-foundations-5.21] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Restrict user ability to access groups features in My Groups' is set to 'Yes' + +## Description + +Restrict access to group web interface in the Access Panel portal. + +## Rationale + +Self-service group management enables users to create and manage security groups or Office 365 groups in Microsoft Entra ID. Unless a business requires this day-to-day delegation for some users, self-service group management should be disabled. Any user can access the Access Panel, where they can reset their passwords, view their information, etc. By default, users are also allowed to access the Group feature, which shows groups, members, related resources (SharePoint URL, Group email address, Yammer URL, and Teams URL). By setting this feature to 'Yes', users will no longer have access to the web interface, but still have access to the data using the API. This is useful to prevent non-technical users from enumerating groups-related information, but technical users will still be able to access this information using APIs. + +## Impact + +Setting to `Yes` could create administrative overhead by customers seeking certain group memberships that will have to be manually managed by administrators with appropriate permissions. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Groups` +4. Under `Settings`, select `General` +5. Under `Self Service Group Management`, ensure that `Restrict user ability to access groups features in My Groups` is set to `Yes` + +## Expected Result + +`Restrict user ability to access groups features in My Groups` should be set to `Yes`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Groups` +4. Under `Settings`, select `General` +5. Under `Self Service Group Management`, set `Restrict user ability to access groups features in My Groups` to `Yes` +6. Click `Save` + +## Default Value + +By default, `Restrict user ability to access groups features in the Access Pane` is set to `No`. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/users/groups-self-service-management +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.19/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.19/SKILL.md new file mode 100644 index 0000000000..5e4db78f45 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.19/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-azure-foundations-5.19 +description: "Ensure 'Users can create security groups in Azure portals, API or PowerShell' is set to 'No'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, security-groups, group-creation, least-privilege] +cis_id: "5.19" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.18, cis-azure-foundations-5.21] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Users can create security groups in Azure portals, API or PowerShell' is set to 'No' + +## Description + +Restrict security group creation to administrators only. + +## Rationale + +When creating security groups is enabled, all users in the directory are allowed to create new security groups and add members to those groups. Unless a business requires this day-to-day delegation, security group creation should be restricted to administrators only. + +## Impact + +Enabling this setting could create a number of requests that would need to be managed by an administrator. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Groups` +4. Under `Settings`, select `General` +5. Under `Security Groups`, ensure that `Users can create security groups in Azure portals, API or PowerShell` is set to `No` + +## Expected Result + +`Users can create security groups in Azure portals, API or PowerShell` should be set to `No`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Groups` +4. Under `Settings`, select `General` +5. Under `Security Groups`, set `Users can create security groups in Azure portals, API or PowerShell` to `No` +6. Click `Save` + +## Default Value + +By default, `Users can create security groups in Azure portals, API or PowerShell` is set to `Yes`. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/users/groups-self-service-management#making-a-group-available-for-end-user-self-service +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.1/SKILL.md new file mode 100644 index 0000000000..c14a35cb1e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.1/SKILL.md @@ -0,0 +1,115 @@ +--- +name: cis-azure-foundations-5.2.1 +description: "Ensure 'trusted locations' are defined" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, conditional-access] +cis_id: "5.2.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.2.2, cis-azure-foundations-5.2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'trusted locations' are defined + +## Description + +Microsoft Entra ID Conditional Access allows an organization to configure `Named locations` and configure whether those locations are trusted or untrusted. These settings provide organizations the means to specify Geographical locations for use in conditional access policies, or define actual IP addresses and IP ranges and whether or not those IP addresses and/or ranges are trusted by the organization. + +## Rationale + +Defining trusted source IP addresses or ranges helps organizations create and enforce Conditional Access policies around those trusted or untrusted IP addresses and ranges. Users authenticating from trusted IP addresses and/or ranges may have less access restrictions or access requirements when compared to users that try to authenticate to Microsoft Entra ID from untrusted locations or untrusted source IP addresses/ranges. + +Note on Assessment Status: Because the determination of entities to be included or excluded is specific and unique to each organization, assessment status for this recommendation is considered 'Manual' even though some elements for automation (CLI, PowerShell) are provided. + +## Impact + +When configuring `Named locations`, the organization can create locations using Geographical location data or by defining source IP addresses or ranges. Configuring `Named locations` using a Country location does not provide the organization the ability to mark those locations as trusted, and any Conditional Access policy relying on those `Countries location` setting will not be able to use the `All trusted locations` setting within the Conditional Access policy. They instead will have to rely on the `Select locations` setting. This may add additional resource requirements when configuring and will require thorough organizational testing. + +In general, Conditional Access policies may completely prevent users from authenticating to Microsoft Entra ID, and thorough testing is recommended. To avoid complete lockout, a 'Break Glass' account with full Global Administrator rights is recommended in the event all other administrators are locked out of authenticating to Microsoft Entra ID. This 'Break Glass' account should be excluded from Conditional Access Policies and should be configured with the longest pass phrase feasible in addition to a FIDO2 security key or certificate kept in a very secure physical location. This account should only be used in the event of an emergency and complete administrator lockout. + +NOTE: Starting July 2024, Microsoft will begin requiring MFA for All Users - including Break Glass Accounts. Physical FIDO2 security keys, or a certificate kept on secure removable storage can fulfill this MFA requirement. + +## Audit Procedure + +### Using Azure Portal + +1. In the Azure Portal, navigate to `Microsoft Entra ID`. +2. Under `Manage`, click `Security`. +3. Under `Protect`, click `Conditional Access`. +4. Under `Manage`, click `Named locations`. + +Ensure there are `IP ranges location` settings configured and marked as `Trusted`. + +### Using PowerShell + +```powershell +Get-MgIdentityConditionalAccessNamedLocation +``` + +In the output from the above command, for each Named location group, make sure at least one entry contains the `IsTrusted` parameter with a value of `True`. Otherwise, if there is no output as a result of the above command or all of the entries contain the `IsTrusted` parameter with an empty value, a `NULL` value, or a value of `False`, the results are out of compliance with this check. + +## Expected Result + +At least one Named location should exist with `IsTrusted` set to `True`, indicating trusted IP ranges are defined for the organization. + +## Remediation + +### Remediate from Azure Portal + +1. In the Azure Portal, navigate to `Microsoft Entra ID`. +2. Under `Manage`, click `Security`. +3. Under `Protect`, click `Conditional Access`. +4. Under `Manage`, click `Named locations`. +5. Within the `Named locations` blade, click on `IP ranges location`. +6. Enter a name for this location setting in the `Name` text box. +7. Click on the `+` sign. +8. Add an IP Address Range in CIDR notation inside the text box that appears. +9. Click on the `Add` button. +10. Repeat steps 7 through 9 for each IP Range that needs to be added. +11. If the information entered are trusted ranges, select the `Mark as trusted location` check box. +12. Once finished, click on `Create`. + +### Remediate from PowerShell + +Create a new trusted IP-based Named location policy: + +```powershell +[System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]]$ipRanges = @() +$ipRanges.Add("") +$ipRanges.Add("") +$ipRanges.Add("") +New-MgIdentityConditionalAccessNamedLocation -dataType "#microsoft.graph.ipNamedLocation" -DisplayName "" -IsTrusted $true -IpRanges $ipRanges +``` + +Set an existing IP-based Named location policy to trusted: + +```powershell +Update-MgIdentityConditionalAccessNamedLocation -PolicyId "" -dataType "#microsoft.graph.ipNamedLocation" -IsTrusted $true +``` + +## Default Value + +By default, no locations are configured under the `Named locations` blade within the Microsoft Entra ID Conditional Access blade. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-assignment-network +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-7-restrict-resource-access-based-on--conditions +3. https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/security-emergency-access + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control | | x | x | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v7 | 11.1 Maintain Standard Security Configurations for Network Devices | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.2/SKILL.md new file mode 100644 index 0000000000..864875187b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.2/SKILL.md @@ -0,0 +1,158 @@ +--- +name: cis-azure-foundations-5.2.2 +description: "Ensure an exclusionary geographic Conditional Access policy is considered" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, conditional-access] +cis_id: "5.2.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.2.1, cis-azure-foundations-5.2.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure an exclusionary geographic Conditional Access policy is considered + +## Description + +CAUTION: If these policies are created without first auditing and testing the result, misconfiguration can potentially lock out administrators or create undesired access issues. + +Conditional Access Policies can be used to block access from geographic locations that are deemed out-of-scope for your organization or application. The scope and variables for this policy should be carefully examined and defined. + +## Rationale + +Conditional Access, when used as a deny list for the tenant or subscription, is able to prevent ingress or egress of traffic to countries that are outside of the scope of interest (e.g.: customers, suppliers) or jurisdiction of an organization. This is an effective way to prevent unnecessary and long-lasting exposure to international threats such as APTs. + +Note on Assessment Status: Because the determination of entities to be included or excluded is specific and unique to each organization, assessment status for this recommendation is considered 'Manual' even though some elements for automation (CLI, PowerShell) are provided. + +## Impact + +Microsoft Entra ID P1 or P2 is required. Limiting access geographically will deny access to users that are traveling or working remotely in a different part of the world. A point-to-site or site to site tunnel such as a VPN is recommended to address exceptions to geographic access policies. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home open the Portal menu in the top left, and select `Microsoft Entra ID`. +2. Scroll down in the menu on the left, and select `Security`. +3. Select on the left side `Conditional Access`. +4. Select `Policies`. +5. Select the policy you wish to audit, then: + - Under `Assignments` > `Users`, review the users and groups for the personnel the policy will apply to. + - Under `Assignments` > `Target resources`, review the cloud apps or actions for the systems the policy will apply to. + - Under `Conditions` > `Locations`, Review the `Include` locations for those that should be **blocked**. + - Under `Conditions` > `Locations`, Review the `Exclude` locations for those that should be allowed (Note: locations set up in the previous recommendation for Trusted Location should be in the `Exclude` list.) + - Under `Access Controls` > `Grant` - Confirm that `Block access` is selected. + +### Using Azure CLI + +As of this writing there are no subcommands for Conditional Access Policies within the Azure CLI. + +### Using PowerShell + +```powershell +$conditionalAccessPolicies = Get-MgIdentityConditionalAccessPolicy + +foreach($policy in $conditionalAccessPolicies) {$policy | Select-Object @{N='Policy ID'; E={$policy.id}}, @{N="Included Locations"; E={$policy.Conditions.Locations.IncludeLocations}}, @{N="Excluded Locations"; E={$policy.Conditions.Locations.ExcludeLocations}}, @{N="BuiltIn GrantControls"; E={$policy.GrantControls.BuiltInControls}}} +``` + +Make sure there is at least 1 row in the output of the above PowerShell command that contains `Block` under the `BuiltIn GrantControls` column and location IDs under the `Included Locations` and `Excluded Locations` columns. If not, a policy containing these options has not been created and is considered a finding. + +## Expected Result + +At least one Conditional Access policy should exist with geographic location restrictions configured, blocking access from countries outside the organization's scope and excluding trusted locations. + +## Remediation + +### Remediate from Azure Portal + +Part 1 of 2 - Create the policy and enable it in `Report-only` mode. + +1. From Azure Home open the portal menu in the top left, and select `Microsoft Entra ID`. +2. Scroll down in the menu on the left, and select `Security`. +3. Select on the left side `Conditional Access`. +4. Select `Policies`. +5. Click the `+ New policy` button, then: +6. Provide a name for the policy. +7. Under `Assignments`, select `Users` then: + - Under `Include`, select `All users`. + - Under `Exclude`, check Users and groups and only select emergency access accounts and service accounts (NOTE: Service accounts are excluded here because service accounts are non-interactive and cannot complete MFA). +8. Under `Assignments`, select `Target resources` then: + - Under `Include`, select `All cloud apps`. + - Leave `Exclude` blank unless you have a well defined exception. +9. Under `Conditions`, select `Locations` then: + - Select `Include`, then add entries for locations for those that should be **blocked**. + - Select `Exclude`, then add entries for those that should be allowed (IMPORTANT: Ensure that all Trusted Locations are in the `Exclude` list.) +10. Under `Access Controls`, select `Grant` select `Block Access`. +11. Set `Enable policy` to `Report-only`. +12. Click `Create`. + +Allow some time to pass to ensure the sign-in logs capture relevant conditional access events. These events will need to be reviewed to determine if additional considerations are necessary for your organization (e.g. legitimate locations are being blocked and investigation is needed for exception). + +NOTE: The policy is not yet 'live,' since `Report-only` is being used to audit the effect of the policy. + +Part 2 of 2 - Confirm that the policy is not blocking access that should be granted, then toggle to `On`. + +1. With your policy now in report-only mode, return to the Microsoft Entra blade and click on `Sign-in logs`. +2. Review the recent sign-in events - click an event then review the event details (specifically the `Report-only` tab) to ensure: + - The sign-in event you're reviewing occurred **after** turning on the policy in report-only mode. + - The policy name from step 6 above is listed in the `Policy Name` column. + - The `Result` column for the new policy shows that the policy was `Not applied` (indicating the location origin was not blocked). +3. If the above conditions are present, navigate back to the policy name in Conditional Access and open it. +4. Toggle the policy from `Report-only` to `On`. +5. Click `Save`. + +### Remediate from PowerShell + +First, set up the conditions objects values before updating an existing conditional access policy or before creating a new one. You may need to use additional PowerShell cmdlets such as the `Get-MgIdentityConditionalAccessNamedLocation` which outputs the `Location IDs` for use with conditional access policies. + +```powershell +$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$conditions.Applications.IncludeApplications = <"All" | "Office365" | "app ID" | @("app ID 1", "app ID 2", etc...)> +$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$conditions.Users.IncludeUsers = <"All" | "None" | "GuestsOrExternalUsers" | "Specific User ID" | @("User ID 1", "User ID 2", etc.)> +$conditions.Locations = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition +$conditions.Locations.IncludeLocations = <"Location ID" | @("Location ID 1", "Location ID 2", etc...)> +$conditions.Locations.ExcludeLocations = <"AllTrusted" | "Location ID" | @("Location ID 1", "Location ID 2", etc...)> + +$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$controls._Operator = "OR" +$controls.BuiltInControls = "block" +``` + +Next, update the existing conditional access policy with the condition set options configured with the previous commands: + +```powershell +Update-MgIdentityConditionalAccessPolicy -PolicyId -Conditions $conditions -GrantControls $controls +``` + +To create a new conditional access policy that complies with this best practice, run the following command after creating the condition set above: + +```powershell +New-MgIdentityConditionalAccessPolicy -Name "Policy Name" -State -Conditions $conditions -GrantControls $controls +``` + +## Default Value + +This policy does not exist by default. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-block-by-location +2. https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-report-only +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-7-restrict-resource-access-based-on--conditions + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------ | ---- | ---- | ---- | +| v8 | 6.7 Centralize Access Control | | x | x | +| v7 | 12.1 Maintain an Inventory of Network Boundaries | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.3/SKILL.md new file mode 100644 index 0000000000..e675dbe638 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.3/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-azure-foundations-5.2.3 +description: "Ensure an exclusionary device code flow policy is considered" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, conditional-access] +cis_id: "5.2.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.2.2, cis-azure-foundations-5.2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure an exclusionary device code flow policy is considered + +## Description + +Conditional Access Policies can be used to prevent the Device code authentication flow. Device code flow should be permitted only for users that regularly perform duties that explicitly require the use of Device Code to authenticate, such as utilizing Azure with PowerShell. + +## Rationale + +Attackers use Device code flow in phishing attacks and, if successful, results in the attacker gaining access tokens and refresh tokens which are scoped to "user_impersonation", which can perform any action the user has permission to perform. + +## Impact + +Microsoft Entra ID P1 or P2 is required. + +This policy should be tested using the `Report-only mode` before implementation. Without a full and careful understanding of the accounts and personnel who require Device code authentication flow, implementing this policy can block authentication for users and devices who rely on Device code flow. For users and devices that rely on device code flow authentication, more secure alternatives should be implemented wherever possible. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home open the Portal menu in the top left and select `Microsoft Entra ID`. +2. Scroll down in the menu on the left and select `Security`. +3. Select on the left side `Conditional Access`. +4. Select `Policies`. +5. Select the policy you wish to audit, then: + - Under `Assignments` > `Users`, review the users and groups for the personnel the policy will apply to. + - Under `Assignments` > `Target resources`, review the cloud apps or actions for the systems the policy will apply to. + - Under `Conditions` > `Authentication Flows`, review the configuration to ensure `Device code flow` is selected. + - Under `Access Controls` > `Grant` - Confirm that `Block access` is selected. + +## Expected Result + +At least one Conditional Access policy should exist that blocks the Device code authentication flow, targeting all users with appropriate exclusions for emergency access accounts. + +## Remediation + +### Remediate from Azure Portal + +Part 1 of 2 - Create the policy and enable it in `Report-only` mode. + +1. From Azure Home open the portal menu in the top left and select `Microsoft Entra ID`. +2. Scroll down in the menu on the left and select `Security`. +3. Select on the left side `Conditional Access`. +4. Select `Policies`. +5. Click the `+ New policy` button, then: +6. Provide a name for the policy. +7. Under `Assignments`, select `Users` then: + - Under `Include`, select `All users`. + - Under `Exclude`, check Users and groups and only select emergency access accounts. +8. Under `Assignments`, select `Target resources` then: + - Under `Include`, select `All cloud apps`. + - Leave `Exclude` blank unless you have a well defined exception. +9. Under `Conditions` > `Authentication Flows`, set Configure to `Yes` then: + - Select `Device code flow`. + - Select `Done`. +10. Under `Access Controls` > `Grant`, select `Block Access`. +11. Set `Enable policy` to `Report-only`. +12. Click `Create`. + +Allow some time to pass to ensure the sign-in logs capture relevant conditional access events. These events will need to be reviewed to determine if additional considerations are necessary for your organization (e.g. many legitimate use cases of device code authentication are observed). + +NOTE: The policy is not yet 'live,' since `Report-only` is being used to audit the effect of the policy. + +Part 2 of 2 - Confirm that the policy is not blocking access that should be granted, then toggle to `On`. + +1. With your policy now in report-only mode, return to the Microsoft Entra blade and click on `Sign-in logs`. +2. Review the recent sign-in events - click an event then review the event details (specifically the `Report-only` tab) to ensure: + - The sign-in event you're reviewing occurred **after** turning on the policy in report-only mode. + - The policy name from step 6 above is listed in the `Policy Name` column. + - The `Result` column for the new policy shows that the policy was `Not applied` (indicating the device code authentication flow was not blocked). +3. If the above conditions are present, navigate back to the policy name in Conditional Access and open it. +4. Toggle the policy from `Report-only` to `On`. +5. Click `Save`. + +## Default Value + +This policy does not exist by default. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-authentication-flows#device-code-flow +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-7-restrict-resource-access-based-on--conditions +3. https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-report-only +4. https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-block-authentication-flows + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.1 Establish an Access Granting Process | x | x | x | +| v7 | 12.4 Deny Communication over Unauthorized Ports | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.4/SKILL.md new file mode 100644 index 0000000000..b5ac78fe6f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.4/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-azure-foundations-5.2.4 +description: "Ensure a multifactor authentication policy exists for all users" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, conditional-access] +cis_id: "5.2.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.2.5, cis-azure-foundations-5.2.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure a multifactor authentication policy exists for all users + +## Description + +A Conditional Access policy can be enabled to ensure that users are required to use Multifactor Authentication (MFA) to login. + +Note: Since 2024, Azure has been rolling out mandatory multifactor authentication. For more information: + +- https://azure.microsoft.com/en-us/blog/announcing-mandatory-multi-factor-authentication-for-azure-sign-in +- https://learn.microsoft.com/en-us/entra/identity/authentication/concept-mandatory-multifactor-authentication + +## Rationale + +Multifactor authentication is strongly recommended to increase the confidence that a claimed identity can be proven to be the subject of the identity. This results in a stronger authentication chain and reduced likelihood of exploitation. + +## Impact + +There is an increased cost associated with Conditional Access policies because of the requirement of Microsoft Entra ID P1 or P2 licenses. Additional support overhead may also need to be considered. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home open the Portal Menu in the top left, and select `Microsoft Entra ID`. +2. Scroll down in the menu on the left, and select `Security`. +3. Select on the left side `Conditional Access`. +4. Select `Policies`. +5. Select the policy you wish to audit. +6. Click the blue text under `Users`. +7. Under `Include` ensure that `All Users` is specified. +8. Under `Exclude` ensure that no users or groups are specified. If there are users or groups specified for exclusion, a very strong justification should exist for each exception, and all excepted account-level objects should be recorded in documentation along with the justification for comparison in future audits. + +## Expected Result + +A Conditional Access policy should exist that requires MFA for all users, targeting all cloud apps, with the Grant control set to `Require multifactor authentication`. + +## Remediation + +### Remediate from Azure Portal + +1. From Azure Home open Portal menu in the top left, and select `Microsoft Entra ID`. +2. Select `Security`. +3. Select `Conditional Access`. +4. Select `Policies`. +5. Click `+ New policy`. +6. Enter a name for the policy. +7. Click the blue text under `Users`. +8. Under `Include`, select `All users`. +9. Under `Exclude`, check `Users and groups`. +10. Select users this policy should not apply to and click `Select`. +11. Click the blue text under `Target resources`. +12. Select `All cloud apps`. +13. Click the blue text under `Grant`. +14. Under `Grant access`, check `Require multifactor authentication` and click `Select`. +15. Set `Enable policy` to `Report-only`. +16. Click `Create`. + +After testing the policy in report-only mode, update the `Enable policy` setting from `Report-only` to `On`. + +## Default Value + +Starting October 2024, MFA will be required for all accounts by default. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-all-users-mfa-strength +2. https://learn.microsoft.com/en-us/entra/identity/conditional-access/troubleshoot-conditional-access-what-if +3. https://learn.microsoft.com/en-us/entra/identity/conditional-access/howto-conditional-access-insights-reporting +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-7-restrict-resource-access-based-on--conditions + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v8 | 6.4 Require MFA for Remote Network Access | x | x | x | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.5/SKILL.md new file mode 100644 index 0000000000..44606cb163 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.5/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-azure-foundations-5.2.5 +description: "Ensure multifactor authentication is required for risky sign-ins" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, conditional-access] +cis_id: "5.2.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.2.4, cis-azure-foundations-5.2.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure multifactor authentication is required for risky sign-ins + +## Description + +Entra ID tracks the behavior of sign-in events. If the Entra ID domain is licensed with P2, the sign-in behavior can be used as a detection mechanism for additional scrutiny during the sign-in event. If this policy is set up, then Risky Sign-in events will prompt users to use multi-factor authentication (MFA) tokens on login for additional verification. + +## Rationale + +Enabling multi-factor authentication is a recommended setting to limit the potential of accounts being compromised and limiting access to authenticated personnel. Enabling this policy allows Entra ID's risk-detection mechanisms to force additional scrutiny on the login event, providing a deterrent response to potentially malicious sign-in events, and adding an additional authentication layer as a reaction to potentially malicious behavior. + +## Impact + +Risk Policies for Conditional Access require Microsoft Entra ID P2. Additional overhead to support or maintain these policies may also be required if users lose access to their MFA tokens. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu in the top left and select `Microsoft Entra ID`. +2. Select `Security`. +3. Select on the left side `Conditional Access`. +4. Select `Policies`. +5. Select the policy you wish to audit. +6. Click the blue text under `Users`. +7. View under `Include` the corresponding users and groups to whom the policy is applied. +8. View under `Exclude` to determine which users and groups to whom the policy is not applied. + +## Expected Result + +A Conditional Access policy should exist that requires MFA for risky sign-ins, targeting all users with all cloud apps, with sign-in risk conditions set to High and Medium, and the Grant control set to `Require multifactor authentication` with sign-in frequency set to `Every time`. + +## Remediation + +### Remediate from Azure Portal + +1. From Azure Home select the Portal Menu in the top left and select `Microsoft Entra ID`. +2. Select `Security`. +3. Select `Conditional Access`. +4. Select `Policies`. +5. Click `+ New policy`. +6. Enter a name for the policy. +7. Click the blue text under `Users`. +8. Under `Include`, select `All users`. +9. Under `Exclude`, check `Users and groups`. +10. Select users this policy should not apply to and click `Select`. +11. Click the blue text under `Target resources`. +12. Select `All cloud apps`. +13. Click the blue text under `Conditions`. +14. Select `Sign-in risk`. +15. Update the `Configure` toggle to `Yes`. +16. Check the sign-in risk level this policy should apply to, e.g. `High` and `Medium`. +17. Select `Done`. +18. Click the blue text under `Grant` and check `Require multifactor authentication` then click the `Select` button. +19. Click the blue text under `Session` then check `Sign-in frequency` and select `Every time` and click the `Select` button. +20. Set `Enable policy` to `Report-only`. +21. Click `Create`. + +After testing the policy in report-only mode, update the `Enable policy` setting from `Report-only` to `On`. + +## Default Value + +MFA is not enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-risk-based-sign-in +2. https://learn.microsoft.com/en-us/entra/identity/conditional-access/troubleshoot-conditional-access-what-if +3. https://learn.microsoft.com/en-us/entra/identity/conditional-access/howto-conditional-access-insights-reporting +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-7-restrict-resource-access-based-on--conditions +5. https://learn.microsoft.com/en-us/entra/id-protection/overview-identity-protection#license-requirements + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v8 | 6.4 Require MFA for Remote Network Access | x | x | x | +| v8 | 6.7 Centralize Access Control | | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.6/SKILL.md new file mode 100644 index 0000000000..2ee5b7c8fe --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.6/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-azure-foundations-5.2.6 +description: "Ensure multifactor authentication is required for Windows Azure Service Management API" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, conditional-access] +cis_id: "5.2.6" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.2.5, cis-azure-foundations-5.2.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure multifactor authentication is required for Windows Azure Service Management API + +## Description + +This recommendation ensures that users accessing the Windows Azure Service Management API (i.e. Azure Powershell, Azure CLI, Azure Resource Manager API, etc.) are required to use multi-factor authentication (MFA) credentials when accessing resources through the Windows Azure Service Management API. + +## Rationale + +Administrative access to the Windows Azure Service Management API should be secured with a higher level of scrutiny to authenticating mechanisms. Enabling multi-factor authentication is recommended to reduce the potential for abuse of Administrative actions, and to prevent intruders or compromised admin credentials from changing administrative settings. + +IMPORTANT: While this recommendation allows exceptions to specific Users or Groups, they should be very carefully tracked and reviewed for necessity on a regular interval through an Access Review process. It is important that this rule be built to include "All Users" to ensure that all users not specifically excepted will be required to use MFA to access the Azure Service Management API. + +## Impact + +Conditional Access policies require Microsoft Entra ID P1 or P2 licenses. Similarly, they may require additional overhead to maintain if users lose access to their MFA. Any users or groups which are granted an exception to this policy should be carefully tracked, be granted only minimal necessary privileges, and conditional access exceptions should be regularly reviewed or investigated. + +## Audit Procedure + +### Using Azure Portal + +1. From the Azure Admin Portal dashboard, open `Microsoft Entra ID`. +2. In the menu on the left of the Entra ID blade, click `Security`. +3. In the menu on the left of the Security blade, click `Conditional Access`. +4. In the menu on the left of the Conditional Access blade, click `Policies`. +5. Click on the name of the policy you wish to audit. +6. Click the blue text under `Users`. +7. Under the `Include` section of Users, ensure that `All Users` is selected. +8. Under the `Exclude` section of Users, review the `Users and Groups` that are excluded from the policy (NOTE: this should be limited to break-glass emergency access accounts, non-interactive service accounts, and other carefully considered exceptions). +9. On the left side, click the blue text under `Target resources`. +10. Under the `Include` section of Target Resources, ensure that the `Select apps` radio button is selected. +11. Under `Select`, ensure that `Windows Azure Service Management API` is listed. + +## Expected Result + +A Conditional Access policy should exist requiring MFA for all users accessing the Windows Azure Service Management API, with only break-glass emergency access accounts and non-interactive service accounts excluded. + +## Remediation + +### Remediate from Azure Portal + +1. From the Azure Admin Portal dashboard, open `Microsoft Entra ID`. +2. Click `Security` in the Entra ID blade. +3. Click `Conditional Access` in the Security blade. +4. Click `Policies` in the Conditional Access blade. +5. Click `+ New policy`. +6. Enter a name for the policy. +7. Click the blue text under `Users`. +8. Under `Include`, select `All users`. +9. Under `Exclude`, check `Users and groups`. +10. Select users or groups to be exempted from this policy (e.g. break-glass emergency accounts, and non-interactive service accounts) then click the `Select` button. +11. Click the blue text under `Target resources`. +12. Under `Include`, click the `Select apps` radio button. +13. Click the blue text under `Select`. +14. Check the box next to `Windows Azure Service Management APIs` then click the `Select` button. +15. Click the blue text under `Grant`. +16. Under `Grant access` check the box for `Require multi-factor authentication` then click the `Select` button. +17. Before creating, set `Enable policy` to `Report-only`. +18. Click `Create`. + +After testing the policy in report-only mode, update the `Enable policy` setting from `Report-only` to `On`. + +## Default Value + +MFA is not enabled by default for administrative actions. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-7-restrict-resource-access-based-on--conditions +2. https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-users-groups +3. https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-old-require-mfa-azure-mgmt +4. https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-cloud-apps#windows-azure-service-management-api + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.5 Require MFA for Administrative Access | x | x | x | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.7/SKILL.md new file mode 100644 index 0000000000..222cbbf4ed --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.7/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-azure-foundations-5.2.7 +description: "Ensure multifactor authentication is required to access Microsoft Admin Portals" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, conditional-access] +cis_id: "5.2.7" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.2.6, cis-azure-foundations-5.2.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure multifactor authentication is required to access Microsoft Admin Portals + +## Description + +This recommendation ensures that users accessing Microsoft Admin Portals (i.e. Microsoft 365 Admin, Microsoft 365 Defender, Exchange Admin Center, Azure Portal, etc.) are required to use multi-factor authentication (MFA) credentials when logging into an Admin Portal. + +## Rationale + +Administrative Portals for Microsoft Azure should be secured with a higher level of scrutiny to authenticating mechanisms. Enabling multi-factor authentication is recommended to reduce the potential for abuse of Administrative actions, and to prevent intruders or compromised admin credentials from changing administrative settings. + +IMPORTANT: While this recommendation allows exceptions to specific Users or Groups, they should be very carefully tracked and reviewed for necessity on a regular interval through an Access Review process. It is important that this rule be built to include "All Users" to ensure that all users not specifically excepted will be required to use MFA to access Admin Portals. + +## Impact + +Conditional Access policies require Microsoft Entra ID P1 or P2 licenses. Similarly, they may require additional overhead to maintain if users lose access to their MFA. Any users or groups which are granted an exception to this policy should be carefully tracked, be granted only minimal necessary privileges, and conditional access exceptions should be reviewed or investigated. + +## Audit Procedure + +### Using Azure Portal + +1. From the Azure Admin Portal dashboard, open `Microsoft Entra ID`. +2. In the menu on the left of the Entra ID blade, click `Security`. +3. In the menu on the left of the Security blade, click `Conditional Access`. +4. In the menu on the left of the Conditional Access blade, click `Policies`. +5. Click on the name of the policy you wish to audit. +6. Click the blue text under `Users`. +7. Under the `Include` section of Users, review `Users and Groups` to ensure that `All Users` is selected. +8. Under the `Exclude` section of Users, review the `Users and Groups` that are excluded from the policy (NOTE: this should be limited to break-glass emergency access accounts, non-interactive service accounts, and other carefully considered exceptions). +9. On the left side, click the blue text under `Target Resources`. +10. Under the `Include` section of Target resources, ensure that the `Select apps` radio button is selected. +11. Under `Select`, ensure `Microsoft Admin Portals` is listed. + +## Expected Result + +A Conditional Access policy should exist requiring MFA for all users accessing Microsoft Admin Portals, with only break-glass emergency access accounts and non-interactive service accounts excluded. + +## Remediation + +### Remediate from Azure Portal + +1. From the Azure Admin Portal dashboard, open `Microsoft Entra ID`. +2. Click `Security` in the Entra ID blade. +3. Click `Conditional Access` in the Security blade. +4. Click `Policies` in the Conditional Access blade. +5. Click `+ New policy`. +6. Enter a name for the policy. +7. Click the blue text under `Users`. +8. Under `Include`, select `All users`. +9. Under `Exclude`, check `Users and groups`. +10. Select users or groups to be exempted from this policy (e.g. break-glass emergency accounts, and non-interactive service accounts) then click the `Select` button. +11. Click the blue text under `Target resources`. +12. Under `Include`, click the `Select apps` radio button. +13. Click the blue text under `Select`. +14. Check the box next to `Microsoft Admin Portals` then click the `Select` button. +15. Click the blue text under `Grant`. +16. Under `Grant access` check the box for `Require multi-factor authentication` then click the `Select` button. +17. Before creating, set `Enable policy` to `Report-only`. +18. Click `Create`. + +After testing the policy in report-only mode, update the `Enable policy` setting from `Report-only` to `On`. + +## Default Value + +MFA is not enabled by default for administrative actions. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-7-restrict-resource-access-based-on--conditions +2. https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-users-groups +3. https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-old-require-mfa-admin-portals + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.5 Require MFA for Administrative Access | x | x | x | +| v7 | 4.5 Use Multifactor Authentication For All Administrative Access | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.8/SKILL.md new file mode 100644 index 0000000000..171abf034e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.2.8/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-azure-foundations-5.2.8 +description: "Ensure a Token Protection Conditional Access policy is considered" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, conditional-access] +cis_id: "5.2.8" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.2.7, cis-azure-foundations-5.2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure a Token Protection Conditional Access policy is considered + +## Description + +This recommendation ensures that issued tokens are only issued to the intended device. + +## Rationale + +When properly configured, conditional access can aid in preventing attacks involving token theft, via hijacking or reply, as part of the attack flow. Although currently considered a rare event, the impact from token impersonation can be severe. + +## Impact + +A Microsoft Entra ID P1 or P2 license is required. + +Start with a Conditional Access policy in "Report Only" mode prior to enforcing for all users. + +## Audit Procedure + +### Using Azure Portal + +1. Sign in to the Microsoft Entra admin center as at least a `Conditional Access Administrator`. +2. Browse to `Protection` > `Conditional Access` > `Policies`. +3. Review existing policies to ensure that at least one policy contains the following configuration: +4. Under `Assignments`, review `Users or workload identities` and + - Under `Include`, ensure the scope of the users or groups is appropriate for your organization. + - Under `Exclude`, ensure only necessary users and groups (your organization's emergency access or break-glass accounts) are excepted. +5. Under `Target resources` > `Resources` > `Include` > `Select resources`: Ensure that both `Office 365 Exchange Online` and `Office 365 SharePoint Online` are selected. +6. Under `Conditions` > `Device Platforms`: Ensure `Configure` is set to `Yes` and `Include` indicates `Windows` platforms. +7. Under `Conditions` > `Client Apps`: Ensure `Configure` is set to `Yes` and `Mobile Apps and Desktop Clients` is selected under Modern Authentication Clients. +8. Under `Access controls` > `Session`, ensure that `Require token protection for sign-in sessions` is selected. + +## Expected Result + +At least one Conditional Access policy should exist with Token Protection configured, targeting Office 365 Exchange Online and SharePoint Online on Windows platforms with mobile apps and desktop clients. + +## Remediation + +### Remediate from Azure Portal + +1. Sign in to the Microsoft Entra admin center as at least a `Conditional Access Administrator`. +2. Browse to `Protection` > `Conditional Access` > `Policies`. +3. Select `New policy`. +4. Give your policy a name. +5. Under `Assignments`, select `Users or workload identities`. + 1. Under `Include`, select the users or groups to apply this policy. + 2. Under `Exclude`, select Users and groups and choose your organization's emergency access or break-glass accounts (if applicable). +6. Under `Target resources` > `Resources` > `Include` > `Select resources` + 1. Under `Select`, select the following applications: + 1. Office 365 Exchange Online + 2. Office 365 SharePoint Online + 2. Choose `Select`. +7. Under `Conditions`: + 1. Under `Device platforms` + 1. Set `Configure` to Yes. + 2. `Include` > `Select device platforms` > `Windows`. + 3. Select `Done`. + 2. Under `Client apps`: + 1. Set `Configure` to Yes. + 2. Under Modern authentication clients, only select `Mobile apps and desktop clients`. + 3. Select `Done`. +8. Under `Access controls` > `Session`, select `Require token protection for sign-in sessions` and select `Select`. +9. Confirm your settings and set Enable policy to `On`. +10. Select `Create` to enable your policy. + +## Default Value + +A Token Protection Conditional Access policy does not exist by default. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-token-protection +2. https://www.microsoft.com/en-gb/security/business/microsoft-entra-pricing + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v8 | 6.4 Require MFA for Remote Network Access | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.20/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.20/SKILL.md new file mode 100644 index 0000000000..1cf9cab08e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.20/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-azure-foundations-5.20 +description: "Ensure 'Owners can manage group membership requests in My Groups' is set to 'No'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, group-management, self-service, least-privilege] +cis_id: "5.20" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.18, cis-azure-foundations-5.19] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Owners can manage group membership requests in My Groups' is set to 'No' + +## Description + +Restrict security group management to administrators only. + +## Rationale + +Restricting security group management to administrators only prohibits users from making changes to security groups. This ensures that security groups are appropriately managed and their management is not delegated to non-administrators. + +## Impact + +Group Membership for user accounts will need to be handled by Admins and cause administrative overhead. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Groups` +4. Under `Settings`, select `General` +5. Under `Self Service Group Management`, ensure that `Owners can manage group membership requests in My Groups` is set to `No` + +## Expected Result + +`Owners can manage group membership requests in My Groups` should be set to `No`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Groups` +4. Under `Settings`, select `General` +5. Under `Self Service Group Management`, set `Owners can manage group membership requests in My Groups` to `No` +6. Click `Save` + +## Default Value + +By default, `Owners can manage group membership requests in My Groups` is set to `No`. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/users/groups-self-service-management#making-a-group-available-for-end-user-self-service +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-8-determine-access-process-for-cloud-provider-support +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +6. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.21/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.21/SKILL.md new file mode 100644 index 0000000000..297138b9e0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.21/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-azure-foundations-5.21 +description: "Ensure 'Users can create Microsoft 365 groups in Azure portals, API or PowerShell' is set to 'No'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, microsoft-365, group-creation, least-privilege] +cis_id: "5.21" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.19, cis-azure-foundations-5.18] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Users can create Microsoft 365 groups in Azure portals, API or PowerShell' is set to 'No' + +## Description + +Restrict Microsoft 365 group creation to administrators only. + +## Rationale + +Restricting Microsoft 365 group creation to administrators only ensures that creation of Microsoft 365 groups is controlled by the administrator. Appropriate groups should be created and managed by the administrator and group creation rights should not be delegated to any other user. + +## Impact + +Enabling this setting could create a number of requests that would need to be managed by an administrator. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Groups` +4. Under `Settings`, select `General` +5. Under `Microsoft 365 Groups`, ensure that `Users can create Microsoft 365 groups in Azure portals, API or PowerShell` is set to `No` + +## Expected Result + +`Users can create Microsoft 365 groups in Azure portals, API or PowerShell` should be set to `No`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Groups` +4. Under `Settings`, select `General` +5. Under `Microsoft 365 Groups`, set `Users can create Microsoft 365 groups in Azure portals, API or PowerShell` to `No` +6. Click `Save` + +## Default Value + +By default, `Users can create Microsoft 365 groups in Azure portals, API or PowerShell` is set to `Yes`. + +## References + +1. https://learn.microsoft.com/en-us/microsoft-365/solutions/manage-creation-of-groups +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.22/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.22/SKILL.md new file mode 100644 index 0000000000..bcb1b8155a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.22/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-azure-foundations-5.22 +description: "Ensure 'Require Multifactor Authentication to register or join devices with Microsoft Entra' is set to 'Yes'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, mfa, device-registration, entra-id] +cis_id: "5.22" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Require Multifactor Authentication to register or join devices with Microsoft Entra' is set to 'Yes' + +## Description + +**NOTE:** This recommendation is only relevant if your subscription is using Per-User MFA. If your organization is licensed to use Conditional Access, the preferred method of requiring MFA to join devices to Entra ID is to use a Conditional Access policy (see additional information below for link). + +Joining or registering devices to Microsoft Entra ID should require multi-factor authentication. + +## Rationale + +Multi-factor authentication is recommended when adding devices to Microsoft Entra ID. When set to `Yes`, users who are adding devices from the internet must first use the second method of authentication before their device is successfully added to the directory. This ensures that rogue devices are not added to the domain using a compromised user account. + +## Impact + +A slight impact of additional overhead, as Administrators will now have to approve every access to the domain. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Devices` +4. Under `Manage`, select `Device settings` +5. Under `Microsoft Entra join and registration settings`, ensure that `Require Multifactor Authentication to register or join devices with Microsoft Entra` is set to `Yes` + +## Expected Result + +`Require Multifactor Authentication to register or join devices with Microsoft Entra` should be set to `Yes`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Devices` +4. Under `Manage`, select `Device settings` +5. Under `Microsoft Entra join and registration settings`, set `Require Multifactor Authentication to register or join devices with Microsoft Entra` to `Yes` +6. Click `Save` + +## Default Value + +By default, `Require Multifactor Authentication to register or join devices with Microsoft Entra` is set to `No`. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-all-users-device-registration +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-6-use-strong-authentication-controls + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v8 | 6.4 Require MFA for Remote Network Access | x | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.23/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.23/SKILL.md new file mode 100644 index 0000000000..8c0c8053ac --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.23/SKILL.md @@ -0,0 +1,124 @@ +--- +name: cis-azure-foundations-5.23 +description: "Ensure no custom subscription administrator roles exist" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, rbac, custom-roles, least-privilege, subscription] +cis_id: "5.23" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.24, cis-azure-foundations-5.27] +prerequisites: [] +severity_boost: {} +--- + +# Ensure no custom subscription administrator roles exist + +## Description + +The principle of least privilege should be followed and only necessary privileges should be assigned instead of allowing full administrative access. + +## Rationale + +Custom roles in Azure with administrative access can obfuscate the permissions granted and introduce complexity and blind spots to the management of privileged identities. For less mature security programs without regular identity audits, the creation of Custom roles should be avoided entirely. For more mature security programs with regular identity audits, Custom Roles should be audited for use and assignment, used minimally, and the principle of least privilege should be observed when granting permissions. + +## Impact + +Subscriptions will need to be handled by Administrators with permissions. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Subscriptions`. +3. Select a subscription. +4. Select `Access control (IAM)`. +5. Select `Roles`. +6. Click `Type` and select `Custom role` from the drop-down menu. +7. Select `View` next to a role. +8. Select `JSON`. +9. Check for `assignableScopes` set to the subscription, and `actions` set to `*`. +10. Repeat steps 7-9 for each custom role. + +### Using Azure CLI + +```bash +az role definition list --custom-role-only True +``` + +Check for entries with `assignableScope` of the `subscription`, and an action of `*`. + +### Using PowerShell + +```powershell +Connect-AzAccount +Get-AzRoleDefinition | Where-Object {($_.IsCustom -eq $true) -and ($_.Actions.contains('*'))} +``` + +Check the output for `AssignableScopes` value set to the subscription. + +### Using Azure Policy + +- **Policy ID:** a451c1ef-c6ca-483d-87ed-f49761e3ffb5 - **Name:** 'Audit usage of custom RBAC roles' + +## Expected Result + +No custom roles should exist with `assignableScopes` set to the subscription and `actions` set to `*`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Subscriptions`. +3. Select a subscription. +4. Select `Access control (IAM)`. +5. Select `Roles`. +6. Click `Type` and select `Custom role` from the drop-down menu. +7. Check the box next to each role which grants subscription administrator privileges. +8. Select `Delete`. +9. Select `Yes`. + +### Using Azure CLI + +```bash +az role definition list --custom-role-only True +``` + +Check for entries with `assignableScope` of the `subscription`, and an action of `*`. + +To remove a violating role: + +```bash +az role definition delete --name +``` + +Note that any role assignments must be removed before a custom role can be deleted. Ensure impact is assessed before deleting a custom role granting subscription administrator privileges. + +## Default Value + +By default, no custom owner roles are created. + +## References + +1. https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/add-change-subscription-administrator +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +6. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-7-follow-just-enough-administration-least-privilege-principle + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 4.1 Maintain Inventory of Administrative Accounts | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.24/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.24/SKILL.md new file mode 100644 index 0000000000..6e8b0a6c51 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.24/SKILL.md @@ -0,0 +1,129 @@ +--- +name: cis-azure-foundations-5.24 +description: "Ensure a custom role is assigned permissions for administering resource locks" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, rbac, resource-locks, custom-roles, nist] +cis_id: "5.24" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.23] +prerequisites: [] +severity_boost: {} +--- + +# Ensure a custom role is assigned permissions for administering resource locks + +## Description + +Resource locking is a powerful protection mechanism that can prevent inadvertent modification or deletion of resources within Azure subscriptions and resource groups, and it is a recommended NIST configuration. + +## Rationale + +Given that the resource lock functionality is outside of standard Role-Based Access Control (RBAC), it would be prudent to create a resource lock administrator role to prevent inadvertent unlocking of resources. + +## Impact + +By adding this role, specific permissions may be granted for managing only resource locks rather than needing to provide the broad Owner or User Access Administrator role, reducing the risk of the user being able to cause unintentional damage. + +## Audit Procedure + +### Using Azure Portal + +1. In the Azure portal, navigate to a subscription or resource group. +2. Click `Access control (IAM)`. +3. Click `Roles`. +4. Click `Type : All`. +5. Click to view the drop-down menu. +6. Select `Custom role`. +7. Click `View` in the `Details` column of a custom role. +8. Review the role permissions. +9. Click `Assignments` and review the assignments. +10. Click the `X` to exit the custom role details page. +11. Repeat steps 7-10. Ensure that at least one custom role exists that assigns the `Microsoft.Authorization/locks` permission to appropriate members. +12. Repeat steps 1-11 for each subscription or resource group. + +## Expected Result + +At least one custom role should exist that assigns the `Microsoft.Authorization/locks` permission to appropriate members. + +## Remediation + +### Using Azure Portal + +1. In the Azure portal, navigate to a subscription or resource group. +2. Click `Access control (IAM)`. +3. Click `+ Add`. +4. Click `Add custom role`. +5. In the `Custom role name` field enter `Resource Lock Administrator`. +6. In the `Description` field enter `Can Administer Resource Locks`. +7. For `Baseline permissions` select `Start from scratch`. +8. Click `Next`. +9. Click `Add permissions`. +10. In the `Search for a permission` box, type `Microsoft.Authorization/locks`. +11. Click the result. +12. Check the box next to `Permission`. +13. Click `Add`. +14. Click `Review + create`. +15. Click `Create`. +16. Click `OK`. +17. Click `+ Add`. +18. Click `Add role assignment`. +19. In the `Search by role name, description, permission, or ID` box, type `Resource Lock Administrator`. +20. Select the role. +21. Click `Next`. +22. Click `+ Select members`. +23. Select appropriate members. +24. Click `Select`. +25. Click `Review + assign`. +26. Click `Review + assign` again. +27. Repeat steps 1-26 for each subscription or resource group requiring remediation. + +### Using PowerShell + +```powershell +Import-Module Az.Accounts +Connect-AzAccount + +$role = Get-AzRoleDefinition "User Access Administrator" +$role.Id = $null +$role.Name = "Resource Lock Administrator" +$role.Description = "Can Administer Resource Locks" +$role.Actions.Clear() +$role.Actions.Add("Microsoft.Authorization/locks/*") +$role.AssignableScopes.Clear() + +# Scope at the Management group level Management group +$role.AssignableScopes.Add("/providers/Microsoft.Management/managementGroups/MG-Name") + +New-AzRoleDefinition -Role $role +Get-AzureRmRoleDefinition "Resource Lock Administrator" +``` + +## Default Value + +A role for administering resource locks does not exist by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/role-based-access-control/custom-roles +2. https://learn.microsoft.com/en-us/azure/role-based-access-control/check-access +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-7-follow-just-enough-administration-least-privilege-principle +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-3-manage-lifecycle-of-identities-and-entitlements +6. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +7. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.25/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.25/SKILL.md new file mode 100644 index 0000000000..fcbad2b552 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.25/SKILL.md @@ -0,0 +1,75 @@ +--- +name: cis-azure-foundations-5.25 +description: "Ensure 'Subscription leaving/entering Microsoft Entra tenant' is set to 'Permit no one'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, subscription-management, tenant-security, access-control] +cis_id: "5.25" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.23, cis-azure-foundations-5.27] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Subscription leaving/entering Microsoft Entra tenant' is set to 'Permit no one' + +## Description + +Users who are set as subscription owners are able to make administrative changes to the subscriptions and move them into and out of Microsoft Entra ID. + +## Rationale + +Permissions to move subscriptions in and out of a Microsoft Entra tenant must only be given to appropriate administrative personnel. A subscription that is moved into a Microsoft Entra tenant may be within a folder to which other users have elevated permissions. This prevents loss of data or unapproved changes of the objects within by potential bad actors. + +## Impact + +Subscriptions will need to have these settings turned off to be moved. + +## Audit Procedure + +### Using Azure Portal + +1. From the Azure Portal Home select the portal menu +2. Select `Subscriptions` +3. In the `Advanced options` drop-down menu, select `Manage Policies` +4. Ensure `Subscription leaving Microsoft Entra tenant` and `Subscription entering Microsoft Entra tenant` are set to `Permit no one` + +## Expected Result + +Both `Subscription leaving Microsoft Entra tenant` and `Subscription entering Microsoft Entra tenant` should be set to `Permit no one`. + +## Remediation + +### Using Azure Portal + +1. From the Azure Portal Home select the portal menu +2. Select `Subscriptions` +3. In the `Advanced options` drop-down menu, select `Manage Policies` +4. Set `Subscription leaving Microsoft Entra tenant` and `Subscription entering Microsoft Entra tenant` to `Permit no one` +5. Click `Save changes` + +## Default Value + +By default `Subscription leaving Microsoft Entra tenant` and `Subscription entering Microsoft Entra tenant` are set to `Allow everyone (default)`. + +## References + +1. https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/manage-azure-subscription-policy +2. https://learn.microsoft.com/en-us/entra/fundamentals/how-subscriptions-associated-directory +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-2-protect-identity-and-authentication-systems + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v8 | 6.1 Establish an Access Granting Process | x | x | x | +| v8 | 6.2 Establish an Access Revoking Process | x | x | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.26/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.26/SKILL.md new file mode 100644 index 0000000000..c7f51175a9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.26/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-azure-foundations-5.26 +description: "Ensure fewer than 5 users have global administrator assignment" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, global-admin, privileged-access, least-privilege] +cis_id: "5.26" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.27, cis-azure-foundations-5.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure fewer than 5 users have global administrator assignment + +## Description + +This recommendation aims to maintain a balance between security and operational efficiency by ensuring that a minimum of 2 and a maximum of 4 users are assigned the Global Administrator role in Microsoft Entra ID. Having at least two Global Administrators ensures redundancy, while limiting the number to four reduces the risk of excessive privileged access. + +## Rationale + +The Global Administrator role has extensive privileges across all services in Microsoft Entra ID. The Global Administrator role should never be used in regular daily activities; administrators should have a regular user account for daily activities, and a separate account for administrative responsibilities. Limiting the number of Global Administrators helps mitigate the risk of unauthorized access, reduces the potential impact of human error, and aligns with the principle of least privilege to reduce the attack surface of an Azure tenant. Conversely, having at least two Global Administrators ensures that administrative functions can be performed without interruption in case of unavailability of a single admin. + +For any accounts assigned the Global Administrator role, at least one strong authentication method such as a FIDO2 key or certificate is strongly advised. + +## Impact + +Implementing this recommendation may require changes in administrative workflows or the redistribution of roles and responsibilities. Adequate training and awareness should be provided to all Global Administrators. + +NOTE: If an organization's tenant is using a third-party identity provider, the audit and remediation procedures presented here may not be relevant. The principle of the recommendation is still relevant, and compensating controls that are relevant to the third-party identity provider should be implemented. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Roles and administrators` +4. Under `Administrative Roles`, select `Global Administrator` +5. Ensure less than 5 users are actively assigned the role. +6. Ensure that at least 2 users are actively assigned the role. + +## Expected Result + +Between 2 and 4 users (inclusive) should be actively assigned the Global Administrator role. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Roles and administrators` +4. Under `Administrative Roles`, select `Global Administrator` + +If more than 4 users are assigned: + +1. Remove Global Administrator role for users which do not or no longer require the role. +2. Assign Global Administrator role via PIM which can be activated when required. +3. Assign more granular roles to users to conduct their duties. + +If only one user is assigned: + +1. Provide the Global Administrator role to a trusted user or create a break glass admin account. + +## Default Value + +By default, there is one Global Administrator assigned during tenant creation. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/best-practices#5-limit-the-number-of-global-administrators-to-less-than-5 +2. https://learn.microsoft.com/en-us/microsoft-365/admin/add-users/about-admin-roles?view=o365-worldwide#security-guidelines-for-assigning-roles +3. https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/security-emergency-access +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.1 Establish and Maintain an Inventory of Accounts | x | x | x | +| v7 | 4.1 Maintain Inventory of Administrative Accounts | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.27/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.27/SKILL.md new file mode 100644 index 0000000000..22f6a45fab --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.27/SKILL.md @@ -0,0 +1,118 @@ +--- +name: cis-azure-foundations-5.27 +description: "Ensure there are between 2 and 3 subscription owners" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, subscription-owners, rbac, least-privilege] +cis_id: "5.27" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.26, cis-azure-foundations-5.23] +prerequisites: [] +severity_boost: {} +--- + +# Ensure there are between 2 and 3 subscription owners + +## Description + +The Owner role in Azure grants full control over all resources in a subscription, including the ability to assign roles to others. + +## Rationale + +Limit the number of security principals (users, groups, service principals, and managed identities) assigned the Owner role to between 2 and 3. If groups are used, ensure their membership is tightly controlled and regularly reviewed to avoid privilege sprawl. + +## Impact + +Implementation may require changes in administrative workflows or the redistribution of roles and responsibilities. The recommendation to have between 2 and 3 Owners per subscription must account for all security principals that can be assigned the Owner role, not just individual users. This includes: + +- User accounts +- Entra ID groups +- Service principals (used by applications or automation) +- Managed identities (system-assigned or user-assigned) + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Subscriptions`. +2. Click the name of a subscription. +3. Click `Access Controls (IAM)`. +4. Click `Role assignments`. +5. Click `Role : All`. +6. Click the arrow next to `All`. +7. Click `Owner`. +8. Ensure a minimum of 2 and a maximum of 3 members are returned. +9. Repeat steps 1-8 for each subscription. + +### Using Azure CLI + +```bash +az role assignment list --role Owner --scope /subscriptions/ \ + --query "[].{PrincipalName:principalName, Type:principalType}" +``` + +Ensure a minimum of 2 and a maximum of 3 members are returned. For each Owner assignment, check: If principalType == Group, review group membership. If principalType == ServicePrincipal or ManagedIdentity, validate necessity and scope. Repeat for each subscription. + +### Using PowerShell + +```powershell +Get-AzRoleAssignment -RoleDefinitionName Owner -Scope /subscriptions/ +``` + +Ensure a minimum of 2 and a maximum of 3 members are returned. Repeat for each subscription. + +### Using Azure Policy + +- **Policy ID:** 09024ccc-0c5f-475e-9457-b7c0d9ed487b - **Name:** 'There should be more than one owner assigned to your subscription' +- **Policy ID:** 4f11b553-d42e-4e3a-89be-32ca364cad4c - **Name:** 'A maximum of 3 owners should be designated for your subscription' + +## Expected Result + +Each subscription should have a minimum of 2 and a maximum of 3 owners assigned. + +## Remediation + +### Using Azure Portal + +1. Go to `Subscriptions`. +2. Click the name of a subscription. +3. Click `Access Controls (IAM)`. +4. Click `Role assignments`. +5. Click `Role : All`. +6. Click the arrow next to `All`. +7. Click `Owner`. +8. Check the box next to members from whom the owner role should be removed. +9. Click `Delete`. +10. Click `Yes`. +11. Repeat steps 1-10 for each subscription requiring remediation. + +### Using Azure CLI + +```bash +az role assignment delete --ids +``` + +## Default Value + +A subscription has 1 owner by default. + +## References + +1. https://learn.microsoft.com/en-us/cli/azure/role/assignment +2. https://learn.microsoft.com/en-us/powershell/module/az.resources/get-azroleassignment +3. https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/privileged#owner +4. https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal-subscription-admin + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.1 Establish and Maintain an Inventory of Accounts | x | x | x | +| v7 | 4.1 Maintain Inventory of Administrative Accounts | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.28/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.28/SKILL.md new file mode 100644 index 0000000000..07c57357df --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.28/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-azure-foundations-5.28 +description: "Ensure passwordless authentication methods are considered" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, passwordless, fido2, authentication, mfa] +cis_id: "5.28" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.22, cis-azure-foundations-5.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure passwordless authentication methods are considered + +## Description + +Passwordless authentication methods improve security and user experience by replacing passwords with something you have (e.g., a hardware key), something you are (biometrics), or something you know, offering a convenient and secure way to access resources. + +Microsoft Entra ID and Azure Government integrate the following passwordless authentication options: + +- Windows Hello for Business +- Platform Credential for macOS +- Platform single sign-on (PSSO) for macOS with smart card authentication +- Microsoft Authenticator +- Passkeys (FIDO2) +- Certificate-based authentication + +## Rationale + +Using passwordless authentication makes sign-in easier and more secure by removing passwords, helping to protect organizations from attacks and improving the user experience. + +## Impact + +Implementing passwordless authentication requires administrative effort and may incur costs for some methods. It has the potential to save time and money by improving user convenience and productivity and by reducing the need for password support. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Click `Authentication methods`. +3. Under `Manage`, click `Policies`. +4. If appropriate for your organization, ensure a passwordless authentication method policy is configured. + +## Expected Result + +At least one passwordless authentication method policy should be configured and enabled for the organization. + +## Remediation + +1. Review the passwordless authentication method options: https://learn.microsoft.com/en-us/entra/identity/authentication/concept-authentication-passwordless. +2. Choose a passwordless authentication method: https://learn.microsoft.com/en-us/entra/identity/authentication/concept-authentication-passwordless#choose-a-passwordless-method. +3. Implement the chosen passwordless authentication method: + - Microsoft Authenticator: https://learn.microsoft.com/en-us/entra/identity/authentication/how-to-enable-authenticator-passkey. + - Passkeys (FIDO2): https://learn.microsoft.com/en-us/entra/identity/authentication/how-to-enable-passkey-fido2. + +## Default Value + +Passwordless authentication is not enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-authentication-methods +2. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-authentication-passwordless + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------- | ---- | ---- | ---- | +| v8 | 6.5 Require MFA for Administrative Access | x | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.1/SKILL.md new file mode 100644 index 0000000000..4b2aa9cc82 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.1/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-foundations-5.3.1 +description: "Ensure Azure admin accounts are not used for daily operations" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, identity-reviews] +cis_id: "5.3.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.3.2, cis-azure-foundations-5.3.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Azure admin accounts are not used for daily operations + +## Description + +Microsoft Azure admin accounts should not be used for routine, non-administrative tasks. + +## Rationale + +Using admin accounts for daily operations increases the risk of accidental misconfigurations and security breaches. + +## Impact + +Minor administrative overhead includes managing separate accounts, enforcing stricter access controls, and potential licensing costs for advanced security features. + +## Audit Procedure + +### Using Azure Portal + +**Monitor:** + +1. Go to `Monitor`. +2. Click `Activity log`. +3. Review the activity log and ensure that admin accounts are not being used for daily operations. + +**Microsoft Entra ID:** + +1. Go to `Microsoft Entra ID`. +2. Under `Monitoring`, click `Sign-in logs`. +3. Review the sign-in logs and ensure that admin accounts are not being accessed more frequently than necessary. + +## Expected Result + +Admin accounts should show minimal sign-in activity limited to administrative tasks only. Regular daily operations should be performed using non-privileged user accounts. + +## Remediation + +If admin accounts are being used for daily operations, consider the following: + +- Monitor and alert on unusual activity. +- Enforce the principle of least privilege. +- Revoke any unnecessary administrative access. +- Use Conditional Access to limit access to resources. +- Ensure that administrators have separate admin and user accounts. +- Use Microsoft Entra ID Protection to detect, investigate, and remediate identity-based risks. +- Use Privileged Identity Management (PIM) in Microsoft Entra ID to limit standing administrator access to privileged roles, discover who has access, and review privileged access. + +## Default Value + +There is no default enforcement preventing admin accounts from being used for daily operations. + +## References + +1. https://learn.microsoft.com/en-us/security/privileged-access-workstations/critical-impact-accounts + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.2/SKILL.md new file mode 100644 index 0000000000..716b5d823a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.2/SKILL.md @@ -0,0 +1,137 @@ +--- +name: cis-azure-foundations-5.3.2 +description: "Ensure guest users are reviewed on a regular basis" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, identity-reviews] +cis_id: "5.3.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.3.1, cis-azure-foundations-5.3.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure guest users are reviewed on a regular basis + +## Description + +Microsoft Entra ID has native and extended identity functionality allowing you to invite people from outside your organization to be guest users in your cloud account and sign in with their own work, school, or social identities. + +While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Evaluating the appropriateness of guest users requires a manual review, as it depends on the specific needs and context of each organization and environment. + +## Rationale + +Guest users are typically added outside your employee on-boarding/off-boarding process and could potentially be overlooked indefinitely. To prevent this, guest users should be reviewed on a regular basis. During this audit, guest users should also be determined to not have administrative privileges. + +## Impact + +Before removing guest users, determine their use and scope. Like removing any user, there may be unforeseen consequences to systems if an account is removed without careful consideration. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, select `Users`. +4. Click on `Add filter`. +5. Select `User type`. +6. Select `Guest` from the Value dropdown. +7. Click `Apply`. +8. Audit the listed guest users. + +### Using Azure CLI + +```bash +az ad user list --query "[?userType=='Guest']" +``` + +Ensure all users listed are still required and not inactive. + +### Using Azure PowerShell + +```powershell +Get-AzureADUser |Where-Object {$_.UserType -like "Guest"} |Select-Object DisplayName, UserPrincipalName, UserType -Unique +``` + +### Using Azure Policy + +- **Policy ID:** e9ac8f8e-ce22-4355-8f04-99b911d6be52 - **Name:** 'Guest accounts with read permissions on Azure resources should be removed' +- **Policy ID:** 94e1c2ac-cbbe-4cac-a2b5-389c812dee87 - **Name:** 'Guest accounts with write permissions on Azure resources should be removed' +- **Policy ID:** 339353f6-2387-4a45-abe4-7f529d121046 - **Name:** 'Guest accounts with owner permissions on Azure resources should be removed' + +## Expected Result + +All listed guest users should be currently required, active, and appropriate for the organization. No guest users should have unnecessary administrative privileges. + +## Remediation + +### Remediate from Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, select `Users`. +4. Click on `Add filter`. +5. Select `User type`. +6. Select `Guest` from the Value dropdown. +7. Click `Apply`. +8. Check the box next to all `Guest` users that are no longer required or are inactive. +9. Click `Delete`. +10. Click `OK`. + +### Remediate from Azure CLI + +Before deleting the user, set it to inactive using the ID from the Audit Procedure to determine if there are any dependent systems. + +```bash +az ad user update --id --account-enabled {false} +``` + +After determining that there are no dependent systems, delete the user. + +```powershell +Remove-AzureADUser -ObjectId +``` + +### Remediate from Azure PowerShell + +Before deleting the user, set it to inactive using the ID from the Audit Procedure to determine if there are any dependent systems. + +```powershell +Set-AzureADUser -ObjectId "" -AccountEnabled false +``` + +After determining that there are no dependent systems, delete the user. + +```powershell +PS C:\>Remove-AzureADUser -ObjectId +``` + +## Default Value + +By default no guest users are created. + +## References + +1. https://learn.microsoft.com/en-us/entra/external-id/user-properties +2. https://learn.microsoft.com/en-us/entra/fundamentals/how-to-create-delete-users#delete-a-user +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-4-review-and-reconcile-user-access-regularly +4. https://www.microsoft.com/en-us/security/business/microsoft-entra-pricing +5. https://learn.microsoft.com/en-us/entra/identity/monitoring-health/howto-manage-inactive-user-accounts +6. https://learn.microsoft.com/en-us/entra/fundamentals/users-restore + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.1 Establish and Maintain an Inventory of Accounts | x | x | x | +| v8 | 5.3 Disable Dormant Accounts | x | x | x | +| v7 | 16.6 Maintain an Inventory of Accounts | | x | x | +| v7 | 16.8 Disable Any Unassociated Accounts | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.3/SKILL.md new file mode 100644 index 0000000000..98a73359cf --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.3/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-azure-foundations-5.3.3 +description: "Ensure use of the 'User Access Administrator' role is restricted" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, identity-reviews] +cis_id: "5.3.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.3.4, cis-azure-foundations-5.3.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure use of the 'User Access Administrator' role is restricted + +## Description + +The User Access Administrator role grants the ability to view all resources and manage access assignments at any subscription or management group level within the tenant. Due to its high privilege level, this role assignment should be removed immediately after completing the necessary changes at the root scope to minimize security risks. + +## Rationale + +The User Access Administrator role provides extensive access control privileges. Unnecessary assignments heighten the risk of privilege escalation and unauthorized access. Removing the role immediately after use minimizes security exposure. + +## Impact + +Increased administrative effort to manage and remove role assignments appropriately. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Subscriptions`. +3. Select a subscription. +4. Select `Access control (IAM)`. +5. Look for the following banner at the top of the page: `Action required: X users have elevated access in your tenant. You should take immediate action and remove all role assignments with elevated access.` If the banner is displayed, the `User Access Administrator` is assigned. + +### Using Azure CLI + +```bash +az role assignment list --role "User Access Administrator" --scope "/" +``` + +Ensure that the command does not return any `User Access Administrator` role assignment information. + +## Expected Result + +No users should have the User Access Administrator role assigned at the root scope ("/"). The Azure CLI command should return an empty result, and no banner warning should appear in the Azure Portal. + +## Remediation + +### Remediate from Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Subscriptions`. +3. Select a subscription. +4. Select `Access control (IAM)`. +5. Look for the following banner at the top of the page: `Action required: X users have elevated access in your tenant. You should take immediate action and remove all role assignments with elevated access.` +6. Click `View role assignments`. +7. Click `Remove`. + +### Remediate from Azure CLI + +```bash +az role assignment delete --role "User Access Administrator" --scope "/" +``` + +## Default Value + +The User Access Administrator role is not assigned by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles +2. https://learn.microsoft.com/en-us/azure/role-based-access-control/elevate-access-global-admin + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 4.1 Maintain Inventory of Administrative Accounts | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.4/SKILL.md new file mode 100644 index 0000000000..d365ae3664 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.4/SKILL.md @@ -0,0 +1,72 @@ +--- +name: cis-azure-foundations-5.3.4 +description: "Ensure all 'privileged' role assignments are periodically reviewed" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, identity-reviews] +cis_id: "5.3.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.3.3, cis-azure-foundations-5.3.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure all 'privileged' role assignments are periodically reviewed + +## Description + +Periodic review of privileged role assignments is performed to ensure that the privileged roles assigned to users are accurate and appropriate. + +## Rationale + +Privileged roles are crown jewel assets that can be used by malicious insiders, threat actors, and even through mistake to significantly damage an organization in numerous ways. These roles should be periodically reviewed to: + +- Identify lingering permissions assignment (e.g. an administrator has been terminated, the administrator account is being retained, but the permissions are no longer necessary and has not been properly addressed by process). +- Detect lateral movement through privilege escalation (e.g. an account with administrative permission has been compromised and is elevating other accounts in an attempt to circumvent detection mechanisms). + +## Impact + +Increased administrative effort to manage and remove role assignments appropriately. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Subscriptions`. +3. Select a subscription. +4. Select `Access control (IAM)`. +5. Look for the number under the word `Privileged` accompanied by a link titled `View Assignments`. Click the `View assignments` link. +6. For each privileged role listed, evaluate whether the assignment is appropriate and current for each User, Group, or App assigned to each privileged role. + +NOTE: The judgement of what constitutes 'appropriate and current' assignments requires a clear understanding of your organization's personnel, systems, policy, and security requirements. This cannot be effectively prescribed in procedure. + +## Expected Result + +All privileged role assignments should be appropriate, current, and justified. No lingering or unnecessary privileged role assignments should exist. + +## Remediation + +Review and remove any inappropriate or unnecessary privileged role assignments. Use Privileged Identity Management (PIM) where available to enforce just-in-time access for privileged roles. + +## Default Value + +Privileged role assignments are not automatically reviewed. + +## References + +1. https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 4.1 Maintain Inventory of Administrative Accounts | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.5/SKILL.md new file mode 100644 index 0000000000..fc0b085ac6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.5/SKILL.md @@ -0,0 +1,129 @@ +--- +name: cis-azure-foundations-5.3.5 +description: "Ensure disabled user accounts do not have read, write, or owner permissions" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, identity-reviews] +cis_id: "5.3.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.3.4, cis-azure-foundations-5.3.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure disabled user accounts do not have read, write, or owner permissions + +## Description + +Ensure that any roles granting read, write, or owner permissions are removed from disabled Azure user accounts. + +While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Removing role assignments from disabled user accounts depends on the context and requirements of each organization and environment. + +## Rationale + +Disabled accounts should not retain access to resources, as this poses a security risk. Removing role assignments mitigates potential unauthorized access and enforces the principle of least privilege. + +## Impact + +Ensure disabled accounts are not relied on for break glass or automated processes before removing roles to avoid service disruption. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Under `Manage`, click `Users`. +3. Click `Add filter`. +4. Click `Account enabled`. +5. Click the toggle switch to set the value to `No`. +6. Click `Apply`. +7. Click the `Display name` of a disabled user account. +8. Click `Azure role assignments`. +9. Ensure that no read, write, or owner roles are assigned to the user account. +10. Repeat steps 7-9 for each disabled user account. + +### Using PowerShell + +```powershell +Connect-AzureAD +Get-AzureADUser +``` + +Run the following command to get a user: + +```powershell +$user = Get-AzureADUser -ObjectId +``` + +Run the following command to get the `AccountEnabled` setting for the user: + +```powershell +$user.AccountEnabled +``` + +If `AccountEnabled` is `False`, run the following command to get the role assignments for the user: + +```powershell +Get-AzRoleAssignment -ObjectId $user.ObjectId +``` + +Ensure that no read, write, or owner roles are assigned to the user. Repeat for each user. + +### Using Azure Policy + +- **Policy ID:** 0cfea604-3201-4e14-88fc-fae4c427a6c5 - **Name:** 'Blocked accounts with owner permissions on Azure resources should be removed' +- **Policy ID:** 8d7e1fde-fe26-4b5f-8108-f8e432cbc2be - **Name:** 'Blocked accounts with read and write permissions on Azure resources should be removed' + +## Expected Result + +No disabled user accounts should have any read, write, or owner role assignments. The PowerShell command `Get-AzRoleAssignment` should return no results for disabled accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Under `Manage`, click `Users`. +3. Click `Add filter`. +4. Click `Account enabled`. +5. Click the toggle switch to set the value to `No`. +6. Click `Apply`. +7. Click the `Display name` of a disabled user account with read, write, or owner roles assigned. +8. Click `Azure role assignments`. +9. Click the name of a read, write, or owner role. +10. Click `Assignments`. +11. Click `Remove` in the row for the disabled user account. +12. Click `Yes`. +13. Repeat steps 7-12 for disabled user accounts requiring remediation. + +### Remediate from PowerShell + +For each account requiring remediation, run the following command to remove an assigned role: + +```powershell +Remove-AzRoleAssignment -ObjectId $user.ObjectId -RoleDefinitionName +``` + +## Default Value + +Disabled user accounts retain their prior role assignments. + +## References + +1. https://learn.microsoft.com/en-us/powershell/module/az.resources/get-azaduser +2. https://learn.microsoft.com/en-us/powershell/module/az.resources/get-azroleassignment +3. https://learn.microsoft.com/en-us/powershell/module/az.resources/remove-azroleassignment + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.1 Establish and Maintain an Inventory of Accounts | x | x | x | +| v7 | 16.6 Maintain an Inventory of Accounts | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.6/SKILL.md new file mode 100644 index 0000000000..0fe7ced4b2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.6/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-azure-foundations-5.3.6 +description: "Ensure 'Tenant Creator' role assignments are periodically reviewed" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, identity-reviews] +cis_id: "5.3.6" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.3.5, cis-azure-foundations-5.3.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Tenant Creator' role assignments are periodically reviewed + +## Description + +Perform a periodic review of the Tenant Creator role assignment to ensure that the assignments are accurate and appropriate. + +This recommendation should be applied alongside the recommendation **"Ensure that 'Restrict non-admin users from creating tenants' is set to 'Yes'"**. + +## Rationale + +Unnecessary assignments increase the risk of privilege escalation and unauthorized access. + +## Impact + +Verify that the Tenant Creator role is no longer required by any assignments before removal to avoid disruption of critical functions. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Under `Manage`, click `Roles and administrators`. +3. In the search bar, type `Tenant Creator`. +4. Click the role. +5. Review the assignments and ensure that they are appropriate. + +## Expected Result + +The Tenant Creator role should have no unnecessary assignments. All assignments should be justified and documented. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Under `Manage`, click `Roles and administrators`. +3. In the search bar, type `Tenant Creator`. +4. Click the role. +5. Click the name of an assignment. +6. Check the box next to the `Tenant Creator` role. +7. Click `X Remove assignments`. +8. Click `Yes`. +9. Repeat steps 1-8 for each assignment requiring remediation. + +## Default Value + +The Tenant Creator role is not assigned by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/active-directory-b2c/tenant-management-check-tenant-creation-permission +2. https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#tenant-creator + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.4 Restrict Administrator Privileges to Dedicated Administrator Accounts | x | x | x | +| v7 | 4.3 Ensure the Use of Dedicated Administrative Accounts | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.7/SKILL.md new file mode 100644 index 0000000000..88b266088c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.3.7/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-foundations-5.3.7 +description: "Ensure all non-privileged role assignments are periodically reviewed" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, identity-reviews] +cis_id: "5.3.7" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.3.4, cis-azure-foundations-5.3.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure all non-privileged role assignments are periodically reviewed + +## Description + +Perform a periodic review of non-privileged role assignments to ensure that the non-privileged roles assigned to users are appropriate. + +Note: Determining 'appropriate' assignments requires a clear understanding of your organization's personnel, systems, policies, and security requirements. This cannot be effectively prescribed in a procedure. + +## Rationale + +To ensure the principle of least privilege is followed, non-privileged role assignments should be reviewed periodically to confirm that users are granted only the minimum level of permissions they need to perform their tasks. + +## Impact + +Increased administrative effort to manage and remove role assignments appropriately. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Subscriptions`. +2. Click the name of a subscription. +3. Click `Access control (IAM)`. +4. Click `Role assignments`. +5. Click `Job function roles`. +6. For each role, ensure the assignments are appropriate. +7. Repeat steps 1-6 for each subscription. + +## Expected Result + +All non-privileged role assignments should be appropriate and justified. No unnecessary or outdated role assignments should exist. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Subscriptions`. +2. Click the name of a subscription. +3. Click `Access control (IAM)`. +4. Click `Role assignments`. +5. Click `Job function roles`. +6. Check the box next to any inappropriate assignments. +7. Click `Delete`. +8. Click `Yes`. +9. Repeat steps 1-8 for each subscription. + +## Default Value + +Users do not have non-privileged roles assigned to them by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 16.6 Maintain an Inventory of Accounts | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.4/SKILL.md new file mode 100644 index 0000000000..413f43b15d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.4/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-azure-foundations-5.4 +description: "Ensure 'Restrict non-admin users from creating tenants' is set to 'Yes'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, entra-id, tenant-creation, access-control] +cis_id: "5.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.14, cis-azure-foundations-5.17] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Restrict non-admin users from creating tenants' is set to 'Yes' + +## Description + +Require administrators or appropriately delegated users to create new tenants. + +## Rationale + +It is recommended to only allow an administrator to create new tenants. This prevents users from creating new Microsoft Entra ID or Azure AD B2C tenants and ensures that only authorized users are able to do so. + +## Impact + +Enforcing this setting will ensure that only authorized users are able to create new tenants. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `User settings` +5. Ensure that `Restrict non-admin users from creating tenants` is set to `Yes` + +### Using PowerShell + +```powershell +Import-Module Microsoft.Graph.Identity.SignIns +Connect-MgGraph -Scopes 'Policy.ReadWrite.Authorization' +Get-MgPolicyAuthorizationPolicy | Select-Object -ExpandProperty DefaultUserRolePermissions | Format-List +``` + +Review the "DefaultUserRolePermissions" section of the output. Ensure that `AllowedToCreateTenants` is not `True`. + +## Expected Result + +In the Azure Portal, `Restrict non-admin users from creating tenants` should be set to `Yes`. In PowerShell, `AllowedToCreateTenants` should be `False`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `User settings` +5. Set `Restrict non-admin users from creating tenants` to `Yes` +6. Click `Save` + +### Using PowerShell + +```powershell +Import-Module Microsoft.Graph.Identity.SignIns + +Connect-MgGraph -Scopes 'Policy.ReadWrite.Authorization' + +Select-MgProfile -Name beta + +$params = @{ +DefaultUserRolePermissions = @{ +AllowedToCreateTenants = $false +} +} + +Update-MgPolicyAuthorizationPolicy -AuthorizationPolicyId -BodyParameter $params +``` + +## Default Value + +By default, users can create tenants. + +## References + +1. https://learn.microsoft.com/en-us/entra/fundamentals/users-default-permissions +2. https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#tenant-creator +3. https://blog.admindroid.com/disable-users-creating-new-azure-ad-tenants-in-microsoft-365/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.8 Define and Maintain Role-Based Access Control | | | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.5/SKILL.md new file mode 100644 index 0000000000..9e24cbc3f7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.5/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-azure-foundations-5.5 +description: "Ensure 'Number of methods required to reset' is set to '2'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, password-reset, sspr, mfa, authentication] +cis_id: "5.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.9, cis-azure-foundations-5.10, cis-azure-foundations-5.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Number of methods required to reset' is set to '2' + +## Description + +Ensures that two alternate forms of identification are provided before allowing a password reset. + +## Rationale + +A Self-service Password Reset (SSPR) through Azure Multi-factor Authentication (MFA) ensures the user's identity is confirmed using two separate methods of identification. With multiple methods set, an attacker would have to compromise both methods before they could maliciously reset a user's password. + +## Impact + +There may be administrative overhead, as users who lose access to their secondary authentication methods will need an administrator with permissions to remove it. There will also need to be organization-wide security policies and training to teach administrators to verify the identity of the requesting user so that social engineering cannot render this setting useless. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `Password reset` +5. Select `Authentication methods` +6. Ensure that `Number of methods required to reset` is set to `2` + +## Expected Result + +`Number of methods required to reset` should be set to `2`. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu +2. Select `Microsoft Entra ID` +3. Under `Manage`, select `Users` +4. Under `Manage`, select `Password reset` +5. Select `Authentication methods` +6. Set the `Number of methods required to reset` to `2` +7. Click `Save` + +## Default Value + +By default, the `Number of methods required to reset` is `1`. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/tutorial-enable-sspr +2. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-registration-mfa-sspr-combined +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-6-use-strong-authentication-controls +4. https://learn.microsoft.com/en-us/entra/identity/authentication/passwords-faq#password-reset-registration +5. https://support.microsoft.com/en-us/account-billing/reset-your-work-or-school-password-using-security-info-23dde81f-08bb-4776-ba72-e6b72b9dda9e +6. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-authentication-methods + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.3 Require MFA for Externally-Exposed Applications | | x | x | +| v8 | 6.4 Require MFA for Remote Network Access | x | x | x | +| v7 | 16.3 Require Multi-factor Authentication | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.6/SKILL.md new file mode 100644 index 0000000000..a35c18a10e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.6/SKILL.md @@ -0,0 +1,117 @@ +--- +name: cis-azure-foundations-5.6 +description: "Ensure account 'Lockout threshold' is less than or equal to '10'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, account-lockout, brute-force, password-protection] +cis_id: "5.6" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.7, cis-azure-foundations-5.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure account 'Lockout threshold' is less than or equal to '10' + +## Description + +The account lockout threshold determines how many failed login attempts are permitted prior to placing the account in a locked-out state and initiating a variable lockout duration. + +## Rationale + +Account lockout is a method of protecting against brute-force and password spray attacks. Once the lockout threshold has been exceeded, the account enters a locked-out state which prevents all login attempts for a variable duration. The lockout in combination with a reasonable duration reduces the total number of failed login attempts that a malicious actor can execute in a given period of time. + +## Impact + +If account lockout threshold is set too low (less than 3), users may experience frequent lockout events and the resulting security alerts may contribute to alert fatigue. If account lockout threshold is set too high (more than 10), malicious actors can programmatically execute more password attempts in a given period of time. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, select `Security`. +4. Under `Manage`, select `Authentication methods`. +5. Under `Manage`, select `Password protection`. +6. Ensure that `Lockout threshold` is set to `10` or fewer. + +### Using PowerShell + +```powershell +Connect-MgGraph -Scopes "Policy.ReadWrite.AuthenticationMethod" +$p = (Get-MgPolicyAuthenticationMethodsPolicy).PasswordProtection +if ($p.LockoutThreshold -gt 10) { + Update-MgPolicyAuthenticationMethodsPolicy -BodyParameter @{ + passwordProtection = @{ + lockoutThreshold = 10 + lockoutDuration = [Math]::Max($p.LockoutDuration, 60) + } + } +} +Disconnect-MgGraph +``` + +### Using Azure CLI + +```bash +az rest --method get \ + --url 'https://graph.microsoft.com/v1.0/policies/authenticationMethodsPolicy' \ + --query 'passwordProtection.lockoutThreshold' +``` + +## Expected Result + +`Lockout threshold` should be `10` or fewer. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, select `Security`. +4. Under `Manage`, select `Authentication methods`. +5. Under `Manage`, select `Password protection`. +6. Set `Lockout threshold` to `10` or fewer. +7. Click `Save`. + +### Using PowerShell + +```powershell +Connect-MgGraph -Scopes "Policy.ReadWrite.AuthenticationMethod" +Update-MgPolicyAuthenticationMethodsPolicy -PasswordProtection @{ + LockoutThreshold = 10 + LockoutDuration = "PT1M" +} +``` + +### Using Azure CLI + +```bash +az rest --method patch \ + --url 'https://graph.microsoft.com/v1.0/policies/authenticationMethodsPolicy' \ + --headers 'Content-Type=application/json' \ + --body '{"passwordProtection":{"lockoutThreshold":10,"lockoutDuration":"PT1M"}}' +``` + +## Default Value + +By default, Lockout threshold is set to `10`. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/howto-password-smart-lockout#manage-microsoft-entra-smart-lockout-values + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.10 Enforce Automatic Device Lockout on Portable End-User Devices | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.7/SKILL.md new file mode 100644 index 0000000000..4579fe814f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.7/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-azure-foundations-5.7 +description: "Ensure account 'Lockout duration in seconds' is greater than or equal to '60'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, account-lockout, brute-force, password-protection] +cis_id: "5.7" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.6, cis-azure-foundations-5.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure account 'Lockout duration in seconds' is greater than or equal to '60' + +## Description + +The account lockout duration value determines how long an account retains the status of lockout, and therefore how long before a user can continue to attempt to login after passing the lockout threshold. + +## Rationale + +Account lockout is a method of protecting against brute-force and password spray attacks. Once the lockout threshold has been exceeded, the account enters a locked-out state which prevents all login attempts for a variable duration. The lockout in combination with a reasonable duration reduces the total number of failed login attempts that a malicious actor can execute in a given period of time. + +## Impact + +If account lockout duration is set too low (less than 60 seconds), malicious actors can perform more password spray and brute-force attempts over a given period of time. If the account lockout duration is set too high (more than 300 seconds) users may experience inconvenient delays during lockout. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, select `Security`. +4. Under `Manage`, select `Authentication methods`. +5. Under `Manage`, select `Password protection`. +6. Ensure that `Lockout duration in seconds` is set to `60` or higher. + +## Expected Result + +`Lockout duration in seconds` should be `60` or higher. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, select `Security`. +4. Under `Manage`, select `Authentication methods`. +5. Under `Manage`, select `Password protection`. +6. Set the `Lockout duration in seconds` to `60` or higher. +7. Click `Save`. + +## Default Value + +By default, Lockout duration in seconds is set to `60`. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/howto-password-smart-lockout#manage-microsoft-entra-smart-lockout-values + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 4.10 Enforce Automatic Device Lockout on Portable End-User Devices | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.8/SKILL.md new file mode 100644 index 0000000000..74ba2bd815 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.8/SKILL.md @@ -0,0 +1,84 @@ +--- +name: cis-azure-foundations-5.8 +description: "Ensure 'Custom banned password list' is set to 'Enforce'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, password-policy, banned-passwords, password-protection] +cis_id: "5.8" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.6, cis-azure-foundations-5.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Custom banned password list' is set to 'Enforce' + +## Description + +Microsoft Azure applies a default global banned password list to all user and admin accounts that are created and managed directly in Microsoft Entra ID. The Microsoft Entra password policy does not apply to user accounts that are synchronized from an on-premises Active Directory environment, unless Microsoft Entra ID Connect is used and `EnforceCloudPasswordPolicyForPasswordSyncedUsers` is enabled. For increased password security, a custom banned password list is recommended. + +## Rationale + +Implementing a custom banned password list gives your organization further control over the password policy. Disallowing easy-to-guess passwords increases the security of your Azure resources. + +## Impact + +Increasing password complexity may increase user account administration overhead. Utilizing the default global banned password list and a custom list requires a Microsoft Entra ID P1 or P2 license. On-premises Active Directory Domain Services users who aren't synchronized to Microsoft Entra ID still benefit from Microsoft Entra ID Password Protection based on the existing licensing of synchronized users. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, select `Security`. +4. Under `Manage`, select `Authentication methods`. +5. Under `Manage`, select `Password protection`. +6. Ensure `Enforce custom list` is set to `Yes`. +7. Review the list of words banned from use in passwords. + +## Expected Result + +`Enforce custom list` should be set to `Yes` and the custom banned password list should contain organization-specific terms. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, select `Security`. +4. Under `Manage`, select `Authentication methods`. +5. Under `Manage`, select `Password protection`. +6. Set the `Enforce custom list` option to `Yes`. +7. Click in the `Custom banned password list` text box. +8. Add a list of words, one per line, to prevent users from using in passwords. +9. Click `Save`. + +## Default Value + +By default the custom banned password list is not 'Enabled'. Organization-specific terms can be added to the custom banned password list, such as brand names, product names, locations, company-specific terms, abbreviations, and months/weekdays with your company's local languages. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-password-ban-bad-combined-policy +2. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-password-ban-bad +3. https://learn.microsoft.com/en-us/powershell/module/azuread/ +4. https://www.microsoft.com/en-us/research/publication/password-guidance/ +5. https://learn.microsoft.com/en-us/entra/identity/authentication/tutorial-configure-custom-password-protection +6. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-6-use-strong-authentication-controls + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------- | ---- | ---- | ---- | +| v8 | 5.2 Use Unique Passwords | x | x | x | +| v8 | 6.7 Centralize Access Control | | x | x | +| v7 | 4.4 Use Unique Passwords | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.9/SKILL.md new file mode 100644 index 0000000000..256c50b8a5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-5.9/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-azure-foundations-5.9 +description: "Ensure 'Number of days before users are asked to re-confirm their authentication information' is not set to '0'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, identity, authentication, password-reset, registration] +cis_id: "5.9" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-5.5, cis-azure-foundations-5.10] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Number of days before users are asked to re-confirm their authentication information' is not set to '0' + +## Description + +Ensure that the number of days before users are asked to re-confirm their authentication information is not set to 0. + +## Rationale + +This setting is necessary if 'Require users to register when signing in' is enabled. If authentication re-confirmation is disabled, registered users will never be prompted to re-confirm their existing authentication information. If the authentication information for a user changes, such as a phone number or email, then the password reset information for that user reverts to the previously registered authentication information. + +## Impact + +Users will be prompted to re-confirm their authentication information after the number of days specified. + +## Audit Procedure + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, select `Users`. +4. Select `Password reset`. +5. Under `Manage`, select `Registration`. +6. Ensure that `Number of days before users are asked to re-confirm their authentication information` is not set to `0`. + +## Expected Result + +`Number of days before users are asked to re-confirm their authentication information` should not be `0`. A value such as 180 days is recommended. + +## Remediation + +### Using Azure Portal + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Entra ID`. +3. Under `Manage`, select `Users`. +4. Select `Password reset`. +5. Under `Manage`, select `Registration`. +6. Set the `Number of days before users are asked to re-confirm their authentication information` to your organization-defined frequency. +7. Click `Save`. + +## Default Value + +By default, the `Number of days before users are asked to re-confirm their authentication information` is set to "180 days". + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-sspr-howitworks#registration +2. https://support.microsoft.com/en-us/account-billing/reset-your-work-or-school-password-using-security-info-23dde81f-08bb-4776-ba72-e6b72b9dda9e +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +4. https://learn.microsoft.com/en-us/entra/identity/authentication/concept-authentication-methods + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.2 Establish an Access Revoking Process | x | x | x | +| v7 | 16.10 Ensure All Accounts Have An Expiration Date | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.1/SKILL.md new file mode 100644 index 0000000000..70686781a8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.1/SKILL.md @@ -0,0 +1,145 @@ +--- +name: cis-azure-foundations-6.1.1.1 +description: "Ensure that a 'Diagnostic Setting' exists for Subscription Activity Logs" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, diagnostic-settings, activity-logs] +cis_id: "6.1.1.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.1.2, cis-azure-foundations-6.1.1.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that a 'Diagnostic Setting' exists for Subscription Activity Logs + +## Description + +Enable Diagnostic settings for exporting activity logs. Diagnostic settings are available for each individual resource within a subscription. Settings should be configured for all appropriate resources for your environment. + +## Rationale + +A diagnostic setting controls how a diagnostic log is exported. By default, logs are retained only for 90 days. Diagnostic settings should be defined so that logs can be exported and stored for a longer duration to analyze security activities within an Azure subscription. + +## Impact + +None identified. + +## Audit Procedure + +### Using Azure Portal + +To identify Diagnostic Settings on a subscription: + +1. Go to `Monitor`. +2. Click `Activity Log`. +3. Click `Export Activity Logs`. +4. Select a `Subscription`. +5. Ensure a `Diagnostic setting` exists for the selected Subscription. + +To identify Diagnostic Settings on specific resources: + +1. Go to `Monitoring`. +2. Click `Diagnostic settings`. +3. Ensure a `Diagnostic setting` exists for all appropriate resources. + +### Using Azure CLI + +To identify Diagnostic Settings on a subscription: + +```bash +az monitor diagnostic-settings subscription list --subscription +``` + +To identify Diagnostic Settings on a resource: + +```bash +az monitor diagnostic-settings list --resource +``` + +### Using PowerShell + +To identify Diagnostic Settings on a Subscription: + +```powershell +Get-AzSubscriptionDiagnosticSetting -SubscriptionId +``` + +To identify Diagnostic Settings on a specific resource: + +```powershell +Get-AzDiagnosticSetting -ResourceId +``` + +## Expected Result + +At least one Diagnostic Setting should exist for each subscription, exporting activity logs to a destination such as Log Analytics workspace, Storage Account, or Event Hub. + +## Remediation + +### Remediate from Azure Portal + +To enable Diagnostic Settings on a Subscription: + +1. Go to `Monitor`. +2. Click on `Activity log`. +3. Click on `Export Activity Logs`. +4. Click `+ Add diagnostic setting`. +5. Enter a `Diagnostic setting name`. +6. Select `Categories` for the diagnostic setting. +7. Select the appropriate `Destination details` (Log Analytics, Storage Account, Event Hub, or Partner solution). +8. Click `Save`. + +### Remediate from Azure CLI + +```bash +az monitor diagnostic-settings subscription create --subscription --name --location <[--event-hub --event-hub-auth-rule ] [--storage-account ] [--workspace ]> --logs "" (e.g. [{category:Security,enabled:true},{category:Administrative,enabled:true},{category:Alert,enabled:true},{category:Policy,enabled:true}]) +``` + +### Remediate from PowerShell + +```powershell +$logCategories = @(); +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Administrative -Enabled $true +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Security -Enabled $true +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category ServiceHealth -Enabled $true +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Alert -Enabled $true +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Recommendation -Enabled $true +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Policy -Enabled $true +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Autoscale -Enabled $true +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category ResourceHealth -Enabled $true + +New-AzSubscriptionDiagnosticSetting -SubscriptionId -Name <[-EventHubAuthorizationRule -EventHubName ] [-StorageAccountId ] [-WorkSpaceId ] [-MarketplacePartner ID ]> -Log $logCategories +``` + +## Default Value + +No Diagnostic Settings are configured by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings +2. https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/resource-manager-diagnostic-settings +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +4. https://learn.microsoft.com/en-us/cli/azure/monitor/diagnostic-settings?view=azure-cli-latest +5. https://learn.microsoft.com/en-us/powershell/module/az.monitor/new-azsubscriptiondiagnosticsetting?view=azps-13.4.0 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques | Tactics | Mitigations | +| ---------- | ------- | ----------- | +| T1485 | TA0040 | M1053 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.10/SKILL.md new file mode 100644 index 0000000000..c99f21441e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.10/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-azure-foundations-6.1.1.10 +description: "Ensure Intune logs are captured and sent to Log Analytics" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, intune, endpoint-management] +cis_id: "6.1.1.10" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.1.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Intune logs are captured and sent to Log Analytics + +## Description + +Ensure that Intune logs are captured and fed into a central log analytics workspace. + +## Rationale + +Intune includes built-in logs that provide information about your environments. Sending logs to a Log Analytics workspace enables centralized analysis, correlation, and alerting for faster threat detection and response. + +## Impact + +A Microsoft Intune plan is required to access Intune. The amount of data logged and, thus, the cost incurred can vary significantly depending on the tenant size. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Intune`. +2. Click `Reports`. +3. Under `Azure monitor`, click `Diagnostic settings`. +4. Next to each diagnostic setting, click `Edit setting`, and review the selected log categories and destination details. +5. Ensure that at least one diagnostic setting is configured to send the following logs to a Log Analytics workspace: + - `AuditLogs` + - `OperationalLogs` + - `DeviceComplianceOrg` + - `Devices` + - `Windows365AuditLogs` + +## Expected Result + +At least one Intune diagnostic setting should exist that sends AuditLogs, OperationalLogs, DeviceComplianceOrg, Devices, and Windows365AuditLogs to a Log Analytics workspace. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Intune`. +2. Click `Reports`. +3. Under `Azure monitor`, click `Diagnostic settings`. +4. Click `+ Add diagnostic setting`. +5. Provide a `Diagnostic setting name`. +6. Under `Logs > Categories`, check the box next to each of the following logs: + - `AuditLogs` + - `OperationalLogs` + - `DeviceComplianceOrg` + - `Devices` + - `Windows365AuditLogs` +7. Under `Destination details`, check the box next to `Send to Log Analytics workspace`. +8. Select a `Subscription`. +9. Select a `Log Analytics workspace`. +10. Click `Save`. + +## Default Value + +By default, Intune diagnostic settings do not exist. + +## References + +1. https://learn.microsoft.com/en-us/intune/intune-service/fundamentals/review-logs-using-azure-monitor +2. https://www.microsoft.com/en-us/security/business/microsoft-intune-pricing +3. https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.2/SKILL.md new file mode 100644 index 0000000000..7752123698 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.2/SKILL.md @@ -0,0 +1,122 @@ +--- +name: cis-azure-foundations-6.1.1.2 +description: "Ensure Diagnostic Setting captures appropriate categories" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, diagnostic-settings, activity-logs] +cis_id: "6.1.1.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.1.1] +prerequisites: [cis-azure-foundations-6.1.1.1] +severity_boost: {} +--- + +# Ensure Diagnostic Setting captures appropriate categories + +## Description + +**Prerequisite**: A Diagnostic Setting must exist. If a Diagnostic Setting does not exist, the navigation and options within this recommendation will not be available. + +The diagnostic setting should be configured to log the appropriate activities from the control/management plane. + +## Rationale + +A diagnostic setting controls how the diagnostic log is exported. Capturing the diagnostic setting categories for appropriate control/management plane activities allows proper alerting. + +## Impact + +None identified. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Monitor`. +2. Click `Activity log`. +3. Click on `Export Activity Logs`. +4. Select the appropriate `Subscription`. +5. Click `Edit setting` next to a diagnostic setting. +6. Ensure that the following categories are checked: `Administrative`, `Alert`, `Policy`, and `Security`. + +### Using Azure CLI + +Ensure the categories `'Administrative'`, `'Alert'`, `'Policy'`, and `'Security'` set to: 'enabled: true' + +```bash +az monitor diagnostic-settings subscription list --subscription +``` + +### Using PowerShell + +Ensure the categories Administrative, Alert, Policy, and Security are set to Enabled:True + +```powershell +Get-AzSubscriptionDiagnosticSetting -Subscription +``` + +## Expected Result + +The Diagnostic Setting should have the categories Administrative, Alert, Policy, and Security all enabled. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Monitor`. +2. Click `Activity log`. +3. Click on `Export Activity Logs`. +4. Select the `Subscription` from the drop down menu. +5. Click `Edit setting` next to a diagnostic setting. +6. Check the following categories: `Administrative`, `Alert`, `Policy`, and `Security`. +7. Choose the destination details according to your organization's needs. +8. Click `Save`. + +### Remediate from Azure CLI + +```bash +az monitor diagnostic-settings subscription create --subscription --name --location <[--event-hub --event-hub-auth-rule ] [--storage-account ] [--workspace ]> --logs "[{category:Security,enabled:true},{category:Administrative,enabled:true},{category:Alert,enabled:true},{category:Policy,enabled:true}]" +``` + +### Remediate from PowerShell + +```powershell +$logCategories = @(); +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Administrative -Enabled $true +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Security -Enabled $true +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Alert -Enabled $true +$logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Policy -Enabled $true + +New-AzSubscriptionDiagnosticSetting -SubscriptionId -Name <[-EventHubAuthorizationRule -EventHubName ] [-StorageAccountId ] [-WorkSpaceId ] [-MarketplacePartner ID ]> -Log $logCategories +``` + +## Default Value + +When the diagnostic setting is created using Azure Portal, by default no categories are selected. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings +2. https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/resource-manager-diagnostic-settings +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +4. https://learn.microsoft.com/en-us/cli/azure/monitor/diagnostic-settings?view=azure-cli-latest +5. https://learn.microsoft.com/en-us/powershell/module/az.monitor/new-azsubscriptiondiagnosticsetting?view=azps-13.4.0 + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques | Tactics | Mitigations | +| ---------- | ------- | ----------- | +| T1485 | TA0040 | M1053 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.3/SKILL.md new file mode 100644 index 0000000000..66a7449580 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.3/SKILL.md @@ -0,0 +1,127 @@ +--- +name: cis-azure-foundations-6.1.1.3 +description: "Ensure storage account containing activity logs is encrypted with CMK" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, encryption, cmk, storage] +cis_id: "6.1.1.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.1.1] +prerequisites: [cis-azure-foundations-6.1.1.1] +severity_boost: {} +--- + +# Ensure the storage account containing the container with activity logs is encrypted with customer-managed key (CMK) + +## Description + +Customer-managed keys introduce additional depth to security by providing a means to manage access control for encryption keys. Where compliance and security frameworks indicate the need, and organizational capacity allows, sensitive data at rest can be encrypted using customer-managed keys (CMK) rather than Microsoft-managed keys. + +## Rationale + +By default in Azure, data at rest tends to be encrypted using Microsoft-managed keys. If your organization wants to control and manage encryption keys for compliance and defense-in-depth, customer-managed keys can be established. + +Configuring the storage account with the activity log export container to use CMKs provides additional confidentiality controls on log data, as a given user must have read permission on the corresponding storage account and must be granted decrypt permission by the CMK. + +## Impact + +If the key expires due to setting the 'activation date' and 'expiration date', the key must be rotated manually. Using customer-managed keys may also incur additional man-hour requirements to create, store, manage, and protect the keys as needed. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Monitor`. +2. Select `Activity log`. +3. Select `Export Activity Logs`. +4. Select a `Subscription`. +5. Note the name of the `Storage Account` for the diagnostic setting. +6. Navigate to `Storage accounts`. +7. Click on the storage account name noted in Step 5. +8. Under `Security + networking`, click `Encryption`. +9. Ensure `Customer-managed keys` is selected and a key is set. + +### Using Azure CLI + +1. Get storage account id configured with log profile: + +```bash +az monitor diagnostic-settings subscription list --subscription --query 'value[*].storageAccountId' +``` + +2. Ensure the storage account is encrypted with CMK: + +```bash +az storage account list --query "[?name=='']" +``` + +In command output ensure `keySource` is set to `Microsoft.Keyvault` and `keyVaultProperties` is not set to `null`. + +### Using PowerShell + +```powershell +Get-AzStorageAccount -ResourceGroupName -Name |select-object -ExpandProperty encryption|format-list +``` + +Ensure the value of `KeyVaultProperties` is not `null` or empty, and ensure `KeySource` is not set to `Microsoft.Storage`. + +## Expected Result + +The storage account containing activity logs should use Customer-managed keys (CMK) for encryption, with `keySource` set to `Microsoft.Keyvault`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Monitor`. +2. Select `Activity log`. +3. Select `Export Activity Logs`. +4. Select a `Subscription`. +5. Note the name of the `Storage Account` for the diagnostic setting. +6. Navigate to `Storage accounts`. +7. Click on the storage account. +8. Under `Security + networking`, click `Encryption`. +9. Next to `Encryption type`, select `Customer-managed keys`. +10. Complete the steps to configure a customer-managed key for encryption of the storage account. + +### Remediate from Azure CLI + +```bash +az storage account update --name --resource-group --encryption-key-source=Microsoft.Keyvault --encryption-key-vault --encryption-key-name --encryption-key-version +``` + +### Remediate from PowerShell + +```powershell +Set-AzStorageAccount -ResourceGroupName -Name -KeyvaultEncryption -KeyVaultUri -KeyName +``` + +## Default Value + +By default, encryption type is set to Microsoft-managed keys. + +## References + +1. https://learn.microsoft.com/en-us/azure/security/fundamentals/data-encryption-best-practices#protect-data-at-rest +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-5-use-customer-managed-key-option-in-data-at-rest-encryption-when-required +3. https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log?tabs=cli#managing-legacy-log-profiles + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest | | | x | + +## MITRE ATT&CK Mappings + +| Techniques | Tactics | Mitigations | +| ---------- | ------- | ----------- | +| T1530 | TA0009 | M1041 | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.4/SKILL.md new file mode 100644 index 0000000000..a166fc1503 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.4/SKILL.md @@ -0,0 +1,159 @@ +--- +name: cis-azure-foundations-6.1.1.4 +description: "Ensure that logging for Azure Key Vault is 'Enabled'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, key-vault, diagnostic-settings] +cis_id: "6.1.1.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that logging for Azure Key Vault is 'Enabled' + +## Description + +Enable AuditEvent logging for key vault instances to ensure interactions with key vaults are logged and available. + +## Rationale + +Monitoring how and when key vaults are accessed, and by whom, enables an audit trail of interactions with confidential information, keys, and certificates managed by Azure Key Vault. Enabling logging for Key Vault saves information in a user provided destination of either an Azure storage account or Log Analytics workspace. The same destination can be used for collecting logs for multiple Key Vaults. + +## Impact + +None identified. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Key vaults`. +2. For each Key vault, under `Monitoring`, go to `Diagnostic settings`. +3. Click `Edit setting` next to a diagnostic setting. +4. Ensure that a destination is configured. +5. Under `Category groups`, ensure that `audit` and `allLogs` are checked. + +### Using Azure CLI + +List all key vaults: + +```bash +az keyvault list +``` + +For each keyvault id: + +```bash +az monitor diagnostic-settings list --resource +``` + +Ensure that `storageAccountId` reflects your desired destination and that `categoryGroup` and `enabled` are set as follows: + +```json +"logs": [ + { + "categoryGroup": "audit", + "enabled": true, + }, + { + "categoryGroup": "allLogs", + "enabled": true, + } +] +``` + +### Using PowerShell + +List the key vault(s) in the subscription: + +```powershell +Get-AzKeyVault +``` + +For each key vault, run the following: + +```powershell +Get-AzDiagnosticSetting -ResourceId +``` + +Ensure that `StorageAccountId`, `ServiceBusRuleId`, `MarketplacePartnerId`, or `WorkspaceId` is set as appropriate. Also, ensure that `enabled` is set to `true`, and that `categoryGroup` reflects both `audit` and `allLogs` category groups. + +## Expected Result + +All Key Vault instances should have diagnostic logging enabled with both `audit` and `allLogs` category groups sending to an appropriate destination. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Key vaults`. +2. Select a Key vault. +3. Under `Monitoring`, select `Diagnostic settings`. +4. Click `Edit setting` to update an existing diagnostic setting, or `Add diagnostic setting` to create a new one. +5. If creating a new diagnostic setting, provide a name. +6. Configure an appropriate destination. +7. Under `Category groups`, check `audit` and `allLogs`. +8. Click `Save`. + +### Remediate from Azure CLI + +To create a new Diagnostic Settings: + +```bash +az monitor diagnostic-settings create --name "" --resource --logs "[{category:audit,enabled:true},{category:allLogs,enabled:true}]" --metrics "[{category:AllMetrics,enabled:true}]" <[--event-hub --event-hub-rule | --storage-account | --workspace | --marketplace-partner-id ]> +``` + +### Remediate from PowerShell + +Create the Log settings object: + +```powershell +$logSettings = @() +$logSettings += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -Category audit +$logSettings += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -Category allLogs +``` + +Create the Metric settings object: + +```powershell +$metricSettings = @() +$metricSettings += New-AzDiagnosticSettingMetricSettingsObject -Enabled $true -Category AllMetrics +``` + +Create the Diagnostic Settings for each Key Vault: + +```powershell +New-AzDiagnosticSetting -Name "" -ResourceId -Log $logSettings -Metric $metricSettings [-StorageAccountId | -EventHubName -EventHubAuthorizationRuleId | -WorkSpaceId | -MarketPlacePartnerId ] +``` + +## Default Value + +By default, Diagnostic AuditEvent logging is not enabled for Key Vault instances. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/general/howto-logging +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-8-ensure-security-of-key-and-certificate-repository +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques | Tactics | Mitigations | +| ---------- | ------- | ----------- | +| T1485 | TA0040 | M1053 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.5/SKILL.md new file mode 100644 index 0000000000..9c130fda04 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.5/SKILL.md @@ -0,0 +1,71 @@ +--- +name: cis-azure-foundations-6.1.1.5 +description: "Ensure Network Security Group Flow logs are captured and sent to Log Analytics" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, nsg, flow-logs, network] +cis_id: "6.1.1.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.1.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Network Security Group Flow logs are captured and sent to Log Analytics + +## Description + +Ensure that network flow logs are captured and fed into a central log analytics workspace. + +**Retirement Notice**: On September 30, 2027, network security group (NSG) flow logs will be retired. As of June 30, 2025, creating new NSG flow logs is no longer possible. Azure recommends migrating to virtual network flow logs. + +## Rationale + +Network Flow Logs provide valuable insight into the flow of traffic around your network and feed into both Azure Monitor and Azure Sentinel (if in use), permitting the generation of visual flow diagrams to aid with analyzing for lateral movement, etc. + +## Impact + +The impact of configuring NSG Flow logs is primarily one of cost and configuration. If deployed, it will create storage accounts that hold minimal amounts of data on a 5-day lifecycle before feeding to Log Analytics Workspace. This will increase the amount of data stored and used by Azure Monitor. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to `Network Watcher`. +2. Under `Logs`, select `Flow logs`. +3. Click `Add filter`. +4. From the `Filter` drop-down, select `Flow log type`. +5. From the `Value` drop-down, check `Network security group` only. +6. Click `Apply`. +7. Ensure that at least one network security group flow log is listed and is configured to send logs to a `Log Analytics Workspace`. + +## Expected Result + +At least one NSG flow log should exist and be configured to send logs to a Log Analytics Workspace. Consider migrating to virtual network flow logs as NSG flow logs are being retired. + +## Remediation + +As of June 30, 2025, creating new NSG flow logs is no longer possible. Azure recommends migrating to virtual network flow logs. Consider applying the recommendation, `Ensure that virtual network flow logs are captured and sent to Log Analytics`, from this section. + +## Default Value + +By default Network Security Group logs are not sent to Log Analytics. + +## References + +1. https://learn.microsoft.com/en-us/azure/network-watcher/nsg-flow-logs-tutorial +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-4-enable-network-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 13.6 Collect Network Traffic Flow Logs | | x | x | +| v7 | 12.8 Deploy NetFlow Collection on Networking Boundary Devices | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.6/SKILL.md new file mode 100644 index 0000000000..cba1dbbcb5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.6/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-azure-foundations-6.1.1.6 +description: "Ensure logging for Azure AppService 'HTTP logs' is enabled" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, app-service, http-logs] +cis_id: "6.1.1.6" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that logging for Azure AppService 'HTTP logs' is enabled + +## Description + +Enable AppServiceHTTPLogs diagnostic log category for Azure App Service instances to ensure all http requests are captured and centrally logged. + +## Rationale + +Capturing web requests can be important supporting information for security analysts performing monitoring and incident response activities. Once logging, these logs can be ingested into SIEM or other central aggregation point for the organization. + +## Impact + +Log consumption and processing will incur additional cost. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `App Services`. + +For each App Service: + +2. Under `Monitoring`, go to `Diagnostic settings`. +3. Ensure a diagnostic setting exists that logs `HTTP logs` to a destination aligned to your environment's approach to log consumption (event hub, storage account, etc. dependent on what is consuming the logs such as SIEM or other log aggregation utility). + +## Expected Result + +Each App Service should have a diagnostic setting that captures HTTP logs and sends them to an appropriate destination. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `App Services`. + +For each App Service: + +2. Under `Monitoring`, go to `Diagnostic settings`. +3. To update an existing diagnostic setting, click `Edit setting` against the setting. To create a new diagnostic setting, click `Add diagnostic setting` and provide a name for the new setting. +4. Check the checkbox next to `HTTP logs`. +5. Configure a destination based on your specific logging consumption capability (for example Stream to an event hub and then consuming with SIEM integration for Event Hub logging). +6. Click `Save`. + +## Default Value + +Not configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------- | ---- | ---- | ---- | +| v8 | 8.7 Collect URL Request Audit Logs | | x | x | +| v7 | 7.6 Log all URL requests | | x | x | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.7/SKILL.md new file mode 100644 index 0000000000..3b734ea5db --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.7/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-azure-foundations-6.1.1.7 +description: "Ensure virtual network flow logs are captured and sent to Log Analytics" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, vnet, flow-logs, network] +cis_id: "6.1.1.7" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.1.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that virtual network flow logs are captured and sent to Log Analytics + +## Description + +Ensure that virtual network flow logs are captured and fed into a central log analytics workspace. + +## Rationale + +Virtual network flow logs provide critical visibility into traffic patterns. Sending logs to a Log Analytics workspace enables centralized analysis, correlation, and alerting for faster threat detection and response. + +## Impact + +- Virtual network flow logs are charged per gigabyte of network flow logs collected and come with a free tier of 5 GB/month per subscription. +- If traffic analytics is enabled with virtual network flow logs, traffic analytics pricing applies at per gigabyte processing rates. +- The storage of logs is charged separately. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Network Watcher`. +2. Under `Logs`, select `Flow logs`. +3. Click `Add filter`. +4. From the `Filter` drop-down menu, select `Flow log type`. +5. From the `Value` drop-down menu, check `Virtual network` only. +6. Click `Apply`. +7. Ensure that at least one virtual network flow log is listed and is configured to send logs to a `Log Analytics Workspace`. + +## Expected Result + +At least one virtual network flow log should exist and be configured to send logs to a Log Analytics Workspace with traffic analytics enabled. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Network Watcher`. +2. Under `Logs`, click `Flow logs`. +3. Click `+ Create`. +4. Select a subscription. +5. Next to `Flow log type`, select `Virtual network`. +6. Click `+ Select target resource`. +7. Select `Virtual network`. +8. Select a virtual network. +9. Click `Confirm selection`. +10. Select a storage account, or create a new storage account. +11. Set the retention in days for the storage account. +12. Click `Next`. +13. Under `Analytics`, for `Flow logs version`, select `Version 2`. +14. Check the box next to `Enable traffic analytics`. +15. Select a processing interval. +16. Select a `Log Analytics Workspace`. +17. Click `Next`. +18. Optionally, add `Tags`. +19. Click `Review + create`. +20. Click `Create`. +21. Repeat steps 1-20 for each subscription or virtual network requiring remediation. + +## Default Value + +By default, virtual network flow logs are not configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/network-watcher/vnet-flow-logs-overview +2. https://learn.microsoft.com/en-us/azure/network-watcher/vnet-flow-logs-cli + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 13.6 Collect Network Traffic Flow Logs | | x | x | +| v7 | 12.8 Deploy NetFlow Collection on Networking Boundary Devices | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques | Tactics | Mitigations | +| ---------- | ------- | ----------- | +| | | M1047 | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.8/SKILL.md new file mode 100644 index 0000000000..5252b70d1c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.8/SKILL.md @@ -0,0 +1,83 @@ +--- +name: cis-azure-foundations-6.1.1.8 +description: "Ensure Microsoft Entra diagnostic setting exists to send Microsoft Graph activity logs" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, entra-id, microsoft-graph] +cis_id: "6.1.1.8" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.1.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that a Microsoft Entra diagnostic setting exists to send Microsoft Graph activity logs to an appropriate destination + +## Description + +Ensure that a Microsoft Entra diagnostic setting is configured to send Microsoft Graph activity logs to a suitable destination, such as a Log Analytics workspace, storage account, or event hub. This enables centralized monitoring and analysis of all HTTP requests that the Microsoft Graph service receives and processes for a tenant. + +## Rationale + +Microsoft Graph activity logs provide visibility into HTTP requests made to the Microsoft Graph service, helping detect unauthorized access, suspicious activity, and security threats. Configuring diagnostic settings in Microsoft Entra ensures these logs are collected and sent to an appropriate destination for monitoring, analysis, and retention. + +## Impact + +A Microsoft Entra ID P1 or P2 tenant license is required to access the Microsoft Graph activity logs. The amount of data logged and, thus, the cost incurred can vary significantly depending on the tenant size and the applications in your tenant that interact with the Microsoft Graph APIs. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Under `Monitoring`, click `Diagnostic settings`. +3. Next to each diagnostic setting, click `Edit setting`, and review the selected log categories and destination details. +4. Ensure that at least one diagnostic setting is configured to send `MicrosoftGraphActivityLogs` to an appropriate destination. + +## Expected Result + +At least one Microsoft Entra diagnostic setting should exist that sends MicrosoftGraphActivityLogs to an appropriate destination (Log Analytics workspace, storage account, or event hub). + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Under `Monitoring`, click `Diagnostic settings`. +3. Click `+ Add diagnostic setting`. +4. Provide a `Diagnostic setting name`. +5. Under `Logs > Categories`, check the box next to `MicrosoftGraphActivityLogs`. +6. Configure an appropriate destination for the logs. +7. Click `Save`. + +## Default Value + +By default, Microsoft Entra diagnostic settings do not exist. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/monitoring-health/howto-configure-diagnostic-settings +2. https://learn.microsoft.com/en-us/graph/microsoft-graph-activity-logs-overview +3. https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#pricing-model +4. https://azure.microsoft.com/en-us/pricing/details/storage/blobs/ +5. https://azure.microsoft.com/en-us/pricing/details/event-hubs/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques | Tactics | Mitigations | +| ---------- | ------- | ----------- | +| | | M1047 | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.9/SKILL.md new file mode 100644 index 0000000000..105b48473c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.1.9/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-azure-foundations-6.1.1.9 +description: "Ensure Microsoft Entra diagnostic setting exists to send Microsoft Entra activity logs" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, entra-id, activity-logs, sign-in] +cis_id: "6.1.1.9" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.1.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that a Microsoft Entra diagnostic setting exists to send Microsoft Entra activity logs to an appropriate destination + +## Description + +Ensure that a Microsoft Entra diagnostic setting is configured to send Microsoft Entra activity logs to a suitable destination, such as a Log Analytics workspace, storage account, or event hub. This enables centralized monitoring and analysis of Microsoft Entra activity logs. + +## Rationale + +Microsoft Entra activity logs enables you to assess many aspects of your Microsoft Entra tenant. Configuring diagnostic settings in Microsoft Entra ensures these logs are collected and sent to an appropriate destination for monitoring, analysis, and retention. + +## Impact + +To export sign-in data, your organization needs an Azure AD P1 or P2 license. The amount of data logged and, thus, the cost incurred can vary significantly depending on the tenant size. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Under `Monitoring`, click `Diagnostic settings`. +3. Next to each diagnostic setting, click `Edit setting`, and review the selected log categories and destination details. +4. Ensure that at least one diagnostic setting is configured to send the following logs to an appropriate destination: + - `AuditLogs` + - `SignInLogs` + - `NonInteractiveUserSignInLogs` + - `ServicePrincipalSignInLogs` + - `ManagedIdentitySignInLogs` + - `ProvisioningLogs` + - `ADFSSignInLogs` + - `RiskyUsers` + - `UserRiskEvents` + - `NetworkAccessTrafficLogs` + - `RiskyServicePrincipals` + - `ServicePrincipalRiskEvents` + - `EnrichedOffice365AuditLogs` + - `MicrosoftGraphActivityLogs` + - `RemoteNetworkHealthLogs` + - `NetworkAccessAlerts` + +## Expected Result + +At least one Microsoft Entra diagnostic setting should exist that sends all applicable activity log categories to an appropriate destination. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Microsoft Entra ID`. +2. Under `Monitoring`, click `Diagnostic settings`. +3. Click `+ Add diagnostic setting`. +4. Provide a `Diagnostic setting name`. +5. Under `Logs > Categories`, check the box next to each of the following logs: + - `AuditLogs` + - `SignInLogs` + - `NonInteractiveUserSignInLogs` + - `ServicePrincipalSignInLogs` + - `ManagedIdentitySignInLogs` + - `ProvisioningLogs` + - `ADFSSignInLogs` + - `RiskyUsers` + - `UserRiskEvents` + - `NetworkAccessTrafficLogs` + - `RiskyServicePrincipals` + - `ServicePrincipalRiskEvents` + - `EnrichedOffice365AuditLogs` + - `MicrosoftGraphActivityLogs` + - `RemoteNetworkHealthLogs` + - `NetworkAccessAlerts` +6. Configure an appropriate destination for the logs. +7. Click `Save`. + +## Default Value + +By default, Microsoft Entra diagnostic settings do not exist. + +## References + +1. https://learn.microsoft.com/en-us/entra/identity/monitoring-health/howto-configure-diagnostic-settings +2. https://learn.microsoft.com/en-us/entra/identity/monitoring-health/howto-access-activity-logs + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques | Tactics | Mitigations | +| ---------- | ------- | ----------- | +| | | M1047 | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.1/SKILL.md new file mode 100644 index 0000000000..62a719190b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.1/SKILL.md @@ -0,0 +1,127 @@ +--- +name: cis-azure-foundations-6.1.2.1 +description: "Ensure Activity Log Alert exists for Create Policy Assignment" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, policy] +cis_id: "6.1.2.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.2.2] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Activity Log Alert exists for Create Policy Assignment + +## Description + +Create an activity log alert for the Create Policy Assignment event. + +## Rationale + +Monitoring for create policy assignment events gives insight into changes done in "Azure policy - assignments" and can reduce the time it takes to detect unsolicited changes. + +## Impact + +None identified. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the `Monitor` blade. +2. Click on `Alerts`. +3. In the Alerts window, click on `Alert rules`. +4. Ensure an alert rule exists where the Condition column contains `Operation name=Microsoft.Authorization/policyAssignments/write`. +5. Click on the Alert `Name` associated with the previous step. +6. Ensure the `Condition` panel displays the text `Whenever the Activity Log has an event with Category='Administrative', Operation name='Create policy assignment'` and does not filter on `Level`, `Status` or `Caller`. +7. Ensure the `Actions` panel displays an Action group is assigned to notify the appropriate personnel in your organization. + +### Using Azure CLI + +```bash +az monitor activity-log alert list --subscription --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}" +``` + +Look for `Microsoft.Authorization/policyAssignments/write` in the output. If it's missing, generate a finding. + +### Using PowerShell + +```powershell +Get-AzActivityLogAlert -SubscriptionId |where-object {$_.ConditionAllOf.Equal -match "Microsoft.Authorization/policyAssignments/write"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +If the output is empty, an alert rule for `Create Policy Assignments` is not configured. + +## Expected Result + +An activity log alert rule should exist with the operation name `Microsoft.Authorization/policyAssignments/write` and an action group assigned to notify appropriate personnel. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the `Monitor` blade. +2. Select `Alerts`. +3. Select `Create`. +4. Select `Alert rule`. +5. Choose a subscription. +6. Select `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Create policy assignment (Policy assignment)`. +10. Click `Apply`. +11. Select the `Actions` tab. +12. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +13. Follow the prompts to choose or create an action group. +14. Select the `Details` tab. +15. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +16. Click `Review + create`. +17. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor activity-log alert create --resource-group "" --condition category=Administrative and operationName=Microsoft.Authorization/policyAssignments/write --scope "/subscriptions/" --name "" --subscription --action-group +``` + +### Remediate from PowerShell + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Authorization/policyAssignments/write -Field operationName + +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id + +$scope = "/subscriptions/" + +New-AzActivityLogAlert -Name "" -ResourceGroupName "" -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://azure.microsoft.com/en-us/updates?id=classic-alerting-monitoring-retirement +2. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule +3. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update +4. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.10/SKILL.md new file mode 100644 index 0000000000..1d2e4f8cec --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.10/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-foundations-6.1.2.10 +description: "Ensure Activity Log Alert exists for Delete Public IP Address rule" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, network, public-ip] +cis_id: "6.1.2.10" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.2.9] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Activity Log Alert exists for Delete Public IP Address rule + +## Description + +Create an activity log alert for the Delete Public IP Address rule. + +## Rationale + +Monitoring for Delete Public IP Address events gives insight into network access changes and may reduce the time it takes to detect suspicious activity. + +## Impact + +There will be a substantial increase in log size if there are a large number of administrative actions on a server. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the `Monitor` blade. +2. Click on `Alerts`. +3. In the Alerts window, click on `Alert rules`. +4. Ensure an alert rule exists where the Condition column contains `Operation name=Microsoft.Network/publicIPAddresses/delete`. +5. Click on the Alert `Name` associated with the previous step. +6. Ensure the `Condition` panel displays the text `Whenever the Activity Log has an event with Category='Administrative', Operation name='Delete Public Ip Address'` and does not filter on `Level`, `Status` or `Caller`. +7. Ensure the `Actions` panel displays an Action group is assigned to notify the appropriate personnel in your organization. + +### Using Azure CLI + +```bash +az monitor activity-log alert list --subscription --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}" +``` + +Look for `Microsoft.Network/publicIPAddresses/delete` in the output. + +### Using PowerShell + +```powershell +Get-AzActivityLogAlert -SubscriptionId |where-object {$_.ConditionAllOf.Equal -match "Microsoft.Network/publicIPAddresses/delete"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +## Expected Result + +An activity log alert rule should exist with the operation name `Microsoft.Network/publicIPAddresses/delete` and an action group assigned. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the `Monitor` blade. +2. Select `Alerts`. +3. Select `Create`. +4. Select `Alert rule`. +5. Choose a subscription. +6. Select `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Delete Public Ip Address (Public Ip Address)`. +10. Click `Apply`. +11. Select the `Actions` tab. +12. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +13. Follow the prompts to choose or create an action group. +14. Select the `Details` tab. +15. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +16. Click `Review + create`. +17. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor activity-log alert create --resource-group "" --condition category=Administrative and operationName=Microsoft.Network/publicIPAddresses/delete and level= --scope "/subscriptions/" --name "" --subscription --action-group +``` + +### Remediate from PowerShell + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Network/publicIPAddresses/delete -Field operationName +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field level + +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id + +$scope = "/subscriptions/" + +New-AzActivityLogAlert -Name "" -ResourceGroupName "" -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://azure.microsoft.com/en-us/updates?id=classic-alerting-monitoring-retirement +2. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule +3. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update +4. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.11/SKILL.md new file mode 100644 index 0000000000..7bee2c948c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.11/SKILL.md @@ -0,0 +1,169 @@ +--- +name: cis-azure-foundations-6.1.2.11 +description: "Ensure that an Activity Log Alert exists for Service Health" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, service-health] +cis_id: "6.1.2.11" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that an Activity Log Alert exists for Service Health + +## Description + +Create an activity log alert for Service Health. + +## Rationale + +Monitoring for Service Health events provides insight into service issues, planned maintenance, security advisories, and other changes that may affect the Azure services and regions in use. + +## Impact + +There is no charge for creating activity log alert rules. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Monitor`. +2. Click `Alerts`. +3. Click `Alert rules`. +4. Ensure an alert rule exists for a subscription with `Condition` set to `Service names=All, Event types=All` and `Target resource type` set to `Subscription`. +5. If an alert rule is found for step 4, click the name of the alert rule. +6. Ensure the `Actions` panel displays an action group configured to notify appropriate personnel. +7. Repeat steps 1-6 for each subscription. + +### Using Azure CLI + +Run the following command to list activity log alerts: + +```bash +az monitor activity-log alert list --subscription +``` + +For each activity log alert, run the following command: + +```bash +az monitor activity-log alert show --subscription --resource-group --activity-log-alert-name +``` + +Ensure an alert exists for `ServiceHealth` with `scopes` set to a subscription ID. + +Repeat for each subscription. + +### Using PowerShell + +Run the following command to locate `ServiceHealth` alert rules for a subscription: + +```powershell +Get-AzActivityLogAlert -SubscriptionId | where-object {$_.ConditionAllOf.Equal -match "ServiceHealth"} | select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +Ensure that at least one `ServiceHealth` alert rule is returned. + +Repeat for each subscription. + +## Expected Result + +An activity log alert rule should exist for Service Health with `ServiceHealth` category and an action group assigned to notify appropriate personnel. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Monitor`. +2. Click `Alerts`. +3. Click `+ Create`. +4. Select `Alert rule` from the drop-down menu. +5. Choose a subscription. +6. Click `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Service health`. +10. Click `Apply`. +11. Open the drop-down menu next to `Event types`. +12. Check the box next to `Select all`. +13. Select the `Actions` tab. +14. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +15. Follow the prompts to choose or create an action group. +16. Select the `Details` tab. +17. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +18. Click `Review + create`. +19. Click `Create`. +20. Repeat steps 1-19 for each subscription requiring remediation. + +### Remediate from Azure CLI + +For each subscription requiring remediation, run the following command to create a `ServiceHealth` alert rule for a subscription: + +```bash +az monitor activity-log alert create --subscription --resource-group --name --condition category=ServiceHealth and properties.incidentType=Incident --scope /subscriptions/ --action-group +``` + +### Remediate from PowerShell + +Create the `Conditions` object: + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Field category -Equal ServiceHealth +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Field properties.incidentType -Equal Incident +``` + +Retrieve the `Action Group` information and store in a variable: + +```powershell +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id +``` + +Create the `Scope` object: + +```powershell +$scope = "/subscriptions/" +``` + +Create the activity log alert rule: + +```powershell +New-AzActivityLogAlert -Name -ResourceGroupName -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +Repeat for each subscription requiring remediation. + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://learn.microsoft.com/en-us/azure/service-health/overview +2. https://learn.microsoft.com/en-us/azure/service-health/alerts-activity-log-service-notifications-portal +3. https://azure.microsoft.com/en-us/pricing/details/monitor/#faq +4. https://learn.microsoft.com/en-us/cli/azure/monitor/activity-log/alert +5. https://learn.microsoft.com/en-us/powershell/module/az.monitor/get-azactivitylogalert +6. https://learn.microsoft.com/en-us/powershell/module/az.monitor/new-azactivitylogalert + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| | | M1047 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.2/SKILL.md new file mode 100644 index 0000000000..05271e1363 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.2/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-foundations-6.1.2.2 +description: "Ensure Activity Log Alert exists for Delete Policy Assignment" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, policy] +cis_id: "6.1.2.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.2.1] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Activity Log Alert exists for Delete Policy Assignment + +## Description + +Create an activity log alert for the Delete Policy Assignment event. + +## Rationale + +Monitoring for delete policy assignment events gives insight into changes done in "azure policy - assignments" and can reduce the time it takes to detect unsolicited changes. + +## Impact + +None identified. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the `Monitor` blade. +2. Click on `Alerts`. +3. In the Alerts window, click on `Alert rules`. +4. Ensure an alert rule exists where the Condition column contains `Operation name=Microsoft.Authorization/policyAssignments/delete`. +5. Click on the Alert `Name` associated with the previous step. +6. Ensure the `Condition` panel displays the text `Whenever the Activity Log has an event with Category='Administrative', Operation name='Delete policy assignment'` and does not filter on `Level`, `Status` or `Caller`. +7. Ensure the `Actions` panel displays an Action group is assigned to notify the appropriate personnel in your organization. + +### Using Azure CLI + +```bash +az monitor activity-log alert list --subscription --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}" +``` + +Look for `Microsoft.Authorization/policyAssignments/delete` in the output. + +### Using PowerShell + +```powershell +Get-AzActivityLogAlert -SubscriptionId |where-object {$_.ConditionAllOf.Equal -match "Microsoft.Authorization/policyAssignments/delete"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +## Expected Result + +An activity log alert rule should exist with the operation name `Microsoft.Authorization/policyAssignments/delete` and an action group assigned. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the `Monitor` blade. +2. Select `Alerts`. +3. Select `Create`. +4. Select `Alert rule`. +5. Choose a subscription. +6. Select `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Delete policy assignment (Policy assignment)`. +10. Click `Apply`. +11. Select the `Actions` tab. +12. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +13. Follow the prompts to choose or create an action group. +14. Select the `Details` tab. +15. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +16. Click `Review + create`. +17. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor activity-log alert create --resource-group "" --condition category=Administrative and operationName=Microsoft.Authorization/policyAssignments/delete and level= --scope "/subscriptions/" --name "" --subscription --action-group +``` + +### Remediate from PowerShell + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Authorization/policyAssignments/delete -Field operationName +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field level + +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id + +$scope = "/subscriptions/" + +New-AzActivityLogAlert -Name "" -ResourceGroupName "" -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule +2. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update +3. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +5. https://azure.microsoft.com/en-us/products/blueprints/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.3/SKILL.md new file mode 100644 index 0000000000..155035bb8f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.3/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-foundations-6.1.2.3 +description: "Ensure Activity Log Alert exists for Create or Update Network Security Group" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, nsg, network] +cis_id: "6.1.2.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.2.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Activity Log Alert exists for Create or Update Network Security Group + +## Description + +Create an Activity Log Alert for the Create or Update Network Security Group event. + +## Rationale + +Monitoring for Create or Update Network Security Group events gives insight into network access changes and may reduce the time it takes to detect suspicious activity. + +## Impact + +None identified. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the `Monitor` blade. +2. Click on `Alerts`. +3. In the Alerts window, click on `Alert rules`. +4. Ensure an alert rule exists where the Condition column contains `Operation name=Microsoft.Network/networkSecurityGroups/write`. +5. Click on the Alert `Name` associated with the previous step. +6. Ensure the `Condition` panel displays the text `Whenever the Activity Log has an event with Category='Administrative', Operation name='Create or Update Network Security Group'` and does not filter on `Level`, `Status` or `Caller`. +7. Ensure the `Actions` panel displays an Action group is assigned to notify the appropriate personnel in your organization. + +### Using Azure CLI + +```bash +az monitor activity-log alert list --subscription --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}" +``` + +Look for `Microsoft.Network/networkSecurityGroups/write` in the output. + +### Using PowerShell + +```powershell +Get-AzActivityLogAlert -SubscriptionId |where-object {$_.ConditionAllOf.Equal -match "Microsoft.Network/networkSecurityGroups/write"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +## Expected Result + +An activity log alert rule should exist with the operation name `Microsoft.Network/networkSecurityGroups/write` and an action group assigned. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the `Monitor` blade. +2. Select `Alerts`. +3. Select `Create`. +4. Select `Alert rule`. +5. Choose a subscription. +6. Select `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Create or Update Network Security Group (Network Security Group)`. +10. Click `Apply`. +11. Select the `Actions` tab. +12. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +13. Follow the prompts to choose or create an action group. +14. Select the `Details` tab. +15. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +16. Click `Review + create`. +17. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor activity-log alert create --resource-group "" --condition category=Administrative and operationName=Microsoft.Network/networkSecurityGroups/write and level=verbose --scope "/subscriptions/" --name "" --subscription --action-group +``` + +### Remediate from PowerShell + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Network/networkSecurityGroups/write -Field operationName +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field level + +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id + +$scope = "/subscriptions/" + +New-AzActivityLogAlert -Name "" -ResourceGroupName "" -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://azure.microsoft.com/en-us/updates?id=classic-alerting-monitoring-retirement +2. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule +3. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update +4. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.4/SKILL.md new file mode 100644 index 0000000000..b0c9475ed2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.4/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-foundations-6.1.2.4 +description: "Ensure Activity Log Alert exists for Delete Network Security Group" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, nsg, network] +cis_id: "6.1.2.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.2.3] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Activity Log Alert exists for Delete Network Security Group + +## Description + +Create an activity log alert for the Delete Network Security Group event. + +## Rationale + +Monitoring for "Delete Network Security Group" events gives insight into network access changes and may reduce the time it takes to detect suspicious activity. + +## Impact + +None identified. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the `Monitor` blade. +2. Click on `Alerts`. +3. In the Alerts window, click on `Alert rules`. +4. Ensure an alert rule exists where the Condition column contains `Operation name=Microsoft.Network/networkSecurityGroups/delete`. +5. Click on the Alert `Name` associated with the previous step. +6. Ensure the `Condition` panel displays the text `Whenever the Activity Log has an event with Category='Administrative', Operation name='Delete Network Security Group'` and does not filter on `Level`, `Status` or `Caller`. +7. Ensure the `Actions` panel displays an Action group is assigned to notify the appropriate personnel in your organization. + +### Using Azure CLI + +```bash +az monitor activity-log alert list --subscription --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}" +``` + +Look for `Microsoft.Network/networkSecurityGroups/delete` in the output. + +### Using PowerShell + +```powershell +Get-AzActivityLogAlert -SubscriptionId |where-object {$_.ConditionAllOf.Equal -match "Microsoft.Network/networkSecurityGroups/delete"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +## Expected Result + +An activity log alert rule should exist with the operation name `Microsoft.Network/networkSecurityGroups/delete` and an action group assigned. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the `Monitor` blade. +2. Select `Alerts`. +3. Select `Create`. +4. Select `Alert rule`. +5. Choose a subscription. +6. Select `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Delete Network Security Group (Network Security Group)`. +10. Click `Apply`. +11. Select the `Actions` tab. +12. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +13. Follow the prompts to choose or create an action group. +14. Select the `Details` tab. +15. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +16. Click `Review + create`. +17. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor activity-log alert create --resource-group "" --condition category=Administrative and operationName=Microsoft.Network/networkSecurityGroups/delete and level= --scope "/subscriptions/" --name "" --subscription --action-group +``` + +### Remediate from PowerShell + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Network/networkSecurityGroups/delete -Field operationName +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field level + +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id + +$scope = "/subscriptions/" + +New-AzActivityLogAlert -Name "" -ResourceGroupName "" -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://azure.microsoft.com/en-us/updates?id=classic-alerting-monitoring-retirement +2. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule +3. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update +4. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.5/SKILL.md new file mode 100644 index 0000000000..f84b63ed10 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.5/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-foundations-6.1.2.5 +description: "Ensure Activity Log Alert exists for Create or Update Security Solution" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, security] +cis_id: "6.1.2.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.2.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Activity Log Alert exists for Create or Update Security Solution + +## Description + +Create an activity log alert for the Create or Update Security Solution event. + +## Rationale + +Monitoring for Create or Update Security Solution events gives insight into changes to the active security solutions and may reduce the time it takes to detect suspicious activity. + +## Impact + +None identified. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the `Monitor` blade. +2. Click on `Alerts`. +3. In the Alerts window, click on `Alert rules`. +4. Ensure an alert rule exists where the Condition column contains `Operation name=Microsoft.Security/securitySolutions/write`. +5. Click on the Alert `Name` associated with the previous step. +6. Ensure the `Condition` panel displays the text `Whenever the Activity Log has an event with Category='Administrative', Operation name='Create or Update Security Solutions'` and does not filter on `Level`, `Status` or `Caller`. +7. Ensure the `Actions` panel displays an Action group is assigned to notify the appropriate personnel in your organization. + +### Using Azure CLI + +```bash +az monitor activity-log alert list --subscription --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}" +``` + +Look for `Microsoft.Security/securitySolutions/write` in the output. + +### Using PowerShell + +```powershell +Get-AzActivityLogAlert -SubscriptionId |where-object {$_.ConditionAllOf.Equal -match "Microsoft.Security/securitySolutions/write"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +## Expected Result + +An activity log alert rule should exist with the operation name `Microsoft.Security/securitySolutions/write` and an action group assigned. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the `Monitor` blade. +2. Select `Alerts`. +3. Select `Create`. +4. Select `Alert rule`. +5. Choose a subscription. +6. Select `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Create or Update Security Solutions (Security Solutions)`. +10. Click `Apply`. +11. Select the `Actions` tab. +12. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +13. Follow the prompts to choose or create an action group. +14. Select the `Details` tab. +15. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +16. Click `Review + create`. +17. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor activity-log alert create --resource-group "" --condition category=Administrative and operationName=Microsoft.Security/securitySolutions/write and level= --scope "/subscriptions/" --name "" --subscription --action-group +``` + +### Remediate from PowerShell + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Security/securitySolutions/write -Field operationName +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field level + +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id + +$scope = "/subscriptions/" + +New-AzActivityLogAlert -Name "" -ResourceGroupName "" -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://azure.microsoft.com/en-us/updates?id=classic-alerting-monitoring-retirement +2. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule +3. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update +4. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.6/SKILL.md new file mode 100644 index 0000000000..5a2a3b0a34 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.6/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-foundations-6.1.2.6 +description: "Ensure Activity Log Alert exists for Delete Security Solution" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, security] +cis_id: "6.1.2.6" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.2.5] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Activity Log Alert exists for Delete Security Solution + +## Description + +Create an activity log alert for the Delete Security Solution event. + +## Rationale + +Monitoring for Delete Security Solution events gives insight into changes to the active security solutions and may reduce the time it takes to detect suspicious activity. + +## Impact + +None identified. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the `Monitor` blade. +2. Click on `Alerts`. +3. In the Alerts window, click on `Alert rules`. +4. Ensure an alert rule exists where the Condition column contains `Operation name=Microsoft.Security/securitySolutions/delete`. +5. Click on the Alert `Name` associated with the previous step. +6. Ensure the `Condition` panel displays the text `Whenever the Activity Log has an event with Category='Administrative', Operation name='Delete Security Solutions'` and does not filter on `Level`, `Status` or `Caller`. +7. Ensure the `Actions` panel displays an Action group is assigned to notify the appropriate personnel in your organization. + +### Using Azure CLI + +```bash +az monitor activity-log alert list --subscription --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}" +``` + +Look for `Microsoft.Security/securitySolutions/delete` in the output. + +### Using PowerShell + +```powershell +Get-AzActivityLogAlert -SubscriptionId |where-object {$_.ConditionAllOf.Equal -match "Microsoft.Security/securitySolutions/delete"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +## Expected Result + +An activity log alert rule should exist with the operation name `Microsoft.Security/securitySolutions/delete` and an action group assigned. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the `Monitor` blade. +2. Select `Alerts`. +3. Select `Create`. +4. Select `Alert rule`. +5. Choose a subscription. +6. Select `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Delete Security Solutions (Security Solutions)`. +10. Click `Apply`. +11. Select the `Actions` tab. +12. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +13. Follow the prompts to choose or create an action group. +14. Select the `Details` tab. +15. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +16. Click `Review + create`. +17. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor activity-log alert create --resource-group "" --condition category=Administrative and operationName=Microsoft.Security/securitySolutions/delete and level= --scope "/subscriptions/" --name "" --subscription --action-group +``` + +### Remediate from PowerShell + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Security/securitySolutions/delete -Field operationName +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field level + +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id + +$scope = "/subscriptions/" + +New-AzActivityLogAlert -Name "" -ResourceGroupName "" -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://azure.microsoft.com/en-us/updates?id=classic-alerting-monitoring-retirement +2. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule +3. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update +4. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.7/SKILL.md new file mode 100644 index 0000000000..d02ef0e483 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.7/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-foundations-6.1.2.7 +description: "Ensure Activity Log Alert exists for Create or Update SQL Server Firewall Rule" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, sql, firewall] +cis_id: "6.1.2.7" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.2.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Activity Log Alert exists for Create or Update SQL Server Firewall Rule + +## Description + +Create an activity log alert for the Create or Update SQL Server Firewall Rule event. + +## Rationale + +Monitoring for Create or Update SQL Server Firewall Rule events gives insight into network access changes and may reduce the time it takes to detect suspicious activity. + +## Impact + +There will be a substantial increase in log size if there are a large number of administrative actions on a server. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the `Monitor` blade. +2. Click on `Alerts`. +3. In the Alerts window, click on `Alert rules`. +4. Ensure an alert rule exists where the Condition column contains `Operation name=Microsoft.Sql/servers/firewallRules/write`. +5. Click on the Alert `Name` associated with the previous step. +6. Ensure the `Condition` panel displays the text `Whenever the Activity Log has an event with Category='Administrative', Operation name='Create/Update server firewall rule'` and does not filter on `Level`, `Status` or `Caller`. +7. Ensure the `Actions` panel displays an Action group is assigned to notify the appropriate personnel in your organization. + +### Using Azure CLI + +```bash +az monitor activity-log alert list --subscription --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}" +``` + +Look for `Microsoft.Sql/servers/firewallRules/write` in the output. + +### Using PowerShell + +```powershell +Get-AzActivityLogAlert -SubscriptionId |where-object {$_.ConditionAllOf.Equal -match "Microsoft.Sql/servers/firewallRules/write"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +## Expected Result + +An activity log alert rule should exist with the operation name `Microsoft.Sql/servers/firewallRules/write` and an action group assigned. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the `Monitor` blade. +2. Select `Alerts`. +3. Select `Create`. +4. Select `Alert rule`. +5. Choose a subscription. +6. Select `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Create/Update server firewall rule (Server Firewall Rule)`. +10. Click `Apply`. +11. Select the `Actions` tab. +12. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +13. Follow the prompts to choose or create an action group. +14. Select the `Details` tab. +15. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +16. Click `Review + create`. +17. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor activity-log alert create --resource-group "" --condition category=Administrative and operationName=Microsoft.Sql/servers/firewallRules/write and level= --scope "/subscriptions/" --name "" --subscription --action-group +``` + +### Remediate from PowerShell + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Sql/servers/firewallRules/write -Field operationName +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field level + +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id + +$scope = "/subscriptions/" + +New-AzActivityLogAlert -Name "" -ResourceGroupName "" -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://azure.microsoft.com/en-us/updates?id=classic-alerting-monitoring-retirement +2. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule +3. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update +4. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.8/SKILL.md new file mode 100644 index 0000000000..d1e94a039b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.8/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-foundations-6.1.2.8 +description: "Ensure Activity Log Alert exists for Delete SQL Server Firewall Rule" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, sql, firewall] +cis_id: "6.1.2.8" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.2.7] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Activity Log Alert exists for Delete SQL Server Firewall Rule + +## Description + +Create an activity log alert for the "Delete SQL Server Firewall Rule." + +## Rationale + +Monitoring for Delete SQL Server Firewall Rule events gives insight into SQL network access changes and may reduce the time it takes to detect suspicious activity. + +## Impact + +There will be a substantial increase in log size if there are a large number of administrative actions on a server. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the `Monitor` blade. +2. Click on `Alerts`. +3. In the Alerts window, click on `Alert rules`. +4. Ensure an alert rule exists where the Condition column contains `Operation name=Microsoft.Sql/servers/firewallRules/delete`. +5. Click on the Alert `Name` associated with the previous step. +6. Ensure the `Condition` panel displays the text `Whenever the Activity Log has an event with Category='Administrative', Operation name='Delete server firewall rule'` and does not filter on `Level`, `Status` or `Caller`. +7. Ensure the `Actions` panel displays an Action group is assigned to notify the appropriate personnel in your organization. + +### Using Azure CLI + +```bash +az monitor activity-log alert list --subscription --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}" +``` + +Look for `Microsoft.Sql/servers/firewallRules/delete` in the output. + +### Using PowerShell + +```powershell +Get-AzActivityLogAlert -SubscriptionId |where-object {$_.ConditionAllOf.Equal -match "Microsoft.Sql/servers/firewallRules/delete"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +## Expected Result + +An activity log alert rule should exist with the operation name `Microsoft.Sql/servers/firewallRules/delete` and an action group assigned. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the `Monitor` blade. +2. Select `Alerts`. +3. Select `Create`. +4. Select `Alert rule`. +5. Choose a subscription. +6. Select `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Delete server firewall rule (Server Firewall Rule)`. +10. Click `Apply`. +11. Select the `Actions` tab. +12. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +13. Follow the prompts to choose or create an action group. +14. Select the `Details` tab. +15. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +16. Click `Review + create`. +17. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor activity-log alert create --resource-group "" --condition category=Administrative and operationName=Microsoft.Sql/servers/firewallRules/delete and level= --scope "/subscriptions/" --name "" --subscription --action-group +``` + +### Remediate from PowerShell + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Sql/servers/firewallRules/delete -Field operationName +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field level + +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id + +$scope = "/subscriptions/" + +New-AzActivityLogAlert -Name "" -ResourceGroupName "" -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://azure.microsoft.com/en-us/updates?id=classic-alerting-monitoring-retirement +2. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule +3. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update +4. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.9/SKILL.md new file mode 100644 index 0000000000..87d1fd6a22 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.2.9/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-foundations-6.1.2.9 +description: "Ensure Activity Log Alert exists for Create or Update Public IP Address rule" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, activity-log-alerts, network, public-ip] +cis_id: "6.1.2.9" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.2.10] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Activity Log Alert exists for Create or Update Public IP Address rule + +## Description + +Create an activity log alert for the Create or Update Public IP Addresses rule. + +## Rationale + +Monitoring for Create or Update Public IP Address events gives insight into network access changes and may reduce the time it takes to detect suspicious activity. + +## Impact + +There will be a substantial increase in log size if there are a large number of administrative actions on a server. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the `Monitor` blade. +2. Click on `Alerts`. +3. In the Alerts window, click on `Alert rules`. +4. Ensure an alert rule exists where the Condition column contains `Operation name=Microsoft.Network/publicIPAddresses/write`. +5. Click on the Alert `Name` associated with the previous step. +6. Ensure the `Condition` panel displays the text `Whenever the Activity Log has an event with Category='Administrative', Operation name='Create or Update Public Ip Address'` and does not filter on `Level`, `Status` or `Caller`. +7. Ensure the `Actions` panel displays an Action group is assigned to notify the appropriate personnel in your organization. + +### Using Azure CLI + +```bash +az monitor activity-log alert list --subscription --query "[].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}" +``` + +Look for `Microsoft.Network/publicIPAddresses/write` in the output. + +### Using PowerShell + +```powershell +Get-AzActivityLogAlert -SubscriptionId |where-object {$_.ConditionAllOf.Equal -match "Microsoft.Network/publicIPAddresses/write"}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOf +``` + +## Expected Result + +An activity log alert rule should exist with the operation name `Microsoft.Network/publicIPAddresses/write` and an action group assigned. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the `Monitor` blade. +2. Select `Alerts`. +3. Select `Create`. +4. Select `Alert rule`. +5. Choose a subscription. +6. Select `Apply`. +7. Select the `Condition` tab. +8. Click `See all signals`. +9. Select `Create or Update Public Ip Address (Public Ip Address)`. +10. Click `Apply`. +11. Select the `Actions` tab. +12. Click `Select action groups` to select an existing action group, or `Create action group` to create a new action group. +13. Follow the prompts to choose or create an action group. +14. Select the `Details` tab. +15. Select a `Resource group`, provide an `Alert rule name` and an optional `Alert rule description`. +16. Click `Review + create`. +17. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor activity-log alert create --resource-group "" --condition category=Administrative and operationName=Microsoft.Network/publicIPAddresses/write and level= --scope "/subscriptions/" --name "" --subscription --action-group +``` + +### Remediate from PowerShell + +```powershell +$conditions = @() +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Network/publicIPAddresses/write -Field operationName +$conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field level + +$actionGroup = Get-AzActionGroup -ResourceGroupName -Name +$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.Id + +$scope = "/subscriptions/" + +New-AzActivityLogAlert -Name "" -ResourceGroupName "" -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription -Enabled $true +``` + +## Default Value + +By default, no monitoring alerts are created. + +## References + +1. https://azure.microsoft.com/en-us/updates?id=classic-alerting-monitoring-retirement +2. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-activity-log-alert-rule +3. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update +4. https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/list-by-subscription-id +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.3.1/SKILL.md new file mode 100644 index 0000000000..e55b7466dc --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.3.1/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-azure-foundations-6.1.3.1 +description: "Ensure Application Insights are Configured" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, application-insights, app-monitoring] +cis_id: "6.1.3.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Application Insights are Configured + +## Description + +Application Insights within Azure act as an Application Performance Monitoring solution providing valuable data into how well an application performs and additional information when performing incident response. The types of log data collected include application metrics, telemetry data, and application trace logging data providing organizations with detailed information about application activity and application transactions. Both data sets help organizations adopt a proactive and retroactive means to handle security and performance related metrics within their modern applications. + +## Rationale + +Configuring Application Insights provides additional data not found elsewhere within Azure as part of a much larger logging and monitoring program within an organization's Information Security practice. The types and contents of these logs will act as both a potential cost saving measure (application performance) and a means to potentially confirm the source of a potential incident (trace logging). Metrics and Telemetry data provide organizations with a proactive approach to cost savings by monitoring an application's performance, while the trace logging data provides necessary details in a reactive incident response scenario by helping organizations identify the potential source of an incident within their application. + +## Impact + +Because Application Insights relies on a Log Analytics Workspace, an organization will incur additional expenses when using this service. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to `Application Insights`. +2. Ensure an `Application Insights` service is configured and exists. + +### Using Azure CLI + +```bash +az monitor app-insights component show --query "[].{ID:appId, Name:name, Tenant:tenantId, Location:location, Provisioning_State:provisioningState}" +``` + +Ensure the above command produces output, otherwise `Application Insights` has not been configured. + +### Using PowerShell + +```powershell +Get-AzApplicationInsights|select location,name,appid,provisioningState,tenantid +``` + +## Expected Result + +At least one Application Insights resource should be configured and exist with a successful provisioning state. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to `Application Insights`. +2. Under the `Basics` tab within the `PROJECT DETAILS` section, select the `Subscription`. +3. Select the `Resource group`. +4. Within the `INSTANCE DETAILS`, enter a `Name`. +5. Select a `Region`. +6. Next to `Resource Mode`, select `Workspace-based`. +7. Within the `WORKSPACE DETAILS`, select the `Subscription` for the log analytics workspace. +8. Select the appropriate `Log Analytics Workspace`. +9. Click `Next:Tags >`. +10. Enter the appropriate `Tags` as `Name`, `Value` pairs. +11. Click `Next:Review+Create`. +12. Click `Create`. + +### Remediate from Azure CLI + +```bash +az monitor app-insights component create --app --resource-group --location --kind "web" --retention-time --workspace --subscription +``` + +### Remediate from PowerShell + +```powershell +New-AzApplicationInsights -Kind "web" -ResourceGroupName -Name -location -RetentionInDays -SubscriptionID -WorkspaceResourceId +``` + +## Default Value + +Application Insights are not enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------- | ---- | ---- | ---- | +| v8 | 8.2 Collect Audit Logs | x | x | x | +| v7 | 6.2 Activate audit logging | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1606 | TA0006 | M1047 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.4/SKILL.md new file mode 100644 index 0000000000..634ec43ffa --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.4/SKILL.md @@ -0,0 +1,167 @@ +--- +name: cis-azure-foundations-6.1.4 +description: "Ensure that Azure Monitor Resource Logging is Enabled for All Services that Support it" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, resource-logging, diagnostic-settings] +cis_id: "6.1.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-6.1.1.1] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Azure Monitor Resource Logging is Enabled for All Services that Support it + +## Description + +Resource Logs capture activity to the data access plane while the Activity log is a subscription-level log for the control plane. Resource-level diagnostic logs provide insight into operations that were performed within that resource itself; for example, reading or updating a secret from a Key Vault. Currently, 95 Azure resources support Azure Monitoring (See the more information section for a complete list), including Network Security Groups, Load Balancers, Key Vault, AD, Logic Apps, and CosmosDB. The content of these logs varies by resource type. + +A number of back-end services were not configured to log and store Resource Logs for certain activities or for a sufficient length. It is crucial that monitoring is correctly configured to log all relevant activities and retain those logs for a sufficient length of time. Given that the mean time to detection in an enterprise is 240 days, a minimum retention period of two years is recommended. + +While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Determining whether resource logging should be enabled for specific resources depends on the context and requirements of each organization and environment. + +## Rationale + +A lack of monitoring reduces the visibility into the data plane, and therefore an organization's ability to detect reconnaissance, authorization attempts or other malicious activity. Unlike Activity Logs, Resource Logs are not enabled by default. Specifically, without monitoring it would be impossible to tell which entities had accessed a data store that was breached. In addition, alerts for failed attempts to access APIs for Web Services or Databases are only possible when logging is enabled. + +This recommendation's Level 1 profile is dependent upon the free level of retention of 30 days. More than 30 days retention of resource logs will increase the cost of this recommendation. + +## Impact + +Costs for monitoring varies with Log Volume. Not every resource needs to have logging enabled. It is important to determine the security classification of the data being processed by the given resource and adjust the logging based on which events need to be tracked. This is typically determined by governance and compliance requirements. + +## Audit Procedure + +### Using Azure Portal + +The specific steps for configuring resources within the Azure console vary depending on resource, but typically the steps are: + +1. Go to the resource. +2. Click on Diagnostic settings. +3. In the blade that appears, click "Add diagnostic setting". +4. Configure the diagnostic settings. +5. Click on Save. + +### Using Azure CLI + +List all `resources` for a `subscription`: + +```bash +az resource list --subscription +``` + +For each `resource` run the following: + +```bash +az monitor diagnostic-settings list --resource +``` + +An empty result means a `diagnostic settings` is not configured for that resource. An error message means a `diagnostic settings` is not supported for that resource. + +### Using PowerShell + +Get a list of `resources` in a `subscription` context and store in a variable: + +```powershell +$resources = Get-AzResource +``` + +Loop through each `resource` to determine if a diagnostic setting is configured or not: + +```powershell +foreach ($resource in $resources) {$diagnosticSetting = Get-AzDiagnosticSetting -ResourceId $resource.id -ErrorAction "SilentlyContinue"; if ([string]::IsNullOrEmpty($diagnosticSetting)) {$message = "Diagnostic Settings not configured for resource: " + $resource.Name;Write-Output $message}else{$diagnosticSetting}} +``` + +A result of `Diagnostic Settings not configured for resource: ` means a `diagnostic settings` is not configured for that resource. Otherwise, the output of the above command will show configured `Diagnostic Settings` for a resource. + +## Expected Result + +All resources that support diagnostic settings should have resource logging enabled with appropriate retention periods configured. + +## Remediation + +### Remediate from Azure Portal + +The specific steps for configuring resources within the Azure console vary depending on resource, but typically the steps are: + +1. Go to the resource. +2. Click on Diagnostic settings. +3. In the blade that appears, click "Add diagnostic setting". +4. Configure the diagnostic settings. +5. Click on Save. + +### Remediate from Azure CLI + +For each `resource`, run the following making sure to use a `resource` appropriate JSON encoded `category` for the `--logs` option. + +```bash +az monitor diagnostic-settings create --name --resource --logs "[{category:,enabled:true,retention-policy:{enabled:true,days:180}}]" --metrics "[{category:AllMetrics,enabled:true,retention-policy:{enabled:true,days:180}}]" <[--event-hub --event-hub-rule | --storage-account |--workspace | --marketplace-partner-id ]> +``` + +### Remediate from PowerShell + +Create the `log` settings object: + +```powershell +$logSettings = @() +$logSettings += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -RetentionPolicyDay 180 -RetentionPolicyEnabled $true -Category +$logSettings += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -RetentionPolicyDay 180 -RetentionPolicyEnabled $true -Category +``` + +Create the `metric` settings object: + +```powershell +$metricSettings = @() +$metricSettings += New-AzDiagnosticSettingMetricSettingsObject -Enabled $true -RetentionPolicyDay 180 -RetentionPolicyEnabled $true -Category AllMetrics +``` + +Create the diagnostic setting for a specific resource: + +```powershell +New-AzDiagnosticSetting -Name "" -ResourceId -Log $logSettings -Metric $metricSettings +``` + +## Default Value + +By default, Azure Monitor Resource Logs are 'Disabled' for all resources. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-5-centralize-security-log-management-and-analysis +3. https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/monitor-azure-resource +4. Supported Log Categories: https://learn.microsoft.com/en-us/azure/azure-monitor/reference/logs-index +5. Logs and Audit - Fundamentals: https://learn.microsoft.com/en-us/azure/security/fundamentals/log-audit +6. Collecting Logs: https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log +7. Key Vault Logging: https://learn.microsoft.com/en-us/azure/key-vault/general/logging +8. Monitor Diagnostic Settings: https://learn.microsoft.com/en-us/cli/azure/monitor/diagnostic-settings +9. Overview of Diagnostic Logs: https://learn.microsoft.com/en-us/azure/azure-monitor/fundamentals/data-sources +10. Supported Services for Diagnostic Logs: https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/resource-logs-schema +11. Diagnostic Logs for CDNs: https://learn.microsoft.com/en-us/azure/cdn/cdn-azure-diagnostic-logs + +## Additional Information + +For an up-to-date list of Azure resources which support Azure Monitor, refer to the "Supported Log Categories" reference. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------- | ---- | ---- | ---- | +| v8 | 8.5 Collect Detailed Audit Logs | | x | x | +| v8 | 8.9 Centralize Audit Logs | | x | x | +| v7 | 6.3 Enable Detailed Logging | | x | x | +| v7 | 6.5 Central Log Management | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1485 | TA0040 | M1053 | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.5/SKILL.md new file mode 100644 index 0000000000..3b2bba89f2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.1.5/SKILL.md @@ -0,0 +1,128 @@ +--- +name: cis-azure-foundations-6.1.5 +description: "Ensure that SKU Basic/Consumption is not used on artifacts that need to be monitored" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, logging, monitoring, sku, production-workloads] +cis_id: "6.1.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that SKU Basic/Consumption is not used on artifacts that need to be monitored (Particularly for Production Workloads) + +## Description + +The use of Basic or Free SKUs in Azure whilst cost effective have significant limitations in terms of what can be monitored and what support can be realized from Microsoft. Typically, these SKUs do not have a service SLA and Microsoft may refuse to provide support for them. Consequently Basic/Free SKUs should never be used for production workloads. + +While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Determining appropriate SKUs depends on the context and requirements of each organization and environment. + +## Rationale + +Typically, production workloads need to be monitored and should have an SLA with Microsoft, using Basic SKUs for any deployed product will mean that these capabilities do not exist. + +The following resource types should use standard SKUs as a minimum: + +- Public IP Addresses +- Network Load Balancers +- REDIS Cache +- SQL PaaS Databases +- VPN Gateways + +## Impact + +The impact of enforcing Standard SKUs is twofold: + +1. There will be a cost increase. +2. The monitoring and service level agreements will be available and will support the production service. + +All resources should be either tagged or in separate Management Groups/Subscriptions. + +## Audit Procedure + +### Using Azure Portal + +1. Open `Azure Resource Graph Explorer`. +2. Click `New query`. +3. Paste the following into the query window: + +``` +Resources +| where sku contains 'Basic' or sku contains 'consumption' +| order by type +``` + +4. Click `Run query` then evaluate the results in the results window. +5. Ensure that no production artifacts are returned. + +### Using Azure CLI + +```bash +az graph query -q "Resources | where sku contains 'Basic' or sku contains 'consumption' | order by type" +``` + +Alternatively, to filter on a specific resource group: + +```bash +az graph query -q "Resources | where resourceGroup == '' | where sku contains 'Basic' or sku contains 'consumption' | order by type" +``` + +Ensure that no production artifacts are returned. + +### Using PowerShell + +```powershell +Get-AzResource | ?{ $_.Sku -EQ "Basic"} +``` + +Ensure that no production artifacts are returned. + +## Expected Result + +No production resources should be using Basic or Consumption SKUs. All production workloads should use Standard or higher SKUs. + +## Remediation + +Each resource has its own process for upgrading from basic to standard SKUs that should be followed if required. + +- Public IP Address: https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/public-ip-upgrade +- Basic Load Balancer: https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-basic-upgrade-guidance +- Azure Cache for Redis: https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-scale +- Azure SQL Database: https://learn.microsoft.com/en-us/azure/azure-sql/database/scale-resources +- VPN Gateway: https://learn.microsoft.com/en-us/azure/vpn-gateway/gateway-sku-resize + +## Default Value + +Policy should enforce standard SKUs for the following artifacts: + +- Public IP Addresses +- Network Load Balancers +- REDIS Cache +- SQL PaaS Databases +- VPN Gateways + +## References + +1. https://azure.microsoft.com/en-us/support/plans +2. https://azure.microsoft.com/en-us/support/plans/response/ +3. https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/public-ip-upgrade +4. https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-basic-upgrade-guidance +5. https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-scale +6. https://learn.microsoft.com/en-us/azure/azure-sql/database/scale-resources +7. https://learn.microsoft.com/en-us/azure/vpn-gateway/gateway-sku-resize + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.2 Ensure Authorized Software is Currently Supported | x | x | x | +| v7 | 2.2 Ensure Software is Supported by Vendor | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.2/SKILL.md new file mode 100644 index 0000000000..762bf9f5ab --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-6.2/SKILL.md @@ -0,0 +1,116 @@ +--- +name: cis-azure-foundations-6.2 +description: "Ensure that Resource Locks are set for Mission-Critical Azure Resources" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, governance, resource-locks, access-control] +cis_id: "6.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure that Resource Locks are set for Mission-Critical Azure Resources + +## Description + +Resource Manager Locks provide a way for administrators to lock down Azure resources to prevent deletion of, or modifications to, a resource. These locks sit outside of the Role Based Access Controls (RBAC) hierarchy and, when applied, will place restrictions on the resource for all users. These locks are very useful when there is an important resource in a subscription that users should not be able to delete or change. Locks can help prevent accidental and malicious changes or deletion. + +While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Determining resources that require resource locks depends on the context and requirements of each organization and environment. + +## Rationale + +As an administrator, it may be necessary to lock a subscription, resource group, or resource to prevent other users in the organization from accidentally deleting or modifying critical resources. The lock level can be set to `CanNotDelete` or `ReadOnly` to achieve this purpose. + +- `CanNotDelete` means authorized users can still read and modify a resource, but they cannot delete the resource. +- `ReadOnly` means authorized users can read a resource, but they cannot delete or update the resource. Applying this lock is similar to restricting all authorized users to the permissions granted by the Reader role. + +## Impact + +There can be unintended outcomes of locking a resource. Applying a lock to a parent service will cause it to be inherited by all resources within. Conversely, applying a lock to a resource may not apply to connected storage, leaving it unlocked. Please see the documentation for further information. + +## Audit Procedure + +### Using Azure Portal + +1. Navigate to the specific Azure Resource or Resource Group. +2. Click on `Locks`. +3. Ensure the lock is defined with name and description, with type `Read-only` or `Delete` as appropriate. + +### Using Azure CLI + +Review the list of all locks set currently: + +```bash +az lock list --resource-group --resource-name --namespace --resource-type --parent "" +``` + +### Using PowerShell + +Run the following command to list all resources: + +```powershell +Get-AzResource +``` + +For each resource, run the following command to check for Resource Locks: + +```powershell +Get-AzResourceLock -ResourceName -ResourceType -ResourceGroupName +``` + +Review the output of the `Properties` setting. Compliant settings will have the `CanNotDelete` or `ReadOnly` value. + +## Expected Result + +Mission-critical Azure resources should have appropriate resource locks (CanNotDelete or ReadOnly) applied to prevent accidental or malicious modification or deletion. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the specific Azure Resource or Resource Group. +2. For each mission critical resource, click on `Locks`. +3. Click `Add`. +4. Give the lock a name and a description, then select the type, `Read-only` or `Delete` as appropriate. +5. Click OK. + +### Remediate from Azure CLI + +To lock a resource, provide the name of the resource, its resource type, and its resource group name. + +```bash +az lock create --name --lock-type --resource-group --resource-name --resource-type +``` + +### Remediate from PowerShell + +```powershell +Get-AzResourceLock -ResourceName -ResourceType -ResourceGroupName -Locktype +``` + +## Default Value + +By default, no locks are set. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources +2. https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/landing-zone/design-area/management-platform#inventory-and-visibility-recommendations +3. https://learn.microsoft.com/en-us/azure/governance/blueprints/concepts/resource-locking +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-asset-management#am-4-limit-access-to-asset-management + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists | x | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.1/SKILL.md new file mode 100644 index 0000000000..56cca5d5c3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.1/SKILL.md @@ -0,0 +1,136 @@ +--- +name: cis-azure-foundations-7.1 +description: "Ensure RDP access from the Internet is evaluated and restricted" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, nsg] +cis_id: "7.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: + [cis-azure-foundations-7.2, cis-azure-foundations-7.3, cis-azure-foundations-7.4, cis-azure-foundations-7.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure RDP access from the Internet is evaluated and restricted + +## Description + +Network security groups should be periodically evaluated for port misconfigurations. Where RDP is not explicitly required and narrowly configured for resources attached to a network security group, Internet-level access to Azure resources should be restricted or eliminated. + +## Rationale + +The potential security problem with using RDP over the Internet is that attackers can use various brute force techniques to gain access to Azure Virtual Machines. Once the attackers gain access, they can use a virtual machine as a launch point for compromising other machines on the Azure Virtual Network or even attack networked devices outside of Azure. + +## Impact + +None documented. Restricting RDP access from the Internet is a security best practice with no negative functional impact when properly configured with alternative access methods such as VPN, ExpressRoute, or Azure Bastion. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Network security groups`. +2. Click the name of a network security group. +3. Under `Settings`, click `Inbound security rules`. +4. Ensure that no inbound security rule exists that matches the following: + - Port: `3389` or range including 3389 + - Protocol: `TCP` or `Any` + - Source: `0.0.0.0/0`, `Internet`, or `Any` + - Action: `Allow` +5. Repeat steps 1-4 for each network security group. + +### Using Azure Resource Graph + +1. Go to `Resource Graph Explorer`. +2. Click `New query`. +3. Paste the following into the query window: + +```kql +resources | where type =~ "microsoft.network/networksecuritygroups" | project id, name, securityRule = properties.securityRules | mv-expand securityRule | extend access = securityRule.properties.access, direction = securityRule.properties.direction, protocol = securityRule.properties.protocol, destinationPort = case(isempty(securityRule.properties.destinationPortRange), securityRule.properties.destinationPortRanges, securityRule.properties.destinationPortRange), sourceAddress = case(isempty(securityRule.properties.sourceAddressPrefix), securityRule.properties.sourceAddressPrefixes, securityRule.properties.sourceAddressPrefix) | where access =~ "Allow" and direction =~ "Inbound" and protocol in~ ("tcp", "*") | mv-expand destinationPort | mv-expand sourceAddress | extend destinationPortMin = toint(split(destinationPort, "-")[0]), destinationPortMax = toint(split(destinationPort, "-")[-1]) | where (destinationPortMin <= 3389 and destinationPortMax >= 3389) or destinationPort == "" | where sourceAddress in~ ("*", "0.0.0.0", "internet", "any") or sourceAddress endswith "/0" +``` + +4. Click `Run query`. +5. Ensure that no results are returned. + +### Using Azure CLI + +List network security groups with non-default security rules: + +```bash +az network nsg list --query [*].[name,securityRules] +``` + +Ensure that no network security group has an inbound security rule that matches the following: + +```json +"access" : "Allow" +"destinationPortRange" : "3389", "*", or "" +"direction" : "Inbound" +"protocol" : "TCP" or "*" +"sourceAddressPrefix" : "0.0.0.0/0", "Internet", or "*" +``` + +### Using Azure Policy + +- **Policy ID:** 22730e10-96f6-4aac-ad84-9383d35b5917 - **Name:** 'Management ports should be closed on your virtual machines' + +## Expected Result + +No inbound security rules should allow unrestricted RDP access (port 3389) from the Internet. The Azure Resource Graph query should return zero results. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Network security groups`. +2. Click the name of a network security group. +3. Under `Settings`, click `Inbound security rules`. +4. Check the box next to any inbound security rule matching: + - Port: `3389` or range including 3389 + - Protocol: `TCP` or `Any` + - Source: `0.0.0.0/0`, `Internet`, or `Any` + - Action: `Allow` +5. Click `Delete`. +6. Click `Yes`. +7. Repeat steps 1-6 for each network security group requiring remediation. + +### Remediate from Azure CLI + +For each network security group rule requiring remediation, run the following command to delete the rule: + +```bash +az network nsg rule delete --resource-group --nsg-name --name +``` + +## Default Value + +By default, RDP access from internet is not `enabled`. + +## References + +1. https://learn.microsoft.com/en-us/azure/security/fundamentals/network-best-practices#disable-rdpssh-access-to-virtual-machines +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-1-establish-network-segmentation-boundaries +3. Express Route: https://learn.microsoft.com/en-us/azure/expressroute/ +4. Site-to-Site VPN: https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal +5. Point-to-Site VPN: https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-certificate-gateway + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 13.4 Perform Traffic Filtering Between Network Segments | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1021.001 | TA0001 | M1035 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.10/SKILL.md new file mode 100644 index 0000000000..28416dd7b2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.10/SKILL.md @@ -0,0 +1,110 @@ +--- +name: cis-azure-foundations-7.10 +description: "Ensure Azure Web Application Firewall (WAF) is enabled on Azure Application Gateway" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, waf, application-gateway] +cis_id: "7.10" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: + [cis-azure-foundations-7.12, cis-azure-foundations-7.13, cis-azure-foundations-7.14, cis-azure-foundations-7.15] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Azure Web Application Firewall (WAF) is enabled on Azure Application Gateway + +## Description + +Azure Web Application Firewall helps protect applications from common exploits and attacks by inspecting and filtering incoming traffic. + +## Rationale + +Using Azure Web Application Firewall with Azure Application Gateway reduces exposure to external threats by mitigating attacks on public facing applications. + +## Impact + +The `WAF V2` tier for Azure Application Gateways costs more than the `Basic` and `Standard V2` tiers. Pricing includes a fixed hourly charge plus a charge per capacity-unit hour. Refer to https://azure.microsoft.com/en-gb/pricing/details/application-gateway/ for details. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Application gateways`. +2. Click the name of an application gateway. +3. In the `Overview`, under `Essentials`, ensure `Tier` is set to `WAF V2`. +4. Repeat steps 1-3 for each application gateway. + +### Using Azure CLI + +Run the following command to list application gateways: + +```bash +az network application-gateway list +``` + +For each application gateway, run the following command to get the firewall policy id: + +```bash +az network application-gateway show --resource-group --name --query firewallPolicy.id +``` + +Ensure a firewall policy id is returned. + +### Using Azure Policy + +- **Policy ID:** 564feb30-bf6a-4854-b4bb-0d2d2d1e6c66 - **Name:** 'Web Application Firewall (WAF) should be enabled for Application Gateway' + +## Expected Result + +All Application Gateways should have `Tier` set to `WAF V2` and have a firewall policy associated. + +## Remediation + +**Note:** `Basic` tier application gateways cannot be upgraded to the `WAF V2` tier. Create a new `WAF V2` tier application gateway to replace a `Basic` tier application gateway. + +### Remediate from Azure Portal + +To remediate a `Standard V2` tier application gateway: + +1. Go to `Application gateways`. +2. Click `Add filter`. +3. From the `Filter` drop-down menu, select `SKU size`. +4. Check the box next to `Standard_v2` only. +5. Click `Apply`. +6. Click the name of an application gateway. +7. Under `Settings`, click `Web application firewall`. +8. Under `Configure`, next to `Tier`, click `WAF V2`. +9. Select an existing or create a new `WAF policy`. +10. Click `Save`. +11. Repeat steps 1-10 for each `Standard V2` tier application gateway requiring remediation. + +## Default Value + +Azure Web Application Firewall is enabled by default for the `WAF V2` tier of Azure Application Gateway. It is not available in the `Basic` tier. Application gateways deployed using the `Standard V2` tier can be upgraded to the `WAF V2` tier to enable Azure Web Application Firewall. + +## References + +1. https://learn.microsoft.com/en-us/azure/application-gateway/features +2. https://learn.microsoft.com/en-us/cli/azure/network/application-gateway +3. https://azure.microsoft.com/en-us/pricing/details/application-gateway + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------- | ---- | ---- | ---- | +| v8 | 13.10 Perform Application Layer Filtering | | | x | +| v7 | 12.9 Deploy Application Layer Filtering Proxy Server | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1190 | TA0001 | M1030 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.11/SKILL.md new file mode 100644 index 0000000000..f9d5ba06da --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.11/SKILL.md @@ -0,0 +1,118 @@ +--- +name: cis-azure-foundations-7.11 +description: "Ensure subnets are associated with network security groups" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, nsg] +cis_id: "7.11" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: + [cis-azure-foundations-7.1, cis-azure-foundations-7.2, cis-azure-foundations-7.3, cis-azure-foundations-7.4] +prerequisites: [] +severity_boost: {} +--- + +# Ensure subnets are associated with network security groups + +## Description + +Protect subnet resources by ensuring subnets are associated with network security groups, which can filter inbound and outbound traffic using security rules. + +## Rationale + +Unprotected subnets can expose resources to unauthorized access. + +## Impact + +Minor administrative effort is required to ensure subnets are associated with network security groups. There is no cost to create or use network security groups. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Virtual networks`. +2. Click the name of a virtual network. +3. Under `Settings`, click `Subnets`. +4. Click the name of a subnet. +5. Under `Security`, ensure `Network security group` is not set to `None`. +6. Repeat steps 1-5 for each virtual network and subnet. + +### Using Azure CLI + +Run the following command to list virtual networks: + +```bash +az network vnet list +``` + +For each virtual network, run the following command to list subnets: + +```bash +az network vnet show --resource-group --name --query subnets +``` + +For each subnet, run the following command to get the network security group id: + +```bash +az network vnet subnet show --resource-group --vnet-name --name --query networkSecurityGroup.id +``` + +Ensure a network security group id is returned. + +### Using Azure Policy + +- **Policy ID:** e71308d3-144b-4262-b144-efdc3cc90517 - **Name:** 'Subnets should be associated with a Network Security Group' + +## Expected Result + +All subnets should have an associated network security group. The `networkSecurityGroup.id` field should not be null or empty for any subnet. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Virtual networks`. +2. Click the name of a virtual network. +3. Under `Settings`, click `Subnets`. +4. Click the name of a subnet. +5. Under `Security`, next to `Network security group`, click `None` to display the drop-down menu. +6. Select a network security group. +7. Click `Save`. +8. Repeat steps 1-7 for each virtual network and subnet requiring remediation. + +### Remediate from Azure CLI + +For each subnet requiring remediation, run the following command to associate it with a network security group: + +```bash +az network vnet subnet update --resource-group --vnet-name --name --network-security-group +``` + +## Default Value + +By default, a subnet is not associated with a network security group. + +## References + +1. https://learn.microsoft.com/en-us/azure/virtual-network/network-security-groups-overview +2. https://learn.microsoft.com/en-us/cli/azure/network/vnet + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 13.4 Perform Traffic Filtering Between Network Segments | | x | x | +| v7 | 9.4 Apply Host-based Firewalls or Port Filtering | x | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1190 | TA0001 | M1030 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.12/SKILL.md new file mode 100644 index 0000000000..bb1cb6a87f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.12/SKILL.md @@ -0,0 +1,129 @@ +--- +name: cis-azure-foundations-7.12 +description: "Ensure the SSL policy's 'Min protocol version' is set to 'TLSv1_2' or higher on Azure Application Gateway" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, application-gateway] +cis_id: "7.12" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-7.10, cis-azure-foundations-7.13] +prerequisites: [] +severity_boost: {} +--- + +# Ensure the SSL policy's 'Min protocol version' is set to 'TLSv1_2' or higher on Azure Application Gateway + +## Description + +The TLS (Transport Layer Security) protocol secures the transmission of data over the internet using standard encryption technology. Application gateways use TLS 1.2 for the `Min protocol version` by default and allow for the use of TLS versions 1.0, 1.1, and 1.3. NIST strongly suggests the use of TLS 1.2 and recommends the adoption of TLS 1.3. + +## Rationale + +TLS 1.0 and 1.1 are outdated and vulnerable to security risks. Since TLS 1.2 and TLS 1.3 provide enhanced security and improved performance, it is highly recommended to use TLS 1.2 or higher whenever possible. + +## Impact + +Using the latest TLS version may affect compatibility with clients and backend services. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Application gateways`. +2. Click the name of an application gateway. +3. Under `Settings`, click `Listeners`. +4. Under `SSL Policy`, ensure `Min protocol version` is set to `TLSv1_2` or higher. +5. Repeat steps 1-4 for each application gateway. + +### Using Azure CLI + +Run the following command to list application gateways: + +```bash +az network application-gateway list +``` + +For each application gateway, run the following command to get the SSL policy: + +```bash +az network application-gateway ssl-policy show --resource-group --gateway-name +``` + +For each SSL policy, run the following command to get the `minProtocolVersion`: + +```bash +az network application-gateway ssl-policy predefined show --name --query minProtocolVersion +``` + +Ensure `"TLSv1_2"` or higher is returned. + +## Expected Result + +All Application Gateways should have `Min protocol version` set to `TLSv1_2` or higher in their SSL policy configuration. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Application gateways`. +2. Click the name of an application gateway. +3. Under `Settings`, click `Listeners`. +4. Under `SSL Policy`, next to the `Selected SSL Policy` name, click `change`. +5. Select an appropriate SSL policy with a `Min protocol version` of `TLSv1_2` or higher. +6. Click `Save`. +7. Repeat steps 1-6 for each application gateway requiring remediation. + +### Remediate from Azure CLI + +Run the following command to list available SSL policy options: + +```bash +az network application-gateway ssl-policy list-options +``` + +Run the following command to list available predefined SSL policies: + +```bash +az network application-gateway ssl-policy predefined list +``` + +For each application gateway requiring remediation, run the following command to set a predefined SSL policy: + +```bash +az network application-gateway ssl-policy set --resource-group --gateway-name --name --policy-type Predefined +``` + +Alternatively, run the following command to set a custom SSL policy: + +```bash +az network application-gateway ssl-policy set --resource-group --gateway-name --policy-type Custom --min-protocol-version --cipher-suites +``` + +## Default Value + +`Min protocol version` is set to `TLSv1_2` by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-ssl-policy-overview +2. https://learn.microsoft.com/en-us/cli/azure/network/application-gateway + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1040 | TA0007 | M1041 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.13/SKILL.md new file mode 100644 index 0000000000..ec8ab55ff6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.13/SKILL.md @@ -0,0 +1,148 @@ +--- +name: cis-azure-foundations-7.13 +description: "Ensure 'HTTP2' is set to 'Enabled' on Azure Application Gateway" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, application-gateway] +cis_id: "7.13" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-7.10, cis-azure-foundations-7.12] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'HTTP2' is set to 'Enabled' on Azure Application Gateway + +## Description + +Enable HTTP/2 for improved performance, efficiency, and security. + +HTTP/2 protocol support is available to clients that connect to application gateway listeners only. Communication with backend server pools is always HTTP/1.1. + +## Rationale + +Enabling HTTP/2 supports use of modern encrypted connections. + +## Impact + +Clients and backend services that do not support HTTP/2 will fall back to HTTP/1.1. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Application gateways`. +2. Click the name of an application gateway. +3. Under `Settings`, click `Configuration`. +4. Ensure `HTTP2` is set to `Enabled`. +5. Repeat steps 1-4 for each application gateway. + +### Using Azure CLI + +Run the following command to list application gateways: + +```bash +az network application-gateway list +``` + +For each application gateway, run the following command to get the HTTP2 setting: + +```bash +az network application-gateway show --resource-group --name --query enableHttp2 +``` + +Ensure `true` is returned. + +### Using PowerShell + +Run the following command to list application gateways: + +```powershell +Get-AzApplicationGateway +``` + +Run the following command to get the application gateway in a resource group with a given name: + +```powershell +$gateway = Get-AzApplicationGateway -ResourceGroupName -Name +``` + +Run the following command to get the HTTP2 setting: + +```powershell +$gateway.EnableHttp2 +``` + +Ensure `True` is returned. + +Repeat for each application gateway. + +## Expected Result + +All Application Gateways should have HTTP2 set to `Enabled` (enableHttp2 = true). + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Application gateways`. +2. Click the name of an application gateway. +3. Under `Settings`, click `Configuration`. +4. Under `HTTP2`, click `Enabled`. +5. Click `Save`. +6. Repeat steps 1-5 for each application gateway requiring remediation. + +### Remediate from Azure CLI + +For each application gateway requiring remediation, run the following command to enable HTTP2: + +```bash +az network application-gateway update --resource-group --name --http2 Enabled +``` + +### Remediate from PowerShell + +Run the following command to get the application gateway in a resource group with a given name: + +```powershell +$gateway = Get-AzApplicationGateway -ResourceGroupName -Name +``` + +Run the following command to enable HTTP2: + +```powershell +$gateway.EnableHttp2 = $true +``` + +Run the following command to apply the update: + +```powershell +Set-AzApplicationGateway -ApplicationGateway $gateway +``` + +Repeat for each application gateway requiring remediation. + +## Default Value + +HTTP2 is enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/application-gateway/features#websocket-and-http2-traffic +2. https://learn.microsoft.com/en-us/cli/azure/network/application-gateway +3. https://learn.microsoft.com/en-us/powershell/module/az.network/get-azapplicationgateway +4. https://learn.microsoft.com/en-us/powershell/module/az.network/set-azapplicationgateway + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ----------------------------------------------------- | ---- | ---- | ---- | +| v8 | 2.2 Ensure Authorized Software is Currently Supported | x | x | x | +| v7 | 2.2 Ensure Software is Supported by Vendor | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.14/SKILL.md new file mode 100644 index 0000000000..1f48622afa --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.14/SKILL.md @@ -0,0 +1,119 @@ +--- +name: cis-azure-foundations-7.14 +description: "Ensure request body inspection is enabled in Azure WAF policy on Azure Application Gateway" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, waf, application-gateway] +cis_id: "7.14" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-7.10, cis-azure-foundations-7.15] +prerequisites: [] +severity_boost: {} +--- + +# Ensure request body inspection is enabled in Azure WAF policy on Azure Application Gateway + +## Description + +Enable request body inspection so that the Web Application Firewall evaluates the contents of HTTP message bodies for potential threats. + +## Rationale + +Enabling request body inspection strengthens security by allowing the Web Application Firewall to detect common attacks, such as SQL injection and cross-site scripting. + +## Impact + +Minor performance impact on the Web Application Firewall. Additional effort may be required to monitor findings. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Application gateways`. +2. Click the name of an application gateway. +3. Under `Settings`, click `Web application firewall`. +4. Under `Associated web application firewall policy`, click the policy name. +5. Under `Settings`, click `Policy settings`. +6. Ensure the box next to `Enforce request body inspection` is checked. +7. Repeat steps 1-6 for each application gateway. + +### Using Azure CLI + +Run the following command to list application gateways: + +```bash +az network application-gateway list +``` + +For each application gateway, run the following command to get the firewall policy id: + +```bash +az network application-gateway show --resource-group --name --query firewallPolicy.id +``` + +For each firewall policy, run the following command to get the request body inspection setting: + +```bash +az network application-gateway waf-policy show --ids --query policySettings.requestBodyCheck +``` + +Ensure `true` is returned. + +### Using Azure Policy + +- **Policy ID:** ca85ef9a-741d-461d-8b7a-18c2da82c666 - **Name:** 'Azure Web Application Firewall on Azure Application Gateway should have request body inspection enabled' + +## Expected Result + +All WAF policies associated with Application Gateways should have `Enforce request body inspection` enabled (requestBodyCheck = true). + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Application gateways`. +2. Click the name of an application gateway. +3. Under `Settings`, click `Web application firewall`. +4. Under `Associated web application firewall policy`, click the policy name. +5. Under `Settings`, click `Policy settings`. +6. Check the box next to `Enforce request body inspection`. +7. Click `Save`. +8. Repeat steps 1-7 for each application gateway and firewall policy requiring remediation. + +### Remediate from Azure CLI + +For each firewall policy requiring remediation, run the following command to enable request body inspection: + +```bash +az network application-gateway waf-policy update --ids --policy-settings request-body-check=true +``` + +## Default Value + +Request body inspection is enabled by default on Azure Application Gateways with Web Application Firewall. + +## References + +1. https://learn.microsoft.com/en-gb/azure/web-application-firewall/ag/application-gateway-waf-request-size-limits#request-body-inspection +2. https://learn.microsoft.com/en-us/cli/azure/network/application-gateway +3. https://learn.microsoft.com/en-us/cli/azure/network/application-gateway/waf-policy + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------- | ---- | ---- | ---- | +| v8 | 13.10 Perform Application Layer Filtering | | | x | +| v7 | 12.9 Deploy Application Layer Filtering Proxy Server | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1190 | TA0001 | M1030 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.15/SKILL.md new file mode 100644 index 0000000000..2952cd4ac5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.15/SKILL.md @@ -0,0 +1,126 @@ +--- +name: cis-azure-foundations-7.15 +description: "Ensure bot protection is enabled in Azure WAF policy on Azure Application Gateway" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, waf, application-gateway] +cis_id: "7.15" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-7.10, cis-azure-foundations-7.14] +prerequisites: [] +severity_boost: {} +--- + +# Ensure bot protection is enabled in Azure WAF policy on Azure Application Gateway + +## Description + +Enable bot protection on the Web Application Firewall to block or log requests from known malicious IP addresses identified through the Microsoft Threat Intelligence feed. + +## Rationale + +Internet traffic from bots can scrape, scan, and search for application vulnerabilities. Enabling bot protection stops requests from known malicious IP addresses and enhances the overall security of your application by reducing exposure to automated attacks. + +## Impact + +May require monitoring to identify false positives. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Application gateways`. +2. Click the name of an application gateway. +3. Under `Settings`, click `Web application firewall`. +4. Under `Associated web application firewall policy`, click the policy name. +5. Under `Settings`, click `Managed rules`. +6. Ensure a `Rule Id` containing `Microsoft_BotManagerRuleSet` is listed. +7. Click the `>` to expand the row. +8. Ensure the `Status` for `Malicious Bots` is set to `Enabled`. +9. Repeat steps 1-8 for each application gateway. + +### Using Azure CLI + +Run the following command to list application gateways: + +```bash +az network application-gateway list +``` + +For each application gateway, run the following command to get the firewall policy id: + +```bash +az network application-gateway show --resource-group --name --query firewallPolicy.id +``` + +For each firewall policy, run the following command to get the managed rule sets: + +```bash +az network application-gateway waf-policy show --ids --query managedRules.managedRuleSets +``` + +Ensure a managed rule set with `ruleSetType` of `Microsoft_BotManagerRuleSet` is returned, and that no `ruleGroupOverrides` for `ruleGroupName` `KnownBadBots` with `state` `Disabled` are returned. + +### Using Azure Policy + +- **Policy ID:** ebea0d86-7fbd-42e3-8a46-27e7568c2525 - **Name:** 'Bot Protection should be enabled for Azure Application Gateway WAF' + +## Expected Result + +All WAF policies associated with Application Gateways should have `Microsoft_BotManagerRuleSet` enabled with `Malicious Bots` rule group status set to `Enabled`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Application gateways`. +2. Click the name of an application gateway. +3. Under `Settings`, click `Web application firewall`. +4. Under `Associated web application firewall policy`, click the policy name. +5. Under `Settings`, click `Managed rules`. +6. Click `Assign`. +7. Under `Bot Management ruleset`, click to display the drop-down menu. +8. Select a `Microsoft_BotManagerRuleSet`. +9. Click `Save`. +10. Click `X` to close the panel. +11. Repeat steps 1-10 for each application gateway and firewall policy requiring remediation. + +### Remediate from Azure CLI + +For each firewall policy requiring remediation, run the following command to enable bot protection: + +```bash +az network application-gateway waf-policy managed-rule rule-set add --resource-group --policy-name --type Microsoft_BotManagerRuleSet --version <0.1|1.0|1.1> +``` + +## Default Value + +Bot protection is disabled by default on Azure Application Gateways with Web Application Firewall. + +## References + +1. https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/bot-protection-overview +2. https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/bot-protection +3. https://learn.microsoft.com/en-us/cli/azure/network/application-gateway +4. https://learn.microsoft.com/en-us/cli/azure/network/application-gateway/waf-policy +5. https://learn.microsoft.com/en-us/cli/azure/network/application-gateway/waf-policy/managed-rule/rule-set + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------- | ---- | ---- | ---- | +| v8 | 13.10 Perform Application Layer Filtering | | | x | +| v7 | 12.9 Deploy Application Layer Filtering Proxy Server | | | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1190 | TA0001 | M1030 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.16/SKILL.md new file mode 100644 index 0000000000..cefbd9a802 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.16/SKILL.md @@ -0,0 +1,151 @@ +--- +name: cis-azure-foundations-7.16 +description: "Ensure Azure Network Security Perimeter is used to secure Azure PaaS resources" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, nsg] +cis_id: "7.16" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Azure Network Security Perimeter is used to secure Azure PaaS resources + +## Description + +Azure Network Security Perimeter creates a logical boundary around Azure platform-as-a-service (PaaS) resources outside of virtual networks. By default, the network security perimeter denies public access to associated PaaS resources, with the ability to define explicit rules for inbound and outbound traffic. + +While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Determining appropriate network security perimeter profiles and resource assignments depends on the context and requirements of each organization and environment. + +## Rationale + +Network security perimeter denies public access to PaaS resources, reducing exposure and mitigating data exfiltration risks. + +## Impact + +Implementation requires administrative effort to configure and maintain network security perimeter profiles and resource assignments. Azure does not list any additional charges for using network security perimeters. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Resource groups`. +2. Click the name of a resource group. +3. Take note of PaaS resources. +4. Go to `Network Security Perimeters`. +5. Click the name of a network security perimeter. +6. Under `Settings`, click `Associated resources`. +7. Take note of the associated resources. +8. Repeat steps 1-7 and ensure each PaaS resource is associated with a network security perimeter. + +### Using Azure CLI + +Run the following command to list resource groups: + +```bash +az group list +``` + +For each resource group, run the following command to list resources: + +```bash +az resource list --resource-group +``` + +Take note of PaaS resources. + +For each resource group, run the following command to list network security perimeters: + +```bash +az network perimeter list --resource-group +``` + +For each network security perimeter, run the following command to list resources: + +```bash +az network perimeter association list --resource-group --perimeter-name +``` + +Ensure each PaaS resource is associated with a network security perimeter. + +## Expected Result + +All PaaS resources should be associated with a network security perimeter. The association list for each perimeter should include all relevant PaaS resources in the environment. + +## Remediation + +### Remediate from Azure Portal + +Create and associate PaaS resources with a new network security perimeter: + +1. Go to `Network Security Perimeters`. +2. Click `+ Create`. +3. Select a `Subscription` and `Resource group`, provide a `Name`, select a `Region`, and provide a `Profile name`. +4. Click `Next`. +5. Click `+ Add`. +6. Check the box next to a PaaS resource to associate it with the network security perimeter. +7. Click `Select`. +8. Click `Next`. +9. Configure appropriate `Inbound access rules` for your organization. +10. Click `Next`. +11. Configure appropriate `Outbound access rules` for your organization. +12. Click `Review + create`. +13. Click `Create`. + +Associate PaaS resources with an existing network security perimeter: + +1. Go to `Network Security Perimeters`. +2. Click the name of a network security perimeter. +3. Under `Settings`, click `Associated resources`. +4. Click `+ Add`. +5. Select `Associate resources with a new profile` or `Associate resources with an existing profile`. +6. To associate resources with a new profile: + 1. Provide a `Name`. + 2. Click `Next`. + 3. Click `+ Add`. + 4. Check the box next to a PaaS resource to associate it with the network security perimeter. + 5. Click `Select`. + 6. Click `Next`. + 7. Configure appropriate `Inbound access rules` for your organization. + 8. Click `Next`. + 9. Configure appropriate `Outbound access rules` for your organization. + 10. Click `Review + create`. + 11. Click `Create`. +7. To associate resources with an existing profile: + 1. Next to `Profile`, click `Select` to display the drop-down menu. + 2. Select a profile. + 3. Click `+ Add`. + 4. Check the box next to a PaaS resource to associate it with the network security perimeter. + 5. Click `Select`. + 6. Click `Associate`. + +### Remediate from Azure CLI + +Use `az network perimeter profile list` or `az network perimeter profile create` to list existing or create a new network security perimeter profile. + +For each PaaS resource requiring association with a network security perimeter, run the following command: + +```bash +az network perimeter association create --resource-group --perimeter-name --association-name --private-link-resource "{id:}" --profile "{}" +``` + +## Default Value + +PaaS resources are not associated with a network security perimeter by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/private-link/network-security-perimeter-concepts +2. https://learn.microsoft.com/en-us/azure/private-link/create-network-security-perimeter-portal +3. https://learn.microsoft.com/en-us/cli/azure/group +4. https://learn.microsoft.com/en-us/cli/azure/resource +5. https://learn.microsoft.com/en-us/cli/azure/network/perimeter + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.2/SKILL.md new file mode 100644 index 0000000000..e40159f78b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.2/SKILL.md @@ -0,0 +1,136 @@ +--- +name: cis-azure-foundations-7.2 +description: "Ensure SSH access from the Internet is evaluated and restricted" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, nsg] +cis_id: "7.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: + [cis-azure-foundations-7.1, cis-azure-foundations-7.3, cis-azure-foundations-7.4, cis-azure-foundations-7.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure SSH access from the Internet is evaluated and restricted + +## Description + +Network security groups should be periodically evaluated for port misconfigurations. Where SSH is not explicitly required and narrowly configured for resources attached to a network security group, Internet-level access to Azure resources should be restricted or eliminated. + +## Rationale + +The potential security problem with using SSH over the Internet is that attackers can use various brute force techniques to gain access to Azure Virtual Machines. Once the attackers gain access, they can use a virtual machine as a launch point for compromising other machines on the Azure Virtual Network or even attack networked devices outside of Azure. + +## Impact + +None documented. Restricting SSH access from the Internet is a security best practice with no negative functional impact when properly configured with alternative access methods such as VPN, ExpressRoute, or Azure Bastion. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Network security groups`. +2. Click the name of a network security group. +3. Under `Settings`, click `Inbound security rules`. +4. Ensure that no inbound security rule exists that matches the following: + - Port: `22` or range including 22 + - Protocol: `TCP` or `Any` + - Source: `0.0.0.0/0`, `Internet`, or `Any` + - Action: `Allow` +5. Repeat steps 1-4 for each network security group. + +### Using Azure Resource Graph + +1. Go to `Resource Graph Explorer`. +2. Click `New query`. +3. Paste the following into the query window: + +```kql +resources | where type =~ "microsoft.network/networksecuritygroups" | project id, name, securityRule = properties.securityRules | mv-expand securityRule | extend access = securityRule.properties.access, direction = securityRule.properties.direction, protocol = securityRule.properties.protocol, destinationPort = case(isempty(securityRule.properties.destinationPortRange), securityRule.properties.destinationPortRanges, securityRule.properties.destinationPortRange), sourceAddress = case(isempty(securityRule.properties.sourceAddressPrefix), securityRule.properties.sourceAddressPrefixes, securityRule.properties.sourceAddressPrefix) | where access =~ "Allow" and direction =~ "Inbound" and protocol in~ ("tcp", "*") | mv-expand destinationPort | mv-expand sourceAddress | extend destinationPortMin = toint(split(destinationPort, "-")[0]), destinationPortMax = toint(split(destinationPort, "-")[-1]) | where (destinationPortMin <= 22 and destinationPortMax >= 22) or destinationPort == "" | where sourceAddress in~ ("*", "0.0.0.0", "internet", "any") or sourceAddress endswith "/0" +``` + +4. Click `Run query`. +5. Ensure that no results are returned. + +### Using Azure CLI + +List network security groups with non-default security rules: + +```bash +az network nsg list --query [*].[name,securityRules] +``` + +Ensure that no network security group has an inbound security rule that matches the following: + +```json +"access" : "Allow" +"destinationPortRange" : "22", "*", or "" +"direction" : "Inbound" +"protocol" : "TCP" or "*" +"sourceAddressPrefix" : "0.0.0.0/0", "Internet", or "*" +``` + +### Using Azure Policy + +- **Policy ID:** 22730e10-96f6-4aac-ad84-9383d35b5917 - **Name:** 'Management ports should be closed on your virtual machines' + +## Expected Result + +No inbound security rules should allow unrestricted SSH access (port 22) from the Internet. The Azure Resource Graph query should return zero results. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Network security groups`. +2. Click the name of a network security group. +3. Under `Settings`, click `Inbound security rules`. +4. Check the box next to any inbound security rule matching: + - Port: `22` or range including 22 + - Protocol: `TCP` or `Any` + - Source: `0.0.0.0/0`, `Internet`, or `Any` + - Action: `Allow` +5. Click `Delete`. +6. Click `Yes`. +7. Repeat steps 1-6 for each network security group requiring remediation. + +### Remediate from Azure CLI + +For each network security group rule requiring remediation, run the following command to delete the rule: + +```bash +az network nsg rule delete --resource-group --nsg-name --name +``` + +## Default Value + +By default, SSH access from internet is not `enabled`. + +## References + +1. https://learn.microsoft.com/en-us/azure/security/fundamentals/network-best-practices#disable-rdpssh-access-to-virtual-machines +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-1-establish-network-segmentation-boundaries +3. Express Route: https://learn.microsoft.com/en-us/azure/expressroute/ +4. Site-to-Site VPN: https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal +5. Point-to-Site VPN: https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-certificate-gateway + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 13.4 Perform Traffic Filtering Between Network Segments | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1021.004 | TA0001 | M1035 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.3/SKILL.md new file mode 100644 index 0000000000..fa54a07122 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.3/SKILL.md @@ -0,0 +1,137 @@ +--- +name: cis-azure-foundations-7.3 +description: "Ensure UDP access from the Internet is evaluated and restricted" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, nsg] +cis_id: "7.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: + [cis-azure-foundations-7.1, cis-azure-foundations-7.2, cis-azure-foundations-7.4, cis-azure-foundations-7.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure UDP access from the Internet is evaluated and restricted + +## Description + +Network security groups should be periodically evaluated for port misconfigurations. Where UDP is not explicitly required and narrowly configured for resources attached to a network security group, Internet-level access to Azure resources should be restricted or eliminated. + +## Rationale + +The potential security problem with broadly exposing UDP services over the Internet is that attackers can use DDoS amplification techniques to reflect spoofed UDP traffic from Azure Virtual Machines. The most common types of these attacks exploit exposed DNS, NTP, SSDP, SNMP, CLDAP, and other UDP-based services as amplification sources to disrupt services on other machines within the Azure Virtual Network, or even attack networked devices outside of Azure. + +## Impact + +None documented. Restricting UDP access from the Internet is a security best practice with no negative functional impact when properly configured. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Network security groups`. +2. Click the name of a network security group. +3. Under `Settings`, click `Inbound security rules`. +4. Ensure that no inbound security rule exists that matches the following: + - Port: `53`, `123`, `161`, `389`, or `1900`, or range including `53`, `123`, `161`, `389`, or `1900`, or other vulnerable UDP-based services + - Protocol: `UDP` or `Any` + - Source: `0.0.0.0/0`, `Internet`, or `Any` + - Action: `Allow` +5. Repeat steps 1-4 for each network security group. + +### Using Azure Resource Graph + +1. Go to `Resource Graph Explorer`. +2. Click `New query`. +3. Paste the following into the query window: + +```kql +resources | where type =~ "microsoft.network/networksecuritygroups" | project id, name, securityRule = properties.securityRules | mv-expand securityRule | extend access = securityRule.properties.access, direction = securityRule.properties.direction, protocol = securityRule.properties.protocol, destinationPort = case(isempty(securityRule.properties.destinationPortRange), securityRule.properties.destinationPortRanges, securityRule.properties.destinationPortRange), sourceAddress = case(isempty(securityRule.properties.sourceAddressPrefix), securityRule.properties.sourceAddressPrefixes, securityRule.properties.sourceAddressPrefix) | where access =~ "Allow" and direction =~ "Inbound" and protocol in~ ("udp", "*") | mv-expand destinationPort | mv-expand sourceAddress | extend destinationPortMin = toint(split(destinationPort, "-")[0]), destinationPortMax = toint(split(destinationPort, "-")[-1]) | where (destinationPortMin <= 53 and destinationPortMax >= 53) or (destinationPortMin <= 123 and destinationPortMax >= 123) or (destinationPortMin <= 161 and destinationPortMax >= 161) or (destinationPortMin <= 389 and destinationPortMax >= 389) or (destinationPortMin <= 1900 and destinationPortMax >= 1900) or destinationPort == "" | where sourceAddress in~ ("*", "0.0.0.0", "internet", "any") or sourceAddress endswith "/0" +``` + +4. Click `Run query`. +5. Ensure that no results are returned. + +### Using Azure CLI + +List network security groups with non-default security rules: + +```bash +az network nsg list --query [*].[name,securityRules] +``` + +Ensure that no network security group has an inbound security rule that matches the following: + +```json +"access" : "Allow" +"destinationPortRange" : "53", "123", "161", "389", "1900", "*" or "" +"direction" : "Inbound" +"protocol" : "UDP" or "*" +"sourceAddressPrefix" : "0.0.0.0/0", "Internet", or "*" +``` + +### Using Azure Policy + +- **Policy ID:** 9daedab3-fb2d-461e-b861-71790eead4f6 - **Name:** 'All network ports should be restricted on network security groups associated to your virtual machine' + +## Expected Result + +No inbound security rules should allow unrestricted UDP access from the Internet for vulnerable services (DNS/53, NTP/123, SNMP/161, LDAP/389, SSDP/1900). The Azure Resource Graph query should return zero results. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Network security groups`. +2. Click the name of a network security group. +3. Under `Settings`, click `Inbound security rules`. +4. Check the box next to any inbound security rule matching: + - Port: Port: `53`, `123`, `161`, `389`, or `1900`, or range including `53`, `123`, `161`, `389`, or `1900`, or other vulnerable UDP-based services + - Protocol: `UDP` or `Any` + - Source: `0.0.0.0/0`, `Internet`, or `Any` + - Action: `Allow` +5. Click `Delete`. +6. Click `Yes`. +7. Repeat steps 1-6 for each network security group requiring remediation. + +### Remediate from Azure CLI + +For each network security group rule requiring remediation, run the following command to delete the rule: + +```bash +az network nsg rule delete --resource-group --nsg-name --name +``` + +## Default Value + +By default, UDP access from internet is not `enabled`. + +## References + +1. https://learn.microsoft.com/en-us/azure/security/fundamentals/network-best-practices#secure-your-critical-azure-service-resources-to-only-your-virtual-networks +2. https://learn.microsoft.com/en-us/azure/ddos-protection/fundamental-best-practices +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-1-establish-network-segmentation-boundaries +4. ExpressRoute: https://learn.microsoft.com/en-us/azure/expressroute/ +5. Site-to-site VPN: https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal +6. Point-to-site VPN: https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-certificate-gateway + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 13.4 Perform Traffic Filtering Between Network Segments | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1095 | TA0011 | M1037 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.4/SKILL.md new file mode 100644 index 0000000000..3d3ecdd1a3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.4/SKILL.md @@ -0,0 +1,135 @@ +--- +name: cis-azure-foundations-7.4 +description: "Ensure HTTP(S) access from the Internet is evaluated and restricted" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, nsg] +cis_id: "7.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: + [cis-azure-foundations-7.1, cis-azure-foundations-7.2, cis-azure-foundations-7.3, cis-azure-foundations-7.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure HTTP(S) access from the Internet is evaluated and restricted + +## Description + +Network security groups should be periodically evaluated for port misconfigurations. Where HTTP(S) is not explicitly required and narrowly configured for resources attached to a network security group, Internet-level access to Azure resources should be restricted or eliminated. + +## Rationale + +The potential security problem with using HTTP(S) over the Internet is that attackers can use various brute force techniques to gain access to Azure resources. Once the attackers gain access, they can use the resource as a launch point for compromising other resources within the Azure tenant. + +## Impact + +None documented. Restricting HTTP(S) access from the Internet is a security best practice with no negative functional impact when properly configured. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Network security groups`. +2. Click the name of a network security group. +3. Under `Settings`, click `Inbound security rules`. +4. Ensure that no inbound security rule exists that matches the following: + - Port: `80`, `443`, or range including 80 or 443 + - Protocol: `TCP` or `Any` + - Source: `0.0.0.0/0`, `Internet`, or `Any` + - Action: `Allow` +5. Repeat steps 1-4 for each network security group. + +### Using Azure Resource Graph + +1. Go to `Resource Graph Explorer`. +2. Click `New query`. +3. Paste the following into the query window: + +```kql +resources | where type =~ "microsoft.network/networksecuritygroups" | project id, name, securityRule = properties.securityRules | mv-expand securityRule | extend access = securityRule.properties.access, direction = securityRule.properties.direction, protocol = securityRule.properties.protocol, destinationPort = case(isempty(securityRule.properties.destinationPortRange), securityRule.properties.destinationPortRanges, securityRule.properties.destinationPortRange), sourceAddress = case(isempty(securityRule.properties.sourceAddressPrefix), securityRule.properties.sourceAddressPrefixes, securityRule.properties.sourceAddressPrefix) | where access =~ "Allow" and direction =~ "Inbound" and protocol in~ ("tcp", "*") | mv-expand destinationPort | mv-expand sourceAddress | extend destinationPortMin = toint(split(destinationPort, "-")[0]), destinationPortMax = toint(split(destinationPort, "-")[-1]) | where (destinationPortMin <= 80 and destinationPortMax >= 80) or (destinationPortMin <= 443 and destinationPortMax >= 443) or destinationPort == "" | where sourceAddress in~ ("*", "0.0.0.0", "internet", "any") or sourceAddress endswith "/0" +``` + +4. Click `Run query`. +5. Ensure that no results are returned. + +### Using Azure CLI + +List network security groups non-default security rules: + +```bash +az network nsg list --query [*].[name,securityRules] +``` + +Ensure that no network security group has an inbound security rule that matches the following: + +```json +"access" : "Allow" +"destinationPortRange" : "80", "443", "*", or "" +"direction" : "Inbound" +"protocol" : "TCP" or "*" +"sourceAddressPrefix" : "0.0.0.0/0", "Internet", or "*" +``` + +### Using Azure Policy + +- **Policy ID:** 9daedab3-fb2d-461e-b861-71790eead4f6 - **Name:** 'All network ports should be restricted on network security groups associated to your virtual machine' + +## Expected Result + +No inbound security rules should allow unrestricted HTTP(S) access (ports 80, 443) from the Internet. The Azure Resource Graph query should return zero results. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Network security groups`. +2. Click the name of a network security group. +3. Under `Settings`, click `Inbound security rules`. +4. Check the box next to any inbound security rule matching: + - Port: `80`, `443`, or range including 80 or 443 + - Protocol: `TCP` or `Any` + - Source: `0.0.0.0/0`, `Internet`, or `Any` + - Action: `Allow` +5. Click `Delete`. +6. Click `Yes`. +7. Repeat steps 1-6 for each network security group requiring remediation. + +### Remediate from Azure CLI + +For each network security group rule requiring remediation, run the following command to delete the rule: + +```bash +az network nsg rule delete --resource-group --nsg-name --name +``` + +## Default Value + +By default, HTTP(S) access from internet is not `enabled`. + +## References + +1. Express Route: https://learn.microsoft.com/en-us/azure/expressroute/ +2. Site-to-Site VPN: https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal +3. Point-to-Site VPN: https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-certificate-gateway +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-1-establish-network-segmentation-boundaries + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 13.4 Perform Traffic Filtering Between Network Segments | | x | x | +| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| T1190 | TA0001 | M1050 | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.5/SKILL.md new file mode 100644 index 0000000000..4bdb3fef17 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.5/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-azure-foundations-7.5 +description: "Ensure network security group flow log retention days is >= 90" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, nsg] +cis_id: "7.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-7.6, cis-azure-foundations-7.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure network security group flow log retention days is >= 90 + +## Description + +Network security group flow logs should be enabled and the retention period set to greater than or equal to 90 days. + +**Retirement Notice:** On September 30, 2027, network security group (NSG) flow logs will be retired. As of June 30, 2025, creating new NSG flow logs is no longer possible. Azure recommends migrating to virtual network flow logs. Review https://azure.microsoft.com/en-us/updates/?id=Azure-NSG-flow-logs-Retirement for more information. + +For virtual network flow logs, consider applying the recommendation `Ensure that virtual network flow log retention days is set to greater than or equal to 90` in this section. + +## Rationale + +Flow logs enable capturing information about IP traffic flowing in and out of network security groups. Logs can be used to check for anomalies and give insight into suspected breaches. + +## Impact + +This will keep IP traffic logs for 90 days or longer. As a level 2 control, first determine your need to retain data, then apply your selection here. As this is data stored for a longer period, your monthly storage costs will increase depending on your data use. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Network Watcher`. +2. Under `Logs`, select `Flow logs`. +3. Click the name of a network security group flow log. +4. Ensure that `Status` is set to `On`. +5. Ensure that `Retention days` is set to `0`, `90`, or a number greater than 90. If `Retention days` is set to `0`, the logs are retained indefinitely with no retention policy. +6. Repeat steps 1-5 for each network security group flow log. + +### Using Azure CLI + +Run the following command to list network watchers: + +```bash +az network watcher list +``` + +Run the following command to list the name and retention policy of flow logs in a network watcher: + +```bash +az network watcher flow-log list --location --query [*].[name,retentionPolicy] +``` + +For each network security group flow log, ensure that `enabled` is set to `true`, and `days` is set to `0`, `90`, or a number greater than 90. If `days` is set to `0`, the logs are retained indefinitely with no retention policy. + +## Expected Result + +All network security group flow logs should have status `On` with retention days set to `0` (indefinite) or `>= 90` days. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Network Watcher`. +2. Under `Logs`, select `Flow logs`. +3. Click the name of a network security group flow log. +4. Set `Status` to `On`. +5. Set `Retention days` to `0`, `90`, or a number greater than 90. If `Retention days` is set to `0`, the logs are retained indefinitely with no retention policy. +6. Click `Save`. +7. Repeat steps 1-6 for each network security group flow log requiring remediation. + +### Remediate from Azure CLI + +For each network security group flow log requiring remediation, run the following command to enable the flow log and set `retention` to `0`, `90`, or a number greater than 90: + +```bash +az network watcher flow-log configure --nsg --enabled true --resource-group --retention --storage-account +``` + +## Default Value + +By default, network security group flow logs are `disabled`. + +## References + +1. https://learn.microsoft.com/en-us/azure/network-watcher/nsg-flow-logs-overview +2. https://learn.microsoft.com/en-us/cli/azure/network/watcher/flow-log +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-6-configure-log-storage-retention +4. https://learn.microsoft.com/en-gb/azure/network-watcher/nsg-flow-logs-migrate + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------- | ---- | ---- | ---- | +| v8 | 8.3 Ensure Adequate Audit Log Storage | x | x | x | +| v8 | 8.10 Retain Audit Logs | | x | x | +| v7 | 6.4 Ensure adequate storage for logs | | x | x | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.6/SKILL.md new file mode 100644 index 0000000000..700b94f796 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.6/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-azure-foundations-7.6 +description: "Ensure Network Watcher is 'Enabled' for Azure Regions that are in use" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, nsg] +cis_id: "7.6" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-7.5, cis-azure-foundations-7.8] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Network Watcher is 'Enabled' for Azure Regions that are in use + +## Description + +Enable Network Watcher for physical regions in Azure subscriptions. + +## Rationale + +Network diagnostic and visualization tools available with Network Watcher help users understand, diagnose, and gain insights to the network in Azure. + +## Impact + +There are additional costs per transaction to run and store network data. For high-volume networks these charges will add up quickly. + +## Audit Procedure + +### Using Azure Portal + +1. Use the Search bar to search for and click on the `Network Watcher` service. +2. From the Overview menu item, review each Network Watcher listed, and ensure that a network watcher is listed for each region in use by the subscription. + +### Using Azure CLI + +```bash +az network watcher list --query "[].{Location:location,State:provisioningState}" -o table +``` + +This will list all network watchers and their provisioning state. Ensure `provisioningState` is `Succeeded` for each network watcher. + +```bash +az account list-locations --query "[?metadata.regionType=='Physical'].{Name:name,DisplayName:regionalDisplayName}" -o table +``` + +This will list all physical regions that exist in the subscription. Compare this list to the previous one to ensure that for each region in use, a network watcher exists with `provisioningState` set to `Succeeded`. + +### Using PowerShell + +```powershell +Get-AzNetworkWatcher +``` + +Make sure each watcher is set with the `ProvisioningState` setting set to `Succeeded` and all `Locations` that are in use by the subscription are using a watcher. + +### Using Azure Policy + +- **Policy ID:** b6e2945c-0b7b-40f5-9233-7a5323b5cdc6 - **Name:** 'Network Watcher should be enabled' + +## Expected Result + +A Network Watcher should exist with `ProvisioningState` set to `Succeeded` for every Azure region in use by the subscription. + +## Remediation + +Opting out of Network Watcher automatic enablement is a permanent change. Once you opt-out you cannot opt-in without contacting support. + +To manually enable Network Watcher in each region where you want to use Network Watcher capabilities, follow the steps below. + +### Remediate from Azure Portal + +1. Use the Search bar to search for and click on the `Network Watcher` service. +2. Click `Create`. +3. Select a `Region` from the drop-down menu. +4. Click `Add`. + +### Remediate from Azure CLI + +```bash +az network watcher configure --locations --enabled true --resource-group +``` + +## Default Value + +Network Watcher is automatically enabled. When you create or update a virtual network in your subscription, Network Watcher will be enabled automatically in your Virtual Network's region. There is no impact to your resources or associated charge for automatically enabling Network Watcher. + +## References + +1. https://learn.microsoft.com/en-us/azure/network-watcher/network-watcher-overview +2. https://learn.microsoft.com/en-us/cli/azure/network/watcher +3. https://learn.microsoft.com/en-us/cli/azure/network/watcher#az-network-watcher-configure +4. https://learn.microsoft.com/en-us/azure/network-watcher/network-watcher-create +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-4-enable-network-logging-for-security-investigation +6. https://azure.microsoft.com/en-us/pricing/details/network-watcher/ + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture | | x | x | +| v8 | 12.4 Establish and Maintain Architecture Diagram(s) | | x | x | +| v7 | 11.2 Document Traffic Configuration Rules | | x | x | +| v7 | 12.1 Maintain an Inventory of Network Boundaries | x | x | x | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.7/SKILL.md new file mode 100644 index 0000000000..73dff9c2b0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.7/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-azure-foundations-7.7 +description: "Ensure Public IP addresses are Evaluated on a Periodic Basis" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, nsg] +cis_id: "7.7" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-7.1, cis-azure-foundations-7.2, cis-azure-foundations-7.11] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Public IP addresses are Evaluated on a Periodic Basis + +## Description + +Public IP Addresses provide tenant accounts with Internet connectivity for resources contained within the tenant. During the creation of certain resources in Azure, a Public IP Address may be created. All Public IP Addresses within the tenant should be periodically reviewed for accuracy and necessity. + +While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Evaluating the appropriateness of public IP addresses requires a manual review, as it depends on the specific needs and context of each organization and environment. + +## Rationale + +Public IP Addresses allocated to the tenant should be periodically reviewed for necessity. Public IP Addresses that are not intentionally assigned and controlled present a publicly facing vector for threat actors and significant risk to the tenant. + +## Impact + +None documented. This is a review-based control that requires periodic manual assessment. + +## Audit Procedure + +### Using Azure Portal + +1. Open the `All Resources` blade. +2. Click on `Add Filter`. +3. In the Add Filter window, select the following: Filter: `Type` Operator: `Equals` Value: `Public IP address`. +4. Click the `Apply` button. +5. For each Public IP address in the list, use Overview (or Properties) to review the `"Associated to:"` field and determine if the associated resource is still relevant to your tenant environment. If the associated resource is relevant, ensure that additional controls exist to mitigate risk (e.g. Firewalls, VPNs, Traffic Filtering, Virtual Gateway Appliances, Web Application Firewalls, etc.) on all subsequently attached resources. + +### Using Azure CLI + +List all Public IP addresses: + +```bash +az network public-ip list +``` + +For each Public IP address in the output, review the `"name"` property and determine if the associated resource is still relevant to your tenant environment. If the associated resource is relevant, ensure that additional controls exist to mitigate risk (e.g. Firewalls, VPNs, Traffic Filtering, Virtual Gateway Appliances, Web Application Firewalls, etc.) on all subsequently attached resources. + +## Expected Result + +All Public IP addresses should be associated with relevant, active resources and have appropriate compensating controls in place. Any unneeded or orphaned Public IP addresses should be identified for removal. + +## Remediation + +Remediation will vary significantly depending on your organization's security requirements for the resources attached to each individual Public IP address. + +## Default Value + +During Virtual Machine and Application creation, a setting may create and attach a public IP. + +## References + +1. https://learn.microsoft.com/en-us/cli/azure/network/public-ip +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------ | ---- | ---- | ---- | +| v8 | 12.1 Ensure Network Infrastructure is Up-to-Date | x | x | x | +| v7 | 12.1 Maintain an Inventory of Network Boundaries | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.8/SKILL.md new file mode 100644 index 0000000000..9402887279 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.8/SKILL.md @@ -0,0 +1,122 @@ +--- +name: cis-azure-foundations-7.8 +description: "Ensure virtual network flow log retention days is >= 90" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, nsg] +cis_id: "7.8" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [cis-azure-foundations-7.5, cis-azure-foundations-7.6] +prerequisites: [] +severity_boost: {} +--- + +# Ensure virtual network flow log retention days is >= 90 + +## Description + +Ensure that virtual network flow logs are retained for greater than or equal to 90 days. + +## Rationale + +Virtual network flow logs provide critical visibility into traffic patterns. Logs can be used to check for anomalies and give insight into suspected breaches. + +## Impact + +- Virtual network flow logs are charged per gigabyte of network flow logs collected and come with a free tier of 5 GB/month per subscription. +- If traffic analytics is enabled with virtual network flow logs, traffic analytics pricing applies at per gigabyte processing rates. +- The storage of logs is charged separately, and the cost will depend on the amount of logs and the retention period. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Network Watcher`. +2. Under `Logs`, select `Flow logs`. +3. Click `Add filter`. +4. From the `Filter` drop-down menu, select `Flow log type`. +5. From the `Value` drop-down menu, check `Virtual network` only. +6. Click `Apply`. +7. Click the name of a virtual network flow log. +8. Under `Storage Account`, ensure that `Retention days` is set to `0`, `90`, or a number greater than 90. If `Retention days` is set to `0`, the logs are retained indefinitely with no retention policy. +9. Repeat steps 7 and 8 for each virtual network flow log. + +### Using Azure CLI + +Run the following command to list network watchers: + +```bash +az network watcher list +``` + +Run the following command to list the name and retention policy of flow logs in a network watcher: + +```bash +az network watcher flow-log list --location --query [*].[name,retentionPolicy] +``` + +For each flow log, ensure that `days` is set to `0`, `90`, or a number greater than 90. If `days` is set to `0`, the logs are retained indefinitely with no retention policy. + +Repeat for each network watcher. + +## Expected Result + +All virtual network flow logs should have retention days set to `0` (indefinite) or `>= 90` days. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Network Watcher`. +2. Under `Logs`, select `Flow logs`. +3. Click `Add filter`. +4. From the `Filter` drop-down menu, select `Flow log type`. +5. From the `Value` drop-down menu, check `Virtual network` only. +6. Click `Apply`. +7. Click the name of a virtual network flow log. +8. Under `Storage Account`, set `Retention days` to `0`, `90`, or a number greater than 90. If `Retention days` is set to `0`, the logs are retained indefinitely with no retention policy. +9. Repeat steps 7 and 8 for each virtual network flow log requiring remediation. + +### Remediate from Azure CLI + +Run the following command update the retention policy for a flow log in a network watcher, setting `retention` to `0`, `90`, or a number greater than 90: + +```bash +az network watcher flow-log update --location --name --retention +``` + +Repeat for each virtual network flow log requiring remediation. + +## Default Value + +When a virtual network flow log is created using the Azure CLI, retention days is set to 0 by default. When creating via the Azure Portal, retention days must be specified by the creator. + +## Additional Information + +As network security group flow logs are on the retirement path, Azure recommends migrating to virtual network flow logs. + +## References + +1. https://learn.microsoft.com/en-us/azure/network-watcher/vnet-flow-logs-manage +2. https://learn.microsoft.com/en-us/cli/azure/network/watcher/flow-log + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------- | ---- | ---- | ---- | +| v8 | 8.3 Ensure Adequate Audit Log Storage | x | x | x | +| v8 | 8.10 Retain Audit Logs | | x | x | +| v7 | 6.4 Ensure adequate storage for logs | | x | x | + +## MITRE ATT&CK Mappings + +| Techniques / Sub-techniques | Tactics | Mitigations | +| --------------------------- | ------- | ----------- | +| | | M1047 | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.9/SKILL.md new file mode 100644 index 0000000000..77d526fcf9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-7.9/SKILL.md @@ -0,0 +1,83 @@ +--- +name: cis-azure-foundations-7.9 +description: "Ensure 'Authentication type' is set to 'Azure Active Directory' only for Azure VPN Gateway point-to-site" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, networking, vpn] +cis_id: "7.9" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Authentication type' is set to 'Azure Active Directory' only for Azure VPN Gateway point-to-site configuration + +## Description + +Enable only 'Azure Active Directory' (Microsoft Entra ID) authentication for Azure VPN Gateway point-to-site connections. + +## Rationale + +Microsoft Entra ID authentication provides strong security and centralized identity management, and reduces risks associated with static credentials and certificate management. + +## Impact + +Azure VPN Gateways incur hourly charges, with additional costs for point-to-site connections and data transfer. Pricing varies by SKU and usage. Refer to https://azure.microsoft.com/en-us/pricing/details/vpn-gateway/ for details. + +## Audit Procedure + +### Using Azure Portal + +1. Go to `Virtual network gateways`. +2. Under `VPN gateway`, click `VPN gateways`. +3. Click the name of a VPN gateway. +4. Under `Settings`, click `Point-to-site configuration`. +5. Ensure `Authentication type` is set to `Azure Active Directory` only. +6. Repeat steps 1-5 for each VPN gateway. + +### Using Azure Policy + +- **Policy ID:** 21a6bc25-125e-4d13-b82d-2e19b7208ab7 - **Name:** 'VPN gateways should use only Azure Active Directory (Azure AD) authentication for point-to-site users' + +## Expected Result + +All Azure VPN Gateway point-to-site configurations should have `Authentication type` set to `Azure Active Directory` only, with no other authentication methods (Azure certificate, RADIUS) enabled. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Virtual network gateways`. +2. Under `VPN gateway`, click `VPN gateways`. +3. Click the name of a VPN gateway. +4. Under `Settings`, click `Point-to-site configuration`. +5. Ensure `Authentication type` click to expand the drop-down menu. +6. Check the box next to `Azure Active Directory`, and uncheck the boxes next to `Azure certificate` and `RADIUS authentication`. +7. Provide a `Tenant`, `Audience`, and `Issuer` for the `Azure Active Directory` configuration. +8. Click `Save`. +9. Repeat steps 1-8 for each VPN gateway requiring remediation. + +## Default Value + +'Authentication type' is selected during creation of point-to-site configuration. + +## References + +1. https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpngateways +2. https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-entra-gateway +3. https://learn.microsoft.com/en-us/azure/vpn-gateway/openvpn-azure-ad-tenant + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------- | ---- | ---- | ---- | +| v8 | 5.6 Centralize Account Management | | x | x | +| v7 | 16.2 Configure Centralized Point of Authentication | | x | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.1.1/SKILL.md new file mode 100644 index 0000000000..03876fbbdb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.1.1/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-azure-foundations-8.1.1.1 +description: "Ensure Microsoft Defender CSPM is set to 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, cspm] +cis_id: "8.1.1.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.1.1 Ensure Microsoft Defender CSPM is set to 'On' (Automated) + +## Description + +Enable Microsoft Defender CSPM to continuously assess cloud resources for security misconfigurations, compliance risks, and exposure to threats. + +## Rationale + +Microsoft Defender CSPM provides detailed visibility into the security state of assets and workloads and offers hardening guidance to help improve security posture. + +## Impact + +Enabling Microsoft Defender CSPM incurs hourly charges for each billable compute, database, and storage resource. This can lead to significant costs in larger environments. Careful planning and cost analysis are recommended before enabling the service. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. Under `Cloud Security Posture Management (CSPM)`, in the row for `Defender CSPM`, ensure `Status` is set to `On`. + +**From Azure CLI:** + +``` +az security pricing show --name CloudPosture --query pricingTier +``` + +Ensure `"Standard"` is returned. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name CloudPosture | Select-Object PricingTier +``` + +Ensure `Standard` is returned. + +**From Azure Policy:** + +- Policy ID: `1f90fc71-a595-4066-8974-d4d0802e8ef0` - Name: 'Microsoft Defender CSPM should be enabled' + +## Expected Result + +The pricing tier for CloudPosture should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. Under `Cloud Security Posture Management (CSPM)`, in the row for `Defender CSPM`, set the toggle switch for `Status` to `On`. +6. Click `Save`. + +**From Azure CLI:** + +``` +az security pricing create --name CloudPosture --tier Standard --extensions name=ApiPosture isEnabled=true +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name CloudPosture -PricingTier Standard -Extension '[{"name":"ApiPosture","isEnabled":"True"}]' +``` + +## Default Value + +Defender CSPM is disabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/concept-cloud-security-posture-management +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/tutorial-enable-cspm-plan +3. https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/#pricing +4. https://learn.microsoft.com/en-us/cli/azure/security/pricing +5. https://learn.microsoft.com/en-us/powershell/module/az.security/get-azsecuritypricing +6. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.10/SKILL.md new file mode 100644 index 0000000000..0b34f84c92 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.10/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-azure-foundations-8.1.10 +description: "Ensure That Microsoft Defender for Resource Manager Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, resource-manager] +cis_id: "8.1.10" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.10 Ensure That Microsoft Defender for Resource Manager Is Set To 'On' (Automated) + +## Description + +Enable Microsoft Defender for Resource Manager to automatically monitor all Azure Resource Manager operations in the organization, detecting threats targeting the management layer of Azure. + +## Rationale + +Azure Resource Manager is the deployment and management service for Azure. It provides a management layer that enables the creation, updating, and deletion of resources. Microsoft Defender for Resource Manager monitors all resource management operations, detecting suspicious activities such as operations from malicious IP addresses, disabling antimalware, and suspicious scripts running via VM extensions. This provides critical visibility into potential attacks against the Azure control plane. + +## Impact + +Enabling Microsoft Defender for Resource Manager incurs additional costs based on the number of resource management operations. Organizations should evaluate their operational volume to estimate costs before enabling. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. Locate `Resource Manager` in the list and ensure the `Status` is set to `On`. + +**From Azure CLI:** + +``` +az security pricing show -n Arm --query pricingTier +``` + +Ensure `"Standard"` is returned. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name Arm | Select-Object PricingTier +``` + +Ensure `Standard` is returned. + +## Expected Result + +The pricing tier for Arm (Resource Manager) should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. In the row for `Resource Manager`, set the `Status` toggle to `On`. +6. Click `Save`. + +**From Azure CLI:** + +``` +az security pricing create -n Arm --tier Standard +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name Arm -PricingTier Standard +``` + +## Default Value + +Microsoft Defender for Resource Manager is disabled (Free tier) by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-resource-manager-introduction +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/enable-enhanced-security +3. https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/#pricing +4. https://learn.microsoft.com/en-us/cli/azure/security/pricing +5. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.11/SKILL.md new file mode 100644 index 0000000000..fa1d20c861 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.11/SKILL.md @@ -0,0 +1,92 @@ +--- +name: cis-azure-foundations-8.1.11 +description: "Ensure That Microsoft Defender Recommendation for 'Apply system updates' status is 'Completed'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, system-updates] +cis_id: "8.1.11" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.11 Ensure That Microsoft Defender Recommendation for 'Apply system updates' status is 'Completed' (Automated) + +## Description + +Ensure that the Microsoft Defender for Cloud recommendation for applying system updates has been resolved and its status shows as 'Completed', indicating all virtual machines have the latest security and critical updates installed. + +## Rationale + +Keeping virtual machines up to date with the latest security and critical updates is essential for maintaining a strong security posture. Unpatched systems are a primary attack vector for adversaries. Microsoft Defender for Cloud continuously assesses the update status of machines and generates recommendations when updates are missing. Ensuring the 'Apply system updates' recommendation is completed confirms that all monitored machines have been patched. + +## Impact + +Applying system updates may require maintenance windows and can cause temporary service disruption during reboots. Organizations should plan update schedules to minimize impact on production workloads. Automatic update mechanisms (e.g., Azure Update Management) can help streamline this process. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `General`, click `Recommendations`. +3. In the search box, type `Apply system updates`. +4. Verify that the recommendation status shows `Completed` (green checkmark). +5. If the status is `Not Completed`, click the recommendation to see which resources are missing updates. + +**From Azure CLI:** + +``` +az security assessment list --query "[?displayName=='System updates should be installed on your machines'].{Name:displayName, Status:status.code}" -o table +``` + +Ensure `Status` shows `Healthy` for all assessments. + +**From PowerShell:** + +``` +Get-AzSecurityAssessment | Where-Object {$_.DisplayName -like "*System updates*"} | Select-Object DisplayName, @{N="Status";E={$_.Status.Code}} +``` + +Ensure all results show `Healthy`. + +## Expected Result + +The 'Apply system updates' recommendation should show status `Completed` or all assessments should return `Healthy`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `General`, click `Recommendations`. +3. Search for `Apply system updates`. +4. Click the recommendation to view affected resources. +5. For each affected resource, follow the remediation steps to install the missing updates. +6. Alternatively, use Azure Update Management to automate the process. + +**Using Azure Update Management:** + +1. Go to `Azure Automation` or `Azure Update Manager`. +2. Configure update schedules for all virtual machines. +3. Enable periodic assessment to automatically check for missing updates. +4. Deploy updates during scheduled maintenance windows. + +## Default Value + +By default, Microsoft Defender for Cloud monitors update status but does not automatically apply updates. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/recommendations-reference +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/apply-security-recommendations +3. https://learn.microsoft.com/en-us/azure/update-manager/overview +4. https://learn.microsoft.com/en-us/azure/automation/update-management/overview + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.12/SKILL.md new file mode 100644 index 0000000000..1f4cb29eac --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.12/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-azure-foundations-8.1.12 +description: "Ensure the Microsoft Defender for Cloud 'Security alert emails' is configured" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, email-notifications] +cis_id: "8.1.12" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.12 Ensure the Microsoft Defender for Cloud 'Security alert emails' is configured (Automated) + +## Description + +Ensure that Microsoft Defender for Cloud is configured to send security alert email notifications to a designated security contact, enabling prompt response to security incidents. + +## Rationale + +Configuring security alert email notifications ensures that the appropriate personnel are informed when security alerts are generated by Microsoft Defender for Cloud. Without email notifications, critical security alerts may go unnoticed, delaying incident response and potentially allowing threats to persist or escalate. Designating a security contact ensures accountability and timely action on security events. + +## Impact + +Configuring email notifications has minimal impact. The designated recipients will receive email alerts for security events, which may result in a high volume of emails depending on the environment size and activity. Organizations should ensure the designated recipients can manage the alert volume effectively. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Email notifications` blade. +5. Verify that a valid email address is configured in the `Email recipients` field. +6. Ensure `Notify about alerts with the following severity (or higher)` is enabled. + +**From Azure CLI:** + +``` +az account get-access-token --query "{subscription:subscription,token:accessToken}" -o tsv +``` + +Then query the security contacts API: + +``` +az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts?api-version=2020-01-01-preview" +``` + +Verify that `emails` field contains valid email addresses. + +**From PowerShell:** + +``` +Get-AzSecurityContact | Select-Object Name, Email, AlertNotifications +``` + +Ensure `Email` contains a valid address and `AlertNotifications` is `On`. + +## Expected Result + +A valid security contact email address should be configured and alert notifications should be enabled. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Email notifications` blade. +5. In the `Email recipients` field, enter a valid email address for the security contact. +6. Set `Notify about alerts with the following severity (or higher)` to the desired level. +7. Click `Save`. + +**From Azure CLI:** + +``` +az rest --method put --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/default?api-version=2020-01-01-preview" --body '{"properties":{"emails":"security@example.com","alertNotifications":{"state":"On","minimalSeverity":"High"}}}' +``` + +**From PowerShell:** + +``` +Set-AzSecurityContact -Name "default" -Email "security@example.com" -AlertAdmin -NotifyOnAlert +``` + +## Default Value + +By default, no security contact email is configured for alert notifications. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/configure-email-notifications +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/security-policy-concept +3. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/security-contacts +4. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritycontact + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.13/SKILL.md new file mode 100644 index 0000000000..d077c7ef91 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.13/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-azure-foundations-8.1.13 +description: "Ensure 'Additional email addresses' for the subscription is configured with a security contact email" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, email-notifications] +cis_id: "8.1.13" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.13 Ensure 'Additional email addresses' for the subscription is configured with a security contact email (Automated) + +## Description + +Ensure that additional email addresses are configured for the subscription's security contact settings in Microsoft Defender for Cloud, so that security alerts are sent to multiple designated recipients beyond just the subscription owner. + +## Rationale + +Configuring additional email addresses for security alerts ensures that multiple stakeholders receive notifications about security events. Relying solely on the subscription owner for alert notifications creates a single point of failure. If the owner is unavailable, critical alerts may be missed. By adding additional security contacts, organizations ensure broader coverage and faster incident response times. + +## Impact + +Adding additional email addresses has minimal technical impact. Recipients will receive security alert emails, which may increase email volume depending on the environment. Organizations should ensure all listed contacts are relevant security personnel who can act on the alerts. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Email notifications` blade. +5. Verify that the `Additional email addresses` field contains one or more valid email addresses (separated by semicolons). + +**From Azure CLI:** + +``` +az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts?api-version=2020-01-01-preview" +``` + +Verify that the `emails` property contains additional email addresses beyond the subscription owner. + +**From PowerShell:** + +``` +Get-AzSecurityContact | Select-Object Name, Email +``` + +Ensure the `Email` field contains additional email addresses. + +## Expected Result + +The `Additional email addresses` field should contain at least one valid email address for a security contact. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Email notifications` blade. +5. In the `Additional email addresses` field, enter the email addresses of security contacts separated by semicolons (e.g., `security@example.com;soc@example.com`). +6. Click `Save`. + +**From Azure CLI:** + +``` +az rest --method put --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/default?api-version=2020-01-01-preview" --body '{"properties":{"emails":"security@example.com;soc@example.com","alertNotifications":{"state":"On","minimalSeverity":"High"}}}' +``` + +**From PowerShell:** + +``` +Set-AzSecurityContact -Name "default" -Email "security@example.com;soc@example.com" -AlertAdmin -NotifyOnAlert +``` + +## Default Value + +By default, no additional email addresses are configured for security alert notifications. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/configure-email-notifications +2. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/security-contacts +3. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritycontact + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.14/SKILL.md new file mode 100644 index 0000000000..27701352f8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.14/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-azure-foundations-8.1.14 +description: "Ensure That 'Notify about alerts with the following severity' is Set to 'High'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, alert-notifications] +cis_id: "8.1.14" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.14 Ensure That 'Notify about alerts with the following severity' is Set to 'High' (Automated) + +## Description + +Ensure that Microsoft Defender for Cloud is configured to send email notifications for alerts with a severity level of 'High' or above, ensuring that critical security threats are promptly communicated to the security team. + +## Rationale + +Configuring alert notifications to trigger on 'High' severity ensures that the most critical security threats are escalated via email. High severity alerts typically indicate active threats, successful exploitation, or critical misconfigurations that require immediate attention. Without proper notification thresholds, security teams may miss critical alerts or be overwhelmed by lower-priority notifications. + +## Impact + +Setting the notification threshold to 'High' will result in email notifications only for high-severity alerts. Medium and low severity alerts will still be visible in the Defender for Cloud portal but will not trigger email notifications. Organizations should ensure they have processes to review lower-severity alerts through the portal or other monitoring channels. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Email notifications` blade. +5. Verify that `Notify about alerts with the following severity (or higher)` is set to `High`. + +**From Azure CLI:** + +``` +az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts?api-version=2020-01-01-preview" +``` + +Verify that `alertNotifications.minimalSeverity` is set to `High`. + +**From PowerShell:** + +``` +Get-AzSecurityContact | Select-Object Name, AlertNotifications +``` + +Ensure `AlertNotifications` is enabled and the minimal severity is set to `High`. + +## Expected Result + +The alert notification severity threshold should be set to `High`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Email notifications` blade. +5. Set `Notify about alerts with the following severity (or higher)` to `High`. +6. Click `Save`. + +**From Azure CLI:** + +``` +az rest --method put --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/default?api-version=2020-01-01-preview" --body '{"properties":{"alertNotifications":{"state":"On","minimalSeverity":"High"}}}' +``` + +**From PowerShell:** + +``` +Set-AzSecurityContact -Name "default" -AlertAdmin -NotifyOnAlert +``` + +## Default Value + +By default, email notifications for security alerts are not configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/configure-email-notifications +2. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/security-contacts +3. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritycontact + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.15/SKILL.md new file mode 100644 index 0000000000..9c8b55a492 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.15/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-azure-foundations-8.1.15 +description: "Ensure that Microsoft Defender External Attack Surface Monitoring (EASM) is enabled" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, easm, attack-surface] +cis_id: "8.1.15" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.15 Ensure that Microsoft Defender External Attack Surface Monitoring (EASM) is enabled (Manual) + +## Description + +Enable Microsoft Defender External Attack Surface Monitoring (EASM) to continuously discover and map the organization's external-facing digital attack surface, providing visibility into internet-exposed assets that may be unknown or unmanaged. + +## Rationale + +Organizations often have internet-facing assets they are unaware of, including shadow IT, forgotten infrastructure, and assets from mergers and acquisitions. Microsoft Defender EASM discovers and monitors these assets by scanning the internet for resources associated with the organization's known infrastructure. This provides critical visibility into the external attack surface, helping identify exposed services, misconfigurations, and vulnerabilities before adversaries can exploit them. + +## Impact + +Enabling EASM incurs additional costs based on the number of monitored assets. The initial discovery process may reveal a significant number of previously unknown assets that require investigation and remediation. Organizations should plan for the operational effort needed to triage and manage newly discovered assets. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender External Attack Surface Management`. +2. Verify that an EASM workspace has been created. +3. Verify that discovery groups have been configured with appropriate seeds (domains, IP ranges, ASNs). +4. Verify that the workspace is actively discovering and monitoring assets. + +**Note:** There is currently no Azure CLI or PowerShell command to directly query EASM status. This is a manual verification. + +**Using Azure REST API:** + +``` +az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Easm/workspaces?api-version=2023-04-01-preview" +``` + +Verify that at least one EASM workspace exists. + +## Expected Result + +At least one EASM workspace should be created and actively monitoring the organization's external attack surface with configured discovery groups. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender External Attack Surface Management`. +2. Click `Create a workspace`. +3. Select the appropriate subscription and resource group. +4. Enter a name for the workspace and select the region. +5. Click `Review + Create`, then `Create`. +6. Once the workspace is created, configure discovery groups with the organization's known seeds (domains, IP blocks, ASNs, etc.). +7. Start the discovery process. + +## Default Value + +Microsoft Defender EASM is not enabled by default. An EASM workspace must be explicitly created and configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/external-attack-surface-management/overview +2. https://learn.microsoft.com/en-us/azure/external-attack-surface-management/deploying-the-defender-easm-azure-resource +3. https://learn.microsoft.com/en-us/azure/external-attack-surface-management/using-and-managing-discovery +4. https://azure.microsoft.com/en-us/pricing/details/defender-external-attack-surface-management/ + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.16/SKILL.md new file mode 100644 index 0000000000..3ea0c13dd2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.16/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-azure-foundations-8.1.16 +description: "Ensure that Microsoft Cloud Security Benchmark policies are not set to 'Disabled'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, security-benchmark, policies] +cis_id: "8.1.16" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.16 Ensure that Microsoft Cloud Security Benchmark policies are not set to 'Disabled' (Automated) + +## Description + +Ensure that none of the policies within the Microsoft Cloud Security Benchmark (MCSB) initiative assigned to the subscription have been manually disabled, maintaining comprehensive security coverage. + +## Rationale + +The Microsoft Cloud Security Benchmark (MCSB) is the default security initiative automatically assigned to every subscription in Microsoft Defender for Cloud. It provides a comprehensive set of security policies aligned with industry standards. Disabling individual policies within MCSB reduces the security coverage and creates blind spots in the organization's security posture. All MCSB policies should remain enabled to ensure full compliance assessment and recommendation coverage. + +## Impact + +Keeping all MCSB policies enabled may generate recommendations for resources that are not in scope or not applicable to the organization's environment. However, the security benefits of comprehensive coverage outweigh the noise from inapplicable recommendations. Organizations can use exemptions for specific resources rather than disabling policies entirely. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Security policy` blade. +5. Click on `Microsoft Cloud Security Benchmark`. +6. Review the list of policies and ensure none have the `Effect` set to `Disabled`. + +**From Azure CLI:** + +``` +az policy assignment list --scope "/subscriptions/{subscriptionId}" --query "[?displayName=='Microsoft Cloud Security Benchmark']" +``` + +Then check the policy parameters for any disabled effects: + +``` +az policy assignment show --name "{assignmentName}" --scope "/subscriptions/{subscriptionId}" --query "parameters" +``` + +Verify no policy effects are set to `Disabled`. + +**From PowerShell:** + +``` +$assignment = Get-AzPolicyAssignment -Scope "/subscriptions/{subscriptionId}" | Where-Object {$_.Properties.DisplayName -eq "Microsoft Cloud Security Benchmark"} +$assignment.Properties.Parameters | ConvertTo-Json -Depth 10 +``` + +Review the output and verify no policy effects are set to `Disabled`. + +## Expected Result + +All policies within the Microsoft Cloud Security Benchmark initiative should have their effects set to their default values (typically `Audit` or `AuditIfNotExists`), not `Disabled`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Security policy` blade. +5. Click on `Microsoft Cloud Security Benchmark`. +6. For any policy with `Effect` set to `Disabled`, click the policy. +7. Change the `Effect` back to its default value (e.g., `Audit`, `AuditIfNotExists`). +8. Click `Save`. + +**From Azure CLI:** + +``` +az policy assignment update --name "{assignmentName}" --scope "/subscriptions/{subscriptionId}" --params '{"policyParameterName":{"value":"AuditIfNotExists"}}' +``` + +**From PowerShell:** + +``` +Set-AzPolicyAssignment -Name "{assignmentName}" -Scope "/subscriptions/{subscriptionId}" -PolicyParameter '{"policyParameterName":{"value":"AuditIfNotExists"}}' +``` + +## Default Value + +The Microsoft Cloud Security Benchmark is automatically assigned to all subscriptions with all policies enabled by default. + +## References + +1. https://learn.microsoft.com/en-us/security/benchmark/azure/overview +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/security-policy-concept +3. https://learn.microsoft.com/en-us/azure/defender-for-cloud/update-regulatory-compliance-packages +4. https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.2.1/SKILL.md new file mode 100644 index 0000000000..49ee7777cb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.2.1/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-azure-foundations-8.1.2.1 +description: "Ensure Microsoft Defender for APIs is set to 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, api] +cis_id: "8.1.2.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.2.1 Ensure Microsoft Defender for APIs is set to 'On' (Automated) + +## Description + +Microsoft Defender for APIs offers full lifecycle protection, detection, and response coverage for APIs. Due to its potentially high cost, Microsoft Defender for APIs may not be suitable for all environments and should be evaluated carefully before implementation. + +## Rationale + +Microsoft Defender for APIs helps provide visibility into business-critical APIs, assess and improve their security posture, prioritize vulnerability remediation, and detect threats in real time. + +## Impact + +Microsoft Defender for APIs uses a tiered pricing model, billed per subscription per hour, with each tier allowing a set limit of API calls. In high-traffic environments, this may result in significant or prohibitive costs. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. Under `Cloud Workload Protection (CWP)`, in the row for `APIs`, ensure the `Status` is set to `On`. + +**From Azure CLI:** + +``` +az security pricing show --name Api --query pricingTier +``` + +Ensure `"Standard"` is returned. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name Api | Select-Object PricingTier +``` + +Ensure `Standard` is returned. + +**From Azure Policy:** + +- Policy ID: `7926a6d1-b268-4586-8197-e8ae90c877d7` - Name: 'Microsoft Defender for APIs should be enabled' + +## Expected Result + +The pricing tier for Api should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. Under `Cloud Workload Protection (CWP)`, in the row for `APIs`, set the toggle switch for `Status` to `On`. +6. Select a plan. +7. Click `Save` to save the plan selection. +8. Click `Save` to enable Defender for APIs. + +**From Azure CLI:** + +``` +az security pricing create --name Api --tier Standard --subplan +``` + +Valid subplan values: P1, P2, P3, P4, and P5. + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name Api -PricingTier Standard -SubPlan +``` + +Valid SubPlan values: P1, P2, P3, P4, and P5. + +## Default Value + +Defender for APIs is disabled by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-apis-introduction +2. https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/#pricing +3. https://learn.microsoft.com/en-us/cli/azure/security/pricing +4. https://learn.microsoft.com/en-us/powershell/module/az.security/get-azsecuritypricing +5. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.1/SKILL.md new file mode 100644 index 0000000000..2b4229aaad --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.1/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-azure-foundations-8.1.3.1 +description: "Ensure that Defender for Servers is set to 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, servers] +cis_id: "8.1.3.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.3.1 Ensure that Defender for Servers is set to 'On' (Automated) + +## Description + +The Defender for Servers plan in Microsoft Defender for Cloud reduces security risk by providing actionable recommendations to improve and remediate machine security posture. Defender for Servers also helps to protect machines against real-time security threats and attacks. Defender for Servers offers two paid plans: Plan 1 and Plan 2. + +## Rationale + +Enabling Defender for Servers allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC). + +## Impact + +Enabling Defender for Servers in Microsoft Defender for Cloud incurs an additional cost per resource. Plan 1: Subscription only. Plan 2: Subscription and workspace. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment settings`. +3. Click on a subscription name. +4. Select `Defender plans` in the left pane. +5. Under `Cloud Workload Protection (CWP)`, locate `Servers` in the Plan column, ensure Status is set to `On`. +6. Repeat steps 1-5 for each subscription. + +**From Azure CLI:** + +``` +az security pricing show -n VirtualMachines --query pricingTier +``` + +If the tenant is licensed and enabled, the output will indicate `Standard`. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name 'VirtualMachines' | Select-Object Name,PricingTier +``` + +If the tenant is licensed and enabled, the `-PricingTier` parameter will indicate `Standard`. + +**From Azure Policy:** + +- Policy ID: `4da35fc9-c9e7-4960-aec9-797fe7d9051d` - Name: 'Azure Defender for servers should be enabled' + +## Expected Result + +The pricing tier for VirtualMachines should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment settings`. +3. Click on a subscription name. +4. Click `Defender plans` in the left pane. +5. Under `Cloud Workload Protection (CWP)`, locate `Servers` in the Plan column, set Status to `On`. +6. Select `Save`. +7. Repeat steps 1-6 for each subscription requiring remediation. + +**From Azure CLI:** + +``` +az security pricing create -n VirtualMachines --tier 'standard' +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name 'VirtualMachines' -PricingTier 'Standard' +``` + +## Default Value + +By default, the Defender for Servers plan is disabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-servers-overview +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/plan-defender-for-servers +3. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/pricings/list +4. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/pricings/update +5. https://learn.microsoft.com/en-us/powershell/module/az.security/get-azsecuritypricing +6. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.2/SKILL.md new file mode 100644 index 0000000000..3a40f49b0c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.2/SKILL.md @@ -0,0 +1,79 @@ +--- +name: cis-azure-foundations-8.1.3.2 +description: "Ensure 'Vulnerability assessment for machines' component status is set to 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, servers, vulnerability-assessment] +cis_id: "8.1.3.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.3.2 Ensure that 'Vulnerability assessment for machines' component status is set to 'On' (Manual) + +## Description + +Enable vulnerability assessment for machines on both Azure and hybrid (Arc enabled) machines. + +## Rationale + +Vulnerability assessment for machines scans for various security-related configurations and events such as system updates, OS vulnerabilities, and endpoint protection, then produces alerts on threat and vulnerability findings. + +## Impact + +Microsoft Defender for Servers plan 2 licensing is required, and configuration of Azure Arc introduces complexity beyond this recommendation. + +## Audit Procedure + +**From Azure Portal:** + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Defender for Cloud`. +3. Under `Management`, select `Environment Settings`. +4. Select a subscription. +5. Click on `Settings & monitoring`. +6. Ensure that `Vulnerability assessment for machines` is set to `On`. + +Repeat the above for any additional subscriptions. + +**From Azure Policy:** + +- Policy ID: `501541f7-f7e7-4cd6-868c-4190fdad3ac9` - Name: 'A vulnerability assessment solution should be enabled on your virtual machines' + +## Expected Result + +Vulnerability assessment for machines should be set to `On`. + +## Remediation + +**From Azure Portal:** + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Defender for Cloud`. +3. Under `Management`, select `Environment Settings`. +4. Select a subscription. +5. Click on `Settings & Monitoring`. +6. Set the `Status` of `Vulnerability assessment for machines` to `On`. +7. Click `Continue`. + +Repeat the above for any additional subscriptions. + +## Default Value + +By default, `Automatic provisioning of monitoring agent` is set to `Off`. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/monitoring-components +2. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/auto-provisioning-settings/list +3. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/auto-provisioning-settings/create +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-posture-vulnerability-management#pv-5-perform-vulnerability-assessments + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.3/SKILL.md new file mode 100644 index 0000000000..9321637466 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.3/SKILL.md @@ -0,0 +1,82 @@ +--- +name: cis-azure-foundations-8.1.3.3 +description: "Ensure 'Endpoint protection' component status is set to 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, servers, endpoint-protection] +cis_id: "8.1.3.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.3.3 Ensure that 'Endpoint protection' component status is set to 'On' (Automated) + +## Description + +The Endpoint protection component enables Microsoft Defender for Endpoint (formerly 'Advanced Threat Protection' or 'ATP' or 'WDATP') to communicate with Microsoft Defender for Cloud. When enabling integration between DfE & DfC it needs to be taken into account that this will have some side effects that may be undesirable. + +## Rationale + +Microsoft Defender for Endpoint integration brings comprehensive Endpoint Detection and Response (EDR) capabilities within Microsoft Defender for Cloud. This integration helps to spot abnormalities, as well as detect and respond to advanced attacks on endpoints monitored by Microsoft Defender for Cloud. MDE works only with Standard Tier subscriptions. + +## Impact + +Endpoint protection requires licensing and is included in Defender for Servers plan 1 and Defender for Servers plan 2. + +## Audit Procedure + +**From Azure Portal:** + +1. From Azure Home select the Portal Menu. +2. Select `Microsoft Defender for Cloud`. +3. Under `Management`, select `Environment Settings`. +4. Click on the subscription name. +5. Click `Settings & monitoring`. +6. Ensure the `Status` for `Endpoint protection` is set to `On`. + +**From PowerShell:** + +``` +Connect-AzAccount +Set-AzContext -Subscription +Get-AzSecuritySetting | Select-Object name,enabled | where-object {$_.name -eq "WDATP"} +``` + +Compliant output: `WDATP True` + +## Expected Result + +The WDATP setting should show `Enabled: True`. + +## Remediation + +**From Azure Portal:** + +1. From Azure Home select the Portal Menu. +2. Go to `Microsoft Defender for Cloud`. +3. Under `Management`, select `Environment Settings`. +4. Click on the subscription name. +5. Click `Settings & monitoring`. +6. Set the `Status` for `Endpoint protection` to `On`. +7. Click `Continue`. + +## Default Value + +By default, Endpoint protection is `off`. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/integration-defender-for-endpoint +2. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/settings/list +3. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/settings/update +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-endpoint-security#es-1-use-endpoint-detection-and-response-edr +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-endpoint-security#es-2-use-modern-anti-malware-software + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.4/SKILL.md new file mode 100644 index 0000000000..65662fe86e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.4/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-azure-foundations-8.1.3.4 +description: "Ensure 'Agentless scanning for machines' component status is set to 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, servers, agentless-scanning] +cis_id: "8.1.3.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.3.4 Ensure that 'Agentless scanning for machines' component status is set to 'On' (Manual) + +## Description + +Using disk snapshots, the agentless scanner scans for installed software, vulnerabilities, and plain text secrets. + +## Rationale + +The Microsoft Defender for Cloud agentless machine scanner provides threat detection, vulnerability detection, and discovery of sensitive information. + +## Impact + +Agentless scanning for machines requires licensing and is included in Defender CSPM and Defender for Servers plan 2. + +## Audit Procedure + +**From Azure Portal:** + +1. From the Azure Portal `Home` page, select `Microsoft Defender for Cloud`. +2. Under `Management` select `Environment Settings`. +3. Select a subscription. +4. Under `Settings` > `Defender Plans`, click `Settings & monitoring`. +5. Under the Component column, locate the row for `Agentless scanning for machines`. +6. Ensure that `On` is selected. + +Repeat the above for any additional subscriptions. + +## Expected Result + +Agentless scanning for machines should be set to `On`. + +## Remediation + +**From Azure Portal:** + +1. From the Azure Portal `Home` page, select `Microsoft Defender for Cloud`. +2. Under `Management` select `Environment Settings`. +3. Select a subscription. +4. Under `Settings` > `Defender Plans`, click `Settings & monitoring`. +5. Under the Component column, locate the row for `Agentless scanning for machines`. +6. Select `On`. +7. Click `Continue` in the top left. + +Repeat the above for any additional subscriptions. + +## Default Value + +By default, Agentless scanning for machines is `off`. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/concept-agentless-data-collection +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-incident-response#ir-2-preparation---setup-incident-notification +3. https://learn.microsoft.com/en-us/azure/defender-for-cloud/enable-agentless-scanning-vms + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.5/SKILL.md new file mode 100644 index 0000000000..34f8d5fd33 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.3.5/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-azure-foundations-8.1.3.5 +description: "Ensure 'File Integrity Monitoring' component status is set to 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, servers, file-integrity-monitoring] +cis_id: "8.1.3.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.3.5 Ensure that 'File Integrity Monitoring' component status is set to 'On' (Manual) + +## Description + +File Integrity Monitoring (FIM) is a feature that monitors critical system files in Windows or Linux for potential signs of attack or compromise. + +## Rationale + +FIM provides a detection mechanism for compromised files. When FIM is enabled, critical system files are monitored for changes that might indicate a threat actor is attempting to modify system files for lateral compromise within a host operating system. + +## Impact + +File Integrity Monitoring requires licensing and is included in Defender for Servers plan 2. + +## Audit Procedure + +**From Azure Portal:** + +1. From the Azure Portal `Home` page, select `Microsoft Defender for Cloud`. +2. Under `Management` select `Environment Settings`. +3. Select a subscription. +4. Under `Settings` > `Defender Plans`, click `Settings & monitoring`. +5. Under the Component column, locate the row for `File Integrity Monitoring`. +6. Ensure that `On` is selected. + +Repeat the above for any additional subscriptions. + +## Expected Result + +File Integrity Monitoring should be set to `On`. + +## Remediation + +**From Azure Portal:** + +1. From the Azure Portal `Home` page, select `Microsoft Defender for Cloud`. +2. Under `Management` select `Environment Settings`. +3. Select a subscription. +4. Under `Settings` > `Defender Plans`, click `Settings & monitoring`. +5. Under the Component column, locate the row for `File Integrity Monitoring`. +6. Select `On`. +7. Click `Continue` in the top left. + +Repeat the above for any additional subscriptions. + +## Default Value + +By default, File Integrity Monitoring is `Off`. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/file-integrity-monitoring-overview +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-incident-response#ir-2-preparation---setup-incident-notification +3. https://learn.microsoft.com/en-us/azure/defender-for-cloud/file-integrity-monitoring-enable-defender-endpoint + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.4.1/SKILL.md new file mode 100644 index 0000000000..48b1489ec0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.4.1/SKILL.md @@ -0,0 +1,93 @@ +--- +name: cis-azure-foundations-8.1.4.1 +description: "Ensure That Microsoft Defender for Containers Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, containers] +cis_id: "8.1.4.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.4.1 Ensure That Microsoft Defender for Containers Is Set To 'On' (Automated) + +## Description + +Microsoft Defender for Containers helps improve, monitor, and maintain the security of containerized assets--including Kubernetes clusters, nodes, workloads, container registries, and images--across multi-cloud and on-premises environments. By default, when enabling the plan through the Azure Portal, Microsoft Defender for Containers automatically configures: Agentless scanning for machines, Defender sensor for runtime protection, Azure Policy for enforcing security best practices, K8S API access for monitoring and threat detection, and Registry access for vulnerability assessment. + +## Rationale + +Enabling Microsoft Defender for Containers enhances defense-in-depth by providing advanced threat detection, vulnerability assessment, and security monitoring for containerized environments, leveraging insights from the Microsoft Security Response Center (MSRC). + +## Impact + +Microsoft Defender for Containers incurs a charge per vCore. Refer to https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/ to estimate potential costs. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Under `Settings`, click `Defender plans`. +5. Under `Cloud Workload Protection (CWP)`, in the row for `Containers`, ensure that the `Status` is set to `On` and `Monitoring coverage` displays `Full`. +6. Repeat steps 1-5 for each subscription. + +**From Azure CLI:** + +``` +az security pricing show --name "Containers" --query [pricingTier,extensions[*].[name,isEnabled]] +``` + +Ensure that the command returns `Standard`, and that each of the extensions returns `True`. + +**From Azure Policy:** + +- Policy ID: `1c988dd6-ade4-430f-a608-2a3e5b0a6d38` - Name: 'Microsoft Defender for Containers should be enabled' + +## Expected Result + +The pricing tier for Containers should be `Standard` with all extensions enabled. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Under `Settings`, click `Defender plans`. +5. Under `Cloud Workload Protection (CWP)`, in the row for `Containers`, click `On` in the `Status` column. +6. If `Monitoring coverage` displays `Partial`, click `Settings` under `Partial`. +7. Set the status of each of the components to `On`. +8. Click `Continue`. +9. Click `Save`. +10. Repeat steps 1-9 for each subscription. + +**From Azure CLI:** + +``` +az security pricing create -n 'Containers' --tier 'standard' --extensions name=ContainerRegistriesVulnerabilityAssessments isEnabled=True --extensions name=AgentlessDiscoveryForKubernetes isEnabled=True --extensions name=AgentlessVmScanning isEnabled=True --extensions name=ContainerSensor isEnabled=True +``` + +## Default Value + +The Microsoft Defender for Containers plan is disabled by default. + +## References + +1. https://learn.microsoft.com/en-us/cli/azure/security/pricing +2. https://learn.microsoft.com/en-us/powershell/module/az.security/get-azsecuritypricing +3. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritypricing +4. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-containers-introduction +5. https://learn.microsoft.com/en-us/azure/defender-for-cloud/tutorial-enable-containers-azure + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.5.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.5.1/SKILL.md new file mode 100644 index 0000000000..5f298dea47 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.5.1/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-azure-foundations-8.1.5.1 +description: "Ensure That Microsoft Defender for Storage Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, storage] +cis_id: "8.1.5.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.5.1 Ensure That Microsoft Defender for Storage Is Set To 'On' (Automated) + +## Description + +Turning on Microsoft Defender for Storage enables threat detection for Storage, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud. + +## Rationale + +Enabling Microsoft Defender for Storage allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC). + +## Impact + +Turning on Microsoft Defender for Storage incurs an additional cost per resource. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click on the subscription name. +4. Select the `Defender plans` blade. +5. Ensure `Status` is set to `On` for `Storage`. + +**From Azure CLI:** + +``` +az security pricing show -n StorageAccounts +``` + +Ensure the output is `Standard`. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name 'StorageAccounts' | Select-Object Name,PricingTier +``` + +Ensure output for `Name PricingTier` is `StorageAccounts Standard`. + +**From Azure Policy:** + +- Policy ID: `640d2586-54d2-465f-877f-9ffc1d2109f4` - Name: 'Microsoft Defender for Storage should be enabled' + +## Expected Result + +The pricing tier for StorageAccounts should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click on the subscription name. +4. Select the `Defender plans` blade. +5. Set `Status` to `On` for `Storage`. +6. Select `Save`. + +**From Azure CLI:** + +``` +az security pricing create -n StorageAccounts --tier 'standard' +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name 'StorageAccounts' -PricingTier 'Standard' +``` + +## Default Value + +By default, Microsoft Defender plan is off. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/alerts-overview +2. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/pricings/list +3. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/pricings/update +4. https://learn.microsoft.com/en-us/powershell/module/az.security/get-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.5.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.5.2/SKILL.md new file mode 100644 index 0000000000..fa823273e6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.5.2/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-azure-foundations-8.1.5.2 +description: "Ensure Advanced Threat Protection Alerts for Storage Accounts Are Monitored" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, storage, monitoring] +cis_id: "8.1.5.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.5.2 Ensure Advanced Threat Protection Alerts for Storage Accounts Are Monitored (Manual) + +## Description + +After enabling Microsoft Defender for Storage, configure an alert monitoring and response process to ensure that alerts are actioned in a timely manner. Integrate with SIEM solutions like Microsoft Sentinel, or configure email/webhook notifications to security teams. + +## Rationale + +Enabling Microsoft Defender for Storage without a monitoring process limits its value. Continuous monitoring and alert triage ensure that detected threats are acted upon quickly, reducing risk exposure. + +## Impact + +Requires integration effort with SIEM or alerting tools and a defined incident response process. The amount of data logged and thus the cost incurred can vary significantly depending on the tenant size and the applications in your tenant that interact with the Microsoft Graph APIs. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment Settings`. +3. Expand the Tenant Root Group(s) to reveal subscriptions. + +For each subscription listed: + +1. Click the subscription name to open the `Defender Plans` settings. +2. In the settings on the left, click `Continuous Export`. + +Ensure that `Export enabled` is set to `On` and delivering at least `Security Alerts (Medium and High)` to an Event Hub or Log Analytics Workspace which is tied to a SIEM that is configured to monitor and alert for security alerts. + +## Expected Result + +Continuous export should be enabled and delivering security alerts to an Event Hub or Log Analytics Workspace. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment Settings`. +3. Expand the Tenant Root Group(s) to reveal subscriptions. + +For each subscription listed: + +1. Click the subscription name to open the `Defender Plans` settings. +2. In the settings on the left, click `Continuous Export`. +3. Select either `Event Hub, Log Analytics Workspace,` or both depending on your environment. +4. Set `Export enabled` to `On`. +5. Under Exported data types, ensure that at least `Security Alerts (Medium and High)` is checked. +6. Under Export target, set the target Event Hub or Log Analytics Workspace which is tied to a SIEM that is configured to monitor and alert for security alerts. + +Ensure security alerts are included in the security operations workflow and incident response plan. + +## Default Value + +By default, continuous export is `off`. + +## References + +1. https://learn.microsoft.com/azure/defender-for-cloud/alerts-overview +2. https://learn.microsoft.com/azure/sentinel/connect-defender-for-cloud +3. https://learn.microsoft.com/en-us/azure/defender-for-cloud/continuous-export + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.6.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.6.1/SKILL.md new file mode 100644 index 0000000000..9050c391b3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.6.1/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-azure-foundations-8.1.6.1 +description: "Ensure That Microsoft Defender for App Services Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, app-service] +cis_id: "8.1.6.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.6.1 Ensure That Microsoft Defender for App Services Is Set To 'On' (Automated) + +## Description + +Turning on Microsoft Defender for App Service enables threat detection for App Service, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud. + +## Rationale + +Enabling Microsoft Defender for App Service allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC). + +## Impact + +Turning on Microsoft Defender for App Service incurs an additional cost per resource. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click the subscription name. +4. Select `Defender plans`. +5. Ensure Status is `On` for `App Service`. + +**From Azure CLI:** + +``` +az security pricing show -n AppServices +``` + +Ensure `-PricingTier` is set to `Standard`. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name 'AppServices' | Select-Object Name,PricingTier +``` + +Ensure the `-PricingTier` is set to `Standard`. + +**From Azure Policy:** + +- Policy ID: `2913021d-f2fd-4f3d-b958-22354e2bdbcb` - Name: 'Azure Defender for App Service should be enabled' + +## Expected Result + +The pricing tier for AppServices should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click the subscription name. +4. Select `Defender plans`. +5. Set `App Service` Status to `On`. +6. Select `Save`. + +**From Azure CLI:** + +``` +az security pricing create -n Appservices --tier 'standard' +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name "AppServices" -PricingTier "Standard" +``` + +## Default Value + +By default, Microsoft Defender plan is off. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/alerts-overview +2. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/pricings/list +3. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/pricings/update +4. https://learn.microsoft.com/en-us/powershell/module/az.security/get-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.1/SKILL.md new file mode 100644 index 0000000000..fd566444aa --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.1/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-azure-foundations-8.1.7.1 +description: "Ensure That Microsoft Defender for Azure Cosmos DB Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, databases, cosmos-db] +cis_id: "8.1.7.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.7.1 Ensure That Microsoft Defender for Azure Cosmos DB Is Set To 'On' (Automated) + +## Description + +Microsoft Defender for Azure Cosmos DB scans all incoming network requests for threats to your Azure Cosmos DB resources. + +## Rationale + +In scanning Azure Cosmos DB requests within a subscription, requests are compared to a heuristic list of potential security threats. These threats could be a result of a security breach within your services, thus scanning for them could prevent a potential security threat from being introduced. + +## Impact + +Enabling Microsoft Defender for Azure Cosmos DB requires enabling Microsoft Defender for your subscription. Both will incur additional charges. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click on the subscription name. +4. Select the `Defender plans` blade. +5. On the `Database` row click on `Select types >`. +6. Ensure the toggle switch next to `Azure Cosmos DB` is set to `On`. + +**From Azure CLI:** + +``` +az security pricing show -n CosmosDbs --query pricingTier +``` + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name 'CosmosDbs' | Select-Object Name,PricingTier +``` + +Ensure output of `-PricingTier` is `Standard`. + +**From Azure Policy:** + +- Policy ID: `adbe85b5-83e6-4350-ab58-bf3a4f736e5e` - Name: 'Microsoft Defender for Azure Cosmos DB should be enabled' + +## Expected Result + +The pricing tier for CosmosDbs should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click on the subscription name. +4. Select the `Defender plans` blade. +5. On the `Database` row click on `Select types >`. +6. Set the toggle switch next to `Azure Cosmos DB` to `On`. +7. Click `Continue`. +8. Click `Save`. + +**From Azure CLI:** + +``` +az security pricing create -n 'CosmosDbs' --tier 'standard' +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name 'CosmosDbs' -PricingTier 'Standard' +``` + +## Default Value + +By default, Microsoft Defender for Azure Cosmos DB is not enabled. + +## References + +1. https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/ +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/connect-azure-subscription +3. https://learn.microsoft.com/en-us/azure/defender-for-cloud/alerts-overview +4. https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/azure-cosmos-db-security-baseline +5. https://learn.microsoft.com/en-us/azure/defender-for-cloud/tutorial-enable-databases-plan + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.2/SKILL.md new file mode 100644 index 0000000000..796fa0844a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.2/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-azure-foundations-8.1.7.2 +description: "Ensure That Microsoft Defender for Open-Source Relational Databases Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, databases, open-source-relational] +cis_id: "8.1.7.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.7.2 Ensure That Microsoft Defender for Open-Source Relational Databases Is Set To 'On' (Automated) + +## Description + +Turning on Microsoft Defender for Open-source relational databases enables threat detection for Open-source relational databases, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud. + +## Rationale + +Enabling Microsoft Defender for Open-source relational databases allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC). + +## Impact + +Turning on Microsoft Defender for Open-source relational databases incurs an additional cost per resource. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click on the subscription name. +4. Select the `Defender plans` blade. +5. Click `Select types >` in the row for `Databases`. +6. Ensure the toggle switch next to `Open-source relational databases` is set to `On`. + +**From Azure CLI:** + +``` +az security pricing show -n OpenSourceRelationalDatabases --query pricingTier +``` + +**From PowerShell:** + +``` +Get-AzSecurityPricing | Where-Object {$_.Name -eq 'OpenSourceRelationalDatabases'} | Select-Object Name, PricingTier +``` + +Ensure output for `Name PricingTier` is `OpenSourceRelationalDatabases Standard`. + +**From Azure Policy:** + +- Policy ID: `0a9fbe0d-c5c4-4da8-87d8-f4fd77338835` - Name: 'Azure Defender for open-source relational databases should be enabled' + +## Expected Result + +The pricing tier for OpenSourceRelationalDatabases should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click on the subscription name. +4. Select the `Defender plans` blade. +5. Click `Select types >` in the row for `Databases`. +6. Set the toggle switch next to `Open-source relational databases` to `On`. +7. Select `Continue`. +8. Select `Save`. + +**From Azure CLI:** + +``` +az security pricing create -n 'OpenSourceRelationalDatabases' --tier 'standard' +``` + +**From PowerShell:** + +``` +set-azsecuritypricing -name "OpenSourceRelationalDatabases" -pricingtier "Standard" +``` + +## Default Value + +By default, Microsoft Defender plan is off. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/alerts-overview +2. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/pricings/update +3. https://learn.microsoft.com/en-us/powershell/module/az.security/get-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.3/SKILL.md new file mode 100644 index 0000000000..fd36885a58 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.3/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-azure-foundations-8.1.7.3 +description: "Ensure That Microsoft Defender for Azure SQL Databases Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, databases, sql] +cis_id: "8.1.7.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.7.3 Ensure That Microsoft Defender for (Managed Instance) Azure SQL Databases Is Set To 'On' (Automated) + +## Description + +Turning on Microsoft Defender for Azure SQL Databases enables threat detection for Managed Instance Azure SQL databases, providing threat intelligence, anomaly detection, and behavior analytics in Microsoft Defender for Cloud. + +## Rationale + +Enabling Microsoft Defender for Azure SQL Databases allows for greater defense-in-depth, includes functionality for discovering and classifying sensitive data, surfacing and mitigating potential database vulnerabilities, and detecting anomalous activities that could indicate a threat to your database. + +## Impact + +Turning on Microsoft Defender for Azure SQL Databases incurs an additional cost per resource. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click on the subscription name. +4. Select the `Defender plans` blade. +5. Click `Select types >` in the row for `Databases`. +6. Ensure the toggle switch next to `Azure SQL Databases` is set to `On`. + +**From Azure CLI:** + +``` +az security pricing show -n SqlServers +``` + +Ensure `-PricingTier` is set to `Standard`. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name 'SqlServers' | Select-Object Name,PricingTier +``` + +Ensure the `-PricingTier` is set to `Standard`. + +**From Azure Policy:** + +- Policy ID: `7fe3b40f-802b-4cdd-8bd4-fd799c948cc2` - Name: 'Azure Defender for Azure SQL Database servers should be enabled' +- Policy ID: `abfb7388-5bf4-4ad7-ba99-2cd2f41cebb9` - Name: 'Azure Defender for SQL should be enabled for unprotected SQL Managed Instances' +- Policy ID: `3bc8a0d5-38e0-4a3d-a657-2cb64468fc34` - Name: 'Azure Defender for SQL should be enabled for unprotected MySQL flexible servers' +- Policy ID: `d38668f5-d155-42c7-ab3d-9b57b50f8fbf` - Name: 'Azure Defender for SQL should be enabled for unprotected PostgreSQL flexible servers' +- Policy ID: `d31e5c31-63b2-4f12-887b-e49456834fa1` - Name: 'Microsoft Defender for SQL should be enabled for unprotected Synapse workspaces' +- Policy ID: `938c4981-c2c9-4168-9cd6-972b8675f906` - Name: 'Microsoft Defender for SQL status should be protected for Arc-enabled SQL Servers' + +## Expected Result + +The pricing tier for SqlServers should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click on the subscription name. +4. Select the `Defender plans` blade. +5. Click `Select types >` in the row for `Databases`. +6. Set the toggle switch next to `Azure SQL Databases` to `On`. +7. Select `Continue`. +8. Select `Save`. + +**From Azure CLI:** + +``` +az security pricing create -n SqlServers --tier 'standard' +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name 'SqlServers' -PricingTier 'Standard' +``` + +## Default Value + +By default, Microsoft Defender plan is off. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/alerts-overview +2. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/pricings/list +3. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/pricings/update +4. https://learn.microsoft.com/en-us/powershell/module/az.security/get-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.4/SKILL.md new file mode 100644 index 0000000000..47b0b2b916 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.7.4/SKILL.md @@ -0,0 +1,105 @@ +--- +name: cis-azure-foundations-8.1.7.4 +description: "Ensure That Microsoft Defender for SQL Servers on Machines Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, databases, sql-servers] +cis_id: "8.1.7.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.7.4 Ensure That Microsoft Defender for SQL Servers on Machines Is Set To 'On' (Automated) + +## Description + +Turning on Microsoft Defender for SQL servers on machines enables threat detection for SQL servers on machines, providing threat intelligence, anomaly detection, and behavior analytics in Microsoft Defender for Cloud. + +## Rationale + +Enabling Microsoft Defender for SQL servers on machines allows for greater defense-in-depth, functionality for discovering and classifying sensitive data, surfacing and mitigating potential database vulnerabilities, and detecting anomalous activities that could indicate a threat to your database. + +## Impact + +Turning on Microsoft Defender for SQL servers on machines incurs an additional cost per resource. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click on the subscription name. +4. Select the `Defender plans` blade. +5. Click `Select types >` in the row for `Databases`. +6. Ensure the toggle switch next to `SQL servers on machines` is set to `On`. + +**From Azure CLI:** + +``` +az security pricing show -n SqlServerVirtualMachines +``` + +Ensure the 'PricingTier' is set to 'Standard'. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name 'SqlServerVirtualMachines' | Select-Object Name,PricingTier +``` + +Ensure the 'PricingTier' is set to 'Standard'. + +**From Azure Policy:** + +- Policy ID: `6581d072-105e-4418-827f-bd446d56421b` - Name: 'Azure Defender for SQL servers on machines should be enabled' +- Policy ID: `abfb4388-5bf4-4ad7-ba82-2cd2f41ceae9` - Name: 'Azure Defender for SQL should be enabled for unprotected Azure SQL servers' + +## Expected Result + +The pricing tier for SqlServerVirtualMachines should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, select `Environment Settings`. +3. Click on the subscription name. +4. Select the `Defender plans` blade. +5. Click `Select types >` in the row for `Databases`. +6. Set the toggle switch next to `SQL servers on machines` to `On`. +7. Select `Continue`. +8. Select `Save`. + +**From Azure CLI:** + +``` +az security pricing create -n SqlServerVirtualMachines --tier 'standard' +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name 'SqlServerVirtualMachines' -PricingTier 'Standard' +``` + +## Default Value + +By default, Microsoft Defender plan is off. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-sql-usage +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/alerts-overview +3. https://learn.microsoft.com/en-us/rest/api/defenderforcloud/pricings/update +4. https://learn.microsoft.com/en-us/powershell/module/az.security/get-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.8.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.8.1/SKILL.md new file mode 100644 index 0000000000..ce3f943f43 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.8.1/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-azure-foundations-8.1.8.1 +description: "Ensure That Microsoft Defender for Key Vault Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, key-vault] +cis_id: "8.1.8.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.8.1 Ensure That Microsoft Defender for Key Vault Is Set To 'On' (Automated) + +## Description + +Enable Microsoft Defender for Key Vault to provide an additional layer of protection and security intelligence for detecting unusual and potentially harmful attempts to access or exploit Key Vault accounts. + +## Rationale + +Microsoft Defender for Key Vault detects anomalous and potentially harmful access attempts or exploitation of Azure Key Vault. It uses advanced threat detection capabilities and Microsoft Threat Intelligence data to surface contextual security alerts, enabling organizations to identify and respond to threats targeting their secrets, keys, and certificates stored in Key Vault. + +## Impact + +Enabling Microsoft Defender for Key Vault incurs additional costs based on the pricing tier. Organizations should evaluate the number of Key Vault transactions in their environment to estimate costs before enabling the service. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. Locate `Key Vault` in the list and ensure the `Status` is set to `On`. + +**From Azure CLI:** + +``` +az security pricing show -n KeyVaults --query pricingTier +``` + +Ensure `"Standard"` is returned. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name KeyVaults | Select-Object PricingTier +``` + +Ensure `Standard` is returned. + +## Expected Result + +The pricing tier for KeyVaults should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. In the row for `Key Vault`, set the `Status` toggle to `On`. +6. Click `Save`. + +**From Azure CLI:** + +``` +az security pricing create -n KeyVaults --tier Standard +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name KeyVaults -PricingTier Standard +``` + +## Default Value + +Microsoft Defender for Key Vault is disabled (Free tier) by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-key-vault-introduction +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/enable-enhanced-security +3. https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/#pricing +4. https://learn.microsoft.com/en-us/cli/azure/security/pricing +5. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.9.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.9.1/SKILL.md new file mode 100644 index 0000000000..a52129420b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.1.9.1/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-azure-foundations-8.1.9.1 +description: "Ensure That Microsoft Defender for DNS Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, dns] +cis_id: "8.1.9.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.1.9.1 Ensure That Microsoft Defender for DNS Is Set To 'On' (Automated) + +## Description + +Enable Microsoft Defender for DNS to provide an additional layer of protection for DNS queries, detecting suspicious activities and threats targeting the DNS layer of Azure resources. + +## Rationale + +Microsoft Defender for DNS provides protection by continuously monitoring all DNS queries from Azure resources. It detects suspicious activities such as DNS tunneling, communication with known malicious domains, and DNS attacks. This helps organizations identify compromised resources and potential data exfiltration attempts through DNS channels. + +## Impact + +Enabling Microsoft Defender for DNS incurs additional costs per million DNS queries. Organizations with high volumes of DNS queries should evaluate costs before enabling. Note that Microsoft has announced deprecation plans for this standalone plan as DNS protection is being integrated into Defender for Servers. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. Locate `DNS` in the list and ensure the `Status` is set to `On`. + +**From Azure CLI:** + +``` +az security pricing show -n Dns --query pricingTier +``` + +Ensure `"Standard"` is returned. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name Dns | Select-Object PricingTier +``` + +Ensure `Standard` is returned. + +## Expected Result + +The pricing tier for Dns should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. In the row for `DNS`, set the `Status` toggle to `On`. +6. Click `Save`. + +**From Azure CLI:** + +``` +az security pricing create -n Dns --tier Standard +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name Dns -PricingTier Standard +``` + +## Default Value + +Microsoft Defender for DNS is disabled (Free tier) by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-dns-introduction +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/enable-enhanced-security +3. https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/#pricing +4. https://learn.microsoft.com/en-us/cli/azure/security/pricing +5. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.2.1/SKILL.md new file mode 100644 index 0000000000..a01831a03e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.2.1/SKILL.md @@ -0,0 +1,101 @@ +--- +name: cis-azure-foundations-8.2.1 +description: "Ensure That Microsoft Sentinel Is Enabled" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, sentinel, siem] +cis_id: "8.2.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.2.1 Ensure That Microsoft Sentinel Is Enabled (Automated) + +## Description + +Enable Microsoft Sentinel, a cloud-native SIEM (Security Information and Event Management) and SOAR (Security Orchestration, Automation, and Response) solution, to provide intelligent security analytics and threat intelligence across the enterprise. + +## Rationale + +Microsoft Sentinel provides a centralized platform for collecting, detecting, investigating, and responding to security threats across the entire organization. It collects data from users, devices, applications, and infrastructure, both on-premises and in multiple clouds. Sentinel uses built-in AI and Microsoft's threat intelligence to detect threats, minimize false positives, and automate response through playbooks. Without a SIEM solution like Sentinel, organizations lack comprehensive visibility into security events and the ability to correlate threats across their environment. + +## Impact + +Enabling Microsoft Sentinel incurs costs based on the volume of data ingested into the Log Analytics workspace. Costs can be significant in environments with high log volumes. Organizations should carefully plan data collection strategies, configure data retention policies, and consider commitment tier pricing to optimize costs. A Log Analytics workspace is required as a prerequisite. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Sentinel`. +2. Verify that at least one workspace is listed with Microsoft Sentinel enabled. +3. Click the workspace to verify it is actively collecting data. + +**From Azure CLI:** + +``` +az sentinel workspace list --query "[].{Name:name, ResourceGroup:resourceGroup}" -o table +``` + +If no results are returned, Sentinel is not enabled on any workspace. + +Alternatively, check if the SecurityInsights solution is installed on a Log Analytics workspace: + +``` +az monitor log-analytics solution list --resource-group {resourceGroup} --query "[?plan.product=='OMSGallery/SecurityInsights'].{Name:name, Workspace:properties.workspaceResourceId}" +``` + +**From PowerShell:** + +``` +Get-AzSentinelOnboardingState -ResourceGroupName {resourceGroup} -WorkspaceName {workspaceName} +``` + +Ensure the onboarding state indicates Sentinel is enabled. + +## Expected Result + +At least one Log Analytics workspace should have Microsoft Sentinel enabled and actively collecting security data. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Sentinel`. +2. Click `Create Microsoft Sentinel`. +3. Select an existing Log Analytics workspace or create a new one. +4. Click `Add`. +5. Configure data connectors to begin collecting security logs. + +**From Azure CLI:** + +``` +az sentinel onboarding-state create --resource-group {resourceGroup} --workspace-name {workspaceName} --name "default" +``` + +**From PowerShell:** + +``` +New-AzSentinelOnboardingState -ResourceGroupName {resourceGroup} -WorkspaceName {workspaceName} -Name "default" +``` + +## Default Value + +Microsoft Sentinel is not enabled by default. It must be explicitly enabled on a Log Analytics workspace. + +## References + +1. https://learn.microsoft.com/en-us/azure/sentinel/overview +2. https://learn.microsoft.com/en-us/azure/sentinel/quickstart-onboard +3. https://learn.microsoft.com/en-us/azure/sentinel/connect-data-sources +4. https://azure.microsoft.com/en-us/pricing/details/microsoft-sentinel/ +5. https://learn.microsoft.com/en-us/cli/azure/sentinel + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.1/SKILL.md new file mode 100644 index 0000000000..18f5fc6b5f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.1/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-azure-foundations-8.3.1 +description: "Ensure that the Expiration Date is set for all Keys in RBAC Key Vaults" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, keys, expiration] +cis_id: "8.3.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.1 Ensure that the Expiration Date is set for all Keys in RBAC Key Vaults (Automated) + +## Description + +Ensure that all cryptographic keys stored in Azure Key Vaults using RBAC (Role-Based Access Control) authorization have an expiration date configured. + +## Rationale + +Cryptographic keys without expiration dates remain valid indefinitely, which violates the principle of key rotation and increases the risk of key compromise over time. Setting an expiration date ensures that keys are periodically reviewed and rotated, reducing the window of exposure if a key is compromised. This is a fundamental cryptographic hygiene practice required by most compliance frameworks including PCI DSS, HIPAA, and SOC 2. + +## Impact + +Setting expiration dates on keys requires organizations to implement key rotation processes. When a key expires, any application or service relying on that key will fail until the key is renewed or replaced. Organizations must plan for key rotation well before expiration to avoid service disruptions. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. For each Key Vault with RBAC authorization enabled, click the vault name. +3. Under `Objects`, click `Keys`. +4. For each key, verify that the `Expiration date` column shows a date (not blank or 'Not set'). + +**From Azure CLI:** + +``` +az keyvault list --query "[?properties.enableRbacAuthorization==\`true\`].name" -o tsv +``` + +For each RBAC-enabled Key Vault: + +``` +az keyvault key list --vault-name {vaultName} --query "[].{Name:name, Expires:attributes.expires}" -o table +``` + +Ensure `Expires` is set for all keys. + +**From PowerShell:** + +``` +$vaults = Get-AzKeyVault | Where-Object { $_.EnableRbacAuthorization -eq $true } +foreach ($vault in $vaults) { + Get-AzKeyVaultKey -VaultName $vault.VaultName | Select-Object Name, Expires +} +``` + +Ensure `Expires` is populated for all keys. + +## Expected Result + +All keys in RBAC-enabled Key Vaults should have an expiration date set. + +## Remediation + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Objects`, click `Keys`. +4. Click the key that needs an expiration date. +5. Click the current version of the key. +6. Set the `Expiration date`. +7. Click `Save`. + +**From Azure CLI:** + +``` +az keyvault key set-attributes --vault-name {vaultName} --name {keyName} --expires "2025-12-31T23:59:59Z" +``` + +**From PowerShell:** + +``` +$expires = (Get-Date).AddYears(1).ToUniversalTime() +Update-AzKeyVaultKey -VaultName {vaultName} -Name {keyName} -Expires $expires +``` + +## Default Value + +By default, keys are created without an expiration date. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys +2. https://learn.microsoft.com/en-us/azure/key-vault/general/best-practices +3. https://learn.microsoft.com/en-us/cli/azure/keyvault/key +4. https://learn.microsoft.com/en-us/powershell/module/az.keyvault/update-azkeyvaultkey + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.10/SKILL.md new file mode 100644 index 0000000000..5cc75513c2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.10/SKILL.md @@ -0,0 +1,109 @@ +--- +name: cis-azure-foundations-8.3.10 +description: "Ensure 'Public network access' for Key Vault is set to 'Disabled'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, networking, public-access] +cis_id: "8.3.10" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.10 Ensure 'Public network access' for Key Vault is set to 'Disabled' (Automated) + +## Description + +Ensure that public network access to Azure Key Vault is disabled, restricting access to only private endpoints and trusted Azure services. + +## Rationale + +By default, Azure Key Vault is accessible from the public internet. Even with proper authentication and authorization, exposing Key Vault publicly increases the attack surface and the risk of brute-force attacks, credential stuffing, or exploitation of potential authentication vulnerabilities. Disabling public network access ensures that Key Vault can only be accessed through private endpoints within the virtual network or by trusted Azure services, significantly reducing the attack surface and the risk of unauthorized access to sensitive secrets, keys, and certificates. + +## Impact + +Disabling public network access requires that all clients accessing Key Vault do so through private endpoints or trusted Azure services. This means applications outside the virtual network, including developer workstations, CI/CD pipelines, and external services, will not be able to access Key Vault unless they are connected via VPN, ExpressRoute, or other private network connectivity. Organizations must ensure private endpoints are properly configured before disabling public access to avoid service disruptions. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Settings`, click `Networking`. +4. Under the `Firewalls and virtual networks` tab, verify that `Public network access` is set to `Disabled`. + +**From Azure CLI:** + +``` +az keyvault list --query "[].{Name:name, PublicAccess:properties.publicNetworkAccess}" -o table +``` + +Ensure `PublicAccess` is `Disabled` for all Key Vaults. + +For a specific vault: + +``` +az keyvault show --name {vaultName} --query "properties.publicNetworkAccess" +``` + +**From PowerShell:** + +``` +Get-AzKeyVault | ForEach-Object { + Get-AzKeyVault -VaultName $_.VaultName | Select-Object VaultName, PublicNetworkAccess +} +``` + +Ensure `PublicNetworkAccess` is `Disabled` for all Key Vaults. + +## Expected Result + +All Key Vaults should have `publicNetworkAccess` set to `Disabled`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Settings`, click `Networking`. +4. Under the `Firewalls and virtual networks` tab, set `Public network access` to `Disabled`. +5. Click `Apply`. + +**From Azure CLI:** + +``` +az keyvault update --name {vaultName} --public-network-access Disabled +``` + +**From PowerShell:** + +``` +Update-AzKeyVault -VaultName {vaultName} -PublicNetworkAccess "Disabled" +``` + +**Important:** Before disabling public network access, ensure that: + +1. Private endpoints are configured and working. +2. All applications and services can access Key Vault through private endpoints. +3. Trusted Azure services that need access have been configured appropriately. + +## Default Value + +By default, public network access is enabled for Azure Key Vault. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/general/network-security +2. https://learn.microsoft.com/en-us/azure/key-vault/general/private-link-service +3. https://learn.microsoft.com/en-us/azure/key-vault/general/overview-vnet-service-endpoints +4. https://learn.microsoft.com/en-us/cli/azure/keyvault + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.11/SKILL.md new file mode 100644 index 0000000000..65fa8a4e97 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.11/SKILL.md @@ -0,0 +1,111 @@ +--- +name: cis-azure-foundations-8.3.11 +description: "Ensure Azure Resource Manager CanNotDelete Locks are considered for Key Vaults" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, resource-locks] +cis_id: "8.3.11" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.11 Ensure Azure Resource Manager CanNotDelete Locks are considered for Key Vaults (Manual) + +## Description + +Ensure that Azure Resource Manager `CanNotDelete` locks are applied to Key Vault resources to prevent accidental or unauthorized deletion of critical Key Vault instances. + +## Rationale + +Azure Key Vaults contain critical cryptographic keys, secrets, and certificates that are essential for application security and operations. Accidental or malicious deletion of a Key Vault can cause catastrophic service outages and data loss. While soft delete and purge protection provide recovery capabilities, a `CanNotDelete` resource lock adds an additional layer of protection by preventing the deletion of the Key Vault resource entirely. The lock must be explicitly removed before the resource can be deleted, providing an additional administrative barrier against both accidental and intentional destruction. + +## Impact + +Applying `CanNotDelete` locks means that the Key Vault cannot be deleted until the lock is removed. This requires explicit administrative action to remove the lock before deletion, which adds an additional step to any legitimate decommissioning process. Users with the `Microsoft.Authorization/locks/*` permission can remove locks. Organizations should ensure that lock management permissions are restricted to authorized personnel only. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Settings`, click `Locks`. +4. Verify that a lock of type `Delete` (CanNotDelete) exists. + +**From Azure CLI:** + +``` +az keyvault list --query "[].{Name:name, ResourceGroup:resourceGroup, Id:id}" -o tsv | while IFS=$'\t' read -r name rg id; do + echo "Key Vault: $name" + az lock list --resource-group "$rg" --resource-name "$name" --resource-type Microsoft.KeyVault/vaults --query "[?properties.level=='CanNotDelete'].{Name:name, Level:properties.level}" -o table +done +``` + +Ensure each Key Vault has a `CanNotDelete` lock. + +For a specific vault: + +``` +az lock list --resource-group {resourceGroup} --resource-name {vaultName} --resource-type Microsoft.KeyVault/vaults --query "[?properties.level=='CanNotDelete']" +``` + +**From PowerShell:** + +``` +Get-AzKeyVault | ForEach-Object { + $locks = Get-AzResourceLock -ResourceName $_.VaultName -ResourceGroupName $_.ResourceGroupName -ResourceType Microsoft.KeyVault/vaults | Where-Object { $_.Properties.Level -eq "CanNotDelete" } + [PSCustomObject]@{ + VaultName = $_.VaultName + HasDeleteLock = if ($locks) { "Yes" } else { "No" } + } +} +``` + +## Expected Result + +All Key Vaults should have a `CanNotDelete` resource lock applied. + +## Remediation + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Settings`, click `Locks`. +4. Click `+ Add`. +5. Enter a name for the lock (e.g., `DoNotDelete`). +6. Set `Lock type` to `Delete`. +7. Optionally add a note explaining why the lock is in place. +8. Click `OK`. + +**From Azure CLI:** + +``` +az lock create --name DoNotDelete --lock-type CanNotDelete --resource-group {resourceGroup} --resource-name {vaultName} --resource-type Microsoft.KeyVault/vaults --notes "Prevent accidental deletion of Key Vault" +``` + +**From PowerShell:** + +``` +New-AzResourceLock -LockName "DoNotDelete" -LockLevel CanNotDelete -ResourceName {vaultName} -ResourceGroupName {resourceGroup} -ResourceType Microsoft.KeyVault/vaults -LockNotes "Prevent accidental deletion of Key Vault" +``` + +## Default Value + +By default, no resource locks are applied to Key Vaults. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources +2. https://learn.microsoft.com/en-us/azure/key-vault/general/best-practices +3. https://learn.microsoft.com/en-us/cli/azure/lock +4. https://learn.microsoft.com/en-us/powershell/module/az.resources/new-azresourcelock + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.2/SKILL.md new file mode 100644 index 0000000000..bba186efb4 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.2/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-azure-foundations-8.3.2 +description: "Ensure that the Expiration Date is set for all Keys in Non-RBAC Key Vaults" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, keys, expiration] +cis_id: "8.3.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.2 Ensure that the Expiration Date is set for all Keys in Non-RBAC Key Vaults (Automated) + +## Description + +Ensure that all cryptographic keys stored in Azure Key Vaults using Vault Access Policy authorization (non-RBAC) have an expiration date configured. + +## Rationale + +Cryptographic keys without expiration dates remain valid indefinitely, creating a security risk as the likelihood of key compromise increases over time. Non-RBAC Key Vaults use Vault Access Policies for authorization, but the key management best practices remain the same. Setting an expiration date ensures keys are periodically reviewed and rotated, limiting the impact of potential key compromise. This aligns with cryptographic best practices and compliance requirements. + +## Impact + +When keys expire, applications and services using those keys will fail until the keys are renewed or replaced. Organizations need to implement key rotation procedures and monitoring to ensure keys are renewed before expiration. Automation through Azure Key Vault key rotation policies can help manage this lifecycle. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. For each Key Vault with RBAC authorization disabled (using Access Policies), click the vault name. +3. Under `Objects`, click `Keys`. +4. For each key, verify that the `Expiration date` column shows a date (not blank or 'Not set'). + +**From Azure CLI:** + +``` +az keyvault list --query "[?properties.enableRbacAuthorization!=\`true\`].name" -o tsv +``` + +For each non-RBAC Key Vault: + +``` +az keyvault key list --vault-name {vaultName} --query "[].{Name:name, Expires:attributes.expires}" -o table +``` + +Ensure `Expires` is set for all keys. + +**From PowerShell:** + +``` +$vaults = Get-AzKeyVault | Where-Object { $_.EnableRbacAuthorization -ne $true } +foreach ($vault in $vaults) { + Get-AzKeyVaultKey -VaultName $vault.VaultName | Select-Object Name, Expires +} +``` + +Ensure `Expires` is populated for all keys. + +## Expected Result + +All keys in non-RBAC Key Vaults should have an expiration date set. + +## Remediation + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Objects`, click `Keys`. +4. Click the key that needs an expiration date. +5. Click the current version of the key. +6. Set the `Expiration date`. +7. Click `Save`. + +**From Azure CLI:** + +``` +az keyvault key set-attributes --vault-name {vaultName} --name {keyName} --expires "2025-12-31T23:59:59Z" +``` + +**From PowerShell:** + +``` +$expires = (Get-Date).AddYears(1).ToUniversalTime() +Update-AzKeyVaultKey -VaultName {vaultName} -Name {keyName} -Expires $expires +``` + +## Default Value + +By default, keys are created without an expiration date. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys +2. https://learn.microsoft.com/en-us/azure/key-vault/general/best-practices +3. https://learn.microsoft.com/en-us/cli/azure/keyvault/key +4. https://learn.microsoft.com/en-us/powershell/module/az.keyvault/update-azkeyvaultkey + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.3/SKILL.md new file mode 100644 index 0000000000..10234230ff --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.3/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-azure-foundations-8.3.3 +description: "Ensure that the Expiration Date is set for all Secrets in RBAC Key Vaults" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, secrets, expiration] +cis_id: "8.3.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.3 Ensure that the Expiration Date is set for all Secrets in RBAC Key Vaults (Automated) + +## Description + +Ensure that all secrets stored in Azure Key Vaults using RBAC (Role-Based Access Control) authorization have an expiration date configured. + +## Rationale + +Secrets (such as passwords, connection strings, API keys, and certificates) without expiration dates remain valid indefinitely. This increases the risk that a compromised secret can be used by an attacker for an extended period without detection. Setting expiration dates on secrets enforces periodic rotation, reduces the window of exposure, and ensures compliance with security policies that mandate credential lifecycle management. + +## Impact + +When secrets expire, any application or service using those secrets will fail until the secret is renewed or replaced. Organizations must implement secret rotation processes and monitoring to ensure continuity. Azure Key Vault supports integration with Azure Event Grid to notify when secrets are near expiration. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. For each Key Vault with RBAC authorization enabled, click the vault name. +3. Under `Objects`, click `Secrets`. +4. For each secret, verify that the `Expiration date` column shows a date (not blank or 'Not set'). + +**From Azure CLI:** + +``` +az keyvault list --query "[?properties.enableRbacAuthorization==\`true\`].name" -o tsv +``` + +For each RBAC-enabled Key Vault: + +``` +az keyvault secret list --vault-name {vaultName} --query "[].{Name:name, Expires:attributes.expires}" -o table +``` + +Ensure `Expires` is set for all secrets. + +**From PowerShell:** + +``` +$vaults = Get-AzKeyVault | Where-Object { $_.EnableRbacAuthorization -eq $true } +foreach ($vault in $vaults) { + Get-AzKeyVaultSecret -VaultName $vault.VaultName | Select-Object Name, Expires +} +``` + +Ensure `Expires` is populated for all secrets. + +## Expected Result + +All secrets in RBAC-enabled Key Vaults should have an expiration date set. + +## Remediation + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Objects`, click `Secrets`. +4. Click the secret that needs an expiration date. +5. Click the current version of the secret. +6. Set the `Expiration date`. +7. Click `Save`. + +**From Azure CLI:** + +``` +az keyvault secret set-attributes --vault-name {vaultName} --name {secretName} --expires "2025-12-31T23:59:59Z" +``` + +**From PowerShell:** + +``` +$expires = (Get-Date).AddYears(1).ToUniversalTime() +Update-AzKeyVaultSecret -VaultName {vaultName} -Name {secretName} -Expires $expires +``` + +## Default Value + +By default, secrets are created without an expiration date. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets +2. https://learn.microsoft.com/en-us/azure/key-vault/general/best-practices +3. https://learn.microsoft.com/en-us/azure/key-vault/general/event-grid-overview +4. https://learn.microsoft.com/en-us/cli/azure/keyvault/secret +5. https://learn.microsoft.com/en-us/powershell/module/az.keyvault/update-azkeyvaultsecret + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.4/SKILL.md new file mode 100644 index 0000000000..db3aa1c663 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.4/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-azure-foundations-8.3.4 +description: "Ensure that the Expiration Date is set for all Secrets in Non-RBAC Key Vaults" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, secrets, expiration] +cis_id: "8.3.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.4 Ensure that the Expiration Date is set for all Secrets in Non-RBAC Key Vaults (Automated) + +## Description + +Ensure that all secrets stored in Azure Key Vaults using Vault Access Policy authorization (non-RBAC) have an expiration date configured. + +## Rationale + +Secrets in non-RBAC Key Vaults follow the same security principles as those in RBAC-enabled vaults. Secrets without expiration dates remain valid indefinitely, increasing the risk that compromised credentials can be abused for extended periods. Setting expiration dates enforces regular rotation cycles and ensures that stale or potentially compromised secrets are automatically invalidated. This is essential for maintaining a strong credential hygiene posture. + +## Impact + +Expired secrets will cause applications relying on them to fail. Organizations must establish secret rotation procedures and set up notifications (via Azure Event Grid) to alert administrators before secrets expire. Automation through Azure Automation or Azure Functions can help streamline the rotation process. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. For each Key Vault with RBAC authorization disabled (using Access Policies), click the vault name. +3. Under `Objects`, click `Secrets`. +4. For each secret, verify that the `Expiration date` column shows a date (not blank or 'Not set'). + +**From Azure CLI:** + +``` +az keyvault list --query "[?properties.enableRbacAuthorization!=\`true\`].name" -o tsv +``` + +For each non-RBAC Key Vault: + +``` +az keyvault secret list --vault-name {vaultName} --query "[].{Name:name, Expires:attributes.expires}" -o table +``` + +Ensure `Expires` is set for all secrets. + +**From PowerShell:** + +``` +$vaults = Get-AzKeyVault | Where-Object { $_.EnableRbacAuthorization -ne $true } +foreach ($vault in $vaults) { + Get-AzKeyVaultSecret -VaultName $vault.VaultName | Select-Object Name, Expires +} +``` + +Ensure `Expires` is populated for all secrets. + +## Expected Result + +All secrets in non-RBAC Key Vaults should have an expiration date set. + +## Remediation + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Objects`, click `Secrets`. +4. Click the secret that needs an expiration date. +5. Click the current version of the secret. +6. Set the `Expiration date`. +7. Click `Save`. + +**From Azure CLI:** + +``` +az keyvault secret set-attributes --vault-name {vaultName} --name {secretName} --expires "2025-12-31T23:59:59Z" +``` + +**From PowerShell:** + +``` +$expires = (Get-Date).AddYears(1).ToUniversalTime() +Update-AzKeyVaultSecret -VaultName {vaultName} -Name {secretName} -Expires $expires +``` + +## Default Value + +By default, secrets are created without an expiration date. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets +2. https://learn.microsoft.com/en-us/azure/key-vault/general/best-practices +3. https://learn.microsoft.com/en-us/cli/azure/keyvault/secret +4. https://learn.microsoft.com/en-us/powershell/module/az.keyvault/update-azkeyvaultsecret + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.5/SKILL.md new file mode 100644 index 0000000000..4e05318a12 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.5/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-azure-foundations-8.3.5 +description: "Ensure the Key Vault is Recoverable" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, soft-delete, purge-protection] +cis_id: "8.3.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.5 Ensure the Key Vault is Recoverable (Automated) + +## Description + +Ensure that Azure Key Vaults are configured with both soft delete and purge protection enabled, making the Key Vault and its objects recoverable in the event of accidental or malicious deletion. + +## Rationale + +Azure Key Vault stores critical cryptographic keys, secrets, and certificates. Accidental or malicious deletion of a Key Vault or its contents can have catastrophic consequences, including data loss and service outages. Soft delete enables recovery of deleted vaults and vault objects for a configurable retention period (default 90 days). Purge protection prevents permanent deletion during the retention period, even by administrators. Together, these features provide a safety net against both accidental and malicious destruction of key material. + +## Impact + +Enabling soft delete and purge protection means that deleted Key Vaults and their objects cannot be permanently removed until the retention period expires. This may impact organizations that need to rapidly reclaim Key Vault names or immediately remove sensitive data. The retention period is configurable between 7 and 90 days. Note that soft delete is now enforced by Azure for all new Key Vaults and cannot be disabled. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Settings`, click `Properties`. +4. Verify that `Soft delete` is shown as enabled. +5. Verify that `Purge protection` is shown as enabled. + +**From Azure CLI:** + +``` +az keyvault list --query "[].{Name:name, SoftDelete:properties.enableSoftDelete, PurgeProtection:properties.enablePurgeProtection}" -o table +``` + +Ensure both `SoftDelete` and `PurgeProtection` are `true` for all Key Vaults. + +For a specific vault: + +``` +az keyvault show --name {vaultName} --query "{SoftDelete:properties.enableSoftDelete, PurgeProtection:properties.enablePurgeProtection}" +``` + +**From PowerShell:** + +``` +Get-AzKeyVault | ForEach-Object { + Get-AzKeyVault -VaultName $_.VaultName | Select-Object VaultName, EnableSoftDelete, EnablePurgeProtection +} +``` + +Ensure both `EnableSoftDelete` and `EnablePurgeProtection` are `True`. + +## Expected Result + +All Key Vaults should have both soft delete and purge protection enabled. + +## Remediation + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Settings`, click `Properties`. +4. If purge protection is not enabled, click `Enable purge protection`. +5. Click `Save`. + +**From Azure CLI:** + +``` +az keyvault update --name {vaultName} --enable-purge-protection true +``` + +Note: Soft delete is now enforced by Azure and cannot be disabled. + +**From PowerShell:** + +``` +Update-AzKeyVault -VaultName {vaultName} -EnablePurgeProtection +``` + +## Default Value + +Soft delete is enabled by default and enforced for all new Key Vaults. Purge protection is not enabled by default and must be explicitly configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/general/soft-delete-overview +2. https://learn.microsoft.com/en-us/azure/key-vault/general/key-vault-recovery +3. https://learn.microsoft.com/en-us/cli/azure/keyvault +4. https://learn.microsoft.com/en-us/powershell/module/az.keyvault/update-azkeyvault + +## Profile + +- Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.6/SKILL.md new file mode 100644 index 0000000000..a5f16fb1a9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.6/SKILL.md @@ -0,0 +1,120 @@ +--- +name: cis-azure-foundations-8.3.6 +description: "Ensure that Private Endpoints are Used for Azure Key Vault" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, private-endpoints, networking] +cis_id: "8.3.6" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.6 Ensure that Private Endpoints are Used for Azure Key Vault (Automated) + +## Description + +Ensure that Azure Key Vaults are configured with private endpoints, enabling secure access to Key Vault over a private link from within the virtual network and eliminating exposure to the public internet. + +## Rationale + +By default, Azure Key Vault is accessible over the public internet. While access is still protected by authentication and authorization, exposing Key Vault to the public internet increases the attack surface and risk of data exfiltration. Private endpoints provide a private IP address within the virtual network for Key Vault, ensuring all traffic between the virtual network and Key Vault traverses the Microsoft backbone network. This eliminates exposure to the public internet and provides network-level isolation. + +## Impact + +Configuring private endpoints requires additional networking setup including virtual network configuration, private DNS zones, and potentially changes to existing network architecture. Applications accessing Key Vault must be within the virtual network or connected via VPN/ExpressRoute. External access from outside the network will be blocked unless also allowed via firewall rules. This may require changes to CI/CD pipelines and developer workflows. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Settings`, click `Networking`. +4. Click the `Private endpoint connections` tab. +5. Verify that at least one private endpoint connection exists with a status of `Approved`. + +**From Azure CLI:** + +``` +az keyvault list --query "[].name" -o tsv +``` + +For each Key Vault: + +``` +az keyvault private-endpoint-connection list --vault-name {vaultName} --query "[].{Name:name, Status:properties.privateLinkServiceConnectionState.status}" -o table +``` + +Ensure at least one connection exists with status `Approved`. + +**From PowerShell:** + +``` +Get-AzKeyVault | ForEach-Object { + $connections = Get-AzPrivateEndpointConnection -PrivateLinkResourceId $_.ResourceId + [PSCustomObject]@{ + VaultName = $_.VaultName + PrivateEndpoints = $connections.Count + Status = ($connections | Select-Object -ExpandProperty PrivateLinkServiceConnectionState).Status + } +} +``` + +Ensure each vault has at least one private endpoint with `Approved` status. + +## Expected Result + +All Key Vaults should have at least one private endpoint connection with an `Approved` status. + +## Remediation + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Settings`, click `Networking`. +4. Click the `Private endpoint connections` tab. +5. Click `+ Create a private endpoint`. +6. Configure the private endpoint with the appropriate virtual network, subnet, and private DNS zone. +7. Click `Review + Create`, then `Create`. + +**From Azure CLI:** + +``` +az network private-endpoint create \ + --name {endpointName} \ + --resource-group {resourceGroup} \ + --vnet-name {vnetName} \ + --subnet {subnetName} \ + --private-connection-resource-id $(az keyvault show --name {vaultName} --query id -o tsv) \ + --group-id vault \ + --connection-name {connectionName} +``` + +**From PowerShell:** + +``` +$vault = Get-AzKeyVault -VaultName {vaultName} +$privateEndpointConnection = New-AzPrivateLinkServiceConnection -Name {connectionName} -PrivateLinkServiceId $vault.ResourceId -GroupId "vault" +New-AzPrivateEndpoint -Name {endpointName} -ResourceGroupName {resourceGroup} -Location {location} -Subnet $subnet -PrivateLinkServiceConnection $privateEndpointConnection +``` + +## Default Value + +By default, Key Vaults are accessible over the public internet with no private endpoints configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/general/private-link-service +2. https://learn.microsoft.com/en-us/azure/key-vault/general/network-security +3. https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview +4. https://learn.microsoft.com/en-us/cli/azure/network/private-endpoint + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.7/SKILL.md new file mode 100644 index 0000000000..54992d4c87 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.7/SKILL.md @@ -0,0 +1,116 @@ +--- +name: cis-azure-foundations-8.3.7 +description: "Ensure that Azure Key Vaults Use Azure RBAC for access management" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, rbac] +cis_id: "8.3.7" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.7 Ensure that Azure Key Vaults Use Azure RBAC for access management (Automated) + +## Description + +Ensure that Azure Key Vaults use Azure Role-Based Access Control (RBAC) for access management instead of the legacy Vault Access Policy model. + +## Rationale + +Azure RBAC provides a unified and granular access management model for Azure resources, including Key Vault. The legacy Vault Access Policy model has limitations: it applies at the vault level (not individual keys/secrets), lacks conditional access support, and does not integrate with Azure Privileged Identity Management (PIM). Azure RBAC for Key Vault enables fine-grained access control at the individual key, secret, and certificate level, supports conditional access policies, and integrates with the broader Azure identity governance framework. This provides better security posture and auditability. + +## Impact + +Migrating from Vault Access Policies to Azure RBAC may require updating existing applications and scripts that rely on access policy-based permissions. The migration cannot be reversed once completed. Organizations should thoroughly test the migration in a non-production environment first and ensure all necessary RBAC role assignments are in place before switching. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Settings`, click `Access configuration`. +4. Verify that `Permission model` is set to `Azure role-based access control`. + +**From Azure CLI:** + +``` +az keyvault list --query "[].{Name:name, RBACEnabled:properties.enableRbacAuthorization}" -o table +``` + +Ensure `RBACEnabled` is `true` for all Key Vaults. + +For a specific vault: + +``` +az keyvault show --name {vaultName} --query "properties.enableRbacAuthorization" +``` + +**From PowerShell:** + +``` +Get-AzKeyVault | ForEach-Object { + Get-AzKeyVault -VaultName $_.VaultName | Select-Object VaultName, EnableRbacAuthorization +} +``` + +Ensure `EnableRbacAuthorization` is `True` for all Key Vaults. + +## Expected Result + +All Key Vaults should have `enableRbacAuthorization` set to `true`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Settings`, click `Access configuration`. +4. Select `Azure role-based access control` for the `Permission model`. +5. Click `Save`. +6. Assign appropriate RBAC roles to users, groups, and service principals. + +**From Azure CLI:** + +``` +az keyvault update --name {vaultName} --enable-rbac-authorization true +``` + +Then assign roles: + +``` +az role assignment create --role "Key Vault Secrets Officer" --assignee {principalId} --scope $(az keyvault show --name {vaultName} --query id -o tsv) +``` + +**From PowerShell:** + +``` +Update-AzKeyVault -VaultName {vaultName} -EnableRbacAuthorization $true +``` + +Then assign roles: + +``` +New-AzRoleAssignment -ObjectId {principalId} -RoleDefinitionName "Key Vault Secrets Officer" -Scope (Get-AzKeyVault -VaultName {vaultName}).ResourceId +``` + +## Default Value + +New Key Vaults default to Vault Access Policy permission model. Azure RBAC must be explicitly enabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-guide +2. https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-migration +3. https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#key-vault +4. https://learn.microsoft.com/en-us/cli/azure/keyvault + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.8/SKILL.md new file mode 100644 index 0000000000..442ec3bb4f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.8/SKILL.md @@ -0,0 +1,131 @@ +--- +name: cis-azure-foundations-8.3.8 +description: "Ensure Automatic Key Rotation is Enabled Within Azure Key Vault for the Supported Services" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, key-rotation] +cis_id: "8.3.8" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.8 Ensure Automatic Key Rotation is Enabled Within Azure Key Vault for the Supported Services (Automated) + +## Description + +Ensure that automatic key rotation is enabled for cryptographic keys stored in Azure Key Vault, so that keys are periodically rotated without manual intervention, reducing the risk of prolonged key compromise. + +## Rationale + +Cryptographic keys should be rotated regularly to limit the blast radius of a potential key compromise. Manual key rotation is error-prone and often neglected. Azure Key Vault supports automatic key rotation through rotation policies, which can generate new key versions at specified intervals and notify administrators via Event Grid. Automatic rotation ensures consistent adherence to key rotation schedules and reduces operational burden while improving security posture. + +## Impact + +Enabling automatic key rotation requires applications to use the latest key version or to reference the key without a specific version (versionless key identifier). Applications that reference specific key versions must be updated to support key rotation. Services that support automatic rotation (such as Azure Storage, Azure Disk Encryption) will seamlessly use the new key version. Custom applications may require testing to ensure compatibility with rotated keys. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Objects`, click `Keys`. +4. Click a key name. +5. Click `Rotation policy`. +6. Verify that a rotation policy is configured with an appropriate rotation interval. + +**From Azure CLI:** + +``` +az keyvault key rotation-policy show --vault-name {vaultName} --name {keyName} +``` + +Verify that a rotation policy exists with `lifetimeActions` configured. + +For all keys in a vault: + +``` +for key in $(az keyvault key list --vault-name {vaultName} --query "[].name" -o tsv); do + echo "Key: $key" + az keyvault key rotation-policy show --vault-name {vaultName} --name $key 2>/dev/null || echo " No rotation policy" +done +``` + +**From PowerShell:** + +``` +$keys = Get-AzKeyVaultKey -VaultName {vaultName} +foreach ($key in $keys) { + $policy = Get-AzKeyVaultKeyRotationPolicy -VaultName {vaultName} -Name $key.Name + [PSCustomObject]@{ + KeyName = $key.Name + RotationPolicy = if ($policy) { "Configured" } else { "Not configured" } + } +} +``` + +## Expected Result + +All keys in Key Vaults that support automatic rotation should have a rotation policy configured with appropriate rotation intervals. + +## Remediation + +**From Azure Portal:** + +1. Go to `Key vaults`. +2. Click the name of a Key Vault. +3. Under `Objects`, click `Keys`. +4. Click a key name. +5. Click `Rotation policy`. +6. Configure the rotation type (time-based or on-demand). +7. Set the rotation interval (e.g., every 90 days). +8. Optionally configure Event Grid notifications for near-expiry alerts. +9. Click `Save`. + +**From Azure CLI:** + +``` +az keyvault key rotation-policy update --vault-name {vaultName} --name {keyName} --value '{ + "lifetimeActions": [ + { + "trigger": {"timeAfterCreate": "P90D"}, + "action": {"type": "Rotate"} + }, + { + "trigger": {"timeBeforeExpiry": "P30D"}, + "action": {"type": "Notify"} + } + ], + "attributes": {"expiryTime": "P1Y"} +}' +``` + +**From PowerShell:** + +``` +$policy = New-AzKeyVaultKeyRotationPolicy -VaultName {vaultName} -Name {keyName} -ExpiresIn "P1Y" -LifetimeAction @{ + Action = "Rotate" + TimeAfterCreate = "P90D" +} +Set-AzKeyVaultKeyRotationPolicy -VaultName {vaultName} -Name {keyName} -KeyRotationPolicy $policy +``` + +## Default Value + +By default, no rotation policy is configured for keys in Azure Key Vault. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/keys/how-to-configure-key-rotation +2. https://learn.microsoft.com/en-us/azure/key-vault/keys/overview-key-rotation +3. https://learn.microsoft.com/en-us/cli/azure/keyvault/key/rotation-policy +4. https://learn.microsoft.com/en-us/powershell/module/az.keyvault/set-azkeyvaultkeyrotationpolicy + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.9/SKILL.md new file mode 100644 index 0000000000..463fa57b68 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.3.9/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-azure-foundations-8.3.9 +description: "Ensure Azure Key Vault Managed HSM is Used for Key Encryption" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, key-vault, managed-hsm, encryption] +cis_id: "8.3.9" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.3.9 Ensure Azure Key Vault Managed HSM is Used for Key Encryption (Manual) + +## Description + +Ensure that Azure Key Vault Managed HSM (Hardware Security Module) is used for key encryption operations that require the highest level of security, providing FIPS 140-2 Level 3 validated hardware protection for cryptographic keys. + +## Rationale + +Standard Azure Key Vault protects keys using software-backed or HSM-backed mechanisms at FIPS 140-2 Level 2. For organizations with stringent regulatory or compliance requirements (such as financial services, healthcare, or government), FIPS 140-2 Level 3 validation is required. Azure Key Vault Managed HSM provides dedicated, single-tenant HSM instances that are fully managed by the customer, offering the highest level of key protection. Keys never leave the HSM boundary, and the customer has full administrative control over the HSM security domain. + +## Impact + +Azure Key Vault Managed HSM has significantly higher costs than standard Key Vault. It requires additional operational setup including security domain initialization with multiple administrators. Not all applications and services support Managed HSM integration. Organizations should evaluate their compliance requirements and application compatibility before adopting Managed HSM. Recovery procedures are more complex and require the security domain backup. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Key Vault Managed HSMs` (search in the portal search bar). +2. Verify that Managed HSM instances exist for workloads requiring FIPS 140-2 Level 3 compliance. +3. Click a Managed HSM instance to verify it is in a `Provisioned` state. + +**From Azure CLI:** + +``` +az keyvault list --hsm-name --query "[].{Name:name, Location:location, State:properties.provisioningState}" -o table +``` + +Verify that Managed HSM instances exist and are in `Succeeded` provisioning state. + +**Note:** This is a manual assessment. Organizations must determine which workloads require Managed HSM based on their compliance and security requirements. + +## Expected Result + +Organizations with FIPS 140-2 Level 3 compliance requirements should have Azure Key Vault Managed HSM instances provisioned and in use for critical key encryption operations. + +## Remediation + +**From Azure Portal:** + +1. Search for `Key Vault Managed HSMs` in the portal. +2. Click `Create managed HSM`. +3. Configure the HSM with the appropriate subscription, resource group, name, and region. +4. Configure the initial administrators. +5. Click `Review + Create`, then `Create`. +6. After provisioning, download and activate the security domain. +7. Migrate keys that require FIPS 140-2 Level 3 protection to the Managed HSM. + +**From Azure CLI:** + +``` +az keyvault create --hsm-name {hsmName} --resource-group {resourceGroup} --location {location} --administrators {objectId1} {objectId2} {objectId3} +``` + +After creation, activate the security domain: + +``` +az keyvault security-domain download --hsm-name {hsmName} --sd-wrapping-keys cert1.pem cert2.pem cert3.pem --sd-quorum 2 --security-domain-file {hsmName}-SD.json +``` + +**From PowerShell:** + +``` +New-AzKeyVaultManagedHsm -Name {hsmName} -ResourceGroupName {resourceGroup} -Location {location} -Administrator {objectId1},{objectId2},{objectId3} +``` + +## Default Value + +Azure Key Vault Managed HSM is not provisioned by default. Organizations use standard Key Vault by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/key-vault/managed-hsm/overview +2. https://learn.microsoft.com/en-us/azure/key-vault/managed-hsm/quick-create-cli +3. https://learn.microsoft.com/en-us/azure/key-vault/managed-hsm/security-domain +4. https://learn.microsoft.com/en-us/azure/key-vault/managed-hsm/best-practices +5. https://azure.microsoft.com/en-us/pricing/details/key-vault/ + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.4.1/SKILL.md new file mode 100644 index 0000000000..a0fea7044a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.4.1/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-azure-foundations-8.4.1 +description: "Ensure That Microsoft Defender for APIs Is Set To 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, apis] +cis_id: "8.4.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.4.1 Ensure That Microsoft Defender for APIs Is Set To 'On' (Automated) + +## Description + +Enable Microsoft Defender for APIs to provide security coverage for APIs managed through Azure API Management, detecting threats and vulnerabilities targeting API endpoints. + +## Rationale + +APIs are increasingly targeted by attackers as they expose business logic and sensitive data. Microsoft Defender for APIs provides security insights for APIs managed by Azure API Management, including detection of suspicious API usage patterns, data exfiltration attempts, and API-specific attacks (such as injection, authentication bypass, and excessive data exposure). It also provides visibility into the API attack surface, including unused or unauthenticated APIs, and helps identify sensitive data exposure through API responses. + +## Impact + +Enabling Microsoft Defender for APIs incurs additional costs based on the number of API calls processed. Organizations using Azure API Management should evaluate their API call volumes to estimate costs. The service requires APIs to be managed through Azure API Management to provide coverage. APIs not managed through API Management will not be monitored. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. Locate `APIs` in the list and ensure the `Status` is set to `On`. + +**From Azure CLI:** + +``` +az security pricing show -n Api --query pricingTier +``` + +Ensure `"Standard"` is returned. + +**From PowerShell:** + +``` +Get-AzSecurityPricing -Name Api | Select-Object PricingTier +``` + +Ensure `Standard` is returned. + +## Expected Result + +The pricing tier for Api (Defender for APIs) should be `Standard`. + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Defender plans` blade. +5. In the row for `APIs`, set the `Status` toggle to `On`. +6. Click `Save`. + +**From Azure CLI:** + +``` +az security pricing create -n Api --tier Standard +``` + +**From PowerShell:** + +``` +Set-AzSecurityPricing -Name Api -PricingTier Standard +``` + +## Default Value + +Microsoft Defender for APIs is disabled (Free tier) by default. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-apis-introduction +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-apis-deploy +3. https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/#pricing +4. https://learn.microsoft.com/en-us/cli/azure/security/pricing +5. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecuritypricing + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.5/SKILL.md new file mode 100644 index 0000000000..3d95d4a0aa --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-8.5/SKILL.md @@ -0,0 +1,118 @@ +--- +name: cis-azure-foundations-8.5 +description: "Ensure that Auto provisioning of 'Vulnerability assessment for machines' is Set to 'On'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, security, defender, vulnerability-assessment] +cis_id: "8.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 8.5 Ensure that Auto provisioning of 'Vulnerability assessment for machines' is Set to 'On' (Automated) + +## Description + +Ensure that the auto provisioning setting for vulnerability assessment for machines is enabled in Microsoft Defender for Cloud, allowing automatic deployment of a vulnerability assessment solution to all supported virtual machines. + +## Rationale + +Vulnerability assessment is a critical component of any security program. Without automated vulnerability scanning, organizations rely on manual or ad-hoc scanning, which often results in incomplete coverage and delayed identification of vulnerabilities. Enabling auto provisioning ensures that a vulnerability assessment agent is automatically deployed to all supported virtual machines as they are created or discovered, providing consistent and comprehensive vulnerability coverage across the environment. This ensures no machine is missed and vulnerabilities are identified promptly. + +## Impact + +Enabling auto provisioning deploys a vulnerability assessment agent (Microsoft Defender Vulnerability Management or a qualified third-party solution) to all supported virtual machines. This may consume additional compute resources on each VM. The agent will perform regular vulnerability scans, which may generate network traffic and consume I/O resources during scan windows. Organizations should be aware that scan results will be reported to Microsoft Defender for Cloud. + +## Audit Procedure + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Settings & monitoring` blade (or `Auto provisioning`). +5. Locate `Vulnerability assessment for machines`. +6. Verify that the toggle is set to `On`. + +**From Azure CLI:** + +``` +az security auto-provisioning-setting list --query "[?name=='default'].{Name:name, AutoProvision:autoProvision}" -o table +``` + +Check the auto-provisioning settings. Then verify the specific vulnerability assessment configuration: + +``` +az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings?api-version=2022-01-01-preview" +``` + +Verify that the vulnerability assessment setting shows auto-provisioning is enabled. + +**From PowerShell:** + +``` +Get-AzSecurityAutoProvisioningSetting | Select-Object Name, AutoProvision +``` + +Ensure `AutoProvision` is `On`. + +Additionally check the vulnerability assessment extension: + +``` +Get-AzSecuritySetting | Where-Object { $_.Name -like "*vulnerability*" } +``` + +## Expected Result + +Auto provisioning for vulnerability assessment for machines should be set to `On`, and a vulnerability assessment solution should be configured (Microsoft Defender Vulnerability Management recommended). + +## Remediation + +**From Azure Portal:** + +1. Go to `Microsoft Defender for Cloud`. +2. Under `Management`, click `Environment settings`. +3. Click the name of a subscription. +4. Select the `Settings & monitoring` blade (or `Auto provisioning`). +5. Set `Vulnerability assessment for machines` to `On`. +6. Select the preferred vulnerability assessment provider (Microsoft Defender Vulnerability Management is recommended). +7. Click `Save`. + +**From Azure CLI:** + +``` +az security auto-provisioning-setting update --name "default" --auto-provision "On" +``` + +Configure the vulnerability assessment solution: + +``` +az rest --method put --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/AzureServersSetting?api-version=2022-01-01-preview" --body '{"properties":{"selectedProvider":"MdeTvm"},"kind":"AzureServersSetting"}' +``` + +**From PowerShell:** + +``` +Set-AzSecurityAutoProvisioningSetting -Name "default" -EnableAutoProvision +``` + +## Default Value + +Auto provisioning for vulnerability assessment may not be enabled by default. The default state depends on the Microsoft Defender for Cloud tier and subscription configuration. + +## References + +1. https://learn.microsoft.com/en-us/azure/defender-for-cloud/auto-deploy-vulnerability-assessment +2. https://learn.microsoft.com/en-us/azure/defender-for-cloud/deploy-vulnerability-assessment-defender-vulnerability-management +3. https://learn.microsoft.com/en-us/azure/defender-for-cloud/enable-data-collection +4. https://learn.microsoft.com/en-us/cli/azure/security/auto-provisioning-setting +5. https://learn.microsoft.com/en-us/powershell/module/az.security/set-azsecurityautoprovisioningsetting + +## Profile + +- Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.1.1/SKILL.md new file mode 100644 index 0000000000..f4acf2b11e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.1.1/SKILL.md @@ -0,0 +1,128 @@ +--- +name: cis-azure-foundations-9.1.1 +description: "Ensure soft delete for Azure File Shares is Enabled" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, azure-files, storage, soft-delete, data-protection] +cis_id: "9.1.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure soft delete for Azure File Shares is Enabled + +## Description + +Azure Files offers soft delete for file shares, allowing you to easily recover your data when it is mistakenly deleted by an application or another storage account user. + +## Rationale + +Important data could be accidentally deleted or removed by a malicious actor. With soft delete enabled, the data is retained for the defined retention period before permanent deletion, allowing for recovery of the data. + +## Impact + +When a file share is soft-deleted, the used portion of the storage is charged for the indicated soft-deleted period. All other meters are not charged unless the share is restored. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account with file shares, under `Data storage`, click on `File shares`. +3. Under `File share settings`, ensure the value for `Soft delete` shows a number of days between 1 and 365, inclusive. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +Run the following command to determine if a storage account has file shares: + +```bash +az storage share list --account-name +``` + +For each storage account with file shares, run the following command: + +```bash +az storage account file-service-properties show --resource-group --account-name +``` + +Ensure that under `shareDeleteRetentionPolicy`, `enabled` is set to `true`, and `days` is set to an appropriate value between 1 and 365, inclusive. + +### Audit from PowerShell + +Run the following command to list storage accounts: + +```powershell +Get-AzStorageAccount -ResourceGroupName +``` + +With a storage account context set, run the following command to determine if a storage account has file shares: + +```powershell +Get-AzStorageShare +``` + +For each storage account with file shares, run the following command: + +```powershell +Get-AzStorageFileServiceProperty -ResourceGroupName -AccountName +``` + +Ensure that `ShareDeleteRetentionPolicy.Enabled` is set to `True` and `ShareDeleteRetentionPolicy.Days` is set to an appropriate value between 1 and 365, inclusive. + +## Expected Result + +`shareDeleteRetentionPolicy.enabled` should be `true` with `days` between 1 and 365. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account with file shares, under `Data storage`, click `File shares`. +3. Under `File share settings`, click the value next to `Soft delete`. +4. Under `Soft delete for all file shares`, click the toggle to set it to `Enabled`. +5. Under `Retention policies`, set an appropriate number of days to retain soft deleted data between 1 and 365, inclusive. +6. Click `Save`. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to enable soft delete for file shares and set an appropriate number of days for deleted data to be retained, between 1 and 365, inclusive: + +```bash +az storage account file-service-properties update --account-name --enable-delete-retention true --delete-retention-days +``` + +### Remediate from PowerShell + +For each storage account requiring remediation, run the following command to enable soft delete for file shares and set an appropriate number of days for deleted data to be retained, between 1 and 365, inclusive: + +```powershell +Update-AzStorageFileServiceProperty -ResourceGroupName -AccountName -EnableShareDeleteRetentionPolicy $true -ShareRetentionDays +``` + +## Default Value + +Soft delete is enabled by default at the storage account file share setting level. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/files/storage-files-enable-soft-delete +2. https://learn.microsoft.com/en-us/cli/azure/storage/account/file-service-properties +3. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstoragefileserviceproperty +4. https://learn.microsoft.com/en-us/powershell/module/az.storage/update-azstoragefileserviceproperty +5. https://learn.microsoft.com/en-us/azure/storage/files/storage-files-prevent-file-share-deletion + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.1.2/SKILL.md new file mode 100644 index 0000000000..f0593ca932 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.1.2/SKILL.md @@ -0,0 +1,127 @@ +--- +name: cis-azure-foundations-9.1.2 +description: "Ensure 'SMB protocol version' is set to 'SMB 3.1.1' or higher for SMB file shares" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, azure-files, storage, smb, protocol-version, encryption] +cis_id: "9.1.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'SMB protocol version' is set to 'SMB 3.1.1' or higher for SMB file shares + +## Description + +Ensure that SMB file shares are configured to use the latest supported SMB protocol version. Keeping the SMB protocol updated helps mitigate risks associated with older SMB versions, which may contain vulnerabilities and lack essential security controls. + +## Rationale + +Using the latest supported SMB protocol version enhances the security of SMB file shares by preventing the exploitation of known vulnerabilities in outdated SMB versions. + +## Impact + +Using the latest SMB protocol version may impact client compatibility. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account. +3. Under `Data storage`, click `File shares`. +4. Under `File share settings`, click the link next to `Security`. +5. Under `SMB protocol versions`, ensure that `SMB3.1.1` is the only checked protocol version. +6. Repeat steps 1-5 for each storage account. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +For each storage account, run the following command: + +```bash +az storage account file-service-properties show --resource-group --account-name +``` + +Ensure that under `protocolSettings` > `smb`, `versions` is set to `SMB3.1.1;` only. + +### Audit from PowerShell + +Run the following command to list storage accounts: + +```powershell +Get-AzStorageAccount +``` + +Run the following command to get the file service properties for a storage account in a resource group with a given name: + +```powershell +$storageaccountfileservice = Get-AzStorageFileServiceProperty -ResourceGroupName -AccountName +``` + +Run the following command to get the SMB protocol version setting: + +```powershell +$storageaccountfileservice.ProtocolSettings.Smb.Versions +``` + +Ensure that the command returns `SMB3.1.1` only. + +## Expected Result + +SMB protocol versions should be set to `SMB3.1.1` only. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account. +3. Under `Data storage`, click `File shares`. +4. Under `File share settings`, click the link next to `Security`. +5. If `Profile` is set to `Maximum compatibility`, click the drop-down menu and select `Maximum security` or `Custom`. +6. If selecting `Custom`, under `SMB protocol versions`, uncheck the boxes next to `SMB 2.1` and `SMB 3.0`. +7. Click `Save`. +8. Repeat steps 1-7 for each storage account requiring remediation. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to set the SMB protocol version: + +```bash +az storage account file-service-properties update --resource-group --account-name --versions SMB3.1.1 +``` + +### Remediate from PowerShell + +For each storage account requiring remediation, run the following command to set the SMB protocol version: + +```powershell +Update-AzStorageFileServiceProperty -ResourceGroupName -StorageAccountName -SmbProtocolVersion SMB3.1.1 +``` + +## Default Value + +By default, all SMB versions are allowed. + +## References + +1. https://learn.microsoft.com/en-us/azure/well-architected/service-guides/azure-files#recommendations-for-smb-file-shares +2. https://learn.microsoft.com/en-us/azure/storage/files/files-smb-protocol#smb-security-settings +3. https://learn.microsoft.com/en-us/cli/azure/storage/account/file-service-properties +4. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstoragefileserviceproperty +5. https://learn.microsoft.com/en-us/powershell/module/az.storage/update-azstoragefileserviceproperty + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.1.3/SKILL.md new file mode 100644 index 0000000000..ac075179b3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.1.3/SKILL.md @@ -0,0 +1,127 @@ +--- +name: cis-azure-foundations-9.1.3 +description: "Ensure 'SMB channel encryption' is set to 'AES-256-GCM' or higher for SMB file shares" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, azure-files, storage, smb, channel-encryption, aes-256] +cis_id: "9.1.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'SMB channel encryption' is set to 'AES-256-GCM' or higher for SMB file shares + +## Description + +Implement SMB channel encryption with AES-256-GCM for SMB file shares to ensure data confidentiality and integrity in transit. This method offers strong protection against eavesdropping and man-in-the-middle attacks, safeguarding sensitive information. + +## Rationale + +AES-256-GCM encryption enhances the security of data transmitted over SMB channels by safeguarding it from unauthorized interception and tampering. + +## Impact + +Using the AES-256-GCM SMB channel encryption may impact client compatibility. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account. +3. Under `Data storage`, click `File shares`. +4. Under `File share settings`, click the link next to `Security`. +5. Under `SMB channel encryption`, ensure that `AES-256-GCM`, or higher, is the only checked SMB channel encryption setting. +6. Repeat steps 1-5 for each storage account. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +For each storage account, run the following command: + +```bash +az storage account file-service-properties show --resource-group --account-name +``` + +Ensure that under `protocolSettings` > `smb`, `channelEncryption` is set to `AES-256-GCM;`, or higher, only. + +### Audit from PowerShell + +Run the following command to list storage accounts: + +```powershell +Get-AzStorageAccount +``` + +Run the following command to get the file service properties for a storage account in a resource group with a given name: + +```powershell +$storageaccountfileservice = Get-AzStorageFileServiceProperty -ResourceGroupName -AccountName +``` + +Run the following command to get the SMB channel encryption setting: + +```powershell +$storageaccountfileservice.ProtocolSettings.Smb.ChannelEncryption +``` + +Ensure that the command returns `AES-256-GCM`, or higher, only. + +## Expected Result + +SMB channel encryption should be set to `AES-256-GCM` or higher only. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account. +3. Under `Data storage`, click `File shares`. +4. Under `File share settings`, click the link next to `Security`. +5. If `Profile` is set to `Maximum compatibility`, click the drop-down menu and select `Maximum security` or `Custom`. +6. If selecting `Custom`, under `SMB channel encryption`, uncheck the boxes next to `AES-128-CCM` and `AES-128-GCM`. +7. Click `Save`. +8. Repeat steps 1-7 for each storage account requiring remediation. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to set the SMB channel encryption: + +```bash +az storage account file-service-properties update --resource-group --account-name --channel-encryption AES-256-GCM +``` + +### Remediate from PowerShell + +For each storage account requiring remediation, run the following command to set the SMB channel encryption: + +```powershell +Update-AzStorageFileServiceProperty -ResourceGroupName -StorageAccountName -SmbChannelEncryption AES-256-GCM +``` + +## Default Value + +By default, the following SMB channel encryption algorithms are allowed: AES-128-CCM, AES-128-GCM, and AES-256-GCM. + +## References + +1. https://learn.microsoft.com/en-us/azure/well-architected/service-guides/azure-files#recommendations-for-smb-file-shares +2. https://learn.microsoft.com/en-us/azure/storage/files/files-smb-protocol#smb-security-settings +3. https://learn.microsoft.com/en-us/cli/azure/storage/account/file-service-properties +4. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstoragefileserviceproperty +5. https://learn.microsoft.com/en-us/powershell/module/az.storage/update-azstoragefileserviceproperty + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.2.1/SKILL.md new file mode 100644 index 0000000000..b8e2a21a95 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.2.1/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-azure-foundations-9.2.1 +description: "Ensure soft delete for blobs on Azure Blob Storage storage accounts is Enabled" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, blob-storage, storage, soft-delete, data-protection] +cis_id: "9.2.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure soft delete for blobs on Azure Blob Storage storage accounts is Enabled + +## Description + +Blobs in Azure storage accounts may contain sensitive or personal data, such as ePHI or financial information. Data that is erroneously modified or deleted by an application or a user can lead to data loss or unavailability. + +It is recommended that soft delete be enabled on Azure storage accounts with blob storage to allow for the preservation and recovery of data when blobs or blob snapshots are deleted. + +## Rationale + +Blobs can be deleted incorrectly. An attacker or malicious user may do this deliberately in order to cause disruption. Deleting an Azure storage blob results in immediate data loss. Enabling this configuration for Azure storage accounts ensures that even if blobs are deleted from the storage account, the blobs are recoverable for a specific period of time, which is defined in the "Retention policies," ranging from 7 to 365 days. + +## Impact + +All soft-deleted data is billed at the same rate as active data. Additional costs may be incurred for deleted blobs until the soft delete period ends and the data is permanently removed. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each Storage Account with blob storage, under `Data management`, go to `Data protection`. +3. Ensure that `Enable soft delete for blobs` is checked. +4. Ensure that the retention period is a sufficient length for your organization. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +Run the following command to determine if a storage account has containers: + +```bash +az storage container list --account-name +``` + +For each storage account with containers, ensure that the output of the below command contains `"enabled": true` and `days` is not `null`: + +```bash +az storage blob service-properties delete-policy show --account-name +``` + +## Expected Result + +Soft delete for blobs should be enabled with `"enabled": true` and `days` set to an appropriate retention period. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each Storage Account with blob storage, under `Data management`, go to `Data protection`. +3. Check the box next to `Enable soft delete for blobs`. +4. Set the retention period to a sufficient length for your organization. +5. Click `Save`. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to enable soft delete for blobs: + +```bash +az storage blob service-properties delete-policy update --days-retained --account-name --enable true +``` + +## Default Value + +Soft delete for blob storage is **enabled** by default on storage accounts created via the Azure Portal, and **disabled** by default on storage accounts created via Azure CLI or PowerShell. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/soft-delete-blob-overview + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.2.2/SKILL.md new file mode 100644 index 0000000000..f96cfdfbf9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.2.2/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-azure-foundations-9.2.2 +description: "Ensure soft delete for containers on Azure Blob Storage storage accounts is Enabled" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, blob-storage, storage, soft-delete, containers, data-protection] +cis_id: "9.2.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure soft delete for containers on Azure Blob Storage storage accounts is Enabled + +## Description + +Containers in Azure storage accounts may contain sensitive or personal data, such as ePHI or financial information. Data that is erroneously modified or deleted by an application or a user can lead to data loss or unavailability. + +It is recommended that soft delete for containers be enabled on Azure storage accounts with blob storage to allow for the preservation and recovery of data when containers are deleted. + +## Rationale + +Containers can be deleted incorrectly. An attacker or malicious user may do this deliberately in order to cause disruption. Deleting a container results in immediate data loss. Enabling this configuration for Azure storage accounts ensures that even if containers are deleted from the storage account, the containers are recoverable for a specific period of time, which is defined in the "Retention policies," ranging from 7 to 365 days. + +## Impact + +All soft-deleted data is billed at the same rate as active data. Additional costs may be incurred for deleted containers until the soft delete period ends and the data is permanently removed. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. For each Storage Account with blob storage, under `Data management`, go to `Data protection`. +3. Ensure that `Enable soft delete for containers` is checked. +4. Ensure that the retention period is a sufficient length for your organization. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +Run the following command to determine if a storage account has containers: + +```bash +az storage container list --account-name +``` + +For each storage account with containers, run the following command to get the retention settings: + +```bash +az storage account blob-service-properties show --resource-group --account-name --query containerDeleteRetentionPolicy +``` + +Ensure that `enabled` is set to `true` and `days` is not `null`. + +## Expected Result + +Container soft delete should be enabled with `enabled` set to `true` and `days` set to an appropriate retention period. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. For each Storage Account with blob storage, under `Data management`, go to `Data protection`. +3. Check the box next to `Enable soft delete for containers`. +4. Set the retention period to a sufficient length for your organization. +5. Click `Save`. + +### Remediate from Azure CLI + +Run the following command to update container retention: + +```bash +az storage account blob-service-properties update --resource-group --account-name --enable-container-delete-retention true --container-delete-retention-days +``` + +## Default Value + +Soft delete for containers is **enabled** by default on storage accounts created via the Azure Portal, and **disabled** by default on storage accounts created via Azure CLI or PowerShell. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/soft-delete-container-overview +2. https://learn.microsoft.com/en-us/azure/storage/blobs/soft-delete-container-enable + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.2.3/SKILL.md new file mode 100644 index 0000000000..da4c7cb471 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.2.3/SKILL.md @@ -0,0 +1,145 @@ +--- +name: cis-azure-foundations-9.2.3 +description: "Ensure 'Versioning' is set to 'Enabled' on Azure Blob Storage storage accounts" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, blob-storage, storage, versioning, data-protection] +cis_id: "9.2.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Versioning' is set to 'Enabled' on Azure Blob Storage storage accounts + +## Description + +Enabling blob versioning allows for the automatic retention of previous versions of objects. With blob versioning enabled, earlier versions of a blob are accessible for data recovery in the event of modifications or deletions. + +## Rationale + +Blob versioning safeguards data integrity and enables recovery by retaining previous versions of stored objects, facilitating quick restoration from accidental deletion, modification, or malicious activity. + +## Impact + +Enabling blob versioning for a storage account creates a new version with each write operation to a blob, which can increase storage costs. To control these costs, a lifecycle management policy can be applied to automatically delete older versions. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account with blob storage. +3. In the `Overview` page, on the `Properties` tab, under `Blob service`, ensure `Versioning` is set to `Enabled`. +4. Repeat steps 1-3 for each storage account with blob storage. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +Run the following command to determine if a storage account has containers: + +```bash +az storage container list --account-name +``` + +For each storage account with containers, ensure that the output of the below command contains `"isVersioningEnabled": true`: + +```bash +az storage account blob-service-properties show --account-name +``` + +### Audit from PowerShell + +Run the following command to list storage accounts: + +```powershell +Get-AzStorageAccount +``` + +Run the following command to create an Azure Storage context for a storage account: + +```powershell +$context = New-AzStorageContext -StorageAccountName +``` + +Run the following command to list containers for the storage account: + +```powershell +Get-AzStorageContainer -Context $context +``` + +If the storage account has containers, run the following command to get the blob service properties of the storage account: + +```powershell +$account = Get-AzStorageBlobServiceProperty -ResourceGroupName -StorageAccountName +``` + +Run the following command to get the blob versioning setting for the storage account: + +```powershell +$account.IsVersioningEnabled +``` + +Ensure that the command returns `True`. + +## Expected Result + +`isVersioningEnabled` should be `true` for all storage accounts with blob storage. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account with blob storage. +3. In the `Overview` page, on the `Properties` tab, under `Blob service`, click `Disabled` next to `Versioning`. +4. Under `Tracking`, check the box next to `Enable versioning for blobs`. +5. Select the radio button next to `Keep all versions` or `Delete versions after (in days)`. +6. If selecting to delete versions, enter a number of in the box after which to delete blob versions. +7. Click `Save`. +8. Repeat steps 1-7 for each storage account with blob storage. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to enable blob versioning: + +```bash +az storage account blob-service-properties update --account-name --enable-versioning true +``` + +### Remediate from PowerShell + +For each storage account requiring remediation, run the following command to enable blob versioning: + +```powershell +Update-AzStorageBlobServiceProperty -ResourceGroupName -StorageAccountName -IsVersioningEnabled $true +``` + +## Default Value + +Blob versioning is disabled by default on storage accounts. + +## References + +1. https://learn.microsoft.com/en-us/cli/azure/storage/account +2. https://learn.microsoft.com/en-us/cli/azure/storage/account/blob-service-properties +3. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstorageaccount +4. https://learn.microsoft.com/en-us/powershell/module/az.storage/new-azstoragecontext +5. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstoragecontainer +6. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstorageblobserviceproperty +7. https://learn.microsoft.com/en-us/powershell/module/az.storage/update-azstorageblobserviceproperty +8. https://learn.microsoft.com/en-us/azure/storage/blobs/versioning-overview +9. https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.1.1/SKILL.md new file mode 100644 index 0000000000..9275c20b6b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.1.1/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-azure-foundations-9.3.1.1 +description: "Ensure 'Enable key rotation reminders' is enabled for each Storage Account" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, key-rotation, access-keys, secrets] +cis_id: "9.3.1.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Enable key rotation reminders' is enabled for each Storage Account + +## Description + +Access Keys authenticate application access requests to data contained in Storage Accounts. A periodic rotation of these keys is recommended to ensure that potentially compromised keys cannot result in a long-term exploitable credential. The "Rotation Reminder" is an automatic reminder feature for a manual procedure. + +## Rationale + +Reminders such as those generated by this recommendation will help maintain a regular and healthy cadence for activities which improve the overall efficacy of a security program. + +Cryptographic key rotation periods will vary depending on your organization's security requirements and the type of data which is being stored in the Storage Account. For example, PCI DSS mandates that cryptographic keys be replaced or rotated 'regularly,' and advises that keys for static data stores be rotated every 'few months.' + +For the purposes of this recommendation, 90 days will be prescribed for the reminder. Review and adjustment of the 90 day period is recommended, and may even be necessary. Your organization's security requirements should dictate the appropriate setting. + +## Impact + +This recommendation only creates a periodic reminder to regenerate access keys. Regenerating access keys can affect services in Azure as well as the organization's applications that are dependent on the storage account. All clients that use the access key to access the storage account must be updated to use the new key. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts` +2. For each Storage Account, under `Security + networking`, go to `Access keys` +3. If the button `Edit rotation reminder` is displayed, the Storage Account is compliant. Click `Edit rotation reminder` and review the `Remind me every` field for a desirable periodic setting that fits your security program's needs. If the button `Set rotation reminder` is displayed, the Storage Account is not compliant. + +### Audit from PowerShell + +```powershell +$rgName = +$accountName = +$account = Get-AzStorageAccount -ResourceGroupName $rgName -Name $accountName + +Write-Output $accountName -> +Write-Output "Expiration Reminder set to: +$($account.KeyPolicy.KeyExpirationPeriodInDays) Days" +Write-Output "Key1 Last Rotated: +$($account.KeyCreationTime.Key1.ToShortDateString())" +Write-Output "Key2 Last Rotated: +$($account.KeyCreationTime.Key2.ToShortDateString())" +``` + +Key rotation is recommended if the creation date for any key is empty. If the reminder is set, the period in days will be returned. The recommended period is 90 days. + +## Expected Result + +The `Edit rotation reminder` button should be displayed (not `Set rotation reminder`), and the rotation period should be set to 90 days or less. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts` +2. For each Storage Account that is not compliant, under `Security + networking`, go to `Access keys` +3. Click `Set rotation reminder` +4. Check `Enable key rotation reminders` +5. In the `Send reminders` field select `Custom`, then set the `Remind me every` field to `90` and the period drop down to `Days` +6. Click `Save` + +### Remediate from PowerShell + +```powershell +$rgName = +$accountName = +$account = Get-AzStorageAccount -ResourceGroupName $rgName -Name $accountName +if ($account.KeyCreationTime.Key1 -eq $null -or $account.KeyCreationTime.Key2 -eq $null){ + Write-output ("You must regenerate both keys at least once before setting expiration policy") +} else { + $account = Set-AzStorageAccount -ResourceGroupName $rgName -Name $accountName -KeyExpirationPeriodInDay 90 +} +$account.KeyPolicy.KeyExpirationPeriodInDays +``` + +## Default Value + +By default, Key rotation reminders are not configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-3-manage-application-identities-securely-and-automatically +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-8-restrict-the-exposure-of-credentials-and-secrets +6. https://www.pcidssguide.com/pci-dss-key-rotation-requirements/ +7. https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.1.2/SKILL.md new file mode 100644 index 0000000000..18dbecdb4d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.1.2/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-azure-foundations-9.3.1.2 +description: "Ensure Storage Account access keys are periodically regenerated" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, access-keys, key-rotation, secrets] +cis_id: "9.3.1.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Storage Account access keys are periodically regenerated + +## Description + +For increased security, regenerate storage account access keys periodically. + +## Rationale + +When a storage account is created, Azure generates two 512-bit storage access keys which are used for authentication when the storage account is accessed. Rotating these keys periodically ensures that any inadvertent access or exposure does not result from the compromise of these keys. + +Cryptographic key rotation periods will vary depending on your organization's security requirements and the type of data which is being stored in the Storage Account. For example, PCI DSS mandates that cryptographic keys be replaced or rotated 'regularly,' and advises that keys for static data stores be rotated every 'few months.' + +For the purposes of this recommendation, 90 days will be prescribed for the reminder. Review and adjustment of the 90 day period is recommended, and may even be necessary. Your organization's security requirements should dictate the appropriate setting. + +## Impact + +Regenerating access keys can affect services in Azure as well as the organization's applications that are dependent on the storage account. All clients who use the access key to access the storage account must be updated to use the new key. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each Storage Account, under `Security + networking`, go to `Access keys`. +3. Review the date and days in the `Last rotated` field for **each** key. + +If the `Last rotated` field indicates a number or days greater than 90 [or greater than your organization's period of validity], the key should be rotated. + +### Audit from Azure CLI + +1. Get a list of storage accounts: + +```bash +az storage account list --subscription +``` + +Make a note of `id`, `name` and `resourceGroup`. + +2. For every storage account make sure that key is regenerated in the past 90 days: + +```bash +az monitor activity-log list --namespace Microsoft.Storage --offset 90d --query "[?contains(authorization.action, 'regenerateKey')]" --resource-id +``` + +The output should contain: + +``` +"authorization"/"scope": AND "authorization"/"action": "Microsoft.Storage/storageAccounts/regeneratekey/action" AND "status"/"localizedValue": "Succeeded" "status"/"Value": "Succeeded" +``` + +## Expected Result + +Both access keys should have been rotated within the last 90 days (or within your organization's required rotation period). + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each Storage Account with outdated keys, under `Security + networking`, go to `Access keys`. +3. Click `Rotate key` next to the outdated key, then click `Yes` to the prompt confirming that you want to regenerate the access key. + +After Azure regenerates the Access Key, you can confirm that `Access keys` reflects a `Last rotated` date of `(0 days ago)`. + +## Default Value + +By default, access keys are not regenerated periodically. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-2-protect-identity-and-authentication-systems +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +5. https://www.pcidssguide.com/pci-dss-key-rotation-requirements/ +6. https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.1.3/SKILL.md new file mode 100644 index 0000000000..2f4d63a957 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.1.3/SKILL.md @@ -0,0 +1,123 @@ +--- +name: cis-azure-foundations-9.3.1.3 +description: "Ensure 'Allow storage account key access' for Azure Storage Accounts is 'Disabled'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, shared-key, access-keys, entra-id, authorization] +cis_id: "9.3.1.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Allow storage account key access' for Azure Storage Accounts is 'Disabled' + +## Description + +Every secure request to an Azure Storage account must be authorized. By default, requests can be authorized with either Microsoft Entra credentials or by using the account access key for Shared Key authorization. + +## Rationale + +Microsoft Entra ID provides superior security and ease of use compared to Shared Key and is recommended by Microsoft. To require clients to use Microsoft Entra ID for authorizing requests, you can disallow requests to the storage account that are authorized with Shared Key. + +## Impact + +When you disallow Shared Key authorization for a storage account, any requests to the account that are authorized with Shared Key, including shared access signatures (SAS), will be denied. Client applications that currently access the storage account using the Shared Key will no longer function. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Settings`, click `Configuration`. +4. Under `Allow storage account key access`, ensure that the radio button next to `Disabled` is selected. +5. Repeat steps 1-4 for each storage account. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +For each storage account, run the following command: + +```bash +az storage account show --resource-group --name +``` + +Ensure that `allowSharedKeyAccess` is set to `false`. + +### Audit from PowerShell + +Run the following command to list storage accounts: + +```powershell +Get-AzStorageAccount +``` + +Run the following command to get the storage account in a resource group with a given name: + +```powershell +$storageAccount = Get-AzStorageAccount -ResourceGroupName -Name +``` + +Run the following command to get the shared key access setting for the storage account: + +```powershell +$storageAccount.allowSharedKeyAccess +``` + +Ensure that the command returns `False`. + +## Expected Result + +`allowSharedKeyAccess` should be set to `false` for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Settings`, click `Configuration`. +4. Under `Allow storage account key access`, click the radio button next to `Disabled`. +5. Click `Save`. +6. Repeat steps 1-5 for each storage account requiring remediation. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to disallow shared key authorization: + +```bash +az storage account update --resource-group --name --allow-shared-key-access false +``` + +### Remediate from PowerShell + +For each storage account requiring remediation, run the following command to disallow shared key authorization: + +```powershell +Set-AzStorageAccount -ResourceGroupName -Name -AllowSharedKeyAccess $false +``` + +## Default Value + +The AllowSharedKeyAccess property of a storage account is not set by default and does not return a value until you explicitly set it. The storage account permits requests that are authorized with the Shared Key when the property value is **null** or when it is **true**. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/shared-key-authorization-prevent +2. https://learn.microsoft.com/en-us/cli/azure/storage/account +3. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstorageaccount +4. https://learn.microsoft.com/en-us/powershell/module/az.storage/set-azstorageaccount + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.10/SKILL.md new file mode 100644 index 0000000000..e562130eed --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.10/SKILL.md @@ -0,0 +1,124 @@ +--- +name: cis-azure-foundations-9.3.10 +description: "Ensure Azure Resource Manager ReadOnly locks are considered for Azure Storage Accounts" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, resource-locks, readonly-lock, data-protection] +cis_id: "9.3.10" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Azure Resource Manager ReadOnly locks are considered for Azure Storage Accounts + +## Description + +Adding an Azure Resource Manager `ReadOnly` lock can prevent users from accidentally or maliciously deleting a storage account, modifying its properties and containers, or creating access assignments. The lock must be removed before the storage account can be deleted or updated. It provides more protection than a `CannotDelete`-type of resource manager lock. + +This feature prevents `POST` operations on a storage account and containers to the Azure Resource Manager control plane, _management.azure.com_. Blocked operations include `listKeys` which prevents clients from obtaining the account shared access keys. + +Microsoft does not recommend `ReadOnly` locks for storage accounts with Azure Files and Table service containers. + +This Azure Resource Manager REST API documentation (spec) provides information about the control plane `POST` operations for _Microsoft.Storage_ resources. + +While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Determining storage accounts that require ReadOnly locks depends on the context and requirements of each organization and environment. + +## Rationale + +Applying a `ReadOnly` lock on storage accounts protects the confidentiality and availability of data by preventing the accidental or unauthorized deletion of the entire storage account and modification of the account, container properties, or access permissions. It can offer enhanced protection for blob and queue workloads with tradeoffs in usability and compatibility for clients using account shared access keys. + +## Impact + +- Prevents the deletion of the Storage account Resource entirely. +- Prevents the deletion of the parent Resource Group containing the locked Storage account resource. +- Prevents clients from obtaining the storage account shared access keys using a `listKeys` operation. +- Requires Entra credentials to access blob and queue data in the Portal. +- Data in Azure Files or the Table service may be inaccessible to clients using the account shared access keys. +- Prevents modification of account properties, network settings, containers, and RBAC assignments. +- Does not prevent access using existing account shared access keys issued to clients. +- Does not prevent deletion of containers or other objects within the storage account. + +## Audit Procedure + +### Audit from Azure Portal + +1. Navigate to the storage account in the Azure portal. +2. For each storage account, under `Settings`, click `Locks`. +3. Ensure that a `ReadOnly` lock exists on the storage account. + +### Audit from Azure CLI + +```bash +az lock list --resource-group \ + --resource-name \ + --resource-type "Microsoft.Storage/storageAccounts" +``` + +### Audit from PowerShell + +```powershell +Get-AzResourceLock -ResourceGroupName ` + -ResourceName ` + -ResourceType "Microsoft.Storage/storageAccounts" +``` + +### Audit from Azure Policy + +There is currently no built-in Microsoft policy to audit resource locks on storage accounts. Custom and community policy definitions can check for the existence of a "Microsoft.Authorization/locks" resource with an AuditIfNotExists effect. + +## Expected Result + +A `ReadOnly` lock should exist on each critical storage account where enhanced protection is desired. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the storage account in the Azure portal. +2. Under the `Settings` section, select `Locks`. +3. Select `Add`. +4. Provide a Name, and choose `ReadOnly` for the type of lock. +5. Add a note about the lock if desired. + +### Remediate from Azure CLI + +Replace the information within <> with appropriate values: + +```bash +az lock create --name \ + --resource-group \ + --resource \ + --lock-type ReadOnly \ + --resource-type Microsoft.Storage/storageAccounts +``` + +### Remediate from PowerShell + +Replace the information within <> with appropriate values: + +```powershell +New-AzResourceLock -LockLevel ReadOnly ` + -LockName ` + -ResourceName ` + -ResourceType Microsoft.Storage/storageAccounts ` + -ResourceGroupName +``` + +## Default Value + +By default, no locks are applied to Azure resources, including storage accounts. Locks must be manually configured after resource creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/lock-account-resource +2. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources +3. https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storage + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.11/SKILL.md new file mode 100644 index 0000000000..d87b6c6126 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.11/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-azure-foundations-9.3.11 +description: "Ensure Redundancy is set to 'geo-redundant storage (GRS)' on critical Azure Storage Accounts" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, geo-redundancy, grs, disaster-recovery, availability] +cis_id: "9.3.11" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Redundancy is set to 'geo-redundant storage (GRS)' on critical Azure Storage Accounts + +## Description + +Geo-redundant storage (GRS) in Azure replicates data three times within the primary region using locally redundant storage (LRS) and asynchronously copies it to a secondary region hundreds of miles away. This setup ensures high availability and resilience by providing 16 nines (99.99999999999999%) durability over a year, safeguarding data against regional outages. + +## Rationale + +Enabling GRS protects critical data from regional failures by maintaining a copy in a geographically separate location. This significantly reduces the risk of data loss, supports business continuity, and meets high availability requirements for disaster recovery. + +## Impact + +Enabling geo-redundant storage on Azure storage accounts increases costs due to cross-region data replication. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data management`, click `Redundancy`. +4. Ensure that `Redundancy` is set to `Geo-redundant storage (GRS)`. +5. Repeat steps 1-4 for each storage account. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +For each storage account, run the following command: + +```bash +az storage account show --resource-group --name +``` + +Under `sku`, ensure that `name` is set to `Standard_GRS`. + +### Audit from PowerShell + +Run the following command to list storage accounts: + +```powershell +Get-AzStorageAccount +``` + +Run the following command to get the storage account in a resource group with a given name: + +```powershell +$storageAccount = Get-AzStorageAccount -ResourceGroupName -Name +``` + +Run the following command to get the redundancy setting for the storage account: + +```powershell +$storageAccount.SKU.Name +``` + +Ensure that the command returns `Standard_GRS`. + +## Expected Result + +`sku.name` should be `Standard_GRS` for all critical storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data management`, click `Redundancy`. +4. From the `Redundancy` drop-down menu, select `Geo-redundant storage (GRS)`. +5. Click `Save`. +6. Repeat steps 1-5 for each storage account requiring remediation. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to enable geo-redundant storage: + +```bash +az storage account update --resource-group --name --sku Standard_GRS +``` + +## Default Value + +The default redundancy setting depends on how the storage account was created and the SKU selected at creation time. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-redundancy +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.2.1/SKILL.md new file mode 100644 index 0000000000..b2a98b4ab3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.2.1/SKILL.md @@ -0,0 +1,129 @@ +--- +name: cis-azure-foundations-9.3.2.1 +description: "Ensure Private Endpoints are used to access Storage Accounts" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, private-endpoints, networking, private-link] +cis_id: "9.3.2.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Private Endpoints are used to access Storage Accounts + +## Description + +Use private endpoints for your Azure Storage accounts to allow clients and services to securely access data located over a network via an encrypted Private Link. To do this, the private endpoint uses an IP address from the VNet for each service. Network traffic between disparate services securely traverses encrypted over the VNet. This VNet can also link addressing space, extending your network and accessing resources on it. Similarly, it can be a tunnel through public networks to connect remote infrastructures together. This creates further security through segmenting network traffic and preventing outside sources from accessing it. + +## Rationale + +Securing traffic between services through encryption protects the data from easy interception and reading. + +## Impact + +If an Azure Virtual Network is not implemented correctly, this may result in the loss of critical network traffic. Private endpoints are charged per hour of use. Refer to https://azure.microsoft.com/en-us/pricing/details/private-link/ and https://azure.microsoft.com/en-us/pricing/calculator/ to estimate potential costs. + +## Audit Procedure + +### Audit from Azure Portal + +1. Open the `Storage Accounts` blade. +2. For each listed Storage Account, perform the following check: +3. Under the `Security + networking` heading, click on `Networking`. +4. Click on the `Private endpoint connections` tab at the top of the networking window. +5. Ensure that for each VNet that the Storage Account must be accessed from, a unique Private Endpoint is deployed and the `Connection state` for each Private Endpoint is `Approved`. + +Repeat the procedure for each Storage Account. + +### Audit from PowerShell + +```powershell +$storageAccount = Get-AzStorageAccount -ResourceGroup '' -Name '' + +Get-AzPrivateEndpoint -ResourceGroup ''|Where-Object {$_.PrivateLinkServiceConnectionsText -match $storageAccount.id} +``` + +If the results of the second command returns information, the Storage Account is using a Private Endpoint and complies with this Benchmark, otherwise if the results of the second command are empty, the Storage Account generates a finding. + +### Audit from Azure CLI + +```bash +az storage account show --name '' --query "privateEndpointConnections[0].id" +``` + +If the above command returns data, the Storage Account complies with this Benchmark, otherwise if the results are empty, the Storage Account generates a finding. + +## Expected Result + +Each Storage Account should have at least one Private Endpoint connection with `Connection state` set to `Approved`. + +## Remediation + +### Remediate from Azure Portal + +1. Open the `Storage Accounts` blade +2. For each listed Storage Account, perform the following: +3. Under the `Security + networking` heading, click on `Networking` +4. Click on the `Private endpoint connections` tab at the top of the networking window +5. Click the `+ Private endpoint` button +6. In the `1 - Basics` tab/step: Enter a name, ensure that the Region matches the region of the Storage Account, click `Next` +7. In the `2 - Resource` tab/step: Select the `target sub-resource` based on what type of storage resource is being made available, click `Next` +8. In the `3 - Virtual Network` tab/step: Select the Virtual network and Subnet, click `Next` +9. In the `4 - DNS` tab/step: Select other DNS settings as appropriate, click `Next` +10. In the `5 - Tags` tab/step: Set any tags as relevant, click `Next` +11. In the `6 - Review + create` tab/step: If validation has passed, click `Create` + +### Remediate from PowerShell + +```powershell +$storageAccount = Get-AzStorageAccount -ResourceGroupName '' -Name '' + +$privateEndpointConnection = @{ + Name = 'connectionName' + PrivateLinkServiceId = $storageAccount.Id + GroupID = "blob|blob_secondary|file|file_secondary|table|table_secondary|queue|queue_secondary|web|web_secondary|dfs|dfs_secondary" +} + +$privateLinkServiceConnection = New-AzPrivateLinkServiceConnection @privateEndpointConnection + +$virtualNetDetails = Get-AzVirtualNetwork -ResourceGroupName '' -Name '' + +$privateEndpoint = @{ + ResourceGroupName = '' + Name = '' + Location = '' + Subnet = $virtualNetDetails.Subnets[0] + PrivateLinkServiceConnection = $privateLinkServiceConnection +} + +New-AzPrivateEndpoint @privateEndpoint +``` + +### Remediate from Azure CLI + +```bash +az network private-endpoint create --resource-group --location --name --vnet-name --subnet --private-connection-resource-id --connection-name --group-id +``` + +## Default Value + +By default, Private Endpoints are not created for Storage Accounts. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-private-endpoints +2. https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview +3. https://learn.microsoft.com/en-us/azure/private-link/create-private-endpoint-portal +4. https://learn.microsoft.com/en-us/azure/private-link/create-private-endpoint-cli +5. https://learn.microsoft.com/en-us/azure/private-link/create-private-endpoint-powershell +6. https://learn.microsoft.com/en-us/azure/private-link/tutorial-private-endpoint-storage-portal +7. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.2.2/SKILL.md new file mode 100644 index 0000000000..da223d5724 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.2.2/SKILL.md @@ -0,0 +1,104 @@ +--- +name: cis-azure-foundations-9.3.2.2 +description: "Ensure 'Public Network Access' is 'Disabled' for storage accounts" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, networking, public-access, network-security] +cis_id: "9.3.2.2" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Public Network Access' is 'Disabled' for storage accounts + +## Description + +Disable public network access to prevent exposure to the internet and reduce the risk of unauthorized access. Use private endpoints to securely manage access within trusted networks. + +Disallowing public network access for a storage account overrides the public access settings for individual containers in that storage account. + +## Rationale + +Disabling public network access improves security by ensuring that a storage account is not exposed on the public internet. The default network configuration for a storage account permits a user with appropriate permissions to configure public network access to containers and blobs in a storage account. It is recommended not to provide public network access to storage accounts until, and unless, it is strongly desired. A shared access signature token or Azure AD RBAC should be used for providing controlled and timed access to blob containers. + +## Impact + +**NOTE:** Prior to disabling public network access, it is strongly recommended that, for each storage account, either virtual network integration is completed OR private endpoints/links are set up as described in "Ensure Private Endpoints are used to access Storage Accounts." + +Disabling public network access restricts direct access to the service. This enhances security but will require the configuration of a virtual network and/or private endpoints for any services or users needing access within trusted networks. Access will have to be managed using shared access signatures or via Azure AD RBAC. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under the `Security + networking` section, click `Networking`. +3. Ensure the `Public network access` setting is set to `Disabled`. + +### Audit from Azure CLI + +Ensure `publicNetworkAccess` is `Disabled`: + +```bash +az storage account show --name --resource-group --query "{publicNetworkAccess:publicNetworkAccess}" +``` + +### Audit from PowerShell + +For each Storage Account, ensure `PublicNetworkAccess` is `Disabled`: + +```powershell +Get-AzStorageAccount -Name -ResourceGroupName |select PublicNetworkAccess +``` + +## Expected Result + +`PublicNetworkAccess` should be `Disabled` for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +First, follow Microsoft documentation and create shared access signature tokens for your blob containers. Then, + +1. Go to `Storage Accounts`. +2. For each storage account, under the `Security + networking` section, click `Networking`. +3. Set `Public network access` to `Disabled`. +4. Click `Save`. + +### Remediate from Azure CLI + +Set 'Public Network Access' to `Disabled` on the storage account: + +```bash +az storage account update --name --resource-group --public-network-access Disabled +``` + +### Remediate from PowerShell + +For each Storage Account, run the following to set the `PublicNetworkAccess` setting to `Disabled`: + +```powershell +Set-AzStorageAccount -ResourceGroupName -Name -PublicNetworkAccess Disabled +``` + +## Default Value + +By default, `Public Network Access` is set to `Enabled from all networks` for the Storage Account. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-configure +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls +4. https://learn.microsoft.com/en-us/azure/storage/blobs/assign-azure-role-data-access +5. https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.2.3/SKILL.md new file mode 100644 index 0000000000..3319311da9 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.2.3/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-azure-foundations-9.3.2.3 +description: "Ensure default network access rule for storage accounts is set to deny" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, networking, default-action, firewall, network-rules] +cis_id: "9.3.2.3" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure default network access rule for storage accounts is set to deny + +## Description + +Restricting default network access helps to provide a new layer of security, since storage accounts accept connections from clients on any network. To limit access to selected networks, the default action must be changed. + +## Rationale + +**NOTE:** This recommendation is only applicable if Public Network Access has not been disabled due to necessity or exception. + +Storage accounts should be configured to deny access to traffic from all networks (including internet traffic). Access can be granted to traffic from specific Azure Virtual networks, allowing a secure network boundary for specific applications to be built. Access can also be granted to public internet IP address ranges to enable connections from specific internet or on-premises clients. When network rules are configured, only applications from allowed networks can access a storage account. When calling from an allowed network, applications continue to require proper authorization (a valid access key or SAS token) to access the storage account. + +## Impact + +All allowed networks will need to be whitelisted on each specific network, creating administrative overhead. This may result in loss of network connectivity, so do not turn on for critical resources during business hours. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to Storage Accounts. +2. For each storage account, under `Security + networking`, click `Networking`. +3. Click the `Firewalls and virtual networks` heading. +4. Ensure that `Public network access` is not set to `Enabled from all networks`. + +### Audit from Azure CLI + +Ensure `defaultAction` is not set to `Allow`. + +```bash +az storage account list --query '[*].networkRuleSet' +``` + +### Audit from PowerShell + +```powershell +Connect-AzAccount +Set-AzContext -Subscription +Get-AzStorageAccountNetworkRuleset -ResourceGroupName -Name |Select-Object DefaultAction +``` + +PowerShell Result - Non-Compliant: `DefaultAction : Allow` + +PowerShell Result - Compliant: `DefaultAction : Deny` + +## Expected Result + +`defaultAction` should be set to `Deny` for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Security + networking`, click `Networking`. +3. Click the `Firewalls and virtual networks` heading. +4. Set `Public network access` to `Enabled from selected virtual networks and IP addresses`. +5. Add rules to allow traffic from specific networks and IP addresses. +6. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to update `default-action` to `Deny`. + +```bash +az storage account update --name --resource-group --default-action Deny +``` + +## Default Value + +By default, Storage Accounts will accept connections from clients on any network. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.3.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.3.1/SKILL.md new file mode 100644 index 0000000000..fd4f8c2398 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.3.1/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-azure-foundations-9.3.3.1 +description: "Ensure 'Default to Microsoft Entra authorization in the Azure portal' is set to 'Enabled'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, entra-id, authorization, iam] +cis_id: "9.3.3.1" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Default to Microsoft Entra authorization in the Azure portal' is set to 'Enabled' + +## Description + +When this property is enabled, the Azure portal authorizes requests to blobs, files, queues, and tables with Microsoft Entra ID by default. + +## Rationale + +Microsoft Entra ID provides superior security and ease of use over Shared Key. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account. +3. Under `Settings`, click `Configuration`. +4. Ensure that `Default to Microsoft Entra authorization in the Azure portal` is set to `Enabled`. +5. Repeat steps 1-4 for each storage account. + +### Audit from Azure CLI + +Run the following command to get the `name` and `defaultToOAuthAuthentication` setting for each storage account: + +```bash +az storage account list --query [*].[name,defaultToOAuthAuthentication] +``` + +Ensure that `true` is returned for each storage account. + +## Expected Result + +`defaultToOAuthAuthentication` should be `true` for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account. +3. Under `Settings`, click `Configuration`. +4. Under `Default to Microsoft Entra authorization in the Azure portal`, click the radio button next to `Enabled`. +5. Click `Save`. +6. Repeat steps 1-5 for each storage account requiring remediation. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to enable `defaultToOAuthAuthentication`: + +```bash +az storage account update --resource-group --name --set defaultToOAuthAuthentication=true +``` + +## Default Value + +By default, `defaultToOAuthAuthentication` is disabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/authorize-data-operations-portal#default-to-microsoft-entra-authorization-in-the-azure-portal +2. https://learn.microsoft.com/en-us/cli/azure/storage/account + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.4/SKILL.md new file mode 100644 index 0000000000..cf404efee5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.4/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-azure-foundations-9.3.4 +description: "Ensure 'Secure transfer required' is set to 'Enabled'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, https, secure-transfer, encryption-in-transit] +cis_id: "9.3.4" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Secure transfer required' is set to 'Enabled' + +## Description + +Enable data encryption in transit. + +## Rationale + +The secure transfer option enhances the security of a storage account by only allowing requests to the storage account by a secure connection. For example, when calling REST APIs to access storage accounts, the connection must use HTTPS. Any requests using HTTP will be rejected when 'secure transfer required' is enabled. When using the Azure files service, connection without encryption will fail, including scenarios using SMB 2.1, SMB 3.0 without encryption, and some flavors of the Linux SMB client. Because Azure storage does not support HTTPS for custom domain names, this option is not applied when using a custom domain name. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Ensure that `Secure transfer required` is set to `Enabled`. + +### Audit from Azure CLI + +Use the below command to ensure the `Secure transfer required` is enabled for all the `Storage Accounts` by ensuring the output contains `true` for each of the `Storage Accounts`. + +```bash +az storage account list --query "[*].[name,enableHttpsTrafficOnly]" +``` + +## Expected Result + +`enableHttpsTrafficOnly` should be `true` for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Set `Secure transfer required` to `Enabled`. +4. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to enable `Secure transfer required` for a `Storage Account`: + +```bash +az storage account update --name --resource-group --https-only true +``` + +## Default Value + +By default, `Secure transfer required` is set to `Disabled`. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/security-recommendations +2. https://learn.microsoft.com/en-us/cli/azure/storage/account +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.5/SKILL.md new file mode 100644 index 0000000000..010ce1bac0 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.5/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-azure-foundations-9.3.5 +description: "Ensure 'Allow Azure services on the trusted services list to access this storage account' is Enabled for Storage Account Access" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, trusted-services, networking, firewall] +cis_id: "9.3.5" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Allow Azure services on the trusted services list to access this storage account' is Enabled for Storage Account Access + +## Description + +_NOTE:_ This recommendation assumes that the `Public network access` parameter is set to `Enabled from selected virtual networks and IP addresses`. Please ensure the prerequisite recommendation has been implemented before proceeding: + +- Ensure Default Network Access Rule for Storage Accounts is Set to Deny + +If the `Allow Azure services on the trusted services list to access this storage account` exception is enabled, the following services are granted access to the storage account: Azure Backup, Azure Data Box, Azure DevTest Labs, Azure Event Grid, Azure Event Hubs, Azure File Sync, Azure HDInsight, Azure Import/Export, Azure Monitor, Azure Networking Services, and Azure Site Recovery (when registered in the subscription). + +## Rationale + +**NOTE:** If none of the services listed in the Description are in use in your environment, you may wish to make an exception to this recommendation and disable 'Allow Azure services on the trusted services list to access this storage account.' + +Turning on firewall rules for a storage account will block access to incoming requests for data, including from other Azure services. Some Azure services that interact with storage accounts operate from networks that can't be granted access through network rules. To help this type of service work as intended, allow the set of trusted Azure services to bypass the network rules. These services will then use strong authentication to access the storage account. + +## Impact + +This creates authentication credentials for services that need access to storage resources so that services will no longer need to communicate via network request. There may be a temporary loss of communication as you set each Storage Account. It is recommended to not do this on mission-critical resources during business hours. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Security + networking`, click `Networking`. +3. Click on the `Firewalls and virtual networks` heading. +4. Under `Exceptions`, ensure that `Allow Azure services on the trusted services list to access this storage account` is checked. + +### Audit from Azure CLI + +Ensure `bypass` contains `AzureServices`: + +```bash +az storage account list --query '[*].networkRuleSet' +``` + +### Audit from PowerShell + +```powershell +Connect-AzAccount +Set-AzContext -Subscription +Get-AzStorageAccountNetworkRuleset -ResourceGroupName -Name |Select-Object Bypass +``` + +If the response from the above command is `None`, the storage account configuration is out of compliance with this check. If the response is `AzureServices`, the storage account configuration is in compliance with this check. + +## Expected Result + +`bypass` should contain `AzureServices` for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Security + networking`, click `Networking`. +3. Click on the `Firewalls and virtual networks` heading. +4. Under `Exceptions`, check the box next to `Allow Azure services on the trusted services list to access this storage account`. +5. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to update `bypass` to `Azure services`. + +```bash +az storage account update --name --resource-group --bypass AzureServices +``` + +## Default Value + +By default, Storage Accounts will accept connections from clients on any network. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls + +## Profile + +Level 2 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.6/SKILL.md new file mode 100644 index 0000000000..9e1c25e7a1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.6/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-azure-foundations-9.3.6 +description: "Ensure the 'Minimum TLS version' for storage accounts is set to 'Version 1.2'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, tls, encryption, minimum-tls-version] +cis_id: "9.3.6" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure the 'Minimum TLS version' for storage accounts is set to 'Version 1.2' + +## Description + +In some cases, Azure Storage sets the minimum TLS version to be version 1.0 by default. TLS 1.0 is a legacy version and has known vulnerabilities. This minimum TLS version can be configured to be later protocols such as TLS 1.2. + +## Rationale + +TLS 1.0 has known vulnerabilities and has been replaced by later versions of the TLS protocol. Continued use of this legacy protocol affects the security of data in transit. + +## Impact + +When set to TLS 1.2 all requests must leverage this version of the protocol. Applications leveraging legacy versions of the protocol will fail. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Ensure that the `Minimum TLS version` is set to `Version 1.2`. + +### Audit from Azure CLI + +Get a list of all storage accounts and their resource groups: + +```bash +az storage account list | jq '.[] | {name, resourceGroup}' +``` + +Then query the minimumTLSVersion field: + +```bash +az storage account show \ + --name \ + --resource-group \ + --query minimumTlsVersion \ + --output tsv +``` + +### Audit from PowerShell + +To get the minimum TLS version, run the following command: + +```powershell +(Get-AzStorageAccount -Name -ResourceGroupName ).MinimumTlsVersion +``` + +## Expected Result + +`minimumTlsVersion` should be `TLS1_2` for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Set the `Minimum TLS version` to `Version 1.2`. +4. Click `Save`. + +### Remediate from Azure CLI + +```bash +az storage account update \ + --name \ + --resource-group \ + --min-tls-version TLS1_2 +``` + +### Remediate from PowerShell + +To set the minimum TLS version, run the following command: + +```powershell +Set-AzStorageAccount -AccountName ` + -ResourceGroupName ` + -MinimumTlsVersion TLS1_2 +``` + +## Default Value + +If a storage account is created through the portal, the MinimumTlsVersion property for that storage account will be set to TLS 1.2. If a storage account is created through PowerShell or CLI, the MinimumTlsVersion property for that storage account will not be set, and defaults to TLS 1.0. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/transport-layer-security-configure-minimum-version +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.7/SKILL.md new file mode 100644 index 0000000000..ff6834a3f2 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.7/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-foundations-9.3.7 +description: "Ensure 'Cross Tenant Replication' is not enabled" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, cross-tenant-replication, data-protection, data-governance] +cis_id: "9.3.7" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Cross Tenant Replication' is not enabled + +## Description + +Cross Tenant Replication in Azure allows data to be replicated across multiple Azure tenants. While this feature can be beneficial for data sharing and availability, it also poses a significant security risk if not properly managed. Unauthorized data access, data leakage, and compliance violations are potential risks. Disabling Cross Tenant Replication ensures that data is not inadvertently replicated across different tenant boundaries without explicit authorization. + +## Rationale + +Disabling Cross Tenant Replication minimizes the risk of unauthorized data access and ensures that data governance policies are strictly adhered to. This control is especially critical for organizations with stringent data security and privacy requirements, as it prevents the accidental sharing of sensitive information. + +## Impact + +Disabling Cross Tenant Replication may affect data availability and sharing across different Azure tenants. Ensure that this change aligns with your organizational data sharing and availability requirements. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Data management`, click `Object replication`. +3. Click `Advanced settings`. +4. Ensure `Allow cross-tenant replication` is not checked. + +### Audit from Azure CLI + +```bash +az storage account list --query "[*].[name,allowCrossTenantReplication]" +``` + +The value of `false` should be returned for each storage account listed. + +## Expected Result + +`allowCrossTenantReplication` should be `false` for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Data management`, click `Object replication`. +3. Click `Advanced settings`. +4. Uncheck `Allow cross-tenant replication`. +5. Click `OK`. + +### Remediate from Azure CLI + +Replace the information within <> with appropriate values: + +```bash +az storage account update --name --resource-group --allow-cross-tenant-replication false +``` + +## Default Value + +For new storage accounts created after Dec 15, 2023 cross tenant replication is not enabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/object-replication-prevent-cross-tenant-policies + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.8/SKILL.md new file mode 100644 index 0000000000..35e15b60ba --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.8/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-azure-foundations-9.3.8 +description: "Ensure 'Allow Blob Anonymous Access' is set to 'Disabled'" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, blob-storage, anonymous-access, public-access] +cis_id: "9.3.8" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure 'Allow Blob Anonymous Access' is set to 'Disabled' + +## Description + +The Azure Storage setting 'Allow Blob Anonymous Access' (aka "allowBlobPublicAccess") controls whether anonymous access is allowed for blob data in a storage account. When this property is set to True, it enables public read access to blob data, which can be convenient for sharing data but may carry security risks. When set to False, it disallows public access to blob data, providing a more secure storage environment. + +## Rationale + +If "Allow Blob Anonymous Access" is enabled, blobs can be accessed by adding the blob name to the URL to see the contents. An attacker can enumerate a blob using methods, such as brute force, and access them. + +Exfiltration of data by brute force enumeration of items from a storage account may occur if this setting is set to 'Enabled'. + +## Impact + +Additional consideration may be required for exceptional circumstances where elements of a storage account require public accessibility. In these circumstances, it is highly recommended that all data stored in the public facing storage account be reviewed for sensitive or potentially compromising data, and that sensitive or compromising data is never stored in these storage accounts. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Ensure `Allow Blob Anonymous Access` is set to `Disabled`. + +### Audit from Azure CLI + +For every storage account in scope: + +```bash +az storage account show --name "" --query allowBlobPublicAccess +``` + +Ensure that every storage account in scope returns `false` for the "allowBlobPublicAccess" setting. + +## Expected Result + +`allowBlobPublicAccess` should be `false` for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Set `Allow Blob Anonymous Access` to `Disabled`. +4. Click `Save`. + +### Remediate from PowerShell + +For every storage account in scope, run the following: + +```powershell +$storageAccount = Get-AzStorageAccount -ResourceGroupName "" -Name "" +$storageAccount.AllowBlobPublicAccess = $false +Set-AzStorageAccount -InputObject $storageAccount +``` + +## Default Value + +Disabled + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-prevent?tabs=portal +2. https://learn.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-prevent?source=recommendations&tabs=portal + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.9/SKILL.md new file mode 100644 index 0000000000..ef5da506aa --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Foundations_Benchmark_v5.0.0/cis-azure-foundations-9.3.9/SKILL.md @@ -0,0 +1,115 @@ +--- +name: cis-azure-foundations-9.3.9 +description: "Ensure Azure Resource Manager Delete locks are applied to Azure Storage Accounts" +category: cis-azure-foundations +version: "5.0.0" +author: cyberstrike-official +tags: [cis, azure, storage-accounts, resource-locks, delete-lock, data-protection] +cis_id: "9.3.9" +cis_benchmark: "CIS Microsoft Azure Foundations Benchmark v5.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# Ensure Azure Resource Manager Delete locks are applied to Azure Storage Accounts + +## Description + +Azure Resource Manager _CannotDelete (Delete)_ locks can prevent users from accidentally or maliciously deleting a storage account. This feature ensures that while the Storage account can still be modified or used, deletion of the Storage account resource requires removal of the lock by a user with appropriate permissions. + +This feature is a protective control for the availability of data. By ensuring that a storage account or its parent resource group cannot be deleted without first removing the lock, the risk of data loss is reduced. + +While an automated assessment procedure exists for this recommendation, the assessment status remains manual. Determining storage accounts that require CannotDelete locks depends on the context and requirements of each organization and environment. + +## Rationale + +Applying a _Delete_ lock on storage accounts protects the availability of data by preventing the accidental or unauthorized deletion of the entire storage account. It is a fundamental protective control that can prevent data loss. + +## Impact + +- Prevents the deletion of the Storage account Resource entirely. +- Prevents the deletion of the parent Resource Group containing the locked Storage account resource. +- Does not prevent other control plane operations, including modification of configurations, network settings, containers, and access. +- Does not prevent deletion of containers or other objects within the storage account. + +## Audit Procedure + +### Audit from Azure Portal + +1. Navigate to the storage account in the Azure portal. +2. For each storage account, under `Settings`, click `Locks`. +3. Ensure that a `Delete` lock exists on the storage account. + +### Audit from Azure CLI + +```bash +az lock list --resource-group \ + --resource-name \ + --resource-type "Microsoft.Storage/storageAccounts" +``` + +### Audit from PowerShell + +```powershell +Get-AzResourceLock -ResourceGroupName ` + -ResourceName ` + -ResourceType "Microsoft.Storage/storageAccounts" +``` + +### Audit from Azure Policy + +There is currently no built-in Microsoft policy to audit resource locks on storage accounts. Custom and community policy definitions can check for the existence of a "Microsoft.Authorization/locks" resource with an AuditIfNotExists effect. + +## Expected Result + +A `Delete` (CannotDelete) lock should exist on each critical storage account. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the storage account in the Azure portal. +2. Under the `Settings` section, select `Locks`. +3. Select `Add`. +4. Provide a Name, and choose `Delete` for the type of lock. +5. Add a note about the lock if desired. + +### Remediate from Azure CLI + +Replace the information within <> with appropriate values: + +```bash +az lock create --name \ + --resource-group \ + --resource \ + --lock-type CanNotDelete \ + --resource-type Microsoft.Storage/storageAccounts +``` + +### Remediate from PowerShell + +Replace the information within <> with appropriate values: + +```powershell +New-AzResourceLock -LockLevel CanNotDelete ` + -LockName ` + -ResourceName ` + -ResourceType Microsoft.Storage/storageAccounts ` + -ResourceGroupName +``` + +## Default Value + +By default, no locks are applied to Azure resources, including storage accounts. Locks must be manually configured after resource creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/lock-account-resource +2. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources + +## Profile + +Level 1 diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-10.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-10.1/SKILL.md new file mode 100644 index 0000000000..53e2995b34 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-10.1/SKILL.md @@ -0,0 +1,135 @@ +--- +name: cis-azure-storage-10.1 +description: "Ensure 'Encryption key source' is set to 'Customer Managed Key' for Azure NetApp Files accounts" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, netapp, encryption, cmk] +cis_id: "10.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 10.1 Ensure 'Encryption key source' is set to 'Customer Managed Key' for Azure NetApp Files accounts (Automated) + +## Description + +Customer-managed keys (CMK) for Azure NetApp Files volume encryption enable organizations to use their own keys instead of platform-managed ones, providing full control over encryption. + +## Rationale + +Using customer-managed keys (CMKs) to encrypt Azure NetApp Files volumes enhances security by granting organizations complete control over their encryption keys. + +## Impact + +There are costs and configuration overhead associated with setting up and managing customer-managed keys. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Azure NetApp Files`. +2. Click the name of a NetApp account. +3. Under `Azure NetApp Files`, click `Encryption`. +4. Ensure that `Encryption key source` is set to `Customer Managed Key`. +5. Repeat steps 1-4 for each NetApp Files account. + +### Audit from Azure CLI + +Run the following command to list NetApp Files accounts: + +```bash +az netappfiles account list +``` + +For each NetApp Files account, run the following command: + +```bash +az netappfiles account show --resource-group --account-name +``` + +Ensure that under `encryption`, `keySource` is set to `Microsoft.KeyVault`. + +### Audit from PowerShell + +Run the following command to install the `Az.NetAppFiles` module: + +```powershell +Install-Module Az.NetAppFiles +``` + +Enter `Y` when prompted. + +Run the following command to list NetApp Files accounts: + +```powershell +Get-AzResource | ? {$_.ResourceType -like 'Microsoft.NetApp/netAppAccounts'} | Format-Table +``` + +Run the following command to get the NetApp Files account in a resource group with a given name: + +```powershell +$netapp = Get-AzNetAppFilesAccount -ResourceGroupName -Name +``` + +Run the following command to get the encryption key source for the NetApp Files account: + +```powershell +$netapp.Encryption.KeySource +``` + +Ensure that the command returns `Microsoft.KeyVault`. Repeat for each NetApp Files account. + +## Expected Result + +Under `encryption`, `keySource` is set to `Microsoft.KeyVault`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Azure NetApp Files`. +2. Click the name of a NetApp account. +3. Under `Azure NetApp Files`, click `Encryption`. +4. Next to `Encryption key source`, click the radio button next to `Customer Managed Key`. +5. Next to `Encryption key`, click the radio button next to `Enter key URI` to provide a known key URI, or click the radio button next to `Select from key vault` to select a key from a key vault. +6. If entering a key URI, provide the key URI in the text box next to `Key URI`. +7. If selecting a key from a key vault, click `Select a key vault and key`. + 1. From the drop-down menu next to `Key vault`, select a key vault. + 2. From the drop-down menu next to `Key`, select a key. + 3. Click `Select`. +8. Next to `Identity type`, click the radio button next to `System-assigned` to use a system-assigned managed identity, or click the radio button next to `User-assigned` to use a user-assigned managed identity. +9. If selecting a user-assigned managed identity, next to `User-assigned identity`, click `Select an identity`. + 1. In the filter box, type to filter by identity name and/or resource group name. + 2. Check the box next to a managed identity. + 3. Click `Add`. +10. Click `Save`. +11. Repeat steps 1-10 for each NetApp Files account. + +### Remediate from Azure CLI + +For each NetApp Files account requiring remediation, run the following command to assign a customer-managed encryption key: + +```bash +az netappfiles account update --resource-group --account-name --key-source Microsoft.KeyVault --key-name --key-vault-uri --keyvault-resource-id --identity-type SystemAssigned +``` + +Note: Use `--identity-type UserAssigned --user-assigned-identity ` with the above command to provide a UserAssigned Identity Id. + +## Default Value + +By default, data in the NetApp Files account is encrypted using Microsoft-managed keys. + +## References + +1. https://learn.microsoft.com/en-us/azure/azure-netapp-files/configure-customer-managed-keys +2. https://learn.microsoft.com/en-us/cli/azure/netappfiles +3. https://learn.microsoft.com/en-us/powershell/module/az.netappfiles/get-aznetappfilesaccount + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.1/SKILL.md new file mode 100644 index 0000000000..baf9a5d573 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.1/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-azure-storage-11.1 +description: "Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only'" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, blob-storage, sas, encryption] +cis_id: "11.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 11.1 Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only' (Manual) + +## Description + +Shared access signatures (SAS) can be used to grant limited access to Azure Storage resources. When generating a SAS, it is possible to specify the allowed protocols for a request made with the SAS. It is recommended to allow requests over HTTPS only. + +## Rationale + +If a SAS is passed over HTTP and intercepted, an attacker performing a man-in-the-middle attack can read the SAS. Then, they can use that SAS just as the intended user could have. This can potentially compromise sensitive data or allow for data corruption by the malicious user. + +## Impact + +SAS can pose security risks if they are not managed carefully. + +## Audit Procedure + +It is not possible to audit generated SAS. + +## Expected Result + +All SAS tokens are generated with `Allowed protocols` set to `HTTPS only`. + +## Remediation + +### Remediate from Azure Portal + +If SAS have been created to allow HTTP and were created with a stored access policy (SAP), the SAS can be revoked by deleting the SAP or updating the SAP expiration time to a time in the past: + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data storage`, click `Containers`. +4. Click the three dots next to a container. +5. Click `Access policy`. +6. Click the three dots next to an access policy. +7. Click `Delete`. +8. Click `Save`. +9. Repeat steps 1-8 as needed to revoke SAS created with SAP. + +If SAS have been created to allow HTTP and were not created with a SAP, the SAS can be revoked by regenerating the storage account access keys: + +Note: Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Security + networking`, click `Access keys`. +4. Next to each key, click `Rotate key`. +5. Click `Yes` to confirm. +6. Repeat steps 1-5 as needed to revoke SAS. + +## Default Value + +When generating a SAS, the default selection for `Allowed protocols` is `HTTPS only`. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview +2. https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage + +## Additional Information + +This recommendation is based on the recommendation `Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only'`, from the `Common Reference Recommendations` > `Secrets and Keys` > `Shared Access Signatures` section. + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.2/SKILL.md new file mode 100644 index 0000000000..ac0c5f632a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.2/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-azure-storage-11.2 +description: "Ensure that shared access signature (SAS) tokens expire within an hour" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, blob-storage, sas] +cis_id: "11.2" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 11.2 Ensure that shared access signature (SAS) tokens expire within an hour (Manual) + +## Description + +Shared access signature (SAS) tokens provide restricted access to Azure Storage resources (such as blobs, files, queues, or tables) for a defined time period with specific permissions. It enables users to interact with the resources without exposing account keys, offering precise control over the permitted actions (e.g., read, write) and the duration of access. To minimize security risks, SAS tokens should be configured with the shortest possible lifespan, ideally lasting no longer than an hour. + +## Rationale + +A short lifespan for SAS tokens is recommended to minimize the risk of unauthorized access. SAS tokens grant time-limited access to resources, and a longer duration increases the opportunity for misuse if the token is compromised. By setting a shorter lifespan, the potential for security breaches is reduced. + +## Impact + +SAS can pose security risks if they are not managed carefully. + +## Audit Procedure + +Currently, SAS token expiration times cannot be audited. Until Microsoft makes the token expiration time a setting rather than a token creation parameter, this recommendation will require manual verification. + +## Expected Result + +All SAS tokens are generated with an expiration time of one hour or less. + +## Remediation + +### Remediate from Azure Portal + +If SAS have been created without a short lifespan and were created with a stored access policy (SAP), the SAS can be revoked by deleting the SAP or updating the SAP expiration time to a time in the past: + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data storage`, click `Containers`. +4. Click the three dots next to a listed item. +5. Click `Access policy`. +6. Click the three dots next to an access policy. +7. Click `Delete`. +8. Click `Save`. +9. Repeat steps 1-8 as needed to revoke SAS created with SAP. + +If SAS have been created without a short lifespan and were not created with a SAP, the SAS can be revoked by regenerating the storage account access keys: + +Note: Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Security + networking`, click `Access keys`. +4. Next to each key, click `Rotate key`. +5. Click `Yes` to confirm. +6. Repeat steps 1-5 as needed to revoke SAS. + +## Default Value + +By default, expiration for shared access signature is set to 8 hours. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview +2. https://docs.microsoft.com/en-us/rest/api/storageservices/delegating-access-with-a-shared-access-signature + +## Additional Information + +This recommendation is based on the recommendation `Ensure that shared access signature (SAS) tokens expire within an hour`, from the `Common Reference Recommendations` > `Secrets and Keys` > `Shared Access Signatures` section. + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.3/SKILL.md new file mode 100644 index 0000000000..86c7569271 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.3/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-azure-storage-11.3 +description: "Ensure that soft delete for blobs on Azure Blob Storage storage accounts is Enabled" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, blob-storage, soft-delete] +cis_id: "11.3" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 11.3 Ensure that soft delete for blobs on Azure Blob Storage storage accounts is Enabled (Automated) + +## Description + +Blobs in Azure storage accounts may contain sensitive or personal data, such as ePHI or financial information. Data that is erroneously modified or deleted by an application or a user can lead to data loss or unavailability. + +It is recommended that soft delete be enabled on Azure storage accounts with blob storage to allow for the preservation and recovery of data when blobs or blob snapshots are deleted. + +## Rationale + +Blobs can be deleted incorrectly. An attacker or malicious user may do this deliberately in order to cause disruption. Deleting an Azure storage blob results in immediate data loss. Enabling this configuration for Azure storage accounts ensures that even if blobs are deleted from the storage account, the blobs are recoverable for a specific period of time, which is defined in the "Retention policies," ranging from 7 to 365 days. + +## Impact + +All soft-deleted data is billed at the same rate as active data. Additional costs may be incurred for deleted blobs until the soft delete period ends and the data is permanently removed. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each Storage Account with blob storage, under `Data management`, go to `Data protection`. +3. Ensure that `Enable soft delete for blobs` is checked. +4. Ensure that the retention period is a sufficient length for your organization. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +Run the following command to determine if a storage account has containers: + +```bash +az storage container list --account-name +``` + +For each storage account with containers, ensure that the output of the below command contains `"enabled": true` and `days` is not `null`: + +```bash +az storage blob service-properties delete-policy show --account-name +``` + +## Expected Result + +`enabled` is `true` and `days` is set to a value between 7 and 365, inclusive, appropriate for the organization. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each Storage Account with blob storage, under `Data management`, go to `Data protection`. +3. Check the box next to `Enable soft delete for blobs`. +4. Set the retention period to a sufficient length for your organization. +5. Click `Save`. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to enable soft delete for blobs: + +```bash +az storage blob service-properties delete-policy update --days-retained --account-name --enable true +``` + +## Default Value + +Soft delete for blob storage is enabled by default on storage accounts created via the Azure Portal, and disabled by default on storage accounts created via Azure CLI or PowerShell. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/soft-delete-blob-overview + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.4/SKILL.md new file mode 100644 index 0000000000..36a55038fb --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.4/SKILL.md @@ -0,0 +1,91 @@ +--- +name: cis-azure-storage-11.4 +description: "Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, blob-storage, sas] +cis_id: "11.4" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 11.4 Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens (Manual) + +## Description + +Use stored access policies (SAP) when generating shared access signature (SAS) tokens in Azure to centrally manage permissions, expiration, and revocation settings for resource access. Stored access policies can be applied to blob containers, file shares, queues, and tables. + +## Rationale + +Stored access policies provide centralized control over SAS token access, allowing administrators to update permissions or revoke access. This approach strengthens security by reducing the risk of unauthorized access to storage resources. + +## Impact + +There is no cost for creating stored access policies, however there is some administrative overhead involved in managing these policies. + +## Audit Procedure + +It is not currently possible to retrieve a list of all generated SAS tokens to check if they were associated with a SAP during creation. + +An SAS token that has been created with a SAP will contain an `si` parameter that references the stored access policy identifier associated with the SAS, e.g. `si=`. + +The `si` parameter will be absent from an SAS token created without a SAP. + +## Expected Result + +All SAS tokens contain an `si` parameter referencing a stored access policy identifier. + +## Remediation + +### Remediate from Azure Portal + +To create a SAP for a blob container: + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data storage`, click `Containers`. +4. Click the name of a container. +5. Under `Settings`, click `Access policy`. +6. Under `Stored access policies`, click `+ Add policy`. +7. Enter an `Identifier`. +8. From the `Permissions` drop-down, select appropriate permissions for the policy. +9. Set an appropriate `Start time` for the policy. +10. Set an appropriate `Expiry time` for the policy. +11. Click `OK`. +12. Click `Save`. +13. Repeat steps 1-12 as needed to create SAP. + +When generating SAS, select a SAP from the `Stored access policy` drop-down. + +If SAS have been created without a SAP, the SAS can be revoked by regenerating the storage account access keys: + +Note: Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Security + networking`, click `Access keys`. +4. Next to each key, click `Rotate key`. +5. Click `Yes` to confirm. +6. Repeat steps 1-5 as needed to revoke SAS. + +## Default Value + +By default, stored access policies are not associated with SAS. To use a stored access policy, it must be explicitly created and linked to the SAS at the time of creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview#best-practices-when-using-sas +2. https://learn.microsoft.com/en-us/rest/api/storageservices/define-stored-access-policy + +## Additional Information + +This recommendation is based on the recommendation `Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens`, from the `Common Reference Recommendations` > `Secrets and Keys` > `Shared Access Signatures` section. + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.5/SKILL.md new file mode 100644 index 0000000000..83fbf32a4b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.5/SKILL.md @@ -0,0 +1,145 @@ +--- +name: cis-azure-storage-11.5 +description: "Ensure 'Versioning' is set to 'Enabled' on Azure Blob Storage storage accounts" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, blob-storage, versioning] +cis_id: "11.5" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 11.5 Ensure 'Versioning' is set to 'Enabled' on Azure Blob Storage storage accounts (Automated) + +## Description + +Enabling blob versioning allows for the automatic retention of previous versions of objects. With blob versioning enabled, earlier versions of a blob are accessible for data recovery in the event of modifications or deletions. + +## Rationale + +Blob versioning safeguards data integrity and enables recovery by retaining previous versions of stored objects, facilitating quick restoration from accidental deletion, modification, or malicious activity. + +## Impact + +Enabling blob versioning for a storage account creates a new version with each write operation to a blob, which can increase storage costs. To control these costs, a lifecycle management policy can be applied to automatically delete older versions. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account with blob storage. +3. In the `Overview` page, on the `Properties` tab, under `Blob service`, ensure `Versioning` is set to `Enabled`. +4. Repeat steps 1-3 for each storage account with blob storage. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +Run the following command to determine if a storage account has containers: + +```bash +az container list --account-name +``` + +For each storage account with containers, ensure that the output of the below command contains `"isVersioningEnabled": true`: + +```bash +az storage account blob-service-properties show --account-name +``` + +### Audit from PowerShell + +Run the following command to list storage accounts: + +```powershell +Get-AzStorageAccount +``` + +Run the following command to create an Azure Storage context for a storage account: + +```powershell +$context = New-AzStorageContext -StorageAccountName +``` + +Run the following command to list containers for the storage account: + +```powershell +Get-AzStorageContainer -Context $context +``` + +If the storage account has containers, run the following command to get the blob service properties of the storage account: + +```powershell +$account = Get-AzStorageBlobServiceProperty -ResourceGroupName -AccountName +``` + +Run the following command to get the blob versioning setting for the storage account: + +```powershell +$account.IsVersioningEnabled +``` + +Ensure that the command returns `True`. Repeat for each storage account. + +## Expected Result + +`isVersioningEnabled` is `true` for all storage accounts with blob storage. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account with blob storage. +3. In the `Overview` page, on the `Properties` tab, under `Blob service`, click `Disabled` next to `Versioning`. +4. Under `Tracking`, check the box next to `Enable versioning for blobs`. +5. Select the radio button next to `Keep all versions` or `Delete versions after (in days)`. +6. If selecting to delete versions, enter a number of in the box after which to delete blob versions. +7. Click `Save`. +8. Repeat steps 1-7 for each storage account with blob storage. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to enable blob versioning: + +```bash +az storage account blob-service-properties update --account-name --enable-versioning true +``` + +### Remediate from PowerShell + +For each storage account requiring remediation, run the following command to enable blob versioning: + +```powershell +Update-AzStorageBlobServiceProperty -ResourceGroupName -StorageAccountName -IsVersioningEnabled $true +``` + +## Default Value + +Blob versioning is disabled by default on storage accounts. + +## References + +1. https://learn.microsoft.com/en-us/cli/azure/storage/account +2. https://learn.microsoft.com/en-us/cli/azure/storage/account/blob-service-properties +3. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstorageaccount +4. https://learn.microsoft.com/en-us/powershell/module/az.storage/new-azstoragecontext +5. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstoragecontainer +6. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstorageblobserviceproperty +7. https://learn.microsoft.com/en-us/powershell/module/az.storage/update-azstorageblobserviceproperty +8. https://learn.microsoft.com/en-us/azure/storage/blobs/versioning-overview +9. https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.6/SKILL.md new file mode 100644 index 0000000000..5048738bb1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-11.6/SKILL.md @@ -0,0 +1,107 @@ +--- +name: cis-azure-storage-11.6 +description: "Ensure locked immutability policies are used for containers storing business-critical blob data" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, blob-storage, immutability] +cis_id: "11.6" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 11.6 Ensure locked immutability policies are used for containers storing business-critical blob data (Automated) + +## Description + +Require locked immutability policies for all containers that store business-critical blob data. This measure protects the data from modifications or deletions, ensuring that critical information remains intact and unaltered, regardless of user actions or access permissions. + +## Rationale + +Implementing a locked immutability policy creates a Write Once, Read Many (WORM) storage model that safeguards critical data from accidental or malicious changes and deletions. Enforcing immutability minimizes data loss and tampering risks, enhancing data security and supporting regulatory requirements for data retention and integrity. + +## Impact + +Enforcing locked immutability policies for blob storage may increase long-term retention costs and require additional administrative effort for policy management. + +Once the policy is locked, the container cannot be deleted or edited, and the storage account cannot be deleted until the retention period has elapsed. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account. +3. Under `Data storage`, click `Containers`. +4. Click the three dots next to a container. +5. Click `Access policy`. +6. Ensure a locked policy is listed under `Immutable blob storage`. +7. Repeat steps 1-6 for each blob container with business-critical blob data. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +Run the following command to determine if a storage account has containers: + +```bash +az storage container list --account-name +``` + +For each container, run the following command to view immutability policies: + +```bash +az storage container immutability-policy show --account-name --container +``` + +Ensure that an immutability policy is listed with `"state": "Locked"` for each blob container with business-critical blob data. + +## Expected Result + +An immutability policy with `"state": "Locked"` exists for each blob container storing business-critical data. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. Click the name of a storage account. +3. Under `Data storage`, click `Containers`. +4. Click the three dots next to a container. +5. Click `Access policy`. +6. Under `Immutable blob storage`, click `+ Add policy`. +7. From the `Policy type` drop-down, select `Legal hold` or `Time-based retention`. +8. If selecting legal hold: + 1. Provide at least one tag for the policy. + 2. Under `Allow protected append writes to`, select `None` or `Block and append blobs`. +9. If selecting time-based retention: + 1. Under `Set retention period for`, enter a number of days for retention. + 2. Check the box next to `Enable version-level immutability` if appropriate. Versioning must be enabled for this option to be available. + 3. Under `Allow protected append writes to`, select `None`, `Append blobs`, or `Block and append blobs`. +10. Click `Save`. +11. Click the three dots next to the policy. +12. Click `Lock policy`. +13. Enter `yes` to confirm. +14. Click `OK`. +15. Repeat steps 1-14 for each blob container requiring remediation. + +## Default Value + +By default, no immutability policies are configured on blob containers. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/immutable-storage-overview +2. https://learn.microsoft.com/en-us/cli/azure/storage/container/immutability-policy + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-12.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-12.1/SKILL.md new file mode 100644 index 0000000000..c33f698a1a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-12.1/SKILL.md @@ -0,0 +1,72 @@ +--- +name: cis-azure-storage-12.1 +description: "Ensure double encryption is used for Azure Data Box in high-security environments" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, data-box, encryption] +cis_id: "12.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 12.1 Ensure double encryption is used for Azure Data Box in high-security environments (Manual) + +## Description + +Enabling double encryption on Azure Data Box applies an additional layer of encryption to safeguard data during physical transfer. This approach enhances confidentiality and integrity, ensuring that sensitive information remains secure against unauthorized access if the device is lost, stolen, or intercepted. + +## Rationale + +Double encryption ensures strong security for high-risk or regulated environments where data protection is critical. It enhances defense-in-depth and minimizes the risk of exposure, even during physical compromise in transit. + +## Impact + +Double encryption with Azure Data Box is available at no additional cost; however, enabling it may increase order processing and data copy times. + +## Audit Procedure + +### Audit from Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. +If referencing a printed copy, you can search Policy IDs from this URL: +https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- Policy ID: `c349d81b-9985-44ae-a8da-ff98d108ede8` +- Name: 'Azure Data Box jobs should enable double encryption for data at rest on the device' + +## Expected Result + +The Azure Policy for double encryption on Azure Data Box should be compliant, confirming that all Data Box orders have double encryption enabled for data at rest on the device. + +## Remediation + +### Remediate from Azure Portal + +When creating a new Azure Data Box order, on the **Security** page, under **Double encryption**, check the box next to `Enable double encryption for the order`. + +## Default Value + +Double encryption is disabled by default on Azure Data Box orders. + +## References + +1. https://learn.microsoft.com/en-us/azure/security/fundamentals/double-encryption +2. https://learn.microsoft.com/en-us/azure/databox/data-box-security +3. https://learn.microsoft.com/en-us/azure/databox/data-box-deploy-ordered +4. https://learn.microsoft.com/en-us/powershell/module/az.databox/update-azdataboxjob + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **3.11 Encrypt Sensitive Data at Rest** - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data. | | X | X | +| v7 | **14.8 Encrypt Sensitive Information at Rest** - Encrypt all sensitive information at rest using a tool that requires a secondary authentication mechanism not integrated into the operating system, in order to access the information. | | | X | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-15.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-15.1/SKILL.md new file mode 100644 index 0000000000..042b0689b6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-15.1/SKILL.md @@ -0,0 +1,130 @@ +--- +name: cis-azure-storage-15.1 +description: "Ensure 'Public network access' is set to 'Disabled' on Azure Elastic SAN" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, elastic-san, networking] +cis_id: "15.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 15.1 Ensure 'Public network access' is set to 'Disabled' on Azure Elastic SAN (Automated) + +## Description + +Azure Elastic SAN is a scalable, high-performance cloud-based storage solution. Disabling public network access at the SAN level ensures that Elastic SAN resources are accessible only through private networks. + +## Rationale + +Disabling public network access for Azure Elastic SAN at the SAN level enhances security by preventing unauthorized external access to sensitive storage resources. + +## Impact + +Disabling public network access at the SAN level incurs no direct cost. However, there may be costs and configuration overhead associated with setting up and managing private network access to securely connect to Azure Elastic SAN resources. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Elastic SANs`. +2. Click the name of an Elastic SAN. +3. Under `Settings`, click `Networking`. +4. Ensure that `Public network access` is set to `Disabled`. +5. Repeat steps 1-4 for each Elastic SAN. + +### Audit from Azure CLI + +Run the following command to list Elastic SANs: + +```bash +az elastic-san list +``` + +For each Elastic SAN, run the following command: + +```bash +az elastic-san show --resource-group --name +``` + +Ensure that `publicNetworkAccess` is set to `Disabled`. + +### Audit from PowerShell + +Run the following command to list Elastic SANs: + +```powershell +Get-AzElasticSan +``` + +Run the following command to get the Elastic SAN in a resource group with a given name: + +```powershell +$elasticsan = Get-AzElasticSan -ResourceGroupName -Name +``` + +Run the following command to get the public network access setting for the Elastic SAN: + +```powershell +$elasticsan.PublicNetworkAccess +``` + +Ensure that the command returns `Disabled`. + +## Expected Result + +For each Elastic SAN, `publicNetworkAccess` (CLI) or `PublicNetworkAccess` (PowerShell) should return `Disabled`. In the Azure Portal, the `Public network access` setting under `Networking` should be set to `Disabled`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Elastic SANs`. +2. Click the name of an Elastic SAN. +3. Under `Settings`, click `Networking`. +4. Under `Public network access`, click the radio button next to `Disabled`. +5. Click `Apply`. +6. Repeat steps 1-5 for each Elastic SAN. + +### Remediate from Azure CLI + +For each Elastic SAN requiring remediation, run the following command to disable public network access: + +```bash +az elastic-san update --resource-group --name --public-network-access Disabled +``` + +### Remediate from PowerShell + +For each Elastic SAN requiring remediation, run the following command to disable public network access: + +```powershell +Update-AzElasticSan -ResourceGroupName -Name -PublicNetworkAccess Disabled +``` + +## Default Value + +Public network access at the SAN level is enabled by default, but access to individual volume groups is denied unless explicitly configured. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/elastic-san/elastic-san-networking +2. https://learn.microsoft.com/en-us/cli/azure/elastic-san +3. https://learn.microsoft.com/en-us/powershell/module/az.elasticsan/get-azelasticsan +4. https://learn.microsoft.com/en-us/powershell/module/az.elasticsan/update-azelasticsan + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **3.3 Configure Data Access Control Lists** - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | X | X | X | +| v7 | **14.6 Protect Information through Access Control Lists** - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | X | X | X | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-15.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-15.2/SKILL.md new file mode 100644 index 0000000000..6f88ce3721 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-15.2/SKILL.md @@ -0,0 +1,149 @@ +--- +name: cis-azure-storage-15.2 +description: "Ensure customer-managed keys (CMK) are used to encrypt data at rest on Azure Elastic SAN volume groups" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, elastic-san, encryption, cmk] +cis_id: "15.2" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 15.2 Ensure customer-managed keys (CMK) are used to encrypt data at rest on Azure Elastic SAN volume groups (Automated) + +## Description + +Azure Elastic SAN volume groups offer two encryption options: Microsoft-managed keys, which provide automatic encryption without user intervention, and customer-managed keys (CMK), which allow organizations to retain full control over their encryption keys for enhanced security and compliance. + +## Rationale + +Using customer-managed keys (CMKs) to encrypt Azure Elastic SAN volume groups enhances security by granting organizations complete control over their encryption keys. + +## Impact + +There are costs and configuration overhead associated with setting up and managing customer-managed keys. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Elastic SANs`. +2. Click the name of an Elastic SAN. +3. Under `SAN Management`, click `Volume groups`. +4. For each volume group, ensure that the value in the `Encryption type` column is not `Platform-managed key`. + +### Audit from Azure CLI + +Run the following command to list Elastic SANs: + +```bash +az elastic-san list +``` + +For each Elastic SAN with a `volumeGroupCount` greater than 0, run the following command to list volume groups: + +```bash +az elastic-san volume-group list --resource-group --elastic-san +``` + +Ensure that for each volume group, `encryption` is set to `EncryptionAtRestWithCustomerManagedKey`. + +### Audit from PowerShell + +Run the following command to list Elastic SANs: + +```powershell +Get-AzElasticSan +``` + +For each Elastic SAN with a `VolumeGroupCount` greater than 0, run the following command to list volume groups: + +```powershell +Get-AzElasticSanVolumeGroup -ResourceGroupName -ElasticSanName +``` + +Ensure that for each volume group, `Encryption` is set to `EncryptionAtRestWithCustomerManagedKey`. + +### Audit from Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. +If referencing a printed copy, you can search Policy IDs from this URL: +https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- Policy ID: `7698f4ed-80ce-4e13-b408-ee135fa400a5` +- Name: 'ElasticSan Volume Group should use customer-managed keys to encrypt data at rest' + +## Expected Result + +For each volume group in every Elastic SAN, the `encryption` (CLI) or `Encryption` (PowerShell) property should be set to `EncryptionAtRestWithCustomerManagedKey`. In the Azure Portal, the `Encryption type` column should not show `Platform-managed key`. + +## Remediation + +### Remediate from Azure Portal + +It is not currently possible to remediate from Azure Portal. Refer to the Remediate from Azure CLI and Remediate from PowerShell sections for remediation options. + +### Remediate from Azure CLI + +For each volume group requiring remediation, run the following command to assign an identity: + +```bash +az elastic-san volume-group update --resource-group --elastic-san --volume-group --identity "{type:SystemAssigned}" +``` + +Note: Use `--identity '{type:UserAssigned,user-assigned-identity:""}'` with the above command to provide a UserAssigned Identity Id. + +For each volume group requiring remediation, run the following command to assign a customer-managed encryption key: + +```bash +az elastic-san volume-group update --resource-group --elastic-san --volume-group --encryption EncryptionAtRestWithCustomerManagedKey --encryption-properties "{key-vault-properties:{key-name:'',key-vault-uri:''}}" +``` + +### Remediate from PowerShell + +For each volume group requiring remediation, run the following command to assign an identity: + +```powershell +Update-AzElasticSanVolumeGroup -ResourceGroupName -ElasticSanName -VolumeGroupName -IdentityType SystemAssigned +``` + +Note: Use `-IdentityType UserAssigned -IdentityUserAssignedIdentityId ` with the above command to provide a UserAssigned Identity Id. + +For each volume group requiring remediation, run the following command to assign a customer-managed encryption key: + +```powershell +Update-AzElasticSanVolumeGroup -ResourceGroupName -ElasticSanName -VolumeGroupName -Encryption EncryptionAtRestWithCustomerManagedKey -KeyName -KeyVaultUri +``` + +## Default Value + +By default, Azure Elastic SAN volume groups are encrypted using Microsoft-managed keys. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/elastic-san/elastic-san-configure-customer-managed-keys +2. https://learn.microsoft.com/en-us/cli/azure/elastic-san/volume-group +3. https://learn.microsoft.com/en-us/powershell/module/az.elasticsan/get-azelasticsanvolumegroup +4. https://learn.microsoft.com/en-us/powershell/module/az.elasticsan/update-azelasticsanvolumegroup +5. https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities + +## Additional Information + +- To enable encryption, it is necessary to grant the volume group the appropriate permissions to access the encryption key in the key vault. The key can be modified as needed. Refer to the following guide for details: https://learn.microsoft.com/en-us/azure/storage/elastic-san/elastic-san-configure-customer-managed-keys?#configure-the-key-vault. +- Azure Elastic SAN uses system-assigned managed identities and user-assigned managed identities to authenticate the volume groups to access encryption keys stored in Azure Key Vault. Refer to the following guide for details: https://learn.microsoft.com/en-us/azure/storage/elastic-san/elastic-san-configure-customer-managed-keys#choose-a-managed-identity-to-authorize-access-to-the-key-vault. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **3.11 Encrypt Sensitive Data at Rest** - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data. | | X | X | +| v7 | **14.8 Encrypt Sensitive Information at Rest** - Encrypt all sensitive information at rest using a tool that requires a secondary authentication mechanism not integrated into the operating system, in order to access the information. | | | X | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-16.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-16.1/SKILL.md new file mode 100644 index 0000000000..173167c4e1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-16.1/SKILL.md @@ -0,0 +1,88 @@ +--- +name: cis-azure-storage-16.1 +description: "Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only'" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, queue-storage, sas] +cis_id: "16.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 16.1 Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only' (Manual) + +## Description + +Shared access signatures (SAS) can be used to grant limited access to Azure Storage resources. When generating a SAS, it is possible to specify the allowed protocols for a request made with the SAS. It is recommended to allow requests over HTTPS only. + +## Rationale + +If a SAS is passed over HTTP and intercepted, an attacker performing a man-in-the-middle attack can read the SAS. Then, they can use that SAS just as the intended user could have. This can potentially compromise sensitive data or allow for data corruption by the malicious user. + +## Impact + +SAS can pose security risks if they are not managed carefully. + +## Audit Procedure + +It is not possible to audit generated SAS. + +## Expected Result + +All shared access signature (SAS) tokens should be configured to allow only HTTPS protocol requests. The `Allowed protocols` setting should be set to `HTTPS only` when generating SAS tokens. + +## Remediation + +### Remediate from Azure Portal + +If SAS have been created to allow HTTP and were created with a stored access policy (SAP), the SAS can be revoked by deleting the SAP or updating the SAP expiration time to a time in the past: + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data storage`, click `Queues`. +4. Click the three dots next to a queue. +5. Click `Access policy`. +6. Click the three dots next to an access policy. +7. Click `Delete`. +8. Click `Save`. +9. Repeat steps 1-8 as needed to revoke SAS created with SAP. + +If SAS have been created to allow HTTP and were not created with a SAP, the SAS can be revoked by regenerating the storage account access keys: + +Note: Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Security + networking`, click `Access keys`. +4. Next to each key, click `Rotate key`. +5. Click `Yes` to confirm. +6. Repeat steps 1-5 as needed to revoke SAS. + +## Default Value + +When generating a SAS, the default selection for `Allowed protocols` is `HTTPS only`. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview +2. https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage + +## Additional Information + +This recommendation is based on the recommendation `Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only'`, from the `Common Reference Recommendations > Secrets and Keys > Shared Access Signatures` section. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | **3.10 Encrypt Sensitive Data in Transit** - Encrypt sensitive data in transit. Example implementations can include: Transport Layer Security (TLS) and Open Secure Shell (OpenSSH). | | X | X | +| v7 | **14.4 Encrypt All Sensitive Information in Transit** - Encrypt all sensitive information in transit. | | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-16.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-16.2/SKILL.md new file mode 100644 index 0000000000..aaac78384f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-16.2/SKILL.md @@ -0,0 +1,88 @@ +--- +name: cis-azure-storage-16.2 +description: "Ensure that shared access signature (SAS) tokens expire within an hour" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, queue-storage, sas] +cis_id: "16.2" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 16.2 Ensure that shared access signature (SAS) tokens expire within an hour (Manual) + +## Description + +Shared access signature (SAS) tokens provide restricted access to Azure Storage resources (such as blobs, files, queues, or tables) for a defined time period with specific permissions. It enables users to interact with the resources without exposing account keys, offering precise control over the permitted actions (e.g., read, write) and the duration of access. To minimize security risks, SAS tokens should be configured with the shortest possible lifespan, ideally lasting no longer than an hour. + +## Rationale + +A short lifespan for SAS tokens is recommended to minimize the risk of unauthorized access. SAS tokens grant time-limited access to resources, and a longer duration increases the opportunity for misuse if the token is compromised. By setting a shorter lifespan, the potential for security breaches is reduced. + +## Impact + +SAS can pose security risks if they are not managed carefully. + +## Audit Procedure + +Currently, SAS token expiration times cannot be audited. Until Microsoft makes the token expiration time a setting rather than a token creation parameter, this recommendation will require manual verification. + +## Expected Result + +All shared access signature (SAS) tokens should be configured with an expiration time of one hour or less from the time of creation. + +## Remediation + +### Remediate from Azure Portal + +If SAS have been created without a short lifespan and were created with a stored access policy (SAP), the SAS can be revoked by deleting the SAP or updating the SAP expiration time to a time in the past: + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data storage`, click `Queues`. +4. Click the three dots next to a listed item. +5. Click `Access policy`. +6. Click the three dots next to an access policy. +7. Click `Delete`. +8. Click `Save`. +9. Repeat steps 1-8 as needed to revoke SAS created with SAP. + +If SAS have been created without a short lifespan and were not created with a SAP, the SAS can be revoked by regenerating the storage account access keys: + +Note: Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Security + networking`, click `Access keys`. +4. Next to each key, click `Rotate key`. +5. Click `Yes` to confirm. +6. Repeat steps 1-5 as needed to revoke SAS. + +## Default Value + +By default, expiration for shared access signature is set to 8 hours. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview +2. https://docs.microsoft.com/en-us/rest/api/storageservices/delegating-access-with-a-shared-access-signature + +## Additional Information + +This recommendation is based on the recommendation `Ensure that shared access signature (SAS) tokens expire within an hour`, from the `Common Reference Recommendations > Secrets and Keys > Shared Access Signatures` section. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **6.2 Establish an Access Revoking Process** - Establish and follow a process, preferably automated, for revoking access to enterprise assets, through disabling accounts immediately upon termination, rights revocation, or role change of a user. Disabling accounts, instead of deleting accounts, may be necessary to preserve audit trails. | X | X | X | +| v7 | **16.7 Establish Process for Revoking Access** - Establish and follow an automated process for revoking system access by disabling accounts immediately upon termination or change of responsibilities of an employee or contractor. Disabling these accounts, instead of deleting accounts, allows preservation of audit trails. | | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-16.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-16.3/SKILL.md new file mode 100644 index 0000000000..89eeaf210e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-16.3/SKILL.md @@ -0,0 +1,98 @@ +--- +name: cis-azure-storage-16.3 +description: "Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, queue-storage, sas] +cis_id: "16.3" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 16.3 Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens (Manual) + +## Description + +Use stored access policies (SAP) when generating shared access signature (SAS) tokens in Azure to centrally manage permissions, expiration, and revocation settings for resource access. Stored access policies can be applied to blob containers, file shares, queues, and tables. + +## Rationale + +Stored access policies provide centralized control over SAS token access, allowing administrators to update permissions or revoke access. This approach strengthens security by reducing the risk of unauthorized access to storage resources. + +## Impact + +There is no cost for creating stored access policies, however there is some administrative overhead involved in managing these policies. + +## Audit Procedure + +It is not currently possible to retrieve a list of all generated SAS tokens to check if they were associated with a SAP during creation. + +An SAS token that has been created with a SAP will contain an `si` parameter that references the stored access policy identifier associated with the SAS, e.g. `si=`. + +The `si` parameter will be absent from an SAS token created without a SAP. + +## Expected Result + +All shared access signature (SAS) tokens should contain the `si` parameter referencing a stored access policy identifier. SAS tokens without the `si` parameter indicate they were created without a stored access policy, which is non-compliant. + +## Remediation + +### Remediate from Azure Portal + +To create a SAP for a queue: + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data storage`, click `Queues`. +4. Click the name of a queue. +5. Under `Settings`, click `Access policy`. +6. Under `Stored access policies`, click `+ Add policy`. +7. Enter an `Identifier`. +8. From the `Permissions` drop-down, select appropriate permissions for the policy. +9. Set an appropriate `Start time` for the policy. +10. Set an appropriate `Expiry time` for the policy. +11. Click `OK`. +12. Click `Save`. +13. Repeat steps 1-12 as needed to create SAP. + +When generating SAS, select a SAP from the `Stored access policy` drop-down. + +If SAS have been created without a SAP, the SAS can be revoked by regenerating the storage account access keys: + +Note: Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Security + networking`, click `Access keys`. +4. Next to each key, click `Rotate key`. +5. Click `Yes` to confirm. +6. Repeat steps 1-5 as needed to revoke SAS. + +## Default Value + +By default, stored access policies are not associated with SAS. To use a stored access policy, it must be explicitly created and linked to the SAS at the time of creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview#best-practices-when-using-sas +2. https://learn.microsoft.com/en-us/rest/api/storageservices/define-stored-access-policy + +## Additional Information + +This recommendation is based on the recommendation `Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens`, from the `Common Reference Recommendations > Secrets and Keys > Shared Access Signatures` section. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | **3.3 Configure Data Access Control Lists** - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | X | X | X | +| v7 | **14.6 Protect Information through Access Control Lists** - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | X | X | X | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.1/SKILL.md new file mode 100644 index 0000000000..dcf58efdad --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.1/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-azure-storage-17.1.1 +description: "Ensure that 'Enable key rotation reminders' is enabled for each Storage Account" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, keys, key-rotation] +cis_id: "17.1.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.1.1 Ensure that 'Enable key rotation reminders' is enabled for each Storage Account (Manual) + +## Description + +Access Keys authenticate application access requests to data contained in Storage Accounts. A periodic rotation of these keys is recommended to ensure that potentially compromised keys cannot result in a long-term exploitable credential. The "Rotation Reminder" is an automatic reminder feature for a manual procedure. + +## Rationale + +Reminders such as those generated by this recommendation will help maintain a regular and healthy cadence for activities which improve the overall efficacy of a security program. + +Cryptographic key rotation periods will vary depending on your organization's security requirements and the type of data which is being stored in the Storage Account. For example, PCI DSS mandates that cryptographic keys be replaced or rotated 'regularly,' and advises that keys for static data stores be rotated every 'few months.' + +For the purposes of this recommendation, 90 days will prescribed for the reminder. Review and adjustment of the 90 day period is recommended, and may even be necessary. Your organization's security requirements should dictate the appropriate setting. + +## Impact + +This recommendation only creates a periodic reminder to regenerate access keys. Regenerating access keys can affect services in Azure as well as the organization's applications that are dependent on the storage account. All clients that use the access key to access the storage account must be updated to use the new key. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts` +2. For each Storage Account, under `Security + networking`, go to `Access keys` +3. If the button `Edit rotation reminder` is displayed, the Storage Account is compliant. Click `Edit rotation reminder` and review the `Remind me every` field for a desirable periodic setting that fits your security program's needs. If the button `Set rotation reminder` is displayed, the Storage Account is not compliant. + +### Audit from PowerShell + +```powershell +$rgName = +$accountName = +$account = Get-AzStorageAccount -ResourceGroupName $rgName -Name $accountName + +Write-Output $accountName -> +Write-Output "Expiration Reminder set to: +$($account.KeyPolicy.KeyExpirationPeriodInDays) Days" +Write-Output "Key1 Last Rotated: +$($account.KeyCreationTime.Key1.ToShortDateString())" +Write-Output "Key2 Last Rotated: +$($account.KeyCreationTime.Key2.ToShortDateString())" +``` + +Key rotation is recommended if the creation date for any key is empty. If the reminder is set, the period in days will be returned. The recommended period is 90 days. + +## Expected Result + +The `Edit rotation reminder` button is displayed in the Azure Portal for each Storage Account, indicating that key rotation reminders are configured. The `Remind me every` field should be set to 90 days or less, depending on organizational security requirements. In PowerShell, `KeyExpirationPeriodInDays` should return a value of 90 or less. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts` +2. For each Storage Account that is not compliant, under `Security + networking`, go to `Access keys` +3. Click `Set rotation reminder` +4. Check `Enable key rotation reminders` +5. In the `Send reminders` field select `Custom`, then set the `Remind me every` field to `90` and the period drop down to `Days` +6. Click `Save` + +### Remediate from PowerShell + +```powershell +$rgName = +$accountName = +$account = Get-AzStorageAccount -ResourceGroupName $rgName -Name $accountName +if ($account.KeyCreationTime.Key1 -eq $null -or $account.KeyCreationTime.Key2 -eq $null){ + Write-output ("You must regenerate both keys at least once before setting expiration policy") +} else { + $account = Set-AzStorageAccount -ResourceGroupName $rgName -Name $accountName -KeyExpirationPeriodInDay 90 +} +$account.KeyPolicy.KeyExpirationPeriodInDays +``` + +## Default Value + +By default, Key rotation reminders is not configured. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-create-storage-account#regenerate-storage-access-keys +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-3-manage-application-identities-securely-and-automatically +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-8-restrict-the-exposure-of-credentials-and-secrets +6. https://www.pcidssguide.com/pci-dss-key-rotation-requirements/ +7. https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.2/SKILL.md new file mode 100644 index 0000000000..ae77302c51 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.2/SKILL.md @@ -0,0 +1,88 @@ +--- +name: cis-azure-storage-17.1.2 +description: "Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only'" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, sas, encryption] +cis_id: "17.1.2" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.1.2 Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only' (Manual) + +## Description + +Shared access signatures (SAS) can be used to grant limited access to Azure Storage resources. When generating a SAS, it is possible to specify the allowed protocols for a request made with the SAS. It is recommended to allow requests over HTTPS only. + +## Rationale + +If a SAS is passed over HTTP and intercepted, an attacker performing a man-in-the-middle attack can read the SAS. Then, they can use that SAS just as the intended user could have. This can potentially compromise sensitive data or allow for data corruption by the malicious user. + +## Impact + +SAS can pose security risks if they are not managed carefully. + +## Audit Procedure + +It is not possible to audit generated SAS tokens, but Azure Policy can be used to generally audit the existence of configured SAS policy. + +### Audit from Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- Policy ID: `bc1b984e-ddae-40cc-801a-050a030e4fbe` +- Name: 'Storage accounts should have shared access signature (SAS) policies configured' + +## Expected Result + +All SAS tokens are generated with `Allowed protocols` set to `HTTPS only`. The Azure Policy 'Storage accounts should have shared access signature (SAS) policies configured' shows compliant for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +If SAS have been created to allow HTTP and were created with a stored access policy (SAP), the SAS can be revoked by deleting the SAP or updating the SAP expiration time to a time in the past: + +1. Go to `Storage accounts` +2. Click on a storage account. +3. Under `Data storage`, click `Containers`, `File shares`, `Queues`, or `Tables`. +4. Click the three dots next to a listed item. +5. Click `Access policy`. +6. Click the three dots next to an access policy. +7. Click `Delete`. +8. Click `Save`. +9. Repeat steps 1-8 as needed to revoke SAS created with SAP. + +If SAS have been created to allow HTTP and were not created with a SAP, the SAS can be revoked by regenerating the storage account access keys: + +Note: Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Security + networking`, click `Access keys`. +4. Next to each key, click `Rotate key`. +5. Click `Yes` to confirm. +6. Repeat steps 1-5 as needed to revoke SAS. + +## Default Value + +When generating a SAS, the default selection for `Allowed protocols` is `HTTPS only`. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview +2. https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage + +## Additional Information + +This recommendation is based on the recommendation `Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only'`, from the `Common Reference Recommendations > Secrets and Keys > Shared Access Signatures` section. + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.3/SKILL.md new file mode 100644 index 0000000000..aa339d23d1 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.3/SKILL.md @@ -0,0 +1,103 @@ +--- +name: cis-azure-storage-17.1.3 +description: "Ensure that Storage Account Access Keys are Periodically Regenerated" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, keys, key-rotation] +cis_id: "17.1.3" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.1.3 Ensure that Storage Account Access Keys are Periodically Regenerated (Manual) + +## Description + +For increased security, regenerate storage account access keys periodically. + +## Rationale + +When a storage account is created, Azure generates two 512-bit storage access keys which are used for authentication when the storage account is accessed. Rotating these keys periodically ensures that any inadvertent access or exposure does not result from the compromise of these keys. + +Cryptographic key rotation periods will vary depending on your organization's security requirements and the type of data which is being stored in the Storage Account. For example, PCI DSS mandates that cryptographic keys be replaced or rotated 'regularly,' and advises that keys for static data stores be rotated every 'few months.' + +For the purposes of this recommendation, 90 days will prescribed for the reminder. Review and adjustment of the 90 day period is recommended, and may even be necessary. Your organization's security requirements should dictate the appropriate setting. + +## Impact + +Regenerating access keys can affect services in Azure as well as the organization's applications that are dependent on the storage account. All clients who use the access key to access the storage account must be updated to use the new key. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each Storage Account, under `Security + networking`, go to `Access keys`. +3. Review the date and days in the `Last rotated` field for each key. + +If the `Last rotated` field indicates a number or days greater than 90 [or greater than your organization's period of validity], the key should be rotated. + +### Audit from Azure CLI + +1. Get a list of storage accounts + +```bash +az storage account list --subscription +``` + +Make a note of `id`, `name` and `resourceGroup`. + +2. For every storage account make sure that key is regenerated in past 90 days. + +```bash +az monitor activity-log list --namespace Microsoft.Storage --offset 90d --query "[?contains(authorization.action, 'regenerateKey')]" --resource-id +``` + +The output should contain: + +```json +"authorization"/"scope": AND "authorization"/"action": "Microsoft.Storage/storageAccounts/regeneratekey/action" AND "status"/"localizedValue": "Succeeded" "status"/"Value": "Succeeded" +``` + +### Audit from Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- Policy ID: `044985bb-afe1-42cd-8a36-9d5d42424537` +- Name: 'Storage account keys should not be expired' + +## Expected Result + +The `Last rotated` field for each access key shows a date within the last 90 days. The Azure CLI activity log contains successful `regenerateKey` actions within the last 90 days for each storage account. The Azure Policy 'Storage account keys should not be expired' shows compliant for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each Storage Account with outdated keys, under `Security + networking`, go to `Access keys`. +3. Click `Rotate key` next to the outdated key, then click `Yes` to the prompt confirming that you want to regenerate the access key. + +After Azure regenerates the Access Key, you can confirm that `Access keys` reflects a `Last rotated` date of `(0 days ago)`. + +## Default Value + +By default, access keys are not regenerated periodically. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-create-storage-account#regenerate-storage-access-keys +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-privileged-access#pa-1-separate-and-limit-highly-privilegedadministrative-users +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-identity-management#im-2-protect-identity-and-authentication-systems +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-6-define-and-implement-identity-and-privileged-access-strategy +5. https://www.pcidssguide.com/pci-dss-key-rotation-requirements/ +6. https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.4/SKILL.md new file mode 100644 index 0000000000..074c09be21 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.4/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-azure-storage-17.1.4 +description: "Ensure that shared access signature (SAS) tokens expire within an hour" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, sas, keys] +cis_id: "17.1.4" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.1.4 Ensure that shared access signature (SAS) tokens expire within an hour (Manual) + +## Description + +Shared access signature (SAS) tokens provide restricted access to Azure Storage resources (such as blobs, files, queues, or tables) for a defined time period with specific permissions. It enables users to interact with the resources without exposing account keys, offering precise control over the permitted actions (e.g., read, write) and the duration of access. To minimize security risks, SAS tokens should be configured with the shortest possible lifespan, ideally lasting no longer than an hour. + +## Rationale + +A short lifespan for SAS tokens is recommended to minimize the risk of unauthorized access. SAS tokens grant time-limited access to resources, and a longer duration increases the opportunity for misuse if the token is compromised. By setting a shorter lifespan, the potential for security breaches is reduced. + +## Impact + +SAS can pose security risks if they are not managed carefully. + +## Audit Procedure + +Currently, SAS token expiration times cannot be audited. Until Microsoft makes the token expiration time a setting rather than a token creation parameter, this recommendation will require manual verification. + +## Expected Result + +All SAS tokens are configured with an expiration time of one hour or less. Manual verification confirms that SAS token creation processes enforce a maximum expiration period of one hour. + +## Remediation + +### Remediate from Azure Portal + +If SAS have been created without a short lifespan and were created with a stored access policy (SAP), the SAS can be revoked by deleting the SAP or updating the SAP expiration time to a time in the past: + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data storage`, click `Containers`, `File shares`, `Queues`, or `Tables`. +4. Click the three dots next to a listed item. +5. Click `Access policy`. +6. Click the three dots next to an access policy. +7. Click `Delete`. +8. Click `Save`. +9. Repeat steps 1-8 as needed to revoke SAS created with SAP. + +If SAS have been created without a short lifespan and were not created with a SAP, the SAS can be revoked by regenerating the storage account access keys: + +Note: Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Security + networking`, click `Access keys`. +4. Next to each key, click `Rotate key`. +5. Click `Yes` to confirm. +6. Repeat steps 1-5 as needed to revoke SAS. + +## Default Value + +By default, expiration for shared access signature is set to 8 hours. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview +2. https://docs.microsoft.com/en-us/rest/api/storageservices/delegating-access-with-a-shared-access-signature + +## Additional Information + +This recommendation is based on the recommendation `Ensure that shared access signature (SAS) tokens expire within an hour`, from the `Common Reference Recommendations > Secrets and Keys > Shared Access Signatures` section. + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.5/SKILL.md new file mode 100644 index 0000000000..5e25867d81 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.5/SKILL.md @@ -0,0 +1,130 @@ +--- +name: cis-azure-storage-17.1.5 +description: "Ensure 'Allow storage account key access' for Azure Storage Accounts is 'Disabled'" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, keys, encryption] +cis_id: "17.1.5" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.1.5 Ensure 'Allow storage account key access' for Azure Storage Accounts is 'Disabled' (Automated) + +## Description + +Every secure request to an Azure Storage account must be authorized. By default, requests can be authorized with either Microsoft Entra credentials or by using the account access key for Shared Key authorization. + +## Rationale + +Microsoft Entra ID provides superior security and ease of use compared to Shared Key and is recommended by Microsoft. To require clients to use Microsoft Entra ID for authorizing requests, you can disallow requests to the storage account that are authorized with Shared Key. + +## Impact + +When you disallow Shared Key authorization for a storage account, any requests to the account that are authorized with Shared Key, including shared access signatures (SAS), will be denied. Client applications that currently access the storage account using the Shared Key will no longer function. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Settings`, click `Configuration`. +4. Under `Allow storage account key access`, ensure that the radio button next to `Disabled` is selected. +5. Repeat steps 1-4 for each storage account. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +For each storage account, run the following command: + +```bash +az storage account show --resource-group --name +``` + +Ensure that `allowSharedKeyAccess` is set to `false`. + +### Audit from PowerShell + +Run the following command to list storage accounts: + +```powershell +Get-AzStorageAccount +``` + +Run the following command to get the storage account in a resource group with a given name: + +```powershell +$storageAccount = Get-AzStorageAccount -ResourceGroupName -Name +``` + +Run the following command to get the shared key access setting for the storage account: + +```powershell +$storageAccount.allowSharedKeyAccess +``` + +Ensure that the command returns `False`. Repeat for each storage account. + +### Audit from Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- Policy ID: `8c6a50c6-9ffd-4ae7-986f-5fa6111f9a54` +- Name: 'Storage accounts should prevent shared key access' + +## Expected Result + +The `Allow storage account key access` setting is set to `Disabled` in the Azure Portal for each storage account. In Azure CLI, `allowSharedKeyAccess` returns `false`. In PowerShell, `$storageAccount.allowSharedKeyAccess` returns `False`. The Azure Policy 'Storage accounts should prevent shared key access' shows compliant. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Settings`, click `Configuration`. +4. Under `Allow storage account key access`, click the radio button next to `Disabled`. +5. Click `Save`. +6. Repeat steps 1-5 for each storage account requiring remediation. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to disallow shared key authorization: + +```bash +az storage account update --resource-group --name --allow-shared-key-access false +``` + +### Remediate from PowerShell + +For each storage account requiring remediation, run the following command to disallow shared key authorization: + +```powershell +Set-AzStorageAccount -ResourceGroupName -Name -AllowSharedKeyAccess $false +``` + +## Default Value + +The AllowSharedKeyAccess property of a storage account is not set by default and does not return a value until you explicitly set it. The storage account permits requests that are authorized with the Shared Key when the property value is null or when it is true. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/shared-key-authorization-prevent +2. https://learn.microsoft.com/en-us/cli/azure/storage/account +3. https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstorageaccount +4. https://learn.microsoft.com/en-us/powershell/module/az.storage/set-azstorageaccount + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.6/SKILL.md new file mode 100644 index 0000000000..28cb4e1db5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.1.6/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-azure-storage-17.1.6 +description: "Ensure Storage for Critical Data are Encrypted with Customer Managed Keys (CMK)" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, cmk, encryption] +cis_id: "17.1.6" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.1.6 Ensure Storage for Critical Data are Encrypted with Customer Managed Keys (CMK) (Manual) + +## Description + +Enable sensitive data encryption at rest using Customer Managed Keys (CMK) rather than Microsoft Managed keys. + +## Rationale + +By default, data in the storage account is encrypted using Microsoft Managed Keys at rest. All Azure Storage resources are encrypted, including blobs, disks, files, queues, and tables. All object metadata is also encrypted. If you want to control and manage this encryption key yourself, however, you can specify a customer-managed key. That key is used to protect and control access to the key that encrypts your data. You can also choose to automatically update the key version used for Azure Storage encryption whenever a new version is available in the associated Key Vault. + +While it is possible to automate the assessment of this recommendation, the assessment status for this recommendation remains 'Manual.' This is because the recommendation pertains to storage accounts that store critical data and is therefore not applicable to all storage accounts. + +## Impact + +If the key expires by setting the 'activation date' and 'expiration date', the user must rotate the key manually. + +Using Customer Managed Keys may also incur additional man-hour requirements to create, store, manage, and protect the keys as needed. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts` +2. For each storage account, under `Security + networking`, go to `Encryption` +3. Ensure that `Encryption type` is set to `Customer-managed keys` + +### Audit from PowerShell + +```powershell +Connect-AzAccount +Set-AzContext -Subscription +Get-AzStorageAccount |Select-Object -ExpandProperty Encryption +``` + +**PowerShell Results - Non-Compliant:** + +``` +KeySource : Microsoft.Storage +``` + +**PowerShell Results - Compliant:** + +``` +KeySource : Microsoft.Keyvault +``` + +### Audit from Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- Policy ID: `6fac406b-40ca-413b-bf8e-0bf964659c25` +- Name: 'Storage accounts should use customer-managed key for encryption' + +## Expected Result + +The `Encryption type` is set to `Customer-managed keys` in the Azure Portal for each storage account containing critical data. In PowerShell, the `KeySource` property returns `Microsoft.Keyvault` instead of `Microsoft.Storage`. The Azure Policy 'Storage accounts should use customer-managed key for encryption' shows compliant. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts` +2. For each storage account, under `Security + networking`, go to `Encryption` +3. Set `Encryption type` to `Customer-managed keys` +4. Select an encryption key or enter a key URI +5. Click `Save` + +## Default Value + +By default, Encryption type is set to Microsoft Managed Keys. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-service-encryption +2. https://docs.microsoft.com/en-us/azure/security/fundamentals/data-encryption-best-practices#protect-data-at-rest +3. https://docs.microsoft.com/en-us/azure/storage/common/storage-service-encryption#azure-storage-encryption-versus-disk-encryption +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-5-use-customer-managed-key-option-in-data-at-rest-encryption-when-required + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.10/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.10/SKILL.md new file mode 100644 index 0000000000..154d86bfa8 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.10/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-azure-storage-17.10 +description: "Ensure Storage Logging is Enabled for Table Service for 'Read', 'Write', and 'Delete' Requests" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, logging] +cis_id: "17.10" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.10 Ensure Storage Logging is Enabled for Table Service for 'Read', 'Write', and 'Delete' Requests (Automated) + +## Description + +Azure Table storage is a service that stores structured NoSQL data in the cloud, providing a key/attribute store with a schema-less design. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the tables. Storage Logging log entries contain the following information about individual requests: timing information such as start time, end-to-end latency, and server latency; authentication details; concurrency information; and the sizes of the request and response messages. + +## Rationale + +Storage Analytics logs contain detailed information about successful and failed requests to a storage service. This information can be used to monitor each individual request to a storage service for increased security or diagnostics. Requests are logged on a best-effort basis. + +Storage Analytics logging is not enabled by default for your storage account. + +## Impact + +Being a level 2, enabling this setting can have a high impact on the cost of data storage used for logging more data per each request. Do not enable this without determining your need for this level of logging or forget to check in on data usage and projected cost. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Monitoring`, click `Diagnostics settings`. +3. Select the `table` tab indented below the storage account. +4. Ensure that at least one diagnostic setting is listed. +5. Click `Edit setting` on a diagnostic setting. +6. Ensure that at least one diagnostic setting has `StorageRead`, `StorageWrite`, and `StorageDelete` options selected under the `Logs` section and that they are sent to an appropriate destination. + +### Audit from Azure CLI + +Ensure the below command output contains properties delete, read and write set to true: + +```bash +az storage logging show --services t --account-name +``` + +### Audit from Azure Policy + +Policy ID: `2fb86bf3-d221-43d1-96d1-2434af34eaa0` - Name: 'Configure diagnostic settings for Table Services to Log Analytics workspace' + +## Expected Result + +Storage logging should be enabled for Table Service with `StorageRead`, `StorageWrite`, and `StorageDelete` all enabled. CLI output should show `delete: true`, `read: true`, and `write: true`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Monitoring`, click `Diagnostics settings`. +3. Select the `table` tab indented below the storage account. +4. To create a new diagnostic setting, click `+ Add diagnostic setting`. To update an existing diagnostic setting, click `Edit setting` on the diagnostic setting. +5. Check the boxes next to `StorageRead`, `StorageWrite`, and `StorageDelete`. +6. Select an appropriate destination. +7. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to enable the Storage Logging for Table service: + +```bash +az storage logging update --account-name --account-key --services t --log rwd --retention 90 +``` + +## Default Value + +By default, storage account table service logging is disabled for read, write, and delete operations. + +## References + +1. https://docs.microsoft.com/en-us/rest/api/storageservices/about-storage-analytics-logging +2. https://docs.microsoft.com/en-us/cli/azure/storage/logging?view=azure-cli-latest +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## Additional Information + +We cannot practically generalize detailed audit log requirements for every table due to their nature and intent. This recommendation may be applicable to storage account table service where the security is paramount. + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.11/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.11/SKILL.md new file mode 100644 index 0000000000..ba7b119919 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.11/SKILL.md @@ -0,0 +1,114 @@ +--- +name: cis-azure-storage-17.11 +description: "Ensure the 'Minimum TLS version' for storage accounts is set to 'Version 1.2'" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, tls] +cis_id: "17.11" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.11 Ensure the 'Minimum TLS version' for storage accounts is set to 'Version 1.2' (Automated) + +## Description + +In some cases, Azure Storage sets the minimum TLS version to be version 1.0 by default. TLS 1.0 is a legacy version and has known vulnerabilities. This minimum TLS version can be configured to be later protocols such as TLS 1.2. + +## Rationale + +TLS 1.0 has known vulnerabilities and has been replaced by later versions of the TLS protocol. Continued use of this legacy protocol affects the security of data in transit. + +## Impact + +When set to TLS 1.2 all requests must leverage this version of the protocol. Applications leveraging legacy versions of the protocol will fail. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Ensure that the `Minimum TLS version` is set to `Version 1.2`. + +### Audit from Azure CLI + +Get a list of all storage accounts and their resource groups: + +```bash +az storage account list | jq '.[] | {name, resourceGroup}' +``` + +Then query the minimumTLSVersion field: + +```bash +az storage account show \ + --name \ + --resource-group \ + --query minimumTlsVersion \ + --output tsv +``` + +### Audit from PowerShell + +To get the minimum TLS version, run the following command: + +```powershell +(Get-AzStorageAccount -Name -ResourceGroupName ).MinimumTlsVersion +``` + +### Audit from Azure Policy + +Policy ID: `fe83a0eb-a853-422d-aac2-1bffd182c5d0` - Name: 'Storage accounts should have the specified minimum TLS version' + +## Expected Result + +The Minimum TLS version should be set to `Version 1.2` (or `TLS1_2` in CLI output) for all storage accounts. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Set the `Minimum TLS version` to `Version 1.2`. +4. Click `Save`. + +### Remediate from Azure CLI + +```bash +az storage account update \ + --name \ + --resource-group \ + --min-tls-version TLS1_2 +``` + +### Remediate from PowerShell + +To set the minimum TLS version, run the following command: + +```powershell +Set-AzStorageAccount -AccountName ` + -ResourceGroupName ` + -MinimumTlsVersion TLS1_2 +``` + +## Default Value + +If a storage account is created through the portal, the MinimumTlsVersion property for that storage account will be set to TLS 1.2. + +If a storage account is created through PowerShell or CLI, the MinimumTlsVersion property for that storage account will not be set, and defaults to TLS 1.0. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/transport-layer-security-configure-minimum-version?tabs=portal +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.12/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.12/SKILL.md new file mode 100644 index 0000000000..923832d739 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.12/SKILL.md @@ -0,0 +1,84 @@ +--- +name: cis-azure-storage-17.12 +description: "Ensure 'Cross Tenant Replication' is not enabled" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, replication] +cis_id: "17.12" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.12 Ensure 'Cross Tenant Replication' is not enabled (Automated) + +## Description + +Cross Tenant Replication in Azure allows data to be replicated across multiple Azure tenants. While this feature can be beneficial for data sharing and availability, it also poses a significant security risk if not properly managed. Unauthorized data access, data leakage, and compliance violations are potential risks. Disabling Cross Tenant Replication ensures that data is not inadvertently replicated across different tenant boundaries without explicit authorization. + +## Rationale + +Disabling Cross Tenant Replication minimizes the risk of unauthorized data access and ensures that data governance policies are strictly adhered to. This control is especially critical for organizations with stringent data security and privacy requirements, as it prevents the accidental sharing of sensitive information. + +## Impact + +Disabling Cross Tenant Replication may affect data availability and sharing across different Azure tenants. Ensure that this change aligns with your organizational data sharing and availability requirements. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Data management`, click `Object replication`. +3. Click `Advanced settings`. +4. Ensure `Allow cross-tenant replication` is not checked. + +### Audit from Azure CLI + +```bash +az storage account list --query "[*].[name,allowCrossTenantReplication]" +``` + +The value of `false` should be returned for each storage account listed. + +### Audit from Azure Policy + +Policy ID: `92a89a79-6c52-4a7e-a03f-61306fc49312` - Name: 'Storage accounts should prevent cross tenant object replication' + +## Expected Result + +Cross Tenant Replication should be disabled (not checked) for all storage accounts. CLI output should show `false` for `allowCrossTenantReplication` for each storage account. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Data management`, click `Object replication`. +3. Click `Advanced settings`. +4. Uncheck `Allow cross-tenant replication`. +5. Click `OK`. + +### Remediate from Azure CLI + +Replace the information within <> with appropriate values: + +```bash +az storage account update --name --resource-group --allow-cross-tenant-replication false +``` + +## Default Value + +For new storage accounts created after Dec 15, 2023 cross tenant replication is not enabled. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/object-replication-prevent-cross-tenant-policies?tabs=portal + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.13/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.13/SKILL.md new file mode 100644 index 0000000000..d31a22d7a6 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.13/SKILL.md @@ -0,0 +1,94 @@ +--- +name: cis-azure-storage-17.13 +description: "Ensure that 'Allow Blob Anonymous Access' is set to 'Disabled'" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, encryption] +cis_id: "17.13" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.13 Ensure that 'Allow Blob Anonymous Access' is set to 'Disabled' (Automated) + +## Description + +The Azure Storage setting 'Allow Blob Anonymous Access' (aka "allowBlobPublicAccess") controls whether anonymous access is allowed for blob data in a storage account. When this property is set to True, it enables public read access to blob data, which can be convenient for sharing data but may carry security risks. When set to False, it disallows public access to blob data, providing a more secure storage environment. + +## Rationale + +If "Allow Blob Anonymous Access" is enabled, blobs can be accessed by adding the blob name to the URL to see the contents. An attacker can enumerate a blob using methods, such as brute force, and access them. + +Exfiltration of data by brute force enumeration of items from a storage account may occur if this setting is set to 'Enabled'. + +## Impact + +Additional consideration may be required for exceptional circumstances where elements of a storage account require public accessibility. In these circumstances, it is highly recommended that all data stored in the public facing storage account be reviewed for sensitive or potentially compromising data, and that sensitive or compromising data is never stored in these storage accounts. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Ensure `Allow Blob Anonymous Access` is set to `Disabled`. + +### Audit from Azure CLI + +For every storage account in scope: + +```bash +az storage account show --name "" --query allowBlobPublicAccess +``` + +Ensure that every storage account in scope returns `false` for the "allowBlobPublicAccess" setting. + +### Audit from Azure Policy + +Policy ID: `4fa4b6c0-31ca-4c0d-b10d-24b96f62a751` - Name: '[Preview]: Storage account public access should be disallowed' + +## Expected Result + +`Allow Blob Anonymous Access` should be set to `Disabled` for all storage accounts. CLI output should return `false` for `allowBlobPublicAccess`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Set `Allow Blob Anonymous Access` to `Disabled`. +4. Click `Save`. + +### Remediate from PowerShell + +For every storage account in scope, run the following: + +```powershell +$storageAccount = Get-AzStorageAccount -ResourceGroupName "" -Name "" +$storageAccount.AllowBlobPublicAccess = $false +Set-AzStorageAccount -InputObject $storageAccount +``` + +## Default Value + +Disabled + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-prevent?tabs=portal +2. https://learn.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-prevent?source=recommendations&tabs=portal +3. Classic Storage Accounts: https://learn.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-prevent-classic?tabs=portal + +## Additional Information + +Azure Storage accounts that use the classic deployment model will be retired on August 31, 2024. + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.14/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.14/SKILL.md new file mode 100644 index 0000000000..9389e0aa0e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.14/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-azure-storage-17.14 +description: "Ensure Azure Resource Manager Delete locks are applied to Azure Storage Accounts" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, locks] +cis_id: "17.14" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.14 Ensure Azure Resource Manager Delete locks are applied to Azure Storage Accounts (Manual) + +## Description + +Azure Resource Manager CannotDelete (Delete) locks can prevent users from accidentally or maliciously deleting a storage account. This feature ensures that while the Storage account can still be modified or used, deletion of the Storage account resource requires removal of the lock by a user with appropriate permissions. + +This feature is a protective control for the availability of data. By ensuring that a storage account or its parent resource group cannot be deleted without first removing the lock, the risk of data loss is reduced. + +## Rationale + +Applying a Delete lock on storage accounts protects the availability of data by preventing the accidental or unauthorized deletion of the entire storage account. It is a fundamental protective control that can prevent data loss. + +## Impact + +- Prevents the deletion of the Storage account Resource entirely. +- Prevents the deletion of the parent Resource Group containing the locked Storage account resource. +- Does not prevent other control plane operations, including modification of configurations, network settings, containers, and access. +- Does not prevent deletion of containers or other objects within the storage account. + +## Audit Procedure + +### Audit from Azure Portal + +1. Navigate to the storage account in the Azure portal. +2. For each storage account, under `Settings`, click `Locks`. +3. Ensure that a `Delete` lock exists on the storage account. + +### Audit from Azure CLI + +```bash +az lock list --resource-group \ + --resource-name \ + --resource-type "Microsoft.Storage/storageAccounts" +``` + +### Audit from PowerShell + +```powershell +Get-AzResourceLock -ResourceGroupName ` + -ResourceName ` + -ResourceType "Microsoft.Storage/storageAccounts" +``` + +### Audit from Azure Policy + +There is currently no built-in Microsoft policy to audit resource locks on storage accounts. Custom and community policy definitions can check for the existence of a "Microsoft.Authorization/locks" resource with an AuditIfNotExists effect. + +## Expected Result + +A `Delete` (CannotDelete) lock should exist on each storage account. CLI/PowerShell output should list a lock with `lockType` set to `CanNotDelete`. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the storage account in the Azure portal. +2. Under the `Settings` section, select `Locks`. +3. Select `Add`. +4. Provide a Name, and choose `Delete` for the type of lock. +5. Add a note about the lock if desired. + +### Remediate from Azure CLI + +Replace the information within <> with appropriate values: + +```bash +az lock create --name \ + --resource-group \ + --resource \ + --lock-type CanNotDelete \ + --resource-type Microsoft.Storage/storageAccounts +``` + +### Remediate from PowerShell + +Replace the information within <> with appropriate values: + +```powershell +New-AzResourceLock -LockLevel CanNotDelete ` + -LockName ` + -ResourceName ` + -ResourceType Microsoft.Storage/storageAccounts ` + -ResourceGroupName +``` + +## Default Value + +By default, no locks are applied to Azure resources, including storage accounts. Locks must be manually configured after resource creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/lock-account-resource +2. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.15/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.15/SKILL.md new file mode 100644 index 0000000000..8da8b7a3ca --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.15/SKILL.md @@ -0,0 +1,122 @@ +--- +name: cis-azure-storage-17.15 +description: "Ensure Azure Resource Manager ReadOnly locks are considered for Azure Storage Accounts" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, locks] +cis_id: "17.15" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.15 Ensure Azure Resource Manager ReadOnly locks are considered for Azure Storage Accounts (Manual) + +## Description + +Adding an Azure Resource Manager `ReadOnly` lock can prevent users from accidentally or maliciously deleting a storage account, modifying its properties and containers, or creating access assignments. The lock must be removed before the storage account can be deleted or updated. It provides more protection than a `CannotDelete`-type of resource manager lock. + +This feature prevents `POST` operations on a storage account and containers to the Azure Resource Manager control plane, management.azure.com. Blocked operations include `listKeys` which prevents clients from obtaining the account shared access keys. + +Microsoft does not recommend `ReadOnly` locks for storage accounts with Azure Files and Table service containers. + +This Azure Resource Manager REST API documentation (spec) provides information about the control plane `POST` operations for Microsoft.Storage resources. + +## Rationale + +Applying a `ReadOnly` lock on storage accounts protects the confidentiality and availability of data by preventing the accidental or unauthorized deletion of the entire storage account and modification of the account, container properties, or access permissions. It can offer enhanced protection for blob and queue workloads with tradeoffs in usability and compatibility for clients using account shared access keys. + +## Impact + +- Prevents the deletion of the Storage account Resource entirely. +- Prevents the deletion of the parent Resource Group containing the locked Storage account resource. +- Prevents clients from obtaining the storage account shared access keys using a `listKeys` operation. +- Requires Entra credentials to access blob and queue data in the Portal. +- Data in Azure Files or the Table service may be inaccessible to clients using the account shared access keys. +- Prevents modification of account properties, network settings, containers, and RBAC assignments. +- Does not prevent access using existing account shared access keys issued to clients. +- Does not prevent deletion of containers or other objects within the storage account. + +## Audit Procedure + +### Audit from Azure Portal + +1. Navigate to the storage account in the Azure portal. +2. For each storage account, under `Settings`, click `Locks`. +3. Ensure that a `ReadOnly` lock exists on the storage account. + +### Audit from Azure CLI + +```bash +az lock list --resource-group \ + --resource-name \ + --resource-type "Microsoft.Storage/storageAccounts" +``` + +### Audit from PowerShell + +```powershell +Get-AzResourceLock -ResourceGroupName ` + -ResourceName ` + -ResourceType "Microsoft.Storage/storageAccounts" +``` + +### Audit from Azure Policy + +There is currently no built-in Microsoft policy to audit resource locks on storage accounts. Custom and community policy definitions can check for the existence of a "Microsoft.Authorization/locks" resource with an AuditIfNotExists effect. + +## Expected Result + +A `ReadOnly` lock should exist on each storage account where enhanced protection is required. CLI/PowerShell output should list a lock with `lockType` set to `ReadOnly`. + +## Remediation + +### Remediate from Azure Portal + +1. Navigate to the storage account in the Azure portal. +2. Under the `Settings` section, select `Locks`. +3. Select `Add`. +4. Provide a Name, and choose `ReadOnly` for the type of lock. +5. Add a note about the lock if desired. + +### Remediate from Azure CLI + +Replace the information within <> with appropriate values: + +```bash +az lock create --name \ + --resource-group \ + --resource \ + --lock-type ReadOnly \ + --resource-type Microsoft.Storage/storageAccounts +``` + +### Remediate from PowerShell + +Replace the information within <> with appropriate values: + +```powershell +New-AzResourceLock -LockLevel ReadOnly ` + -LockName ` + -ResourceName ` + -ResourceType Microsoft.Storage/storageAccounts ` + -ResourceGroupName +``` + +## Default Value + +By default, no locks are applied to Azure resources, including storage accounts. Locks must be manually configured after resource creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/lock-account-resource +2. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources +3. https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storage + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.16/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.16/SKILL.md new file mode 100644 index 0000000000..51a6893b69 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.16/SKILL.md @@ -0,0 +1,137 @@ +--- +name: cis-azure-storage-17.16 +description: "Ensure Redundancy is set to 'geo-redundant storage (GRS)' on critical Azure Storage Accounts" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, redundancy] +cis_id: "17.16" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.16 Ensure Redundancy is set to 'geo-redundant storage (GRS)' on critical Azure Storage Accounts (Automated) + +## Description + +Geo-redundant storage (GRS) in Azure replicates data three times within the primary region using locally redundant storage (LRS) and asynchronously copies it to a secondary region hundreds of miles away. This setup ensures high availability and resilience by providing 16 nines (99.99999999999999%) durability over a year, safeguarding data against regional outages. + +## Rationale + +Enabling GRS protects critical data from regional failures by maintaining a copy in a geographically separate location. This significantly reduces the risk of data loss, supports business continuity, and meets high availability requirements for disaster recovery. + +## Impact + +Enabling geo-redundant storage on Azure storage accounts increases costs due to cross-region data replication. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data management`, click `Redundancy`. +4. Ensure that `Redundancy` is set to `Geo-redundant storage (GRS)`. +5. Repeat steps 1-4 for each storage account. + +### Audit from Azure CLI + +Run the following command to list storage accounts: + +```bash +az storage account list +``` + +For each storage account, run the following command: + +```bash +az storage account show --resource-group --name +``` + +Under `sku`, ensure that `name` is set to `Standard_GRS`. + +### Audit from PowerShell + +Run the following command to list storage accounts: + +```powershell +Get-AzStorageAccount +``` + +Run the following command to get the storage account in a resource group with a given name: + +```powershell +$storageAccount = Get-AzStorageAccount -ResourceGroupName -Name +``` + +Run the following command to get the redundancy setting for the storage account: + +```powershell +$storageAccount.SKU.Name +``` + +Ensure that the command returns `Standard_GRS`. Repeat for each storage account. + +### Audit from Azure Policy + +Policy ID: `bf045164-79ba-4215-8f95-f8048dc1780b` +Name: 'Geo-redundant storage should be enabled for Storage Accounts' + +## Expected Result + +The redundancy setting should be `Geo-redundant storage (GRS)` for all critical storage accounts. CLI output should show `Standard_GRS` under `sku.name`. PowerShell should return `Standard_GRS`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Data management`, click `Redundancy`. +4. From the `Redundancy` drop-down menu, select `Geo-redundant storage (GRS)`. +5. Click `Save`. +6. Repeat steps 1-5 for each storage account requiring remediation. + +### Remediate from Azure CLI + +For each storage account requiring remediation, run the following command to enable geo-redundant storage: + +```bash +az storage account update --resource-group --name --sku Standard_GRS +``` + +### Remediate from PowerShell + +For each storage account requiring remediation, run the following command to enable geo-redundant storage: + +```powershell +Set-AzStorageAccount -ResourceGroupName -Name -SkuName "Standard_GRS" +``` + +## Default Value + +When creating a storage account in the Azure Portal, the default redundancy setting is geo-redundant storage (GRS). Using the Azure CLI, the default is read-access geo-redundant storage (RA-GRS). In PowerShell, a redundancy level must be explicitly specified during account creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-redundancy +2. https://learn.microsoft.com/en-us/azure/storage/common/redundancy-migration +3. https://learn.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-update +4. https://learn.microsoft.com/en-us/powershell/module/az.storage/set-azstorageaccount?view=azps-12.4.0 +5. https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance + +## Additional Information + +When choosing the best redundancy option, weigh the trade-offs between lower costs and higher availability. Key factors to consider include: + +- The method of data replication within the primary region. +- The replication of data from a primary to a geographically distant secondary region for protection against regional disasters (geo-replication). +- The necessity for read access to replicated data in the secondary region during an outage in the primary region (geo-replication with read access). + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.2.1/SKILL.md new file mode 100644 index 0000000000..44f5f8023c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.2.1/SKILL.md @@ -0,0 +1,157 @@ +--- +name: cis-azure-storage-17.2.1 +description: "Ensure Private Endpoints are used to access Storage Accounts" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, networking, private-endpoints] +cis_id: "17.2.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.2.1 Ensure Private Endpoints are used to access Storage Accounts (Automated) + +## Description + +Use private endpoints for your Azure Storage accounts to allow clients and services to securely access data located over a network via an encrypted Private Link. To do this, the private endpoint uses an IP address from the VNet for each service. Network traffic between disparate services securely traverses encrypted over the VNet. This VNet can also link addressing space, extending your network and accessing resources on it. Similarly, it can be a tunnel through public networks to connect remote infrastructures together. This creates further security through segmenting network traffic and preventing outside sources from accessing it. + +## Rationale + +Securing traffic between services through encryption protects the data from easy interception and reading. + +## Impact + +A Private Endpoint costs approximately US$7.30 per month. If an Azure Virtual Network is not implemented correctly, this may result in the loss of critical network traffic. + +## Audit Procedure + +### Audit from Azure Portal + +1. Open the `Storage Accounts` blade. +2. For each listed Storage Account, perform the following check: +3. Under the `Security + networking` heading, click on `Networking`. +4. Click on the `Private endpoint connections` tab at the top of the networking window. +5. Ensure that for each VNet that the Storage Account must be accessed from, a unique Private Endpoint is deployed and the `Connection state` for each Private Endpoint is `Approved`. + +Repeat the procedure for each Storage Account. + +### Audit from PowerShell + +```powershell +$storageAccount = Get-AzStorageAccount -ResourceGroup '' -Name '' + +Get-AzPrivateEndpoint -ResourceGroup ''|Where-Object {$_.PrivateLinkServiceConnectionsText -match $storageAccount.id} +``` + +If the results of the second command returns information, the Storage Account is using a Private Endpoint and complies with this Benchmark, otherwise if the results of the second command are empty, the Storage Account generates a finding. + +### Audit from Azure CLI + +```bash +az storage account show --name '' --query "privateEndpointConnections[0].id" +``` + +If the above command returns data, the Storage Account complies with this Benchmark, otherwise if the results are empty, the Storage Account generates a finding. + +### Audit from Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- Policy ID: `6edd7eda-6dd8-40f7-810d-67160c639cd9` +- Name: 'Storage accounts should use private link' + +## Expected Result + +Each Storage Account has at least one Private Endpoint connection with a `Connection state` of `Approved`. The Azure CLI command returns a non-empty Private Endpoint connection ID. The Azure Policy 'Storage accounts should use private link' shows compliant. + +## Remediation + +### Remediate from Azure Portal + +1. Open the `Storage Accounts` blade +2. For each listed Storage Account, perform the following: +3. Under the `Security + networking` heading, click on `Networking` +4. Click on the `Private endpoint connections` tab at the top of the networking window +5. Click the `+ Private endpoint` button +6. In the `1 - Basics` tab/step: + - `Enter a name` that will be easily recognizable as associated with the Storage Account (Note: The "Network Interface Name" will be automatically completed, but you can customize it if needed.) + - Ensure that the `Region` matches the region of the Storage Account + - Click `Next` +7. In the `2 - Resource` tab/step: + - Select the `target sub-resource` based on what type of storage resource is being made available + - Click `Next` +8. In the `3 - Virtual Network` tab/step: + - Select the `Virtual network` that your Storage Account will be connecting to + - Select the `Subnet` that your Storage Account will be connecting to + - (Optional) Select other network settings as appropriate for your environment + - Click `Next` +9. In the `4 - DNS` tab/step: + - (Optional) Select other DNS settings as appropriate for your environment + - Click `Next` +10. In the `5 - Tags` tab/step: + - (Optional) Set any tags that are relevant to your organization + - Click `Next` +11. In the `6 - Review + create` tab/step: + - A validation attempt will be made and after a few moments it should indicate `Validation Passed` - if it does not pass, double-check your settings before beginning more in depth troubleshooting. + - If validation has passed, click `Create` then wait for a few minutes for the scripted deployment to complete. + +Repeat the above procedure for each Private Endpoint required within every Storage Account. + +### Remediate from PowerShell + +```powershell +$storageAccount = Get-AzStorageAccount -ResourceGroupName '' -Name '' + +$privateEndpointConnection = @{ + Name = 'connectionName' + PrivateLinkServiceId = $storageAccount.Id + GroupID = "blob|blob_secondary|file|file_secondary|table|table_secondary|queue|queue_secondary|web|web_secondary|dfs|dfs_secondary" +} + +$privateLinkServiceConnection = New-AzPrivateLinkServiceConnection @privateEndpointConnection + +$virtualNetDetails = Get-AzVirtualNetwork -ResourceGroupName '' -Name '' + +$privateEndpoint = @{ + ResourceGroupName = '' + Name = '' + Location = '' + Subnet = $virtualNetDetails.Subnets[0] + PrivateLinkServiceConnection = $privateLinkServiceConnection +} + +New-AzPrivateEndpoint @privateEndpoint +``` + +### Remediate from Azure CLI + +```bash +az network private-endpoint create --resource-group --location --name --vnet-name --subnet --private-connection-resource-id --connection-name --group-id +``` + +## Default Value + +By default, Private Endpoints are not created for Storage Accounts. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-private-endpoints +2. https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview +3. https://docs.microsoft.com/en-us/azure/private-link/create-private-endpoint-portal +4. https://docs.microsoft.com/en-us/azure/private-link/create-private-endpoint-cli?tabs=dynamic-ip +5. https://docs.microsoft.com/en-us/azure/private-link/create-private-endpoint-powershell?tabs=dynamic-ip +6. https://docs.microsoft.com/en-us/azure/private-link/tutorial-private-endpoint-storage-portal +7. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls + +## Additional Information + +A NAT gateway is the recommended solution for outbound internet access. + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.2.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.2.2/SKILL.md new file mode 100644 index 0000000000..bdab27666c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.2.2/SKILL.md @@ -0,0 +1,113 @@ +--- +name: cis-azure-storage-17.2.2 +description: "Ensure that 'Public Network Access' is 'Disabled' for storage accounts" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, networking, private-endpoints] +cis_id: "17.2.2" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.2.2 Ensure that 'Public Network Access' is 'Disabled' for storage accounts (Automated) + +## Description + +Disallowing public network access for a storage account overrides the public access settings for individual containers in that storage account for Azure Resource Manager Deployment Model storage accounts. Azure Storage accounts that use the classic deployment model will be retired on August 31, 2024. + +## Rationale + +The default network configuration for a storage account permits a user with appropriate permissions to configure public network access to containers and blobs in a storage account. Keep in mind that public access to a container is always turned off by default and must be explicitly configured to permit anonymous requests. It grants read-only access to these resources without sharing the account key, and without requiring a shared access signature. It is recommended not to provide public network access to storage accounts until, and unless, it is strongly desired. A shared access signature token or Azure AD RBAC should be used for providing controlled and timed access to blob containers. + +## Impact + +Access will have to be managed using shared access signatures or via Azure AD RBAC. + +For classic storage accounts (to be retired on August 31, 2024), each container in the account must be configured to block anonymous access. Either configure all containers or to configure at the storage account level, migrate to the Azure Resource Manager deployment model. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under the `Security + networking` section, click `Networking`. +3. Ensure the `Public network access` setting is set to `Disabled`. + +### Audit from Azure CLI + +Ensure `publicNetworkAccess` is `Disabled`: + +```bash +az storage account show --name --resource-group --query "{publicNetworkAccess:publicNetworkAccess}" +``` + +### Audit from PowerShell + +For each Storage Account, ensure `PublicNetworkAccess` is `Disabled`: + +```powershell +Get-AzStorageAccount -Name -ResourceGroupName |select PublicNetworkAccess +``` + +### Audit from Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- Policy ID: `b2982f36-99f2-4db5-8eff-283140c09693` +- Name: 'Storage accounts should disable public network access' + +## Expected Result + +The `Public network access` setting is set to `Disabled` for each storage account. In Azure CLI, `publicNetworkAccess` returns `Disabled`. In PowerShell, `PublicNetworkAccess` returns `Disabled`. The Azure Policy 'Storage accounts should disable public network access' shows compliant. + +## Remediation + +### Remediate from Azure Portal + +First, follow Microsoft documentation and create shared access signature tokens for your blob containers. Then, + +1. Go to `Storage Accounts`. +2. For each storage account, under the `Security + networking` section, click `Networking`. +3. Set `Public network access` to `Disabled`. +4. Click `Save`. + +### Remediate from Azure CLI + +Set 'Public Network Access' to `Disabled` on the storage account: + +```bash +az storage account update --name --resource-group --public-network-access Disabled +``` + +### Remediate from PowerShell + +For each Storage Account, run the following to set the `PublicNetworkAccess` setting to `Disabled`: + +```powershell +Set-AzStorageAccount -ResourceGroupName -Name -PublicNetworkAccess Disabled +``` + +## Default Value + +By default, `Public Network Access` is set to `Enabled from all networks` for the Storage Account. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/blobs/storage-manage-access-to-resources +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls +4. https://docs.microsoft.com/en-us/azure/storage/blobs/assign-azure-role-data-access +5. https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-portal + +## Additional Information + +This recommendation is based on the Common Reference Recommendation `Ensure public network access is Disabled`, from the `Common Reference Recommendations > Networking > Virtual Networks (VNets)` section. + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.2.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.2.3/SKILL.md new file mode 100644 index 0000000000..bc4fa594a5 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.2.3/SKILL.md @@ -0,0 +1,108 @@ +--- +name: cis-azure-storage-17.2.3 +description: "Ensure Default Network Access Rule for Storage Accounts is Set to Deny" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, networking, private-endpoints] +cis_id: "17.2.3" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.2.3 Ensure Default Network Access Rule for Storage Accounts is Set to Deny (Automated) + +## Description + +Restricting default network access helps to provide a new layer of security, since storage accounts accept connections from clients on any network. To limit access to selected networks, the default action must be changed. + +## Rationale + +Storage accounts should be configured to deny access to traffic from all networks (including internet traffic). Access can be granted to traffic from specific Azure Virtual networks, allowing a secure network boundary for specific applications to be built. Access can also be granted to public internet IP address ranges to enable connections from specific internet or on-premises clients. When network rules are configured, only applications from allowed networks can access a storage account. When calling from an allowed network, applications continue to require proper authorization (a valid access key or SAS token) to access the storage account. + +## Impact + +All allowed networks will need to be whitelisted on each specific network, creating administrative overhead. This may result in loss of network connectivity, so do not turn on for critical resources during business hours. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to Storage Accounts. +2. For each storage account, under `Security + networking`, click `Networking`. +3. Click the `Firewalls and virtual networks` heading. +4. Ensure that `Public network access` is not set to `Enabled from all networks`. + +### Audit from Azure CLI + +Ensure `defaultAction` is not set to `Allow`. + +```bash +az storage account list --query '[*].networkRuleSet' +``` + +### Audit from PowerShell + +```powershell +Connect-AzAccount +Set-AzContext -Subscription +Get-AzStorageAccountNetworkRuleset -ResourceGroupName -Name |Select-Object DefaultAction +``` + +**PowerShell Result - Non-Compliant:** + +``` +DefaultAction : Allow +``` + +**PowerShell Result - Compliant:** + +``` +DefaultAction : Deny +``` + +### Audit from Azure Policy + +If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions + +- Policy ID: `34c877ad-507e-4c82-993e-3452a6e0ad3c` - Name: 'Storage accounts should restrict network access' +- Policy ID: `2a1a9cdf-e04d-429a-8416-3bfb72a1b26f` - Name: 'Storage accounts should restrict network access using virtual network rules' + +## Expected Result + +The `Public network access` setting is not set to `Enabled from all networks` for each storage account. In Azure CLI, the `defaultAction` in `networkRuleSet` is set to `Deny`. In PowerShell, `DefaultAction` returns `Deny`. The Azure Policies 'Storage accounts should restrict network access' and 'Storage accounts should restrict network access using virtual network rules' show compliant. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Security + networking`, click `Networking`. +3. Click the `Firewalls and virtual networks` heading. +4. Set `Public network access` to `Enabled from selected virtual networks and IP addresses`. +5. Add rules to allow traffic from specific networks and IP addresses. +6. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to update `default-action` to `Deny`. + +```bash +az storage account update --name --resource-group --default-action Deny +``` + +## Default Value + +By default, Storage Accounts will accept connections from clients on any network. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-network-security + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.4/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.4/SKILL.md new file mode 100644 index 0000000000..3f2478c376 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.4/SKILL.md @@ -0,0 +1,85 @@ +--- +name: cis-azure-storage-17.4 +description: "Ensure that 'Secure transfer required' is set to 'Enabled'" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, encryption, tls] +cis_id: "17.4" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.4 Ensure that 'Secure transfer required' is set to 'Enabled' (Automated) + +## Description + +Enable data encryption in transit. + +## Rationale + +The secure transfer option enhances the security of a storage account by only allowing requests to the storage account by a secure connection. For example, when calling REST APIs to access storage accounts, the connection must use HTTPS. Any requests using HTTP will be rejected when 'secure transfer required' is enabled. When using the Azure files service, connection without encryption will fail, including scenarios using SMB 2.1, SMB 3.0 without encryption, and some flavors of the Linux SMB client. Because Azure storage doesn't support HTTPS for custom domain names, this option is not applied when using a custom domain name. + +## Impact + +No specific impact noted. This is a standard security best practice. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Ensure that `Secure transfer required` is set to `Enabled`. + +### Audit from Azure CLI + +Use the below command to ensure the `Secure transfer required` is enabled for all the `Storage Accounts` by ensuring the output contains `true` for each of the `Storage Accounts`. + +```bash +az storage account list --query "[*].[name,enableHttpsTrafficOnly]" +``` + +### Audit from Azure Policy + +Policy ID: `404c3081-a854-4457-ae30-26a93ef643f9` - Name: 'Secure transfer to storage accounts should be enabled' + +## Expected Result + +The `Secure transfer required` setting should be `Enabled` for all storage accounts. The CLI output should show `true` for `enableHttpsTrafficOnly` for each storage account. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Settings`, click `Configuration`. +3. Set `Secure transfer required` to `Enabled`. +4. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to enable `Secure transfer required` for a `Storage Account`: + +```bash +az storage account update --name --resource-group --https-only true +``` + +## Default Value + +By default, `Secure transfer required` is set to `Disabled`. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/blobs/security-recommendations#encryption-in-transit +2. https://docs.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az_storage_account_list +3. https://docs.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az_storage_account_update +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-3-encrypt-sensitive-data-in-transit + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.5/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.5/SKILL.md new file mode 100644 index 0000000000..3cfae76ede --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.5/SKILL.md @@ -0,0 +1,123 @@ +--- +name: cis-azure-storage-17.5 +description: "Ensure that 'Enable Infrastructure Encryption' for Each Storage Account in Azure Storage is Set to 'enabled'" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, encryption] +cis_id: "17.5" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.5 Ensure that 'Enable Infrastructure Encryption' for Each Storage Account in Azure Storage is Set to 'enabled' (Automated) + +## Description + +Enabling encryption at the hardware level on top of the default software encryption for Storage Accounts accessing Azure storage solutions. + +## Rationale + +Azure Storage automatically encrypts all data in a storage account at the network level using 256-bit AES encryption, which is one of the strongest, FIPS 140-2-compliant block ciphers available. Customers who require higher levels of assurance that their data is secure can also enable 256-bit AES encryption at the Azure Storage infrastructure level for double encryption. Double encryption of Azure Storage data protects against a scenario where one of the encryption algorithms or keys may be compromised. Similarly, data is encrypted even before network transmission and in all backups. In this scenario, the additional layer of encryption continues to protect your data. For the most secure implementation of key based encryption, it is recommended to use a Customer Managed asymmetric RSA 2048 Key in Azure Key Vault. + +## Impact + +The read and write speeds to the storage will be impacted if both default encryption and Infrastructure Encryption are checked, as a secondary form of encryption requires more resource overhead for the cryptography of information. This performance impact should be considered in an analysis for justifying use of the feature in your environment. Customer-managed keys are recommended for the most secure implementation, leading to overhead of key management. The key will also need to be backed up in a secure location, as loss of the key will mean loss of the information in the storage. + +## Audit Procedure + +### Audit from Azure Portal + +1. From Azure Portal select the portal menu in the top left. +2. Select `Storage Accounts`. +3. Click on each storage account within each resource group you wish to audit. +4. In the overview, under Security, ensure `Infrastructure encryption` is set to `Enabled`. + +### Audit from Azure CLI + +```bash +az storage blob show \ + --account-name \ + --container-name \ + --name \ + --query "properties.serverEncrypted" +``` + +### Audit from PowerShell + +```powershell +$account = Get-AzStorageAccount -ResourceGroupName ` + -Name +$blob = Get-AzStorageBlob -Context $account.Context ` + -Container ` + -Blob +$blob.ICloudBlob.Properties.IsServerEncrypted +``` + +### Audit from Azure Policy + +Policy ID: `4733ea7b-a883-42fe-8cac-97454c2a9e4a` - Name: 'Storage accounts should have infrastructure encryption' + +## Expected Result + +Infrastructure encryption should be set to `Enabled` for each storage account. CLI/PowerShell commands should return `true` for server encryption properties. + +## Remediation + +### Remediate from Azure Portal + +1. During Storage Account creation, in the `Encryption` tab, check the box next to `Enable infrastructure encryption`. + +### Remediate from Azure CLI + +Replace the information within <> with appropriate values: + +```bash +az storage account create \ + --name \ + --resource-group \ + --location \ + --sku Standard_RAGRS \ + --kind StorageV2 \ + --require-infrastructure-encryption +``` + +### Remediate from PowerShell + +Replace the information within <> with appropriate values: + +```powershell +New-AzStorageAccount -ResourceGroupName ` + -AccountName ` + -Location ` + -SkuName "Standard_RAGRS" ` + -Kind StorageV2 ` + -RequireInfrastructureEncryption +``` + +### Enabling Infrastructure Encryption after Storage Account Creation + +If infrastructure encryption was not enabled on blob storage creation, there is no official way to enable it. Please see the additional information section. + +## Default Value + +By default, Infrastructure Encryption is disabled in blob creation. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-encryption-status +2. https://docs.microsoft.com/en-us/azure/storage/common/storage-service-encryption +3. https://docs.microsoft.com/en-us/azure/storage/common/infrastructure-encryption-enable +4. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-4-enable-data-at-rest-encryption-by-default + +## Additional Information + +The default service side encryption for Azure Storage is enabled on every block blob, append blob, or page blob that was written to Azure Storage after October 20, 2017. Hardware encryption, however, cannot be enabled on a blob storage after its creation. There are ways to copy all data from a blob storage into another or download and reupload into another blob storage. This could result in data loss and is not recommended. + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.6/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.6/SKILL.md new file mode 100644 index 0000000000..ef67ae68c7 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.6/SKILL.md @@ -0,0 +1,99 @@ +--- +name: cis-azure-storage-17.6 +description: "Ensure 'Allow Azure services on the trusted services list to access this storage account' is Enabled for Storage Account Access" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, networking] +cis_id: "17.6" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.6 Ensure 'Allow Azure services on the trusted services list to access this storage account' is Enabled for Storage Account Access (Automated) + +## Description + +NOTE: This recommendation assumes that the `Public network access` parameter is set to `Enabled from selected virtual networks and IP addresses`. Please ensure the prerequisite recommendation has been implemented before proceeding: + +- Ensure Default Network Access Rule for Storage Accounts is Set to Deny + +Some Azure services that interact with storage accounts operate from networks that can't be granted access through network rules. To help this type of service work as intended, allow the set of trusted Azure services to bypass the network rules. These services will then use strong authentication to access the storage account. If the `Allow Azure services on the trusted services list to access this storage account` exception is enabled, the following services are granted access to the storage account: Azure Backup, Azure Data Box, Azure DevTest Labs, Azure Event Grid, Azure Event Hubs, Azure File Sync, Azure HDInsight, Azure Import/Export, Azure Monitor, Azure Networking Services, and Azure Site Recovery (when registered in the subscription). + +## Rationale + +Turning on firewall rules for a storage account will block access to incoming requests for data, including from other Azure services. We can re-enable this functionality by allowing access to `trusted Azure services` through networking exceptions. + +## Impact + +This creates authentication credentials for services that need access to storage resources so that services will no longer need to communicate via network request. There may be a temporary loss of communication as you set each Storage Account. It is recommended to not do this on mission-critical resources during business hours. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Security + networking`, click `Networking`. +3. Click on the `Firewalls and virtual networks` heading. +4. Under `Exceptions`, ensure that `Allow Azure services on the trusted services list to access this storage account` is checked. + +### Audit from Azure CLI + +Ensure `bypass` contains `AzureServices`: + +```bash +az storage account list --query '[*].networkRuleSet' +``` + +### Audit from PowerShell + +```powershell +Connect-AzAccount +Set-AzContext -Subscription +Get-AzStorageAccountNetworkRuleset -ResourceGroupName -Name |Select-Object Bypass +``` + +If the response from the above command is `None`, the storage account configuration is out of compliance with this check. If the response is `AzureServices`, the storage account configuration is in compliance with this check. + +### Audit from Azure Policy + +Policy ID: `c9d007d0-c057-4772-b18c-01e546713bcd` - Name: 'Storage accounts should allow access from trusted Microsoft services' + +## Expected Result + +The `Allow Azure services on the trusted services list to access this storage account` exception should be checked/enabled. CLI output should show `AzureServices` in the bypass field. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Security + networking`, click `Networking`. +3. Click on the `Firewalls and virtual networks` heading. +4. Under `Exceptions`, check the box next to `Allow Azure services on the trusted services list to access this storage account`. +5. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to update `bypass` to `Azure services`: + +```bash +az storage account update --name --resource-group --bypass AzureServices +``` + +## Default Value + +By default, Storage Accounts will accept connections from clients on any network. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-network-security +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.7/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.7/SKILL.md new file mode 100644 index 0000000000..a216245408 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.7/SKILL.md @@ -0,0 +1,106 @@ +--- +name: cis-azure-storage-17.7 +description: "Ensure Soft Delete is Enabled for Azure Containers and Blob Storage" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, soft-delete] +cis_id: "17.7" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.7 Ensure Soft Delete is Enabled for Azure Containers and Blob Storage (Automated) + +## Description + +The Azure Storage blobs contain data like ePHI or Financial, which can be secret or personal. Data that is erroneously modified or deleted by an application or other storage account user will cause data loss or unavailability. + +It is recommended that both Azure Containers with attached Blob Storage and standalone containers with Blob Storage be made recoverable by enabling the soft delete configuration. This is to save and recover data when blobs or blob snapshots are deleted. + +## Rationale + +Containers and Blob Storage data can be incorrectly deleted. An attacker/malicious user may do this deliberately in order to cause disruption. Deleting an Azure Storage blob causes immediate data loss. Enabling this configuration for Azure storage ensures that even if blobs/data were deleted from the storage account, Blobs/data objects are recoverable for a particular time which is set in the "Retention policies," ranging from 7 days to 365 days. + +## Impact + +Additional storage costs may be incurred as snapshots are retained. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each Storage Account, under `Data management`, go to `Data protection`. +3. Ensure that `Enable soft delete for blobs` is checked. +4. Ensure that `Enable soft delete for containers` is checked. +5. Ensure that the retention period for both is a sufficient length for your organization. + +### Audit from Azure CLI + +**Blob Storage:** Ensure that the output of the below command contains enabled status as true and days is not empty or null: + +```bash +az storage blob service-properties delete-policy show + --account-name + --account-key +``` + +**Azure Containers:** Ensure that within `containerDeleteRetentionPolicy`, the `enabled` property is set to `true`: + +```bash +az storage account blob-service-properties show + --account-name + --resource-group +``` + +## Expected Result + +Soft delete should be enabled for both blobs and containers with an appropriate retention period (7-365 days). CLI output should show `enabled: true` for both blob delete policy and container delete retention policy. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each Storage Account, under `Data management`, go to `Data protection`. +3. Check the box next to `Enable soft delete for blobs`. +4. Check the box next to `Enable soft delete for containers`. +5. Set the retention period for both to a sufficient length for your organization. +6. Click `Save`. + +### Remediate from Azure CLI + +Update blob storage retention days in below command: + +```bash +az storage blob service-properties delete-policy update --days-retained --account-name --account-key --enable true +``` + +Update container retention with the below command: + +```bash +az storage account blob-service-properties update + --enable-container-delete-retention true + --container-delete-retention-days + --account-name + --resource-group +``` + +## Default Value + +Soft delete for containers and blob storage is enabled by default on storage accounts created via the Azure Portal, and disabled by default on storage accounts created via Azure CLI or PowerShell. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-soft-delete +2. https://docs.microsoft.com/en-us/azure/storage/blobs/soft-delete-container-overview +3. https://docs.microsoft.com/en-us/azure/storage/blobs/soft-delete-container-enable?tabs=azure-portal + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.8/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.8/SKILL.md new file mode 100644 index 0000000000..d0f6968c62 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.8/SKILL.md @@ -0,0 +1,97 @@ +--- +name: cis-azure-storage-17.8 +description: "Ensure Storage Logging is Enabled for Queue Service for 'Read', 'Write', and 'Delete' requests" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, logging] +cis_id: "17.8" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.8 Ensure Storage Logging is Enabled for Queue Service for 'Read', 'Write', and 'Delete' requests (Automated) + +## Description + +The Storage Queue service stores messages that may be read by any client who has access to the storage account. A queue can contain an unlimited number of messages, each of which can be up to 64KB in size using version 2011-08-18 or newer. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the queues. Storage Logging log entries contain the following information about individual requests: Timing information such as start time, end-to-end latency, and server latency, authentication details, concurrency information, and the sizes of the request and response messages. + +## Rationale + +Storage Analytics logs contain detailed information about successful and failed requests to a storage service. This information can be used to monitor individual requests and to diagnose issues with a storage service. Requests are logged on a best-effort basis. + +Storage Analytics logging is not enabled by default for your storage account. + +## Impact + +Enabling this setting can have a high impact on the cost of the log analytics service and data storage used by logging more data per each request. Do not enable this without determining your need for this level of logging, and do not forget to check in on data usage and projected cost. Some users have seen their logging costs increase from $10 per month to $10,000 per month. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Monitoring`, click `Diagnostics settings`. +3. Select the `queue` tab indented below the storage account. +4. Ensure that at least one diagnostic setting is listed. +5. Click `Edit setting` on a diagnostic setting. +6. Ensure that at least one diagnostic setting has `StorageRead`, `StorageWrite`, and `StorageDelete` options selected under the `Logs` section and that they are sent to an appropriate destination. + +### Audit from Azure CLI + +Ensure the below command's output contains properties `delete`, `read` and `write` set to `true`: + +```bash +az storage logging show --services q --account-name +``` + +### Audit from Azure Policy + +Policy ID: `7bd000e3-37c7-4928-9f31-86c4b77c5c45` - Name: 'Configure diagnostic settings for Queue Services to Log Analytics workspace' + +## Expected Result + +Storage logging should be enabled for Queue Service with `StorageRead`, `StorageWrite`, and `StorageDelete` all enabled. CLI output should show `delete: true`, `read: true`, and `write: true`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Monitoring`, click `Diagnostics settings`. +3. Select the `queue` tab indented below the storage account. +4. To create a new diagnostic setting, click `+ Add diagnostic setting`. To update an existing diagnostic setting, click `Edit setting` on the diagnostic setting. +5. Check the boxes next to `StorageRead`, `StorageWrite`, and `StorageDelete`. +6. Select an appropriate destination. +7. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to enable the Storage Logging for Queue service: + +```bash +az storage logging update --account-name --account-key --services q --log rwd --retention 90 +``` + +## Default Value + +By default storage account queue services are not logged. + +## References + +1. https://docs.microsoft.com/en-us/rest/api/storageservices/about-storage-analytics-logging +2. https://docs.microsoft.com/en-us/cli/azure/storage/logging?view=azure-cli-latest +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-4-enable-network-logging-for-security-investigation +4. https://docs.microsoft.com/en-us/azure/storage/queues/monitor-queue-storage?tabs=azure-portal + +## Additional Information + +We cannot practically generalize detailed audit log requirements for every queue due to their nature and intent. This recommendation may be applicable to storage account queue services where the security is paramount. + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.9/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.9/SKILL.md new file mode 100644 index 0000000000..5061f7b418 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-17.9/SKILL.md @@ -0,0 +1,96 @@ +--- +name: cis-azure-storage-17.9 +description: "Ensure Storage logging is Enabled for Blob Service for 'Read', 'Write', and 'Delete' requests" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-accounts, logging] +cis_id: "17.9" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 17.9 Ensure Storage logging is Enabled for Blob Service for 'Read', 'Write', and 'Delete' requests (Automated) + +## Description + +The Storage Blob service provides scalable, cost-efficient object storage in the cloud. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the blobs. Storage Logging log entries contain the following information about individual requests: timing information such as start time, end-to-end latency, and server latency; authentication details; concurrency information; and the sizes of the request and response messages. + +## Rationale + +Storage Analytics logs contain detailed information about successful and failed requests to a storage service. This information can be used to monitor each individual request to a storage service for increased security or diagnostics. Requests are logged on a best-effort basis. + +Storage Analytics logging is not enabled by default for your storage account. + +## Impact + +Being a level 2, enabling this setting can have a high impact on the cost of data storage used for logging more data per each request. Do not enable this without determining your need for this level of logging or forget to check in on data usage and projected cost. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Monitoring`, click `Diagnostics settings`. +3. Select the `blob` tab indented below the storage account. +4. Ensure that at least one diagnostic setting is listed. +5. Click `Edit setting` on a diagnostic setting. +6. Ensure that at least one diagnostic setting has `StorageRead`, `StorageWrite`, and `StorageDelete` options selected under the `Logs` section and that they are sent to an appropriate destination. + +### Audit from Azure CLI + +Ensure the below command output contains properties delete, read and write set to true: + +```bash +az storage logging show --services b --account-name +``` + +### Audit from Azure Policy + +Policy ID: `b4fe1a3b-0715-4c6c-a5ea-ffc33cf823cb` - Name: 'Configure diagnostic settings for Blob Services to Log Analytics workspace' + +## Expected Result + +Storage logging should be enabled for Blob Service with `StorageRead`, `StorageWrite`, and `StorageDelete` all enabled. CLI output should show `delete: true`, `read: true`, and `write: true`. + +## Remediation + +### Remediate from Azure Portal + +1. Go to `Storage Accounts`. +2. For each storage account, under `Monitoring`, click `Diagnostics settings`. +3. Select the `blob` tab indented below the storage account. +4. To create a new diagnostic setting, click `+ Add diagnostic setting`. To update an existing diagnostic setting, click `Edit setting` on the diagnostic setting. +5. Check the boxes next to `StorageRead`, `StorageWrite`, and `StorageDelete`. +6. Select an appropriate destination. +7. Click `Save`. + +### Remediate from Azure CLI + +Use the below command to enable the Storage Logging for Blob service: + +```bash +az storage logging update --account-name --account-key --services b --log rwd --retention 90 +``` + +## Default Value + +By default, storage account blob service logging is disabled for read, write, and delete operations. + +## References + +1. https://docs.microsoft.com/en-us/rest/api/storageservices/about-storage-analytics-logging +2. https://docs.microsoft.com/en-us/cli/azure/storage/logging?view=azure-cli-latest +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-3-enable-logging-for-security-investigation + +## Additional Information + +We cannot practically generalize detailed audit log requirements for every blob due to their nature and intent. This recommendation may be applicable to storage account blob service where the security is paramount. + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-18.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-18.1/SKILL.md new file mode 100644 index 0000000000..34a5137cab --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-18.1/SKILL.md @@ -0,0 +1,82 @@ +--- +name: cis-azure-storage-18.1 +description: "Ensure that shared access signature (SAS) tokens expire within an hour" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-explorer, sas] +cis_id: "18.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 18.1 Ensure that shared access signature (SAS) tokens expire within an hour (Manual) + +## Description + +Shared access signature (SAS) tokens provide restricted access to Azure Storage resources (such as blobs, files, queues, or tables) for a defined time period with specific permissions. It enables users to interact with the resources without exposing account keys, offering precise control over the permitted actions (e.g., read, write) and the duration of access. To minimize security risks, SAS tokens should be configured with the shortest possible lifespan, ideally lasting no longer than an hour. + +## Rationale + +A short lifespan for SAS tokens is recommended to minimize the risk of unauthorized access. SAS tokens grant time-limited access to resources, and a longer duration increases the opportunity for misuse if the token is compromised. By setting a shorter lifespan, the potential for security breaches is reduced. + +## Impact + +SAS can pose security risks if they are not managed carefully. + +## Audit Procedure + +Currently, SAS token expiration times cannot be audited. Until Microsoft makes the token expiration time a setting rather than a token creation parameter, this recommendation will require manual verification. + +## Expected Result + +All SAS tokens should be configured with an expiry time of one hour or less from the time of creation. + +## Remediation + +### Remediate from Storage Explorer + +If SAS have been created without a short lifespan and were created with a stored access policy (SAP), the SAS can be revoked by deleting the SAP or updating the SAP expiration time to a time in the past: + +1. In Storage Explorer, expand `Storage Accounts`. +2. Expand a storage account. +3. Expand `Blob Containers`, `File Shares`, `Queues`, or `Tables`, and right-click a blob container, file share, queue, or table. +4. Click `Manage Stored Access Policies....` +5. Click the trash icon next to a stored access policy. +6. Click `Save`. +7. Repeat steps 1-6 as needed to revoke SAS created with SAP. + +### Remediate from Azure Portal + +If SAS have been created without a short lifespan and were not created with a SAP, the SAS can be revoked by regenerating the storage account access keys: + +Note: Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Security + networking`, click `Access keys`. +4. Next to each key, click `Rotate key`. +5. Click `Yes` to confirm. +6. Repeat steps 1-5 as needed to revoke SAS. + +## Default Value + +By default, expiration for shared access signature created from Storage Explorer is set to 24 hours. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview +2. https://docs.microsoft.com/en-us/rest/api/storageservices/delegating-access-with-a-shared-access-signature +3. https://learn.microsoft.com/en-us/azure/storage/storage-explorer/vs-azure-tools-storage-explorer-blobs#manage-access-policies-for-a-blob-container + +## Additional Information + +This recommendation is based on the recommendation `Ensure that shared access signature (SAS) tokens expire within an hour`, from the `Common Reference Recommendations > Secrets and Keys > Shared Access Signatures` section. + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-18.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-18.2/SKILL.md new file mode 100644 index 0000000000..f4781a4a4e --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-18.2/SKILL.md @@ -0,0 +1,89 @@ +--- +name: cis-azure-storage-18.2 +description: "Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-explorer, sas] +cis_id: "18.2" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 18.2 Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens (Manual) + +## Description + +Use stored access policies (SAP) when generating shared access signature (SAS) tokens in Azure to centrally manage permissions, expiration, and revocation settings for resource access. Stored access policies can be applied to blob containers, file shares, queues, and tables. + +## Rationale + +Stored access policies provide centralized control over SAS token access, allowing administrators to update permissions or revoke access. This approach strengthens security by reducing the risk of unauthorized access to storage resources. + +## Impact + +There is no cost for creating stored access policies, however there is some administrative overhead involved in managing these policies. + +## Audit Procedure + +It is not currently possible to retrieve a list of all generated SAS tokens to check if they were associated with a SAP during creation. + +An SAS token that has been created with a SAP will contain an `si` parameter that references the stored access policy identifier associated with the SAS, e.g. `si=`. + +The `si` parameter will be absent from an SAS token created without a SAP. + +## Expected Result + +All SAS tokens should contain the `si` parameter referencing a stored access policy identifier. SAS tokens without the `si` parameter are not associated with a stored access policy and are non-compliant. + +## Remediation + +### Remediate from Storage Explorer + +To create a SAP: + +1. In Storage Explorer, expand `Storage Accounts`. +2. Expand a storage account. +3. Expand `Blob Containers`, `File Shares`, `Queues`, or `Tables`, and right-click a blob container, file share, queue, or table. +4. Click `Manage Stored Access Policies....` +5. Under `Access Policies`, click `Add`. +6. Modify the `ID`, `Start time`, `Expiry time`, and permissions appropriately. +7. Click `Save`. +8. Repeat steps 1-7 as needed to create SAP. + +When generating SAS, select a SAP from the `Access policy` drop-down. + +### Remediate from Azure Portal + +If SAS have been created without a SAP, the SAS can be revoked by regenerating the storage account access keys: + +Note: Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. + +1. Go to `Storage accounts`. +2. Click on a storage account. +3. Under `Security + networking`, click `Access keys`. +4. Next to each key, click `Rotate key`. +5. Click `Yes` to confirm. +6. Repeat steps 1-5 as needed to revoke SAS. + +## Default Value + +By default, stored access policies are not associated with SAS. To use a stored access policy, it must be explicitly created and linked to the SAS at the time of creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview#best-practices-when-using-sas +2. https://learn.microsoft.com/en-us/rest/api/storageservices/define-stored-access-policy +3. https://learn.microsoft.com/en-us/azure/storage/storage-explorer/vs-azure-tools-storage-explorer-blobs#manage-access-policies-for-a-blob-container + +## Additional Information + +This recommendation is based on the recommendation `Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens`, from the `Common Reference Recommendations > Secrets and Keys > Shared Access Signatures` section. + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-18.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-18.3/SKILL.md new file mode 100644 index 0000000000..4f68871f99 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-18.3/SKILL.md @@ -0,0 +1,65 @@ +--- +name: cis-azure-storage-18.3 +description: "Ensure Storage Explorer is using the latest version" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, storage-explorer] +cis_id: "18.3" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 18.3 Ensure Storage Explorer is using the latest version (Manual) + +## Description + +Ensure all users accessing Azure Storage resources with Storage Explorer are using the latest version of the software, applying updates promptly to safeguard against new vulnerabilities and benefit from the latest security enhancements. + +## Rationale + +Using the latest version of Storage Explorer is essential for safeguarding access to Azure Storage resources. + +## Impact + +Using the latest version of Storage Explorer is free and requires minimal administrative effort. + +## Audit Procedure + +### Audit from Storage Explorer for MacOS + +1. Go to `Storage Explorer`. +2. From the menu bar, click `Microsoft Azure Storage Explorer`. +3. Click `About`. +4. Check the `Version` listed. +5. Compare the installed version with the latest released version from https://github.com/microsoft/AzureStorageExplorer/releases. +6. Ensure that the installed Storage Explorer version matches the latest released version. + +## Expected Result + +The installed Storage Explorer version should match the latest released version available at https://github.com/microsoft/AzureStorageExplorer/releases. + +## Remediation + +### Remediate from Storage Explorer for MacOS + +1. Go to `Storage Explorer`. +2. From the menu bar, click `Microsoft Azure Storage Explorer`. +3. Click `Check for Updates`. +4. Follow the instructions to install the latest version of Storage Explorer. + +## Default Value + +By default, new installations of Storage Explorer will utilize the latest released version. + +## References + +1. https://github.com/microsoft/AzureStorageExplorer/releases + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.1.1/SKILL.md new file mode 100644 index 0000000000..6bb66326ed --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.1.1/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cis-azure-storage-2.1.1.1 +description: "Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only'" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, sas, encryption, keys] +cis_id: "2.1.1.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1.1.1 Ensure 'Allowed Protocols' for shared access signature (SAS) tokens is set to 'HTTPS Only' (Manual) + +## Description + +Shared access signatures (SAS) can be used to grant limited access to Azure Storage resources. When generating a SAS, it is possible to specify the allowed protocols for a request made with the SAS. It is recommended to allow requests over HTTPS only. + +## Rationale + +If a SAS is passed over HTTP and intercepted, an attacker performing a man-in-the-middle attack can read the SAS. Then, they can use that SAS just as the intended user could have. This can potentially compromise sensitive data or allow for data corruption by the malicious user. + +## Impact + +SAS can pose security risks if they are not managed carefully. + +## Audit Procedure + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies: + +- Azure Blob Storage +- Queue Storage +- Storage Accounts > Secrets and Keys + +## Expected Result + +When generating a SAS token, the `Allowed protocols` field should be set to `HTTPS only`. + +## Remediation + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies: + +- Azure Blob Storage +- Queue Storage +- Storage Accounts > Secrets and Keys + +## Default Value + +When generating a SAS, the default selection for `Allowed protocols` is `HTTPS only`. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview +2. https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage + +## Additional Information + +This recommendation forms the basis for the recommendations with the same title in the following sections: + +- Azure Blob Storage +- Queue Storage +- Storage Accounts > Secrets and Keys +- Storage Explorer + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.10 Encrypt Sensitive Data in Transit - Encrypt sensitive data in transit. Example implementations can include: Transport Layer Security (TLS) and Open Secure Shell (OpenSSH). | | x | x | +| v7 | 14.4 Encrypt All Sensitive Information in Transit - Encrypt all sensitive information in transit. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.1.2/SKILL.md new file mode 100644 index 0000000000..9d8157112d --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.1.2/SKILL.md @@ -0,0 +1,80 @@ +--- +name: cis-azure-storage-2.1.1.2 +description: "Ensure that shared access signature (SAS) tokens expire within an hour" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, sas, encryption, keys] +cis_id: "2.1.1.2" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1.1.2 Ensure that shared access signature (SAS) tokens expire within an hour (Manual) + +## Description + +Shared access signature (SAS) tokens provide restricted access to Azure Storage resources (such as blobs, files, queues, or tables) for a defined time period with specific permissions. It enables users to interact with the resources without exposing account keys, offering precise control over the permitted actions (e.g., read, write) and the duration of access. To minimize security risks, SAS tokens should be configured with the shortest possible lifespan, ideally lasting no longer than an hour. + +## Rationale + +A short lifespan for SAS tokens is recommended to minimize the risk of unauthorized access. SAS tokens grant time-limited access to resources, and a longer duration increases the opportunity for misuse if the token is compromised. By setting a shorter lifespan, the potential for security breaches is reduced. + +## Impact + +SAS can pose security risks if they are not managed carefully. + +## Audit Procedure + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies: + +- Azure Blob Storage +- Queue Storage +- Storage Accounts > Secrets and Keys +- Storage Explorer + +## Expected Result + +SAS tokens should have an expiration time of no more than 1 hour from creation. + +## Remediation + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies: + +- Azure Blob Storage +- Queue Storage +- Storage Accounts > Secrets and Keys +- Storage Explorer + +## Default Value + +By default, expiration for shared access signature is set to 8 hours. + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview +2. https://docs.microsoft.com/en-us/rest/api/storageservices/delegating-access-with-a-shared-access-signature + +## Additional Information + +This recommendation forms the basis for the recommendations with the same title in the following sections: + +- Azure Blob Storage +- Queue Storage +- Storage Accounts > Secrets and Keys +- Storage Explorer + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 6.2 Establish an Access Revoking Process - Establish and follow a process, preferably automated, for revoking access to enterprise assets, through disabling accounts immediately upon termination, rights revocation, or role change of a user. Disabling accounts, instead of deleting accounts, may be necessary to preserve audit trails. | x | x | x | +| v7 | 16.7 Establish Process for Revoking Access - Establish and follow an automated process for revoking system access by disabling accounts immediately upon termination or change of responsibilities of an employee or contractor. Disabling these accounts, instead of deleting accounts, allows preservation of audit trails. | | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.1.3/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.1.3/SKILL.md new file mode 100644 index 0000000000..26e229580b --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.1.3/SKILL.md @@ -0,0 +1,77 @@ +--- +name: cis-azure-storage-2.1.1.3 +description: "Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, sas, encryption, keys] +cis_id: "2.1.1.3" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1.1.3 Ensure stored access policies (SAP) are used when generating shared access signature (SAS) tokens (Manual) + +## Description + +Use stored access policies (SAP) when generating shared access signature (SAS) tokens in Azure to centrally manage permissions, expiration, and revocation settings for resource access. Stored access policies can be applied to blob containers, file shares, queues, and tables. + +## Rationale + +Stored access policies provide centralized control over SAS token access, allowing administrators to update permissions or revoke access. This approach strengthens security by reducing the risk of unauthorized access to storage resources. + +## Impact + +There is no cost for creating stored access policies, however there is some administrative overhead involved in managing these policies. + +## Audit Procedure + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies: + +- Azure Blob Storage +- Queue Storage +- Storage Explorer + +## Expected Result + +SAS tokens should be associated with a stored access policy (SAP) rather than being created with ad-hoc permissions. + +## Remediation + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies: + +- Azure Blob Storage +- Queue Storage +- Storage Explorer + +## Default Value + +By default, stored access policies are not associated with SAS. To use a stored access policy, it must be explicitly created and linked to the SAS at the time of creation. + +## References + +1. https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview#best-practices-when-using-sas +2. https://learn.microsoft.com/en-us/rest/api/storageservices/define-stored-access-policy + +## Additional Information + +This recommendation forms the basis for the recommendations with the same title in the following sections: + +- Azure Blob Storage +- Queue Storage +- Storage Explorer + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 6.2 Establish an Access Revoking Process - Establish and follow a process, preferably automated, for revoking access to enterprise assets, through disabling accounts immediately upon termination, rights revocation, or role change of a user. Disabling accounts, instead of deleting accounts, may be necessary to preserve audit trails. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.2.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.2.1.1/SKILL.md new file mode 100644 index 0000000000..79423a0ae3 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.2.1.1/SKILL.md @@ -0,0 +1,74 @@ +--- +name: cis-azure-storage-2.1.2.1.1 +description: "Ensure Critical Data is Encrypted with Microsoft Managed Keys (MMK)" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, sas, encryption, keys] +cis_id: "2.1.2.1.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1.2.1.1 Ensure Critical Data is Encrypted with Microsoft Managed Keys (MMK) (Manual) + +## Description + +Microsoft Managed Keys (MMK) [also known as Platform-managed keys (PMK)] provides a very low overhead method of encrypting data at rest and implementing encryption key management. Keys maintained in an MMK implementation are automatically managed by Azure and require no customer interaction. + +## Rationale + +The encryption of data at rest is a foundational component of data security. Data at rest without encryption is easily compromised through loss or theft. Encrypting data at rest introduces confidentiality to the data by obfuscating the data contents with a cipher algorithm and provides an authentication requirement through the use of cryptographic keys. MMK makes the encryption of data at rest very easy to implement and maintain. + +## Impact + +Not explicitly stated in the benchmark. MMK provides the lowest overhead approach to encryption at rest with no additional cost or management burden. + +## Audit Procedure + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies. + +## Expected Result + +The encryption type for the storage account should be set to Microsoft Managed Keys (MMK). + +## Remediation + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies. + +## Default Value + +By default, Encryption type is set to Microsoft Managed Keys. + +## References + +1. https://docs.microsoft.com/en-us/azure/security/fundamentals/data-encryption-best-practices#protect-data-at-rest +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-5-use-customer-managed-key-option-in-data-at-rest-encryption-when-required +3. https://learn.microsoft.com/en-us/azure/security/fundamentals/key-management + +## Additional Information + +This recommendation falls under section 2.1.2 Encryption Key Management, which describes three options for Encryption Key Management in Azure Services: + +1. **Microsoft Managed Keys ('MMK')** [Also known as Platform Managed Keys or PMK]: The storage, creation, and maintenance of encryption keys is performed automatically by Microsoft. This option uses the Microsoft key store and automates the control and rotation of keys. Where the security and compliance frameworks implemented by your organization do not specify otherwise, Microsoft Managed Keys is generally preferred, but it should be understood that there is an implied trust that your organization must assume. + +2. **Customer Managed Keys ('CMK')**: The creation and maintenance of encryption keys is the responsibility of the customer but stored in a Microsoft provided vault. This option stores keys in Azure Key Vault or Key Vault HSM, but the control and rotation of keys is performed by the customer. + +3. **Customer Provided Keys ('CPK')**: The storage, control, and rotation of encryption keys is the responsibility of the customer. Your organization must have an independent key storage facility, maintain control and perform rotation of keys. + +The use of each of these methods of managing encryption keys requires careful consideration, and the scope of application should be determined prior to implementation. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data. | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest - Encrypt all sensitive information at rest using a tool that requires a secondary authentication mechanism not integrated into the operating system, in order to access the information. | | | x | + +## Profile + +Level 1 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.2.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.2.2.1/SKILL.md new file mode 100644 index 0000000000..8a722f6d1f --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.1.2.2.1/SKILL.md @@ -0,0 +1,69 @@ +--- +name: cis-azure-storage-2.1.2.2.1 +description: "Ensure Critical Data is Encrypted with Customer Managed Keys (CMK)" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, sas, encryption, keys] +cis_id: "2.1.2.2.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.1.2.2.1 Ensure Critical Data is Encrypted with Customer Managed Keys (CMK) (Manual) + +## Description + +Customer Managed Keys introduce additional depth to security by providing a means to manage access control for encryption keys. Where compliance and security frameworks indicate the need, and organizational capacity allows, sensitive data at rest can be encrypted using Customer Managed Keys (CMK) rather than Microsoft Managed keys. + +## Rationale + +By default in Azure, data at rest tends to be encrypted using Microsoft Managed Keys. If your organization want to control and manage encryption keys for compliance and defense-in-depth, Customer Managed Keys can be established. + +While it is possible to automate the assessment of this recommendation, the assessment status for this recommendation remains 'Manual' due to ideally limited scope. The scope of application - which workloads CMK is applied to - should be carefully considered to account for organizational capacity and targeted to workloads with specific need for CMK. + +## Impact + +If the key expires due to setting the 'activation date' and 'expiration date', the key must be rotated manually. + +Using Customer Managed Keys may also incur additional man-hour requirements to create, store, manage, and protect the keys as needed. + +## Audit Procedure + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies. + +## Expected Result + +The encryption type for the storage account should be set to Customer Managed Keys (CMK), with the key stored in Azure Key Vault or Key Vault HSM. + +## Remediation + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies. + +## Default Value + +By default, Encryption type is set to Microsoft Managed Keys. + +## References + +1. https://docs.microsoft.com/en-us/azure/security/fundamentals/data-encryption-best-practices#protect-data-at-rest +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-5-use-customer-managed-key-option-in-data-at-rest-encryption-when-required + +## Additional Information + +This recommendation falls under section 2.1.2 Encryption Key Management. Customer Managed Keys ('CMK') provide the creation and maintenance of encryption keys as the responsibility of the customer but stored in a Microsoft provided vault. This option stores keys in Azure Key Vault or Key Vault HSM, but the control and rotation of keys is performed by the customer. Encryption Key management introduces some complexity and technical debt to an environment because the creation and maintenance of keys requires technical capacity for maintaining key infrastructure in addition to scripting for automation. For environments that have specific compliance requirements for the control and rotation of keys, this option may be required. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 3.11 Encrypt Sensitive Data at Rest - Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data. | | x | x | +| v7 | 14.8 Encrypt Sensitive Information at Rest - Encrypt all sensitive information at rest using a tool that requires a secondary authentication mechanism not integrated into the operating system, in order to access the information. | | | x | + +## Profile + +Level 2 | Manual diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.2.1.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.2.1.1/SKILL.md new file mode 100644 index 0000000000..0ead85eb0c --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.2.1.1/SKILL.md @@ -0,0 +1,76 @@ +--- +name: cis-azure-storage-2.2.1.1 +description: "Ensure public network access is Disabled" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, networking, private-endpoints, vnet] +cis_id: "2.2.1.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.2.1.1 Ensure public network access is Disabled (Automated) + +## Description + +Disable public network access to prevent exposure to the internet and reduce the risk of unauthorized access. Use private endpoints and Azure Role-Based Access Control (RBAC) to securely manage access within trusted networks. + +## Rationale + +Disabling public network access improves security by ensuring that a service is not exposed on the public internet. + +## Impact + +Disabling public network access restricts access to the service. This enhances security but may require the configuration of private endpoints for any services or users needing access within trusted networks. + +## Audit Procedure + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies: + +- Storage Services > Storage Accounts > Networking > "Ensure that 'Public Network Access' is 'Disabled' for storage accounts" +- Storage Services > Azure Elastic SAN > "Ensure 'Public network access' is set to 'Disabled' on Azure Elastic SAN" +- Storage Services > Azure Backup > Recovery Services Vaults > "Ensure public network access on Recovery Services vaults is Disabled" + +## Expected Result + +The `Public network access` setting should be set to `Disabled` for the service. + +## Remediation + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies: + +- Storage Services > Storage Accounts > Networking > "Ensure that 'Public Network Access' is 'Disabled' for storage accounts" +- Storage Services > Azure Elastic SAN > "Ensure 'Public network access' is set to 'Disabled' on Azure Elastic SAN" +- Storage Services > Azure Backup > Recovery Services Vaults > "Ensure public network access on Recovery Services vaults is Disabled" + +## Default Value + +Not explicitly stated in the benchmark. + +## References + +Not explicitly listed in the Common Reference section. See service-specific recommendations for detailed references. + +## Additional Information + +This Common Reference Recommendation is referenced in the following Service Recommendations: + +- Storage Services > Storage Accounts > Networking > "Ensure that 'Public Network Access' is 'Disabled' for storage accounts" +- Storage Services > Azure Elastic SAN > "Ensure 'Public network access' is set to 'Disabled' on Azure Elastic SAN" +- Storage Services > Azure Backup > Recovery Services Vaults > "Ensure public network access on Recovery Services vaults is Disabled" + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | ---- | ---- | +| v8 | 3.3 Configure Data Access Control Lists - Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications. | x | x | x | +| v7 | 14.6 Protect Information through Access Control Lists - Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. | x | x | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.2.1.2/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.2.1.2/SKILL.md new file mode 100644 index 0000000000..4fcdeb1f90 --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.2.1.2/SKILL.md @@ -0,0 +1,81 @@ +--- +name: cis-azure-storage-2.2.1.2 +description: "Ensure Network Access Rules are set to Deny-by-default" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, networking, private-endpoints, vnet] +cis_id: "2.2.1.2" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.2.1.2 Ensure Network Access Rules are set to Deny-by-default (Automated) + +## Description + +Restricting default network access provides a foundational level of security to networked resources. To limit access to selected networks, the default action must be changed. + +## Rationale + +Resources using Virtual Network interfaces should be configured to deny-by-default all access from all networks (including internet traffic). Access can be granted to traffic from specific Azure Virtual networks, allowing a secure network boundary for specific applications to be built. If necessary, access can also be granted to public internet IP address ranges to enable connections from specific internet or on-premises clients. + +For all traffic inbound from- and outbound to- the internet, a NAT Gateway is recommended at minimum, and ideally all traffic flows through a security gateway device such as a firewall. Security gateway devices will provide an additional level of visibility to inbound and outbound traffic and usually perform advanced monitoring and response activity such as intrusion detection and prevention (IDP), and deep packet inspection (DPI) which help detect activity indicating vulnerabilities and threats. + +## Impact + +All allowed networks and protocols will need to be allow-listed which creates some administrative overhead. + +Implementing a deny-by-default rule may result in a loss of network connectivity. Careful planning and a scheduled implementation window allowing for downtime is highly recommended. + +## Audit Procedure + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies: + +- Storage Services > Storage Accounts > Networking > "Ensure Default Network Access Rule for Storage Accounts is Set to Deny" + +## Expected Result + +The default network access rule for the service should be set to `Deny`, with only explicitly allowed networks and IP ranges having access. + +## Remediation + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies: + +- Storage Services > Storage Accounts > Networking > "Ensure Default Network Access Rule for Storage Accounts is Set to Deny" + +## Default Value + +By default, interfaces attached to virtual networks will accept connections from clients on any network and have a default outbound access rule which allows access to the internet. + +The default outbound access rule is scheduled for retirement on September 30th, 2025: +https://azure.microsoft.com/en-us/updates?id=default-outbound-access-for-vms-in-azure-will-be-retired-transition-to-a-new-method-of-internet-access + +## References + +1. https://docs.microsoft.com/en-us/azure/storage/common/storage-network-security +2. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-governance-strategy#gs-2-define-and-implement-enterprise-segmentationseparation-of-duties-strategy +3. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls + +## Additional Information + +This Common Reference Recommendation is referenced in the following Service Recommendations: + +- Storage Services > Storage Accounts > Networking > "Ensure Default Network Access Rule for Storage Accounts is Set to Deny" + +A NAT gateway is the recommended solution for outbound internet access. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | x | x | +| v7 | 13.3 Monitor and Block Unauthorized Network Traffic - Deploy an automated tool on network perimeters that monitors for unauthorized transfer of sensitive information and blocks such transfers while alerting information security professionals. | | | x | + +## Profile + +Level 1 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.2.2.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.2.2.1/SKILL.md new file mode 100644 index 0000000000..99588d2f7a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-2.2.2.1/SKILL.md @@ -0,0 +1,68 @@ +--- +name: cis-azure-storage-2.2.2.1 +description: "Ensure Private Endpoints are used to access service" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, networking, private-endpoints, vnet] +cis_id: "2.2.2.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 2.2.2.1 Ensure Private Endpoints are used to access {service} (Automated) + +## Description + +Use private endpoints to allow clients and services to securely access data located over a network via an encrypted Private Link. To do this, the private endpoint uses an IP address from the VNet for each service. Network traffic between disparate services securely traverses encrypted over the VNet. This VNet can also link addressing space, extending your network and accessing resources on it. Similarly, it can be a tunnel through public networks to connect remote infrastructures together. This creates further security through segmenting network traffic and preventing outside sources from accessing it. + +## Rationale + +Securing traffic between services through encryption protects the data from easy interception and reading. + +## Impact + +A Private Endpoint costs approximately US$7.30 per month. If an Azure Virtual Network is not implemented correctly, this may result in the loss of critical network traffic. + +## Audit Procedure + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies. + +## Expected Result + +Private Endpoints should be configured and used for accessing the service, with traffic routed through the VNet rather than over the public internet. + +## Remediation + +This is a Common Reference Recommendation. Audit and remediation procedures with full details will be found in the section dedicated to each specific service where this recommendation applies. + +## Default Value + +By default, Private Endpoints are not created for services. + +## References + +1. https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview +2. https://docs.microsoft.com/en-us/azure/private-link/create-private-endpoint-portal +3. https://docs.microsoft.com/en-us/azure/private-link/create-private-endpoint-cli?tabs=dynamic-ip +4. https://docs.microsoft.com/en-us/azure/private-link/create-private-endpoint-powershell?tabs=dynamic-ip +5. https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-2-secure-cloud-native-services-with-network-controls + +## Additional Information + +A NAT gateway is the recommended solution for outbound internet access. + +## CIS Controls + +| Controls Version | Control | IG 1 | IG 2 | IG 3 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ---- | ---- | +| v8 | 12.2 Establish and Maintain a Secure Network Architecture - Establish and maintain a secure network architecture. A secure network architecture must address segmentation, least privilege, and availability, at a minimum. | | x | x | +| v7 | 14.1 Segment the Network Based on Sensitivity - Segment the network based on the label or classification level of the information stored on the servers, locate all sensitive information on separated Virtual Local Area Networks (VLANs). | | x | x | + +## Profile + +Level 2 | Automated diff --git a/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-4.1/SKILL.md b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-4.1/SKILL.md new file mode 100644 index 0000000000..d50ea2e33a --- /dev/null +++ b/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Storage_Services_Benchmark_v1.0.0/cis-azure-storage-4.1/SKILL.md @@ -0,0 +1,158 @@ +--- +name: cis-azure-storage-4.1 +description: "Ensure 'Key encryption key' is set to a customer-managed key for Azure Managed Lustre file systems" +category: cis-azure-storage +version: "1.0.0" +author: cyberstrike-official +tags: [cis, azure, storage, managed-lustre, encryption, cmk] +cis_id: "4.1" +cis_benchmark: "CIS Microsoft Azure Storage Services Benchmark v1.0.0" +tech_stack: [azure] +cwe_ids: [] +chains_with: [] +prerequisites: [] +severity_boost: {} +--- + +# 4.1 Ensure 'Key encryption key' is set to a customer-managed key for Azure Managed Lustre file systems (Automated) + +## Description + +Enable customer-managed encryption keys (CMEK) for Azure Managed Lustre file systems to enhance data security and provide greater control over encryption processes. By using CMEK, organizations can manage their own encryption keys within Azure Key Vault, allowing them to rotate, revoke, or otherwise control access to these keys in accordance with their security policies. + +## Rationale + +Using customer-managed encryption keys (CMEK) gives organizations complete control over encryption keys, ensuring compliance and enhancing data security. CMEK allows for key rotation, revocation, and lifecycle management, thus improving data protection and facilitating immediate control over data access in Azure Managed Lustre file systems. + +## Impact + +There are costs and configuration overhead associated with setting up and managing customer-managed keys. + +## Audit Procedure + +### Audit from Azure Portal + +1. Go to `Azure Managed Lustre`. +2. Click the name of a file system. +3. Under `Settings`, click `Properties`. +4. Under `Encryption settings`, ensure that the value next to `Key encryption key` is `View value as JSON`. +5. Repeat steps 1-4 for each file system. + +### Audit from Azure CLI + +Run the following command to list Azure Managed Lustre file systems: + +```bash +az amlfs list +``` + +For each file system, run the following command: + +```bash +az amlfs show --resource-group --name +``` + +Ensure that under `encryptionSettings` > `keyEncryptionKey`, `keyUrl` is set to a customer-managed key URL. + +### Audit from PowerShell + +Run the following command to install the `Az.StorageCache` module: + +```powershell +Install-Module Az.StorageCache +``` + +Enter `Y` when prompted. + +Run the following command to list Azure Managed Lustre file systems: + +```powershell +Get-AzStorageCacheAmlFileSystem +``` + +Run the following command to get the file system in a resource group with a given name: + +```powershell +$filesystem = Get-AzStorageCacheAmlFileSystem -ResourceGroupName -Name +``` + +Run the following command to get the key encryption key URL for the file system: + +```powershell +$filesystem.KeyEncryptionKeyUrl +``` + +Ensure that the command returns a customer-managed key URL. +Repeat for each file system. + +## Expected Result + +The `Key encryption key` value should show `View value as JSON` in the Azure Portal, or `encryptionSettings.keyEncryptionKey.keyUrl` should be set to a customer-managed key URL in CLI/PowerShell output. + +## Remediation + +### Remediate from Azure Portal + +To create an Azure Managed Lustre file system that uses a customer-managed encryption key: + +1. Go to `Azure Managed Lustre`. +2. Click `+ Create`. +3. Provide the required information on the `Basics` tab. +4. Configure the `Advanced` tab if necessary. +5. Click the `Disk encryption keys` tab. +6. Next to `Disk encryption key type`, select the radio button next to `Customer managed`. +7. Next to `Key vault, key and version`, click `Select or create a key vault, key, or version`. +8. Select a key vault, key, and version. +9. Click `Select`. +10. Next to `User assigned identities`, click `Add user assigned managed identities`. +11. In the filter box, type to filter by identity name and/or resource group name. +12. Check the box next to a managed identity. +13. Click `Add`. +14. Click `Review + create`. +15. Click `Create`. + +### Remediate from Azure CLI + +Run the following command to create an Azure Managed Lustre file system with a customer-managed encryption key: + +```bash +az amlfs create --resource-group --name --sku --storage-capacity --zones [] --maintenance-window "{dayOfWeek:,timeOfDayUtc:'