Sophos News

How to guess credit card security codes

If you’ve ever used your credit card online, or over the phone, you’ve probably been asked for something known informally as the “short code” or “security code”.

That’s usually a three-digit number physically printed (but not embossed) at the right hand end of the signature strip on the back of your card.

Three digits don’t sound enough to make much of a password, and in normal circumstances they wouldn’t be.

But for what are known as card-not-present transctions, the CVV, or Card Verification Value as it is commonly known, provides a handy degree of protection against one of the most common sorts of credit card fraud, namely skimming.

Skimming is where the crooks use a booby-trapped card reader, for example glued over the real card reader on an ATM, or cunningly squeezed into the card slot on a payment terminal, to read and record the magnetic stripe on your card.

Even if you have a Chip and PIN card, the magstripe contains almost enough information for a crook to convince a website they have your card.

For example, your name as it appears on the front of the card, the “long code”, usually 16 digits across the face of the card, and the expiry date are all there on the magstripe, ready to be copied surreptitiously and used on the web.

The CVV therefore acts as a very low-tech barrier to card-not-present fraud, because most websites also require you to type in the CVV, which is not stored on the magstripe and therefore can’t be skimmed.

Of course, there are numerous caveats here, including:

Guessing CVVs

Researchers at Newcastle University in the UK recently decided to see just how effectively the second caveat was enforced, by trying to guess CVVs.

The initial findings were encouraging: after a few guesses on the same website, they’d end up locked out and unable to go and further.

Then they tried what’s called a distributed attack, using a program to submit payment requests automatically to lots of websites at the same time.

You can see where this is going.

If each website gives you five guesses, then with 200 simultaneous guesses on a range of different websites, you can get through 1000 guesses (200 × 5) in quick order without triggering a block on any of the sites.

And with 1000 guesses, you can cover all CCV possibilities from 000 to 999, stopping when you succeed.

Then you can go to a 201st site and order just about whatever you like, because you’ve “solved” the CVV without ever actually seeing the victim’s card.

In other words, you’d expect the payment processor’s back-end servers to keep track not just of the number of CVV guesses from each site, but the total number of guesses since your last successful purchase from any site.

According to Newcastle University, Mastercard stopped this sort of distributed guessing, but Visa did not.

Should you worry?

Considering how much credit card fraud happens without any need for CVV-guessing tricks like this, we don’t think this is a signal to give up online purchases entirely this festive season.

Afte all, if any of the sites or services you used recently kept your CVV, even if only to write it down temporarily while processing your transaction, you’re exposed anyway, so CVVs aren’t a significant barrier to determined crooks.

And if you’ve ever put your card details into a hacked or fraudulent website – even (or perhaps especially) if the transaction was never finalised – then the crooks probably already have everything they need to clone your card.

What to do?

A few simple precautions will help, regardless of your card provider: