Commit Graph

130 Commits

Author SHA1 Message Date
Vsevolod Stakhov
c23d728d75 [Minor] Fix rule 2021-11-30 13:51:54 +00:00
Vsevolod Stakhov
c1b3e4821a [Rules] Remove ancient and inefficient rules 2021-11-29 17:26:27 +00:00
Vsevolod Stakhov
13dd78c687 [Rules] Fix old rules to stop global functions usage 2021-11-29 16:56:13 +00:00
Sebastian Lipponer
44d83209e2 [Minor] Regexp: Extend upstream spam filter regexp 2021-08-21 11:43:30 +02:00
Anton Yuzhaninov
0248bd6615 [Rules] Micro-optimize X_PHP_EVAL
Remove /i flag from regexp string "eval()'d code" is always in
lower case. While here use long string format for readability.
2021-08-05 15:54:20 +01:00
Anton Yuzhaninov
a4cfe5e270 [Rules] Extend OLD_X_MAILER
Add more old iPhone/iPad Mail versions to the regexp.
2021-05-22 16:47:38 +01:00
Anton Yuzhaninov
7c00342f85 [Rules] Extend FORGED_X_MAILER
Match in FORGED_X_MAILER fake iPhone Mail header with a random string in
place of iOS build number, e. g. iPhone Mail (WKN0M)
2021-05-22 16:47:31 +01:00
Anton Yuzhaninov
b3d5173446 [Minor] Make HAS_PHPMAILER_SIG regexps more specific
Use stricter regexp to avoid false matches.
2021-04-27 16:53:22 +01:00
Vsevolod Stakhov
99c27fc7be [Rules] Reduce default weight for R_MISSING_CHARSET 2021-03-12 21:29:01 +00:00
Alexander Moisseev
4aebb2b5de
[Fix] Fix Mozilla Message-ID detection
The left part of the Mozilla Message-ID is a hexadecimal timestamp. The regexp was mistakenly limited to 2021-01-14.
2021-02-05 22:09:58 +03:00
Pavel Rochnyack
4ea3250be3 Fix typos in code comments 2020-12-23 10:45:33 +07:00
Vsevolod Stakhov
2ce745e592 [Minor] Fix missing comma 2020-12-22 16:02:36 +00:00
Anton Yuzhaninov
38d347e23e [Minor] Add rule for forged X-Mailer: Internet Mail Service 2020-12-22 14:16:12 +00:00
Anton Yuzhaninov
badadf5051 [Minor] Add {header} for header regexps 2020-12-22 13:29:20 +00:00
Anton Yuzhaninov
027453fe4a [Minor] Remove R_SAJDING and SUSPICIOUS_OPERA_10W_MSGID
These rules are no longer relevant.
2020-12-21 20:05:45 +00:00
Anton Yuzhaninov
689c49dd1a [Minor] Add FORGED_X_MAILER rule for X-Mailer used by spamboots 2020-12-21 18:40:41 +00:00
Anton Yuzhaninov
c31d5ddde3 [Minor] Update regexp for R_UNDISC_RCPT
Match more variations for undisclosed-recipients, but don't match when
it is used as a lame real name.
2020-12-14 19:31:22 +00:00
Anton Yuzhaninov
5d6b526c6b [Minor] Add rule for old MUA version
These versions are rarely used by real uses nowadays, but can be found
in spam.
2020-12-14 13:31:08 +00:00
Anton Yuzhaninov
a7aa9adc0c [Minor] Remove FAKE_REPLY_C and move FAKE_REPLY rule to regexp module
FAKE_REPLY_C rule no longer works because MUA it used are no longer used
(and ones which are used changed headers they add).  In theory one can
test all popular modern MUA and see which add only References, which
only In-Reply-To and which add both headers.  But it will be a lot of
work to maintain such rule up to date.  It still has a small number of
hits, but mostly because some spammers use old X-Mailer headers.  This
should be addressed separately.

While here re-create FAKE_REPLY as a regexp module rule - this way it
should be more efficient.
2020-12-12 19:30:46 +00:00
Anton Yuzhaninov
df5e7c7fb3 [Minor] Remove AOL_SPAM rule
Mail from AOL not longer have X-AOL-Global-Disposition header and this
rule no longer works.  AOL messages now have X-YMail-OSG header (like
yahoo.com), but it is encrypted/obfuscated and cannot be used here.
2020-12-12 18:17:39 +00:00
Vsevolod Stakhov
c0d8b18d5b [Rules] Remove broken rule
Pointed by: @citrin
2020-10-14 11:27:22 +01:00
Anton Yuzhaninov
bd59e849cb [Minor] Optimize mailman_msgid regexp
The old regexp is susceptible to exponential backtracking.

