(1)若是在工做中怀疑一台主机上有恶意代码,但只是猜测,全部想监控下系统一每天的到底在干些什么。请设计下你想监控的操做有哪些,用什么方法来监控。shell
(2)若是已经肯定是某个程序或进程有问题,你有什么工具能够进一步获得它的哪些信息。windows
此次实验是告诉咱们如何分析恶意代码,让咱们学到如何发现并分析恶意代码的恶意,颇有用。此次用到了许多工具,刚开始作实验仍是本着学会这些工具去的,用完以后看看老师的要求才发现这等于没作啊,这才看着截图来学分析,不得不说仍是分析更有意义些。安全
1.先在C盘目录下创建一个netstatlog.bat文件,用来将记录的联网结果格式化输出到netstatlog.txt文件中.
2.netstatlog.bat内容为:网络
date /t >> c:\netstatlog.txt time /t >> c:\netstatlog.txt netstat -bn >> c:\netstatlog.txt
3.打开cmd输入schtasks /create /TN netstat /sc MINUTE /MO 5 /TR "c:\netstatlog.bat"
,命令会建立一个任务每隔五分钟记录计算机联网。
函数
4.过一段时间能够看到txt文件中的记录。
[] (https://images2018.cnblogs.com/blog/1071529/201804/1071529-20180418143655792-781796717.png)工具
1.在网上下载了sysmon的7.01版本,而后配置文件以下:.net
<Sysmon schemaversion="7.01"> <!-- Capture all hashes --> <HashAlgorithms>*</HashAlgorithms> <EventFiltering> <!-- Log all drivers except if the signature --> <!-- contains Microsoft or Windows --> <DriverLoad onmatch="exclude"> <Signature condition="contains">microsoft</Signature> <Signature condition="contains">windows</Signature> </DriverLoad> <NetworkConnect onmatch="exclude"> <Image condition="end with">YoudaoNote.exe</Image> <Image condition="end with">UCBrowser.exe</Image> <Image condition="end with">WeChat.exe</Image> <SourcePort condition="is">137</SourcePort> </NetworkConnect> <CreateRemoteThread onmatch="include"> <TargetImage condition="end with">explorer.exe</TargetImage> <TargetImage condition="end with">svchost.exe</TargetImage> <TargetImage condition="end with">winlogon.exe</TargetImage> <SourceImage condition="end with">powershell.exe</SourceImage> </CreateRemoteThread> </EventFiltering> </Sysmon>
2.使用sysmon -accepteula –i指令对sysmon进行安装。
3.启动后门程序后,用事件查看器能够查看相应日志。
设计
1.扫描刚刚的后门程序,能够看到行为分析以及查毒。日志
1.使用systracer工具创建了4个快照,分别是在主机中没有恶意软件时、将恶意软件植入到目标主机中后、恶意软件启动回连时、使用恶意软件获取目标主机权限时:
2.1、二相比较没有找到个人后门程序www.exe,我是直接从虚拟中把文件拖了出来,不知道有没有影响。
code
3.2、三比较找到了这个程序,注册表有变化
4.3、四比较则找到了这个程序调用主机端口、添加注册信息的痕迹。
1.设置过滤规则找到后门程序回连的过程,发现其三次握手以及数据通讯过程。
1.在虚拟机下经过PE explorer打开文件20145236_backdoor.exe,能够查看PE文件编译的一些基本信息,导入导出表等。
以下图,能够看到该文件的编译时间、连接器等基本信息:
2.以下图,点击“导入表”,能够查看该文件依赖的dll库: