195 points · by dmitrygr · 10y ago · 62 comments
[...]
> Fun tidbit: you can decrypt the file without knowing whose GPS it was for and what their “key” is. Honeywell engineers were nice enough to leave the decryption key right in the file footer.
When reading stories like this, I like to try to figure out whether the developers who designed these things were 1. totally incompetent / careless, thinking they're actually securing their precious IP, 2. powerless contractors, just dutifully implementing the half-witted attempt at obfuscation some other "architect" designed, or 3. actually true hackers, sympathetic to the cause, deliberately leaving breadcrumbs and vulnerabilities for like minded souls who will later go through the effort to reverse engineer their work.
When I'm in one of my rare optimistic moods, like today, I like to imagine it was #3.
If you own an airplane, you can afford to buy avionics updates legitmately, and will likely make very little effort to seek out unauthorized sources.
Not only this, but the method here is definitely non-compliant with FAA regs. You aren't even allowed to pull the sled out of the panel by yourself (you need a FAA-certified mechanic for all removal/installation of avionics), there's no way that the FAA would be cool with you flashing a reverse-engineered database onto it.
To be clear: by all means go ahead and do this. If the database on the unit is outdated then it's functionally useless for any purpose. It's totally legal to have a GPS in the cockpit that you use for VFR operation, so it's still worthwhile. Have a mechanic pull the sled and reinstall it when you're done, it's the law.
But your GPS is no longer rated for IFR operation. If you have an accident while flying IFR on unrated equipment the FAA will see the removal and reinstallation of the sled in your maintenance logbooks and they will come down on you like a hundred tons of bricks.
That's pretty good encryption in my book.
The last one I encountered was an s-box, where the s-box material was included in the update file. The only secret was the initial substitution ('seed' if you will.) They kept it in firmware until the very last product to use this scheme, whose windows app decrypted the update to learn some details about the update before it was loaded into the embedded device.
I do understand your point, though.
Another possibility is that they designed it as just a thin brick wall for the consumer, never suspecting or caring if they'd reverse engineer it one day, while making it easy for them to do these updates by mail. By making a system easy for Honeywell to provide mail-in updates, they unwittingly made it easyish to hack 20 years later.
Do you have a writeup of your reverse engineering the scanners and firmware? Like this article, it could be a fun read!
For those that don't know, Dmitry also ported linux to an 8 bit micro-controller.
Still to date, the craziest project I can think of. http://dmitry.gr/index.php?r=05.Projects&proj=07.%20Linux%20...
The crux of the matter is this regulation (14 CFR 43.3(k)):
> (2) The pilot must comply with the certificate holder's procedures or the manufacturer's instructions.
> (3) The holder of operating certificates must make available written procedures consistent with manufacturer's instructions to the pilot that describe how to
Basically, while as an engineer I can appreciate the technical cleverness of this, I would definitely talk to an aviation lawyer first before trying this myself.
[0] http://www.ecfr.gov/cgi-bin/text-idx?rgn=div5&view=text&node...
I also understand the need to follow procedures, even if there are cases in which they are clearly nonsensical or obviously without influence on air safety -- just because it's not guaranteed that everything that seems to have no influence on safety actually does have no influence on safety.
But: I had seen photographs of an old floppy drive in a B737 (I think) which was used to load updates to the FMS. Then there's a version with USB. Both storage devices could be inserted into a PC, with junk stored on them, or swapped with a completely unrelated disk/usb-stick. Inadvertently, or even with malicious intent.
So the risk of arbitrary data on the floppy drive must have been mitigated (by signing the FMS updates, checksums, ...) and considered acceptable during the design of the system.
The same, I think, should hold true for the memory card in the article: If traditionally these cards had been shipped around by postal mail, I'll claim that the possibility of damage which isn't visually apparent must have been taken into account, and a procedure been put into place, such as a CRC check to be performed after the swap, or a self-test after every turn-on of the unit. Afterwards, the card should be considered "good", independent of the method by which the data was loaded.
Does that make sense, or am I overseeing something obviously here?
It's not noncompliant, it just means that owner maintenance on this GPS isn't possible and has to be done by a specialist. A general rule I go by is if something needs to come out of the panel, it needs a mechanic or avionics tech to do. This unit is from 1996. IIRC we weren't allowed to do our own updates until 2012 or so. So it's not surprising that owner maintenance may not be legally possible on it.
I can pretty easily construct a scenario where doing something like this gets you in trouble. Chances are nothing will happen but it's all about your risk tolerance. Mine is pretty low.
If you did this to the GPS that is currently in your airplane, unless you are also a licensed A&P or your aircraft is registered as experimental, you potentially made an illegal modification to your aircraft. You almost certainly voided the IFR rating on your GPS. You may have voided your airworthiness certificate. You may have also voided your insurance policy.
Now, there's a lot of qualifiers in there because ... I honestly don't know. There's lots of rule making about what maintenance owners can do when to comes to physical parts of the plane, but hardly any about software. That's why I would talk to a lawyer and A&P first if you do decide to fly with this. It might be fine, especially given the age of the GPS in question, to just have someone sign off on it. But likely only an attorney up-to-date with FAA rule making could tell you that. To me, this looks legally problematic at the very least, but IANAL.
Yes, it is your GPS, and your airplane, and you should be able to do what you like with them, but that's not how the FAA works. You and I both know that, as pilots, we have almost no legal protection. It literally just takes one FAA bureaucrat wanting to make a name for themselves to really make your life a living hell over this if they want to. Never underestimate the pettiness of government bureaucrats when it comes to following rules. If someone from the FAA sees this, they're likely going to want to ask you some questions.
I'm not going to tell you how to live your life. Only you can determine what your risk tolerance is, and the reality is that probably no one will find out, you will have no issues, and you'll be just fine. Again, it's an impressive and very clever feat of reverse-engineering, and I don't want to take anything away from that. From one engineer to another, really, it's well done. But if you have an incident flying IFR on this now-unrated equipment, and the FAA finds out about this, it will likely end very poorly for you.
All I can say is that, if it were me, I would not fly with anything in the airplane that would endanger me or get me in trouble with the FAA. I would not even want to take a chance with something like this in my airplane.
I would at the very least 1) talk to an aviation lawyer, and 2) get someone to sign off on what you've done. I would also provide the relevant documentation on your webpage about the legally questionable nature of this modification.
Or 3) slap an "INOP" placard on it and get on with the fun of flying.
The process of reverse engineering and hardware design itself is still very interesting to read about and I'm not sure what your post really adds besides negativity?
I think it's a very cool project, and amazing that he's able to read/write the data, but I kept waiting to find out where the updated GPS data came from.
I've occasionally considered writing some sort of reverse engineering assistant for 16-bit DOS executables, with the primary target of retro games. I still have a Borland compiler suite handy, although I've long since binned its original 5 1/4" disks.
Disassembling DOS games has been my introduction to reverse engineering, over the last couple of years. Specifically, Ultima Underworld. The game itself is complex, and a lot of the file formats are already documented, so I'm not jumping into the deep end unaided.
Fun fact: The original Lemmings game is actually encrypted. The first thing it does when loading is decrypt chunks of itself at a time, sometimes copying chunks of code to different places, then jumping into those chunks.
The USB sticks are the preferred method these days, but there are a bunch of aircraft flying around out there with Windows viruses stored on their USB sticks. My mechanics get an alert every time they plug one in to do an update.
Your linux-on-an-AVR [1] is still the best hack ever, though :-)
[1] http://dmitry.gr/index.php?r=05.Projects&proj=07.%20Linux%20...
There are ARM microcontrollers from both Atmel and NXP (LPC) which are 5V tolerant, but I'm not aware of any which can provide a 5V output.
So, a 5v pullup on the 'memory chip' side would satisfy the memory chip's 'high' threshold, the zener would protect the 3v3 device, and its shorting to ground would be a legitimate 0.
Why? Because it's giving you worse results: Slew time with open-collector/pullup signals is pretty bad because of the 0->1 transision the trace capacitance is charged up via the pullup rather slowly (compared to a proper CMOS driver). Also, for 8 signals you'll need to populate 8 resistors, 8 clamping zeners. Needs more space than a single SOIC-20, which provides you with proper bidirectional drivers.
In this special case, though, the inputs of the NOR flashes seem to be happy to be driven by 3.3V, the datasheet requires Vinh (voltage input high) to be >2V (likely to be compatible with old TTL logic which had this threshold voltage). So all inputs to the NOR flash could be directly connected to a 3v3 microcontroller, leaves only the 8 bidirectional data pins and the "Ready" pin RY/BY#.
So, I'd probably take a bidirectional level shifter for the data bus, skimp on the single "Ready" pin and only use a resistors, as this signal is only interesting during erase anyway. Then everything else could be directly connected to any 3.3v compatible microprocessor.
That way all signals that need to be fast are fast, there's a minimized component count, and the single remaining signal would be for me to be ridiculed for my lack of rigor :-).
https://aerospace.honeywell.com/en/products/cockpit-systems/...
From the datasheet/pdf: Low-cost USB media can be used on your personal computer to download the latest navigation database from the Internet.
Anyone have any suggestions/recommendations of similar material?