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 IBM QRadar · QRadar

Detect Asymmetric Public-Key Encrypted Archive Exfiltration (GPG/OpenSSL/age) in IBM QRadar

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

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT
    DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') AS EventTime,
    hostname AS Hostname,
    username AS User,
    "Process Name" AS ProcessName,
    "Command Line" AS CommandLine,
    destinationip AS DestinationIP,
    destinationport AS DestinationPort,
    LOGSOURCETYPENAME(logsourceid) AS LogSourceType,
    'AsymmetricEncryptedExfil' AS ThreatType
FROM events
WHERE LOGSOURCETYPENAME(logsourceid) IN ('Microsoft Windows Security Event Log', 'Sysmon')
  AND (
    (
        "Process Name" MATCHES '.*(gpg|gpg2|openssl|age)\.exe$'
        AND "Command Line" MATCHES '.*(--recipient|-r |smime).*'
        AND "Command Line" NOT MATCHES '.*(--symmetric|--passphrase|-c ).*'
    )
    OR (
        destinationport IN (443, 80, 21)
        AND qidname(qid) = 'Firewall Permit'
    )
  )
  AND starttime > NOW() - 86400000
ORDER BY starttime DESC
LIMIT 500
high severity medium confidence

QRadar AQL query detecting asymmetric public-key encryption tooling (gpg/gpg2/openssl/age invoked with a recipient flag rather than a symmetric passphrase) via WinCollect-sourced Sysmon/Security events, correlated against permitted outbound connections on HTTP(S)/FTP ports recorded by firewall log sources. Requires the 'Process Name' and 'Command Line' custom event properties to be extracted from the Windows/Sysmon DSM.

Data Sources

IBM QRadar SIEMMicrosoft Windows Security Event Log (via WinCollect)Sysmon Events (via WinCollect or Universal DSM)Firewall permit logs

Required Tables

events

False Positives & Tuning

  • Build/release automation using gpg or openssl smime against a known partner public key on a schedule — suppress by whitelisting the known process hash/service account in a QRadar reference set
  • Backup jobs generating regular firewall-permitted outbound connections on 443/80/21 to known offsite targets — populate a reference set of authorized destination IPs and exclude matching destinationip values

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.