pcretest benchmark:
```
PCRE version 8.43 2019-02-23

/^<mailman\.\d+\.\d+\.\d+\..+\@\S+>$/
<mailman.0.1037840296.16399.mailman-developers@example.org>
Execute time 0.0006 milliseconds
 0: <mailman.0.1037840296.16399.mailman-developers@example.org>
<mailman.0.0.0.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ >
Execute time 9.8803 milliseconds
No match

/^<mailman\.\d+\.\d+\.\d+\.[-+.:=\w]+@[-a-zA-Z\d.]+>$/
<mailman.0.1037840296.16399.mailman-developers@example.org>
Execute time 0.0003 milliseconds
 0: <mailman.0.1037840296.16399.mailman-developers@example.org>
<mailman.0.0.0.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ >
Execute time 0.0002 milliseconds
No match
```
2019-11-10 13:56:46 +00:00
Vsevolod Stakhov
2a0e17496b [Minor] Remove another crap 2019-10-25 11:35:24 +01:00
Vsevolod Stakhov
7603ac88ab [Minor] Cleanup crap 2019-10-25 11:24:28 +01:00
Alexander Moisseev
099d952c66
[Minor] Fix grammar 2019-10-10 14:01:30 +03:00
Vsevolod Stakhov
84384ae4e6 [Conf] Make LEAKED_PASSWORD_SCAM a composite rule again 2019-09-19 12:13:48 +01:00
Vsevolod Stakhov
601825e42a [Minor] Improve LEAKED_PASSWORD_SCAM 2019-09-18 16:25:59 +01:00
Vsevolod Stakhov
4cd0665750 [Rules] Rework LEAKED_PASSWORD_SCAM rule one more time 2019-06-18 12:54:44 +01:00
Vsevolod Stakhov
74889ceafb [Rules] Add more detection to LEAKED_PASSWORD_SCAM 2019-06-17 17:57:21 +01:00
Vsevolod Stakhov
e6e72472ad
Merge pull request #2850 from heraklit256/rule-descr-cleanup
[Minor] unify rule scores and weights and improve descriptions
2019-04-16 12:07:42 +01:00
Vsevolod Stakhov
4e79bc05da [Rules] Add additional conditions to perform BTC checks 2019-04-12 12:35:23 +01:00
Vsevolod Stakhov
64772cf0e7 [Rules] Fix pay-to-hash addresses validation 2019-04-12 12:35:08 +01:00
Alexander Moisseev
a6f6525f7d [Minor] Header regexps: Add Postbox User-Agent 2019-03-25 10:07:35 +03:00
Vsevolod Stakhov
fbf41a8c87 [Minor] Another fix of leaked password scam rule 2019-03-22 15:08:11 +00:00
Vsevolod Stakhov
698bf6f96d [Minor] Sigh, another try to fix coroutines errors 2019-03-19 16:30:31 +00:00
Vsevolod Stakhov
c427048cec [Feature] Validate BTC addresses in LEAKED_PASSWORD_SCAM 2019-03-19 16:15:20 +00:00
heraklit256
323580e25d unify rules scores and weights 2019-03-05 17:17:53 +01:00
Alexander Moisseev
13e5863d60
[Minor] Use more strict regex in LEAKED_PASSWORD_SCAM
to avoid matching `passwordless`
2019-02-19 12:56:57 +03:00
Vsevolod Stakhov
eea2b46b1d [Rules] Add more defs for LEAKED_PASSWORD_SPAM 2019-01-21 13:43:32 +00:00
Vsevolod Stakhov
22a0948a35 [Rules] LEAKED_PASSWORD_SCAM: Improve images scam detection 2019-01-15 12:50:43 +00:00
Vsevolod Stakhov
15bb413994 [Rules] Improve LEAKED_PASSWORD_SCAM detection 2019-01-11 17:41:22 +00:00
Vsevolod Stakhov
2c5bbd9662 [Minor] Add more mime flags 2019-01-07 15:57:16 +00:00
Alexander Moisseev
42bef43e11 [Minor] Check for Kaspersky Security for Mail Server spam flag 2018-12-25 18:58:16 +03:00
Vsevolod Stakhov
e59e7c632a [Minor] Pet luacheck 2018-12-25 07:43:41 +00:00
Vsevolod Stakhov
3f147877af [Rules] Use bad_unicode flag for LEAKED_PASSWORD_SCAM rule
Issue: #2649
2018-11-30 10:00:21 +00:00
Alexander Moisseev
ff667448ba [Minor] Add new Message-ID regexp for Seamonkey
Resolves #2634
2018-11-22 10:49:09 +03:00
Vsevolod Stakhov
18d4509d6a [Minor] Make LEAKED_PASSWORD_SCAM rule more strict 2018-11-12 14:32:52 +00:00
Vsevolod Stakhov
2584e0d026 [Minor] Increase of LEAKED_PASSWORD_SCAM score 2018-11-12 11:31:12 +00:00
Vsevolod Stakhov
f2f048999e [Rules] Reduce FP rate for LEAKE_PASSWORD_SCAM rule 2018-11-12 11:16:58 +00:00
Vsevolod Stakhov
80928e500c [Rules] Add LEAKED_PASSWORD_SCAM rule 2018-10-29 16:51:39 +00:00