Execution, Indicators of usage of winexe for lateral movement
Servince Install
Query
(DeviceEvents
| where ActionType == 'ServiceInstalled'
| extend parsed = parse_json(AdditionalFields)
| where parsed.ServiceName has ("winexesvc")Explanation
This query is designed to detect the installation of a service associated with the "winexe" remote administration tool, which can be used for lateral movement within a network. Here's a breakdown of what the query does:
- Source: It looks at
DeviceEvents, which are records of various actions performed on devices. - Filter by ActionType: It filters these events to only include those where the
ActionTypeis 'ServiceInstalled', indicating a new service has been installed. - Parse Additional Fields: It extracts additional information from the
AdditionalFieldscolumn by parsing it as JSON. - Check for winexe Service: It then checks if the parsed
ServiceNamecontains "winexesvc", which is the service name used by the winexe tool.
In summary, this query identifies instances where the winexe tool has been installed as a service on a device, which could indicate potential lateral movement activity within the network.
Details

Ali Hussein
Released: January 24, 2024
Tables
DeviceEvents
Keywords
DeviceEvents
Operators
==|extendparse_jsonhas