{"slug": "the-weak-tls-in-my-house-lives-in-the-smart-plugs", "title": "The weak TLS in my house lives in the smart plugs", "summary": "A home-network experiment using the open-source GPLv3 DPI agent netifyd version 5 on an OpenWrt 24.10 router logged the TLS handshakes of household devices — SNI, cipher suite, ALPN, JA4 client fingerprint and risk flags — without decrypting traffic, writing roughly 250 bytes per connection to hourly JSONL files in RAM. The author built the logger from a shell script using only nc and jq on the router, with a FIFO kept open because BusyBox nc quits when stdin closes, and uploaded finished files hourly via curl to an FTP server on a Mac, deleting anything older than two days. The audit follows the NSA's December 2026 call for national security system operators to accelerate post-quantum migration and a certificate-lifetime schedule dropping from 200 days to 100 next year and 47 in 2029.", "body_md": "# The weak TLS in my house lives in the smart plugs\n\ntldrThe NSA wants a post-quantum move now and certificates are shrinking to 47 days. I put a DPI agent on my OpenWrt router to see what the house really negotiates: one line per handshake, nc and jq on the router, a dashboard on the Mac.\n\nTLS had a loud week. This week the NSA told operators of national security systems to [speed up their move to post-quantum cryptography now](https://thehackernews.com/2026/12/nsa-urges-immediate-post-quantum.html), after frontier AI labs privately disclosed discoveries affecting some cryptography in use today; the agencies added that this is not an immediate, widespread threat. Meanwhile public certificates already max out at 200 days and [drop to 100 next year and 47 in 2029](https://www.techcompare.app/ssl-checker/ssl-certificate-lifetime).\n\nAll of that is about servers. I wanted the other side: what do the devices in my house actually negotiate?\n\n## Install the agent\n\n[netifyd](https://www.netify.ai/) is an open-source (GPLv3) DPI agent. It reads the first packets of every connection to work out what it is, and for TLS that means the ClientHello and ServerHello: the hostname asked for (SNI), the cipher, ALPN, a JA4 fingerprint of the client, and a list of risk flags (expired certificate, hostname mismatch, self-signed, weak cipher and so on). It never decrypts anything; it sees what any router on the path sees.\n\nYou want version 5 and two of its plugins: the core processor, which turns each flow into a JSON record, and the socket sink, which serves those records. OpenWrt’s own feed carries an older netifyd, so use Netify’s feed. On OpenWrt 24.10 (swap in your release; 25.12 uses `apk`):\n\n```\nwget https://download.netify.ai/5/openwrt/key-build.pub -O /etc/opkg/keys/b18c240cb821dad2\necho 'src/gz netify https://download.netify.ai/5/openwrt/24.10/x86' >> /etc/opkg/customfeeds.conf\nopkg update\nopkg install netifyd netify-proc-core netify-sink-socket jq\n\n# flow records to a socket on 127.0.0.1 only: nothing new on the LAN, nothing to the cloud\ncat > /etc/netifyd/netify-sink-socket.json <<'EOF'\n{ \"channels\": { \"tls\": { \"enable\": true, \"bind_address\": \"tcp://127.0.0.1:1790\" } } }\nEOF\ncat > /etc/netifyd/netify-proc-core.json <<'EOF'\n{ \"format\": \"json\", \"compressor\": \"none\",\n  \"sinks\": { \"sink-socket\": { \"tls\": { \"enable\": true, \"types\": [\"stream-flows\"] } } } }\nEOF\n\nnetifyd --enable-plugin proc-core\nnetifyd --enable-plugin sink-socket\n/etc/init.d/netifyd enable && /etc/init.d/netifyd restart\n```\n\nNetify’s public v5 packages are x86_64 only; for an ARM or MIPS router you need a build from Netify. Peek at the stream with `nc 127.0.0.1 1790 | head -c 2000`: each connection produces three messages, and the last one, `flow_dpi_complete`, carries the `ssl` block and the risk IDs (`netifyd --dump-risks` names them).\n\n## One line per handshake\n\nThe logger is a shell script, `nc` and `jq`, nothing else on the router:\n\n``` bash\n#!/bin/sh\nDIR=/tmp/tlsaudit; mkdir -p \"$DIR\"\n[ -p \"$DIR/.in\" ] || mkfifo \"$DIR/.in\"\nexec 3<>\"$DIR/.in\"          # BusyBox nc quits when stdin closes: feed it a FIFO we hold open\n\nFILTER='select(.type == \"flow_dpi_complete\" and .flow.ssl != null)\n  | .flow as $f | $f.ssl as $s\n  | { t: ($f.first_seen_at / 1000 | floor), mac: $f.local_mac, ip: $f.local_ip,\n      sni: $s.client_sni, server: $f.other_ip, cipher: $s.cipher_suite,\n      alpn: $s.alpn, ja4: $s.client_ja4, risks: ($f.risks.risks // []) }\n  | \"\\(.t | localtime | strftime(\"%Y%m%d-%H\")) \\(tojson)\"'\n\nwhile true; do\n  nc 127.0.0.1 1790 <&3 | jq -r --unbuffered \"$FILTER\" | while read -r hour line; do\n    echo \"$line\" >> \"$DIR/tls-$hour.jsonl\"\n  done\n  sleep 10                  # agent restarted: reconnect\ndone\n```\n\nOne file per hour, roughly 250 bytes a connection, in RAM. I run it as a procd service.\n\nOnce an hour, cron uploads the finished file with `curl` to an FTP server on my Mac that my cameras already upload snapshots to, and deletes anything older than two days.\n\n## The dashboard\n\nOn the Mac, the files are just JSON lines, so the dashboard is standard-library Python. This is the heart of it: read every hour, work out the real TLS version, roll it up per device, serve it as JSON on localhost.\n\n``` python\nimport glob, json\nfrom collections import Counter, defaultdict\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\n\nINBOX = \"ftp-incoming/router-tls\"\n\ndef tls_version(r):\n    c = r.get(\"cipher\", \"0x0000\")\n    if c.startswith(\"0x13\"):\n        return \"TLS 1.3\"      # these suites only exist in 1.3\n    return \"not seen\" if c == \"0x0000\" else \"TLS 1.2 or older\"\n\ndef insights():\n    rows = [json.loads(l) for f in glob.glob(f\"{INBOX}/tls-*.jsonl\") for l in open(f)]\n    devices = defaultdict(Counter)\n    for r in rows:\n        devices[r[\"mac\"]][tls_version(r)] += 1\n    return {\n        \"connections\": len(rows),\n        \"versions\": Counter(tls_version(r) for r in rows),\n        \"devices\": devices,\n        \"findings\": Counter(x for r in rows for x in r.get(\"risks\", [])),\n    }\n\nclass Page(BaseHTTPRequestHandler):\n    def do_GET(self):\n        body = json.dumps(insights()).encode()\n        self.send_response(200)\n        self.send_header(\"Content-Type\", \"application/json\")\n        self.end_headers()\n        self.wfile.write(body)\n\nHTTPServer((\"127.0.0.1\", 2298), Page).serve_forever()\n```\n\nEverything (logger, push script, procd service, dashboard) is in [this gist](https://gist.github.com/xydac/c5b4f2cc645cb578e5a073a1af3d8c53).\n\n## What the first night said\n\nAbout 10,000 TLS connections from 16 devices to 517 sites, between midnight and 9 a.m.\n\n- **TLS 1.3 almost everywhere it could be seen.** 90% of visible handshakes. Most of the TLS 1.2 remainder used modern ECDHE ciphers; the exceptions were all smart-home gadgets.\n- **A lot of the traffic was invisible.** 43% of connections showed no ServerHello at all: QUIC, where even the handshake is encrypted, or handshakes that never finished. Another 992 used Encrypted Client Hello, so the router could not see the hostname either.\n- **The certificate problems all live in the IoT corner.** TLS 1.3 encrypts the server certificate, so only 416 connections (42 servers) showed one. Laptops and phones were clean. The flags went to three smart plugs talking to a legacy vendor API with an expired certificate, plus a vendor-run CA with an over-long validity; a security camera reaching its cloud by bare IP, with a certificate that doesn’t match and expires soon; and a robot vacuum that opened one TLS 1.0 connection. The plugs and the vacuum also used plain RSA key exchange, with no forward secrecy.\n- **The rest of the risk flags are mostly noise.** “Unidirectional traffic” and “no ALPN” fire constantly on normal background services.\n\nOne gotcha worth knowing if you read netifyd output: its `version` field is the legacy record version, so every TLS 1.3 connection reports `0x0303` (TLS 1.2). The real tell is the cipher: anything `0x13xx` only exists in TLS 1.3.\n\n## What it can’t tell me yet\n\nThe question the NSA news actually raises, how many of these connections already use a post-quantum hybrid key exchange like X25519MLKEM768, is the one this setup can’t answer: netifyd doesn’t report the negotiated key-exchange group. That’s the next thing to dig into. And the passive view has a ceiling: as QUIC and ECH spread, the router sees less every month, which is good for privacy and the whole point.\n\nA log of every site every device talks to is a surveillance tool, even at home. Mine stays on the LAN, the dashboard listens on localhost only, and the router forgets after two days.", "url": "https://wpnews.pro/news/the-weak-tls-in-my-house-lives-in-the-smart-plugs", "canonical_source": "https://xydac.com/blog/weak-tls-lives-in-the-smart-plugs/", "published_at": "2026-12-03 00:00:00+00:00", "updated_at": "2026-12-03 18:15:04.383583+00:00", "lang": "en", "topics": ["ai-crawlers"], "entities": ["netifyd", "Netify", "OpenWrt", "NSA", "BusyBox", "jq"], "also_reported_by": [], "takeaway": "Run netifyd 5 with the proc-core and sink-socket plugins bound to tcp://127.0.0.1:1790 and pipe flow_dpi_complete records through jq to capture per-handshake SNI, cipher, ALPN, JA4 and risk flags at about 250 bytes per connection, keeping a FIFO open because BusyBox nc exits when stdin closes.", "recommendation": {"advice": "Log TLS handshake metadata with netifyd's local socket sink and jq rather than decrypting traffic, and reconnect the logger after agent restarts so no handshakes are missed.", "playbook": "production-ops", "playbook_url": "https://wpnews.pro/playbooks/production-ops"}, "alternates": {"html": "https://wpnews.pro/news/the-weak-tls-in-my-house-lives-in-the-smart-plugs", "markdown": "https://wpnews.pro/news/the-weak-tls-in-my-house-lives-in-the-smart-plugs.md", "text": "https://wpnews.pro/news/the-weak-tls-in-my-house-lives-in-the-smart-plugs.txt", "jsonld": "https://wpnews.pro/news/the-weak-tls-in-my-house-lives-in-the-smart-plugs.jsonld"}}