DeviceNetworkEvents
| where Timestamp > ago(1d)
| where RemotePort == 445
| where ActionType == "ConnectionSuccess"
| where ipv4_is_private(RemoteIP)
| summarize TargetHosts = dcount(RemoteIP), HostList = make_set(RemoteIP, 20), ConnectionCount = count() by DeviceName, InitiatingProcessFileName, InitiatingProcessAccountName, bin(Timestamp, 1h)
| where TargetHosts >= 3
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessAccountName, TargetHosts, HostList, ConnectionCount
| sort by TargetHosts desc