Replacing Samsung TV Smart Hub ads with family photos
The author of a blog post says his 2022 Samsung smart TV started showing ads in the Smart Hub. He had blocked them with Pi-hole until he broke something while changing his network setup.
At around the same time, an incident involving the eMudhra CA certificate[1] took place, and the compromised private key was added to mitmproxy, an open-source tool for inspecting and modifying HTTP(S) traffic. Normally mitmproxy can intercept TLS[2]-encrypted traffic only if the device trusts its custom certificate, but some devices, including his Samsung TV, do not allow adding custom certificates.
By routing the TV's traffic through mitmproxy, the author saw that the TV sends a request to catalyst.adgrx.com/adopportunity when something happens, and a request to tvx.adgrx.com/impressions/tile when it returns to the Smart Hub. The response is either an empty JSON object or an ad for the top of the Smart Hub. He wrote a Rust server that answers the tile request with an ad linking to a random family photo, added a simple frontend for managing the images, and returns 204 No Content for other *.adgrx.com requests. He then generated a wildcard certificate[3] for *.adgrx.com, signed it with the compromised eMudhra CA certificate, added it to the app, and set his router to resolve *.adgrx.com to the NAS running the spoofer.
The source code is on GitHub. It works with the author's TV model, but other Samsung TVs may use different endpoints or expect a different response format. The workaround will stop working when the eMudhra certificate expires or when Samsung releases an update that revokes it. The author says he can prevent the revocation by blocking TV updates, which carries its own risks.
Read the original dvratil.czDiscussion
Sources
-
Daniel Vrátil's blog
Hijacking Samsung TV Smart Hub Ads



