asp 流量统计
随笔-81  评论-28  文章-2  trackbacks-0
 
Logon Audit和Account Logon Audit在MCSE的题目中经常出现,老是浑搅概念。
从开发小组人员的Blog来看,The Answer is Actually pretty simple-we're bad at choosing names.

Logon Audit是审核本地登陆信息
Account Logon Audit审核域帐号登陆信息

One of the most common questions that I get about Windows Auditing is, how come you guys were so @#%! stupid that you put in two logon categories?

The answer is actually pretty simple- we're bad at choosing names.  "Account Logon" isn't really about logon, it's about credential validation.

Here's the low down on what is the difference between Logon/Logoff and Account Logon events, and how to decipher Account Logon events.

Audit Logon/Logoff generates events for the creation and destruction of logon sessions.  These events occur on the machine which was accessed.  In the case of an interactive logon, these would be generated on the machine which was logged on to.  In the case of network logon, for example, accessing a share, these events would be generated on the machine hosting the resource that was accessed.

Audit Account Logon generates events for credential validation. These events occur on the machine which is authoritative for the credentials.  For domain accounts, the domain controller is authoritative. For local accounts, the local machine is authoritative.  Since domain accounts are used much more frequently in enterprise environments than local accounts, most of the Account Logon events in a domain environment occur on the domain controllers which are authoriative for the domain accounts.  However, these events can occur on any machine, and may occur in conjunction with or on separate machines from logon/logoff events.

Logging on interactively to a workstation, using a domain account, can cause more activity than you might expect on the DC.  An interactive logon is pretty complex and involves multiple steps.  Typically, from the time you turn on your workstation until the time you are viewing your desktop, the following things happen:

  • Machine establishes trust with domain: Kerberos AS request (Event 672 on the DC), Kerberos TGS request for AD (DC, 673)
  • Machine gets policy: Kerberos TGS request for access to Netlogon share on DC [group policy] (DC, 673) (DC, 540, 538, maybe more than once)

User logs on: Kerberos AS request (DC, 672), Kerberos TGS request for AD (DC, 673), Logon session created (workstation, 528, 576)

  • User gets policy: Kerberos TGS request for DC\Netlogon [logon scripts, group policy] (DC, 673), Network logon (DC, 540, 538, usually 2-3 rounds)

In Account Logon failures for Kerberos, the KDC has to generate an AS reply with an RFC 1510 error. Since RFC 1510 error codes don't contemplate Windows-specific errors, and we have to return Kerberos-specific errors in Kerberos AS request failure replies, we had to map Windows error conditions to kerberos error codes. The error code mappings are described in the Kerberos Troubleshooting document that is available on Microsoft.com: http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/tkerberr.mspx

Here are some questions that you might have about Account Logon events:

Q: Why do you only have the IP address in the Account Logon event, and not the computer name?
A: There are three reasons:

  1. There is no secure method for the KDC to get the remote machine's name at the current time.  If the client provides the name (as in NTLM), then it's not trustworthy and can be spoofed.  There are Unix-based hacking tools which spoof workstation name in NTLM auth requests.
  2. DNS and NetBIOS reverse lookup are not secure and are not reliable- if we tried this, we'd have a high incidence of incorrect or missing information, and hurt performance.
  3. Even if we chose to do add the name anyway, when we could, there's no field for us to use to carry it in Kerberos AS REQ & TGS REQ messages- we'd have to overload some other field, and run a high risk of loss of compatibility with MIT's reference implementation.

Q: How do I correlate the Account Logon event on a DC with the Logon/Logoff event on the machine which was accessed?
A: Easy!  The Account Logon event and the Logon/Logoff event both contain a field called a Logon GUID, starting in Windows Server 2003.  Just compare the GUIDs- if they match, it's the same Kerberos ticket.  Unfortunately this only works for Kerberos; other Logon events contain a GUID that is all zeroes.

