Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for THREAT-Exfiltration-GPGAsymmetricArchiveExfil.
Upgrade to ProAsymmetric Public-Key Encrypted Archive Exfiltration (GPG/OpenSSL/age)
Rather than relying on a shared secret or a symmetric session key that could be recovered from memory forensics or a network capture, some adversaries and malicious insiders encrypt staged data with an attacker-controlled public key before it ever leaves the host. Tooling observed for this includes GPG/GPG2 invoked with `--recipient`/`-r` against a hardcoded or embedded public key (as opposed to `--symmetric`/`-c`, which uses a shared passphrase), `openssl smime -encrypt` against a recipient certificate, and the modern `age` utility invoked with `-r`/`--recipient` rather than `-p`/`--passphrase`. Because only the holder of the corresponding private key can ever decrypt the resulting `.gpg`/`.pgp`/`.p7m`/`.age` file, this defeats DLP content inspection and gives defenders no way to recover the plaintext even with full access to the transfer, unlike a password-protected archive whose passphrase might be brute-forced or recovered from the intruder's session. The encrypted archive is then moved off-host over a generic channel — a `curl`/`Invoke-WebRequest` upload to a file-sharing, paste, or webhook endpoint, or a drop into cloud storage — that is deliberately decoupled from any tasking/C2 channel already in use, so the exfiltration blends in with ordinary outbound HTTPS traffic. This pattern shows up both in insider IP theft (an employee quietly PGP-encrypting a document set to their personal key before uploading it) and in ransomware-affiliate double-extortion tooling that stages and asymmetrically encrypts a batch of high-value files immediately before the encryptor payload runs.
What is THREAT-Exfiltration-GPGAsymmetricArchiveExfil Asymmetric Public-Key Encrypted Archive Exfiltration (GPG/OpenSSL/age)?
Asymmetric Public-Key Encrypted Archive Exfiltration (GPG/OpenSSL/age) (THREAT-Exfiltration-GPGAsymmetricArchiveExfil) maps to the Exfiltration tactic — the adversary is trying to steal data in MITRE ATT&CK.
This page provides production-ready detection logic for Asymmetric Public-Key Encrypted Archive Exfiltration (GPG/OpenSSL/age), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint (DeviceProcessEvents, DeviceFileEvents, DeviceNetworkEvents), Sysmon Event ID 1, 3, 11. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Exfiltration
let EncTargetExt = dynamic([".gpg", ".pgp", ".asc", ".p7m", ".age"]);
// Signal 1: gpg/openssl/age invoked with a public-key recipient flag rather than a symmetric passphrase flag
let AsymmetricEncryptionInvoked = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("gpg.exe", "gpg2.exe", "openssl.exe", "age.exe")
| where (FileName in~ ("gpg.exe", "gpg2.exe") and ProcessCommandLine has_any ("--recipient", "-r ") and not(ProcessCommandLine has_any ("--symmetric", "-c ", "--passphrase")))
or (FileName =~ "openssl.exe" and ProcessCommandLine has "smime" and ProcessCommandLine has_any ("-encrypt", "-enc"))
or (FileName =~ "age.exe" and ProcessCommandLine has_any ("-r ", "--recipient") and not(ProcessCommandLine has_any ("-p", "--passphrase")))
| extend Signal = "AsymmetricEncryptionInvoked", RiskScore = 55
| project Timestamp, DeviceName, AccountName = InitiatingProcessAccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, Signal, RiskScore;
// Signal 2: an asymmetrically-encrypted output artifact is written to disk
let EncryptedOutputCreated = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType == "FileCreated"
| where FileName has_any (EncTargetExt)
| extend Signal = "EncryptedOutputFileCreated", RiskScore = 40
| project Timestamp, DeviceName, AccountName = InitiatingProcessAccountName, FileName, ProcessCommandLine = FolderPath, InitiatingProcessFileName, Signal, RiskScore;
// Signal 3: several distinct encrypted archives staged by the same process in a short window
let BulkAsymmetricStaging = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType == "FileCreated"
| where FileName has_any (EncTargetExt)
| summarize DistinctFiles = dcount(FileName), Paths = make_set(FolderPath, 5) by DeviceName, AccountName = InitiatingProcessAccountName, InitiatingProcessFileName, bin(Timestamp, 15m)
| where DistinctFiles >= 5
| extend Signal = "BulkAsymmetricStaging", RiskScore = 70
| project Timestamp, DeviceName, AccountName, FileName = "(multiple)", ProcessCommandLine = strcat("DistinctFiles=", tostring(DistinctFiles)), InitiatingProcessFileName, Signal, RiskScore;
// Signal 4: an outbound connection to a public host follows creation of the encrypted artifact within 10 minutes
let PostEncryptionUpload = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType == "FileCreated"
| where FileName has_any (EncTargetExt)
| project EncTime = Timestamp, DeviceName, EncFileName = FileName, EncProcess = InitiatingProcessFileName
| join kind=inner (
DeviceNetworkEvents
| where Timestamp > ago(24h)
| where ActionType =~ "ConnectionSuccess"
| where RemoteIPType == "Public"
| where RemotePort in (443, 80, 21)
| project NetTime = Timestamp, DeviceName, NetProcess = InitiatingProcessFileName, RemoteIP, RemotePort
) on DeviceName
| where (NetTime - EncTime) between (0min .. 10min)
| extend Signal = "PostEncryptionUpload", RiskScore = 85
| project Timestamp = NetTime, DeviceName, AccountName = "", FileName = EncFileName, ProcessCommandLine = strcat(tostring(RemoteIP), ":", tostring(RemotePort)), InitiatingProcessFileName = NetProcess, Signal, RiskScore;
union AsymmetricEncryptionInvoked, EncryptedOutputCreated, BulkAsymmetricStaging, PostEncryptionUpload
| sort by RiskScore desc, Timestamp desc Four-signal detection using Microsoft Defender for Endpoint telemetry: (1) gpg/gpg2/openssl/age invoked with a public-key recipient flag rather than a symmetric passphrase flag, indicating attacker-controlled asymmetric encryption; (2) creation of a .gpg/.pgp/.asc/.p7m/.age output artifact; (3) five or more distinct encrypted artifacts staged by one process within 15 minutes, indicating bulk pre-exfil staging; (4) an outbound connection to a public IP on an HTTP(S)/FTP port from the same host within 10 minutes of an encrypted artifact being written, indicating the encrypted archive was moved off-host.
Data Sources
Required Tables
False Positives
- Developers or CI/CD pipelines using gpg/openssl smime to encrypt release artifacts or secrets to a partner's or vendor's public key as part of a legitimate release/handoff process — correlate against known build-service accounts and expected recipient key IDs.
- IT or backup administrators using gpg or openssl to encrypt backup exports before uploading to an approved offsite or cloud backup target — allowlist the known backup service account and destination host.
- S/MIME or PGP email encryption performed through an approved mail client rather than the raw command-line tool — exclude processes spawned by Outlook/Thunderbird plugin helpers.
- Compliance or log-archival tooling that automatically GPG-encrypts audit exports before moving them to cold storage — allowlist the known scheduled task and destination.
Sigma rule & cross-platform mapping
The detection logic for Asymmetric Public-Key Encrypted Archive Exfiltration (GPG/OpenSSL/age) (THREAT-Exfiltration-GPGAsymmetricArchiveExfil) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: process_creation
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for THREAT-Exfiltration-GPGAsymmetricArchiveExfil
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Simulate GPG Public-Key Encryption of Staged Files
Expected signal: Sysmon Event ID 1 for gpg.exe launched with --recipient and --encrypt in the command line; Sysmon Event ID 11 for the resulting .gpg output files.
- Test 2Simulate Bulk Asymmetric Staging
Expected signal: Sysmon Event ID 11 showing six .gpg files created by the same process within a 15-minute window.
- Test 3Simulate Post-Encryption Upload of an Asymmetrically-Encrypted Archive
Expected signal: Sysmon Event ID 11 for the .gpg file creation followed within minutes by Sysmon Event ID 3 showing an outbound HTTPS connection to the test endpoint from powershell.exe.
Unlock playbooks & atomic tests with Pro
Get the full detection package for THREAT-Exfiltration-GPGAsymmetricArchiveExfil — response playbook and atomic red team tests, plus investigation guidance and hunting queries.
df00tech Pro — £29/user/month
Related Detections
Tactic Hub
Detection Variants (1)
Different telemetry and tradecraft for the same technique — pick the one that matches the data you collect.