Unlocking The Power Of the Magstripe 224
Acidus writes "While researching for an embedded systems project (a magstripe enabled Coke machine), I was shocked by the lack of magstripe information: Programs/code that would run on a modern OS were all but nonexistant, articles that were 6-10 years old, etc. Further research proved hard, because I had become google's authoritative source. So Stripe Snoop was born, and is now at 1.5 . Stripe Snoop is a suite of research tools that captures, modifies, validates, generates, analyzes, and shares magstripe data, with an ever-growing database of card formats. Decoding everything from driver's licenses to banking cards, its features can analyze non-standard cards, such as NYC's Metrocard."
Also in 2600 (Score:5, Interesting)
There was also an interesting article in this summer 2600 magazine [2600.com] about magstrips. Some information and code were supplied...
Re:Also in 2600 (Score:5, Informative)
An article I wrote that is being published in the Summer 2004 issue of 2600 that is all about magstripe interfacing. This provided the basis for Stripe Snoop. Another application is this homebrew coke machine I built.
Re:Also in 2600 (Score:2)
(Thanks for the information)
From all of us who will be glad to be able... (Score:2)
Now, get to work on bar codes!
I'm going to go buy a card writer, and make a million selling counterfeit Kinkos cards. BWHAHAHA!
Re:From all of us who will be glad to be able... (Score:2)
Barcodes are standardized. There are tons of programs, including freeware, that read and write barcodes. There's even a KDE-based barcode program.
I know because I just helped implement barcodes on student ID cards at City College of San Francisco.
Re:Also in 2600 (Score:4, Interesting)
What was far more interesting was the software backend he developed to run the system. It was very professional, and the software itself incorporated some intrigueing concepts, such as what to do when the system was cut off from the real world. I hope Acidus will care to chime in and explain some more of his higher-level ideas.
One thing that I was impressed with was the security concerns that he evidently thought of. Unlike other programmers I know, security was not an afterthought, but incorporated into the design (this was also evidenced in his Blackboard dissection, previously discussed on Slashdot).
I hope that Acidus has a chance to go far, he is one of those bright young Computer Scientists with a good future in front of him.
Cheers!
Re:Also in 2600 (Score:4, Funny)
Working link (Score:5, Informative)
Linky [yak.net].
How long before DMCA is used? (Score:5, Insightful)
Could be a useful tool though, I'd love to save car parking charges (place where I park sometimes uses magnetic cards)
Re:How long before DMCA is used? (Score:3, Insightful)
"Could be a useful tool though, I'd love to save car parking charges (place where I park sometimes uses magnetic cards)
Smiley noted, but it's comments like this that make people think of "hackers" as criminals. Another example: P2P could be a useful tool though, I'd love to save the cost of a CD.
RIAA and the MPAA may be a bunch of wankers, but let's not encourage them. Let the same logic apply to smart & mag card manufacturers.
Re:How long before DMCA is used? (Score:2)
Anyway, the said car parking charges are extortionate. Typically £5-7 and I'm only there around three hours. I doubt I would "hack" it anyway, would mean leaving a laptop in the car for starters.
Re:How long before DMCA is used? (Score:3, Insightful)
Cracking - computer crime.
I think trying to defraud a system would probably all under the Computer Misuse Act in the UK.
Re:How long before DMCA is used? (Score:5, Insightful)
In other words, not release it at all?
Let's ban chemistry books, then, because the informatioon in there can be used to develop lethal toxins and explosives. Those publishers shold be a bit more responsible in putting out the information.
Don't be an asshat. Information is information. He is not advokating it's use for illegal/immoral activities (quite the opposite, actually). If you choose to apply this knowledge to break the law, then you are responsible. Don't blame the publisher of the book if someone uses the information to build a bomb and don't blame the maintainer of the website if you use the information to commit fraud.
=Smidge=
Re:How long before DMCA is used? (Score:2, Funny)
Re:How long before DMCA is used? (Score:2)
Re:Diaspora (Score:2)
Re:How long before DMCA is used? (Score:5, Insightful)
Its the standard bullshit you'll get from clueless people and experience says most cards in your wallet are probably badly designed, so yep, its probably not worth it to try and help these people by explaining whats wrong and what they can do because they are more likely to try and sue you.
Bu I think technically you have a legal right to see whats on the strip - its your personal data and would fall under the data-protection act?
What is REALLY on your card? (Score:5, Interesting)
It should be made to look offical and be housed in an hard-to-destroy case. It would be bolted down on the sidewalk in the middle of the night, near an ATM or in a shopping center.
Have a big sign that says "what is REALLY on your magnetic cards?".
If you are an art student you could pull off doing something like that and get credit for doing instalation art.
Re:What is REALLY on your card? (Score:2)
Re:What is REALLY on your card? (Score:3, Insightful)
I can't.
Of course, I can't tell if Tony Soprano is behind the cash register at the local pizza joint, either. So how do I know who is cloning my Visa card, and who is a legitimate merchant?
I can't.
But, I still wouldn't trust this simply for the purpose of viewing my data. And I would hope that the public wouldn't, either.
Re:What is REALLY on your card? (Score:5, Informative)
Re:How long before DMCA is used? (Score:3, Insightful)
I agree you should be able to see what's on a strip, but let's not get less knowledgeable people excited here, OK?
Re:Security Nightmare (Score:2, Interesting)
Re:How long before DMCA is used? (Score:5, Interesting)
I used to work for a company that produced access control devices, including card readers. We managed to reverse engineer all of our competitor's card formats (the one's that didn't use the well-documented Wiegand standard) and build support for them into our product to reduce the cost of getting customers to switch. Most competitor's just shrugged it off, half of them were doing the same thing anyway, but one company that relied on defence contracts for a lot of its business got its lawyers to write a letter threatening to report us to the NSA for "breaking their triple-DES level encryption scheme". We sent the lawyers back full documentation of their snakeoil and pointed out that they'd lose a lot of Government and defense business if the NSA got wind of the fact that what was being marketed as "triple-DES level encryption" was in fact an 4-bit XOR pattern.
Re:How long before DMCA is used? (Score:4, Interesting)
So do you suppose that all those "high security" cards the government buys are actually low/no security cards?
I feel safer already.
Re:How long before DMCA is used? (Score:3, Informative)
Re:How long before DMCA is used? (Score:4, Informative)
True. Some are even more. I worked at a security company a few years ago testing, among other things, mag-stripe cards/readers/interfaces. We used American Magnetics' (I believe) Model 700's - and that 700 was roughly equivalent to the base-model price. It depended, of course, on whether you bought the models that could read just one stripe, two stripes, or all three stripes on a standard card - the 3-stripers were more, of course, but for some purposes unnecessary. For example, another tester and I duplicated the first two stripes of his ATM card (ignoring the third because either we didn't know what character set it was encoded in, or else we didn't yet have access to a 3-stripe reader/writer, I forget which), and successfully used it in an ATM (just to do a balance inquiry - not to actually withdraw cash - we were too afraid of setting off some kind of alarm). We'd suspected that would work beforehand, since the first two stripes were in ABA (American Bankers' Association) 7-bit (or was it 5-bit? - it's been three years, and I've slept since then) and the third stripe wasn't, so therefore probably not used for banking applications. We were satisfied enough when it succeeded to not experiment further.
But, with that in mind, it's immediately clear that you could earn back the initial hardware investment in a big hurry if you were of a black-hat kind of mind-set.
One of the more interesting/cute little facts when you're working with mag-stripe cards is that, to determine where some failures lie, you can use a spray-can of very fine iron or iron-oxide dust (basically, rust) to spray on the stripe and actually SEE the encoded magnetic patterns. If the patterns are sharp, then it's the reader's fault; if the patterns aren't there, then it's the card's fault.
Here's another project for someone with a bit more in-depth hardware knowledge than I have: figure out what encoding scheme is on the thin little cards used at some arcades where you buy credit on a proprietary card - I tried reading one of those in a 3-stripe reader and got unreadable, in consistent and totally unuseful results.
Re:How long before DMCA is used? (Score:2)
considering that they use track 2, and that track only contains 40 characters, using a 32 character md5sum of two data fields and a secret field would be out of the question.
If your bound and determined to commit retail fraud; I'd think you would want more for your prison sentence than free parking though.
Re:How long before DMCA is used? (Score:3, Interesting)
And I'd like to copy my ATM card's stripe over some old unused card like a library card from a city I don't live in anymore. Ought to add some useful security-through-obscurity to my wallet in case it's stolen. Who's going to stick a library card in an ATM?
Has anyone done this? What sort of equipment do I need to write to a card?
parking gates (Score:5, Funny)
Not Difficult At All (Score:5, Interesting)
I have worked with developing Linux-based solutions with products from MagTek (manufacturer of hundreds of devices like stripe and card/check readers) and I have to point out that you may not find much information on the subject because the programming for such is so simplistic that a manual is not really needed. I am curious if other products from other providers work in a similar fashion.
MagTek devices will decode the stripes for you. The data contained within is sent to the computer in serialized format, so once the string of characters is received, you simply have to break the data into whatever pieces you need by looking for sentinal characters in ISO-defined positions. A dozen lines of code at most will handle this under most common programming languages.
When I was approached by my former employer to create a product with Linux and MagTek devices, (in mid-2000) I found absolutely no documentation on the devices whatsoever on the Net other than sales literature. The customer support personel did send me several pages of specs and such via FedEx Overnight, and when I received them, I saw that most of their then-current product line operated in a similar manner.
If possible, connect your reader device to some sort of I/O port and watch the data that is sent to the port with a terminal program (serial I/O in this case, similar methods used for parallel and USB-style interfaces...) Perform enough tests, and you should be able to get a more than adequate idea on how to parse the data sent.
In case you are really curious, go look at the older (now defunct?) Serial I/O HowTo at linux.org (or one of the mirrors). There are more than enough examples within to show you how to handle any type of serial-based interfacing project.
Hope this helps...
Brian
Re:Not Difficult At All (Score:5, Informative)
Serial Programming Guide for POSIX Operating Systems [easysw.com]
Re:Not Difficult At All (Score:4, Interesting)
So wait, how do i hack my metrocard? (Score:5, Funny)
Re:So wait, how do i hack my metrocard? (Score:5, Informative)
Remember when it first came out and the cards were blue? Apparently a bunch of people figured out that you could dupe 50$ of value to used ones, and sell them to idiots on the platform. They would swipe it to show the dope there was a value and get cash for it.
I sat in on a security lecture once where the expert discussed the complexities of preventing unauthorized use in a system that big. Basically every time you swipe it writes back to your card and a log at that turnstyle. Every 5 minutes or so that log is uploaded to a regional center and that in turn is uploaded to a central location. They then can detect detect things like if a card is used in more than one location, or if more than once in n minutes. If one of these potentially illegal conditions exist the system can add your card to a blacklist and push it back out to the turnstyles all in under 11 minutes.
The cooler thing is that then when you use a modified card that was blacklisted the little color lights on the opposite side flash yellow or red instead of green. Alerting the police who like to stand and watch people try to jujmp or squeeze by to pick you up.
I thought it was a brilliant use of a relativly old and low-security technology.
Re:So wait, how do i hack my metrocard? (Score:2)
Re:So wait, how do i hack my metrocard? (Score:2)
Re:So wait, how do i hack my metrocard? (Score:3, Interesting)
mta doesn't like that much.
2600 tried to do this without charging and they still got in trouble!
Re:So wait, how do i hack my metrocard? (Score:3, Interesting)
This second one screwed me, a first-time visitor to NYC. We took the stairs down to the subway at a station somewhere near Times Square. I slipped my Metrocard through and entered, only to find out that in this particular station, you could only get to the other side of the tracks by going back up to the street, coming down another set of stairs, and reentering the gates. The card reader p
Re:So wait, how do i hack my metrocard? (Score:3, Interesting)
I think the Metrocards are too picky!
You may think so as a tourist, but new york city is the most crime ridden city in the USA. More than that, crime is organized. If there was a way to scam metrocards you could be sure that there would be a racket surrounding it. I remember early rumors of places in chinatown that would re-up your card for you, but never had them substantiated. Walk around manhattan... first floor windows are barred up, Gates have hardened steel padlocks, anything that may be
Re:So wait, how do i hack my metrocard? (Score:2)
No it's not. While the topic at hand is petty crimes, NYC is the safest of the big cities (1 million+ pop.) and I'd guess that the rates for non "index" crimes similar. Here's just one of many URLs found by Google http://www.nycvisit.com/content/index.cfm?pagePke
Re:So wait, how do i hack my metrocard? (Score:3, Insightful)
Re:So wait, how do i hack my metrocard? (Score:2)
Flashing's a crime? Oh crap.
Re:So wait, how do i hack my metrocard? (Score:2)
Re:So wait, how do i hack my metrocard? (Score:2, Informative)
I'd expect it to be a forgery offense, against the State of New York (if you're talking about NYC Metrocards), but I hardly think the Federal Government has a case here, unless maybe you traffic in counterfeit metrocards across state lines or something. See, the NYC transportation department isn't a federal agency, and the card isn't a federal reserve note.
Still a bad idea of course, New York's justice system being just as sca
Re:So wait, how do i hack my metrocard? (Score:2)
No. The card could have a unique id, which is then linked to an account stored on a very large system. Everytime you walk through the turnstyle, the account, with the associated ID, is updated.
To update your card, a cash machine accepts money and places it in your account.
Oh wait, thats the OTHER global transactional system.
In the context of subways, the method is also tamper proof, unless of course you lose your card.
Re:So wait, how do i hack my metrocard? (Score:3, Interesting)
This allows a number of things: if your monthly card gets lost or stolen, you can call the MTA up, give them your credit card number and they'll blacklist the missing card and send you a new one for the remaining days left on your Metrocard.
It's also been used by the NYPD for verifying alibis, when Metrocards found on suspects can be traced to specific
Re:So wait, how do i hack my metrocard? (Score:2)
Re:So wait, how do i hack my metrocard? (Score:2)
hotels (Score:3, Interesting)
Re:hotels (Score:5, Interesting)
Re:hotels (Score:5, Interesting)
HTH etc
(PS, this hotel chain still relies on PC's running windows 95b for all the booking / reservation / billing stuff.)
Re:hotels (Score:5, Insightful)
PS, this hotel chain still relies on PC's running windows 95b for all the booking / reservation / billing stuff.
An important and practical lesson that what is good enough to get the job done gets used and used and used. No matter that it smells bad to those of us on the bleeding edge of technology.
Re:hotels (Score:2)
OT: How do they power/commnuicate with the locks? (Score:3, Interesting)
I've just assumed that the power is delivered via hinges and wires buried in the door (which would mean custom doors or some sophisticated drilling to retrofit). I suppose you could have induction powering and communication of the reader via the door jam (s
Re:OT: How do they power/commnuicate with the lock (Score:2, Informative)
Actually, many access control card schemes incorporate an "issue code" as part of the data on the card. Once a card with a "later" issue code in a sequence is used, the lock recognizes that "earlier" issue codes are no longer valid. No communication back t
Re:OT: How do they power/commnuicate with the lock (Score:3, Insightful)
Presumably they don't honor newer issue codes UNLESS the "open" code also matches. If they did honor newer issue codes even if the open code was wrong, I could just DoS room locks when I checked in by swiping my card in everyone's lock..
epos (Score:5, Interesting)
it is because that there is alot of poor win32 closed source software out there costing $1000 upwards!
all pooorly written in VB and the like by programmers whose pooor coding is more than obvious once a button is pressed or a menu selected.
ramcwin , rencode 2000 being obvious candidates.
it seems this is one of those few areas in software applications where even on the vast breadth of the internet a conspiracy of supression of knowledge . non open code. [not that the code is worth anything to learn from] in order to force the sale of ridiclous 1000 dollar licences for extremely poor code. my project i s free open source mag stripe oswftare compatible with as many reders and writesr as possible including portable code and libraries to embed in dumb terminals for people wanting to make thin open source terminal clients for EPOS systems.
i hate poor elite pricey specialised software.
for instance in a few months a large electronics chain has moved over to linux for their epos. i will make sure their "custom" software does not violate the gpl. [i just applied for a job !!]
Re:epos (Score:5, Informative)
And if you're one of the 100 people, that software might save you hours and hours of work, tens of thousands of dollars on custom software, and maybe even save you having to hire somebody. All that for $1000 is a pretty sweet deal, and doesn't seem ridiculous at all. Granted, if you could get the same thing for $50, you'd take it. But on a business scale, $1000 is fucking chump change.
Furthermore, many niche software companies use the cheapest programmers and cheapest practices to get the job done. This means VB, which is a powerful tool when you want to make a program in less than an hour. Sloppy code is sometimes the fault of bad programmers (what do you expect, offering 35% or less than the going rate) but just as often is the fault of high pressure development. Customers paying $1000 for software are VERY insistant and many times their complaints will almost completely drive development. If Customer A asks for some feature unique to their business flow, you have to put it in, even if it doesn't make any damn sense. Our old software (which I had nothing to do with or it'd be all objects) is 20% functionality and 80% stupid business logic (if company = "company a" then
Incidentally, with Linux gaining ground in a lot of these market niches, expect to see a lot of really shitty TCL or VB code showing up in closed source Linux packages. It's lack of money that creates stupid software...
Re:epos (Score:2)
Writing the stripe (Score:5, Interesting)
Usually this is achieved by a setting within the printer driver which defines which stripe (of the three) to write to and how to get the data out of the printing data. The sequence is usually marked out with start and stop character sequences (on Javelin printers these are usually "${n" and "}$" for start and stop, where n is the track number.)
This saves people the trouble of printing the cards and then writing them seperately.
Storage capacity (Score:5, Interesting)
Re:Storage capacity (Score:5, Informative)
There are three tracks on the magstripe. Each track is
Track one is 210 bits per inch (bpi), and holds 79 six-bit plus parity bit read-only characters.
Track two is 75 bpi, and holds 40 four-bit plus parity bit characters.
Track three is 210 bpi, and holds 107 four-bit plus parity bit characters.
Do it the good ole way (Score:5, Interesting)
I imagine you could do the same with any magnetic card and a little fine iron sawdust that you could make yourself with a grinder.
Re:Do it the good ole way (Score:5, Interesting)
For those who are old enough to remember such things, the tapes were 100bpi/7 track used on a Univac III. And this was the upgrade from 4 inch wide punched paper tape.
Re:Do it the good ole way (Score:2, Interesting)
OH, BTW -- ssg r00lz! (ssg may have been called sgr back in the Univac III days...)
Re:Do it the good ole way (Score:2)
I was so glad when tape tracks became self-clocking.
Re:Do it the good ole way (Score:2)
You're working too hard. www.sci-toys.com mentions that the easiest way for a person to get iron filings is to drag a magnet through the sand at a beach...what am I talking about? This is
Re:Do it the good ole way (Score:2)
You're working too hard. www.sci-toys.com mentions that the easiest way for a person to get iron filings is to drag a magnet through the sand at a beach.
Your particle size has to be finer than the size of the domains you're trying to look at. As another posted noted, standard magstripe cards work with domain sizes of about 5-10 mil, and the tapes mentioned by other posters h
HOKY SHIT! THERE'S LIKE NO MAGSTRIPE INFORMATION! (Score:4, Funny)
Maybe you were mildly suprised?
MSR (Score:5, Informative)
The biggest problem was dealing with keyboard wedge scanners - if your app expects some kind of event, or possibly a dedicated communication channel (like a serial port) you have to muck around with keyboard hooks to make it work.
Better interface? (Score:5, Informative)
I was poking around the links provided on the site, and found this: The simplest magnetic stripe reader [gae.ucm.es]. He wrote software to analyze the audio generated by the card when passed over the read head. This means that any old cassette player has a chance at being used to hack magstripes! Any comments on how accurate this method is, versus the F2F decoder chips?
More detailed tech discussion on BRR episode 56 (Score:2, Interesting)
Btw (Score:2, Informative)
From soda machines to subway ticket machines, etc.
It's strange that it's almost only credit cards that's used in the US. The only ones who gain from that is Visa and Mastercard. Debit cards without any fees is the future.
Re:Btw (Score:2)
Did you also notice the Coke machines that allow you to pay by mobile phone? There's a number written on the machine, you SMS it, they instantly SMS you back a code, and then you punch the code into the machine and get your drink. The price of the drink goes on your phone bill.
How about the bill-pa
Us? (Score:2)
There are debit card enabled things everywhere in NYC, Chicago, SF, etc...
Re:Btw (Score:2, Interesting)
The costs involved in the back end. Debit cards don't cost nearly as much as check cards do. Why? Because check cards are locked into the credit card system, that's why. It costs the store significantly more to process a cre
Re:Btw (Score:2)
I use cash.
Re:Btw (Score:2)
First of all, plenty of places in the US take debit cards. Gas pumps, grocery stores, etc.
Secondly, I'll never carry a debit card, but I carry credit cards. If I lose it or the card is stolen, my liability on a credit card is limited to $50 (and the CC company has waived that the couple of times it happened to me). If somebody else
Re:Btw (Score:2)
Huh. I've never (and I mean never) paid a cent of interest for a purchase on my credit card. I just pay it off every month. So the credit card company lends me money for a few weeks for free. Don't see why that's worse (for me) than a debit card.
"Researching an embedded systems project..." ? (Score:4, Funny)
While researching for an embedded systems project (a magstripe enabled Coke machine)
In other words you wanted to get a Coke the other day and didn't have any spare change, right? :)
Blocked! (Score:5, Interesting)
"Re-magging" (Score:2)
My debit-cards usually only last 6 months. I'm not rough with them. I take it out of my wallet, I swipe it, I put it back. I'm careful to put it between flat cards (with no raised numbers) so the strip doesn't get abused, but still, the stripe wears down. It's a week to 10 days and a nominal fee to get a new card. Imagine making card backups, reapplying some mag material, and re-magging my own card.
Rock on.
2600.... (Score:2)
PIN number stored on card? WTF? (Score:2)
Added layer of security (Score:2)
Re:Added layer of security (Score:2)
Re:Added layer of security (Score:2)
$500 per day is the limit my bank places on all debit cards...
Re:Added layer of security (Score:2)
Re:Added layer of security (Score:2)
ChipAndPin [chipandpin.co.uk]
Re:Added layer of security (Score:3, Interesting)
The way it was once explained to me is that it has everything to do with the
In the United States, local telephone calls are essentially free.
Its there, and easy to find. (Score:2)
All we ever needed to do was contact the companies that we wanted to support, and they would always supply is with documentation, and even source code.
All that we needed to say was, we want to support your and we need specifications. Within a few days we always get it...
The main thing with this type of hardware, is 9 out of 10 the manufacture only supplies them to companies that will be su
Offtopic (Score:2)
She said her manager swears by that method.
Any idea why this works? Does the plastic wrap just push the card a little closer to the reader?
(For the non-USians, Saran Wrap is a thin clear plastic wrap, usua
Re:Offtopic (Score:2)
Are you sure it was Saran Wrap and not, say, Reynolds Wrap, Glad Wrap, or any of the other hundreds of major name- and noname- brands (many private labeled from other brands) available outside of the mighty US of A?
Some misinformation here (Score:3, Interesting)
Q: Why is keyboard based reader support so primitive?
A: Keyboard based readers, while cheap and easy to interface, have several problems. First off, The reader simply decodes each track that is present, from 1 to 3, appending each track to the next. No dividing characters are used, so it very difficult to detrimine where the decode for 1 track ends and the next begins. Not being able to reliably seperate the track data means we can't analyze it using our card database. For now, Keyboard based readers work best with cards that only have 1 track.
The keyboard-based reader I have, has dip-switches on it so you can put start and end markers around each track, and select which track you want. Sounds like the guy hasn't done much research on available card readers (or available card writers).
Also, the mag card format is an ISO standard so it isn't as if there is any mysterious behaviour going on here (apart from the non-standard card he mentioned).
Finally, in case anyone was under the wrong impression, having a mag card writer doesn't mean you can break anyone's bank account (bank cards don't contain security information). The worst you could do would be to copy someone else's card for a building security system, then rob it and try and blame the other guy (somehow I don't think this would be too successful).
Tons of documentation available (Score:2, Interesting)
Re:Good link checking, well done the mods... (Score:5, Informative)
Re: (Score:2)
Re:El-Off-Topic-Postino: 'Nonexistant' (Score:2, Insightful)
Then you can come back here and bitch about grammar.
Re:Can you please supply some empty ATMs too.. (Score:2)