Static analysis of malicious code analysis _Lab01-03_

Lab01-03.exe

Problems and Analyzes

First asked

The Lab01-03.exe file uploaded to http://www.VirusTotal.com/ analyze and view reports. File to match the existing features of anti-virus software do?
Here Insert Picture DescriptionHere Insert Picture Description
Use virustotal.comviewer of the report above, to match the existing anti-virus software features

  1. Suspicious suspicious questions
  2. Trojan / Win32.Agent this Trojan without the user's knowledge, automatically linked to the network to download other malicious programs, while the Trojans will attempt to shut down the affected system, anti-virus software.
  3. Packer.FSG.A Trojans can allow hackers to remotely control the infected computer system and perform various operations. These operations are subject to user permissions, typically used to steal information, modify or delete files, keyloggers, botnets and occupy the computer in order to become a lot of spam or perform distributed denial of service attacks.
  4. Click Trojan virus Trojan Clicker

The second question

Are there any signs of this file is packed or confusing? How so, what are these signs?

First, use PEiD analysis, as shown below, it can be seen that the program is added FSG 1.0-> dulek / xt shell
Here Insert Picture Description

Then we use Dependency Walker, we will find the import table KERNEL32.DLL this code has two functions LoadLibraryA, GetProcAddressthese two functions are signs packers , packers because the program runs when the shelling is a must to two functions . the
Here Insert Picture Description
following we use PEviewto reconfirm whether the shell, as shown below:
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

The figure can be found by unmarked section, indicating that the application may be packed, let's virtual size of the original data size comparison, you can clearly see the virtual size is always larger than the original size of the data, it can be real the program is a shell weight

Section Virtual Size Original data size
First 00003000 00004000
the second 00001000 0000028C
The third 00001000 00000200

下面准备尝试脱壳,首先由于不是UPX的壳所以不能使用UPX.exe脱掉壳. 这里我准备采用单步追踪法使用OllyDump进行脱壳

下图中是我发现在0050E1的位置有一个长跳JE 00401090,这里可能是被加壳程序的入口
Here Insert Picture Description

跳到00401090后,下面应该是源程序,但由于没有找到如何手工脱壳的方法,所以这个方法搁浅了.
Here Insert Picture Description

但是我在搜索资料的时候发现了一个宝贝,就是万能脱壳神器.我立马下载使用了一番,效果如下:
Here Insert Picture Description
Here Insert Picture Description
很高兴,这个壳被脱掉了,哈哈哈哈

第三问

有没有任何导入函数能够暗示这个程序的功能?如果有,是哪些导入函数,它们会告诉你什么?

现在我们继续对脱壳后的程序分析,使用Dependency Walker对该程序进行分析:
Here Insert Picture Description
Here Insert Picture Description

这几个模块都是不怎么常见的模块.

MSVCRT.DLL (名称:Microsoft C Runtime Library)提供了printf,malloc,strcpy等C语言库函数,并且为使用C/C++(Vc)编绎的程序提供了初始化(如获取命令行参数)以及退出等功能

__getmainargs 这个如果你有C语言的编程经验就好理解了,这是从stdin获取程序参数的函数,说明这个程序会从用户输入获得运行所必须的参数	
__getmainargs 这个如果你有C语言的编程经验就好理解了,这是从stdin获取程序参数的函数,说明这个程序会从用户输入获得运行所必须的参数
_controlfp 这个函数从MSDN上的解释来说,是Get and set the floating-point control word.,翻译过来就是获取并设置浮点控制字,这个函数在MSDN中的定义是这样unsigned int _controlfp( unsigned int new , unsigned int mask );,对这个函数具体做什么感兴趣的同学可以点这里 -> _controlfp
_except_handler3 同样引用MSDN的说法,内部 CRT 函数。 由框架用于查找相应的异常处理程序,以处理当前异常,说明这个程序有一个自己的错误处理机制
__set_app_type 设置当前应用类型。,有这么几种方式,_UNKNOWN_APP 未知应用程序类型;_CONSOLE_APP 控台 (命令行) 应用程序;_GUI_APP (GUI) Windows 应用程序。
__p_fmode 指向_fmode 全局变量的指针,它为文件 I/O 操作指定默认 文件提交模式。,这个函数只供内部调用。
__p_commande 这个函数MSDN里面没用文档化,根据上面那个的解释推理,这是指向commande全局变量的指针,也是只供内部调用(因为前面两个下划线)
_exit 这个就好理解了,是程序的退出函数的
_XcpFliter 这也是MSDN里面未文档化的函数,暂时用途不明
__p_initenv 这也是MSDN未文档化的函数,不过我们知道initenv函数是初始化环境变量的函数,那同理可得__p_initenv是指向initenv变量的指针,也是只供内部调用
_initterm 调用所有的静态构造的模块中是通过函数指针阵列枚举,依次调用每一个指针的一个简单的事情,按照文档的解释,这个编译器会帮你完成
__setusermatherr 指定用户提供的事务来处理算术错误,而不是_matherr事务。
_adjust_fdiv 这个也是未文档化的函数

OLE32.DLL 文件是链接和嵌入在应用程序中的对象的过程文件。它是用于编写和整合来自不同应用程序的数据在Windows作业系统的骨干部分。

这里我没有能发现什么异常,最大的疑点就是这里的DLL不是常见的DLL

第四问

哪些基于主机或基于网络的迹象可以被用来确定被这个恶意代码所感染的机器?

下面使用Strings.exe对脱完壳的程序进行分析:
Here Insert Picture Description
Here Insert Picture Description

由上图可得,出现可疑的URL: www.malwareanalysisbook.com/ad.html 还有IE8.0 推测应该是使用IE打开该网站

关键提示和要求:

1、使用virustotal.com查看程序,分析报告;

2、用PEview分析是否加壳(注意该程序的节的名称);导入表叫什么名字?

3、使用PEiD做加壳分析,确认由什么方式加壳的。

4, using Dependecy Walker import function which analyzes.

Quote

  1. 《 Practical Malware Analysis 》 By Michael Sikorski, Andrew Honig · 2012
  2. Online predecessors and some of the works, due to the access to too much too small, not enumerate here.
Released six original articles · won praise 4 · Views 309

Guess you like

Origin blog.csdn.net/qq_43605381/article/details/104062289