Conversation
Two CrowdStrike Next-Gen SIEM hunting queries for related COM-family persistence routes, neither currently covered in the repo. COM hijacking keys on per-user CLSID server-key writes (InprocServer32, LocalServer32, TreatAs) under a real user SID, which shadow the machine-wide COM object without admin rights. TypeLib hijacking keys on per-user TypeLib platform-key writes (win32/win64/win16) that repoint a type library at a scriptlet, moniker or attacker path. Both surface registry writes as AsepValueUpdate or RegGenericValueUpdate, match a real user SID rather than SYSTEM or the service accounts, and use a case block to rank the value the key now resolves to. Both pass the repo's query validator. Built against CrowdStrike's documented registry schema and not run on a live tenant, which each query states in its explanation.
|
Thanks @clivoa, and thanks for flagging that these were untested. I ran both against a live tenant. TypeLib: zero TypeLib{GUID} writes in four weeks against 1,400+ CLSID writes. The sensor doesn't appear to record these keys, so the query has nothing to match. Also, T1546.015 fits better than T1574.008. COM: runs, but every row over four weeks was benign (toast activators, Store apps, OneDrive/Teams/EdgeUpdate), and the user-writable tier was all Microsoft updaters. Getting it to a useful signal took an exclusion stage built from that one fleet's data, and those exclusions are specific enough that I doubt they'd transfer. Per-user COM registration is so common in legitimate software that a general-purpose version of this hunt is hard to write without either drowning in noise or overfitting to one environment. Closing this one. If you find an angle that narrows it down, for example limiting to CLSIDs known to be loaded by high-value processes, I'd be glad to review a fresh submission. |
What this adds
Two hunting queries for related COM-family persistence routes, both absent from
queries/today:com_hijacking_per_user_clsid_server.yml(T1546.015)typelib_hijacking_per_user_registration.yml(T1574.008)Both are per-user registry hijacks: the attacker writes a key under
HKCUthat shadows the machine-wide entry, so their code runs with no admin rights when the COM object or type library is resolved.How they work
Both key on registry value writes (
AsepValueUpdateorRegGenericValueUpdate, so the hunt does not depend on which one a tenant emits) under a real user SID (\REGISTRY\USER\S-1-5-21-...), which excludes SYSTEM and the service accounts.RegObjectNamematches aCLSID\{GUID}server key,InprocServer32,LocalServer32orTreatAs. All three are valid hijack points, not onlyInprocServer32.RegObjectNamematches aTypeLib\{GUID}\...\win32(orwin64/win16) platform key.Each then uses a
caseblock to rank what the key now resolves to. The high-confidence rows are a script moniker or remote path and, for TypeLib, a scriptlet or script host; the user-writable-path and plain per-user cases are there to review against a baseline. TheReasonfield carries that label so a hunter triages the sharp cases first.Duplicates check
Browsed
queries/. There is COM/scheduled-task content (tasks_scheduled_with_ComHandler.yml) but nothing for CLSID server hijacking or TypeLib hijacking, so these do not overlap an existing file.Testing
python .github/scripts/validate_single.py queries/<file>.ymlreturns valid for each, so theValidate Queriescheck should pass.AsepValueUpdate/RegGenericValueUpdate,RegObjectName,RegValueName,RegStringValue) and uses only standard CQL (in, inline regex,case,table,sort).Caveat, stated in each query
I do not have a live Falcon tenant to run these against, so each query's
explanationsays so and asks the reader to confirm theevent_simpleNamevalues and field names against their own registry telemetry before relying on it. If your telemetry records these writes under a different event, the first filter is the one to adjust. Happy to refine either query if a maintainer can check the field names against real data.