Query Details
//This query detects potential active network reconnaissance attacks using Nmap //Monitors for command line usage of nmap tool DeviceProcessEvents | where Timestamp >= ago (30d) | where InitiatingProcessCommandLine contains "cmd" and ProcessCommandLine contains "nmap" | project InitiatingProcessCommandLine, ProcessCommandLine, DeviceName, AccountUpn, DeviceId, Timestamp, ReportId
This query is designed to identify possible active network reconnaissance attacks by monitoring the use of the Nmap tool, which is often used for network scanning. Here's a simple breakdown of what the query does:
Data Source: It looks at events related to processes on devices (DeviceProcessEvents).
Time Frame: It focuses on events that occurred in the last 30 days.
Filter Criteria:
Output: For any events that match these criteria, it retrieves and displays the following details:
InitiatingProcessCommandLine).ProcessCommandLine).DeviceName).AccountUpn).DeviceId).Timestamp).ReportId).In summary, this query helps in detecting and investigating potential unauthorized network scanning activities by identifying when and where the Nmap tool is being used within the network.

Darren Mayes
Released: November 10, 2024
Tables
Keywords
Operators