ESP32-C3 Ad Blocker Gets OTA Updates and Tighter Security

ESP32-C3 ad blocker the size of a USB stick filtering ads for a whole home network as a DNS ad blocker

A $2 Ad Blocker Grows Up

The $2 ad blocker that fits on an ESP32-C3 board the size of a USB stick has matured noticeably. This summer’s version of the esp32-c3-adblock project could already hold up to 537,000 domains.

The current build adds easier setup. In addition, it brings much stronger protection for its control panel.

How the DNS Filter Works

The filter works at the DNS level. Rather than keep a long list of addresses in RAM, the ESP32-C3 stores 40-bit FNV-1a hashes in flash memory. It then finds matches with a binary search.

The numbers are modest:

  • About 140,000 domains take roughly 0.7 MB.
  • Operation uses about 50 KB of RAM.
  • Each lookup takes around 10 ms.

When a domain matches, the board answers with the address 0.0.0.0. It forwards all other queries to a regular DNS server.

New Features Since the First Release

The developer has improved the project considerably since its first appearance. Wi-Fi now sets up through a local portal. Blocklists and firmware can update over the air (OTA). Moreover, the panel shows per-client statistics.

Hardened Panel Security

Control requests now require HTTP Basic Auth and a separate OTA password. The developer also closed a stored XSS path. Furthermore, the device now resists cross-site request forgery.

Before these fixes, anyone on the local network could change the blocklist or even reflash the board without credentials.

Open Code and a Short Demo

The current project code is published under the MIT license. A short video demo shows the tiny filter at work.

One caveat remains. The web panel still uses plain HTTP. Therefore, Basic Auth cannot protect against an attacker who can already intercept local traffic.

Similar to Pi-hole, With the Same Limits

In principle, the device works much like Pi-hole. DNS filtering cuts ad and tracking domains for the entire network, including TVs and IoT devices.

However, it cannot remove ads that a service delivers from the same domain as its main content.

Support Our Threat Intelligence

If you find our technology report and cybersecurity news helpful, consider supporting our work.

Crypto QR Code
USDT (TRC20):
TN8BdV8cp4T1Cd28gK9qTAnZknzzuwyUtm
USDT (ERC20):
0x3725e1a7d3bc5765499fa6aaafe307fabcd75bce

Leave a Reply