Skip to content
Draft
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4de4fdf
detection(experimental): Lateral Movement via BitLocker COM Hijacking…
AAtashGar Nov 23, 2025
1439e50
Rule status changed from experimental to Production.
AAtashGar Nov 25, 2025
2605c64
Merge branch 'develop' into rule/bitlocker
patel-bhavin Dec 16, 2025
95bbfa4
Update lateral_movement_via_bitlocker_com_hijacking.yml and fix status
AAtashGar Dec 27, 2025
3fdda4e
2 drilldown_searches added
AAtashGar Jan 3, 2026
8553887
Merge branch 'develop' into rule/bitlocker
patel-bhavin Jan 9, 2026
a2b6ad4
Merge branch 'develop' into rule/bitlocker
patel-bhavin Jan 12, 2026
c75c510
Delete macro filter file
AAtashGar Jan 26, 2026
f6ffe69
Modify author and type in lateral movement detection
AAtashGar Jan 26, 2026
522c9f1
Enhance BitLocker COM Hijacking detection story
AAtashGar Jan 26, 2026
d53026d
Refactor lateral movement detection for BitLocker COM hijacking
AAtashGar Feb 2, 2026
6e8d570
Delete stories/bitlocker_com_hijacking_lateral_movement.yml
AAtashGar Feb 2, 2026
229a6cb
Merge branch 'develop' into rule/bitlocker
patel-bhavin Feb 10, 2026
9bd7ce6
YAML parsing error fixed
AAtashGar Feb 10, 2026
63c4d7a
fix: Validation Issues
AAtashGar Feb 21, 2026
0a133b7
fix tests section
AAtashGar Feb 21, 2026
fd52328
Merge branch 'develop' into rule/bitlocker
patel-bhavin Feb 23, 2026
a77da35
Merge branch 'develop' into rule/bitlocker
nasbench Mar 2, 2026
5a55867
Merge branch 'develop' into rule/bitlocker
patel-bhavin Mar 3, 2026
16b2f3b
Merge branch 'develop' into rule/bitlocker
patel-bhavin Mar 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 169 additions & 0 deletions detections/endpoint/lateral_movement_via_bitlocker_com_hijacking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
name: Lateral Movement via BitLocker COM Hijacking
id: 990d5907-c022-4358-9ada-f6e5e69514e8
version: 1
date: '2025-09-28'
author: Ali Atashgar (AAtashGar), Github Community
status: production
description: |-
This detection identifies potential lateral movement activities
using BitLocker COM hijacking techniques. It monitors for changes
to the Remote Registry service, new registry values in CLSID paths,
handle operations on CLSIDs, and executions of specific processes like
baaupdate.exe and BdeUISrv.exe. These events are correlated by host to
detect sequences indicative of this attack vector.
type: TTP
references:
- https://medium.com/@seripallychetan/bitlocker-com-hijack-a-new-frontier-in-lateral-movement-tactics-ac5039b18dc6
- https://ipurple.team/2025/08/04/lateral-movement-bitlocker/
search: |
(`wineventlog_security`) OR (`wineventlog_system`) \
((EventCode=7040 AND Service_Name="Remote Registry" AND \
Message="The start type of the Remote Registry service was changed*") \
OR (EventCode=4657 AND OperationType="New registry value created" AND \
Comment on lines +21 to +22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using both Message / OperationType as strings which they do not exist in this form while ingesting XML.

The message is not a field in the XML and the OperationType is usually encoded in the form %%XXX.

You cheated the logs in attack data, while you were asked to change it to XML.

You have to upload new logs that reflect the actual XML export splunk/attack_data#1098

You also have to adapt the search to use those values.

ObjectName="*A7A63E5C-3877-4840-8727-C1EA9D7A4D50*") \
OR (EventCode=4663 AND ObjectName="*A7A63E5C-3877-4840-8727-C1EA9D7A4D50*") \
OR (EventCode=4688 AND ((NewProcessName="baaupdate.exe" AND \
ParentProcessName="explorer.exe") OR (NewProcessName="BdeUISrv.exe" AND \
ParentProcessName="svchost.exe"))))

