(Please keep mail on-list)
Laurent S. wrote:
On Tuesday, February 8th, 2022 at 16:41, Kris Deugau <[email protected]> wrote:
I have a longish list of rule groups similar to below for different
extended UTF8 ASCII-lookalike characters and words. Some are derived
from rules discussed on this list within the past year or so.
header __SUSP_NAME_CHAR_01 From:name =~ /(?:\xd0[\xa0-\xbf])/
tflags __SUSP_NAME_CHAR_01 multiple maxhits 10
header __SUSP_NAME_CHAR_02 From:name =~
/(?:\xef\xbc[\x80-\xbf]|\xef\xbd[\x80-\xa0])/
tflags __SUSP_NAME_CHAR_02 multiple maxhits 10
meta __SUSP_NAME_CHAR __SUSP_NAME_CHAR_01 + __SUSP_NAME_CHAR_02
meta SUSP_NAME_CHAR_5 __SUSP_NAME_CHAR >= 5
describe SUSP_NAME_CHAR_5 5 or more lookalike characters in the
From: name
score SUSP_NAME_CHAR_5 1.5
meta SUSP_NAME_CHAR_10 __SUSP_NAME_CHAR >= 10
describe SUSP_NAME_CHAR_10 10 or more lookalike characters in the
From: name
score SUSP_NAME_CHAR_10 1.75
I've used this tool:
https://www.utf8-chartable.de/
with a bit of effort to take an example character and locate the full
a-z list of entries for these rules. (Convert individual characters to
hex, then flip pages until you've found the fakes. There are many groups.)
Single characters are trickier; depending on context I've added rules
for individual lookalike characters, or whole words with mixed variants
(and an exclusion for pure ASCII) as I see new runs of FNs.
-kgd
Out of curiosity, I've tested it with a replace_tag rule (/<P><O><S><T>/)
without luck. Shouldn't those UTF8 range be added to the ReplaceTags plugin?
Probably. However, the rules as above and the other similar ones I've
set up locally are detecting the abstracted use of certain subsets of
these variant characters seen in local FNs (often different variant sets
for different cases, FN corpus depending), not variations of a
particular character as used for ReplaceTags.
To put it another way, I explicitly do not care about *what* these
characters are spelling out, just the fact that they're present at all
in certain places where I consider them to be inherently invalid. I
also *don't* want to match the ASCII version - ReplaceTags substitutions
usually include the base ASCII character, so your final rule has to have
some exclusion component on its own, eg:
/(?!Post)<P><O><S><T>/
or
/(?!P)<P><(?!o)<O>(?!s)<S>(?!t)<T>/
etc.
TBH for specific phishing cases like yours, I would tend to just
copy-paste the spoofed From: name into a rule directly - text editor
depending, this should work fine. Perl will happily match the literal
pasted character or the hex sequence equally well unless your editor
mangles the character.
-kgd