Hacker News new | past | comments | ask | show | jobs | submit login
Reverse engineering an e-ink display (zeus.ugent.be)
188 points by redfast00 on Feb 10, 2023 | hide | past | favorite | 53 comments



Nice article - is the idea to communicate with the tags with their stock firmware using another CC25x series chip or dev board?

Unfortunately, that might be tricky without the private keys in the controller. User manual [0] describes a per site 128 bit AES keys used for the RF comms.

Might be easier to just write fresh firmware for them - there's some code here [1] for driving the display that could be ported to the CC2510. There's SDCC support for at least the CC2511 as used in the Pololu Wixel [2]. It's certainly possible that their cryptosystem is broken but I wouldn't bet on it.

0: https://fcc.report/FCC-ID/2ACQM-EDG2-0590-A/4393106

1: https://github.com/atc1441/E-Paper_Pricetags/tree/main/GxEPD...

2: https://www.pololu.com/product/1336/resources


The idea is indeed to communicate with the tags with their stock firmware (not necessarily using another CC2510, since these aren't made anymore, but that's a possibility).

AES is symmetric cryptography, so that should be possible to extract from the firmware. The tags also show a QR code when the aren't initialized yet, this is likely the setup key. I also read that even if tags are already initialized, it's still possible to reset them with some kind of PUK (not sure how to get that PUK though)

I couldn't find a datasheet for the e-paper screen, so even if re-implementing communication with stock firmware proves to be infeasible, I'll still need the dumped firmware to figure out how the e-paper screen is controlled.


Ah, I vaguely remember those old price tags as it's been such a long time. To sniff their RF traffic best use another CC2510 and TI's own packet sniffer app. Their RF protocol is an extension of the default one from TI's application notes for the CC2510 so it's pretty easy to read out. The AES key extraction would be useless, as it's using CBC and a unique per-device IV and NONCE is used, that's random, so if you crack one then it's just that once, you won't be able to alter the prices of the entire shop to your desire.

There's nothing too special in the firmware, just a state machine that's sleeping most of the time to save power, and wakes up the device at regular interval in its own designated time slot to listen to the radio briefly if the base station is trying to address it, then receives the pricetag image via radio and copies it to the flash and updates the screen if needed, then goes back to sleep. IIRC, the time slots are, from 0 to 255, with 256 being the broadcast address, and the last HEX byte in the serial number sticker is also its timeslot number.

The only juicy part in the FW, if you can find it, would be the waveform for the e-ink display, as those are e-ink confidential most of the time for some bizarre reason. It's not like there are no waveforms already on the internet for displays like that, but e-ink likes to keep the really good waveforms for themselves and their best customers.

Thanks for the trip down memory lane. Good times.


> e-ink likes to keep the really good waveforms for themselves and their best customers.

Any real evidence for this?


Thanks for the information! I think I know who you are, and I understand why you chose to comment with a throwaway handle ;)


Some of the marketing mentioned private keys so I stupidly assumed a per transmission negotiation mechanism but of course they probably just mean "symmetric key". A per tag key extraction would be annoying though presumably. The PUK mechanism is very interesting, I'm interested to see what you find in the firmware...

For the display, this poster has something similar and talks about a datasheet - there's even a pinout for the flex cable (and it's supposedly SPI) [0]. It's for the 2.6" version not the 2.7 though so might be totally different. A comment on the post (by this person [1]) claims that they have working cleanroom CC2510 code that drives the display but who knows.

Great project anyway - I look forward to part two (and what you find on that flash chip)!

(Edit: sorry if you know this already, but there's a manual for the labels themselves [2] implying the setup page is permanently stored in one of the 4 slots - hopefully in that external flash chip)

0: https://epongenoir.blogspot.com/2017/10/

1: http://andreiprojects.blogspot.com/

2: https://fccid.io/2ACQM-EDG1-0260-A/User-Manual/User-Manual-5...


Thanks for the interest :) If you have an RSS feed reader, you can add our RSS feed, so you'll automatically get the next blog posts https://zeus.ugent.be/feed.xml


I'm so happy there are people out in the world able to reverse engineer things like this and share the results publicly. Freakin' cool.


