SA Bugzilla – Bug 3125
[RFE] obfuscation character classes for rules
Last modified: 2005-01-20 16:30:05 UTC
How abput custom character classes via precompiled Perl regexps: In Perl you can do something like this (non-exhaustive list of obfuscations): $a = qr/[aA4@]/ $e = qr/[eE3]/ $i = qr/[iI1|]/ $o = qr/[oO0]/ $W = qr/[\W_]?/ Example rule: body FIORICET /\bF${W}${i}${W}${o}${W}r${W}${i}${W}c${W}${e}${W}t${W}\b/i body MORTGAGE /\bm${W}${o}${W}r${W}t${W}g${W}${a}${W}g${W}${e}${W}\b/i Test: perl -e '$_="f_io:r|cet";$e=qr/[eE3]/;$i=qr/[iI|]/;$o=qr/[oO0]/;$W=qr/[\W_]?/; print "match\n" if (/\bF${W}${i}${W}${o}${W}r${W}${i}${W}c${W}${e}${W}t\b/i)' It could be handy if these obfuscation classes would be available for all regexp rules (or at least subject, body and rawbody). Alternatively let users define their own character classes via rules. Though the names/syntax should be rather short to make it useful.
If somebody wants to do something with this, I've already done some similar legwork on this for my obfuscation rules generator (I use character classes but also regexp groupings for multi-byte/multi-character replacements including HTML entities). I've attached the latest version of the generator script; the character mappings start at line 137.
Created attachment 1814 [details] obfu.pl obfuscation rule generation script Character replacements start at line 137. The replacements are in hashes. The script uses the hashes to build character classes (later in the script, it actually outputs the character classes and regexp groupings) Hope this is useful...
Concerning obfusctaion through ASCII art: D |) M |\/| Y ][ I found this recently and they seem to be missing (in attachment 1814 [details]). The conversion code hash is rather hard to read with all those \ escaping hell.
more accuracy and performance bugs going to 3.1.0 milestone
*** This bug has been marked as a duplicate of 4094 ***