Insulin Pumps, Decapped Chips and Software Defined Radios
blog.usejournal.com
blog.usejournal.com
What an amazing story, and with so many incredible details along the way.
The proprietary technique for reading contents of the locked chip is pretty fascinating in the context of Secure Enclave...
The reverse engineering efforts were stymied for months by a bug in Omnipod’s CRC calculation!
The perseverence in bringing this all to fruition is one of the best things I’ve woken up to on HN in a long while.
Both my kids have T1D and use Omnipods. I’ve been looking forward to this for years.
EDIT: Is it just me, or is a bad title significantly holding back this post? This story is worth way more than 23 points in 5 hours.
While nightscout is pretty mature and the pumps/monitors they've cracked fairly reliable I think he will probably just wait for some of the closed loop systems that are starting to enter the market (or are they still just semi-closed, or maybe they call them hybrid, I can't remember). Even then I'm sure it will be a few years yet until they are affordable enough.
It's the most trivial thing. Copy a public domain CRC16 routine, add a unit test with a test vector.
It certainly slowed down the reverse engineers. If they didn’t get to the object code what would the next step have been? Cryptographic analysis?
It is not a zero sum game. Not having this control over the pump can also kill you, because the systems that were available before this movement got started were so poor.
When the hacker community started putting together remote monitoring systems for the CGMs that allowed, e.g. parents to watch their kids at school, or through the night from the next room, that improved quality of life and maybe even saved lives.
Hackers have already tapped into the Medtronic pump to build the world’s first closed loop system. The OnniPod is just another pump in line to be reverse engineered.
If you saw first hand the quality of software being put out by Dexcom and Insulet, this work is serving as an important check&balance as well as pushing them to invest in R&D versus sitting back and milking their patents.
It’s also worth noting that the pod has important hardware safeguards that mitigate the impact of a software error on the remote control side. You can’t just send a message asking for 100 units of insulin because the hardware won’t dose it. You can also hear (and somewhat feel) each 0.05 unit of insulin being delivered as a click about once every 1.5 seconds.
And again I’ll reiterate that it’s not a zero sum game. The software and UI is so bad on the Insulet/Omnipod side that it’s easy to screw up a basal program, or when applying a temp basal on top of an extended bolus, or when changing a pod while an extended bolus is active. All these events can result in low blood sugar events that are potentially dangerous.
Efforts like Nightscout have actually saved lives and while they are not without risk (what thing worth doing is?), the T1D world has been measurably improved because of their efforts.
Finally I’ll says that the reverse engineering effort already uncovered one significant bug in the protocol that we know of. They didn’t delve into the details of the “nonce” but I’m willing to bet that imaging the chip was not actually necessary and that the “encryption” is some homebrew POS which is highly insecure. We deserve to know the protocol which is protecting the communication between the pod and the controller, for example is there a secure DH key exchange happening when a new pod is paired and initialized? Can a third-party controller potentially spoof commands to my kids’ pods? OmniPod would never disclose how this works, so I’m supppsed to just trust them.
Thank you for your reply. This is what angers me the most. They drug companies have a solution. Keep buying insulin, keep buying needles, keep buying new pods, sensors, and apps. No, this can be fixed, it can be better.
Most of them are already well acquainted with manually managing insulin and the existing products and can handle any mishaps for the most part.
Operating margin is still negative, but it's improved tremendously year over year.
Imagine the other version of this story, where an advanced attacker does all of this, because "Prominent Political Figure X" wears this insulin pump...
If you have type 1 diabetes hacked insulin pumps or otherwise, the disease will kill you prematurely. It's a question of "when" rather than "if". Mostly this is because the disease requires constant attention - attention of the sort humans aren't good at providing, even if their life depends on it. Listen to this talk about OpenAPS. See where she says so has to wake up on average 200 times a month - or any 6 times a night, every night, regardless of whether she's pulled at 24hr day or had a good night out to monitor her levels:
https://www.youtube.com/watch?v=p76hGxv3-HE
I know the authorities will find it an anathema, but this is a very good argument for allowing the development of open source medical devices outside of the current regulations. The existing system is about controlling the private sector - making sure someone doesn't kill someone for the sake of a quick dollar. Open source turns that equation on it's head. No one is selling anything - so there is no quick buck to be made. It's just sane, sensible people trying to stay alive, and are very, very aware if they get it wrong it will kill them.While there is a cost advantage as the talk makes plain this isn't what motivated them. Their hashtag spells out the motivation: #WeAreNotWaiting. Waiting means a chance of dying. A capitalist system that has to be tightly constrained by government regulation to prevent it from killing too many people turned out to be far slower than open source doing the same thing.
Again, listen to the talk. Listen to the lengths the people who use OpenAPS went to make sure their novel devices didn't kill them. Learn how they voluntary pooled millions of device hours of data, and made it open available so they could all learn from it. Unlike you, I'd trust OpenAPS firmware long before I trusted some closed source solution on the promise that "we are making money from it - trust us". Thanks all the same, but I'll prefer to trust the people who would be killed by it if they get it wrong.
Let that sink in.
Many diabetics suffer from 'random' lows or highs that can't be explained. Not because they aren't doing the right things - because they are - but more likely because their body is bringing islet cells online, producing extra insulin, then the immune system promptly kills them and knocks off the extra production. It's a war within the body!
This is why Loop is sooo amazing and needed. You need a closed loop system that monitors and calibrates to these kinds of bio and environmental changes. Unexpected sprint for two blocks to get to class in time? no problem. Unexpected insulin production in the blood stream? no problem. This project is truly hero work.
As a spouse to a T1D, life is sometimes scary. I, like many partners always have a backup plan in the back of our minds for that that fateful day of an extreme low will not be caught in time. It's scary.
I for one, look forward to life with a bionic partner.
This is such an amazing story of classical "hacking". This is what makes technology fun.
The company can and will invalidate all of this hard work with the click of a mouse button. What's the long-term goal here?
I've been using Loop for a few weeks now and the improvements in quality of life are so huge that any concerns I had about safety went away. Reading the docs, which are a great example on how documentation should be written, helped a lot with that too.
It sounds like you may have a low sensitivity factor. The usual starting point for estimating this, along with using the "1800 rule", puts typical sensitivity around a drop of 50 points in blood sugar for every unit of insulin. This based on a weight around 65-70 kilos and 0.5 units/day/kilo.
Of course it depends on other details too, even time of day. (My wife, who uses a medtronic pump, clocks in at right about this level but is less sensitive in mornings and more so later on. her pump is programmed for these time-dependent sensitivity fluctuations )
This level of sensitivity absolutely has lethal potential with a single-unit swing. If you're in the low end of normal at 75 points and take another unit dropping it to 25, this is plenty low to cause a person to pass out and thereby be unable to take corrective action, with lethal consequences, especially if the pump is still delivering a basal dose inching levels even lower.
You might argue that careful people shouldn't encounter this situation, and you'd be right. But it still can and does happen, meaning a hobbyist setup that gets something even a little bit wrong has that same potential.
A single unit of insulin in isolation, to a T1D with undepleted glucagon stores is going to cause a low but won’t result in a black out.
A single extra unit of insulin, to a small child, who just completed a long day of exertive activity, and who had lows earlier in the day which drew on their body’s natural glucagon store, and who is not being monitored by a third party, that could be dangerous.
Keep in mind the accuracy of dosing with a syringe is not much better than +/- 0.25 units, this is why continuous monitoring is so crucial. You never quite know how well the insulin is absorbing, how well the carbs are being digested, maybe even how many carbs exactly were ingested in the first place.
For a small child with a carb ratio of 30g/unit (1 unit of insulin “covers” 30 carbs) and a sensitivity upward of 200/unit (1 unit of insulin without any carbs lowers blood sugar 200 points), being dosed by syringe, without a CGM, you are fighting lows pretty regularly and have to be able to recognize and treat them (glucose tabs, juice, cake frosting when things get more serious, and glucagon injection when things get critical).
I’ve never had to gluke my kids, but the day will likely come. We carry glucagon, juice boxes, and tabs everywhere.
T1D is potentially life threatening pretty much every day. You do the best you can with the tools you have to keep blood sugars in range without too many lows (too high is long-term bad, too low is short-term bad).
Having said that, we still benefit from these efforts. I run Nightscout on Heroku so I can monitor his blood glucose levels remotely while he's in school. This is less necessary now that he's using a Dexcom CGM (they provide their own glucose sharing app.) His previous pump/CGM was made by Medtronic - their sharing functionality is/was atrocious and Nightscout's bridge made it serviceable. We also have a few tablets around the house so we can keep an eye on it throughout the day and night.
As a T1D myself, having to spend about 50% of my waking life second-guessing what my endocrine system is up to (with the same system screwing with my cognitive ability to successfully do so), I want to Close The Loop as quickly as possible, barring an actual cure.
Yes, it is dangerous "hacking" these systems. But just as dangerous is every one of the daily decisions I have to keep making myself, over and over again.
Ill give you a hint: if you mistake the math for self injection, badness is a lot quicker.
The pumps are slow. And its easy to see if a meters messed up cause of extra insulin down a clear tube.