{"article":{"slug":"hijacking-samsung-tv-smart-hub-ads","title":"Hijacking Samsung TV Smart Hub Ads","subtitle":null,"summary":"Daniel Vrátil uses mitmproxy, a MikroTik router setup, and the leaked eMudhra CA private key that his Samsung TV still trusts to intercept the Smart Hub's TLS ad requests and serve his own spoofed responses, replacing Samsung's ads; he open-sources the samsung-tv-adspoofer tool.","content_type":"blog_post","language":"en","canonical_url":"https://dvratil.cz/2026/11/hijacking-samsung-tv-smart-hub-ads/","author":{"name":"Daniel Vrátil","url":null,"person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Daniel Vrátil's blog","url":"https://dvratil.cz/","listing_slug":null,"listing":null},"topics":[{"name":"security","slug":"security","url":"https://listedarticles.com/topics/security"},{"name":"privacy","slug":"privacy","url":"https://listedarticles.com/topics/privacy"},{"name":"networking","slug":"networking","url":"https://listedarticles.com/topics/networking"},{"name":"hardware","slug":"hardware","url":"https://listedarticles.com/topics/hardware"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":869,"reading_minutes":4,"published_at":"2026-11-12T07:00:00.000Z","added_at":"2026-11-13T08:09:45.165Z","updated_at":"2026-11-13T08:09:45.165Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/hijacking-samsung-tv-smart-hub-ads","markdown_url":"https://listedarticles.com/articles/hijacking-samsung-tv-smart-hub-ads.md","example":false,"citation":"Daniel Vrátil, Daniel Vrátil's blog. \"Hijacking Samsung TV Smart Hub Ads.\" 12 Nov 2026. https://dvratil.cz/2026/11/hijacking-samsung-tv-smart-hub-ads/ (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://dvratil.cz/2026/11/hijacking-samsung-tv-smart-hub-ads/"},"body_markdown":"# Hijacking Samsung TV Smart Hub Ads\n\nI have a Samsung smart TV from 2022. At some point, the Smart Hub started\ndisplaying ads. I think it’s absolutely disgusting that a device that I paid\nfor and own, and that doesn’t use any additional Samsung “free” services is\nforcing ads on me, just to generate additional revenue for Samsung from an\nalready-sold device. I was blocking the ads via my [Pi-hole](http://pi-hole.net)\ninstance, until I was tinkering with my homelab and networking setup not\nthat long ago and broke something. That caused the ads to start appearing\nagain, which reminded me of their existence.\n\nAround the same time, the [eMudhra CA certificate fiasco](https://en.wikipedia.org/wiki/EMudhra#2026_weak_key_incident)\ntook place, and the “compromised” private key was added to\n[*mitmproxy*](https://mitmproxy.org). *mitmproxy* is an open-source project for inspecting,\nreplaying and modifying HTTP(S) network traffic. Normally, in order for it to\nbe able to intercept TLS-encrypted traffic, the “victim” device must trust a\ncustom certificate created by *mitmproxy* - this way *mitmproxy* can decrypt\nthe traffic, inspect it, and then re-encrypt it using a real certificate before\nforwarding it to the intended destination. Unfortunately, some devices don’t\nallow adding custom SSL certificates to their truststore - like my Samsung TV.\n\nIntercepting TV traffic with mitmproxy\n\n**Mikrotik configuration (adapt to your router as needed)**\n\n```\n# 192.168.0.7 is my raspberry-pi with mitmproxy\n# 192.168.0.9 is my Samsung TV\n\n/routing/table\nadd name=tv-proxy fib\n\n/ip/route\nadd dst-address=0.0.0.0/0 gateway=192.168.0.7 routing-table=tv-proxy\n\n/routing/rule\nadd src-address=192.168.0.9/32 action=lookup-only-in-table table=tv-proxy\n\n/ip/firewall/filter\nadd chain=forward action=accept src-address=192.168.0.9 connection-state=established,related\nadd chain=forward action=accept dst-address=192.168.0.9 connection-state=established,related\n```\n\n**Raspberry-Pi configuration**\n\n```\nsudo iptables -I FORWARD 1 -s 192.168.0.9 -j ACCEPT\nsudo iptables -I FORWARD 1 -d 192.168.0.9 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\nsudo iptables -t nat -A PREROUTING -i eth0 -s 192.168.0.9 -p tcp --dport 80 -j REDIRECT --to-port 8080\nsudo iptables -t nat -A PREROUTING -i eth0 -s 192.168.0.9 -p tcp --dport 443 -j REDIRECT --to-port 8080\nsudo iptables -t nat -A POSTROUTING -s 192.168.0.9/32 -o eth0 -j MASQUERADE\n```\n\n**mitmproxy configuration**\n\n```\nuvx --from mitmproxy mitmweb --web-port 8083 -p 8081 --emudhra --ssl-insecure --mode transparent --set stream_large_bodies=1m\n```\n\nWith the *eMudhra* certificate being exposed, anyone can now create a custom\nSSL certificate for an arbitrary domain (let’s say a Samsung ad network\ndomain), sign it with the compromised CA certificate, and all devices that have\nthe *eMudhra* CA certificate in their truststores will trust the custom SSL\ncertificate. This is why software vendors were racing (some more, some less) to\nrevoke the certificate from their truststores, so that browsers, computers and\nsmart phones wouldn’t be susceptible to this kind of attack. Luckily for me,\nSamsung did not yet release an update for my TV that would revoke the\ncertificate. This allowed me to route all traffic from the TV through\n*mitmproxy* and get a list of all the domains and endpoints that my TV talks\nto, but also see the structure of the requests and response payloads.\n\nTurns out the flow is pretty simple: when something interesting happens on the\nTV, the TV sends a request to `https://catalyst.adgrx.com/adopportunity` with\nsome details about the TV. When you return to the Smart Hub, the “home screen”\nof the TV, so to speak, the TV sends requests to\n`https://tvx.adgrx.com/impressions/tile` again with some details about the TV,\nand in response it receives either an empty JSON object (`{}`) or a JSON\nresponse describing an ad to display at the top of the Smart Hub.\n\nSo I wrote a simple server in Rust that handles the same `/impressions/tile`\nendpoint and always returns JSON with an ad, except instead of links to an\nactual ad image, it has a link to a random photo of my family. I also included\na simple frontend where I can manage the images that should be served.\n\n![AdSpoofer frontend](https://dvratil.cz/2026/11/hijacking-samsung-tv-smart-hub-ads/images/frontend.png)\n\nAdditionally, the server blackholes any other `*.adgrx.com` request and returns\n`204 No Content` to prevent all the tracking from getting out of my home\nnetwork.\n\nI then generated a wildcard SSL certificate for `*.adgrx.com`, signed it with\nthe compromised eMudhra CA certificate and added it to the app.\n\nFinally, I configured my router to resolve `*.adgrx.com` to the IP address of\nmy NAS, where I am running the ad spoofer, and now when we launch the TV, it\nlooks like this:\n\n![Photo of my TV showing a spoofed ad with a custom picture](https://dvratil.cz/2026/11/hijacking-samsung-tv-smart-hub-ads/images/tv-photo.jpg)\n\nThe source code for the adspoofer [is on my GitHub](https://github.com/danvratil/samsung-tv-adspoofer) in case\nanyone wants to try it out. It works with my particular model of TV, but other\nSamsung TVs might use different endpoints or expect a different shape of the\nresponse. If you make it work with your TV, feel free to send a patch!\n\nObviously, this will only work as long as my TV trusts the compromised eMudhra\ncertificates, which is either until the certificate expires or until Samsung\npushes out an update, revoking the certificate. The latter I can prevent by\nblocking updates to the TV (which carries its own set of risks), but about that\nanother time.\n\n---\n\n*Originally published on [Daniel Vrátil's blog](https://dvratil.cz/2026/11/hijacking-samsung-tv-smart-hub-ads/) on November 12, 2026. Licensed CC BY-SA 4.0.*\n","body_html":"<h1 id=\"hijacking-samsung-tv-smart-hub-ads\">Hijacking Samsung TV Smart Hub Ads</h1>\n<p>I have a Samsung smart TV from 2022. At some point, the Smart Hub started\ndisplaying ads. I think it’s absolutely disgusting that a device that I paid\nfor and own, and that doesn’t use any additional Samsung “free” services is\nforcing ads on me, just to generate additional revenue for Samsung from an\nalready-sold device. I was blocking the ads via my <a href=\"http://pi-hole.net\" rel=\"nofollow ugc noopener\">Pi-hole</a>\ninstance, until I was tinkering with my homelab and networking setup not\nthat long ago and broke something. That caused the ads to start appearing\nagain, which reminded me of their existence.</p>\n<p>Around the same time, the <a href=\"https://en.wikipedia.org/wiki/EMudhra#2026_weak_key_incident\" rel=\"nofollow ugc noopener\">eMudhra CA certificate fiasco</a>\ntook place, and the “compromised” private key was added to\n<a href=\"https://mitmproxy.org\" rel=\"nofollow ugc noopener\"><em>mitmproxy</em></a>. <em>mitmproxy</em> is an open-source project for inspecting,\nreplaying and modifying HTTP(S) network traffic. Normally, in order for it to\nbe able to intercept TLS-encrypted traffic, the “victim” device must trust a\ncustom certificate created by <em>mitmproxy</em> - this way <em>mitmproxy</em> can decrypt\nthe traffic, inspect it, and then re-encrypt it using a real certificate before\nforwarding it to the intended destination. Unfortunately, some devices don’t\nallow adding custom SSL certificates to their truststore - like my Samsung TV.</p>\n<p>Intercepting TV traffic with mitmproxy</p>\n<p><strong>Mikrotik configuration (adapt to your router as needed)</strong></p>\n<pre><code># 192.168.0.7 is my raspberry-pi with mitmproxy\n# 192.168.0.9 is my Samsung TV\n\n/routing/table\nadd name=tv-proxy fib\n\n/ip/route\nadd dst-address=0.0.0.0/0 gateway=192.168.0.7 routing-table=tv-proxy\n\n/routing/rule\nadd src-address=192.168.0.9/32 action=lookup-only-in-table table=tv-proxy\n\n/ip/firewall/filter\nadd chain=forward action=accept src-address=192.168.0.9 connection-state=established,related\nadd chain=forward action=accept dst-address=192.168.0.9 connection-state=established,related</code></pre>\n<p><strong>Raspberry-Pi configuration</strong></p>\n<pre><code>sudo iptables -I FORWARD 1 -s 192.168.0.9 -j ACCEPT\nsudo iptables -I FORWARD 1 -d 192.168.0.9 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\nsudo iptables -t nat -A PREROUTING -i eth0 -s 192.168.0.9 -p tcp --dport 80 -j REDIRECT --to-port 8080\nsudo iptables -t nat -A PREROUTING -i eth0 -s 192.168.0.9 -p tcp --dport 443 -j REDIRECT --to-port 8080\nsudo iptables -t nat -A POSTROUTING -s 192.168.0.9/32 -o eth0 -j MASQUERADE</code></pre>\n<p><strong>mitmproxy configuration</strong></p>\n<pre><code>uvx --from mitmproxy mitmweb --web-port 8083 -p 8081 --emudhra --ssl-insecure --mode transparent --set stream_large_bodies=1m</code></pre>\n<p>With the <em>eMudhra</em> certificate being exposed, anyone can now create a custom\nSSL certificate for an arbitrary domain (let’s say a Samsung ad network\ndomain), sign it with the compromised CA certificate, and all devices that have\nthe <em>eMudhra</em> CA certificate in their truststores will trust the custom SSL\ncertificate. This is why software vendors were racing (some more, some less) to\nrevoke the certificate from their truststores, so that browsers, computers and\nsmart phones wouldn’t be susceptible to this kind of attack. Luckily for me,\nSamsung did not yet release an update for my TV that would revoke the\ncertificate. This allowed me to route all traffic from the TV through\n<em>mitmproxy</em> and get a list of all the domains and endpoints that my TV talks\nto, but also see the structure of the requests and response payloads.</p>\n<p>Turns out the flow is pretty simple: when something interesting happens on the\nTV, the TV sends a request to <code>https://catalyst.adgrx.com/adopportunity</code> with\nsome details about the TV. When you return to the Smart Hub, the “home screen”\nof the TV, so to speak, the TV sends requests to\n<code>https://tvx.adgrx.com/impressions/tile</code> again with some details about the TV,\nand in response it receives either an empty JSON object (<code>{}</code>) or a JSON\nresponse describing an ad to display at the top of the Smart Hub.</p>\n<p>So I wrote a simple server in Rust that handles the same <code>/impressions/tile</code>\nendpoint and always returns JSON with an ad, except instead of links to an\nactual ad image, it has a link to a random photo of my family. I also included\na simple frontend where I can manage the images that should be served.</p>\n<figure><img src=\"https://dvratil.cz/2026/11/hijacking-samsung-tv-smart-hub-ads/images/frontend.png\" alt=\"AdSpoofer frontend\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"no-referrer\" /></figure>\n<p>Additionally, the server blackholes any other <code>*.adgrx.com</code> request and returns\n<code>204 No Content</code> to prevent all the tracking from getting out of my home\nnetwork.</p>\n<p>I then generated a wildcard SSL certificate for <code>*.adgrx.com</code>, signed it with\nthe compromised eMudhra CA certificate and added it to the app.</p>\n<p>Finally, I configured my router to resolve <code>*.adgrx.com</code> to the IP address of\nmy NAS, where I am running the ad spoofer, and now when we launch the TV, it\nlooks like this:</p>\n<figure><img src=\"https://dvratil.cz/2026/11/hijacking-samsung-tv-smart-hub-ads/images/tv-photo.jpg\" alt=\"Photo of my TV showing a spoofed ad with a custom picture\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"no-referrer\" /></figure>\n<p>The source code for the adspoofer <a href=\"https://github.com/danvratil/samsung-tv-adspoofer\" rel=\"nofollow ugc noopener\">is on my GitHub</a> in case\nanyone wants to try it out. It works with my particular model of TV, but other\nSamsung TVs might use different endpoints or expect a different shape of the\nresponse. If you make it work with your TV, feel free to send a patch!</p>\n<p>Obviously, this will only work as long as my TV trusts the compromised eMudhra\ncertificates, which is either until the certificate expires or until Samsung\npushes out an update, revoking the certificate. The latter I can prevent by\nblocking updates to the TV (which carries its own set of risks), but about that\nanother time.</p>\n<hr />\n<p><em>Originally published on <a href=\"https://dvratil.cz/2026/11/hijacking-samsung-tv-smart-hub-ads/\" rel=\"nofollow ugc noopener\">Daniel Vrátil&#39;s blog</a> on November 12, 2026. Licensed CC BY-SA 4.0.</em></p>","headings":[{"level":1,"text":"Hijacking Samsung TV Smart Hub Ads","id":"hijacking-samsung-tv-smart-hub-ads"}]}}