PaulDotCom mailing list archives

Re: RegEx and Grep for PII and Pentest Useful Info?


From: Xavier Mertens <xavier () rootshell be>
Date: Tue, 26 Jun 2012 15:38:11 +0200 (CEST)

Hello Adrian,

I'm using the following regex to catch the same data as you via pastemon:

VISA:
4[0-9]{12}(?:[0-9]{3})?

MasterCard:
5[1-5][0-9]{14}

DinersClub:
3(?:0[0-5]|[68][0-9])[0-9]{11}

US SSN:
(?!000)(?!666)([0-6]\d{2}|7[0-2][0-9]|73[0-3]|7[5-6][0-9]|77[0-1]))\-((?!00)\d{2})\-((?!0000)\d{4})

Have a look at OpenDLP Wiki:
http://code.google.com/p/opendlp/wiki/RegularExpressions

/x

--
Can't sleep, hackers will eat me!
PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x42D006FD51AD7F2C

On Tue, 26 Jun 2012, Adrian Crenshaw wrote:

Hi all,
    I'm looking for good regular expressions to find PII and useful info
for a pentest. I've been using things like:

password|^(\d{3}-\d{2}-\d{4})|(\d{3}\d{2}\d{4})$

to search for passwords in notes and source code, as well as SSN#s. I'd
like to throw credit cards in there, but none of the regex I've seen for
that seem to work in grepwin. I want to "or" them all together to do it in
one sweep. Any other good strings to add?

Thanks,
Adrian


_______________________________________________
Pauldotcom mailing list
Pauldotcom () mail pauldotcom com
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com


Current thread: