← Back to SOC feed Coverage →

KNOTWEED-Downloading new file using Curl

kql MEDIUM Azure-Sentinel
DeviceNetworkEvents
huntingmicrosoftofficial
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-05T03:15:55Z · Confidence: medium

Hunt Hypothesis

Adversaries may use Curl to download malicious payloads, leveraging this technique to establish command and control or deploy malware. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential compromise and mitigate lateral movement risks.

KQL Query

let known_files = DeviceNetworkEvents
| where Timestamp between (ago(7d)..ago(1d))
| where InitiatingProcessFileName has "curl"
| extend url = extract("http[s]?:\\/\\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", 0,InitiatingProcessCommandLine)
| extend ip = extract("(\\b25[0-5]|\\b2[0-4][0-9]|\\b[01]?[0-9][0-9]?)(\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}[^ ]*", 0, InitiatingProcessCommandLine)
| extend remote_file = iif(isnotempty(url), url, ip)
| summarize by remote_file;
DeviceNetworkEvents
| where Timestamp > ago(1d)
| where InitiatingProcessFileName has "curl"
| extend url = extract("http[s]?:\\/\\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", 0,InitiatingProcessCommandLine)
| extend ip = extract("(\\b25[0-5]|\\b2[0-4][0-9]|\\b[01]?[0-9][0-9]?)(\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}[^ ]*", 0, InitiatingProcessCommandLine)
| extend remote_file = iif(isnotempty(url), url, ip)
| where remote_file !in (known_files)

Analytic Rule Definition

id: fac7874e-00de-4509-85f2-9aa02ea9887f
name: KNOTWEED-Downloading new file using Curl
description: |
  'This query looks for new files being downloaded using Curl.'
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - DeviceNetworkEvents
tactics:
relevantTechniques:
query: |
  let known_files = DeviceNetworkEvents
  | where Timestamp between (ago(7d)..ago(1d))
  | where InitiatingProcessFileName has "curl"
  | extend url = extract("http[s]?:\\/\\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", 0,InitiatingProcessCommandLine)
  | extend ip = extract("(\\b25[0-5]|\\b2[0-4][0-9]|\\b[01]?[0-9][0-9]?)(\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}[^ ]*", 0, InitiatingProcessCommandLine)
  | extend remote_file = iif(isnotempty(url), url, ip)
  | summarize by remote_file;
  DeviceNetworkEvents
  | where Timestamp > ago(1d)
  | where InitiatingProcessFileName has "curl"
  | extend url = extract("http[s]?:\\/\\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", 0,InitiatingProcessCommandLine)
  | extend ip = extract("(\\b25[0-5]|\\b2[0-4][0-9]|\\b[01]?[0-9][0-9]?)(\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}[^ ]*", 0, InitiatingProcessCommandLine)
  | extend remote_file = iif(isnotempty(url), url, ip)
  | where remote_file !in (known_files)

Required Data Sources

Sentinel TableNotes
DeviceNetworkEventsEnsure this data connector is enabled

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Campaigns/KNOTWEED/KNOTWEED-DownloadingnewfileusingCurl.yaml