Skip to content

v1.0.1

Choose a tag to compare

@drg-src drg-src released this 12 Nov 09:49
· 3 commits to main since this release
ee2c1d8

v1.0.1

danfoss-shield helps you find Danfoss and Dixell refrigeration controllers (StoreView, AK-SM, XWEB) that are exposed on the internet, and block them at your gateway firewall while you wait for a proper fix. It is a stopgap, not a patch.

Features

  • Scan your own network for exposed controllers and report each one as open, closed or unknown. A scan that could not finish is never reported as clean.
  • Block new connections to them from the internet with nftables or iptables, IPv4 and IPv6.
  • Safety first: it backs up your firewall rules before changing anything, checks every target before it starts, refuses to block your own gateway, and rolls back only the rules it added.
  • Exit codes you can script against: 0 is a complete, clean run, 1 is an error, an incomplete scan or an unknown result, 2 means an open auth endpoint was found, 3 means the command needs root.
  • Each probe has a time limit, so a slow or stalling host cannot hold up a scan. --silent-ok lets a range with unused addresses pass.
  • Optional Shodan lookup limited to your own public range (read-only), Suricata rules, and a scheduled scan.
  • No packages to install. It uses only Python's standard library (Python 3.9+). The blocking step uses your system's nft or iptables.

Use it only on what you own

Scanning machines you do not own can be illegal. The tool refuses public targets unless you pass --authorized to confirm you have permission.

Tested

  • Automated checks run in CI on Python 3.9, 3.12, 3.13 and 3.14 on Linux and on Python 3.13 on Windows.
  • The firewall rules were loaded and rolled back as root on real Linux (nftables and iptables). That is a load-and-remove check, not a test against real forwarded traffic.
  • The Shodan code is tested against a mocked API. The Suricata rules were not validated against a Suricata install.

Good to know

  • It is a stopgap. The real fix is to patch the controllers, replace old ones, or remove the port-forward on your router.
  • Blocking only works when you run it on the gateway that routes the controllers' traffic.
  • Controllers that show no fingerprint on their start page are not found.
  • Rules are not kept after a reboot by default. The tool shows you how to make them stick.
  • Exit 0 does not mean your controllers are safe.

See the README for setup and usage. MIT licensed.

Verify the download

SHA-256 of danfoss_shield.py:
42294cc0a79f3c5d31904f23dbffbd9ecb3df2420c4c368cac780372bd96b63d

sha256sum danfoss_shield.py