Loading... # 1.**样本概况** ## **1.1** 样本信息 病毒名称:xiongmao.exe 所属家族:Win.Worm.Fujack-25 MD5值:512301c535c88255c9a252fdf70b7a03 SHA1值:ca3a1070cff311c0ba40ab60a8fe3266cfefe870CRC32: 病毒行为: 病毒软件FSG2.0 加壳,可以感染系统中的exe,com,pif,scr,html,asp等文件。终止大量的反病毒工具。运行之后创建spo0lsv进程 启动项,网络方面有向外发出的请求。 ## **1.2** 测试环境及工具 运行环境:Windows7 32专业版 分析工具:PCHunter、Process Explorer、火绒剑、WSExplorer 逆向工具:OD、PEID、ResourceHacker、DIE ## **1.3** 分析目标 对目标进行行为分析,并在病毒运行之后对系统发生的改变记录,对影响的范围评估。并试着修复 # **2.具体行为分析** ## **2.1**主要行为 ## **2.1.1** ****恶意程序对用户造成的危害(图)**** ![image.png](http://www.irohane.top/usr/uploads/2021/01/3095858705.png) ## 2.1.2 恶意程序对文件操作分析 ![image.png](http://www.irohane.top/usr/uploads/2021/01/4009407964.png)![image.png](http://www.irohane.top/usr/uploads/2021/01/933455513.png)上图所示在程序启动后,会创建一个Spo0lsv.exe程序。然后会运行起来后续操作由Spo01.exe这个程序操作,在文件夹下创建Desktop.ini 在下面写入一个当前日期。![image.png](http://www.irohane.top/usr/uploads/2021/01/1979361701.png)所创建的文件均为隐藏属性。必须使用PCHunter 去除隐藏 ## **2.1.3 注册表的操作**![image.png](http://www.irohane.top/usr/uploads/2021/01/980741319.png) 主要对其进行了隐藏和自启动设置 ## **2.1.4 进程的操作** ![image.png](http://www.irohane.top/usr/uploads/2021/01/3474075082.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/1300797325.png) 枚举了窗口,然后打开了进程,之后创建,然后对进程进行恢复。 ![image.png](http://www.irohane.top/usr/uploads/2021/01/3022947740.png) 之后创建了SOCKET 网络套接字服务,应该有网络通讯活动 ## **2.1.5 网络的操作** 在网络检测对一下网站有请求访问 [www.tom.com](http://www.tom.com) [www.163.com](http://www.163.com) [www.sohu.com](http://www.sohu.com) [www.yahoo.com](http://www.yahoo.com) ![image.png](http://www.irohane.top/usr/uploads/2021/01/543122003.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/1308134470.png) 对局域网电脑进行连接操作 ![image.png](http://www.irohane.top/usr/uploads/2021/01/530424447.png) ## **2.2** 恶意代码分析 ## **2.2 ****恶意程序的代码分析****** ## **2.2** ****IDA 分析**** ![image.png](http://www.irohane.top/usr/uploads/2021/01/3107938563.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/3699099026.png) ## **2.2**.1 ****第一个Func**** ### **1.获取当前文件,对ini文件判断是否存在** 首先会获取 病毒当前路径然后拼接为 路径/Desktop.ini,之后查找是否有个文件,如果有的话之后对其删除操作。 ![image.png](http://www.irohane.top/usr/uploads/2021/01/2577930673.png) ### **2.对文件路径判断** ![image.png](http://www.irohane.top/usr/uploads/2021/01/1217248061.png) ### **3.复制当前文件到系统文件夹下** ![image.png](http://www.irohane.top/usr/uploads/2021/01/993717744.png) ## **2.2**.2 ****第二个Func**** ![image.png](http://www.irohane.top/usr/uploads/2021/01/3324795313.png) ### 1. **CreateThread 回调函数** ![image.png](http://www.irohane.top/usr/uploads/2021/01/2531777335.png) #### 1. **Sub_409348 感染文件函数** 拼接盘符://* 获取里面的内容并对其进行比对,如果是文件夹就比对是否是系统文件夹,如果是的话就不感染。 ![image.png](http://www.irohane.top/usr/uploads/2021/01/507313303.png) 在比对结束后,还会对文件夹下的Desktop.ini 文件进行检查,如果有文件就更新时间,并跳过,如果没有就感染,并创建Desktop.ini文件,Desktop内部是感染日期 ![](file:///C:\Users\ADMINI~1\AppData\Local\Temp\ksohtml7540\wps53.jpg)![image.png](http://www.irohane.top/usr/uploads/2021/01/2431401009.png) #### 1. **感染EXE****** ![image.png](http://www.irohane.top/usr/uploads/2021/01/26820057.png) 通过比较后缀的形式对,文件类型进行判断。 ![image.png](http://www.irohane.top/usr/uploads/2021/01/2811113937.png) 首先获取文件名,然后获取所有正在运行的程序的名称对其进行比对,如果没有找到该文件有启动的进程就进行感染工作 ![image.png](http://www.irohane.top/usr/uploads/2021/01/3614916426.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/931196442.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/2161845109.png) #### 1. **感染网页** ![image.png](http://www.irohane.top/usr/uploads/2021/01/3269271648.png) ### 1. **SetTiemr 定时器回调函数** 在这个回调函数里,检测根目录下的inf文件,setup.exe 是否存在,如果不存在就创建。 每过一段时间检测一次。 ![image.png](http://www.irohane.top/usr/uploads/2021/01/1356632266.png) setup.exe 检测 ![image.png](http://www.irohane.top/usr/uploads/2021/01/1449229060.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/300385180.png) .inf 文件检测 ![image.png](http://www.irohane.top/usr/uploads/2021/01/3528701715.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/1309047946.png) ### 1. **InBeginThread** 分析回调函数 ![image.png](http://www.irohane.top/usr/uploads/2021/01/1025720572.png) 函数内部连接循环获取当前地址 1/255 连接 445 139端口 ![image.png](http://www.irohane.top/usr/uploads/2021/01/3954568760.png) 从火绒剑中可以看到,正在连接局域网的139、445端口 ![image.png](http://www.irohane.top/usr/uploads/2021/01/1945652225.png) ## **2.2**.3 ****第三个Func**** ![image.png](http://www.irohane.top/usr/uploads/2021/01/85612838.png) ### 1. **第一个定时器** 主要负责启动项和注册表 ![image.png](http://www.irohane.top/usr/uploads/2021/01/2344112467.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/697001596.png) ### 1. **第三个定时器** 关于第二个定时器和第三个一样,第二个定时器是下载 创建两个线程,关闭一个计时器 第一个,探测网络,下载网络文件 第二个,查找共享文件 ![image.png](http://www.irohane.top/usr/uploads/2021/01/3984834191.png) Sub_40CC34 ![image.png](http://www.irohane.top/usr/uploads/2021/01/717197025.png) Sub_40CDEC ![image.png](http://www.irohane.top/usr/uploads/2021/01/2801811522.png) ### 1. **第四个定时器** ![image.png](http://www.irohane.top/usr/uploads/2021/01/3830363544.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/2592053704.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/3021810654.png) ### 1. **第五个定时器** 首先会发起网页连接,然后判断网络是否可以连通 会根据网络连通状态来进行下载文件。 ![image.png](http://www.irohane.top/usr/uploads/2021/01/1086112128.png)![image.png](http://www.irohane.top/usr/uploads/2021/01/3533594469.png) # **3.解决方案** 建议中毒主机进行物理隔离处理,避免传染给其他主机。 ## **3.1**提取病毒的特征,利用杀毒软件查杀 脱壳思路及实现,如下图,熊猫烧香感染exe文件在源文件的基础上又重叠了一个PE头实现感染,在被感染文件的末尾,有明显的WhBoy+文件名+”.exe”+之前文件的大小,可以这么实现病毒检测和脱壳 ![image.png](http://www.irohane.top/usr/uploads/2021/01/1538861841.png) ![image.png](http://www.irohane.top/usr/uploads/2021/01/1400262500.png) 脱壳使用python 实现,简单的读取文件然后使用re模块查找到特征,然后从之前的PE位置重新写入到最后的一个文件 最后修改:2021 年 01 月 19 日 © 允许规范转载 赞 0 如果觉得我的文章对你有用,请随意赞赏