Q: Is there such a thing as an Account Logoff event?
A: No. The DC is only aware of logons, not logoffs (there's no possible way to force a machine to contact a DC when logging off- consider crashes, etc.)

Q: I just want to monitor my DC's logs.  Is that good enough?
A: Well, the DC has a distorted view of logon as mentioned above.  Also, the DC only knows where the logon request came from most recently.  Consider using IIS- the logon request originates at a browser somewhere on the internet.  IIS receives the request and then sends a logon request to the DC.  From the DC's point of view, the source of the logon is IIS.  If you only collect the DC's logs, you'll miss the detail of where the request came from.  This is true for any network service- RPC, file sharing, remote desktop, etc.  Also, the DC doesn't have enough information to answer "how long was the user logged on".  However there is one really interesting piece of information in DC logs.  In event 673 (Kerberos Service Ticket granted), the service name is listed.  This is the most detail that the DC can provide, on what the user was logging on for.

Eric

posted @ 2008-08-05 11:17 joyclear 阅读(837) | 评论 (0)编辑 收藏

How to verify the Intelligent Message Filter SCL rating in Outlook 2003

Article ID : 895091
Last Review : October 11, 2007
Revision : 3.1

SUMMARY

The Microsoft Exchange Server Intelligent Message Filter (IMF) evaluates incoming messages for recognizable patterns. Then, the IMF assigns a spam confidence level (SCL) rating to the message. This rating is based on the probability that the message is unsolicited commercial e-mail ("spam"). This SCL rating is used to determine how the Exchange IMF handles messages.

Sometimes you may have to know whether the IMF works by checking the SCL rating of incoming messages. This article describes how to verify IMF functions by checking messages' SCL rating values in Microsoft Office Outlook 2003. This article discusses the following topics:
How to install the SCL Extension Form in Outlook 2003
How to add the SCL rating field into the column header of Outlook folders

Back to the top

MORE INFORMATION

How to install the SCL Extension Form in Outlook 2003

To read the SCL rating from messages in Outlook 2003, install the SCL extension Form first. To do this, follow these steps:
1. Open Notepad. To do this, click Start, click Run, type notepad.exe, and then click OK.
2. Copy and then paste the following text into Notepad.
[Description]
            MessageClass=IPM.Note
            CLSID={00020D31-0000-0000-C000-000000000046}
            DisplayName=SCL Extension Form
            Category=Standard
            Subcategory=Form
            Comment=This forms allows the SCL to be viewed as a column
            LargeIcon=IPML.ico
            SmallIcon=IPMS.ico
            Version=1.0
            Locale=enu
            Hidden=1
            Owner=Microsoft Corporation
            Contact=Your Name
            [Platforms]
            Platform1=Win16
            Platform2=NTx86
            Platform9=Win95
            [Platform.Win16]
            CPU=ix86
            OSVersion=Win3.1
            [Platform.NTx86]
            CPU=ix86
            OSVersion=WinNT3.5
            [Platform.Win95]
            CPU=ix86
            OSVersion=Win95
            [Properties]
            Property01=SCL
            [Property.SCL]
            Type=3
            NmidInteger=0x4076
            DisplayName=SCL
            [Verbs]
            Verb1=1
            [Verb.1]
            DisplayName=&Open
            Code=0
            Flags=0
            Attribs=2
            [Extensions]
            Extensions1=1
            [Extension.1]
            Type=30
            NmidPropset={00020D0C-0000-0000-C000-000000000046}
            NmidInteger=1
            Value=1000000000000000
3. Save this text file as Scl.cfg, and then exit Notepad.
4. Save the Scl.cfg file to the following location:
\Program Files\Microsoft Office\OFFICE11\FORMS\1033
5. Start Outlook 2003 by using a profile that is configured for the mailbox on the server that is running Microsoft Exchange Server 2003 together with IMF.
6. On the Tools menu, click Options.
7. On the Other tab, click Advanced Options.
8. In the Advanced Options dialog box, click Custom Forms.
9. In the Options dialog box, click Manage Forms.
10. In the Forms Manager dialog box, click Install.
11. Locate the Scl.cfg file. Then, click OK to confirm that the file was installed. If you successfully installed it, the SCL Extension Form item is listed in the Personal Forms library.

Back to the top

How to add the SCL rating field into the column header of Outlook folders

After you install the SCL extension Form, you still will not see the messages' SCL rating values right away. You have to add the SCL rating field to the column header. When you do this, you can automatically check the messages' SCL rating values that are listed in the SCL column in Outlook 2003.

To add the SCL rating field, follow these steps:
1. In Outlook 2003, click Inbox.
2. On the View menu, click Arrange By, and then click Custom.
3. In the Customize View: Messages dialog box, click Fields.
4. In the Show Fields dialog box, click the Select available fields from list, and then click Forms.
5. In the Select Enterprise forms for this folder dialog box, click Personal Forms on the list.
6. Locate SCL Extension From in the left pane, and then click Add to add it to the right pane. Click Close.
7. In the Show Fields dialog box, locate the SCL in the left pane, and then click Add to add it to the right pane.
8. Click OK two times.
9. In the Inbox, you will see a new column that is named SCL in the column header. All the messages in the Inbox show their SCL rating values under the SCL column.
Note You can also use this procedure in folders that are separate from the Inbox to check the SCL rating values for the messages in these folders.
posted @ 2008-07-30 15:21 joyclear 阅读(386) | 评论 (0)编辑 收藏
   SA和Information服务不会自动启动,手动启动正常

1) 在Exchange服务器上添加下面的注册表键值来延迟SA的启动时间

HKLM\System\CurrentControlSet\Services\MSExchangeSA\Parameters
Key (Type:DWORD): BootPause
Value: 300 (The value is in seconds <decimal>)

