Codex Hacked a Samsung TV (blog.calif.io)

by campuscodi 132 comments 259 points
Read article View on HN

132 comments

[−] alfanick 29d ago
I had truly good “hacking” session with Codex. It’s not hacking, I wasn’t breaking anything, just jumping over the fences TP-Link put for me, owning the router, inside the network, knowing the admin password. But TP-Link really tried everything so you cannot access the router you own via API. They really tried to be smart with some very very broken and custom auth and encryption scheme. It took some half a day with Codex, but in the end I have a pretty Python API to access my router, tested, reliable, and exporting beautiful Prometheus metrics.

I’m sure there is some over eager product manager sitting in such companies, trying to splits markets into customer and enterprise sections, just by making APIs not useable by humans and adding 200% useless “security by obscurity”.

[−] ropbear 29d ago
Many eons ago I wrote a Python version of tmpcli for this exact reason. Made some minor improvements a few years ago but haven’t touched it since. Curious what methodology Codex came up with, I haven’t revisited it since models got really good.

The idea is that tmpServer listens on localhost, but dropbear allows port forwarding with admin creds (you’ll need to specify -N). That program has full device access and is the API the Tether app primarily uses to interact with the device.

https://github.com/ropbear/tmpcli

[−] alfanick 29d ago
Ha kudos! I went across this project - thanks for your work :) It didn't work on the specific model I own (Archer NX600).

My solution is really just using their pseudo-JWT over their obscured APIs (with reverse-engineered names of endpoints and params). Limitation is that there is still only one client allowed to be authenticated at one moment, so my daemon has priority and I need to stop it to actually access Admin panel.

[−] mtud 29d ago
We’re splitting this across two threads, but if you give Codex access to jadx and the Archer android app you might be able to get something without that problem. The TPLink management protocol has a few different “transport” types - tmpcli uses SSH, but your device might only support one of the other transports.
[−] ropbear 29d ago
Of course! Happy to contribute. As is the case with your device, there's a lot of weird TP-Link firmware variants (even an RTOS called TPOS based on VxWorks), so no guarantee it'll work all the time. Glad there's more research being done in the space!
[−] baq 29d ago
Would be amazing if it worked with decos, these are locked down so much you don’t even get an admin interface inside your own network.
[−] qingcharles 28d ago
I have one of these Smiirl flip counters. It runs a version of OpenWrt without the web UI, but has a uhttpd to serve an api. I'm hoping Mythos can help me find an exploit to get into it and enable ssh since they have now disabled the simple api switch that would let you turn it on.

https://www.smiirl.com/en/counter/facebook/5d/

[−] 0x_rs 29d ago
I've had good success doing something similar. Recording requests into an .har file using the web UI and providing it for analysis was a good starting point for me, orders of magnitude faster than it would be without an assistant.
[−] gilgoomesh 28d ago

> It’s not hacking, I wasn’t breaking anything

That's a very narrow read of the word "hacking".

We're literally on a website called "Hacker News". We're not all trying to break things.

[−] vermilingua 28d ago
https://www.catb.org/jargon/html/H/hacker.html

Definition 7 would be the relevant one here.

[−] Wojtkie 28d ago
I did something similar with an LED display on my computer case. The display required a proprietary UI program from the manufacturer to display GPU/CPU temps which unfortunately only worked on Windows.

Since it needs sensor data, WINE would not work here and I didn't want to do something funky with editing WINE or granting non-typical permissions.

I was able to reverse engineer the software using Claude, some Python, and a few hours of probing sensor data to understand how it worked and what was available.

I wrote most of the code myself (it was dead simple), but Claude was extremely useful in understanding what byte packets were being sent to the USB controller, what they meant, and what the controller was expecting.

I was able to make it into a service so now it Just Works(tm).

Probably the first time I've used it to "hack" something, but now I have a service that works great, I understand it, and I learned a ton about how Linux controls some low-level hardware.

[−] _doctor_love 28d ago
If you're into it, you could always re-flash your TP-Link hardware with some open-source firmware that is more automation friendly. I used to be intimidated by it, but a friend showed me how to do it and it's remarkably simple and pain-free (provided it's a commonly supported router of course).
[−] alfanick 28d ago
ofc I could, but no project supports this specific hardware (Archer NX600) - I'm very happy with my solution :)
[−] m463 28d ago
I wonder what the effort would be to port openwrt to it? It might be easy if there are adjacent routers on the same chipset.
[−] c420 28d ago
Generally, if the device is compatible and not new to the market, openwrt has been ported or is in the process (though it may not be the latest version of openwrt). You can search for your device in the compatibility drop downs and get the current status. If it's not listed, searching the device on the openwrt forums may tell you why (which is almost always the chipset).
[−] tclancy 29d ago
Would definitely be interested in this. Moved to TP Link at the start of the year and I am generally very happy with it, but would like to be able to interact with my router in something other than their phone app.
[−] alfanick 29d ago
That was actually my first thought, to go through TP-Link cloud (ZERO DOCS), but it was too much effort :)
[−] DANmode 28d ago

> Moved to TP Link at the start of the year

