Detect AppCert DLLs in IBM QRadar
Adversaries may establish persistence and/or elevate privileges by executing malicious content triggered by AppCert DLLs loaded into processes. Dynamic-link libraries (DLLs) that are specified in the AppCertDLLs Registry key under HKLM\System\CurrentControlSet\Control\Session Manager are loaded into every process that calls the commonly used application programming interface (API) functions CreateProcess, CreateProcessAsUser, CreateProcessWithLoginW, CreateProcessWithTokenW, or WinExec. This provides adversaries a way to have code execute in the security context of every process on the system, including processes with high privilege levels.
MITRE ATT&CK
- Tactic
- Privilege Escalation Persistence
- Technique
- T1546 Event Triggered Execution
- Sub-technique
- T1546.009 AppCert DLLs
- Canonical reference
- https://attack.mitre.org/techniques/T1546/009/
QRadar Detection Query
SELECT
DATEFORMAT(starttime, 'yyyy-MM-dd HH:mm:ss') AS event_time,
LOGSOURCENAME(logsourceid) AS log_source,
sourceip AS source_ip,
username,
"EventID" AS event_id,
CASE
WHEN "EventID" IN ('12', '13', '14') THEN 'APPCERT_DLL_REGISTERED'
WHEN "EventID" = '7' THEN 'APPCERT_DLL_LOADED'
ELSE 'UNKNOWN'
END AS detection_type,
"TargetObject" AS registry_key,
"Details" AS registry_value_data,
"Image" AS writing_process,
"ImageLoaded" AS loaded_dll_path
FROM events
WHERE
LOGSOURCETYPENAME(devicetype) ILIKE '%Sysmon%'
AND (
(
"EventID" IN ('12', '13', '14')
AND LOWER("TargetObject") LIKE '%session manager\\appcertdlls%'
)
OR (
"EventID" = '7'
AND LOWER("ImageLoaded") LIKE '%appcert%'
AND LOWER("ImageLoaded") NOT LIKE '%\\system32\\%'
AND LOWER("ImageLoaded") NOT LIKE '%\\syswow64\\%'
)
)
AND starttime > DATEADD('day', -1, NOW())
ORDER BY starttime DESC
LIMIT 1000 Detects AppCert DLL persistence via Sysmon event logs forwarded to QRadar. Monitors Sysmon Event IDs 12/13/14 (registry key create/modify/delete) for writes to the AppCertDlls key, and Sysmon Event ID 7 (image loaded) for DLL loads with appcert in the path that originate from outside system directories. Classifies events by detection phase (registration vs runtime load).
Data Sources
Required Tables
False Positives & Tuning
- Security vendors or monitoring solutions that register process-inspection DLLs in AppCertDlls from non-default installation directories on managed endpoints
- Application virtualization or containerization products (e.g., ThinApp, Cameyo) that inject compatibility DLLs via AppCert hooks from their own install paths
- Development workstations where developers are testing AppCert-aware software and register test DLLs in non-standard locations during the development lifecycle
Other platforms for T1546.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.
- Test 1Register DLL in AppCertDlls Registry Key
Expected signal: Sysmon Event ID 13: TargetObject=HKLM\System\CurrentControlSet\Control\Session Manager\AppCertDlls\ArgusTestDll, Details=C:\Users\Public\argus_appcert_test.dll. Security Event ID 4657 if registry auditing enabled.
- Test 2Query Existing AppCertDlls Registrations
Expected signal: Process creation for reg.exe with query arguments for the AppCertDlls key. Registry access events if object access auditing is enabled. The output reveals all currently registered DLLs.
- Test 3Create and Register AppCert DLL for Process Injection
Expected signal: File creation event for argus_appcert.dll in Public folder. Sysmon Event ID 13 for AppCertDlls registry key modification. Subsequently, Sysmon Event ID 7 records showing the DLL loaded by various processes that call CreateProcess (e.g., cmd.exe spawning children).
References (4)
- https://attack.mitre.org/techniques/T1546/009/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.009/T1546.009.md
- https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-windows
- https://pentestlab.blog/2019/12/16/persistence-appcert-dlls/
Unlock Pro Content
Get the full detection package for T1546.009 including response playbook, investigation guide, and atomic red team tests.