2) 添加下面的键值让Exchange Information Store 和Exchange Active Directory Topology 服务依赖于SA服务.

HKLM\System\CurrentControlSet\Services\MSExchangeADTopology
Key (Type: Multi_String): DependOnService
Value: MSExchangeSA

HKLM\System\CurrentControlSet\Services\MSExchangeIS
Key (Type: Multi_String): DependOnService
Value: MSExchangeSA

3) 重启Exchange服务器

posted @ 2008-07-25 16:40 joyclear 阅读(2380) | 评论 (5)编辑 收藏
 

Dcgpofix 如果以下两个默认 GPO 中的一个出现了问题,则可以使用该工具:默认域策略和默认域控制器策略。如果其中一个或全部两个 GPO 损坏,程度严重到仅靠配置方式已经无法修复,或者存在一些其他未知问题,则可以使用 dcgpofix 工具将其还原为默认状态。此工具包含在 Windows Server® 2003 中。不应在 Windows 2000 域控制器上运行此工具;可使用 Recreatedefpol 来代替。请记住,使用此工具后会丢失所有自定义设置。

Recreatedefpol 该工具类似于 Dcgpofix,但只用于 Windows 2000 服务器。可将两个默认的 GPO 返回到其刚安装的状态。此工具应仅用于灾难恢复,不可用于 GPO 的日常维护。单击此处下载该工具

Gpotool 由于 GPO 是从域控制器(最初先在此域控制器中进行更改,然后扩展到所有其他域控制器)复制的,因此可能会出现复制失败或聚合无效的现象。结果可能是对各目标计算机所适合应用的更改不一致或失败。像 Gpresult RSOP 这样的工具可以帮助确定应用了哪些 GPO,而 Gpotool 工具则可以帮助确定每个域控制器上的 GPO 是否一致。此工具是 Windows Server 2003 Resource Kit 的一部分,其网址为 go.microsoft.com/fwlink/?LinkId=77613

posted @ 2008-07-23 11:30 joyclear 阅读(457) | 评论 (0)编辑 收藏


posted @ 2008-07-22 17:43 joyclear 阅读(206) | 评论 (0)编辑 收藏

在Exchange 2007中的郵件傳送與接收大小的限制有下列幾個檢查點

http://technet.microsoft.com/en-us/library/bb124345.aspx

  • Origanizational Limit
  • Global Limit
  • Connector Limit
  • Server Limit
  • User Limit

 

在沒有Edge的情況下,Organizational以及User的收及發都是未設限,亦即Unlimited

假設整個ORG中你只有一台Hub Transport,以及只有一條Send Connector的話

那麼預設使用者寄出去及收進來都只有10MB.

因為預設Hub Transport上的Send & Receive Connector的最大message size都是10MB

你可以利用Set-SendConnector -MaxMessageSize以及Set-ReceiveConnector -MaxMessageSize cmdlet來改變預設的郵件傳送及接收大小

至於OWA預設在選取要加入的附件檔案的大小是30000 KB,你可以依照下面的作法做適當的修改

http://technet.microsoft.com/en-us/library/aa996835.aspx

要注意的是,即使OWA預設可上傳的附件檔大小為30000KB,不代表使用者就可以真的將30000KB大小的附件檔寄出

因為還是會受限於Send Connector預設10MB大小的限制

 

解決方法:使用ADSI EDIT設定

Configuration-->CN=Service-->CN=Microsoft Exchange-->CN=<Exchange ORG. Name>-->CN=Global Settings-->CN=Message Delivery-->滑鼠右鍵-->內容

delivContLength:<10240>                       (0~2097151KB)   預設值為10MB,最大可以設為2097151KB (2GB)
  submissionContLenght:<10240>             (0~2097151KB)     同上
  msExchReciplimit:<5000>                      (0~2147483647)   不用改

 

 

Exchange 2007傳送大小,使用MAPI時會受限於Global limits、Organizational limits、使用者信箱傳送大小的限制、Pickup大小的限制、集線傳輸規則的附件檔大小限制、Connector limits、OWA 2007 (Web.config file)的上傳下載大小限制。

 

    傳送大小的限制原則是:使用者的傳送大小或接收大小取決於使用者信箱的傳送大小限制之設定,若保持預設(沒有特別指定),再由Global及ORG.兩者的傳送大小限制來決定,但預設上,Global是限制10MB,而ORG是沒有限制,因此Global與ORG之間再取最小值,所以若使用者信箱沒有特別設定傳送大小限制,預設值會被限制在10MB。

 

 以上為純Exchange 2007安裝時的情況,若是由Exchange 2003或Exchange 2000升級上來的,則Global會保留原有設定, 一般人比較容易疏忽的是Global設定,因為這是舊版本Exchange的設定,只能由Exchange 2000或2003的管理介面去檢視或設定,若是純Exchange 2007的安裝,並沒有直接的管理介面或指令去指定,必須透過ADSI工具至AD的Configuration中設定。

 