Yeah, waiting for them to finish up so Rob Cockerham can go into a COSCO and have some fun slightly altering the price tags.


Unless they find an actual exploit, tag communication is encrypted. They would have to be using the same key. If not, one would have to swipe one of the keys, reverse engineer like this, and extract the key.


Hadn't thought cockeyed.com in a looooong time - thanks for the throwback!


> The biggest barrier to hacking is often the fear that you’ll break something while poking around. But you have to break eggs to make an omelet; likewise, you have to be willing to sacrifice devices to hack a system. Fortunately, acquiring multiple copies of a mass-produced piece of hardware is easy. I often do a bit of dumpster diving or check classified advertisements to get sample units for research purposes. I generally try to start with three copies: one to tear apart and never put back together, one to probe, and one to keep relatively pristine.

I love learning this kind of stuff through this site. In the world of reverse engineering or hacking stuff together, it feels like such a fumbly exercise that there just isn’t any discipline to it, but experts definitely learned some tricks and learning from them is such a treat. I’ll have to download that book and give it a read sometime soon.


The author of that quote, Andrew "bunnie" Huang, has an excellent blog which is also worth reading:

https://www.bunniestudios.com/blog/

You can grab the download directly from NoStarchPress:

https://nostarch.com/hardwarehackerpaperback


I wonder if there are larger implications to reverse-engineering this. When I worked in retail in high school, I was told repeatedly that if a price was marked on a shelf, then there are laws that require the store to sell that item for that marked price. (IANAL so I don't know the nuances there, but it makes sense). If it becomes easy to change these displays with a new price wirelessly, that could be a really nasty problem for any stores using these displays.

Hopefully for the store's sake, there'd be some sort of public/private key system so that only the holder of the private key can distribute price changes wirelessly. I wouldn't bet money on that though.

(edit) - I see someone else posted the manual and that there's a per-site AES key. That's a good sign I guess.


I’ve only seen a store honor the floor price when it was clearly wrong like once and it was for an item that they were trying to get rid of anyway. I’ve heard the lore too and can’t understand how it could be legally binding for a store to sell an item at the sticker price. Wouldn’t people just walk in with little stickers and mark stuff down as they wished? My wife works in retail and confirms that stores don't just give out items at a loss when the price is mislabeled. They fix it and apologize. My experience confirms this too.

These days stores essentially just map an item’s UPC to a price in a DB in their point of sales software. The price isn’t encoded on the tag. Which brings me to my question: why the heck are we making an eink price tag with heavy security when the source of truth is the POS anyway? I mean no negativity about reversing one, it’s a super interesting and fun project. Just, “why?” in the first place does this thing exist? Maybe it’s just convenience and saves on labor costs to be able to update the price of all the items in your store at once and not pay a human to go out and relabel them?


Here's an example in Michigan's law:

The Shopping Reform and Modernization Act, or Scanner Law, requires that most items on store shelves be clearly displayed with the price; by signage, electronic reader, price sticker, or any other method that clearly and reasonably conveys the price to a consumer in the store at the place where the item is located. If an automatic checkout system (scanner) charges you more than the displayed price of an item, and:

the transaction has been completed, and you have a receipt indicating the item purchased and the price charged for it; Then:

You must notify the seller that you were overcharged, within 30 days of the transaction, either in person or in writing. Within two days of receiving your notice, the seller may choose to refund you the difference between the amount charged and the price displayed plus a "bonus" of ten times the difference, with a minimum of $1.00 and a maximum of $5.00. If the seller does not pay you both the refund and the bonus, you may bring a lawsuit to recover your actual damages or $250.00, whichever is greater, plus reasonable attorney fees up to $300.00. You may instead file a complaint in a small claims court without an attorney.

https://www.michigan.gov/ag/consumer-protection/consumer-ale...


I think that page backs up what I thought, at least for Michigan. The law views the price displayed on the shelf as being the correct price, and if the POS system doesn't match then the law says the POS system is wrong. Also there's another interesting FAQ there which further reinforces it.

Now, if an e-ink display is changed by a hacker, that's obviously fraud and presumably the store wouldn't have to pay up, but I assume that would be tough to catch because the store wouldn't likely assume it had been hacked and even if they thought so they'd probably have to prove it somehow.

From the FAQ:

What if the wrong price is displayed for an item and the clerk catches it before I pay; am I entitled to buy the item at the displayed price?

This is a fact-specific question best answered by a court. A store may not knowingly charge or attempt to charge a price higher than the price displayed for that item. Therefore, the consumer may have a claim if the store will not sell the item at the price displayed. However, the consumer may face obstacles convincing a court that the store knowingly charged the higher price when the pricing mistake is not intentional and will result in an obvious windfall to the consumer.


So the nuance is:

1) you’re only entitled to damages if the store actually completed the sale and the item rang up higher than listed on the shelf

