今天对自制的绿色版 Dr.Web 升级,发现屡次升级都失败,提示找不到服务器。检查网络连接,正常;检查 C:\Windows\System32\Drivers\Etc\Hosts 文件,正常;nslookup 查询 Dr.Web 服务器正常;ping Dr.Web 服务器失败(见下文);重置 WinSock ,故障依旧。初步判断是因为系统感染了劫持本地 DNS 的病毒所致,于是便有了下面的杀毒历程。
先 Show 一下奇怪的现象(1.1.1.1 为虚假地址,真实地址正常)
C:\>ipconfig /all
Windows IP Configuration #经检查,所有参数都正常
Host Name . . . . . . . . . . . . : NoteBook
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC
Physical Address. . . . . . . . . : 00-14-78-10-24-XX
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 1.1.1.1
Subnet Mask . . . . . . . . . . . : 1.1.1.1
Default Gateway . . . . . . . . . : 1.1.1.1
DHCP Server . . . . . . . . . . . : 1.1.1.1
DNS Servers . . . . . . . . . . . : 1.1.1.1
1.1.1.1
Lease Obtained. . . . . . . . . . : 2009年9月6日 21:42:56
Lease Expires . . . . . . . . . . : 2009年9月7日 1:42:56
C:\>nslookup www.google.com
Server: 1.1.1.1
Address: 1.1.1.1
Name: www.l.google.com
Addresses: 64.233.189.103, 64.233.189.104, 64.233.189.147, 64.233.189.99
Aliases: www.google.com
C:\>Pinging www.l.google.com [64.233.189.147] with 32 bytes of data:
Reply from 64.233.189.147: bytes=32 time=46ms TTL=239
Reply from 64.233.189.147: bytes=32 time=51ms TTL=239
Reply from 64.233.189.147: bytes=32 time=66ms TTL=239
Reply from 64.233.189.147: bytes=32 time=72ms TTL=239
Ping statistics for 64.233.189.147:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 46ms, Maximum = 72ms, Average = 58ms
C:\>nslookup www.kaspersky.com
Server: 1.1.1.1
Address: 1.1.1.1
Name: www.kaspersky.com
Address: 195.27.181.10
C:\>Ping www.kaspersky.com
Ping request could not find host www.kaspersky.com. Please check the name and try again.
C:\>nslookup www.kaspersky.com.cn
Server: 1.1.1.1
Address: 1.1.1.1
Name: www.kaspersky.com.cn.fastcdn.com
Addresses: 58.198.42.10, 58.198.42.11, 58.198.42.8, 58.198.42.9
Aliases: www.kaspersky.com.cn
C:\>Ping www.kaspersy.com.cn
Ping request could not find host www.kaspersky.com.cn. Please check the name and try again.
C:\>nslookup www.drweb.com
Server: 1.1.1.1
Address: 1.1.1.1
DNS request timed out.
timeout was 2 seconds.
Name: boss.drweb.com
Address: 87.242.72.150
Aliases: www.drweb.com
C:\>Ping www.drweb.com
Ping request could not find host www.drweb.com. Please check the name and try again.
C:\>nslookup www.drweb.com.cn
Server: 1.1.1.1
Address: 1.1.1.1
Name: www.drweb.com.cn
Address: 60.217.32.246
C:\>ping www.drweb.com.cn
Ping request could not find host www.drweb.com.cn. Please check the name and try again.
C:\>nslookup www.rising.com.cn
Server: 1.1.1.1
Address: 1.1.1.1
Name: www.rising.com.cn
Addresses: 211.103.159.89, 219.238.233.203
C:\>Ping www.rising.com.cn
Ping request could not find host www.rising.com.cn. Please check the name and try again.
C:\>nslookup www.pandasecurity.com
Server: 1.1.1.1
Address: 1.1.1.1
DNS request timed out.
timeout was 2 seconds.
Name: a1331.b.akamai.net
Addresses: 61.200.81.150, 61.200.81.142
Aliases: www.pandasecurity.com, pandasecurity.com.edgesuite.net
C:\>ping www.pandasecurity.com
Ping request could not find host www.pandasecurity.com. Please check the name and try again.
先找出 Autoruns ,发现如下异常项目
HKLM\System\CurrentControlSet\Services
Nla 收集并保存网络配置和位置信息,并在信息改动时通知应用程序。 (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
HKLM\System\CurrentControlSet\Services\WinSock2\Parameters\NameSpace_Catalog5\Catalog_Entries
Tcpip Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
网络位置知晓 (NLA) 名称空间 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
HKLM\System\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9\Catalog_Entries
000000000001 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000002 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000003 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000004 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000005 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000006 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000007 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000008 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000009 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000010 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000011 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000012 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000013 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000014 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000015 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000016 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000017 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000018 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000019 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000020 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000021 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
用 Process Explorer 查看进程并查询该模块,得到如下结果

mswsock.dll 注入进程
把 c:\windows\system32\mswsock.dll 这个文件上传至 VirScan.ORG 扫描,得出结果如下

mswsock.dll 的扫描结果
现在基本上已经确定了它是一个病毒,剩下的事情就好办多了。基本杀毒过程如下:
1,删除 c:\windows\system32\dllcache\mswsock.dll 和 c:\windows\system32\mswsock.dll 。此病毒的反删除能力很弱,直接使用 del 命令即可。记住要同时删除这两个文件,否则病毒还会死灰复燃。
2,在 Autoruns 里删除上述注册表项。
3,重新从 Windows 安装光盘里复制正常的 mswsock.dll 到 C:\Windows\System32 目录下
4,重新安装 Tcp/IP 协议
系统终于恢复正常了。
重启后,电脑恢复正常,无论是 Dr.Web 升级还是 Ping 那些杀毒软件的官方地址,都没有任何问题了。
相关链接
如何在 Windows XP 中重置 Internet 协议 (TCP/IP)