let IPRegex = '[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}';
DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "WMIC.exe"
| extend RemoteIP = extract(IPRegex, 0, ProcessCommandLine)
| where isnotempty(RemoteIP)
| where RemoteIP != "127.0.0.1"
| project Timestamp, DeviceName, AccountName, ProcessCommandLine, RemoteIP, InitiatingProcessFileName
| sort by Timestamp desc