T1564 Splunk · SPL

Detect Hide Artifacts in Splunk

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/

SPL Detection Query

Splunk (SPL)
spl
| union
  [ search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
    (Image="*\\attrib.exe")
    | eval CommandLine=lower(CommandLine)
    | where match(CommandLine, "\+h|\+s")
    | eval Signal="HiddenFileAttribute"
    | table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine, Signal ],
  [ search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
    (Image="*\\cmd.exe" OR Image="*\\powershell.exe" OR Image="*\\pwsh.exe")
    | eval CommandLine=lower(CommandLine)
    | where match(CommandLine, ">[^:]+:[^\\\\/:*?\"<>|\s]+") OR
            (match(CommandLine, "set-content|out-file") AND match(CommandLine, ":[^\\\\]+"))
    | eval Signal="NTFSAlternateDataStream"
    | table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine, Signal ],
  [ search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=13
    TargetObject="*\\Schedule\\TaskCache\\Tree\\*"
    | where match(TargetObject, "\\SD$") AND EventType="DeleteValue"
    | eval Signal="HiddenScheduledTaskSD"
    | eval CommandLine=ProcessCommandLine
    | table _time, host, User=UtcTime, Image, CommandLine, TargetObject, Signal ],
  [ search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
    NOT (Image="*\\explorer.exe" OR Image="*\\msiexec.exe" OR Image="*\\svchost.exe")
    | eval CommandLine=lower(CommandLine)
    | where match(CommandLine, "-windowstyle\s+h|-w\s+hidden|sw_hide|//b\s|//b$")
    | eval Signal="HiddenWindowExecution"
    | table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine, Signal ],
  [ search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
    (Image="*\\icacls.exe" OR Image="*\\cacls.exe")
    | eval CommandLine=lower(CommandLine)
    | where match(CommandLine, "/deny\s+(everyone|\*s-1-1-0|users|\*s-1-5-32-545)")
    | eval Signal="FileAccessDeniedToHide"
    | table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine, Signal ],
  [ search index=wineventlog sourcetype="WinEventLog:Security" EventCode=4698 OR EventCode=4702
    | eval TaskContent=lower(TaskContent)
    | where match(TaskContent, "hidden|runonlyidle|0x04")
    | eval Signal="SuspiciousScheduledTaskHidden"
    | eval CommandLine=TaskName
    | table _time, host, SubjectUserName, TaskName, Signal ]
| eval SuspicionScore=1
| stats sum(SuspicionScore) as TotalSignals, values(Signal) as Signals, values(CommandLine) as Commands,
        earliest(_time) as FirstSeen, latest(_time) as LastSeen by host, User
| where TotalSignals >= 1
| sort - TotalSignals
high severity high confidence

Multi-signal detection for T1564 Hide Artifacts using Sysmon Event ID 1 (Process Creation), Sysmon Event ID 13 (Registry Value Set/Delete), and Security Event ID 4698/4702 (Scheduled Task Create/Modify). Detects attrib +h/+s for hidden file attributes, NTFS ADS creation via redirection syntax, scheduled task SD registry value deletion (Tarrask), hidden window flags, and icacls access denial. Results are aggregated per host/user with a total signal count for prioritization.

Data Sources

Process: Process CreationWindows Registry: Windows Registry Key DeletionScheduled Job: Scheduled Job CreationSysmon Event ID 1Sysmon Event ID 13Security Event ID 4698

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/OperationalWinEventLog:Security

False Positives & Tuning

  • System administrators running attrib.exe to set hidden attributes on configuration or system-managed files
  • Legitimate backup and archival software manipulating file attributes and ACLs as part of normal operation
  • Enterprise deployment tools (SCCM, Intune) that use wscript //b or hidden PowerShell windows for silent software installation
  • Security software and AV solutions that set hidden/system attributes on quarantine directories
  • DevOps pipelines and CI/CD agents that create build artifacts with ADS zone identifiers or create scheduled tasks with non-default descriptors
Download portable Sigma rule (.yml)

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.

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

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

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

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

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

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections