Discovery (TA0007)
Sub-technique: T1083 - File and Directory Discovery
//Basic Search
DeviceProcessEvents
| where ProcessCommandLine has_any ("dir", "ls")
| project Timestamp, DeviceName, ProcessCommandLine, InitiatingProcessAccountName, InitiatingProcessCommandLine, InitiatingProcessFileName, InitiatingProcessFolderPath, InitiatingProcessParentFileName
//Advanced Search
DeviceProcessEvents
| where ProcessCommandLine has_any ("dir", "ls")
| extend InitiatingProcessFileName = tostring(split(ProcessCommandLine, " ")[0])
| join kind=leftouter (
DeviceNetworkEvents
| where InitiatingProcessFileName has_any ("dir", "ls", "powershell", "cmd", "explorer", "taskmgr", "regedit", "notepad", "msconfig", "services", "mmc", "control", "winword", "excel", "outlook")
| summarize NetworkEventCount = count() by DeviceName
) on DeviceName
| project Timestamp, DeviceName, ProcessCommandLine, InitiatingProcessAccountName, InitiatingProcessFileName, NetworkEventCount
| order by Timestamp descLast updated