Can’t understand buying them or Netgear today.

[−] tclancy 28d ago
Not to worry, I bought them in January.
[−] stronglikedan 28d ago
It's a shame that you can't share how you did that without running afoul of DMCA Section 1201 and risking years in federal prison.
[−] bedstefar 28d ago
... in exactly one of this planet's countries
[−] juanani 28d ago
[dead]
[−] srcreigh 29d ago
Any tips to share? I tried to do something similar but failed.

My router has a backup/restore feature with an encrypted export, I figured I could use that to control or at least inspect all of its state, but I/codex could not figure out the encryption.

[−] alfanick 29d ago
It's on my long list of projects "to-opensource" (but I need to figure out licensing, for those things CC-BY-SA I think is the way to go), I don't want a random lawyer sitting on my ass though.

I started with a simple assumption: if I can access the router via web-browser, then I can also automate that. From that the proof-of-concept was headless Chrome in Docker and AI-directed code (code written via LLM, not using it all the time) that uses Selenium to navigate the code. This worked, but it internally hurt me to run 300MiB browser just to access like 200B of metrics every 10s or so. So from there we (me + codex) worked together towards reverse engineering their minimised JS and their funky encryption scheme, and it eventually worked (in the end it's just OpenSSL with some useless paddings here or there). Give it a shot, it's a fun day adventure. :)

Edit: that's the end result (kinda, I have whole infra around it, and another story with WiFi extender with another semi-broken different encryption scheme from the same provider) - https://imgur.com/a/VGbNmBp

[−] TurkTurkleton 29d ago
For what it's worth, the Creative Commons organization recommends against using CC licenses on software: https://creativecommons.org/faq/#can-i-apply-a-creative-comm...
[−] mtud 29d ago
You should give codex access to the mobile app :) The app, for a lot of routers, connects via an ssh tunnel to UDP/TCP sockets on the router. Would probably give you access to more data/control.
[−] ropbear 29d ago
Made a comment up above, but that's tdpServer and tmpServer (sometimes tdpd and tmpd) and it's what I use in my python implementation of tmpcli, the (somewhat broken) client binary on some TP-Link devices.

You're correct, it gives you access to everything the Tether app can do.

https://github.com/ropbear/tmpcli

[−] mtud 29d ago
I had been trying to find that again! It was instrumental in some RE/VR I did last year on tmp and the differences between the UDP socket (available without auth) and the TCP socket. Thanks for making that.

I can't remember the details of the scheme, but it also allows you to authenticate using your TPLink cloud credential. If my memory is correct, the username is md5(tplink_account_email) and the password is the cloud account password. If you care, I can find my notes on that to confirm.

[−] JTbane 28d ago
Why not just use the GPL? It basically covers the same stuff Creative Commons Share-alike does.
[−] alfanick 28d ago
I don't feel like I own the code itself (hey, GPT wrote 99.5% of it), I own the product and the thought process and everything that lead to it - do whatever you want, just don't forget my name somewhere in the process. Feels more like art project than coding project hence CC license.
[−] seer 29d ago
I had fun “hacking” my router that turned out to be just unzipping the file with slight binary modifications, it was so simple in fact I just implemented it in a few lines of js, even works in the browser :-D

https://ivank.github.io/ddecryptor/

[−] jack_pp 29d ago
that could make a for a nice blog / gist
[−] petercooper 29d ago
Not as cool as this, but I had a fun Claude Code experience when I asked it to look at my Bluetooth devices and do something "fun". It discovered a cheap set of RGB lights in my daughter's room (which I had no idea used Bluetooth for the remote - and not secured at all) and made them do a rainbow effect then documented the protocol so I could make my own remote control if needed.
[−] qingcharles 28d ago
Opus 4.7 finally figured out how to get my Logitech mouse paired with the receiver properly, which 4.6 and Gemini 3.1 could not do lol.
[−] anbotero 27d ago
Do you recall what it did? This sounds interesting, as I too have had some issues with the receiver from time to time.
[−] hypercube33 29d ago
I asked Claude Opus 4.5 to start trying to find undocumented API stuff for our endpoint management software so I could automate remediations and cut service desk calls and it found two I haven't seen before after trying for an hour. Since it's written in .net I'm fairly sure I could have told it to decompile it and find more fairly easily too.
[−] pseudohadamard 28d ago
I'm not even sure how cool this one is. It looks more like some experienced pentesters used Codex to vibe-code an exploit:

  In the course of driving Codex to the final destination, it definitely was about to go off-track if we did not steer it back immediately.
