Detection rules › Sublime MQL

DLP: France Debit Card Number

Severity
high
Type
dlp
Source
github.com/sublime-security/sublime-rules

Detects messages containing debit card numbers.

Event coverage

Rule body MQL

type.outbound
and any(attachments,
        (
          .file_extension in~ $file_extensions_common_archives
          or .file_extension in~ ('.csv', '.txt', '.xlsx', '.xls')
        )
        and any(file.explode(.),
                regex.contains(.scan.ocr.raw, '\b(?:\d{4}[\s\-]?){3}\d{1,7}\b')
        )
)
and (
  strings.icontains(sender.email.domain.tld, "fr")
  or strings.icontains(body.current_thread.text, "france")
)

Detection logic

Scope: outbound message.

Detects messages containing debit card numbers.

  1. outbound message
  2. any of attachments where all hold:
    • any of:
      • .file_extension in $file_extensions_common_archives
      • .file_extension in ('.csv', '.txt', '.xlsx', '.xls')
    • any of file.explode(.) where:
      • .scan.ocr.raw matches '\\b(?:\\d{4}[\\s\\-]?){3}\\d{1,7}\\b'
  3. any of:
    • sender.email.domain.tld contains 'fr'
    • body.current_thread.text contains 'france'

Inspects: attachments[].file_extension, body.current_thread.text, sender.email.domain.tld, type.outbound. Sensors: file.explode, regex.contains, strings.icontains. Reference lists: $file_extensions_common_archives.

Indicators matched (7)

FieldMatchValue
attachments[].file_extensionmember.csv
attachments[].file_extensionmember.txt
attachments[].file_extensionmember.xlsx
attachments[].file_extensionmember.xls
regex.containsregex\b(?:\d{4}[\s\-]?){3}\d{1,7}\b
strings.icontainssubstringfr
strings.icontainssubstringfrance