Detect Hide Artifacts in Google Chronicle
Adversaries may attempt to hide artifacts associated with their behaviors to evade detection. Operating systems may have features to hide various artifacts, such as important system files and administrative task execution, to avoid disrupting user work environments and prevent users from changing files or features on the system. Adversaries may abuse these features to hide artifacts such as files, directories, user accounts, or other system activity to evade detection. Sub-techniques cover hidden files and directories, hidden users, hidden windows, NTFS alternate data streams, hidden file systems, virtual instance abuse, VBA stomping, email hiding rules, resource forking, process argument spoofing, and scheduled task SD registry deletion.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1564 Hide Artifacts
- Canonical reference
- https://attack.mitre.org/techniques/T1564/
YARA-L Detection Query
rule T1564_HideArtifacts_MultiSignal {
meta:
name = "T1564 - Hide Artifacts Multi-Signal Detection"
description = "Detects multiple artifact hiding techniques: attrib +h/+s, NTFS ADS creation, hidden window execution, file access denial, and Tarrask scheduled task SD deletion"
author = "Argus Detection Engineering"
mitre_attack = "T1564"
severity = "HIGH"
confidence = "HIGH"
version = "1.0"
created = "2026-04-21"
events:
(
// Signal 1: attrib.exe setting hidden/system attributes
(
$e.metadata.event_type = "PROCESS_LAUNCH"
and re.regex($e.target.process.file.full_path, `(?i).*\\attrib\.exe$`)
and re.regex($e.target.process.command_line, `(?i).*\+[hs].*`)
)
or
// Signal 2: NTFS Alternate Data Streams via shell
(
$e.metadata.event_type = "PROCESS_LAUNCH"
and re.regex($e.target.process.file.full_path, `(?i).*\\(cmd|powershell|pwsh)\.exe$`)
and (
re.regex($e.target.process.command_line, `>[^:]+:[^\\/:\*\?"<>|\s]+`)
or (
re.regex($e.target.process.command_line, `(?i)(Set-Content|Out-File)`)
and re.regex($e.target.process.command_line, `:[^\\]+`)
)
)
)
or
// Signal 3: Hidden window execution flags
(
$e.metadata.event_type = "PROCESS_LAUNCH"
and re.regex($e.target.process.command_line, `(?i)(-WindowStyle\s+[Hh]|-w\s+hidden|SW_HIDE|\/\/[Bb]\s)`)
and not re.regex($e.target.process.file.full_path, `(?i).*\\(explorer|msiexec|svchost)\.exe$`)
)
or
// Signal 4: icacls/cacls used to deny access
(
$e.metadata.event_type = "PROCESS_LAUNCH"
and re.regex($e.target.process.file.full_path, `(?i).*\\(icacls|cacls)\.exe$`)
and re.regex($e.target.process.command_line, `(?i)/deny\s+(Everyone|\*S-1-1-0|Users|\*S-1-5-32-545)`)
)
or
// Signal 5: Scheduled task SD registry deletion (Tarrask)
(
$e.metadata.event_type = "REGISTRY_MODIFICATION"
and re.regex($e.target.registry.registry_key, `(?i).*\\Schedule\\TaskCache\\Tree\\.*`)
and $e.target.registry.registry_value_name = "SD"
and $e.metadata.event_subtype = "REGISTRY_DELETION"
)
)
condition:
$e
} Google Chronicle YARA-L 2.0 rule for T1564 Hide Artifacts multi-signal detection. Covers five distinct artifact hiding sub-techniques: hidden file attributes via attrib.exe, NTFS Alternate Data Stream writes, hidden window script execution, file access denial with icacls/cacls, and Tarrask-style SD registry deletion for scheduled task hiding.
Data Sources
Required Tables
False Positives & Tuning
- Enterprise configuration management using Group Policy or Intune that runs scripts with hidden window flags during system configuration and compliance enforcement
- Legitimate system hardening scripts that use icacls.exe to restrict access on sensitive directories such as credential stores or certificate private key folders
- Third-party software products that legitimately delete or recreate scheduled task SD values during updates or reconfiguration procedures
Other platforms for T1564
Testing Methodology
Validate this detection against 5 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 1Hide File Using Attrib Command
Expected signal: Sysmon Event ID 1: Process Create for attrib.exe with CommandLine '+h +s %TEMP%\t1564-test.txt'. Security Event ID 4688 (if command line auditing enabled). DeviceProcessEvents in MDE: FileName=attrib.exe, ProcessCommandLine contains '+h' and '+s'. The 'dir' command at the end will show no file — confirming hiding worked.
- Test 2Write Payload to NTFS Alternate Data Stream
Expected signal: Sysmon Event ID 15 (FileCreateStreamHash): TargetFilename='%TEMP%\t1564-ads-test.txt:hidden_payload.ps1', Hash of stream content. Sysmon Event ID 1: cmd.exe process create with redirect operator and colon-delimited stream path in CommandLine. DeviceFileEvents in MDE: ActionType=FileCreated with stream notation in FileName. The 'dir /r' output will show both the main file and ':hidden_payload.ps1:$DATA' confirming ADS creation.
- Test 3Delete Scheduled Task Security Descriptor to Hide Task (Tarrask Technique)
Expected signal: Sysmon Event ID 13 (RegistryEvent - Value Delete): TargetObject='HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\T1564-HiddenTask\SD', EventType='DeleteValue', Image='reg.exe'. Security Event ID 4698 (scheduled task created) for the initial schtasks /create. Security Event ID 4699 will NOT fire for the SD deletion — only the Sysmon registry event captures this. DeviceRegistryEvents in MDE: ActionType=RegistryValueDeleted, RegistryKey contains 'TaskCache\Tree', RegistryValueName='SD'.
- Test 4Hide Script Execution Using Wscript Batch Mode (Hidden Window)
Expected signal: Sysmon Event ID 1: Process Create for wscript.exe with CommandLine '//b //nologo %TEMP%\t1564-hidden.vbs'. ParentImage will be cmd.exe (from the atomic test) but in real attacks is often outlook.exe, explorer.exe, or mshta.exe. Security Event ID 4688 (if command line auditing enabled). DeviceProcessEvents in MDE: FileName=wscript.exe, ProcessCommandLine contains '//b'. No console window or UI appears on the desktop.
- Test 5Linux Hidden File and Directory Creation
Expected signal: Auditd syscall events: execve for mkdir, echo/tee, chmod with dotfile paths. Syslog/auditd: SYSCALL records with comm='mkdir' and a0 pointing to path starting with dot. Linux process creation events in Sysmon for Linux (if deployed): Image=/bin/mkdir, CommandLine contains '.t1564-hidden-dir'. The first ls command returns no output (directory is hidden), the second ls -la shows it — confirming the hiding behavior.
References (13)
- https://attack.mitre.org/techniques/T1564/
- https://www.microsoft.com/security/blog/2022/04/12/tarrask-malware-uses-scheduled-tasks-for-defense-evasion/
- https://blog.malwarebytes.com/101/2015/07/introduction-to-alternate-data-streams/
- https://researchcenter.paloaltonetworks.com/2016/09/unit42-sofacys-komplex-os-x-trojan/
- https://news.sophos.com/en-us/2020/05/21/ragnar-locker-ransomware-deploys-virtual-machine-to-dodge-security/
- https://cdn2.hubspot.net/hubfs/3354902/Content%20PDFs/Cybereason-Lab-Analysis-OSX-Pirrit-4-6-16.pdf
- https://learn.microsoft.com/en-us/sysinternals/downloads/streams
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/attrib
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1564.001/T1564.001.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/process_creation
- https://www.secureworks.com/research/darktortilla-malware-analysis
- https://www.checkpoint.com/downloads/products/warzone-whitepaper.pdf
- https://www.sentinelone.com/labs/shlayer-to-zshlayer-macos-malware-evolution/
Unlock Pro Content
Get the full detection package for T1564 including response playbook, investigation guide, and atomic red team tests.
Related Detections
Sub-techniques (14)
- T1564.001Hidden Files and Directories
- T1564.002Hidden Users
- T1564.003Hidden Window
- T1564.004NTFS File Attributes
- T1564.005Hidden File System
- T1564.006Run Virtual Instance
- T1564.007VBA Stomping
- T1564.008Email Hiding Rules
- T1564.009Resource Forking
- T1564.010Process Argument Spoofing
- T1564.011Ignore Process Interrupts
- T1564.012File/Path Exclusions
- T1564.013Bind Mounts
- T1564.014Extended Attributes