| eval Service_Change_Time=if(EventCode=7040, _time, null)
| eval Registry_Change_Time=if(EventCode=4657, _time, null)
| eval Handle_Creation_Time=if(EventCode=4663, _time, null)
| eval Process_Execution_Time=if(EventCode=4688, _time, null)
| eval Service_Message=if(EventCode=7040, Message, null)
| eval Process_Accessing_Registry=if(EventCode=4663, ProcessName, null)
| bin _time span=10m
| stats
values(Service_Change_Time) AS Service_Change_Time
values(Service_Message) AS Service_Message
values(Registry_Change_Time) AS Registry_Change_Time
values(ObjectName) AS CLSID_PATH
values(NewValue) AS Registry_value
values(NewValueType) AS Registry_Value_Type
values(Handle_Creation_Time) AS Handle_Creation_Time
values(Process_Accessing_Registry) AS Process_Accessing_Registry
values(Process_Execution_Time) AS Process_Execution_Time
values(ProcessId) AS ParentProcessId
values(ParentProcessName) AS ParentProcessName
values(NewProcessId) AS NewProcessId
values(NewProcessName) AS NewProcessName
count(eval(EventCode=7040)) AS SrvEvts
count(eval(EventCode=4657)) AS RegEvts
count(eval(EventCode=4663)) AS HdlEvts
count(eval(EventCode=4688)) AS ProcEvts
by Computer
| where SrvEvts>0 AND RegEvts>0 AND HdlEvts>0 AND ProcEvts>0
| eval Service_Change_Time=strftime(Service_Change_Time, "%Y-%m-%d %H:%M:%S")
| eval Registry_Change_Time \
=strftime(Registry_Change_Time, "%Y-%m-%d %H:%M:%S")
| eval Handle_Creation_Time \
=strftime(Handle_Creation_Time, "%Y-%m-%d %H:%M:%S")
| eval Process_Execution_Time \
=strftime(Process_Execution_Time, "%Y-%m-%d %H:%M:%S")
| sort - Service_Change_Time
| `lateral_movement_via_bitlocker_com_hijacking_filter`
how_to_implement: |-
Ensure Windows Event Logs are being ingested into Splunk, particularly from
the Security channel (wineventlog),and System channel (for EventCode 7040).
This detection requires fields like EventCode, ComputerName, Service_Name,
OperationType, ObjectName, NewProcessName, ParentProcessName, Message,
ProcessName, NewValue, NewValueType, ProcessId,ParentProcessId,
and count values from stats.
Use Sysmon or Endpoint data models for enhanced coverage.
For Event IDs 4657 and 4663 (registry modifications and access attempts),
auditing must be enabled as these events are not logged by default.
Follow these steps to configure auditing
1. **Enable Object Access Auditing in Group Policy or Local Security Policy:**
- Open Local Security Policy (secpol.msc) or Group Policy Editor (gpedit.msc)
- Navigate to Computer Configuration > Windows Settings > Security Settings >
Advanced Audit Policy Configuration > Audit Policies > Object Access.
- Enable "Audit Registry" for Success and Failure
(or specifically "Audit Handle Manipulation" and "Audit Kernel Object"
if needed for finer control).
2. **Set System Access Control List (SACL) on the specific registry key:**
- Open Registry Editor (regedit.exe) as Administrator.
- Navigate to the target key:
HKCU\Software\Classes\CLSID\{A7A63E5C-3877-4840-8727-C1EA9D7A4D50}
(or the relevant subkeys where changes are expected).
- Right-click the key > Permissions > Advanced > Auditing tab.
- Click "Add" > Select Principal
(e.g., "Everyone" or a specific user/group for broader monitoring).
- Set Type to "Success" and "Failure".
- Check permissions to audit, such as "Set Value", "Create Subkey", "Delete",
"Query Value", "Enumerate Subkeys",and "Write DAC"
(adjust based on the attack vector; at minimum, include "Set Value" for 4657
and access operations for 4663).
- Apply the changes. This SACL must be set on the exact keys/values
to generate events 4657 (for value modifications)
and 4663 (for handle access).
**Important Note on HKCU:**
Since this registry path is located under **HKEY_CURRENT_USER (HKCU)**,
the SACL is user-specific and applies only to the currently
logged-on user profile.
To ensure comprehensive coverage on multi-user systems
(e.g., Terminal Servers, Remote Desktop Session Hosts,or shared workstations)
this SACL configuration must be applied **for each user profile**
that needs to be monitored.
- One common approach is to log in as each relevant user
(or use a script/tool like PowerShell
with scheduled tasks or logon scripts)
to set the SACL in their HKCU hive.
- For domain environments, consider using Group Policy Preferences
(Registry) or logon scripts to automate applying these
auditing settings per user.
- If monitoring all users is impractical, prioritize high-risk or
privileged accounts.
Note SACLs are object-specific and do not propagate
unless inheritance is enabled.For domain-wide deployment,
use Group Policy to apply these settings where possible.
Test the configuration by simulating registry changes
(as the target user) to verify events are generated in the Security log.
For EventCode 7040 (service changes), ensure "Audit System Events"
is enabled under Audit Policies > System Audit Policies > System.
Without these auditing configurations,
the detection will not trigger for registry-related events.
known_false_positives: |-
Legitimate administrative activities may trigger this detection,
such as software installations or system configurations involving
Remote Registry and BitLocker components. Tune based on environment.
drilldown_searches:
- name: View the detection results for - "$Host$"
search: '%original_detection_search% | search Host = "$Host$"'
earliest_offset: $info_min_time$
latest_offset: $info_max_time$
- name: View risk events for the last 7 days for - "$Host$"
search: |
| from datamodel Risk.All_Risk | search normalized_risk_object="$Host$"
starthoursago=168 \
| stats count min(_time) as firstTime max(_time) \
as lastTime values(search_name) as "Search Name" values(risk_message) \
as "Risk Message" values(analyticstories) as "Analytic Stories" \
values(annotations._all) as "Annotations" \
values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" \
by normalized_risk_object
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
earliest_offset: $info_min_time$
latest_offset: $info_max_time$
tags:
asset_type: Endpoint
mitre_attack_id:
- T1546.015
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
security_domain: endpoint
tests:
- name: True Positive Test security log
attack_data:
- data:
https://media.githubusercontent.com/media/splunk/attack_data/refs/heads/master/datasets/attack_techniques/T1546.015/bitlocker_com_hijacking/windows-security.log
source: XmlWinEventLog:security
sourcetype: XmlWinEventLog
- name: True Positive Test system log
attack_data:
- data:
https://media.githubusercontent.com/media/splunk/attack_data/refs/heads/master/datasets/attack_techniques/T1546.015/bitlocker_com_hijacking/windows-system.log
source: XmlWinEventLog:system
sourcetype: XmlWinEventLog
Comment on lines +157 to +169
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also since you are looking at the logs at once. They have to be in the same file. Do not split them.

Loading