Commit Graph

323 Commits

Author SHA1 Message Date
Vsevolod Stakhov
17d100afeb [Rules] Add PDF related rules 2019-11-27 14:53:27 +00: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.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ >
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.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ >
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
Vsevolod Stakhov
87c987155c [Feature] Support segwit BTC addresses, fix LTC verification 2019-10-23 15:53:27 +01:00
Vsevolod Stakhov
14c904d120 [Rules] Catch LTC addresses 2019-10-11 10:03:06 +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
90fb3cc286 [Fix] Fix embedded images linking logic 2019-09-19 12:07:03 +01:00
Vsevolod Stakhov
601825e42a [Minor] Improve LEAKED_PASSWORD_SCAM 2019-09-18 16:25:59 +01:00
Vsevolod Stakhov
8b98f9dd6a [Rework] Remove rspamd.classifiers.lua 2019-07-24 13:16:59 +01:00
Vsevolod Stakhov
2839580137
Merge pull request #2954 from smfreegard/master
[Rules] Add MIME_BASE64_TEXT_BOGUS rule
2019-07-03 14:07:10 +01:00
Steve Freegard
3e0ceea8e0 Remove type='mime' and move MIME rules into their own group 2019-07-03 11:51:24 +01:00
Vsevolod Stakhov
fbb7c65cf7 [Minor] Remove lua_nn as it was unused 2019-07-01 17:04:41 +01:00
Steve Freegard
63c45fc5aa Add MIME_BASE64_TEXT_BOGUS rule 2019-06-29 00:30:17 +01:00
Vsevolod Stakhov
eb96ca6649 [Minor] Add some descriptions 2019-06-27 19:37:13 +01:00
Vsevolod Stakhov
4cd0665750 [Rules] Rework LEAKED_PASSWORD_SCAM rule one more time 2019-06-18 12:54:44 +01:00
Vsevolod Stakhov
db44cc510d [Rules] Add dedicated bitcoin addresses filter rule 2019-06-18 12:46:34 +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
Vsevolod Stakhov
6d6489052c [Minor] Set alias flag 2019-04-04 10:20:17 +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
7a1a11ccc5 improve descriptions for HAS_X_PRIO_* rules 2019-03-05 17:27:11 +01:00
heraklit256
9795584120 improve descriptions for RCVD_COUNT_* rules 2019-03-05 17:24:22 +01:00
heraklit256
c8e64a5f20 improve description for FWD_SRS 2019-03-05 17:21:23 +01:00
heraklit256
323580e25d unify rules scores and weights 2019-03-05 17:17:53 +01:00
Vsevolod Stakhov
2ded1a6c45 [Rules] Improve html images detection logic 2019-02-21 12:01:37 +00: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
fb2c14b1e1 [Rules] OMOGRAPH_URL: Avoid extra calls for repeated urls 2019-01-29 13:21:20 +00:00
Vsevolod Stakhov
eea2b46b1d [Rules] Add more defs for LEAKED_PASSWORD_SPAM 2019-01-21 13:43:32 +00:00
Vsevolod Stakhov
ec8a472f21 [Feature] Add dedicated ZW spaces detection for URLs
Issue: #2725
2019-01-21 12:41:34 +00:00
Vsevolod Stakhov
6296a24a75 [Rules] Fix the case when there are no received headers 2019-01-15 14:52:48 +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
da7b65e4b5 [Minor] Relax CTYPE_MISSING_DISPOSITION rule for pgp encryption
Issue: #2706
Closes: #2706
2019-01-09 18:29:40 +00:00
Vsevolod Stakhov
2c5bbd9662 [Minor] Add more mime flags 2019-01-07 15:57:16 +00:00
Vsevolod Stakhov
d9f3f32336 [Minor] Add some mime only rules 2019-01-07 15:41:23 +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