What I know about the POS products I resell/support, when taking a credit card for a payment there are set # of characters it's looking for.
In a general sense it's looking for something like this:
- 16 digits for Visa/Mastercard/Discover
- 15 for Amex (will just use a Visa/MC/Discover for example)
- 4 digits for expiration
- 3 digits security code
So the system wants the data in this format
[Card number][Expiration][Security Code]
There is other information in the stripe, but just trying to illustrate a simple example.
Also, not mentioning chipped cards, just in reference to old magnetic strip only cards, for my example.
So let's say my POS system is expecting 23 digits (16+4+3) and I make a fake card with a card printer. I have one right next to me on my desk. However, I mess up in my order of information.
Instead of [Card number][Expiration][Security Code]
I do
[Security Code] [Card number] [Expiration]
The system would still take the information I've given, but most likely will come back with an "invalid card number" like message.
So redo my fake card with the right order of information. Go to a store and try the card and it works fine.
Decide to include my payload at the end of the card. My thought that one of two things would happen:
The card would go through normally, the system took it's 24 digits it was looking for submitted to the credit card company for authorization.
The POS would not accept the card as, the amount of digits on the magnetic stripes didn't match the standard set.
On #2 I have seen happen in the wild. A chain of stores my company supports is next to a large university. The University gives out ID cards, but they are also a credit card for the students to use. They can use the card to buy stuff, and to get services (check out books and such) at the University.
Magnetic Stripe Cards have up to 3 tracks of information. Two tracks are used for a credit card transaction. One track can be used, but the merchant pays an extra fee as it wasn't a "track 1 & track 2" transaction.
After frequent calls from the store owners with the problem of "XXXX university cards don't work, unless we manually enter them", I went to the university and they let me see a card and swipe it to see how the information was being put on the magnetic stripe. They were thrown back a little bit by my request, but they understood the problem and I did my test in front of them after an IT staff from the university watched me.
They were putting student ID information on Track 3 of the cards. So the POS system I support was reading track 1, track 2, and track 3 and not accepting the card because it had too much information.
To fix the problem, the MSR (Magnetic-stripe-readers) at the stores we had to program to not read Track 3 information.
That was my experience with one POS product. There are hundreds of POS products out there, and I would assume it would be standard practice to only accept "X" number of digits.
If this were a possibility, I would think the "weak" point would be the payment gateway that sends the card information to the bank for approval.
Point of Sale Computer---->Payment Gateway---->Bank of card-owner
The payment gateway sets the syntax of how they want to the data to come to them.
They might like a different way than my example of
[Card number][Expiration][Security Code]
So if we thought of exploiting it, I guess similar to a SQL injection attack, the payment gateway would be where to look. PG's are pretty hardened systems so I'd imagine they wouldn't tolerate anything that's NOT in their syntax.