Card testing log analysis is the practice of reviewing payment, gateway, and web server logs to find the small authorization attempts attackers use to check whether stolen card numbers are still active. Done well, it turns a wall of declined transactions into a named pattern, complete with the IP ranges, endpoints, and sessions behind it. Done badly, it produces a report nobody can act on.
card testing log analysis tools
Why card testing is a log problem, not just a fraud problem
Every test attempt leaves a record: an authorization request, a response code, a timestamp, a source address. Volume per card is small and volume across cards is large, so the signal lives in grouped counts rather than in any single transaction. That is why a raw transaction list can look ordinary while the same data grouped by IP looks like an attack.
Fields to collect before you start
You cannot analyze what you never captured. Confirm that your gateway, application, and edge logs all carry the fields below, and that they can be joined on a shared request or session identifier.
card testing log analysis tools
- Timestamp with timezone and a consistent format
- Source IP, autonomous system number, and approximate location
- User agent and device or browser fingerprint
- Endpoint or URI hit by the request
- Card BIN and last four digits, stored in a compliant form
- Authorization amount and currency
- Gateway response code and decline reason
- AVS and CVV check results, where your processor returns them
- Account, email, phone, and session identifiers
Keep full card numbers out of plain-text logs. Use tokens, hashes, or BIN plus last four so the log stays useful without turning into a liability.
Log signatures that separate card testing from ordinary decline noise
- Many authorization attempts from one IP or one subnet inside a short window
- The same card BIN repeated across many accounts or email addresses
- Sequential or near-sequential card numbers hitting one endpoint
- Low-value attempts, often under a dollar, which reduce the chance of a hold
- A jump in "do not honor" or "invalid card" responses from a single source
- Requests that skip the checkout flow and post straight to the payment endpoint
- Missing or mismatched device fingerprints across a burst of attempts
- User agents that no real customer in your traffic ever sends
Baseline your traffic first
Anomaly detection needs a normal to compare against. Pull thirty to ninety days of authorization data and calculate your typical decline rate, attempts per IP per hour, and attempts per card per day. Once you know those numbers, a spike becomes visible. Without a baseline you will either miss the attack or flag every busy shopping day.
Queries and metrics worth tracking
- Attempts per source IP in five-minute and one-hour buckets
- Distinct card numbers per IP and per account
- Decline rate by endpoint, split by response code
- Share of attempts under one dollar
- New accounts created in the same window as the attempts
- BIN concentration: top BINs by attempt count and by decline count
Compare the attack window against the same hour one week earlier. Campaigns often land in your quietest hours, which is one of the easier signals to explain to a team that does not read logs.
What to do once you confirm an attack
- Preserve the raw logs and save the query used, so the finding can be reproduced.
- Block or rate limit at the edge with the narrowest rule that stops the traffic.
- Add a challenge for the affected endpoint rather than the whole site.
- Notify your processor and acquirer. Some will adjust monitoring on their side.
- Review affected accounts and void or refund what the attacker pushed through.
- Watch for the same source returning under a new address range in the following days.
Mistakes that hide the pattern
- Logging only successful transactions, which removes the declined attempts that carry the signal
- Retention windows shorter than the attack cycle, so early probes are already gone
- Rolling up data so far that per-IP detail disappears
- Ignoring web server and WAF logs, which show the reconnaissance before the payment attempts
- Treating every decline spike as an outage instead of checking who caused it
A short weekly review of card testing metrics costs little and catches most campaigns while they are still small. Your logs already contain the answer. The work is asking the grouped question that surfaces it.