pattern matching
Checking whether text or data fits a described shape, such as an email address or a log line, and pulling out the parts that match.
In more detail
Regular expressions are the most common way to describe such patterns in scripts and tools. In security work, pattern matching parses log lines, detects sensitive data such as card numbers, and powers detection rules. A pattern that is too loose raises false alarms, and one that is too strict misses real cases.
Example
SSHD = re.compile(r"(Accepted|Failed) (\w+) for (?:invalid user )?(\S+) from (\S+)")Related terms
- regular expression — A pattern language for matching text, where characters such as ., *, ^ and $ have special meanings.
- false positive — A check result that claims something is true when it is not, such as a test passing on broken code or a tool flagging correct code.
- false negative — A result that wrongly says "no" when the true answer is "yes".
- DLP — Data loss prevention: tools that watch for sensitive data leaving an organisation, such as customer records sent to a personal address.
Taught in
- CIA Triad, Non-Repudiation & Parkerian Hexad — Cybersecurity Fundamentals, GRC & Cryptography
- Regulatory Compliance: SOC 2, HIPAA, GDPR & PCI-DSS — Cybersecurity Fundamentals, GRC & Cryptography
- Asymmetric Cryptography: RSA, ECC & Diffie-Hellman — Cybersecurity Fundamentals, GRC & Cryptography
- Data Classification Schemes & Sensitivity Labeling — Cybersecurity Fundamentals, GRC & Cryptography
- Data Loss Prevention & Egress Monitoring — Cybersecurity Fundamentals, GRC & Cryptography