Best regards.

 

Frank Hsieh

posted @ 2008-07-18 15:15 joyclear 阅读(1229) | 评论 (0)编辑 收藏
发现台湾微软技术社区还是比较热闹的,而且讨论问题也很专业~
 

Exchange server 2007已經開啟POP3、IMAP4服務,

LoginType 採用預設的 SecureLogin 加密方式,

用戶端使用 Outlook Express & Windows Mail,

在進階的部分也都開啟了使用 SSL 加密 port 的選項,

使用 POP3 或 IMAP4 收信也都正常

但是在某部分使用者寄信的時候,會出現下列錯誤而無法寄出郵件

 ====

無法傳送郵件,因為伺服器拒絕寄件者的電子郵件地址。寄件者的地址是 abc@abc.com.tw'。主旨 '1', 帳戶: 'abc', 伺服器: 'cas.abc.com.tw', 通訊協定: SMTP, 伺服器回應: '550 5.7.1 Client does not have permissions to send as this sender', 連接埠: 25, 安全(SSL): , 伺服器錯誤: 550, 錯誤碼: 0x800CCC78

====

看起來似乎是調整一下權限即可,

不過卻不知道從何下手,請問有人解決過這個問題嗎?


Hi Joseph,

 

再仔細分析你的情況,假設是Exchange 2000 或Exchange 2003升級上來的,那麼曾經加入或現在還是Enterprise Admins或Domain Admins的帳號,在升級至Exchange 2007後,最有可能發生這情況,那是因為加入了這些群組後,AD的繼承自動會被拿掉,因此會造成升級後OWA及POP3有問題。Administrator、Enterprise admins、Domain Admins等帳號或群組的成員有許多權限是被設為『拒絕』的。

 

你可以使用『Active Directory使用者及電腦』程式,將檢視選擇為『進階功能』,然後點選『有問題的帳號』-->內容-->安全性標籤,檢查看看有沒有SELF帳號,若沒有把它加進來(選擇新增-->手動輸入SELF-->確定),正常應有此帳號,接著在『安全性標籤頁選擇『進階』,檢查一下『允許從父項繼承權限套用到這個物件和所有的子物件,包括明確定義於此的項目(A)』選項是否未勾選,一般的帳號應會勾選起來,若沒有勾選,接著直接點選『預設』按鈕,會自動勾選起來,然後再按確定-->等同步後再重試一次寄信,記得按『預設』按鈕,它會把原來該有的權限加入。

 

即使有SELF帳號,『允許從父項繼承權限套用到這個物件和所有的子物件,包括明確定義於此的項目(A)』選項也有勾選,也應按一下『預設』按鈕,因為有些權限有可能某些因素被拿掉。

 

Best regards,

Frank Hsieh

posted @ 2008-07-18 13:27 joyclear 阅读(1216) | 评论 (1)编辑 收藏
Component  Description
Submission Queue Stores All messages on disk until processed
Store Driver Retrieves messages from sender's outbox
MicrosoftExchange Mail Submission service Notifies a Hub Transport Server role in the local Active Directory site when a message is avaiable for retrieval from a sender's outbox
Pickup directory Submits message to the Submission queue
Categorizer Processes one message at a time from the Submission queue

Submission Queue
在边缘传输服务器和中心传输服务器上,当Exchange Transport服务启动时,分类进程(Categorizer)会创建一个递交队列。递交队列存储所有的邮件在硬盘上,直到分类进程决定以下一步传递。所有的邮件都要递交到递交队列后,然后才能被分类。当一份邮件被分类进程执行后,它仍然保留在递交队列里面,成功分类后,邮件移除出递交队列。
发送到递交队列的邮件方式:
1.从SMTP接受器接受的邮件
2.在Pickup目录的邮件
3.递交到Store driver的邮件
4.失败传递后重新递交的邮件

Store Driver
当一份邮件在用户发件箱进行发送时,存储驱动从发送信箱接受邮件,递交到递交队列。当一份邮件成功添加到递交队列,邮件从发件箱移动到已发送邮箱。
存储驱动负责将邮件在Outbox中的MAPI格式,转换为S/TNEF(Summary Transport Neutral Encapsulation Format)格式,如果存储驱动不能转换,NDR报告产生。

Microsoft Exchange Mail Submission Service
Microsoft Exchange Mail Submission Service是运行在Mailbox服务器上的提示服务。当一份邮件在发送者outbox中可以被接受时,通知Hub Transport Server服务器。Store Driver接受邮件。
当在一个AD站点中有多台Hub Transport服务器,Microsoft Exchange Mail Submission services尝试平均发布通知。

