T1218.009 IBM QRadar · QRadar

Detect Regsvcs/Regasm in IBM QRadar

Adversaries may abuse Regsvcs and Regasm to proxy execution of code through trusted Windows utilities. Regsvcs and Regasm are Windows command-line utilities used to register .NET Component Object Model (COM) assemblies. Both are digitally signed by Microsoft. These utilities can bypass application control through use of attributes within the binary to specify code that should run before registration or unregistration: [ComRegisterFunction] or [ComUnregisterFunction] respectively. Critically, the code decorated with these attributes executes even if the process runs with insufficient privileges and fails. Agent Tesla is a notable malware family that uses Regasm.exe for proxy execution.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1218 System Binary Proxy Execution
Sub-technique
T1218.009 Regsvcs/Regasm
Canonical reference
https://attack.mitre.org/techniques/T1218/009/

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT
  DATEFORMAT(starttime, 'yyyy-MM-dd HH:mm:ss') AS EventTime,
  sourceip,
  username,
  "PROCESS_IMAGE" AS ProcessImage,
  "PROCESS_COMMANDLINE" AS CommandLine,
  "PARENT_PROCESS_IMAGE" AS ParentImage,
  "PARENT_PROCESS_COMMANDLINE" AS ParentCommandLine,
  LOGSOURCENAME(logsourceid) AS LogSource,
  CATEGORYNAME(category) AS Category,
  CASE
    WHEN LOWER("PROCESS_IMAGE") LIKE '%regsvcs.exe' OR LOWER("PROCESS_IMAGE") LIKE '%regasm.exe' THEN 1
    ELSE 0
  END +
  CASE
    WHEN LOWER("PROCESS_COMMANDLINE") SIMILAR TO '%(temp|appdata|downloads|public|desktop|programdata)%' THEN 1
    ELSE 0
  END +
  CASE
    WHEN LOWER("PROCESS_COMMANDLINE") SIMILAR TO '%(/u|/unregister|/silent)%' THEN 1
    ELSE 0
  END +
  CASE
    WHEN LOWER("PARENT_PROCESS_IMAGE") SIMILAR TO '%(cmd|powershell|wscript|cscript|mshta|winword|excel)\.exe%' THEN 1
    ELSE 0
  END +
  CASE
    WHEN (LOWER("PARENT_PROCESS_IMAGE") LIKE '%regsvcs.exe' OR LOWER("PARENT_PROCESS_IMAGE") LIKE '%regasm.exe')
         AND LOWER("PROCESS_IMAGE") SIMILAR TO '%(cmd|powershell|wscript|cscript|net|rundll32)\.exe%' THEN 2
    ELSE 0
  END AS RiskScore
FROM events
WHERE
  LOGSOURCETYPEID IN (12, 13, 387)
  AND (
    LOWER("PROCESS_IMAGE") LIKE '%regsvcs.exe'
    OR LOWER("PROCESS_IMAGE") LIKE '%regasm.exe'
    OR LOWER("PARENT_PROCESS_IMAGE") LIKE '%regsvcs.exe'
    OR LOWER("PARENT_PROCESS_IMAGE") LIKE '%regasm.exe'
  )
  AND starttime > (NOW() - 86400000)
HAVING RiskScore > 0
ORDER BY RiskScore DESC, starttime DESC
LIMIT 500
high severity medium confidence

AQL query for QRadar detecting Regsvcs/Regasm proxy execution abuse. Matches on process image names, suspicious parent processes, suspicious command-line paths, and flags/arguments associated with unregistration or silent execution. Computes a composite risk score.

Data Sources

QRadar Sysmon DSMQRadar Windows Security Event Log DSMMicrosoft Windows Security Event Log

Required Tables

events

False Positives & Tuning

  • Enterprise software deployment tools (SCCM, PDQ Deploy) invoking regasm.exe from staging or temp directories during automated rollout
  • Developer workstations registering COM interop assemblies via Visual Studio post-build events, which may invoke regasm from AppData or project temp paths
  • Managed service providers using scripts that call regsvcs.exe with /u to cleanly uninstall .NET services during update procedures
Download portable Sigma rule (.yml)

Other platforms for T1218.009


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.

  1. Test 1Regasm Execution from Temp Directory

    Expected signal: Sysmon Event ID 1: regasm.exe with /s flag and Temp path. Security Event ID 4688. Sysmon Event ID 7 for the DLL being loaded.

  2. Test 2Regasm with Unregister Flag

    Expected signal: Sysmon Event ID 1: regasm.exe with /u and /s flags, Temp path. Security Event ID 4688. The process will fail if the file does not exist but the process creation event fires.

  3. Test 3Regsvcs Launched from PowerShell

    Expected signal: Sysmon Event ID 1: powershell.exe then regsvcs.exe with ParentImage=powershell.exe. SuspiciousParent and SuspiciousPath both fire. Security Event ID 4688.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections