Query Details
# List Lateral Movements Paths to Compromised Device ### Sentinel ```KQL // List potential lateralmovement paths to compromised device let DeviceName = "testdevice.test.com"; ExposureGraphEdges | where TargetNodeLabel == "device" | where TargetNodeName == DeviceName | summarize Total = dcount(SourceNodeName), Details = make_set(SourceNodeName) by EdgeLabel, TargetNodeName | extend Message = strcat(Total, " details ", EdgeLabel, " ", TargetNodeName) | project Message, Action = EdgeLabel, Details, Total, Target = TargetNodeName ```
This query lists potential paths of lateral movement to a compromised device named "testdevice.test.com" in Sentinel. It counts the number of unique source nodes, creates a set of source node names, and then displays the total count, details, edge label, and target node name in a message.

Bert-Jan Pals
Released: June 27, 2024
Tables
Keywords
Operators