RESOURCE MONITOR
CPU23%
MEMORY67%
DISK I/O45%
NETWORK89%
SYSTEM MONITOR
|
SECURITY LOG
[14:23:45]INFOUser authentication successful
[14:23:47]WARNSuspicious network activity detected
[14:23:50]INFOFirewall rule updated
NETWORK SCAN
Scanning ports: 22, 80, 443, 3389
192.168.1.100 - OPEN
192.168.1.101 - FILTERED
Scan completed: 4/4 ports
REGEX PATTERN ARSENAL

PATTERN LIBRARY

Combat-tested regex patterns for cybersecurity operations, digital forensics, and threat hunting.COPY, DEPLOY, DOMINATE

20

PATTERNS

5

CATEGORIES

COMBINATIONS

Network & Security

IPv4 Address

Matches IPv4 addresses in logs and network data

\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b

192.168.1.100, 10.0.0.1

Network traffic analysis, firewall logs

MAC Address

Matches MAC addresses in various formats

([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})

AA:BB:CC:DD:EE:FF, aa-bb-cc-dd-ee-ff

Network device identification, ARP tables

URL/Domain

Matches HTTP/HTTPS URLs and domains

https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)

https://example.com/path?param=value

Web traffic analysis, malicious URL detection

Port Numbers

Matches port numbers in network addresses

:\d{1,5}\b

:80, :443, :8080

Service discovery, port scanning logs

File & System

File Paths (Windows)

Matches Windows file paths

[A-Za-z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*

C:\Users\Admin\Documents\file.txt

Log analysis, malware file tracking

File Paths (Unix)

Matches Unix/Linux file paths

\/(?:[^\s\/]+\/)*[^\s\/]*

/home/user/documents/file.txt

Linux log analysis, file system monitoring

Hash Values (MD5/SHA)

Matches MD5 (32) or SHA-256 (64) hash values

\b[a-fA-F0-9]{32,64}\b

d41d8cd98f00b204e9800998ecf8427e

Malware signatures, file integrity checks

Registry Keys

Matches Windows registry keys

HKEY_[A-Z_]+\\[^\n\r]*

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft

Registry forensics, malware persistence analysis

Authentication & Data

Email Address

Matches email addresses

[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
User identification, phishing analysis

Credit Card Numbers

Matches credit card numbers with separators

\b(?:\d[ -]*?){13,16}\b

4111 1111 1111 1111, 5555-5555-5555-4444

PCI compliance, data leak detection

Social Security Numbers

Matches US Social Security Numbers

\b\d{3}-\d{2}-\d{4}\b

123-45-6789

PII detection, compliance monitoring

Phone Numbers

Matches US phone numbers in common formats

\(\d{3}\)\s?\d{3}-\d{4}|\d{3}-\d{3}-\d{4}

(555) 123-4567, 555-123-4567

Contact information extraction

Log Analysis

Timestamp (ISO 8601)

Matches ISO 8601 timestamp formats

\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(?:\.\d{3})?(?:Z|[+-]\d{2}:\d{2})?

2024-01-15T10:30:45.123Z

Log parsing, timeline analysis

HTTP Status Codes

Matches HTTP status codes

\b[1-5]\d{2}\b

200, 404, 500

Web server log analysis, error tracking

Syslog Priority

Matches syslog priority values

<\d{1,3}>

<134>, <86>

Syslog parsing, message classification

Process ID (PID)

Matches process IDs in logs

\bPID[:\s]*(\d+)

PID: 1234, PID 5678

Process tracking, incident correlation

Threat Intelligence

Bitcoin Address

Matches Bitcoin wallet addresses

\b[13][a-km-zA-HJ-NP-Z1-9]{25,34}\b

1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

Cryptocurrency tracking, ransomware analysis

CVE Identifiers

Matches Common Vulnerabilities and Exposures IDs

CVE-\d{4}-\d{4,}

CVE-2021-44228, CVE-2023-12345

Vulnerability management, threat intelligence

Base64 Data

Matches Base64 encoded strings

(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})

SGVsbG8gV29ybGQ=

Encoded payload detection, data exfiltration

Suspicious PowerShell

Matches suspicious PowerShell commands

(Invoke-Expression|IEX|DownloadString|Invoke-WebRequest|powershell\.exe.*-enc)

powershell.exe -enc SGVsbG8=

Malware detection, command injection analysis

PATTERN TESTER

Test regex patterns against sample data before deploying in production

LIVE PATTERN TESTING

Copy any pattern above and test it against your data

OPERATIONAL SECURITY NOTICE

These regex patterns are provided for legitimate cybersecurity, forensics, and system administration purposes. Always ensure compliance with your organization's policies and applicable laws when processing sensitive data.

BEST PRACTICES:

  • • Test patterns in isolated environments before production use
  • • Be aware of performance implications with complex patterns
  • • Consider privacy implications when matching PII data
  • • Document pattern usage for audit and compliance purposes
  • • Regular expressions can be CPU-intensive - optimize accordingly