# T1486 - Data Encrypted for Impact

## Description from ATT&CK

> Adversaries may encrypt data on target systems or on large numbers of systems in a network to interrupt availability to system and network resources. They can attempt to render stored data inaccessible by encrypting files or data on local and remote drives and withholding access to a decryption key. This may be done in order to extract monetary compensation from a victim in exchange for decryption or a decryption key (ransomware) or to render data permanently inaccessible in cases where the key is not saved or transmitted.(Citation: US-CERT Ransomware 2016)(Citation: FireEye WannaCry 2017)(Citation: US-CERT NotPetya 2017)(Citation: US-CERT SamSam 2018)
> 
> In the case of ransomware, it is typical that common user files like Office documents, PDFs, images, videos, audio, text, and source code files will be encrypted (and often renamed and/or tagged with specific file markers). Adversaries may need to first employ other behaviors, such as [File and Directory Permissions Modification](https://attack.mitre.org/techniques/T1222) or [System Shutdown/Reboot](https://attack.mitre.org/techniques/T1529), in order to unlock and/or gain access to manipulate these files.(Citation: CarbonBlack Conti July 2020) In some cases, adversaries may encrypt critical system files, disk partitions, and the MBR.(Citation: US-CERT NotPetya 2017) Adversaries may also encrypt virtual machines hosted on ESXi or other hypervisors.(Citation: Crowdstrike Hypervisor Jackpotting Pt 2 2021)
> 
> To maximize impact on the target organization, malware designed for encrypting data may have worm-like features to propagate across a network by leveraging other attack techniques like [Valid Accounts](https://attack.mitre.org/techniques/T1078), [OS Credential Dumping](https://attack.mitre.org/techniques/T1003), and [SMB/Windows Admin Shares](https://attack.mitre.org/techniques/T1021/002).(Citation: FireEye WannaCry 2017)(Citation: US-CERT NotPetya 2017) Encryption malware may also leverage [Internal Defacement](https://attack.mitre.org/techniques/T1491/001), such as changing victim wallpapers or ESXi server login messages, or otherwise intimidate victims by sending ransom notes or other messages to connected printers (known as "print bombing").(Citation: NHS Digital Egregor Nov 2020)(Citation: Varonis)
> 
> In cloud environments, storage objects within compromised accounts may also be encrypted.(Citation: Rhino S3 Ransomware Part 1) For example, in AWS environments, adversaries may leverage services such as AWS’s Server-Side Encryption with Customer Provided Keys (SSE-C) to encrypt data.(Citation: Halcyon AWS Ransomware 2025)

[Source](https://attack.mitre.org/techniques/T1486)

## Atomic Tests

- [Atomic Test #1: Encrypt files using gpg (FreeBSD/Linux)](#atomic-test-1-encrypt-files-using-gpg-freebsdlinux)
- [Atomic Test #2: Encrypt files using 7z (FreeBSD/Linux)](#atomic-test-2-encrypt-files-using-7z-freebsdlinux)
- [Atomic Test #3: Encrypt files using ccrypt (FreeBSD/Linux)](#atomic-test-3-encrypt-files-using-ccrypt-freebsdlinux)
- [Atomic Test #4: Encrypt files using openssl (FreeBSD/Linux)](#atomic-test-4-encrypt-files-using-openssl-freebsdlinux)
- [Atomic Test #5: PureLocker Ransom Note](#atomic-test-5-purelocker-ransom-note)
- [Atomic Test #6: Encrypt files using 7z utility - macOS](#atomic-test-6-encrypt-files-using-7z-utility---macos)
- [Atomic Test #7: Encrypt files using openssl utility - macOS](#atomic-test-7-encrypt-files-using-openssl-utility---macos)
- [Atomic Test #8: Data Encrypted with GPG4Win](#atomic-test-8-data-encrypted-with-gpg4win)
- [Atomic Test #9: Data Encrypt Using DiskCryptor](#atomic-test-9-data-encrypt-using-diskcryptor)
- [Atomic Test #10: Akira Ransomware drop Files with .akira Extension and Ransomnote](#atomic-test-10-akira-ransomware-drop-files-with-akira-extension-and-ransomnote)

### Atomic Test #1: Encrypt files using gpg (FreeBSD/Linux)

Uses gpg to encrypt a file

**Supported Platforms:** Linux

**auto_generated_guid:** `7b8ce084-3922-4618-8d22-95f996173765`

#### Inputs

| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
| pwd_for_encrypted_file | the password that you want for the encrypted file | string | passwd|
| encrypted_file_path | path to the encrypted file | path | /tmp/passwd.gpg|
| input_file_path | path to the file that you want to encrypt | path | /etc/passwd|
| encryption_alg | encryption algorithm of the file | string | AES-256|

#### Attack Commands: Run with `sh`!

```sh
echo "#{pwd_for_encrypted_file}" | $which_gpg --batch --yes --passphrase-fd 0 --cipher-algo #{encryption_alg} -o #{encrypted_file_path} -c #{input_file_path}
```

#### Cleanup Commands

```sh
rm #{encrypted_file_path}
```

#### Dependencies: Run with `bash`!

##### Description: Finds where gpg is located

###### Check Prereq Commands

```bash
which_gpg=`which gpg`
```

###### Get Prereq Commands

```bash
(which pkg && pkg install -y gnupg)||(which yum && yum -y install epel-release gpg)||(which apt-get && DEBIAN_FRONTEND=noninteractive apt-get install -y gpg)
```

### Atomic Test #2: Encrypt files using 7z (FreeBSD/Linux)

Uses 7z to encrypt a file

**Supported Platforms:** Linux

**auto_generated_guid:** `53e6735a-4727-44cc-b35b-237682a151ad`

#### Inputs

| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
| pwd_for_encrypted_file | the password that you want for the encrypted file | string | passwd|
| encrypted_file_path | path to the encrypted file | path | /tmp/passwd.zip|
| input_file_path | path to the file that you want to encrypt | path | /etc/passwd|

#### Attack Commands: Run with `sh`!

```sh
$which_7z a -p#{pwd_for_encrypted_file} #{encrypted_file_path} #{input_file_path}
```

#### Cleanup Commands

```sh
$which_7z e #{encrypted_file_path}
rm #{encrypted_file_path}
```

#### Dependencies: Run with `bash`!

##### Description: Finds where 7z is located

###### Check Prereq Commands

```bash
which_7z=`which 7z`
```

###### Get Prereq Commands

```bash
(which pkg && pkg install -y 7-zip)
```

### Atomic Test #3: Encrypt files using ccrypt (FreeBSD/Linux)

Attempts to encrypt data on target systems as root to simulate an interruption authentication to target system. If root permissions are not available then attempts to encrypt data within user's home directory.

**Supported Platforms:** Linux

**auto_generated_guid:** `08cbf59f-85da-4369-a5f4-049cffd7709f`

#### Inputs

| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
| cped_file_path | Path where you want your copied file to be | path | /tmp/passwd|
| root_input_file_path | Path the target file to be encrypted. File will be copied to /tmp/ before encrypting | path | /etc/passwd|
| pwd_for_encrypted_file | Password to use for encryption | string | passwd|

#### Attack Commands: Run with `sh`!

```sh
which_ccencrypt=`which ccencrypt`
cp #{roo