Pickup Directory
大部分的邮件传输通过SMTP接受器或者通过Store Driver递交,但是邮件也能通过在边缘或中心传输服务器的Pickup目录进行传递。
放置在Pickup目录的邮件递交Submission Queue,当在递交队列中被递交到分类进程后,邮件从Pickup目录中删除。放置在Pickup目录中的邮件需要符合适当的格式和读/写权限。

Categorizer

分类进程从递交队列中提取邮件,在递交队列中总是更早的邮件被优先提取。

在边缘服务器,分类进程仅仅处理收件人地址是否符合这一条件,然后邮件直接传递到传输队列。通过传输队列,邮件路由到中心传输服务器。

在中心传输服务器上,分类进程执行下列的任务:

1.       判断和检查收件人

2.       多收件人邮件进行分叉

3.       判断路由路径

4.       转换内容格式

5.       应用组织邮件策略

 

单个AD站点中邮件的传递流向工作

1.  当一份邮件递交到邮箱服务器邮箱存储上时,邮件流开始。如果客户端是office outlook客户端,邮件通过MAPI提交,邮件直接写在用户outbox中。

2.  Microsoft Exchange Mail Submission service检测到邮件可用(outbox),它选择一台可用的中心传输服务器角色,递交一个邮件通知给Store Driver

3.  Store Driver(中心传输服务器的传输服务组件)使用MAPI连接到用户的outbox,收集所有需要发送的邮件。将邮件递交到递交队列,然后将邮件从outbox移动到已发送邮箱。

4.  当邮件目的是同一个AD站点的邮箱服务器,邮件被提交到Local Delivery Queue,然后store driver 通过MAPI传递邮件到邮箱服务器角色。

5.  当邮件目的是另一个AD站点的邮件服务器,中心传输服务器使用AD站点链接信息来判断到目的站点的路由,当路径确定后,中心传输服务器会直接连接到远程站点的服务器。如果在目的站点没有中心传输服务器可用,邮件将被路由到离目的站点最近的中心传输服务器。

6.  当邮件目的是Internet,中心传输服务器提交邮件到边缘服务器。




参考自MOC教材


posted @ 2008-07-14 17:01 joyclear 阅读(423) | 评论 (0)编辑 收藏

The "Perform Reverse DNS Lookup for Incoming Messages" Option Is for Host Name Resolution

Article ID : 297412
Last Review : December 3, 2007
Revision : 4.5
This article was previously published under Q297412

SUMMARY

This article describes the Perform Reverse DNS Lookup for Incoming Messages option and how its function can be misinterpreted by Exchange administrators.

MORE INFORMATION

The Perform Reverse DNS Lookup for Incoming Messages option is located on the Default Virtual SMTP Server Properties dialog box: On the Delivery tab, click Advanced. Exchange administrators may misinterpret the function of this option: They may expect Exchange to reject e-mail messages that originate from unresolved domains.

Some messaging systems verify the existence of the e-mail domain of the sender before they accept a "Mail from: user@domain.com" Simple Mail Transfer Protocol (SMTP) entry at the beginning of a new message delivery session. If the domain name cannot be resolved by means of Domain Name System (DNS), the session is disconnected and an error 501 is generated. This behavior is mainly used to prevent you from receiving spam (unsolicited e-mail messages). Microsoft Exchange Server 5.5 and later do not use this feature.

In Exchange System Manager, the Perform Reverse DNS Lookup for Incoming Messages option does not have the same function of the feature that had been previously described (the function to prevent the receipt of spam e-mail messages). When the preceding option is used, Exchange Server performs a DNS query to resolve the originating Internet Protocol (IP) address of the incoming messages to a host name. Then, the host name is attached to the headers of e-mail messages.

If you enable the Perform Reverse DNS Lookup for Incoming Messages option, you may have some performance degradation issues because of misconfigured DNS records and/or intermittent connections to the Internet. Therefore, you may want to disable this option when the Internet mail delivery is slower than expected.

