← Back to SOC feed Coverage →

detect-nbtscan-activity

kql MEDIUM Azure-Sentinel
DeviceFileEventsDeviceProcessEvents
backdoorhuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-09T23:00:01Z · Confidence: medium

Hunt Hypothesis

Adversaries may be using NBTScan to identify active hosts and potential targets within a network, indicating reconnaissance activity. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect early-stage network discovery efforts and prevent further compromise.

KQL Query

let nbtscan = pack_array("9af0cb61580dba0e380cddfe9ca43a3e128ed2f8",
"90da10004c8f6fafdaa2cf18922670a745564f45");
union DeviceProcessEvents , DeviceFileEvents 
| where Timestamp > ago(7d)
| where FileName =~ "nbtscan.exe" or SHA1 in (nbtscan)
| project FolderPath, FileName, InitiatingProcessAccountName,
InitiatingProcessFileName, ProcessCommandLine, Timestamp

Analytic Rule Definition

id: 28ebbb87-535b-4ba0-80f4-6fbf80b7c55a
name: detect-nbtscan-activity
description: |
  This query was originally published in the threat analytics report, Operation Soft Cell.
  Operation Soft Cell is a series of campaigns targeting users' call logs at telecommunications providers throughout the world. These attacks date from as early as 2012.
  Operation Soft Cell operators have been known to run nbtscan.exe, a legitimate MS-DOS command-line tool used to discover any NETBIOS nameservers on a local or remote TCP/IP network.
  The following query detects any nbtscan activity on the system over the past seven days.
  Reference - https://www.cybereason.com/blog/operation-soft-cell-a-worldwide-campaign-against-telecommunications-providers
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
  - DeviceFileEvents
tactics:
- Discovery
query: |
  let nbtscan = pack_array("9af0cb61580dba0e380cddfe9ca43a3e128ed2f8",
  "90da10004c8f6fafdaa2cf18922670a745564f45");
  union DeviceProcessEvents , DeviceFileEvents 
  | where Timestamp > ago(7d)
  | where FileName =~ "nbtscan.exe" or SHA1 in (nbtscan)
  | project FolderPath, FileName, InitiatingProcessAccountName,
  InitiatingProcessFileName, ProcessCommandLine, Timestamp

Required Data Sources

Sentinel TableNotes
DeviceFileEventsEnsure this data connector is enabled
DeviceProcessEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Discovery/detect-nbtscan-activity.yaml