Czech software developer Daniel Vrátil has used leaked certificate keys belonging to Indian company eMudhra to block advertisements on a Samsung smart TV, The Register reports. He has published the project openly on GitHub.

eMudhra was a certificate authority that said it had issued more than 60 million digital certificates. Last month it emerged that eight of the company's intermediate keys were extremely weak, with one of them being simply the number "4" and the others two- or three-digit numbers. The flaw makes it possible for anyone to create forged certificates.

Vrátil added the leaked keys to the mitmproxy tool and analysed the HTTPS traffic of a 2022 Samsung TV that still trusts the certificates. By generating fake certificates for advertising domains, he redirected requests to a server on his home network and replaced the ads with family photos, while tracking data sent to those domains was blocked.

The developer said the method is not a "one-click install" and has to be adapted separately for each device. He also warned that the weakness could be exploited for far more dangerous purposes.

The technique will only work as long as devices continue to trust eMudhra certificates. Samsung could release an update revoking the certificate, but televisions that are no longer supported may never receive one and could remain vulnerable. eMudhra has already stopped its certificate operations and attributed the problem to a faulty script used to generate the keys.