T1560.003 Elastic Security · Elastic

Detect Archive via Custom Method in Elastic Security

An adversary may compress or encrypt data collected prior to exfiltration using a custom method rather than standard archive utilities. Custom implementations include XOR loops with static keys, stream ciphers (RC4, ChaCha20), block ciphers (Blowfish), byte rotation schemes, and substitution ciphers — all implemented inline in malware code or scripts without referencing external libraries or system utilities. This technique allows adversaries to transform staged data in a way that evades detection rules targeting standard archivers (7-Zip, WinRAR, zip) while also obfuscating data contents during staging and exfiltration. Threat actors employing this technique include FIN6 (single-byte XOR with key 0xAA, plus Base64 with character permutation), CopyKittens (substitution cipher), and malware families including Attor (custom Blowfish+RSA), BLUELIGHT (XOR binary blob), StrongPity (repeated XOR producing .sft archive parts), Duqu (zlib+XOR), RGDoor (XOR before C2 transmission), RawPOS (XOR-encoded POS card data), and FoggyWeb (dynamic XOR key with WebP steganography).

MITRE ATT&CK

Tactic
Collection
Technique
T1560 Archive Collected Data
Sub-technique
T1560.003 Archive via Custom Method
Canonical reference
https://attack.mitre.org/techniques/T1560/003/

Elastic Detection Query

Elastic Security (Elastic)
eql
any where
  (
    event.category == "process" and event.type == "start" and
    process.name in~ ("powershell.exe", "pwsh.exe", "python.exe", "python3.exe", "wscript.exe", "cscript.exe", "cmd.exe") and
    (
      process.command_line : ("*-bxor*", "*BitXor*", "*xorkey*", "*xor_key*", "*xorBytes*", "*XorEncrypt*", "*0xAA*", "*0x23*", "*bxor 0x*", "*ByteXor*", "*XorFile*") or
      process.command_line : ("*blowfish*", "* rc4 *", "*arcfour*", "*stream cipher*", "*substitution*", "*rot13*", "*rotl(*", "*rotr(*", "*custom encrypt*", "*xor cipher*", "*xor encrypt*")
    )
  ) or
  (
    event.category == "file" and event.type == "creation" and
    file.extension in~ ("sft", "enc", "crypt", "xor", "locked", "rms") and
    not process.name in~ ("7z.exe", "winrar.exe", "winzip.exe", "pkzip.exe", "zip.exe", "tar.exe", "gzip.exe", "bzip2.exe") and
    not file.path : ("*\\Windows\\*", "*\\Program Files\\*")
  )
high severity medium confidence

Detects T1560.003 Archive via Custom Method across two branches: (1) scripting engines (PowerShell, Python, WScript, CScript, CMD) executing inline XOR loops or named custom cipher routines (-bxor, BitXor, RC4, Blowfish, ROT13, etc.) in their command line; (2) bulk creation (5+ files) of non-standard encrypted output extensions (.sft, .enc, .crypt, .xor, .locked, .rms) by processes that are not known archiver utilities. Covers threat actor patterns from FIN6 (0xAA XOR + Base64), StrongPity (.sft archive parts), RawPOS (XOR card data), and CopyKittens (substitution cipher).

Data Sources

Elastic Endpoint Security (ECS process and file events)Winlogbeat with Sysmon module (ECS-normalized)Elastic Agent with Windows integration

Required Tables

logs-endpoint.events.process-*logs-endpoint.events.file-*winlogbeat-*.ds-logs-windows.sysmon_operational-*

False Positives & Tuning

  • PowerShell administration scripts performing bitwise XOR for legitimate data masking, checksum calculations, or flag manipulation (e.g., AD attribute bitmask checks using -bxor).
  • Python-based data engineering or ETL pipelines that implement RC4, Blowfish, or XOR for backward-compatible format handling with legacy systems.
  • Authorized red team or penetration testing tooling invoking custom crypto primitives on systems where an engagement is in progress; cross-reference with change-management records.
  • Backup or archival agents (Veeam, Acronis custom scripts) that write intermediate encrypted chunks with non-standard extensions before repackaging.
  • Security research or CTF training environments where XOR encoding is intentionally exercised for educational purposes.
Download portable Sigma rule (.yml)

Other platforms for T1560.003


Testing Methodology

Validate this detection against 4 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 1PowerShell Single-Byte XOR Encryption of Staged Files (FIN6-style)

    Expected signal: Sysmon Event ID 1: powershell.exe Process Create with CommandLine containing '-bxor', '0xAA', 'ReadAllBytes', and 'WriteAllBytes'. Sysmon Event ID 11: 3 FileCreate events for .enc files in %TEMP%\xor_out. PowerShell ScriptBlock Log Event ID 4104 capturing full encryption loop with key constant 0xAA. DeviceFileEvents: FileCreated events for each .enc output file with InitiatingProcessFileName=powershell.exe.

  2. Test 2Python Custom RC4 Stream Cipher Encryption (Rising Sun-style)

    Expected signal: Sysmon Event ID 1: python3.exe Process Create with CommandLine containing 'rc4_encrypt', 'xorkey', and 'base64' keywords. Sysmon Event ID 11: 2 FileCreate events for .crypt files in %TEMP%\rc4_out. DeviceProcessEvents: python3.exe with ProcessCommandLine matching rc4 and xorkey patterns.

  3. Test 3PowerShell Byte Rotation with XOR (SPACESHIP/APT30-style)

    Expected signal: Sysmon Event ID 1: powershell.exe Process Create with CommandLine containing '-bxor', '0x23', '-shl', '-shr', '-band'. Sysmon Event ID 11: FileCreate event for spaceship_test.xor in %TEMP%. PowerShell ScriptBlock Log Event ID 4104 with full rotation and XOR implementation including the 0x23 constant.

  4. Test 4Bulk .sft File Creation (StrongPity-style Custom Archive Output)

    Expected signal: Sysmon Event ID 11: 8 FileCreate events for archive_part1.sft through archive_part8.sft all within seconds, from powershell.exe in %TEMP%\sft_staging. DeviceFileEvents: 8 FileCreated entries with .sft extension, InitiatingProcessFileName=powershell.exe. No encryption keywords appear in the command line — this test validates that the file-creation branch catches compiled implant output patterns.

Unlock Pro Content

Get the full detection package for T1560.003 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections