T1070

Indicator Removal

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.

Microsoft Sentinel / Defender
kusto
let RegistryCleanupPatterns = dynamic([
  "reg delete", "reg.exe delete",
  "Remove-ItemProperty", "Remove-Item.*HKLM", "Remove-Item.*HKCU",
  "RegDeleteKey", "RegDeleteValue"
]);
let FileCleanupPatterns = dynamic([
  "ProcessIdleTasks",
  "advapi32.dll",
  "DeleteLeftovers",
  "CleanupArtifacts"
]);
let SelfDeletionPatterns = dynamic([
  "cmd /c del", "cmd.exe /c del",
  "/c del \"", "ping -n 1",
  "del /f /q", "erase /f"
]);
// Registry deletion events
let RegDeletions = DeviceRegistryEvents
| where Timestamp > ago(24h)
| where ActionType in ("RegistryKeyDeleted", "RegistryValueDeleted")
| where RegistryKey has_any (
    "\\Run\\", "\\RunOnce\\", "\\Services\\",
    "\\Scheduled Tasks", "\\AppInit_DLLs",
    "\\NetworkProvider\\Order",
    "\\Internet Explorer\\notes",
    "\\CurrentVersion\\Image File Execution",
    "\\TESTSIGNING", "\\user32.dll"
  )
| extend DetectionSource = "RegistryDeletion"
| project Timestamp, DeviceName, AccountName, ActionType,
          RegistryKey, RegistryValueName,
          InitiatingProcessFileName, InitiatingProcessCommandLine,
          InitiatingProcessParentFileName, DetectionSource;
// Process-based cleanup commands
let ProcCleanup = DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any (RegistryCleanupPatterns)
    or ProcessCommandLine has_any (SelfDeletionPatterns)
    or (InitiatingProcessFileName in~ ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe")
        and ProcessCommandLine has "del" and ProcessCommandLine has ".exe")
| extend DetectionSource = "ProcessCleanupCommand"
| project Timestamp, DeviceName, AccountName,
          FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine,
          InitiatingProcessParentFileName, DetectionSource;
// Combine results
union RegDeletions, ProcCleanup
| extend SuspicionFlags = pack_array(
    iff(DetectionSource == "RegistryDeletion", "registry_key_deleted", ""),
    iff(ProcessCommandLine has_any (SelfDeletionPatterns), "self_deletion_pattern", ""),
    iff(ProcessCommandLine has_any (RegistryCleanupPatterns), "registry_cleanup_cmd", ""),
    iff(ProcessCommandLine has "del" and ProcessCommandLine has ".exe", "executable_deletion", "")
  )
| project Timestamp, DeviceName, AccountName,
          DetectionSource, RegistryKey, RegistryValueName,
          FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine,
          SuspicionFlags
| sort by Timestamp desc
high severity medium confidence

Data Sources

Windows Registry: Windows Registry Key Deletion Process: Process Creation Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceRegistryEvents DeviceProcessEvents

False Positives

  • Software uninstallers that legitimately remove their own registry run keys and service entries during clean uninstallation
  • IT management tools (SCCM, Intune, Group Policy) that delete temporary registry values as part of deployment or policy application
  • System cleanup utilities (CCleaner, Windows Disk Cleanup) that remove cached artifacts and registry entries as part of routine maintenance
  • Developers running build/clean scripts that delete test artifacts, temporary executables, and configuration entries
  • Self-updating software that deletes old version run keys before writing new ones during an update cycle

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