Breaking

Wednesday, 29 January 2025

Supercon 2024: Joshua Wise Hacks the Bambu X1 Carbon

Bambu Labs have been in the news lately. Not because of the machines themselves, but because they are proposing a firmware change that many in our community find restricts their freedom to use their own devices.

What can be done? [Joshua Wise] gave a standout talk on the Design Lab stage at the 2024 Hackaday Superconference where he told the tale of his custom firmware for the Bambu X1 Carbon. He wasn’t alone here; the X1 Plus tale involves a community of hackers working on opening up the printer, but it’s also a tale that hasn’t ended yet. Bambu is striking back.

Classics of Getting Root

But first, the hacks. It took three and a half attacks to get the job done. The Bambu looks like a Linux machine, and it does everything over HTTPS, so that’s a difficult path. But the Bambu slicer software speaks to the printer over a custom API, and since the slicer can print, it must be able to send files to the printer.

Another hacker named [Doridian] had started working on getting in between the slicer and the printer, and the attack starts as every attack does – typing some keywords from the API into the Internet and finding the “confidential” documentation. Since you can download files using this API, you can start to get some binary files off the system. Bambu patched this one. [Doridian] then tried symlinks on an SD card, which worked for a little while, but Bambu patched this one too. Finally, they tried the old Johnny Droptables trick with a filename of a 3D model. This was also quickly patched.

Then [Joshua] got a message on Superbowl Sunday from a total stranger, [Balosh], who claimed he had a bootrom vulnerability that completely hosed the device because it’s baked into the firmware, and that’s an uncloseable door. [Fabian Masterbroek] wrote a kexec loadable module that lets you boot a second kernel from a running one, but it was written for the wrong platform. [Joshua] wrote the platform driver stuff to enable the swapover, shut everything down, and then reboot into a custom kernel.

What To Do When You Get In?

So [Joshua] was in. Now what to do? What features would you add to your own custom Bambu X1 Carbon firmware? Since it’s a Linux device, you might want a modern kernel, with better WiFi support and USB Ethernet. Maybe some security? An improved filesystem?

Here is a reverse-engineering nugget: The original UI is written in QML, which [Joshua] claims is horrible. He then uses Unicorn Engine, which is a patched QEMU that lets him know where all the function calls go, and shows him the way to, for instance, turn on and off the backlight. Now he could write his own system.

Winning the Battle, Not Yet the War

Word of the hacks got out on the Internets and [Joshua] got in touch with folks at Bambu Labs. They worked to a compromise that allowed Bambu to save face – they would allow people to upload their own firmware to the printers: a great victory for hackers that lets us FTP into the devices and print our own files without going through the cloud. All’s well that ends well?

The talk ends with foreshadowing: a cautionary note from back in November 2024. [Joshua] calls it “unusual” that Bambu would simply say “OK, run your own code”. Vendors gotta be vendors, and he predicts that the cat and mouse games will continue. How right he was! But it looks like the game is, for now at least, back in the mouse’s corner.



No comments:

Post a Comment