and

2) the store is not required to honor labeling mistakes and can’t be compelled into a sale in that situation

This is consistent with my experience. So I guess if you’re trying to cheat, you don't tell them and ask them to adjust the price, instead you complete the sale then notify them of the error afterward. My experience has mostly been with notifying the employee beforehand which causes them to correct the labeling mistake if one was made.


the source of truth is the POS anyway

In a technical, ideal sense the PoS is the source of truth. But life is messy.

PoS may lose connectivity. PoS may be running an outdated version of the software. PoS is based on some unreliable operating system or low-end PC, and is unreliable. PoS doesn't know about the store manager's last minute special because the distributor sent too much stock. Stores don't have in-house IT guys.

From a legal standpoint, in some states, the price on the shelf label is the source of truth. My grandmother lived in a state where if the price on the shelf was lower than in the PoS you got the item for free.

She was very good at catching those errors and complained bitterly when the law was changed so that the customer only got the lower price.


> I’ve only seen a store honor the floor price when it was clearly wrong like once and it was for an item that they were trying to get rid of anyway.

I bought six packs of Diet Coke from Target at a discounted price for almost 6 months because they left an old tag up at one particular store. :)


I once scored a big bunch of coffee because the local Canadian Superstore confused cents with dollars. The price was listed in cents per kg instead of dollars!

At first they refused to honour the price, and fixed their mistake.

I sent an e-mail with photos to their corporate office. I received a phone call from someone who was laughing and thought it was all funny. He told me to go back to the store, and as much as I could carry, they would honour the posted price.

Cost me like less than a dollar for 4 or 5 kilos of coffee!


That's a heart warming story! That head office was amused and honoured the posted price. They would probably have been within their rights to refuse to sell. At least that is the way it works in English law. The price label, etc., is 'an invitation to treat'. That is it is an invitation to enter into a contract, not a contract in itself. Unless it's changed since my wife studied the subject in the 70s.


Loblaw can definitely afford it.


That is awesome to hear


Very well written article. I have been looking for some inspiration to get into hardware hacking and I think this article did it for me.

I find it interesting that in most writeups voltage injection is a popular appraoch to turning on debug mode. The aricle makes mention to other class of fault injection attack such as clock glitching or electromagnetic fault injection, but are there other approaches that I could look into, just out of curiousity?


Voltage injection is (IMO) the easiest attack. There's also optical fault injection, where you remove the black encapsulation from the chip and hit the bare die with a laser (that sounds really difficult though).

On some chips, you can drill into the black encapsulation and find testpads that are not connected to pins on the IC. This is sometimes used for smartphone unlocking.

Edit: Thanks for the compliment by the way, it really made my day that I got someone interested in hardware hacking


It still somehow breaks my intuition that it’s cost-effective to have thousands of these deployed in each supermarket. I mean, I do understand it rationally, but it’s still weird.


The extra cost of these tags is easily offset by the money you save on employees having to regularly update paper tags (especially in Belgium where labour costs are very high).


Supermarkets already have inventory robots (look for the high-contrast markers around the store), and shelf-stocking robots are on the way. It makes sense that the next step is to eliminate another human job and give it to the robots you already have running around the store.


I know walmart trialed inventory robot but killed the program as being impractical, and many stores quit using the automation of their floor cleaners as they would get stuck in random place when cleaning the floors at night because pallets where in their way and they didn't know how to navigate around, they also needed the floor plan updated anytime a new floor display was put in. don't count the humans out yet.


What happens if you see a product with price X and by the time you checkout it has price Y? Can you claim somehow the previous price?


