security · 2025-02-24 · 7 min read
BIN attacks: why 'valid-looking' numbers are a fraud vector
Criminals generate thousands of Luhn-valid numbers from a real issuer prefix and probe merchants in bulk. Understanding this explains most modern checkout defences.

Because the check digit is computable, an attacker who knows a real IIN can mass-produce candidate numbers — every possible account identifier, each finished with a correct Luhn digit — and probe a merchant with tiny authorizations to discover which ones belong to live cards. The industry calls this a BIN attack, card testing or enumeration.
What the attack looks like from the merchant side
- Hundreds or thousands of small authorizations (often $0–$2) in minutes.
- Sequential or near-sequential card numbers sharing a prefix.
- Rotating expiry dates and CVVs against the same PAN.
- Traffic from scripted clients, data-centre IPs or fresh accounts.
The merchant pays authorization fees for every attempt and risks being flagged by the network; the cardholder gets an unexplained pending charge. Visa's card-testing best practices and Stripe's card testing guide describe the pattern in detail.
Defences that actually work
- Velocity limits per IP, device fingerprint, account and BIN — the single most effective control.
- Requiring the CVV and address verification (AVS) so a guessed PAN alone is useless.
- Step-up 3-D Secure challenges on anomalous traffic.
- CAPTCHA or proof-of-work on the payment form after N failures.
- Monitoring the authorization-decline ratio in real time and auto-blocking spikes.
- Never exposing a 'validate card' endpoint that returns issuer responses without a purchase.
What this site does differently
The generator at the top of this page only uses sandbox IINs published by payment providers. The output is syntactically valid but maps to no account, which keeps the demonstration safe — see generating mock numbers responsibly.

Keywords: BIN attack, card testing fraud, carding, enumeration attack, velocity checks, fraud prevention, Luhn valid numbers
Frequently asked questions
Is generating Luhn-valid numbers illegal?
Generating numbers is not itself illegal, but using them against real issuer ranges to probe merchants is fraud. Responsible tools restrict themselves to published test ranges.
How do merchants detect card testing?
By watching for bursts of small authorizations, sequential numbers sharing a BIN, and abnormal decline ratios, then applying velocity limits and 3-D Secure.