Detect Active Setup in IBM QRadar
Adversaries may achieve persistence by adding a Registry key to the Active Setup of the local machine. Active Setup is a Windows mechanism that is used to execute programs when a user logs in. The value stored in the Registry key will be executed after a user logs into the computer. These programs will be executed under the context of the user and will have the account's associated permissions level. Adversaries may abuse Active Setup by creating a key under HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\ and setting a malicious value for StubPath. This value will serve as the program that will be executed when a user logs into the computer. Adversaries can abuse these components to execute malware, such as remote access tools, to maintain persistence through system reboots.
MITRE ATT&CK
- Tactic
- Persistence Privilege Escalation
- Technique
- T1547 Boot or Logon Autostart Execution
- Sub-technique
- T1547.014 Active Setup
- Canonical reference
- https://attack.mitre.org/techniques/T1547/014/
QRadar Detection Query
SELECT
DATEFORMAT(starttime, 'yyyy-MM-dd HH:mm:ss') AS "Event Time",
devicehostname AS "Host",
username AS "User",
"TargetObject" AS "Registry Key",
"Details" AS "StubPath Value",
"Image" AS "Writing Process",
CASE
WHEN REGEXP_LIKE(LOWER("Details"), '(cmd\.exe|powershell|mshta|rundll32|regsvr32|wscript|cscript|certutil|\.bat|\.vbs|\.js|\.hta|http://|https://)') THEN 'true'
ELSE 'false'
END AS "SuspiciousStubPath",
CASE
WHEN NOT REGEXP_LIKE("TargetObject", '(89820200-ECBD|22d6f312-b0f6|2C7339CF-2B09|44BBA840-CC51|6BF52A52-394A|89B4C1CD-B018)') THEN 'true'
ELSE 'false'
END AS "UnknownGUID"
FROM events
WHERE
LOGSOURCETYPENAME(devicetype) IN ('Microsoft Windows Security Event Log', 'Snare for Windows')
AND UPPER("TargetObject") LIKE '%SOFTWARE\\MICROSOFT\\ACTIVE SETUP\\INSTALLED COMPONENTS%'
AND (
UPPER("TargetObject") LIKE '%STUBPATH%'
OR NOT REGEXP_LIKE("TargetObject", '(89820200-ECBD|22d6f312-b0f6|2C7339CF-2B09|44BBA840-CC51|6BF52A52-394A|89B4C1CD-B018)')
)
LAST 24 HOURS
ORDER BY starttime DESC Detects Active Setup persistence (T1547.014) in QRadar by querying Sysmon EventCode 13 (registry value set) events targeting the Active Setup Installed Components registry key. Identifies StubPath modifications containing suspicious interpreters and executables, and flags unknown GUIDs not matching legitimate Microsoft component identifiers. Events are pulled from Windows Security and Sysmon log sources.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate Windows component updates during Patch Tuesday cycles that create or modify Active Setup entries for .NET, Windows Media Player, or Internet Explorer components
- Third-party enterprise applications (e.g., Adobe Acrobat, Java Runtime) that register their own Active Setup GUID for per-user initialization using command-line launchers
- Software deployment platforms running PowerShell or cmd.exe-based StubPath entries as part of authorized application onboarding workflows
Other platforms for T1547.014
Testing Methodology
Validate this detection against 3 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 1Active Setup StubPath Persistence with Custom GUID
Expected signal: Sysmon Event ID 12: Registry Key Created for the GUID subkey. Sysmon Event ID 13: Registry Value Set for StubPath, ComponentID, and Version values. Security Event ID 4688: Process creation for reg.exe with the full command line.
- Test 2Active Setup with Suspicious LOLBin StubPath
Expected signal: Sysmon Event ID 13: Registry Value Set with Details containing 'cmd.exe /c'. On next user logon: Sysmon Event ID 1 for cmd.exe spawned by userinit.exe/explorer.exe. Sysmon Event ID 11 for file creation in %TEMP%.
- Test 3Active Setup via PowerShell Registry Manipulation
Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with the registry manipulation command. Sysmon Event ID 12: Registry Key Created. Sysmon Event ID 13: Registry Value Set for StubPath and Version. PowerShell ScriptBlock Log Event ID 4104 with the full script.
References (8)
- https://attack.mitre.org/techniques/T1547/014/
- https://helgeklein.com/blog/2010/04/active-setup-explained/
- https://digital-forensics.sans.org/summit-archives/2010/35-glyer-apt-persistence-mechanisms.pdf
- https://citizenlab.ca/2015/12/packrat-report/
- https://unit42.paloaltonetworks.com/unit42-tropic-trooper-targets-taiwanese-government-and-fossil-fuel-provider-with-poison-ivy/
- https://technet.microsoft.com/en-us/sysinternals/bb963902
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1547.014/T1547.014.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/registry/registry_set
Unlock Pro Content
Get the full detection package for T1547.014 including response playbook, investigation guide, and atomic red team tests.