Cross-source coverage

T1071.005 / ATT&CK

Application Layer Protocol: Publish/Subscribe Protocols

1 rule across 1 source.

From MITRE ATT&CK 19.2

Adversaries may communicate using publish/subscribe (pub/sub) application layer protocols to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.

Protocols such as MQTT, XMPP, AMQP, and STOMP use a publish/subscribe design, with message distribution managed by a centralized broker. Publishers categorize their messages by topics, while subscribers receive messages according to their subscribed topics. An adversary may abuse publish/subscribe protocols to communicate with systems under their control from behind a message broker while also mimicking normal, expected traffic.

Platforms
macOS · Linux · Windows · Network Devices
Telemetry
WinEventLog:SysmonNSM:Flowauditd:SYSCALLmacos:unifiedlogmacos:osquery

How MITRE says to detect it DET0002

Behavioral Detection of Publish/Subscribe Protocol Misuse for C2

Windows Analytic 0002

Detects non-standard processes (e.g., PowerShell, python.exe, rundll32.exe) making outbound connections using publish/subscribe protocols (e.g., MQTT, AMQP) over non-browser, encrypted channels, often beaconing to message brokers.

  • WinEventLog:Sysmon EventCode=3, 22
  • NSM:Flow mqtt.log / xmpp.log (custom log feeds)

Linux Analytic 0003

Detects CLI tools (e.g., mosquitto_pub, nc, python scripts) interacting with pub/sub brokers using unusual topic names, high-frequency publication rates, or obfuscated payloads to non-standard hosts.

  • auditd:SYSCALL execve
  • NSM:Flow mqtt.log or AMQP custom log

macOS Analytic 0004

Detects osascript, curl, or custom binaries interacting with XMPP/MQTT brokers in unapproved destinations with encrypted payloads or frequent POST-like requests to broker URIs.

  • macos:unifiedlog log stream 'eventMessage contains pubsub or broker'
  • macos:osquery socket_events

Network Devices Analytic 0005

Detects pub/sub traffic over unusual ports, high-frequency topic publications, and connections to known-bad or dynamic broker endpoints outside allowlisted infrastructure.

  • NSM:Flow mqtt.log, xmpp.log, amqp.log

elastic/detection-rules

1 rule
Detection Severity Format
First Seen External MQTT Broker Connection Medium Elastic TOML

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.