Show HN: Coldframe, a honeypot that poses as a supermarket fridge controller
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
Show HN: Coldframe, a honeypot that poses as a supermarket fridge controller
coldframe A honeypot for supermarket refrigeration controllers. In 2026, attackers broke into internet-facing refrigeration supervisors across Europe using default passwords and old, unpatched firmware, then forced defrost cycles. coldframe pretends to be one of those controllers. It records who connects, what passwords they try and which public exploits they use, and it never gives them anything real. It is one Python file with no dependencies outside the standard library.
Coldframe 是一个针对超市制冷控制器的蜜罐。2026 年,攻击者利用默认密码和陈旧、未修补的固件入侵了欧洲各地面向互联网的制冷监控系统,并强制执行除霜循环。Coldframe 伪装成其中一种控制器。它会记录连接者身份、尝试的密码以及使用的公开漏洞,且绝不会提供任何真实数据。它是一个无需标准库之外任何依赖的 Python 文件。
Personas
角色设定
| Persona | Pretends to be | What it serves |
|---|---|---|
| danfoss | Danfoss AK-SM 800A system manager | StoreView login, a fake store dashboard, the XML API at /html/xml.cgi and /xml.cgi, HTTP and HTTPS |
| dixell | Copeland/Dixell XWEB EVO supervisor | Login page and the XWEB 500 CGI paths targeted by public exploits |
| 角色 | 伪装对象 | 提供内容 |
|---|---|---|
| danfoss | Danfoss AK-SM 800A 系统管理器 | StoreView 登录页面、虚假商店仪表板、位于 /html/xml.cgi 和 /xml.cgi 的 XML API,以及 HTTP 和 HTTPS 服务 |
| dixell | Copeland/Dixell XWEB EVO 监控器 | 登录页面以及针对公开漏洞的 XWEB 500 CGI 路径 |
Looking like a real unit
模拟真实设备
The Danfoss persona copies what internet scanners record for real AK-SM 800A units: the nginx server header and header order, the Danfoss StoreView page title, TLS 1.2 only, and a 1-year certificate for CN=DanfossSM800A issued by a SelfSigned-DanfossSM800A authority. Each build generates its own keys. Weak logins (for example Supervisor / 12345) and a correct CVE-2025-41450 “code of the day” succeed. The attacker gets a session token and a dashboard of fake refrigerated cases with defrost buttons. Every action they take is logged as a control event; nothing is real.
Danfoss 角色复制了互联网扫描器记录的真实 AK-SM 800A 设备信息:nginx 服务器标头及其顺序、Danfoss StoreView 页面标题、仅限 TLS 1.2,以及由 SelfSigned-DanfossSM800A 颁发的 CN=DanfossSM800A 一年期证书。每次构建都会生成独立的密钥。弱口令登录(例如 Supervisor / 12345)以及正确的 CVE-2025-41450“当日代码”均可成功。攻击者会获得一个会话令牌和一个带有除霜按钮的虚假冷藏柜仪表板。他们的每一个操作都会被记录为控制事件;所有内容均为虚构。
The Dixell persona follows real XWEB EVO units the same way: no Server header, their security-header set and order, the same asset paths and page size. Its login uses the real /cgi-bin/login.lua flow: the documented factory login Admin / Admin succeeds, five failures in five minutes lock the user, and attempts at the XWEB Pro auth_mode bypass (CVE-2026-25085) are tagged.
Dixell 角色以同样方式模拟真实的 XWEB EVO 设备:不包含 Server 标头,采用其安全标头设置及顺序,并使用相同的资产路径和页面大小。其登录过程遵循真实的 /cgi-bin/login.lua 流程:文档记载的工厂登录 Admin / Admin 可成功,五分钟内五次失败将锁定用户,针对 XWEB Pro auth_mode 绕过(CVE-2026-25085)的尝试会被标记。
Assets and Modbus
资产与 Modbus
Real units of both vendors serve their own favicon, and scanners match devices by its hash. That icon is the vendor’s artwork, so it is not in this repository. For a private deployment you can point FAVICON_FILE at a copy you have the right to use. The same goes for the Danfoss start page. Real units serve a short Angular loader page from the firmware, and thousands share its exact hash. Point INDEX_FILE at that index.html (from the public firmware package) and the decoy serves it byte for byte, with its original date in Last-Modified and ETag. The loader’s main.*.js then shows the decoy’s own login page, laid out like the firmware’s remote login. If the firmware’s assets/images/Danfoss-logo.png sits beside that index.html, the page uses it.
两家厂商的真实设备都会提供各自的图标(favicon),扫描器通过其哈希值匹配设备。由于该图标属于厂商艺术作品,因此未包含在本仓库中。对于私有部署,您可以将 FAVICON_FILE 指向您有权使用的副本。Danfoss 起始页也是如此。真实设备会从固件中提供一个简短的 Angular 加载页面,数千台设备共享其精确的哈希值。将 INDEX_FILE 指向该 index.html(来自公开固件包),蜜罐即可逐字节提供该文件,并保留其原始的 Last-Modified 和 ETag 日期。加载器的 main.*.js 随后会显示蜜罐自身的登录页面,其布局与固件的远程登录页面一致。如果固件的 assets/images/Danfoss-logo.png 位于该 index.html 旁边,页面便会调用它。
Both personas can also run an optional Modbus TCP service with fake case temperatures, setpoints and a defrost register. Real AK-SM 800A units only use Modbus to talk to their own case controllers, so Modbus is off by default. Turn it on to catch generic industrial scanners.
两种角色均可运行可选的 Modbus TCP 服务,提供虚假的柜体温度、设定点和除霜寄存器。真实的 AK-SM 800A 设备仅使用 Modbus 与其自身的柜体控制器通信,因此 Modbus 默认处于关闭状态。开启该功能可捕获通用的工业扫描器。
Exploits it recognises
可识别的漏洞
Requests that match a public exploit get an exploit field in the log:
- CVE-2023-25914: AK-SM 800A path traversal via get_file
- CVE-2023-25915: AK-SM 800A command injection via load_cert
- CVE-2025-41452: AK-SM 800A nginx header overwrite via load_nginx_headers
- CVE-2025-41450: AK-SM 800A “code of the day” login bypass (getauth with eds_only or quantum_only), noting whether the attacker computed the correct code
- SM800 code-of-the-day bypass: eds_only / quantum_only on other commands
- CVE-2021-45420: XWEB 500 upload and command paths under /cgi-bin/
- CVE-2026-25085: XWEB Pro login bypass via an unexpected auth_mode
匹配公开漏洞的请求会在日志中获得一个 exploit 字段:
- CVE-2023-25914:通过 get_file 进行 AK-SM 800A 路径遍历
- CVE-2023-25915:通过 load_cert 进行 AK-SM 800A 命令注入
- CVE-2025-41452:通过 load_nginx_headers 进行 AK-SM 800A nginx 标头覆盖
- CVE-2025-41450:AK-SM 800A“当日代码”登录绕过(使用 eds_only 或 quantum_only 进行 getauth),并记录攻击者是否计算出了正确的代码
- SM800 当日代码绕过:其他命令上的 eds_only / quantum_only
- CVE-2021-45420:/cgi-bin/ 下的 XWEB 500 上传和命令路径
- CVE-2026-25085:通过意外的 auth_mode 进行 XWEB Pro 登录绕过
Quick start
快速开始
PERSONA=danfoss HTTP_PORT=8080 python3 -I honeypot.py
Open http://localhost:8080 and every request shows up as a JSON line on stdout and in events.jsonl. Run the tests (they start the honeypot on loopback and attack it):
python3 -I test_honeypot.py
打开 http://localhost:8080,每个请求都会以 JSON 行的形式显示在标准输出和 events.jsonl 中。运行测试(它们会在回环地址上启动蜜罐并对其进行攻击):
python3 -I test_honeypot.py
Deploying
部署
Quickest: paste into “User data”
Create an Ubuntu 24.04 server (a $4 DigitalOcean droplet is plenty) and paste cloud-init.yaml into the User data box. Change PERSONA=danfoss to dixell if you want the XWEB persona. About two minutes after boot the decoy is listening on port 80 (and 443 for Danfoss), hardened as below. Then, in your provider’s firewall, allow only the decoy’s ports from anywhere and SSH from your own address. Read the log with: ssh root@<server> 'podman logs coldframe'
最快方式:粘贴到“用户数据”中
创建一个 Ubuntu 24.04 服务器(4 美元的 DigitalOcean droplet 足矣),并将 cloud-init.yaml 粘贴到“用户数据”框中。如果您想要 XWEB 角色,请将 PERSONA=danfoss 改为 dixell。启动约两分钟后,蜜罐即会在 80 端口(Danfoss 为 443)监听,并按如下方式加固。然后,在您的服务商防火墙中,仅允许来自任何地方的蜜罐端口访问,以及来自您自己地址的 SSH 访问。使用以下命令读取日志:ssh root@<server> 'podman logs coldframe'
By hand Build the container. Each build makes a fresh self-signed certificate, so two deployments never share one.
podman build -t coldframe .
Run it with rootful podman or Docker. Rootless port forwarding rewrites the source address, which makes every attacker look like the same internal IP. —userns=auto maps the container to an unused host UID range, so even the container user is nobody on the host. Podman needs a range to hand out, once per host:
echo "containers:2147483647:2147483648" | sudo tee -a /etc/subuid /etc/subgid
sudo podman run -d --name coldframe --restart=always \
--read-only --cap-drop=ALL --security-opt no-new-privileges --userns=auto \
--memory 128m --pids-limit 512 --log-opt max-size=10m \
-p 80:8080 -p 443:8443 \
-v coldframe-logs:/logs:U \
-e PERSONA=danfoss \
coldframe
For Modbus, add -e MODBUS_PORT=5020 -p 502:5020. On the host, only expose the ports the persona would really have, and block outbound traffic except DNS and package updates: the decoy never needs to connect out. Keep SSH reachable only from your own address: a fridge controller with SSH open to the world looks wrong.
手动部署 构建容器。每次构建都会生成一个新的自签名证书,因此两个部署绝不会共享同一个证书。
podman build -t coldframe .
使用 root 权限的 podman 或 Docker 运行它。无根(Rootless)端口转发会重写源地址,导致所有攻击者看起来都像是同一个内部 IP。—userns=auto 将容器映射到未使用的宿主机 UID 范围,因此即使是容器用户在宿主机上也只是 nobody。Podman 需要在每台宿主机上分配一次范围:
echo "containers:2147483647:2147483648" | sudo tee -a /etc/subuid /etc/subgid
sudo podman run -d --name coldframe --restart=always \
--read-only --cap-drop=ALL --security-opt no-new-privileges --userns=auto \
--memory 128m --pids-limit 512 --log-opt max-size=10m \
-p 80:8080 -p 443:8443 \
-v coldframe-logs:/logs:U \
-e PERSONA=danfoss \
coldframe
对于 Modbus,添加 -e MODBUS_PORT=5020 -p 502:5020。在宿主机上,仅暴露角色实际应有的端口,并阻止除 DNS 和软件包更新之外的出站流量:蜜罐无需连接外部。保持 SSH 仅能从您自己的地址访问:一个向全球开放 SSH 的冰箱控制器看起来很不正常。
Configuration
配置
| Variable | Default | Meaning |
|---|---|---|
| PERSONA | danfoss | danfoss or dixell |
| HTTP_PORT | 8080 | HTTP listener |
| HTTPS_PORT | 0 (off) | HTTPS listener, needs CERT_FILE and KEY_FILE |
| MODBUS_PORT | 0 (off) | Modbus TCP listener |
| LOG_PATH | events.jsonl | Where events are appended |
| FAVICON_FILE | none | Optional favicon to serve (private deployments only) |
| INDEX_FILE | none | Optional Danfoss firmware index.html to serve as the start page (private deployments only) |
| 变量 | 默认值 | 含义 |
|---|---|---|
| PERSONA | danfoss | danfoss 或 dixell |
| HTTP_PORT | 8080 | HTTP 监听端口 |
| HTTPS_PORT | 0 (关闭) | HTTPS 监听端口,需要 CERT_FILE 和 KEY_FILE |
| MODBUS_PORT | 0 (关闭) | Modbus TCP 监听端口 |
| LOG_PATH | events.jsonl | 事件追加位置 |
| FAVICON_FILE | 无 | 可选的 favicon(仅限私有部署) |
| INDEX_FILE | 无 | 可选的 Danfoss 固件 index.html,用作起始页(仅限私有部署) |
Reading the log
读取日志
Each line is one event: {"ts": "2026-11-05T10:57:21.158+00:00", "persona": "danfoss", "proto": "http", "src_ip": "203.0.113.7", "src_port": 6782, "event": "login_attempt", "username": "admin", "password": "admin"}
每一行代表一个事件:{"ts": "2026-11-05T10:57:21.158+00:00", "persona": "danfoss", "proto": "http", "src_ip": "203.0.113.7", "src_port": 6782, "event": "login_attempt", "username": "admin", "password": "admin"}