Splunk Enterprise

Trying to run a search in my environment to see what logs/events have credit cards in them. Any help? (PCI requirements)

Jewatson17
Path Finder

Need a query to find credit card numbers in events. Please help. I have run queries but they don't seem to be right.

This one is for Master Card, but I need one for OVERALL credit card numbers. this one doesnt even work btw

index=<index> | rex field=_raw "^4[0-9]{12}(?:[0-9]{3})?$(?<credit_card>)" | stats count by credit_card 
Tags (1)
0 Karma

MuS
Legend

Hi Jewatson17,

you can use this regex to match all possible credit cards:

| rex "(?<possible_credit_card_number>\d{12,19})"

According to https://en.wikipedia.org/wiki/Payment_card_number#Issuer_identification_number_(IIN) the IIN ranges have a possible length of 12 - 19 digits.

Hope this helps ...

cheers, MuS

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...