EKFiddle rules are regex-based detection patterns that scan website content, scripts, iframes, CSS, redirects, and response headers to identify malicious indicators. They detect threats including SocGholish, Parrot TDS, ClickFix payloads, fake browser updates, credit card skimmers, and other malware families.
Rules are applied against downloaded content in memory. The scanner decodes obfuscated JavaScript (hex, unicode, base64, string concatenation) before pattern matching to catch evasion attempts.
Each rule follows a tab-separated format:
[Type] TAB [Severity: Rule Name] TAB [Regex Pattern] TAB [Optional Comment]
Fields:
- Type: Detection category -
IP,URI,SourceCode,Headers, orHash - Severity: Optional prefix
High:,Med:, orLow:followed by rule name - Regex Pattern: Standard regex pattern (Python re syntax)
- Comment: Optional reference or description (not always present)
Rule Types:
IP- Matches IP addresses in URLs or contentURI- Matches URL paths and domainsSourceCode- Matches patterns in HTML, JavaScript, CSS contentHeaders- Matches patterns in HTTP response headersHash- Matches SHA-256 hash values in response body
Severity Levels:
High- High confidence malicious indicatorsMed- Medium confidence suspicious patternsLow- Low confidence monitoring patterns
SourceCode High: Parrot TDS (ZQXW) \bzqx[wx]\s*===\s*undefined\b
Detects Parrot TDS traffic distribution system by matching the characteristic zqxw === undefined check in JavaScript source code. High severity indicates confirmed malicious behavior.
URI High: Balada Injector (ET 20240405) beatifulllhistory\.com|bestresulttostart\.com|bestselllerservice\.com|clickandanalytics\.com|colorschemeas\.com|listwithstats\.com|dataofpages\.com|decentralappps\.com|flyspecialline\.com|getmygateway\.com|getsmallcount\.com|greenfastline\.com|gybritanalytsesystem\.com|lightsteper\.com|lineferaline\.com|linestoget\.com|playerofsunshine\.com|promsmotion\.com|selectchoise\.com|selectofmychoices\.com|specialcraftbox\.com|specialnewspaper\.com|specialtaskevents\.com|stablelightway\.com|startperfectsolutions\.com|statisticplatform\.com|statisticscripts\.com|statisticsong\.com|stratosbody\.com
Matches known malicious domains associated with Balada injector campaigns. URI type scans URL paths and domains extracted from content.
Headers High: Keitaro TDS Headers (?i)(?:KEITARO_|X-KEITARO-|K-REDIRECT|K-TARGET|K-LANDING)
Detects Keitaro TDS traffic distribution system by matching custom HTTP headers. Case-insensitive pattern flags TDS infrastructure indicators in response headers.
SourceCode High: ClickFix MSIEXEC URL msiexec\s*[\/\\]i\s*(https?:\/\/[^\s\"\'\<\>\)\]]+)
Extracts MSIEXEC commands with external URLs, indicating ClickFix social engineering campaigns that trick users into executing malicious installers. Captures the full URL for IOC extraction.
SourceCode High: Obfuscated malicious JS script (?:const)\s+_?0x[a-fA-F0-9]+\s*=\s*_?0x[a-fA-F0-9]+(?:\s*,\s*_?0x[a-fA-F0-9]+\s*=\s*_?0x[a-fA-F0-9]+){2,}
Detects hex-encoded variable obfuscation patterns common in malicious JavaScript. Matches multiple consecutive hex variable assignments using the _0x prefix pattern.
Rules are stored in tab-separated text files (typically CustomRegexes.txt or Regex_Rules.txt). Comments start with # or ##. Empty lines are ignored. The scanner auto-detects rule files in the same directory or accepts a custom path via -r flag.
Rules are processed sequentially. Multiple matches per rule are tracked and reported with context including matched content, source location, and severity level.