{
  "technique_id": "T1547",
  "name": "Boot or Logon Autostart Execution",
  "priority": "high",
  "status": "draft",
  "version": "0.1.0",
  "last_reviewed": "2026-07-23",
  "generated_by": "SOC Response Atlas by Basyrix",
  "tactics": [
    "Persistence",
    "Privilege Escalation"
  ],
  "platforms": [
    "Linux",
    "macOS",
    "Windows",
    "Network Devices"
  ],
  "summary": "Adversaries may configure system settings to automatically execute a program during system boot or logon to maintain persistence or gain higher-level privileges on compromised systems. Operating systems may have mechanisms for automatically running a program on system boot or account logon...",
  "soc_recommendation": "Investigate Boot or Logon Autostart Execution activity in the context of Persistence/Privilege Escalation: confirm scope, affected host/identity, and whether it matches expected administrative behaviour before deciding this is benign.",
  "d3fend_mappings": [
    {
      "id": "D3-FA",
      "name": "File Analysis",
      "relationship": "detect",
      "practical_action": "Monitor for File Analysis indicators relevant to this technique.",
      "tooling": [
        "Defender for Endpoint"
      ]
    },
    {
      "id": "D3-FE",
      "name": "File Encryption",
      "relationship": "harden",
      "practical_action": "Apply File Encryption to reduce this technique's viability before an incident occurs.",
      "tooling": [
        "Defender for Endpoint"
      ]
    },
    {
      "id": "D3-FEV",
      "name": "File Eviction",
      "relationship": "evict",
      "practical_action": "Use File Eviction to remove the adversary's foothold once this technique is confirmed.",
      "tooling": [
        "Defender for Endpoint"
      ]
    },
    {
      "id": "D3-CF",
      "name": "Content Filtering",
      "relationship": "isolate",
      "practical_action": "Apply Content Filtering to contain the blast radius once this technique is observed.",
      "tooling": [
        "Defender for Endpoint"
      ]
    }
  ],
  "investigation_steps": {
    "microsoft": [
      "Review Defender for Endpoint / Defender XDR alerts and timeline for the affected host or identity.",
      "Check Sentinel analytics rules and incidents correlated with this technique.",
      "Review Entra ID sign-in and audit logs if the technique involves an identity or cloud resource."
    ],
    "generic": [
      "Confirm whether the observed boot or logon autostart execution activity matches expected administrative or application behaviour.",
      "Identify the host, account, or resource where the activity occurred and its business criticality.",
      "Check for related alerts before and after this activity to reconstruct the broader intrusion timeline.",
      "Real detection reference: \"Registry Run Key Persistence by Non-Standard Process\" -- Flags Run/RunOnce autostart registry keys being set by processes outside the normal installer/OS baseline."
    ]
  },
  "evidence_to_collect": [
    "Host or resource affected",
    "Account or identity involved",
    "Timestamp of the activity",
    "Related process, file, or network artifact",
    "Any preceding or follow-on alerts"
  ],
  "response_actions": [
    {
      "name": "Contain the affected host or account",
      "category": "Containment",
      "risk": "Medium",
      "automation_safe": false,
      "approval_required": true,
      "tool": "Defender for Endpoint / Entra ID",
      "notes": "Requires approval -- confirm malicious intent before isolating a host or disabling an account."
    },
    {
      "name": "Collect and preserve evidence",
      "category": "Investigation",
      "risk": "Low",
      "automation_safe": true,
      "approval_required": false,
      "tool": "Defender for Endpoint",
      "notes": "Safe -- read-only evidence collection."
    }
  ],
  "queries": {
    "kql": [
      {
        "name": "GEN-PS-002 — Registry Run Key Persistence by Non-Standard Process",
        "description": "Flags Run/RunOnce autostart registry keys being set by processes outside the normal installer/OS baseline. (Source: Bell Integration baseline detection library, mapped via sub-technique T1547.001.)",
        "query": "let AllowedInitiators = dynamic([\n    \"msiexec.exe\",\n    \"trustedinstaller.exe\",\n    \"explorer.exe\",\n    \"setup.exe\"\n]);\nlet RunKeyPatterns = dynamic([\n    \"\\\\Run\\\\\",\n    \"\\\\RunOnce\\\\\",\n    \"\\\\RunServices\\\\\"\n]);\nDeviceRegistryEvents\n| where TimeGenerated >= ago(5m)\n| where ActionType == \"RegistryValueSet\"\n| where RegistryKey has_any (RunKeyPatterns)\n| where InitiatingProcessFileName !in~ (AllowedInitiators)\n| where isnotempty(RegistryValueData)\n| project\n    TimeGenerated,\n    DeviceName,\n    DeviceId,\n    AccountName,\n    RegistryKey,\n    RegistryValueName,\n    RegistryValueData,\n    InitiatingProcessFileName,\n    InitiatingProcessCommandLine,\n    InitiatingProcessSHA256\n| extend timestamp = TimeGenerated,\n         HostCustomEntity = DeviceName,\n         AccountCustomEntity = AccountName\n| order by TimeGenerated desc"
      },
      {
        "name": "990fc0dc-e7a5-4f6d-bc24-8569652cd773 — CYFIRMA - High severity File Hash Indicators with Block Action and Malware",
        "description": "\"This KQL query retrieves file hash indicators (MD5, SHA1, SHA256) from the CyfirmaIndicators_CL table within the last 5 minutes. It filters records with a confidence score of 80 or higher, containing file hash patterns, a recommended action of 'Block', and roles marked as 'Malware'. Extracted hashes and key threat intelligence details are projected for Blocking and investigation.\" (Source: Microsoft's official Azure-Sentinel Detections (MIT licensed), mapped via sub-technique T1547.001.)",
        "query": "// File Hash Indicators with Block Action and Malware\nlet timeFrame = 5m;\nCyfirmaIndicators_CL \n| where ConfidenceScore >= 80\n    and TimeGenerated between (ago(timeFrame) .. now())\n    and pattern contains 'file:hashes' and RecommendedActions has 'Block' and (Roles contains \"Malware\")\n| extend MD5 = extract(@\"file:hashes\\.md5\\s*=\\s*'([a-fA-F0-9]{32})'\", 1, pattern)\n| extend SHA1 = extract(@\"file:hashes\\.'SHA-1'\\s*=\\s*'([a-fA-F0-9]{40})'\", 1, pattern)\n| extend SHA256 = extract(@\"file:hashes\\.'SHA-256'\\s*=\\s*'([a-fA-F0-9]{64})'\", 1, pattern)\n| extend\n    Algo_MD5='md5',\n    Algo_SHA1= 'SHA1',\n    Algo_SHA256='SHA256',\n    ProviderName = 'CYFIRMA',\n    ProductName = 'DeCYFIR/DeTCT'\n| project  \n    MD5,\n    Algo_MD5,\n    SHA1,\n    Algo_SHA1,\n    SHA256,\n    Algo_SHA256,\n    ThreatActors,\n    Sources,\n    RecommendedActions,\n    Roles,\n    Country,\n    name,\n    Description,\n    ConfidenceScore,\n    SecurityVendors,\n    IndicatorID,\n    created,\n    modified,\n    valid_from,\n    Tags,\n    ThreatType,\n    TimeGenerated,\n    ProductName,\n    ProviderName"
      },
      {
        "name": "649f525a-1f92-412d-bfc2-ce642e7a7f1f — CYFIRMA - High severity Trojan File Hash Indicators with Block Action Rule",
        "description": "\"This KQL query extracts file hash indicators associated with Trojan activity from the CyfirmaIndicators_CL table. It specifically targets indicators containing file hashes linked to Trojan behavior and retrieves MD5, SHA1, and SHA256 values. The query also includes contextual threat intelligence such as threat actors, tags, sources, and geolocation information.\" (Source: Microsoft's official Azure-Sentinel Detections (MIT licensed), mapped via sub-technique T1547.001.)",
        "query": "//Trojan File Hash Indicators with Block Action\nlet timeFrame = 5m;\nCyfirmaIndicators_CL \n| where ConfidenceScore >= 80\n    and TimeGenerated between (ago(timeFrame) .. now())\n    and pattern contains 'file:hashes' and RecommendedActions has 'Block' and (Roles has 'Trojan')\n| extend MD5 = extract(@\"file:hashes\\.md5\\s*=\\s*'([a-fA-F0-9]{32})'\", 1, pattern)\n| extend SHA1 = extract(@\"file:hashes\\.'SHA-1'\\s*=\\s*'([a-fA-F0-9]{40})'\", 1, pattern)\n| extend SHA256 = extract(@\"file:hashes\\.'SHA-256'\\s*=\\s*'([a-fA-F0-9]{64})'\", 1, pattern)\n| extend\n    Algo_MD5='MD5',\n    Algo_SHA1= 'SHA1',\n    Algo_SHA256='SHA256',\n    ProviderName = 'CYFIRMA',\n    ProductName = 'DeCYFIR/DeTCT'\n| project  \n    MD5,\n    Algo_MD5,\n    SHA1,\n    Algo_SHA1,\n    SHA256,\n    Algo_SHA256,\n    ThreatActors,\n    Sources,\n    RecommendedActions,\n    Roles,\n    Country,\n    name,\n    Description,\n    ConfidenceScore,\n    SecurityVendors,\n    IndicatorID,\n    created,\n    modified,\n    valid_from,\n    Tags,\n    ThreatType,\n    TimeGenerated,\n    ProductName,\n    ProviderName"
      }
    ],
    "spl": [],
    "esql": [
      {
        "name": "d54b649d-46d0-4b4c-a9a7-1bc9fc458d3c — Kernel Module Load from Unusual Location",
        "description": "(EQL) This rule detects the loading of a kernel module from an unusual location. Threat actors may use this technique to maintain persistence on a system by loading a kernel module into the kernel namespace. This behavior is strongly related to the presence of a rootkit on the system. (Source: Elastic's official detection-rules repository (Elastic License v2).)",
        "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and (\n  (process.name == \"kmod\" and process.args == \"insmod\" and process.args like~ \"*.ko*\") or\n  (process.name == \"kmod\" and process.args == \"modprobe\" and not process.args in (\"-r\", \"--remove\")) or\n  (process.name == \"insmod\" and process.args like~ \"*.ko*\") or\n  (process.name == \"modprobe\" and not process.args in (\"-r\", \"--remove\"))\n) and (\n  process.working_directory like (\n    \"/tmp*\", \"/var/tmp*\", \"/dev/shm*\", \"/run*\", \"/var/run*\", \"/home*/*\", \"/root*\",\n    \"/var/www*\", \"/boot*\", \"/srv*\", \"/mnt*\", \"/media*\"\n  ) or\n  process.parent.working_directory like (\n    \"/tmp*\", \"/var/tmp*\", \"/dev/shm*\", \"/run*\", \"/var/run*\", \"/home*/*\", \"/root*\",\n    \"/var/www*\", \"/boot*\", \"/srv*\", \"/mnt*\", \"/media*\"\n  ) or\n  process.args like (\n    \"/tmp/*\", \"/var/tmp/*\", \"/dev/shm/*\", \"/run/*\", \"/var/run/*\", \"/home/*/*\", \"/root/*\",\n    \"/var/www/*\", \"/boot/*\", \"/srv/*\", \"/mnt/*\", \"/media/*\", \"./*\"\n  )\n) and\nnot (\n  process.parent.executable == \"/usr/bin/podman\" or\n  process.working_directory like \"/tmp/newroot\"\n)"
      },
      {
        "name": "70fa1af4-27fd-4f26-bd03-50b6af6b9e24 — Attempt to Unload Elastic Endpoint Security Kernel Extension",
        "description": "(EQL) Identifies attempts to unload the Elastic Endpoint Security kernel extension via the kextunload command. (Source: Elastic's official detection-rules repository (Elastic License v2).)",
        "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.name == \"kextunload\" and process.args like~ (\"*.EndpointSecurity\", \"/System/Library/Extensions/EndpointSecurity.kext\", \"EndpointSecurity.kext\")"
      }
    ]
  },
  "automation": {
    "safe": [
      "Add recommendation as Sentinel incident comment.",
      "Run enrichment queries.",
      "Create ServiceNow SecOps task."
    ],
    "approval_required": [
      "Contain or disable the affected host/account.",
      "Any change to production configuration."
    ]
  },
  "escalation_criteria": [
    "Boot or Logon Autostart Execution activity observed on a privileged account or critical system.",
    "Activity follows or precedes other suspicious behaviour in the same investigation.",
    "Automated triage cannot confidently rule out malicious intent."
  ],
  "false_positive_considerations": [
    "Legitimate administrative or maintenance activity matching this pattern.",
    "Approved security testing or red team exercise.",
    "Known benign software producing similar telemetry."
  ],
  "confluence": {
    "title": "T1547 - Boot or Logon Autostart Execution Response Guidance",
    "labels": [
      "mitre",
      "attack",
      "d3fend",
      "secops",
      "basyrix"
    ],
    "sections": [
      "summary",
      "d3fend_mappings",
      "investigation_steps",
      "response_actions",
      "queries",
      "automation",
      "escalation_criteria",
      "false_positive_considerations"
    ]
  }
}