Skip to main content

Non-encrypted confidential information - EFS

Description

The AWS Elastic File System (EFS) service is encrypted with a default KMS key. Best practices recommend encrypting EFS instances using Customer Managed Keys (CMKs) to reduce risk of exposure and give full control of encrypted information.

Impact

Obtain confidential information from file system

Recommendation

Enable the EFS encryption using a KMS Customer Managed Key (CMK)

Threat

Anonymous attacker with local access to one or more EFS instances

Expected Remediation Time

⌚ 20 minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the vulnerability.

Base

  • Attack vector: N
  • Attack complexity: H
  • Privileges required: N
  • User interaction: N
  • Scope: U
  • Confidentiality: L
  • Integrity: N
  • Availability: N

Temporal

  • Exploit code madurity: P
  • Remediation level: O
  • Report confidence: C

Result

  • Vector string: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P/RL:O/RC:C
  • Score:
    • Base: 3.7
    • Temporal: 3.4
  • Severity:
    • Base: Low
    • Temporal: Low

Code Examples

Compliant code

The resource has encryption correctly configured with a KMS Key

Resources:
FileSystemResource:
Type: 'AWS::EFS::FileSystem'
Properties:
AvailabilityZoneName: us-east-1a
BackupPolicy:
Status: ENABLED
Encrypted: true
KMS_Key: ${encrypted_key}

Non compliant code

The resource does not have encryption correctly set up

Resources:
FileSystemResource:
Type: 'AWS::EFS::FileSystem'
Properties:
AvailabilityZoneName: us-east-1a
BackupPolicy:
Status: ENABLED
Encrypted: false

Terraform example

resource "aws_efs_file_system" "enabled" {
creation_token = "example"
encrypted = false
}

Using the AWS CLI, the following command checks if the EFS file systems are encrypted

$ aws efs describe-file-systems
--region us-east-1
--file-system-id {fs_id}
--query 'FileSystems[*].Encrypted'

If the command output returns false, the file system is unencrypted.

Details

https://docs.bridgecrew.io/docs/bc_aws_general_104

Requirements

free trial

Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.