Communicates to servers operated by Google using the Jabber/XMPP protocol for C2.1
Publish/Subscribe Protocols T1071.005
- Tactic
- Command and Control
- Platforms
- macOS, Linux, Windows, Network Devices
- Version
- 1.1
- Created
- 28 August 2024
- Last modified
- 15 April 2025
- Contributors
- Domenico Mazzaferro Palmeri; Sofia Sanchez Margolles
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.
Publish/Subscribe Protocols MITRE reference T1071.005
1 software entry is documented implementing this technique. MITRE files each as a tool or as malware; newest first, then by how many groups carry them.
All 1 software entries for this technique
Offense vs defense T1071.005
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
Publish/Subscribe Protocols detection strategy DET0002
MITRE names one behaviour worth catching for this technique and breaks it into 4 analytics, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Behavioral Detection of Publish/Subscribe Protocol Misuse for C2
AN0002 · Windows
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.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Network Connection CreationDC0082 | WinEventLog:Sysmon | EventCode=3, 22 |
| Network Traffic ContentDC0085 | NSM:Flow | mqtt.log / xmpp.log (custom log feeds) |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| UnusualProcessList | Detect suspicious processes initiating outbound pub/sub connections |
| TimeWindow | Define beaconing interval used for temporal correlation |
| ProtocolPortList | Custom MQTT/XMPP port use in non-standard ranges (e.g., 1883, 5222, 5672) |
AN0003 · Linux
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.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | auditd:SYSCALL | execve |
| Network Traffic ContentDC0085 | NSM:Flow | mqtt.log or AMQP custom log |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| BrokerAllowList | Known-good brokers used by approved apps and daemons |
| TopicAnomalyScore | Payload length, entropy, or topic name patterns |
AN0004 · macOS
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.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | macos:unifiedlog | log stream 'eventMessage contains pubsub or broker' |
| Network Traffic FlowDC0078 | macos:osquery | socket_events |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| AppContextFilter | Applications not known to use pub/sub protocols |
| URIPathRegex | Custom path patterns to message brokers over HTTPS |
AN0005 · Network Devices
Detects pub/sub traffic over unusual ports, high-frequency topic publications, and connections to known-bad or dynamic broker endpoints outside allowlisted infrastructure.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Network Traffic ContentDC0085 | NSM:Flow | mqtt.log, xmpp.log, amqp.log |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| BrokerReputationList | Dynamic blocklist or threat intel feed for C2 brokers |
| PayloadLengthThreshold | Exfil-style long topic messages vs telemetry-style short messages |
Consider filtering publish/subscribe protocol requests to untrusted or known bad resources over irregular ports (e.g. MQTT’s standard ports are 1883 or 8883).
Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level.