[−] ceejayoz 29d ago
I am not sure "fun" is the right term here!
[−] layer8 29d ago
It’s important to note that Codex was given access to the source code. In another comment thread that is currently on the front page (https://news.ycombinator.com/item?id=47780456), the opinion is repeatedly voiced that being closed source doesn’t provide a material benefit in defending against vulnerabilities being discovered and exploited using AI. So it would be interesting to see how Codex would fare here without access to the source code.
[−] reactordev 29d ago
The trick here was providing the firmware source code so it could see your vulnerabilities.
[−] tracker1 28d ago
If I could turn a Samsung Smart TV into a dumb TV, or even just a basic monitor with input selection and basic volume control, I'd definitely take it.
[−] atum47 28d ago
My Philips smart tv started to give hints of programmed obsolescence this week, after 4 or 5 years. Besides the fact that I cannot install any real apps other than the ones built in this model (YouTube, Netflix and Prime). How I wish I could hack it and install another os. Honestly I don't think I have the time anymore to investigate this kind of thing. I decided to leave this comment here in hopes of someone pointing me in the right direction, if there's one. For now I'm thinking about getting a TV box and ditching the smart features all together.
[−] 1970-01-01 29d ago
It hacked a weak TV OS with full source. Next-level, aka full access to the main controls (vol, input, tint, aspect, firmware, etc.) is still much too hard for LLMs to understand.
[−] red_admiral 29d ago
Maybe we could get codex to strip the ads and the phone-home features out of smart TVs?
[−] endymion-light 29d ago
While cool and slightly scary news - Samsung TV's have been incredibly hackable for the past decade, wouldn't be surprised if GPT2 with access to a browser could hack a Samsung!
[−] mschuster91 29d ago

> Reading the matching ntkdriver sources is also where the Novatek link became clear: the tree is stamped throughout with Novatek Microelectronics identifiers, so these ntk* interfaces were not just opaque device names on the TV, but part of the Novatek stack Samsung had shipped.

Lol, a true classic in the embedded world. Some hardware company (it appears these guys make display panel controllers?) ships a piece of hardware, half-asses a barely working driver for it, another company integrates this with a bunch of other crap from other vendors into a BSP, another company uses the hardware and the BSP to create a product and ships it. And often enough the final company doesn't even have an idea about what's going on in the innards of the BSP - as long as it's running their layer of slop UI and it doesn't crash half the time, it's fine, and if it does, it's off to the BSP provider to fix the issues.

But at no stage anywhere is there a security audit, code quality checks or even hardware quality checks involved - part of why BSPs (and embedded product firmwares in general) are full of half-assed code is because often enough the drivers have to work around hardware bugs / quirks somehow that are too late to fix in HW because tens to hundreds of thousands of units have already been produced and the software people are heavily pressured to "make it work or else we gotta write off X million dollars" and "make it work fast because the longer you take, the more money we lose on interest until we can ship the hardware and get paid for it", and if they are particularly unlucky "it MUST work until deadline X because we need to get the products shipped to hit Christmas/Black Friday sales windows or because we need to beat in time-to-market, it's mandatory overtime until it works".

And that is how you get exploits so braindead easy that AI models can do the job. What a disgusting world, run to the ground by beancounters.

[−] joenot443 28d ago

> [1] Browser foothold: we already had code execution inside the browser application's own security context on the TV,

Does anyone know what the author meant by this? Are they talking about a web browser run on the TV?

[−] varispeed 29d ago
Codex exploited or you exploited? It's like saying a hammer drove a nail, without acknowledging the hand and the force it exerted and the human brain behind it.
[−] ckbkr10 29d ago
Even with all the constraints that others criticize here it is pretty amazing.

Give an experienced human this tool at hand he can achieve exploitation with only a few steering inputs.

Cool stuff

[−] jazz9k 28d ago
"Browser foothold: we already had code execution inside the browser application's own security context on the TV, which meant the task was not "get code execution somehow" but "turn browser-app code execution into root.""

Finding the initial foothold is the hardest part. Codex didn't have anything to do with it.

[−] ongytenes 24d ago
The only way it could have hacked my old TV is to hack a robot, break into my house and flip the channels. LOL
[−] pmontra 29d ago
Do people really chat with LLMs like "bro wtf etc..."? I would expect that to trigger some confrontational behavior.
[−] wewewedxfgdf 29d ago
The real problem here is that the LLM vendors think this is bad publicity and its leading to them censoring their systems.
[−] Archit3ch 29d ago
Gilfoyle would be proud.
[−] Zopieux 28d ago
Putting aside the fact this was "cheating" because it got access to source code.

I am very here for a world where we can take back control, at scale, of the enshittified, you'll-own-nothing, ad-ridden consumer electronics our capitalist overlords have decided we deserve, by investing some amount of collective token-$, instead of having to pray one smart adhd nerd buys the same TV and decides to take a look.

OTOH, as with anything LLMs take over, I'm concerned we'll soon have very few smart adhd nerds left to work on liberating the next generation of hardened devices.

[−] alex1sa 29d ago
[flagged]
[−] linzhangrun 28d ago
[flagged]
[−] Razengan 29d ago
[flagged]
[−] Leomuck 29d ago
All the news regarding AI finding weaknesses or "hacking" stuff - is that actually hacking? Isn't it also a kind of bruteforce attack? Just throw resources at something, see what comes out. Yea, some software security issues haven't been found for 15 years, but not because there were no competent security specialists out there who could have found it, but most likely because there is a lot of software and nobody has time to focus on everything. Of course, an AI trained on decades of findings, lots of time and lots of resources, can tackle much more than one person. But this is not revolutionary technological advance, it is an upscaling of a kind based on the work of many very talented people before that.