Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for T1027.013.
Upgrade to ProDetect Encrypted/Encoded File in IBM QRadar
This detection identifies adversary use of encrypted or encoded files to conceal malicious payloads, configurations, or command-and-control artifacts from static analysis and signature-based detection. Adversaries commonly apply Base64 encoding, XOR ciphers, AES/RC4 encryption, or layered encoding schemes to files dropped on victim hosts, phishing attachments (password-protected documents, self-extracting archives), or scripts that decode and execute payloads at runtime. Detection focuses on processes decoding or decrypting file content, suspicious file entropy indicators surfaced via tooling, script interpreters reading encoded blobs, and the creation of high-entropy files in user-writable directories.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1027 Obfuscated Files or Information
- Sub-technique
- T1027.013 Encrypted/Encoded File
- Canonical reference
- https://attack.mitre.org/techniques/T1027/013/
QRadar Detection Query
SELECT DATEFORMAT(devicetime, 'yyyy-MM-dd HH:mm:ss') AS event_time, sourceip, username, "ProcessName", "CommandLine", LOGSOURCENAME(logsourceid) AS log_source
FROM events
WHERE LOGSOURCETYPEID IN (12, 352)
AND ("EventID" IN ('1', '4688'))
AND (
LOWER("CommandLine") LIKE '%certutil%-decode%'
OR LOWER("CommandLine") LIKE '%certutil%-decodehex%'
OR LOWER("CommandLine") LIKE '%-encodedcommand%'
OR LOWER("CommandLine") LIKE '%frombase64string%'
OR LOWER("CommandLine") LIKE '%openssl enc%'
OR LOWER("CommandLine") LIKE '%base64 -d%'
)
AND LOGSOURCE NOT IN ('known-safe-host1', 'known-safe-host2')
ORDER BY devicetime DESC
LAST 24 HOURS Detects file decoding and decryption command execution via Windows Security (EventID 4688) and Sysmon (EventID 1) process creation logs, targeting certutil decode, PowerShell encoded commands, and OpenSSL encryption operations in QRadar.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate certificate management using certutil decode operations
- Scheduled PowerShell automation tasks using encoded commands for compatibility
- Security scanning tools that self-test base64 decode capabilities
Other platforms for T1027.013
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 1certutil Base64 Decode to Disk
Expected signal: DeviceProcessEvents: certutil.exe with -decode argument; Sysmon Event ID 1 with CommandLine containing '-decode'; Sysmon Event ID 11 showing decoded_payload.bin creation in C:\Windows\Temp
- Test 2PowerShell In-Memory Base64 Payload Decode
Expected signal: DeviceProcessEvents: powershell.exe with FromBase64String in command line; PowerShell Script Block Log Event ID 4104 containing FromBase64String and [Convert]::FromBase64; Sysmon Event ID 11 for decoded_ps_payload.bin creation
- Test 3OpenSSL AES Decrypt File on Linux
Expected signal: Linux auditd execve syscall records for base64 and openssl processes; Syslog entries for process execution; Elastic Auditbeat process events showing openssl enc -d with -aes-256-cbc arguments; file creation event for decrypted_payload.bin in /tmp
References (7)
- https://attack.mitre.org/techniques/T1027/013/
- https://www.mandiant.com/resources/apt41-initiating-footholds
- https://www.mcafee.com/blogs/other-blogs/mcafee-labs/operation-north-star-a-job-offer-thats-too-good-to-be-true/
- https://www.trendmicro.com/en_us/research/18/d/new-macos-backdoor-linked-to-oceanlotus-found.html
- https://securelist.com/cloud-atlas-redoctober-apt-is-back-in-style/68083/
- https://www.welivesecurity.com/2014/11/11/sednit-espionage-group-attacking-air-gapped-networks/
- https://www.hhs.gov/sites/default/files/qilin-threat-profile.pdf
Unlock playbooks & atomic tests with Pro
Get the full detection package for T1027.013 — response playbook and atomic red team tests, plus investigation guidance and hunting queries.
df00tech Pro — £29/user/month