Whenever someone manages to expose vulnerabilities in everyday devices, we love to root for them. [Adrian] over at Irongeek has been inspired to exploit barcodes as a means to attack a POS database. Based on an idea from a Pauldotcom episode, he set out to make a rapid attack device, using an LED to spoof the signals that would be received by scanning a barcode. By exposing the POS to a set of generic database attacks, including XSS, SQL Injection, and other errors easily solved by input sanitation, he has created the first version of an automated system penetration device. In this case the hardware is simple, but the concept is impressive.
With the hardware explained and the source code provided, as well as a basic un-sanitized input cheat sheet, the would-be barcode hackers have a great place to start if they feel compelled to provide a revision two.
[Thanks Robert W.]
That’s beautiful. Looks like a hack out of a movie :D
Is that a typo on the battery? because 24AH is all but impossible for something that size. (unless it has a car battery attached)
beastly; one would be interested in seeing a survey of machines and their vulnerabilities discovered via this method, simply to see if the manufacturers are at all prepared for this sort of stuff.
@ Durgo, not if it had two A123 cells at 11,000-13,000 mAh apiece. I doubt it, but it is possible.
I wonder what you can get with this, maybe find a secret discount coupon to save money?
Self checkout with things of high value that weigh the same as things of low value? In which case you wouldn’t need this, just the UPC of the less expensive product.
it would be interesting to see the potential application for this. Apologies if there is a discussion on the link, I am going to read it now.
@Miles
This is mainly to check if they are sanitizing their inputs. You could potentially insert data or change prices if they are vulnerable.
The newer systems might be easily manipulable if the designers were lazy and just slapped together an SQL database(IE it was made by the store owner’s nephew), but older systems don’t even use relational DBs.
Odds are you could only crash the POS terminal.
If they wanted to rip-off the store, they’d have better luck generating random barcodes that weren’t valid UPCs, eventually they’d generate a manager ID barcode.
Well, if you really wanted to just rip off a store from the self checkout line (not suggested) simply take a picture of a cheaper item’s barcode with your cellphone and then display the barcode when you check out instead of the more expensive item.
@Andr0id They have scales that you put everything on to confirm you haven’t put anything in that you didn’t scan and to confirm that the product has been bagged. The barcode would have to match something very close to the weight that you were buying. It could still be done, but you’d have to be a little more tricky than what you imply.
I wonder if the LED could be replaced with a laser diode? Something I was thinking about trying several years ago and never got around to it was building a hand held device with a laser diode. I always wondered if it would be possible to remotely inject a barcode into someone’s order at the grocery store.
“Why does KY Jelly and Condoms keep coming up?!”
@jeff Yes, that was implied by Miles’ comment earlier, I left it out as it was less technical and more of a discussion type of commet; However, that being said, I have noticed at least at some stores (usually food stores) that the weight of an item does not really seem to matter much, especially if you are in the market to steal produce! hehe
Yeah, that is beautiful! Now i cant wait for the car dealers to start using the bar code system ;)
@doc oct, yes, you can use a laser diode :) I’ve got that working in a newer version, but I have not posted it yet. So far, even though the range seems to be there, the reliability of the laser has not been as good as the LED.
in the walmart close to my house the weigh wouldnt matter because most of the scales are broken
@Durgo: You’re right, 24AH is startlingly high. 2.4AH is a more reasonable figure (which is what’s on the label).
Ha, wow. And here I thought Durgo missed the “milli” on the label, but I missed a zero. 24AH, indeed!
@Android,
I’m sure if you really wanted to rip off the store the easiest way would be to “forget” a large item under your cart.
@Andr0id Unless they have an odd camera setup rather than your standard laser scanner, this won’t work. Barcode scanners work on reflected laser light, which reflects evenly on an LCD regardless of what the pixels under the surface are doing.
this link is not for stealing produce and groceries, as some of you are missing the point of the article.
this tests for injection techniques in the db that the barcode is sending it’s read information too.
@Mike: What you can’t see is that it’s a 20mV battery :)
I wonder if an infra-red LED would work. The device could be made far brighter, yet invisible to humans.
You can make a visit to the store, read the numbers under the barcode of some cheap items, go to your house, open barcodemagic on your pc and put the numbers, print the barcode, go back to the store and glue the new barcode to something expensive.
I’ve done it and it works. If you want to buy apples cheaper, that’s a simple method that works.
BTW, that’s called steal.
On the other hand, the article does not talk about stealing, but exploiting vulnerabilities in those machines I think.
the KY idea is hilarious, if infrared LEDs work you should combine it with that LED suit, walk through the checkout area and suddenly all the machines start going nuts with condom and junior mint purchases. XD
Way to go Adrian! Another awesome hack! Everyone should check out irongeek.
I had a “friend” who would paste over the barcode labels on canned/jar goods because the weights are uniform. A can of cheap tuna weighs the same as a can of premium white albacore, you know.
I was… I mean he was a typical broke college student at the time, but of course there’s no excuse for thievery. But it did work.
@ those mentioning weigh scales: I used to work for a major self-checkout manufacturer and many of our clients requested the anti-theft scales disabled. Too many false positives from kids climbing on them and abuse. When they were first deployed, we had a store that kept breaking a particular scale on a specific SCO suring the overnight shift. After replacing several load cells we had a tech in the store at just the right time to find a large checkout manager using it for a bench. Apparently she was about 4 times the max load for the cells.
Tested the IR idea. It works. :) Thanks DB.