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.

Thousands of valid-looking numbers tested in bulk.
Thousands of valid-looking numbers tested in bulk. — © Pachon in Motion · Pexels

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.
Velocity checks and alerts are the first line of defence.
Velocity checks and alerts are the first line of defence.

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.

On this site

External references

Related articles

هجمات BIN: لماذا الأرقام «سليمة الشكل» ثغرة احتيال — النسخة العربية

يولّد المحتالون آلاف الأرقام الصحيحة بحسب لون من بادئة مُصدِر حقيقية ويختبرون المتاجر بالجملة. فهم هذا يفسّر معظم دفاعات صفحات الدفع الحديثة.

لأن خانة التحقق قابلة للحساب، يستطيع مهاجم يعرف IIN حقيقيًا إنتاج أرقام مرشّحة بالجملة — كل معرّف حساب ممكن، مع خانة لون صحيحة في نهايته — ثم فحص متجر بتفويضات صغيرة لاكتشاف أيّها يخص بطاقات حيّة. تسمّي الصناعة هذا هجمة BIN أو اختبار البطاقات أو التعداد.

كيف تبدو الهجمة من جهة التاجر

  • مئات أو آلاف التفويضات الصغيرة (غالبًا 0–2 دولار) في دقائق.
  • أرقام بطاقات متسلسلة أو شبه متسلسلة تتشارك بادئة.
  • تدوير تواريخ الانتهاء ورموز CVV على الرقم نفسه.
  • حركة من عملاء مبرمجة أو عناوين IP لمراكز بيانات أو حسابات جديدة.

يدفع التاجر رسوم تفويض عن كل محاولة ويخاطر بأن تضع الشبكة علامة عليه؛ ويرى حامل البطاقة مبلغًا معلّقًا بلا تفسير. أفضل ممارسات فيزا لاختبار البطاقات ودليل Stripe يصفان النمط بالتفصيل.

الدفاعات التي تعمل فعلًا

  • حدود السرعة لكل IP وبصمة جهاز وحساب وBIN — الضابط الأكثر فاعلية على الإطلاق.
  • اشتراط CVV والتحقق من العنوان (AVS) كي يكون الرقم المخمَّن وحده عديم الفائدة.
  • تحدّيات 3-D Secure التصعيدية على الحركة الشاذة.
  • CAPTCHA أو إثبات عمل على نموذج الدفع بعد N إخفاقات.
  • مراقبة نسبة الرفض إلى التفويض لحظيًا والحظر التلقائي عند القفزات.
  • عدم كشف نقطة «تحقق من البطاقة» تعيد ردود المُصدِر دون عملية شراء.

ما الذي يفعله هذا الموقع بشكل مختلف

المولّد في أعلى هذه الصفحة لا يستخدم إلا نطاقات الاختبار المنشورة لدى مزوّدي الدفع. الناتج صحيح نحويًا لكنه لا يقابل أي حساب، وهذا ما يُبقي العرض آمنًا — انظر توليد الأرقام الوهمية بمسؤولية.

أسئلة شائعة

هل توليد أرقام صحيحة بحسب لون غير قانوني؟

توليد الأرقام بحد ذاته ليس جريمة، لكن استخدامها على نطاقات مُصدِرين حقيقية لفحص المتاجر احتيال. الأدوات المسؤولة تحصر نفسها في نطاقات الاختبار المنشورة.

كيف يكتشف التجار اختبار البطاقات؟

بمراقبة دفعات التفويضات الصغيرة والأرقام المتسلسلة المشتركة في BIN ونسب الرفض الشاذة، ثم تطبيق حدود السرعة و3-D Secure.

Educational content — not legal or financial advice. Open the interactive Check Digit Lab →