Skip to content

Regex For Hackers

Adam LangleyBen Sadeghipour

Demonstrates practical regular expression techniques for bug bounty hunters to uncover hidden API endpoints, bypass filters, and extract secrets from code repositories.

Summary

Practical Regex Tradecraft for Security Researchers

Automated vulnerability scanners often miss nuanced security flaws and hidden endpoints that manual analysis with tailored regular expressions can readily uncover. Mastering regex patterns allows researchers to accelerate recon and target high-value assets effectively.

Bypassing Filters and Validations

Security controls like postMessage origins and CORS validation routines frequently contain flawed regular expressions. Subtle flaws in pattern boundaries, unescaped characters, or weak regex anchors allow attackers to bypass intended origin restrictions.

Uncovering Hidden API Endpoints and Secrets

Analyzing client-side JavaScript bundles and GitHub repositories with targeted regex patterns extracts sensitive endpoints, hidden routes, and embedded API keys. Crafting precise search queries cuts through minified code to identify undocumented functionality.

Exploiting Application Logic and Redirects

Understanding parser behavior enables researchers to transform seemingly benign open redirects into full account takeovers and spot Server-Side Request Forgery (SSRF) attack vectors that automated tools overlook.

Related talks

Recon Village·16 min

  • DEF CON
  • Recon
  • Date: Aug 2021
  • Location: Las Vegas

Tushar Verma

Tushar Verma breaks down a structured reconnaissance methodology for bug bounty hunters, covering subdomain enumeration, content discovery, and asset tracking.

bug-bountyreconsubdomain-enumeration+2