Detect Indicator Removal in CrowdStrike LogScale
Adversaries may delete or modify artifacts generated within systems to remove evidence of their presence or hinder defenses. Various artifacts may be created by an adversary or something that can be attributed to an adversary's actions. Typically these artifacts are used as defensive indicators related to monitored events, such as strings from downloaded files, logs that are generated from user actions, and other data analyzed by defenders. Removal of these indicators may interfere with event collection, reporting, or other processes used to detect intrusion activity. This may compromise the integrity of security solutions by causing notable events to go unreported. This activity may also impede forensic analysis and incident response, due to lack of sufficient data to determine what occurred.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1070 Indicator Removal
- Canonical reference
- https://attack.mitre.org/techniques/T1070/
LogScale Detection Query
#event_simpleName IN (RegistryOperationCreate, RegistryOperationDelete, ProcessRollup2, SyntheticProcessRollup2)
| case {
#event_simpleName = "RegistryOperationDelete":
reg_path := RegObjectName ;
* :
reg_path := ""
}
| eval is_reg_deletion_target := if(
#event_simpleName = "RegistryOperationDelete" AND (
reg_path = /\\(Run|RunOnce)\\/i OR
reg_path = /\\Services\\/i OR
reg_path = /Scheduled Tasks/i OR
reg_path = /\\AppInit_DLLs/i OR
reg_path = /\\NetworkProvider\\Order/i OR
reg_path = /\\Image File Execution/i OR
reg_path = /TESTSIGNING/i
), 1, 0
)
| eval is_self_deletion := if(
#event_simpleName IN (ProcessRollup2, SyntheticProcessRollup2) AND
CommandLine = /cmd(\.exe)?\s+\/c\s+del/i AND
CommandLine = /\.exe/i,
1, 0
)
| eval is_reg_delete_cmd := if(
#event_simpleName IN (ProcessRollup2, SyntheticProcessRollup2) AND (
CommandLine = /reg(\.exe)?\s+delete/i OR
CommandLine = /Remove-ItemProperty/i OR
CommandLine = /Remove-Item.+(HKLM|HKCU)/i
), 1, 0
)
| eval is_force_delete := if(
#event_simpleName IN (ProcessRollup2, SyntheticProcessRollup2) AND
(CommandLine = /del\s+\/f/i OR CommandLine = /erase\s+\/f/i),
1, 0
)
| eval suspicion_score := is_reg_deletion_target + is_self_deletion + is_reg_delete_cmd + is_force_delete
| where suspicion_score > 0
| eval detection_reason := case(
is_reg_deletion_target = 1, "registry_key_deletion_persistence",
is_self_deletion = 1, "self_deletion_executable",
is_reg_delete_cmd = 1, "registry_cleanup_command",
is_force_delete = 1, "force_file_deletion",
true(), "indicator_removal"
)
| groupBy(
[ComputerName, UserName, aid, #event_simpleName, CommandLine, reg_path, detection_reason],
function=[
count(as="event_count"),
max(suspicion_score, as="max_score"),
max(@timestamp, as="last_seen")
]
)
| sort max_score desc Detects T1070 Indicator Removal in CrowdStrike Falcon using LogScale CQL across RegistryOperationDelete and process rollup event types. Evaluates registry deletions targeting known persistence key paths using RegObjectName field, and ProcessRollup2/SyntheticProcessRollup2 events for reg delete commands, PowerShell Remove-ItemProperty, self-deletion via cmd /c del, and force file deletion. Calculates a per-event suspicion score and groups results by endpoint and command for efficient analyst review.
Data Sources
Required Tables
False Positives & Tuning
- CrowdStrike Falcon sensor quarantine cleanup or remediation actions removing malware-associated registry keys may generate RegistryOperationDelete events on persistence paths
- Windows Installer and MSI package removal routinely deletes Run key entries and service registrations as part of legitimate software uninstall sequences
- Scripted system hardening tools running CIS benchmark or DISA STIG automation that remove insecure registry keys and legacy application entries using reg delete
Other platforms for T1070
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 1Registry Key Self-Cleanup — Delete Run Key
Expected signal: Sysmon Event ID 12 (RegistryEvent - Object Create/Delete): TargetObject=HKCU\Software\Microsoft\Windows\CurrentVersion\Run\df00tech-test, EventType=DeleteValue. Sysmon Event ID 1: two cmd/reg.exe process creation events. Security Event ID 4657 (if object access auditing is enabled): ObjectName matching the Run key path.
- Test 2Executable Self-Deletion via cmd.exe
Expected signal: Sysmon Event ID 1: Process creation for df00tech-cleanup-test.exe. Sysmon Event ID 1: cmd.exe with CommandLine containing 'del /f /q' and the .exe path. Sysmon Event ID 11: file create for df00tech-cleanup-test.exe. Sysmon Event ID 23 (if configured): FileDelete event for df00tech-cleanup-test.exe showing the file was archived by Sysmon before deletion.
- Test 3PowerShell Registry Key Deletion
Expected signal: Sysmon Event ID 12 (RegistryEvent - Create/Delete): EventType=DeleteKey, TargetObject=HKCU\Software\Microsoft\Internet Explorer\notes. Sysmon Event ID 1: powershell.exe with CommandLine containing 'Remove-Item' and 'Internet Explorer\notes'. PowerShell ScriptBlock Log Event ID 4104 with full script content showing the create and delete sequence.
- Test 4Drop-Execute-Delete Pattern in Temp Directory
Expected signal: Sysmon Event ID 11: file creation of svcupdate32.exe in C:\Users\Public\. Sysmon Event ID 1: execution of svcupdate32.exe. Sysmon Event ID 1: cmd.exe with del command. Sysmon Event ID 23 (FileDelete, if configured): svcupdate32.exe deletion. KQL hunting query matches execution in Public directory followed by file deletion within 60 minutes.
- Test 5Simulate BPFDoor Environment Variable Clearing
Expected signal: Auditd syscall event for open(2) with flags O_WRONLY on /proc/<PID>/environ path. Syslog entry if auditd is configured to watch /proc/*/environ with inode watches. Linux audit event type=PATH with name matching /proc/[0-9]+/environ.
References (12)
- https://attack.mitre.org/techniques/T1070/
- https://www.sentinelone.com/labs/operation-bleeding-bear/
- https://www.proofpoint.com/us/threat-insight/post/ta505-distributes-new-sdbbot-remote-access-trojan-get-installer-tool
- https://sandfly.io/linux-threat-hunting-with-bpfdoor/
- https://securelist.com/shadowpad-in-corporate-networks/81432/
- https://www.crowdstrike.com/blog/how-crowdstrike-falcon-protects-against-wiper-malware-used-in-ukraine-attacks/
- https://www.welivesecurity.com/en/eset-research/a-journey-to-the-darkside-the-hermetic-wiper-malware/
- https://github.com/redcanaryco/atomic-red-team/tree/master/atomics/T1070
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/builtin
- https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-registry
- https://github.com/TheWover/donut
Unlock Pro Content
Get the full detection package for T1070 including response playbook, investigation guide, and atomic red team tests.
Related Detections
Sub-techniques (10)
- T1070.001Clear Windows Event Logs
- T1070.002Clear Linux or Mac System Logs
- T1070.003Clear Command History
- T1070.004File Deletion
- T1070.005Network Share Connection Removal
- T1070.006Timestomp
- T1070.007Clear Network Connection History and Configurations
- T1070.008Clear Mailbox Data
- T1070.009Clear Persistence
- T1070.010Relocate Malware