T1070 Elastic Security · Elastic

Detect Indicator Removal in Elastic Security

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/

Elastic Detection Query

Elastic Security (Elastic)
eql
any where
  (
    event.category == "registry" and
    event.action in ("deletion", "key_deletion") and
    registry.path : (
      "*\\Run\\*", "*\\RunOnce\\*", "*\\Services\\*",
      "*\\Scheduled Tasks*", "*\\AppInit_DLLs*",
      "*\\NetworkProvider\\Order*", "*\\Internet Explorer\\notes*",
      "*\\Image File Execution*", "*TESTSIGNING*"
    )
  ) or
  (
    event.category == "process" and
    event.type == "start" and
    (
      process.command_line : (
        "*reg delete*", "*reg.exe delete*",
        "*Remove-ItemProperty*", "*Remove-Item*HKLM*", "*Remove-Item*HKCU*",
        "*cmd /c del*", "*cmd.exe /c del*",
        "*/c del \"*", "*del /f /q*", "*del /f*", "*erase /f*"
      ) or
      (
        process.parent.name : ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe") and
        process.command_line : "*del*" and
        process.command_line : "*.exe*"
      )
    )
  )
high severity medium confidence

Detects T1070 Indicator Removal via two behavioral patterns using Elastic Common Schema fields: (1) registry key deletion events targeting known persistence paths (Run, RunOnce, Services, AppInit_DLLs, Scheduled Tasks, Image File Execution, TESTSIGNING) and (2) process creation events with registry cleanup or self-deletion command patterns including reg delete, Remove-ItemProperty, and cmd /c del targeting executables. Covers both Sysmon and Elastic Endpoint telemetry.

Data Sources

Windows Sysmon via WinlogbeatElastic Endpoint SecurityWindows Security Event Log via Winlogbeat

Required Tables

logs-endpoint.events.registry-*logs-endpoint.events.process-*winlogbeat-*

False Positives & Tuning

  • Legitimate software uninstallers removing their own registry persistence entries during clean uninstall routines (MSI, NSIS, Inno Setup)
  • IT configuration management tools such as SCCM, Ansible, or DSC deleting stale registry keys as part of enforced baseline policies
  • System administrators running reg delete or PowerShell Remove-Item commands during authorized system hardening or remediation tasks
Download portable Sigma rule (.yml)

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.

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

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

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

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

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

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections