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 Pro
THREAT-Exfiltration-GPGAsymmetricArchiveExfil Google Chronicle · YARA-L

Detect Asymmetric Public-Key Encrypted Archive Exfiltration (GPG/OpenSSL/age) in Google Chronicle

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.

MITRE ATT&CK

Tactic
Exfiltration

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule asymmetric_encrypted_archive_exfil {
  meta:
    author = "df00tech"
    description = "Detects public-key (asymmetric) encryption of staged data via gpg/openssl/age followed by an outbound transfer"
    severity = "HIGH"
    mitre_attack_tactic = "Exfiltration"
    mitre_attack_technique = "T1048.002"
    reference = "https://attack.mitre.org/techniques/T1048/002/"

  events:
    $proc.metadata.event_type = "PROCESS_LAUNCH"
    re.regex($proc.target.process.file.full_path, `(?i)(gpg|gpg2|openssl|age)(\.exe)?$`)
    re.regex($proc.target.process.command_line, `(?i)(--recipient|-r |smime)`)
    $net.metadata.event_type = "NETWORK_CONNECTION"
    $net.target.port = 443 or $net.target.port = 80 or $net.target.port = 21
    $proc.principal.hostname = $net.principal.hostname

  match:
    $proc.principal.hostname over 15m

  condition:
    $proc and $net
}
high severity medium confidence

Chronicle YARA-L 2.0 rule matching PROCESS_LAUNCH and NETWORK_CONNECTION UDM events within a 15-minute window per host, detecting gpg/gpg2/openssl/age invoked with a public-key recipient flag followed by an outbound connection on an HTTP(S)/FTP port — the asymmetric-encrypt-then-transfer pattern for T1048.002.

Data Sources

Google Chronicle SIEMChronicle UDM (Unified Data Model)Chronicle Forwarder (Windows Events)

Required Tables

UDM Events (PROCESS_LAUNCH, NETWORK_CONNECTION)

False Positives & Tuning

  • Release/build automation with a single outbound connection to a known partner endpoint for artifact delivery — maintain a Chronicle reference list of authorized process.file.full_path values and recipient key IDs and exclude matches
  • Backup agents installed as scheduled tasks with legitimate outbound connections following a scheduled gpg-encrypt step

Other platforms 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.

  1. 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.

  2. 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.

  3. 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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections

Detection Variants (1)

Different telemetry and tradecraft for the same technique — pick the one that matches the data you collect.