Technical Tip: How DLP utilizes Luhn Verification for Credit Card Check along with hyperscan matching engine
| Description | The article describes how DLP analyses a credit card number using Luhn Verification along with hyperscan matching engine. |
| Scope | FortiGate. |
| Solution | It has been seen that when the DLP profile of type 'regex' is not blocking upload of sample credit card numbers kept in a file like .txt, .pdf, etc to a cloud drive like file.io.
Points to be noted:
The regex expression ^3[47][0-9]{13}$ is used for credit card pattern validation. By default, the new Hyperscan matching engine matches anchor patterns (^ and $) only at the start and end of the file buffer. Unlike most regex engines and legacy DLP, it does not consider newlines as boundaries for anchoring.
config dlp dictionary If matching the start/end of the line is not a concern, it is recommended to use word boundaries as they can be more consistently relied upon for matching: config dlp dictionary edit "<name_of_dictionary>" set uuid a8747526-11ff-51ee-69b6-659911a2768b |