Same could happen with paper tags while they are in the process of updating them.

Best solution would be to have a transition period where for x hours it’s at the lower price in the system.


I imagine most stores would not change prices during business hours. For 24-hr stores, just do it at like 3am or something, those handful of customers won’t mind.


Because this devices are sold as savings over a period of time compared to a paper tag system.


God I wish this could be me so bad. But they do some really crazy stuff to hack this and I just don't have the time or mental capacity to learn.


I wonder what the motivation is the attempt to use the stock firmware and reverse engineer whatever communication and potential key signing the device has from the factory, versus just wiping the flash / desoldering and replacing with completely new firmware from scratch.

That would require completely tracing the PCB out to understand the display drive from the uC and other pin assignments, but... I find that much easier. And then the end result is the potential for a completely understood hardware & software configuration.


The person who brought the tags has a lot of them, more than the 3 they donated to Zeus. If we replace the firmware, we have to do this for every device, which would be a lot of manual work (opening case, adding probes, flashing firmware, ...). This is even more work per device if you have to desolder the uC from the PCB and solder something else to it.

Reverse engineering the communication protocol is a lot of work, but only once. After that, you can talk to stock devices, without having to modify their hardware or software.

I also didn't find any datasheets for the e-ink display or how to control it, so here also the stock firmware can come in useful.

Aside from practical concerns, I won't lie, I also took this path because it's fun to do and I could practice hardware hacking.


Makes sense. I got more interested after finishing reading your whole post and went looking at the manufacturer's website... it would be too easy for them to just provide their software direct for people to download, huh? It looks like a total software-hardware-cloud service lock in... I can't seem to tell but it seems like all tags might have to call back to their cloud to get their displayed info that is managed by their "VUSION Manager". Talk about a nightmare.

They note it's end to end encrypted, and if they call home to their cloud and not to local area managed software, I bet they are calling a preset list of IP's to auth and DL data. You'd have to both spoof their IP and sign the data with their key somehow.


I might be missing something. I've seen other reverse engineering projects where they simply unsoldered the flash memory and read out the contents. Wasn't that an option?


This might not have been clear in the blogpost, thanks for asking. There are two storage locations on the PCB: the external flash chip, and the internal flash on the microcontroller. I recall that someone else tried to read out the external flash chip, but nothing interesting was found, only the image data on the screen. In this blog post, I read out the code that handles the RF communication and talks to the screen.


I wonder how popular this tag must be/have been to be able to find someone that had already dissolved/sandpapered it? Can't wait for the follow-up on this, turn that e-waste into something usable!


When I recently visited, I saw that the local IKEA uses these tags, so I'd guess these are rather popular.


I saw them at a Walmart in Texas a few years ago, so they're probably quite widespread by now.


Kohls has used tags like this for years. I guess it makes sense if you are actuallly adjusting prices daily


Best Buy stores use these kind of tags, too.


How about glitching a write instruction to overwrite the copy protection register instead?


I had also thought about this, but this is much harder to pull off, since

1. You need a lot of instructions in sequence to succeed, enough that the chance that all succeed is very very small (recall that there's only about a 5% chance we execute an instruction correctly, if for example there are 10 instructions you need to execute, the chance is 0.05*10). If you write to a wrong location because an instruction didn't execute, you lose a byte of the flash.

2. Before writing to flash, you need to stabilize the clock of the chip (this is also done with 8051 instructions). For this, you need to wait until a register value changes. This is feasible, but an additional hurdle.


> if for example there are 10 instructions you need to execute, the chance is 0.05*10

0.05^10, surely?


There should be a double * there, but I think HN removed it


Ah, that makes sense, thanks.


Glitching a write instruction is a little dangerous. But if you have many chips to try or can live with an incomplete, possibly corrupted dump, feel free to do it.


Well, the exploit could be perfected on the device that can be reset first. I understand that writing a wrong address can have unattended consequences, but the read cycle should come first, and glitching likely affects the address decoding circuitry (as opposed to the SRAM registers), so it's probably hard to miss.

I understand wanting to play it self though.

One thing comes to my mind though: each board likely needs slightly different timings.


very well written article, thanks for sharing your findings! gg!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: