← Back to SOC feed Coverage →

RedMenshen-BPFDoor-backdoor

kql MEDIUM Azure-Sentinel
T1095T1059.004T1070
DeviceProcessEvents
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-07T11:00:00Z · Confidence: medium

Hunt Hypothesis

The RedMenshen-BPFDoor-backdoor rule detects the use of a custom backdoor leveraging BPF to enable remote code execution and persistent access on compromised systems. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential Red Menshen adversary activity that could lead to long-term system control and data exfiltration.

KQL Query

DeviceProcessEvents
| where InitiatingProcessCommandLine  has ("/dev/shm/kdmtmpflush") or FileName has_any ("haldrund.pid", "kdevrund.pid")

Analytic Rule Definition

id: bfb8eaed-941c-4866-a2cc-d5d4465bfc2a
name: RedMenshen-BPFDoor-backdoor
description: |
  This query was originally published by PWC Security Research Team.
  BPFDoor is custom backdoor malware used by Red Menshen. The BPFDoor allows an adversary to backdoor a system and remotely execute codes without opening any new network ports or firewall rules.
References:
  https://doublepulsar.com/bpfdoor-an-active-chinese-global-surveillance-tool-54b078f1a896
  https://elastic.github.io/security-research/intelligence/2022/05/04.bpfdoor/article/
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
  - Execution
relevantTechniques:
  - T1095
  - T1059.004
  - T1070
query: |
  DeviceProcessEvents
  | where InitiatingProcessCommandLine  has ("/dev/shm/kdmtmpflush") or FileName has_any ("haldrund.pid", "kdevrund.pid")

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/redmenshen-bpfdoor-backdoor.yaml