← Back to SOC feed Coverage →

Qakbot reconnaissance activities

kql MEDIUM Azure-Sentinel
DeviceProcessEvents
backdoorcobalt-strikehuntingmicrosoftofficial
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-05T23:00:00Z · Confidence: medium

Hunt Hypothesis

The Qakbot reconnaissance activities detected indicate an adversary is gathering system information and establishing command and control communication to exfiltrate data after successful code injection. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate Qakbot-related threats before they escalate to data exfiltration or lateral movement.

KQL Query

DeviceProcessEvents
| where InitiatingProcessFileName == InitiatingProcessCommandLine
| where ProcessCommandLine has_any (
"whoami /all","cmd /c set","arp -a","ipconfig /all","net view /all","nslookup -querytype=ALL -timeout=10",
"net share","route print","netstat -nao","net localgroup")
| summarize dcount(FileName), make_set(ProcessCommandLine) by DeviceId,bin(Timestamp, 1d), InitiatingProcessFileName, InitiatingProcessCommandLine
| where dcount_FileName >= 8

Analytic Rule Definition

id: 2faad0ef-63f4-40aa-98e8-b713d9a8b3f7
name: Qakbot reconnaissance activities
description: |
  Use this query to find reconnaissance and beaconing activities after code injection occurs.
  Reconnaissance commands are consistent with the current version of Qakbot and occur automatically to exfiltrate system information. This data, once exfiltrated, will be used to prioritize human operated actions.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
- Discovery
query: |
  DeviceProcessEvents
  | where InitiatingProcessFileName == InitiatingProcessCommandLine
  | where ProcessCommandLine has_any (
  "whoami /all","cmd /c set","arp -a","ipconfig /all","net view /all","nslookup -querytype=ALL -timeout=10",
  "net share","route print","netstat -nao","net localgroup")
  | summarize dcount(FileName), make_set(ProcessCommandLine) by DeviceId,bin(Timestamp, 1d), InitiatingProcessFileName, InitiatingProcessCommandLine
  | where dcount_FileName >= 8

Required Data Sources

Sentinel TableNotes
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/Campaigns/Qakbot/Qakbot reconnaissance activities.yaml