home *** CD-ROM | disk | FTP | other *** search
/ ftp.f-secure.com / 2014.06.ftp.f-secure.com.tar / ftp.f-secure.com / support / hotfix / fsis / IS-SpamControl.fsfix / iufssc / rules / 20_fake_helo_tests.cf < prev    next >
Text File  |  2006-11-29  |  11KB  |  195 lines

  1. # SpamAssassin rules file: fake-HELO tests
  2. #
  3. # Please don't modify this file as your changes will be overwritten with
  4. # the next update. Use @@LOCAL_RULES_DIR@@/local.cf instead.
  5. # See 'perldoc Mail::SpamAssassin::Conf' for details.
  6. #
  7. # We should write a new ruletype for these, to save typing.
  8. #
  9. # <@LICENSE>
  10. # Copyright 2004 Apache Software Foundation
  11. # Licensed under the Apache License, Version 2.0 (the "License");
  12. # you may not use this file except in compliance with the License.
  13. # You may obtain a copy of the License at
  14. #     http://www.apache.org/licenses/LICENSE-2.0
  15. # Unless required by applicable law or agreed to in writing, software
  16. # distributed under the License is distributed on an "AS IS" BASIS,
  17. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. # See the License for the specific language governing permissions and
  19. # limitations under the License.
  20. # </@LICENSE>
  21. #
  22. ###########################################################################
  23.  
  24. #require_version @@VERSION@@
  25.  
  26. ###########################################################################
  27.  
  28. header FAKE_HELO_MSN        eval:check_for_rdns_helo_mismatch("msn\.com","msn\.com")
  29. describe FAKE_HELO_MSN        Host HELO did not match rDNS: msn.com
  30. header FAKE_HELO_MAIL_COM    eval:check_for_rdns_helo_mismatch("mail\.com","mail\.com")
  31. describe FAKE_HELO_MAIL_COM    Host HELO did not match rDNS: mail.com
  32. header FAKE_HELO_EMAIL_COM    eval:check_for_rdns_helo_mismatch("email\.com","email\.com")
  33. describe FAKE_HELO_EMAIL_COM    Host HELO did not match rDNS: email.com
  34. header FAKE_HELO_EUDORAMAIL    eval:check_for_rdns_helo_mismatch("eudoramail\.com","eudoramail\.com")
  35. describe FAKE_HELO_EUDORAMAIL    Host HELO did not match rDNS: eudoramail.com
  36. header FAKE_HELO_EXCITE        eval:check_for_rdns_helo_mismatch("excite\S*","excite\.com")
  37. describe FAKE_HELO_EXCITE    Host HELO did not match rDNS: excite.com
  38. header FAKE_HELO_LYCOS        eval:check_for_rdns_helo_mismatch("lycos\S*","lycos\.com")
  39. describe FAKE_HELO_LYCOS    Host HELO did not match rDNS: lycos.com
  40. header FAKE_HELO_YAHOO_CA    eval:check_for_rdns_helo_mismatch("yahoo\.ca","yahoo\.ca")
  41. describe FAKE_HELO_YAHOO_CA    Host HELO did not match rDNS: yahoo.ca
  42.  
  43. # ---------------------------------------------------------------------------
  44.  
  45. # Suresh says: these will never be used as HELOs from real mail.com relays.
  46. # Just check the most recent handover; the connection to a trusted host.
  47. # This way a legit sender can send to their MSA using that HELO (quite a few
  48. # MUAs will do that), but a spammer gets caught.  (List of domains comes from
  49. # the drop-down list on the Mail.com signup page.)
  50. header FAKE_HELO_MAIL_COM_DOM  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=(?:\S+\.|)(?:(?:mail|email|iname|cheerful|consultant|europe|mindless|myself|post|techie|usa|writeme|2die4|artlover|bikerider|catlover|cliffhanger|cutey|doglover|gardener|hot-shot|inorbit|loveable|mad\.scientist|playful|poetic|popstar|saintly|seductive|soon|whoever|winning|witty|yours|africamail|arcticmail|asia|australiamail|europe|japan|samerica|usa|berlin|dublin|london|madrid|moscowmail|munich|nycmail|paris|rome|sanfranmail|singapore|tokyo|accountant|adexec|allergist|alumnidirector|archaeologist|chemist|clerk|columnist|comic|consultant|counsellor|deliveryman|diplomats|doctor|dr|engineer|execs|financier|geologist|graphic-designer|insurer|journalist|lawyer|legislator|lobbyist|minister|optician|pediatrician|presidency|priest|publicist|realtyagent|registerednurses|repairman|representative|rescueteam|scientist|sociologist|teacher|techietechnologist|umpire)\.com|(?:programmer|earthling|hairdresser)\.net|musician\.org) /i
  51. describe FAKE_HELO_MAIL_COM_DOM Relay HELO'd with suspicious hostname (mail.com)
  52.  
  53. # ---------------------------------------------------------------------------
  54. # Interesting new feature; spamware HELO'ing, from a dialup IP addr,
  55. # using that IP's rDNS entry.  We can catch this easily.  There aren't
  56. # many legit mailservers calling themselves
  57. # 'dhcp024-210-034-053.columbus.rr.com'. ;)
  58. #
  59. # Note the '^[^\]]+ ' stanza: this ensures that we only match spamware
  60. # connecting to a trusted relay; if a mail came from a dynamic addr but
  61. # was relayed through their smarthost, that's fine.
  62.  
  63. # dhcp024-210-034-053.columbus.rr.com [24.210.34.53]
  64. # c-66-176-16-108.se.client2.attbi.com [66.176.16.108]
  65. # c-67-168-174-61.client.comcast.net [67.168.174.61]
  66. # NNN-NNN-NNN-NNN.fibertel.com.ar
  67. # NN.NN.NNN.NNN.ap.yournet.ne.jp
  68. # NN.NNN.NN-NN.rev.gaoland.net
  69. # vaise-1-82-67-44-166.fbx.proxad.net [82.67.44.166]
  70. # lns-vlq-11-62-147-186-141.adsl.proxad.net [62.147.186.141]
  71. # dsl-200-95-109-107.prod-infinitum.com.mx [200.95.109.107]
  72. # port-212-202-77-203.reverse.qsc.de [212.202.77.203]
  73. # pool-151-203-32-68.bos.east.verizon.net [151.203.32.68]
  74. # c-67-164-133-216.client.comcast.net [67.164.133.216]
  75. # 200-171-228-6.customer.telesp.net.br [200.171.228.6]
  76. # modemcable090.28-201-24.mc.videotron.ca [24.201.28.90]
  77. # 80-218-47-160.dclient.hispeed.ch [80.218.47.160]
  78. # cdm-68-226-239-16.laft.cox-internet.com [68.226.239.16]
  79. # d53-64-35-171.nap.wideopenwest.com [64.53.171.35]
  80. # 74.67-201-80.adsl.skynet.be [80.201.67.74]
  81. # 12-218-225-223.client.mchsi.com [12.218.225.223]
  82. # (require an alpha first, as legit HELO'ing-as-IP-address is hit otherwise)
  83. header HELO_DYNAMIC_IPADDR X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z]\S*\d+[^\d\s]\d+[^\d\s]\d+[^\d\s]\d+[^\d\s][^\.]*\.\S+\.\S+[^\]]+ auth= /i
  84. describe HELO_DYNAMIC_IPADDR Relay HELO'd using suspicious hostname (IP addr 1)
  85.  
  86. # dhcp024-210-034-053.columbus.rr.com [24.210.34.53]
  87. # catv-506237d8.miskcatv.broadband.hu [80.98.55.216]
  88. # node-c-8b22.a2000.nl
  89. # cm89.omega139.maxonline.com.sg
  90. # cm114.gamma208.maxonline.com.sg
  91. header HELO_DYNAMIC_DHCP X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\S*(?:cm|catv|docsis|cable|dsl|dhcp|cpe|node)\S*\d+[^\d\s]+\d+[^\]]+ auth= /i
  92. describe HELO_DYNAMIC_DHCP Relay HELO'd using suspicious hostname (DHCP)
  93.  
  94. # fia83-8.dsl.hccnet.nl [62.251.8.83]
  95. # fia160-115-100.dsl.hccnet.nl [80.100.115.160]
  96. header HELO_DYNAMIC_HCC   X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\S*\d+[^\d\s]+\d+\S*\.(?:docsis|cable|dsl|adsl|dhcp|cpe)\.[^\]]+ auth= /i
  97. describe HELO_DYNAMIC_HCC Relay HELO'd using suspicious hostname (HCC)
  98.  
  99. # h0002a5d76857.ne.client2.attbi.com [65.96.12.59]
  100. header HELO_DYNAMIC_ATTBI  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\S+\d+\S+\.client2\.attbi\.com[^\]]+ auth= /i
  101. describe HELO_DYNAMIC_ATTBI Relay HELO'd using suspicious hostname (ATTBI.com)
  102.  
  103. # CPE0004e2372711-CM000a73666706.cpe.net.cable.rogers.com
  104. # CPE00e0184f0eba-CM014490118324.cpe.net.cable.rogers.com [24.43.109.140]
  105. header HELO_DYNAMIC_ROGERS X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=CPE\d+\S+\.rogers\.com[^\]]+ auth= /i
  106. describe HELO_DYNAMIC_ROGERS Relay HELO'd using suspicious hostname (Rogers)
  107.  
  108. # ca-morpark-cuda1-zone7-b-159.vnnyca.adelphia.net[67.23.129.159]
  109. # tn-greenvillecuda1cable7a-36.atlaga.adelphia.net [68.171.113.36]
  110. # ky-richmond2a-123.rhmdky.adelphia.net [68.71.36.123]
  111. # ny-lackawannacadent4-chtwga3a-b-117.buf.adelphia.net [68.71.205.117]
  112. # fl-edel-u2-c3c-233.pbc.adelphia.net [68.64.89.233]
  113. header HELO_DYNAMIC_ADELPHIA X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z]{2}-\S+-\d{1,3}\.[a-z]{3,8}\.adelphia\.net[^\]]+ auth= /i
  114. describe HELO_DYNAMIC_ADELPHIA Relay HELO'd using suspicious hostname (Adelphia)
  115.  
  116. # pD9E4F89F.dip.t-dialin.net [217.228.248.159]
  117. header HELO_DYNAMIC_DIALIN X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z][A-F0-9]+\.dip\./
  118. describe HELO_DYNAMIC_DIALIN Relay HELO'd using suspicious hostname (T-Dialin)
  119.  
  120. # 0xd5aaf40b.dhcp.kabelnettet.dk
  121. # 0x50a46949.virnxx11.adsl-dhcp.tele.dk
  122. header HELO_DYNAMIC_HEXIP X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=0x[a-f0-9]{8}\./
  123. describe HELO_DYNAMIC_HEXIP Relay HELO'd using suspicious hostname (Hex IP)
  124.  
  125. # 118.Red-80-35-201.pooles.rima-tde.net
  126. header HELO_DYNAMIC_SPLIT_IP X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\d+\.\S+\d+[^\d\s]\d+[^\d\s]\d+[^\d\s]/
  127. describe HELO_DYNAMIC_SPLIT_IP Relay HELO'd using suspicious hostname (Split IP)
  128.  
  129. # YahooBB219173000034.bbtec.net [219.173.0.34]
  130. header HELO_DYNAMIC_YAHOOBB X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=YahooBB[^\]]+ auth= /i
  131. describe HELO_DYNAMIC_YAHOOBB Relay HELO'd using suspicious hostname (YahooBB)
  132.  
  133. # ool-18be1aaf.dyn.optonline.net [24.190.26.175]
  134. header HELO_DYNAMIC_OOL X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\S+\.dyn\.optonline\.net/
  135. describe HELO_DYNAMIC_OOL Relay HELO'd using suspicious hostname (OptOnline)
  136.  
  137. header HELO_DYNAMIC_IPADDR2 X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\d+[^\d\s]\d+[^\d\s]\d+[^\d\s]\d+[^\d\s][^\.]*\.\S+\.\S+[^\]]+ auth= /i
  138. describe HELO_DYNAMIC_IPADDR2 Relay HELO'd using suspicious hostname (IP addr 2)
  139.  
  140. # wiley-170-10231.roadrunner.nf.net [205.251.210.249]
  141. header HELO_DYNAMIC_RR2   X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z]+-\d{1,3}-\d{1,5}\.roadrunner[^\]]+ auth= /i
  142. describe HELO_DYNAMIC_RR2 Relay HELO'd using suspicious hostname (RR 2)
  143.  
  144. # pcp04024417pcs.toresd01.pa.comcast.net [68.86.206.126]
  145. # bgp542174bgs.ewndsr01.nj.comcast.net[68.38.144.91]
  146. # Computer-udp135632uds.union01.nj.comcast.net [68.39.99.32]
  147. header HELO_DYNAMIC_COMCAST X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z-]+\d+[a-z]{3}\.[a-z0-9]+\...\.comcast[^\]]+ auth= /i
  148. describe HELO_DYNAMIC_COMCAST Relay HELO'd using suspicious hostname (Comcast)
  149.  
  150. # h234n2fls32o895.telia.com [217.208.73.234]
  151. # h53n2fls32o828.telia.com
  152. # h116n2fls32o1111.telia.com
  153. # h29n1fls306o1003.telia.com
  154. header HELO_DYNAMIC_TELIA X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=h\d+n\d+fls\S+\.telia\.com[^\]]+ auth= /i
  155. describe HELO_DYNAMIC_TELIA Relay HELO'd using suspicious hostname (Telia)
  156.  
  157. # CM-vina5-168-207.cm.vtr.net [200.104.168.207]
  158. # CM-anto1-98-153.cm.vtr.net [200.104.98.153]
  159. header HELO_DYNAMIC_VTR X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=cm-[a-z]+\d+-\d+-\d+\.cm\.vtr[^\]]+ auth= /i
  160. describe HELO_DYNAMIC_VTR Relay HELO'd using suspicious hostname (VTR)
  161.  
  162. # ec9z5l.cm.chello.no
  163. header HELO_DYNAMIC_CHELLO_NO  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\S+\.cm\.chello\.no[^\]]+ auth= /i
  164. describe HELO_DYNAMIC_CHELLO_NO Relay HELO'd using suspicious hostname (Chello.no)
  165.  
  166. # g225174.upc-g.chello.nl
  167. # a151145.upc-a.chello.nl
  168. # a96134.upc-a.chello.nl
  169. header HELO_DYNAMIC_CHELLO_NL  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z]\d+\.upc-[a-z]\.chello\.nl[^\]]+ auth= /i
  170. describe HELO_DYNAMIC_CHELLO_NL Relay HELO'd using suspicious hostname (Chello.nl)
  171.  
  172. # MG001182.user.veloxzone.com.br
  173. # ba199058073.user.veloxzone.com.br
  174. header HELO_DYNAMIC_VELOX  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z]{2}\d+\.user\.veloxzone\.[^\]]+ auth= /i
  175. describe HELO_DYNAMIC_VELOX Relay HELO'd using suspicious hostname (Veloxzone)
  176.  
  177. # public4-seve6-5-cust173.lond.broadband.ntl.com
  178. # spr1-bolt5-5-0-cust9.manc.broadband.ntl.com
  179. # spc1-lewi4-6-0-cust190.lond.broadband.ntl.com
  180. header HELO_DYNAMIC_NTL  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\S+\d+-\d+-cust\d+\.[a-z]{4,6}\.broadband\.ntl\.com[^\]]+ auth= /i
  181. describe HELO_DYNAMIC_NTL Relay HELO'd using suspicious hostname (NTL)
  182.  
  183. # cp160000-a.mill1.nb.home.nl
  184. # cp341468-b.venra1.lb.home.nl
  185. header HELO_DYNAMIC_HOME_NL  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=[a-z]{2}\d+-\S\.\S+\d\.[a-z]{2}\.home\.nl[^]]+ auth= /i
  186. describe HELO_DYNAMIC_HOME_NL Relay HELO'd using suspicious hostname (Home.nl)
  187.  
  188. # (I'm quite sure these may be a good spamsign in future)
  189. # nwblwi-nrp3-l10-a671.nwblwi.tds.net
  190. #header HELO_DYNAMIC_TDS X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\S+-[a-z]\d+\.[a-z]{6}\.tds\.net/i
  191. #header HELO_DYNAMIC_VIRTUA  X-Spam-Relays-Untrusted =~ /^[^\]]+ helo=\d+\.cps\./i
  192.