TOC & Recently Viewed

Recently Viewed Topics

Search for AMEX Credit Card Numbers

Following is a simple .audit file that looks for a list of file types that contain a properly formatted AMEX credit card number.



file_extension: 'pdf', 'doc', 'xls', 'xlsx', 'xlsm', 'xlsb', 'xml', 'xltx', 'xltm', 'docx', 'docm', 'dotx', 'dot', 'txt'

exclude_paths: '/root/unix_file_content_test_files/non'

regex: ([^0-9-]|^)([0-9]{3}-[0-9]{2}-[0-9]{4})([^0-9-]|$)

regex_replace: \3

only_show: 4

expect: 'American Express', 'CCAX', 'amex', 'credit', 'AMEX', 'CCN'

max_size: 51200


The output we get this time is as follows:

No files were found to be in violation.

We were able to “pass” the audit because none of the files we audited contained an AMEX credit card number.

Copyright © 2019 Tenable, Inc. All rights reserved. Tenable,, Tenable Network Security, Nessus, SecurityCenter, SecurityCenter Continuous View and Log Correlation Engine are registered trademarks of Tenable, Inc.., Lumin, Assure, and the Cyber Exposure Company are trademarks of Tenable, Inc. All other products or services are trademarks of their respective owners.