By default, Exchange Server 5.5 performs a reverse lookup operation on all connections. This default operation, however, can be disabled by using a DisableReverseResolve registry setting.

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
258745 (http://support.microsoft.com/kb/258745/EN-US/) XIMS: Internet Mail Service Displays SMTP Banner Slowly
198981 (http://support.microsoft.com/kb/198981/EN-US/) XIMS: SMTP Messages Not Being Delivered to Certain Domains
262571 (http://support.microsoft.com/kb/262571/EN-US/) XCON: Internet Mail Service Registry Entry for DisableReverseResolve Does Not Map to Default SMTP Virtual Server After You Upgrade to Exchange 2000
posted @ 2008-07-14 10:34 joyclear 阅读(885) | 评论 (0)编辑 收藏

最近有客户反映使用RBL后,一些不在列表里面的服务器也会被阻止,又是电信干的好事。
google了一下,有篇不错的技术分析文章。

作者:wxy 2008-06-10 12:35:00

   最近接到了一些反馈说,在使用我们的RBL时,会拒绝所有入站信件。据我们判断,应该是查询者使用了具有DNS劫持的DNS服务器所导致。

  首先,我们先简单说一下RBL的原理。目前用于垃圾邮件过滤的RBL服务,应该称之为基于DNS的实时黑名单查询,也就是说,这个服务是通过DNS协议来完成的。

  具体而言,当一个客户端希望查询某个IP地址(如11.22.33.44)是否在某个RBL(如cbl.anti-spam.org.cn)中是,其实际上是查询如下地址是否存在解析: 44.33.22.11.cbl.anti-spam.org.cn. (IP地址逆转附加在RBL地址后)。DNS的解析分为几种类型,对于RBL查询,通常是查询这个地址是否存在A记录、TXT记录或者任意(ANY)记录。

  如果该地址被列入了这个RBL,那么查询会返回一个具体的解析结果,根据RBL和查询的不同,可以返回一段文本,也可以返回一个或几个IP地址,也可以同时返回文本和IP。返回的文本通常是一个说明,用来说明这个IP地址被列入了哪个RBL,具体信息去哪里查询等。返回的IP地址并不具有实际意义,只是标识该查询有结果,通常这个IP地址是一个保留IP段的地址,如127.0.0.1、127.0.0.2等。

  如果该地址没有被列入这个RBL,那么该查询会返回一个查询错误(NXDOMAIN),表示该地址未列入。DNS劫持就发生在这里,具体情况我们下面再详细解释。

  举例说明这个查询过程:

  当查询的IP地址不在RBL中时,返回状态为MXDOMAIN。

# dig 44.33.22.11.cbl.anti-spam.org.cn.

; <<>> DiG 9.3.3rc2 <<>> 44.33.22.11.cbl.anti-spam.org.cn.
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 58553
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;44.33.22.11.cbl.anti-spam.org.cn. IN   A

;; AUTHORITY SECTION:
cbl.anti-spam.org.cn.   3600    IN      SOA     cbl.anti-spam.org.cn. wxy.anti-spam.org.cn. 2008061006 14400 3600 14400 3600

;; Query time: 8 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jun 10 09:28:55 2008
;; MSG SIZE  rcvd: 90
 

  当查询的IP地址在RBL中时,返回状态为NOERRO,并给出具体的结果:127.0.8.2(这里使用RBL的测试地址127.0.0.2,通常RBL都会提供一个特定地址,用于测试RBL是否工作)。

# dig 2.0.0.127.cbl.anti-spam.org.cn.          

; <<>> DiG 9.3.3rc2 <<>> 2.0.0.127.cbl.anti-spam.org.cn.
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5032
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 6, ADDITIONAL: 0

;; QUESTION SECTION:
;2.0.0.127.cbl.anti-spam.org.cn.        IN      A

;; ANSWER SECTION:
2.0.0.127.cbl.anti-spam.org.cn. 10800 IN A      127.0.8.2

;; AUTHORITY SECTION:
cbl.anti-spam.org.cn.   10800   IN      NS      ns1.anti-spam.org.cn.
cbl.anti-spam.org.cn.   10800   IN      NS      ns3.anti-spam.org.cn.
cbl.anti-spam.org.cn.   10800   IN      NS      ns4.anti-spam.org.cn.
cbl.anti-spam.org.cn.   10800   IN      NS      ns5.anti-spam.org.cn.
cbl.anti-spam.org.cn.   10800   IN      NS      ns7.anti-spam.org.cn.
cbl.anti-spam.org.cn.   10800   IN      NS      ns8.anti-spam.org.cn.

;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jun 10 09:31:01 2008
;; MSG SIZE  rcvd: 172

 

  查询TXT记录的结果如下(通常收到由于RBL列入而退回的信件中的退信消息就是来自这里的):

# dig 2.0.0.127.cbl.anti-spam.org.cn. TXT

; <<>> DiG 9.3.3rc2 <<>> 2.0.0.127.cbl.anti-spam.org.cn. TXT
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21173
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 6, ADDITIONAL: 0

;; QUESTION SECTION:
;2.0.0.127.cbl.anti-spam.org.cn.        IN      TXT

;; ANSWER SECTION:
2.0.0.127.cbl.anti-spam.org.cn. 10800 IN TXT    "Mail from 127.0.0.2 refused, see http://anti-spam.org.cn/Rbl/Query/Result?IP=127.0.0.2"

;; AUTHORITY SECTION:
cbl.anti-spam.org.cn.   10675   IN      NS      ns5.anti-spam.org.cn.
cbl.anti-spam.org.cn.   10675   IN      NS      ns7.anti-spam.org.cn.
cbl.anti-spam.org.cn.   10675   IN      NS      ns8.anti-spam.org.cn.
cbl.anti-spam.org.cn.   10675   IN      NS      ns1.anti-spam.org.cn.
cbl.anti-spam.org.cn.   10675   IN      NS      ns3.anti-spam.org.cn.
cbl.anti-spam.org.cn.   10675   IN      NS      ns4.anti-spam.org.cn.

;; Query time: 37 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jun 10 09:33:06 2008
;; MSG SIZE  rcvd: 255

  在明白了RBL查询的原理后,我们来看一下RBL劫持的发生原因。

  由于国内很多用户在使用电信企业的线路连接互联网时,都会使用接入的ISP所提供的DNS,有的是明确设置使用的,有的是通过PPPoE或DHCP分配使用的。最近一些年来,电信企业为了引导用户访问其增值站点或合作站点,通过会对其DNS做一些修改,在接收到一个不存在结果的DNS查询时,总是返回一些特定的IP地址,使用户访问到这些增值站点。比如你在使用ADSL上网时,如果随便在浏览器的地址栏中任意敲入一个无效的域名,通常都会给你重定向到电信企业自己的门户站点。

  一般而言,这种行为对于用户没有多大的损害,最多只是扭曲了用户意志,强制其访问另外一个站点而已。但是,对于使用RBL来防范垃圾邮件的用户,这种DNS劫持就会带来较大的麻烦。在这种情况下,所有的DNS查询都会返回一个有效的结果,换言之,无论任何发来邮件的IP地址,都会被认为列入到了RBL中,用户将接收不到任何外部邮件。

  那么如何应对这种情况呢?有两种办法:

  一是使用一个可信的,没有被DNS劫持的DNS服务器。国内电信企业的DNS被劫持的情形比较多,尤其是做接入的ISP的DNS服务器,很多都存在劫持问题。可以考虑使用国外的公开DNS、或者一些未劫持的DNS服务器。但是要注意的是,不能使用不支持公开解析请求的DNS,即那种只解析特定域名的DNS服务器是不能用来解析其他域名的;类似的,根域服务器(*.ROOT-SERVERS.NET)也是不提供这种公开解析请求的功能的。可以通过nslookup或dig以及其它工具来测试一个DNS服务器是否可以提供公开解析功能,以及是否被劫持。

  查询一个DNS服务器是否提供公开查询可以做如下测试:

# dig sina.com. @A.ROOT-SERVERS.NET.

; <<>> DiG 9.3.3rc2 <<>> sina.com. @A.ROOT-SERVERS.NET.
; (2 servers found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63123
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 14

;; QUESTION SECTION:
;sina.com.                      IN      A

;; AUTHORITY SECTION:
com.                    172800  IN      NS      H.GTLD-SERVERS.NET.
com.                    172800  IN      NS      I.GTLD-SERVERS.NET.
com.                    172800  IN      NS      J.GTLD-SERVERS.NET.
com.                    172800  IN      NS      K.GTLD-SERVERS.NET.
com.                    172800  IN      NS      L.GTLD-SERVERS.NET.
com.                    172800  IN      NS      M.GTLD-SERVERS.NET.
com.                    172800  IN      NS      A.GTLD-SERVERS.NET.
com.                    172800  IN      NS      B.GTLD-SERVERS.NET.
com.                    172800  IN      NS      C.GTLD-SERVERS.NET.
com.                    172800  IN      NS      D.GTLD-SERVERS.NET.
com.                    172800  IN      NS      E.GTLD-SERVERS.NET.
com.                    172800  IN      NS      F.GTLD-SERVERS.NET.
com.                    172800  IN      NS      G.GTLD-SERVERS.NET.

;; ADDITIONAL SECTION:
A.GTLD-SERVERS.NET.     172800  IN      A       192.5.6.30
A.GTLD-SERVERS.NET.     172800  IN      AAAA    2001:503:a83e::2:30
B.GTLD-SERVERS.NET.     172800  IN      A       192.33.14.30
B.GTLD-SERVERS.NET.     172800  IN      AAAA    2001:503:231d::2:30
C.GTLD-SERVERS.NET.     172800  IN      A       192.26.92.30
D.GTLD-SERVERS.NET.     172800  IN      A       192.31.80.30
E.GTLD-SERVERS.NET.     172800  IN      A       192.12.94.30
F.GTLD-SERVERS.NET.     172800  IN      A       192.35.51.30
G.GTLD-SERVERS.NET.     172800  IN      A       192.42.93.30
H.GTLD-SERVERS.NET.     172800  IN      A       192.54.112.30
I.GTLD-SERVERS.NET.     172800  IN      A       192.43.172.30
J.GTLD-SERVERS.NET.     172800  IN      A       192.48.79.30
K.GTLD-SERVERS.NET.     172800  IN      A       192.52.178.30
L.GTLD-SERVERS.NET.     172800  IN      A       192.41.162.30

;; Query time: 267 msec
;; SERVER: 198.41.0.4#53(198.41.0.4)
;; WHEN: Tue Jun 10 09:58:33 2008
;; MSG SIZE  rcvd: 498

  在上面这个测试中,我们使用根域服务器来查询 sina.com这个域名,返回的结果是NOERROR,但是没有ANSWER区来给出具体的IP地址。这表明该服务器(A.ROOT-SERVERS.NET.)不支持公开查询。

 

# dig sina.com. @202.106.196.115   

; <<>> DiG 9.3.3rc2 <<>> sina.com. @202.106.196.115
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47283
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3

;; QUESTION SECTION:
;sina.com.                      IN      A

;; ANSWER SECTION:
sina.com.               1978    IN      A       71.5.7.191

;; AUTHORITY SECTION:
sina.com.               1976    IN      NS      ns1.sina.com.cn.
sina.com.               1976    IN      NS      ns2.sina.com.cn.
sina.com.               1976    IN      NS      ns3.sina.com.cn.

;; ADDITIONAL SECTION:
ns1.sina.com.cn.        84804   IN      A       202.106.184.166
ns2.sina.com.cn.        84804   IN      A       61.172.201.254
ns3.sina.com.cn.        84804   IN      A       202.108.44.55

;; Query time: 2 msec
;; SERVER: 202.106.196.115#53(202.106.196.115)
;; WHEN: Tue Jun 10 11:19:13 2008
;; MSG SIZE  rcvd: 155

  在上面这个测试中,我们使用了一个公开的DNS服务器来查询sina.com 这个域名,返回了正确的解析结果。说明该服务器支持公开查询。

  当使用该服务器查询一个不存在的域名时,如查询sina11111.com :

# dig sina11111.com. @202.106.196.115

; <<>> DiG 9.3.3rc2 <<>> sina11111.com. @202.106.196.115
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 48272
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;sina11111.com.                 IN      A

;; AUTHORITY SECTION:
com.                    900     IN      SOA     a.gtld-servers.net. nstld.verisign-grs.com. 1213068006 1800 900 604800 900

;; Query time: 697 msec
;; SERVER: 202.106.196.115#53(202.106.196.115)
;; WHEN: Tue Jun 10 11:19:22 2008
;; MSG SIZE  rcvd: 104

  这里返回了NXDOMAIN结果,表明该服务器没有被DNS劫持。

  而当我们使用了一个被劫持的DNS(在笔者测试期间还存在劫持情形)来查询一个不存在的域名:sina1234122323.com. ,查询返回结果是一个特定的IP : 220.250.64.22 (这是一个网通的地址)。

# dig sina1234122323.com. @210.22.70.3      

; <<>> DiG 9.3.3rc2 <<>> sina1234122323.com. @210.22.70.3
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43129
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;sina1234122323.com.            IN      A

;; ANSWER SECTION:
sina1234122323.com.     3600    IN      A       220.250.64.22

;; AUTHORITY SECTION:
com.                    900     IN      SOA     a.gtld-servers.net. nstld.verisign-grs.com. 1213069571 1800 900 604800 900

;; Query time: 2389 msec
;; SERVER: 210.22.70.3#53(210.22.70.3)
;; WHEN: Tue Jun 10 11:45:29 2008
;; MSG SIZE  rcvd: 125

  当使用该DNS查询一个存在的域名是能正确返回其IP地址。这种针对不存在的域名强制劫持到一个特定的IP的行为导致了RBL的查询返回错误。

  二是对RBL查询结果进行验证。基本上所有的RBL服务都会返回特定的查询结果,即每次都返回同样的一个或几个IP地址,而且这种IP地址通常都是特定的保留IP,不会出现在正常的DNS查询中,如127.0.0.2、127.0.8.2等。目前绝大多数支持RBL查询的邮件服务器都支持对查询结果进行验证,你可以根据RBL服务所公示的查询结果来设置你的RBL查询。

  本站所提供的RBL的查询验证码如下:

名称 地址 测试地址 返回状态码
CBL cbl.anti-spam.org.cn 2.0.0.127.cbl.anti-spam.org.cn. 127.0.8.2
CDL cdl.anti-spam.org.cn 0.0.0.240.cdl.anti-spam.org.cn. 127.0.8.4
CBL+ cblplus.anti-spam.org.cn 2.0.0.127.cblplus.anti-spam.org.cn. 127.0.8.6
CBL- cblless.anti-spam.org.cn 2.0.0.127.cblless.anti-spam.org.cn. 127.0.8.5

  因此,鉴于国内DNS劫持的情形日益严重,在使用RBL服务时,要确认自己的DNS是否存在劫持;而且最好设置验证码,这样即便DNS当时未被劫持,将来发生了劫持也不会影响到邮件服务。

posted @ 2008-07-14 10:12 joyclear 阅读(232) | 评论 (0)编辑 收藏
仅列出标题
共9页: 1 2 3 4 5 6 7 8 9