Query Details

Monitoring Explorer Initiated External Traffic

Query

//Sergio Albea
DeviceNetworkEvents
| where Timestamp >= ago(1d)
| where InitiatingProcessFileName =~ "explorer.exe"
| where RemoteIPType == "Public"
| where not(RemoteUrl has_any (dynamic(['bing.com','assets.msn.com']))) 
| extend geo_ip = tostring(geo_info_from_ip_address(RemoteIP).country)
//| where geo_ip !in ('','')
| summarize Connections=count(),make_set(RemoteUrl),make_set(RemoteIP) by DeviceName,DeviceId,InitiatingProcessFileName, geo_ip, Timestamp, ReportId

About this query

Explanation

This query is designed to monitor and identify suspicious external network connections initiated by Windows File Explorer (explorer.exe), which could indicate a potential security threat. Here's a simple breakdown of what the query does:

  1. Data Source: It looks at network events from devices, specifically focusing on connections made in the last day (Timestamp >= ago(1d)).

  2. Process Filtering: It filters for events where the initiating process is explorer.exe, which is the Windows File Explorer.

  3. Public IP Check: It ensures that the connections are made to public IP addresses (RemoteIPType == "Public"), which are outside the local network.

  4. Exclusion of Known Safe URLs: It excludes connections to known safe URLs like bing.com and assets.msn.com to reduce false positives.

  5. Geolocation: It extends the data with geolocation information to identify the country of the remote IP address.

  6. Optional Country Filtering: There is an option to exclude connections to specific countries, although this part is commented out in the query.

  7. Summarization: Finally, it summarizes the data by counting the number of connections and listing the unique remote URLs and IPs for each device, along with other details like the device name and timestamp.

Overall, this query helps in detecting unusual network activity initiated by File Explorer, which could be indicative of an attacker using it to transfer tools or malware from an external source.

Details

Sergio Albea profile picture

Sergio Albea

Released: July 21, 2026

Tables

DeviceNetworkEvents

Keywords

DeviceNetworkEventsTimestampInitiatingProcessFileNameRemoteIPTypeUrlGeoConnectionsIdReport

Operators

ago=~==nothas_anydynamicextendtostringgeo_info_from_ip_addresssummarizecountmake_setby

MITRE Techniques

Actions

GitHub