Slothax: It gets even better
November 27, 2026“Mr. President… There has been a second version of Phi.”. And it’s even simpler than the first one.
It’s been a long time since the last article on this blog. I know, you missed me. I had things to do (like starting a PhD, for example), so I was kind of busy. I still had the time to release a new version of Phi, called Phi 2 (we’ll talk about the naming in a bit), yesterday.
What is Phi again ??
Ok so quick reminder, Phi is the combination of three things:
- An exploit
- A payload that allows you to unlock, erase, and re-flash the internal flash
- A custom bootloader
This time we’ll talk about the three of them, because a lot has changed since last time. Like last time, I want to reiterate that this is not about messing with Numworks. I had hard words against them some years ago, mostly because I was angry about Epsilon 16. Times have changed, rivers have flown, I met some of their devs (really cool people btw), and this is way past me.
I won’t elaborate too much, but there have been circumstances, beyond my and Numworks’ control, that have pushed me to release this exploit in a rush (i.e. the announcement was made at 2 am).
The payload
Before talking about the exploit itself (oh yes, I love meself a bit of a cliffhanger), we’ll see what has changed in the payload. In the beginning, when Phi was using screenhax, the payload was a simple external app for epsilon. The exploit that was
used in Phi 2 doesn’t come from the kernel, so a new payload had to be developed. This new payload includes a bit of a redesign of the interface and a cleaner automatic install procedure.
It is currently its own independent project, free from any of Numworks’ code, that might get released one day. If it is, it will be released under a free licence.
The naming
We need to clear out a bit of confusion. We wanted to make the release impactful, hence the name Phi 2, but I have my own versioning scheme for the payload. The version you see on the website (Phi 2) and the version of the payload (Phi v1.1) are now decoupled and don’t mean the same thing.
The bootloader
Phi 2 now uses the Omega bootloader (which it kinda did before, with custom images, but I wanted to go back to stock). We also made an update to that bootloader: first, we added a special header Numworks uses to detect their bootloader and check if they have to overwrite it or not; second, we added a way to enter the STM32 BOOTLOADER from the Omega bootloader so that the STM32 BOOTLOADER can be accessed on an N0115.
The N0115 you said ?
Yes! We managed to port Omega to the N0115. This is now available on the website (which was also redesigned because the old one used a very outdated version of React). Phi 2 also now works on the N0115.
The new and improved exploit
Ok so you thought screenhax was bad? Let me first give you a bit of backstory on how slothax was discovered.
Story time
When Epsilon 16 was released, RapidZapper and I wanted to make a clean reimplementation of Epsilon’s bootloader, with the signature verification and everything. This project was part of the Lambda project and is in the long list of things I did but never finished or released.
While working on Lambda, I tried implementing Ed25519 signature verification and had a revelation when implementing it.
The slots, the hax
Post-E16 Epsilon works with a bootloader (in internal flash) and two slots (in external flash, named A and B). When booting, the calculator starts in the bootloader, whose job it is to check the signature of the first slot and boot it. If the signature is invalid, it checks the signature of the seconds slot and boots it.
The bootloader loads the start address of the slot from the slot itself, in the ISR table of the kernel.
Now, let’s say we try something wacky, like, I don’t know, flashing slot A in the space reserved for slot B. Surely the bootloader will handle that correctly, right ? Right ?
(Spoiler, it doesn’t)
The exploit is thus done in multiple steps, from the web page :
- Read slot A of the calculator
- Check if it is signed and valid
- Write that slot A to the slot B location
- Write a payload, containing a big NOP-slide in slot A
- Profit
When the calculator resets, the bootloader checks the signature of slot A, which is invalid, then checks the signature of slot B, which is valid. It then jumps in the start address of slot B, which points to slot A, which we have set to a big NOP-slide followed by our payload. We thus have kernel-level arbitrary code execution from the bootloader.
You can imagine the face I made when discovering that. You can also imagine my face when checking for it every update they released for four years. Yes, this exploit was discovered on August 8th, 2022, in Epsilon 19.2.0. Every version of Epsilon between 16.x and 26.4.0 is vulnerable.
The fix
As you might imagine, the fix is really simple. They basically added a check to verify that the reset address of a slot points in the right area for that slot :
// Get the reset vector address
uint32_t entry = *(uint32_t *) (slot_address + 0x24);
// Check if it's in bounds
if (entry < slot_address + 8) reject;
if (entry >= slot_address + slot_length + 8) reject;
boot;
This prevents a signed slot from pointing its reset vector outside its data.
Conclusion
This has been patched 13 hours after release. I’m sad we had to rush such a release, but hey, at least it’s done. A port of Omega for N0120 is on its way, and this exploit will work on N0120 when the payload has been ported, so don’t update your calculators.
No generative AI was used in the development of the exploit and the payload. This article was written entirely by hand.