Can a Gift Card Be Brute-Forced? The GiftGhostBot Story

What brute-forcing a gift card actually means

Quick answer

Yes, in a narrow but real sense. A gift card number is long, but it is not random noise, and the public balance-check page lets an attacker test guessed numbers by the million without ever buying a card. That is exactly what the GiftGhostBot attack did in 2017. The single best defense is a required PIN, which multiplies the number of guesses needed far beyond what a bot can grind through.

People hear brute force and picture a thief in a hoodie cracking a bank vault. The real version is duller and smarter. A gift card carries a long string of digits, and most people assume long means safe. It does not, on its own. Safe means unpredictable. A number that is long but issued in a tidy sequence, or protected by a weak check digit, is a lock with a very wide keyhole.

Here is the uncomfortable part. Many gift card programs issue numbers in ranges, and many use a simple validation formula, the same kind of checksum that catches a typo when you enter a card at checkout. A checksum is there to stop honest mistakes, not determined attackers. If a bot knows the rough format and the check pattern, it does not have to try every number in the universe. It only has to try the numbers that could plausibly be real, and that pool is small enough to attack.

So brute-forcing a gift card is really guess-and-check at industrial speed. Generate a candidate number that fits the format, ask the retailer whether it is real and whether it has money on it, and move on. Do that fast enough, across enough cards, and you will find live balances. The math is not exotic. The speed is the whole trick.

The weak door is the balance-check page

A thief guessing card numbers in a vacuum gets nowhere. They need something to tell them whether a guess is a hit. Retailers hand them that something for free, and they do it for a good reason: the public balance-check page. You have used one. You flip the card over, type the number into a box on the retailer’s site, and it tells you what is left. Convenient for you. Convenient for the attacker too.

That page is the oracle. It answers a yes-or-no question for anyone who asks, no purchase required, no account, often no PIN. Feed it a guessed number and it will quietly report back: not a real card, or real card with a balance. A human doing this one card at a time would die of boredom. A script does not get bored. It just needs the retailer to keep answering.

This is the structural flaw. The feature that helps a legitimate shopper check their own card is the same feature that lets a bot enumerate everyone else’s. The attacker is not breaking in. They are using the front door exactly as built, just a few million times faster than the designers imagined anyone would.

The GiftGhostBot story

This is not hypothetical. In early 2017, security researchers at Distil Networks, a bot-detection firm later absorbed into Imperva, disclosed an automated attack they named GiftGhostBot. It did precisely what the section above describes. It hammered the gift card balance-check pages of a large number of retailer websites, enumerating candidate card numbers and watching for the ones that came back with money on them.

The firm that found it reported that the bot touched roughly a thousand retailer sites and, at its peak, fired on the order of a million-plus balance-check requests per hour. We are repeating their reported figures rather than inventing our own, because the point does not need embellishment. Even taken conservatively, that is a scale no human attacker approaches and no manual review catches in time.

The payoff for the attacker is simple. A gift card number with a confirmed live balance is as good as cash and far more anonymous. Once you know a card is real and loaded, you can drain it at checkout somewhere, or sell the working number on a secondary market to someone who will. The victim is often a stranger whose card had not even been handed to its recipient yet. They find out when the balance is already gone, and there is frequently no account and no name attached to appeal to.

What made GiftGhostBot a wake-up call was not novelty. Number enumeration against a public endpoint is an old idea. It was the demonstration that gift card systems, treated as a quiet backwater of retail, were sitting on an endpoint that answered attacker questions all day with no friction at all.

What a balance check looks like up close

Most people keep a few cards in a drawer for the obvious reason: they were bought, forgotten, and nobody remembers what is left on them. Pull a mid-size retail card, go to the brand’s site to check it, and the flow is almost aggressively simple. A box for the long number, a box for the PIN under a scratch-off panel, a button. Type it in and the balance comes back in under a second.

Now the thing most people never think to try. Enter the same card number again, but change the last few digits to something made up, leave the PIN box filled with the real PIN, and hit the button. The site reports, politely, that the combination is not valid. A common next move is to change the PIN instead and keep a plausible-looking number. Not valid again. Good. That is the system working. The PIN is the wall the guessing keeps hitting.

What should stick with anyone who runs that little experiment is how close it gets, in about ninety seconds, to the entire GiftGhostBot playbook from a kitchen table. No hacker required. Just a card and a browser. The only thing standing between idle curiosity and a real attack is that this particular retailer demands the PIN, and there is only one real PIN on hand to offer. On a card where the number alone unlocks the balance, that same ninety seconds would be the opening move of something much uglier, run by a script instead of a bored person.

Why a PIN changes the math

A PIN sounds like a small thing, four or six extra digits scratched off a silver panel. It is the single most important defense a gift card program has, and the reason is arithmetic. When the card number is the only secret, an attacker only has to find a valid number. When a PIN is required too, every candidate number now needs a matching candidate PIN, and the attacker has to guess both at once.

Think of it as a padlock gaining a second dial. One dial with a thousand positions takes at most a thousand tries. Add a second dial with a thousand positions and you are not at two thousand tries, you are at a million, because every setting of the first dial has to be tested against every setting of the second. A required PIN does that to the guessing space. It takes an attack that was merely tedious and makes it hopeless at any practical speed, especially once rate limiting is added on top.

