You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Kirill A. Korinsky" <ki...@korins.ky> on 2024/12/13 11:53:59 UTC
Patch to improve detection of offering SEO spam
Dear SA users,
I'd like to share with you a patch which allows me to catch an offering SEO
spam which I've encountered in my INBOX quite a few missed for last weeks.
Changes:
1. adds .xyz as suspicious zone because namecheap sells this domain for ~€1;
2. extends PDS_SEO2 regex to catch that spam.
An example of that spam email: https://pbot.rmdir.de/xbuEKl2kxv7AmPBRYzRU-g
The patch is inlined in this email:
diff --git a/rulesrc/sandbox/pds/20_ntld.cf b/rulesrc/sandbox/pds/20_ntld.cf
index 9b221486a..3492a67d0 100644
--- a/rulesrc/sandbox/pds/20_ntld.cf
+++ b/rulesrc/sandbox/pds/20_ntld.cf
@@ -27,6 +27,7 @@ enlist_addrlist (SUSP_NTLD) *@*.buzz
enlist_addrlist (SUSP_NTLD) *@*.trade
enlist_addrlist (SUSP_NTLD) *@*.cyou
enlist_addrlist (SUSP_NTLD) *@*.vip
+enlist_addrlist (SUSP_NTLD) *@*.xyz
enlist_uri_host (SUSP_URI_NTLD) icu
enlist_uri_host (SUSP_URI_NTLD) online
@@ -48,6 +49,7 @@ enlist_uri_host (SUSP_URI_NTLD) buzz
enlist_uri_host (SUSP_URI_NTLD) trade
enlist_uri_host (SUSP_URI_NTLD) cyou
enlist_uri_host (SUSP_URI_NTLD) vip
+enlist_uri_host (SUSP_URI_NTLD) xyz
enlist_uri_host (SUSP_URI_NTLD_PRO) pro
header PDS_PRO_TLD eval:check_uri_host_listed('SUSP_URI_NTLD_PRO')
@@ -92,7 +94,7 @@ score GOOGLE_DRIVE_REPLY_BAD_NTLD 1.0 # limit
reuse GOOGLE_DRIVE_REPLY_BAD_NTLD
body __PDS_SEO1 /(?:top|first page|1st) (?:(?:results|rank(?:ing)?) )?(?:in|of|on) (?:Google|MSN|Yahoo|Bing)|rank number one|top page rank|guarantee you 1st|link.building/i
-body __PDS_SEO2 /losing your (?:[a-z]+ )?(?:rank(?:ing)?|results)|rank well on [a-z]+\b/i
+body __PDS_SEO2 /(?:losing your|your website) (?:[a-z]+ )?(?:rank(?:ing)?|results)|rank well on [a-z]+\b/i
meta SEO_SUSP_NTLD __FROM_ADDRLIST_SUSPNTLD && (__PDS_SEO1 + __PDS_SEO2 >= 1)
tflags SEO_SUSP_NTLD publish
--
wbr, Kirill
Re: Patch to improve detection of offering SEO spam
Posted by John Hardin <jh...@impsec.org>.
On Fri, 13 Dec 2024, Kirill A. Korinsky wrote:
> Dear SA users,
>
> I'd like to share with you a patch which allows me to catch an offering SEO
> spam which I've encountered in my INBOX quite a few missed for last weeks.
>
> Changes:
> 1. adds .xyz as suspicious zone because namecheap sells this domain for ~€1;
> 2. extends PDS_SEO2 regex to catch that spam.
>
> An example of that spam email: https://pbot.rmdir.de/xbuEKl2kxv7AmPBRYzRU-g
>
> The patch is inlined in this email:
>
> diff --git a/rulesrc/sandbox/pds/20_ntld.cf b/rulesrc/sandbox/pds/20_ntld.cf
> index 9b221486a..3492a67d0 100644
> --- a/rulesrc/sandbox/pds/20_ntld.cf
> +++ b/rulesrc/sandbox/pds/20_ntld.cf
> @@ -27,6 +27,7 @@ enlist_addrlist (SUSP_NTLD) *@*.buzz
> enlist_addrlist (SUSP_NTLD) *@*.trade
> enlist_addrlist (SUSP_NTLD) *@*.cyou
> enlist_addrlist (SUSP_NTLD) *@*.vip
> +enlist_addrlist (SUSP_NTLD) *@*.xyz
>
> enlist_uri_host (SUSP_URI_NTLD) icu
> enlist_uri_host (SUSP_URI_NTLD) online
> @@ -48,6 +49,7 @@ enlist_uri_host (SUSP_URI_NTLD) buzz
> enlist_uri_host (SUSP_URI_NTLD) trade
> enlist_uri_host (SUSP_URI_NTLD) cyou
> enlist_uri_host (SUSP_URI_NTLD) vip
> +enlist_uri_host (SUSP_URI_NTLD) xyz
>
> enlist_uri_host (SUSP_URI_NTLD_PRO) pro
> header PDS_PRO_TLD eval:check_uri_host_listed('SUSP_URI_NTLD_PRO')
> @@ -92,7 +94,7 @@ score GOOGLE_DRIVE_REPLY_BAD_NTLD 1.0 # limit
> reuse GOOGLE_DRIVE_REPLY_BAD_NTLD
>
> body __PDS_SEO1 /(?:top|first page|1st) (?:(?:results|rank(?:ing)?) )?(?:in|of|on) (?:Google|MSN|Yahoo|Bing)|rank number one|top page rank|guarantee you 1st|link.building/i
> -body __PDS_SEO2 /losing your (?:[a-z]+ )?(?:rank(?:ing)?|results)|rank well on [a-z]+\b/i
> +body __PDS_SEO2 /(?:losing your|your website) (?:[a-z]+ )?(?:rank(?:ing)?|results)|rank well on [a-z]+\b/i
>
> meta SEO_SUSP_NTLD __FROM_ADDRLIST_SUSPNTLD && (__PDS_SEO1 + __PDS_SEO2 >= 1)
> tflags SEO_SUSP_NTLD publish
I don't know whether Paul is still actively maintaining his rule sandbox,
his last commit there was four years ago.
The changes seems reasonable, I'll apply them.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Governments do not censor articles that they could expose as lies.
-- markm
-----------------------------------------------------------------------
2 days until Bill of Rights day
Re: Patch to improve detection of offering SEO spam
Posted by Bill Cole <sa...@billmail.scconsult.com>.
On 2024-12-14 at 15:20:41 UTC-0500 (Sat, 14 Dec 2024 12:20:41 -0800
(PST))
John Hardin <jh...@impsec.org>
is rumored to have said:
> On Sat, 14 Dec 2024, Bill Cole wrote:
>
>> On 2024-12-13 at 06:53:59 UTC-0500 (Fri, 13 Dec 2024 12:53:59 +0100)
>> Kirill A. Korinsky <ki...@korins.ky>
>> is rumored to have said:
>>
>>> Dear SA users,
>>>
>>> I'd like to share with you a patch which allows me to catch an
>>> offering
>>> SEO
>>> spam which I've encountered in my INBOX quite a few missed for last
>>> weeks.
>>>
>>> Changes:
>>> 1. adds .xyz as suspicious zone because namecheap sells this domain
>>> for
>>> ~€1;
>>
>> That's not (in itself) enough for use to include it in that list.
>>
>> See https://ruleqa.spamassassin.org/20241207-r1922358-n/%2FTLD_XYZ
>>
>> That shows the performance of a rule that has been in testing for
>> some time which matches any *.xyz address in the From header. It
>> routinely scores in the 0.7-0.8 range on the "S/O" ratio, indicating
>> that roughly 1 in every 4 messages that it matches is NOT spam. That
>> is too high for inclusion in the default "suspicious TLD" list.
>
> What level would you consider acceptable?
I think this is just on the edge. If the test rule had ever been deemed
"good enough" by the RuleQA promotion algorithm I would have no qualms
about returning .xyz to the suspicious TLD lists.
I'm fine with it going either way, as the RuleQA results indicate that
there is very little relevant mail of any sort, ham or spam, so the
potential harm is trivial. I removed it ~18 months ago
(https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8075#c6) based on
the S/O of the test rule at the time, which was somewhat lower than it
has been in recent weeks.
>> Obviously, any SA deployment can add enlist* directives to add .xyz
>> to one or both lists
>>
>>> 2. extends PDS_SEO2 regex to catch that spam.
>>
>> Because that's a "sandbox" rule in the sandbox of Paul Stead, it is
>> prudent and courteous to get his input on this. I hope he is still
>> reading this list.
>
> I checked quickly before proceeding with this. He hasn't committed
> anything to his sandbox in four years, including bugfixes, so I
> assumed he wasn't still actively maintaining his sandbox.
Seems reasonable. I had not noticed how long it had been.
> I'll be happy to back out those changes if consensus is they aren't
> reasonable.
I expect there's likely more of a consensus around keeping them.
--
Bill Cole
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo@toad.social and many *@billmail.scconsult.com
addresses)
Not Currently Available For Hire
Re: Patch to improve detection of offering SEO spam
Posted by John Hardin <jh...@impsec.org>.
On Sat, 14 Dec 2024, Bill Cole wrote:
> On 2024-12-13 at 06:53:59 UTC-0500 (Fri, 13 Dec 2024 12:53:59 +0100)
> Kirill A. Korinsky <ki...@korins.ky>
> is rumored to have said:
>
>> Dear SA users,
>>
>> I'd like to share with you a patch which allows me to catch an offering
>> SEO
>> spam which I've encountered in my INBOX quite a few missed for last weeks.
>>
>> Changes:
>> 1. adds .xyz as suspicious zone because namecheap sells this domain for
>> ~€1;
>
> That's not (in itself) enough for use to include it in that list.
>
> See https://ruleqa.spamassassin.org/20241207-r1922358-n/%2FTLD_XYZ
>
> That shows the performance of a rule that has been in testing for some time
> which matches any *.xyz address in the From header. It routinely scores in
> the 0.7-0.8 range on the "S/O" ratio, indicating that roughly 1 in every 4
> messages that it matches is NOT spam. That is too high for inclusion in the
> default "suspicious TLD" list.
What level would you consider acceptable?
> Obviously, any SA deployment can add enlist* directives to add .xyz to one or
> both lists
>
>> 2. extends PDS_SEO2 regex to catch that spam.
>
> Because that's a "sandbox" rule in the sandbox of Paul Stead, it is prudent
> and courteous to get his input on this. I hope he is still reading this list.
I checked quickly before proceeding with this. He hasn't committed
anything to his sandbox in four years, including bugfixes, so I assumed he
wasn't still actively maintaining his sandbox.
I'll be happy to back out those changes if consensus is they aren't
reasonable.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Tomorrow: Bill of Rights day
Re: Patch to improve detection of offering SEO spam
Posted by Bill Cole <sa...@billmail.scconsult.com>.
On 2024-12-13 at 06:53:59 UTC-0500 (Fri, 13 Dec 2024 12:53:59 +0100)
Kirill A. Korinsky <ki...@korins.ky>
is rumored to have said:
> Dear SA users,
>
> I'd like to share with you a patch which allows me to catch an
> offering SEO
> spam which I've encountered in my INBOX quite a few missed for last
> weeks.
>
> Changes:
> 1. adds .xyz as suspicious zone because namecheap sells this domain
> for ~€1;
That's not (in itself) enough for use to include it in that list.
See https://ruleqa.spamassassin.org/20241207-r1922358-n/%2FTLD_XYZ
That shows the performance of a rule that has been in testing for some
time which matches any *.xyz address in the From header. It routinely
scores in the 0.7-0.8 range on the "S/O" ratio, indicating that roughly
1 in every 4 messages that it matches is NOT spam. That is too high for
inclusion in the default "suspicious TLD" list. There is NOT an
analogous rule for body URIs, so perhaps it is worthwhile to add a rule
for those as well.
Obviously, any SA deployment can add enlist* directives to add .xyz to
one or both lists
> 2. extends PDS_SEO2 regex to catch that spam.
Because that's a "sandbox" rule in the sandbox of Paul Stead, it is
prudent and courteous to get his input on this. I hope he is still
reading this list.
>
> An example of that spam email:
> https://pbot.rmdir.de/xbuEKl2kxv7AmPBRYzRU-g
>
--
Bill Cole
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo@toad.social and many *@billmail.scconsult.com
addresses)
Not Currently Available For Hire