スパマーは postfix/doveco による攻撃をブロックします。

スパマーは postfix/doveco による攻撃をブロックします。

どういうわけか破損したpostfix / dovecotを持つサーバーがあります。私はしばしば次のようなログをたくさん見ます(ドメイン名をexample.comに置き換えます)。

Jul  2 10:03:03 my-server postfix/pickup[14702]: 878D313894B: uid=33 from=<www-data>
Jul  2 10:03:03 my-server postfix/cleanup[14916]: 878D313894B: message-id=<[email protected]>
Jul  2 10:03:03 my-server postfix/qmgr[19570]: 878D313894B: from=<[email protected]>, size=40324, nrcpt=1 (queue active)
Jul  2 10:03:05 my-server postfix/smtp[14923]: 878D313894B: to=<[email protected]>, relay=hotmail-com.olc.protection.outlook.com[104.47.42.33]:25, delay=2.1, delays=0.03/0.03/1.1/0.93, dsn=2.6.0, status=sent (250 2.6.0 <[email protected]> [InternalId=11360188501262, Hostname=BY2NAM03HT083.eop-NAM03.prod.protection.outlook.com] 45866 bytes in 0.498, 89.854 KB/sec Queued mail for delivery)
Jul  2 10:03:05 my-server postfix/qmgr[19570]: 878D313894B: removed


Jul  2 10:03:03 my-server postfix/pickup[14702]: 97D4E138950: uid=33 from=<www-data>
Jul  2 10:03:03 my-server postfix/cleanup[14916]: 97D4E138950: message-id=<[email protected]>
Jul  2 10:03:03 my-server postfix/qmgr[19570]: 97D4E138950: from=<[email protected]>, size=40308, nrcpt=1 (queue active)
Jul  2 10:03:03 my-server postfix/smtp[14933]: 97D4E138950: to=<a@a>, relay=none, delay=0.14, delays=0.01/0.02/0.11/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=a type=AAAA: Host not found)
Jul  2 10:03:03 my-server postfix/bounce[14935]: 97D4E138950: sender non-delivery notification: B9416138951
Jul  2 10:03:03 my-server postfix/qmgr[19570]: 97D4E138950: removed


Jul  2 10:03:03 my-server postfix/cleanup[14916]: A6851138951: message-id=<[email protected]>
Jul  2 10:03:03 my-server postfix/qmgr[19570]: A6851138951: from=<>, size=42121, nrcpt=1 (queue active)
Jul  2 10:03:03 my-server postfix/bounce[14935]: 9C33113894C: sender non-delivery notification: A6851138951
Jul  2 10:03:03 my-server dovecot: lmtp([email protected]): mNzcKTfcOVtZOgAAruHjSQ: msgid=<[email protected]>: saved mail to INBOX
Jul  2 10:03:03 my-server postfix/lmtp[14936]: A6851138951: to=<[email protected]>, orig_to=<[email protected]>, relay=example.com[private/dovecot-lmtp], delay=0.03, delays=0/0.01/0.01/0.01, dsn=2.0.0, status=sent (250 2.0.0 <[email protected]> mNzcKTfcOVtZOgAAruHjSQ Saved)
Jul  2 10:03:03 my-server postfix/qmgr[19570]: A6851138951: removed

このタイプの攻撃を避けるために、次のルールでpostfixを設定してみましたが、攻撃の規模は落ち着いていますが、サーバーはまだ多くの活動を受けています。

/etc/postfix/main.cf:

#################################################################
# ANTI SPAM: https://www.howtoforge.com/virtual_postfix_antispam
#################################################################
smtpd_helo_required     = yes
strict_rfc821_envelopes = yes
disable_vrfy_command = yes
unknown_address_reject_code  = 554
unknown_hostname_reject_code = 554
unknown_client_reject_code   = 554

smtpd_sender_restrictions = reject_unknown_address

smtpd_helo_restrictions =
    permit_mynetworks,
    reject_invalid_hostname,
    regexp:/etc/postfix/antispam/helo.regexp,
    permit
#smtpd_recipient_restrictions =
#        permit_sasl_authenticated,
#        permit_mynetworks,
#        reject_unauth_destination
smtpd_recipient_restrictions = 
   check_client_access hash:/etc/postfix/antispam/helo_client_exceptions
#   check_sender_access hash:/etc/postfix/antispam/sender_checks,
   reject_invalid_hostname,
### Can cause issues with Auth SMTP, so be weary!
   reject_non_fqdn_hostname,
##################################
   reject_non_fqdn_sender,
   reject_non_fqdn_recipient,
   reject_unknown_sender_domain,
   reject_unknown_recipient_domain,
   permit_mynetworks,
   reject_unauth_destination,
# Add RBL exceptions here, when changing rbl_client_exceptions, this file must be regenerated using postmap <file>, to generate a Berkeley DB
          check_client_access hash:/etc/postfix/antispam/rbl_client_exceptions,
          reject_rbl_client cbl.abuseat.org,
#          reject_rbl_client zen.spamhaus.org,
          reject_rbl_client bl.spamcop.net, 
#          reject_rbl_client list.dsbl.org 
          reject_rhsbl_sender dsn.rfc-ignorant.org,
#         check_policy_service inet:127.0.0.1:60000,
         permit 

smtpd_relay_restrictions =
    permit_mynetworks,
#   permit_sasl_authenticated,
    defer_unauth_destination

このサーバーが何らかの方法で人々にスパムを送信するために使用され、人々を迷惑にし、私のIPの評判を損なうのではないかと心配しています。

インターネットで調査し、文書を読むのに多くの時間を費やしましたが、それでも何が起こっているのか、そしてどうやって停止するのか混乱しています。攻撃者がこのサーバーをどのように利用しており、攻撃を阻止する方法が何かを知りたいです。

関係があるかどうかはわかりませんが、今日ホスティングプロバイダから異常な活動を検出してサーバーを一時停止したという電子メールを受け取りました(今日は2回、15日前に2回)。

Attack detail : 173Kpps/38Mbps
dateTime                   srcIp:srcPort           dstIp:dstPort           protocol flags       bytes reason               
2018.07.02 16:35:04 CEST   xx.xx.xx.xx:41403      78.46.61.106:80         UDP      ---            29 ATTACK:UDP

TCP 22, 80, 443, 25, 587, 993, 995, 465 を除くすべてのポートを閉じたため、発信 UDP がブロックされると予想されます。このアクティビティを引き起こすいくつかのマルウェアがサーバーの内部にインストールされていること、およびそれを検出する方法は不明です。

ベストアンサー1

おすすめ記事