This is why we tell people the PIN panel is not decoration. A card whose balance can be read with the number alone is one convenient endpoint away from GiftGhostBot. A card that demands number plus PIN forces the bot to multiply its workload by the full size of the PIN space, and a bot that has to try a million combinations to find one live card is a bot that gives up and goes elsewhere.

How retailers fight back

A PIN is the foundation, but it is not the whole wall. The GiftGhostBot episode pushed retailers to layer on defenses that target the thing that actually makes the attack work, which is speed and volume from a single source. Rate limiting is the first and bluntest tool: cap how many balance checks a given visitor or network can make in a window, and the million-requests-an-hour firehose becomes a trickle.

Then there is friction that is cheap for a human and expensive for a bot. A CAPTCHA on the balance-check form, challenged only when traffic looks suspicious, stops a naive script cold. Anomaly detection watches for the tells of enumeration: a flood of checks against numbers that are mostly invalid, requests marching through a numeric range, traffic spikes from data-center address blocks that no normal shopper uses. When the pattern lights up, the system can slow it, challenge it, or cut it off.

The most direct fix is to remove the oracle entirely. Some retailers took the public balance check off the open web and moved it behind a login, or behind the physical card plus its PIN, so there is no anonymous page left to interrogate. It is slightly less convenient for the honest shopper and dramatically less useful to the attacker. We think that is a trade most programs should be willing to make, and more of them have since 2017.

What this means if you are just buying a card

You are not going to re-engineer a retailer’s balance-check page, so here is the part that is actually in your hands. Do not post a card number anywhere public, and that includes the obvious trophy photo of a gift you received. A clear shot of the front, and worse the scratched-off PIN, is a working card number handed to anyone running the GiftGhostBot playbook. Treat the number like a password, because functionally it is one.

Register the card if the retailer lets you, and spend it reasonably soon. A balance sitting untouched for months is a balance a bot has months to find and drain. A card you register to an account, or simply use within a week or two, spends most of its life either protected or already gone, which is exactly where you want it. Speed is your friend here in the same way it is the attacker’s.

And buy from sources that treat the number as a secret from the start. When we sell a digital eGift card, the code is delivered to you and only you, not left exposed on a page a script can scrape. That is the model we stand behind on the brands we carry, including Target, Sephora, Ulta Beauty, Old Navy, Roblox, Twitch, Razer Gold, Uber Eats, Panera Bread, and Subway. A card is only as safe as the way it reaches you, and the quiet, boring, direct handoff is the safe one.

None of this requires paranoia. It requires treating a gift card like what it is: a bearer instrument that happens to look like a plastic rectangle. The thief does not need your identity. They need your number. Guard the number and most of the GiftGhostBot problem never touches you.

Frequently asked questions

Can a gift card really be brute-forced?

Yes, within limits. We can confirm it is a real attack because it happened: a gift card number is long but predictable enough that an automated bot can guess valid ones and confirm them against a retailer’s balance-check page. A required PIN is what makes this impractical.

What was GiftGhostBot?

GiftGhostBot was an automated attack disclosed in 2017 by the security firm Distil Networks. It bombarded the gift card balance-check pages of many retailer websites with guessed card numbers, looking for cards that came back with a live balance it could drain or resell.

Why is the balance-check page the weak point?

Because it answers a yes-or-no question for anyone, with no purchase and often no PIN. We think of it as an oracle: feed it a guessed number and it tells the attacker whether that number is a real, funded card, which is all a bot needs to find money.

Does a PIN actually stop this?

A PIN is the strongest single defense. When a card requires both a number and a PIN, the attacker has to guess both together, which multiplies the number of attempts needed enormously and makes the attack impractical at any realistic speed.

Should I take a photo of my new gift card?

No. A photo of the card front, and especially the scratched-off PIN, is a working credential anyone can use. We tell readers to treat the number like a password and never post it publicly, no matter how nice the gift looks.

Is it safer to use a gift card quickly?

Yes. A balance that sits untouched for months gives an attacker months to find and drain it. Registering the card to an account or spending it within a week or two keeps it either protected or already used, which is where you want it.

Are digital gift cards safer than physical ones?

They can be, when the code is delivered privately to the buyer rather than printed on a page a script can scrape. The security depends on how the number reaches you, so we favor direct, private delivery over any public exposure of the code.

How do retailers detect an attack like this now?

They combine rate limiting, CAPTCHAs triggered by suspicious traffic, and anomaly detection that flags floods of mostly-invalid checks or requests marching through a numeric range. Some have removed the public balance check entirely and put it behind a login.

If my card gets drained, can I get the money back?

Often it is difficult, because many gift cards carry no account or name and are treated like cash. We recommend registering cards where possible and reporting a drained balance to the retailer promptly, and you can read the FTC’s consumer guidance on gift card problems.

The short version

The short version: a gift card number is long but not random, and the public balance-check page will happily confirm an attacker’s guesses all day. That is what GiftGhostBot exploited in 2017, grinding through retailer balance pages to find live cards to drain. The fix that matters most is a required PIN, which forces a bot to guess number and PIN together and blows the math up past the point of being worth it. For you, it comes down to three habits: never post a card number or PIN, register and use your cards promptly, and buy from somewhere that delivers the code privately instead of leaving it exposed. Guard the number, let the PIN wall do its job, and that is the whole fight.

References