Skip to main content

Introduction

What is ReVeal?

ReVeal (PAN finder) is a command line tool designed to search for potential card numbers inside files, at any place inside those files.

It uses advanced algorithms to discard as many false positives as possible.

For security and compliance reasons, it is not recommended to store card numbers in clear, especially when going through certification processes like PCI/DSS. When we have many files and in particular log files, some valid card numbers can be present in files in clear form.

To perform a manual search using the usual tools may not be practical, because it is not always simple to detect a valid card number inside a file containing many other numbers. It is not enough to search for consecutive digits because we will end getting a large amount of numbers that don't represent a valid card number.

This tool works both in Windows and in Linux.

What makes ReVeal different?

The usual way to perform these searches are limited to finding strings made of digits of a certain length, and in some cases we can use regular expressions to limit this search a little. But searching for strings of digits of a given length does not guarantee most of the times that the values found correspond to valid card numbers.

ReVeal has the capacity of traversing directories and finding text files that can containg card numbers. It is possible to indicate file names or folders that we must ignore (for example places we know there will be no files that contain card numbers) in order to speed up the search.

For each file, a list of possible card numbers is created, which are just strings containing only digits of a given length. The, for each of these possible numbers, we apply some rules and filters, like the first digits corresponding to a known BIN number (we can define the list of known BINs) and also compare the calculated check digit (using the Luhn method) with the last digit of the number.

When we know false positives, we can create rules to exclude them from the findings.

We can also evaluate the context of the number searching for some key words to increase the confidence of considering the number a valid card one.

Usage modes

This tool can be used in three different ways:

  • With manual execution on the cli to perform a search and getting the results on screen
  • Like an interactive tool where we can use a Text User Interface (TUI) to navigate through the results
  • As part of a batch program in order to perform periodic searches, like in logs that are generated all the time