HOW TO ;Prevent a…



One of themore annoying types of spam is the one that seems to be coming fromyour own domain; or worse— from your own email address! Of course,users from your own domain don’t generally spam each other— unlessyou’re using one of the free web-based email services. And most ofus don’t spam ourselves.

Obviously, thisis coming from a spammer who has spoofed your email address, orthat of someone else from your domain.Unfortunately, SMTP—the protocol that allows mail clients and servers to exchangeemail, allows headers to be spoofed easily.

In ExchangeServer 2007, AcceptedDomains tell Exchange which domains toaccept email for. If a domain – e12labs.com inthis example, exists as an AcceptedDomain, there is no reason external senders should use thatdomain in the MAIL or FROM headers.

You may haveremote POP3/IMAP4 users who use SMTP to send mail. However, suchsessions should be authenticated, and preferably use a separateReceive Connector.

Thanks to theextensive TransportPermissions model in Exchange 2007, we caneasily prevent such spam. Receive Connectors havethe ms-exch-smtp-accept-authoritative-domain-sender permissionwhich dictates whether an Accepted Domain can be used inthe MAIL or FROM headers.External/internet hosts submit mail to your server withoutauthentication, as anonymous senders. To prevent anonymous sendersfrom sending mail using your domain(s), we need to removethe ms-exch-smtp-accept-authoritative-domain-sender permissionassigned to them.

Use the followingcommand to remove the ms-exch-smtp-accept-authoritative-domain-senderpermissionfrom NTAuthority\Anonymous Logon oninternet-facing Receive Connector(s):

Get-ReceiveConnector “My Internet ReceiveConnector” |Get-ADPermission -user “NT AUTHORITY\Anonymous Logon” | where{$_.ExtendedRights -like“ms-exch-smtp-accept-authoritative-domain-sender”} |Remove-ADPermission

Once thispermission is removed, when anonymous senders try to submit mailusing your Accepted Domain(s), here’s how the SMTP conversationgoes:

220 E12Postcard.e12labs.com Microsoft ESMTP MAIL Service ready atWed, 3 Sep 2008 06:22:43 -0700
helo
250 E12Postcard.e12labs.com Hello [172.31.0.170]
mailfrom:jadams@e12labs.com
5505.7.1 Client does not have permissions to send as thissender

Exchange stoppedspoofing of P1/envelope headers. Let’s continue the session and tryto spoof the P2 headers (the ones inthe DATA part of the message) — maybethat’ll work!

mailfrom:someone@someotherdomain.com
250 2.1.0 Sender OK
rcpt to:jadams@e12labs.com
250 2.1.5 Recipient OK
data
354 Start mail input; end with .
from:jadams@e12labs.com
subject: Header spoofing

This is how wespoof headers, spoof headers.

.
5505.7.1 Client does not have permissions to send as thissender
quit
221 2.0.0 Service closing transmission channel

As you can see,removing the ms-exch-smtp-accept-authoritative-domain-sender permissionstops spoofing of your domains in both envelope (P1) and message(P2) headers.

Whennot to remove the permission?
Is there a scenario where one should not removethe ms-exch-smtp-accept-authoritative-domain-sender permissionfrom NTAuthority\Anonymous Logon? Yes, on Receive Connectors usedby internal or trusted SMTP hosts (such ascopiers/scanners and applicationservers) that submitmail withoutauthentication.

But you do havethese internal/trusted hosts submitting to a separate ReceiveConnector, don’t you?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值