Regex for Fun and Profit
summary
Covers PCRE syntax and real-world tradeoffs with concrete demos: using PCRE patterns to cut a 2M-line HTTP log to ~250 candidate SQL injections, writing YARA regex strings that find ~1,800 JavaScript XOR decryptors on VirusTotal, and a repo scan that locates 31 JS files, extracts 77 unique regex and flags one REDoS-vulnerable pattern. Explains backtracking math behind 34‑minute StackOverflow and 27‑minute Cloudflare outages, lists test/debug tools (regex101, RegExr, Reax.ripp, Redos Hunter) and mitigation steps.
AI-written summary · about
chapters (17)
- 0:00Introduction and background
- 1:25What are regular expressions
- 3:53Regex syntax basics
- 8:10Advanced regex features
- 15:07Tools for regex testing
- 16:13Matching IP addresses
- 19:46Regex efficiency and AI
- 21:12Common regex pitfalls
- 23:18Real-world regex failures
- 26:50Regex denial of service
- 32:11Preventing redos attacks
- 35:40Practical cybersecurity uses
- 38:29Regex in scripts and Yara
- 41:41Demo: SQL injection detection
- 42:28Demo: Malware detection with Yara
- 48:57Demo: Redos vulnerability scan
- 53:12Resources and closing
