分析该软件在(1)启动回连,(2)安装到目标机(3)及其余任意操做时(如进程迁移或抓屏,重要是你感兴趣)。该后门软件chrome
(3)读取、添加、删除了哪些注册表项shell
(4)读取、添加、删除了哪些文件windows
(5)链接了哪些外部IP,传输了什么数据(抓包分析)网络
使用schtasks /create /TN netstat5317 /sc MINUTE /MO 1 /TR "cmd /c netstat -bn > c:\netstatlog.txt"
命令建立计划任务netstat5317
工具
TN
是TaskName的缩写,咱们建立的计划任务名是netstat5317;sc
表示计时方式,咱们以分钟计时填MINUTE;TR
=Task Run,要运行的指令是 netstatbn
,b
表示显示可执行文件名,n
表示以数字来显示IP和端口;>
表示输出重定向,将输出存放在c:\netstatlog.txt
文件中netstat5317.bat
脚本文件,写入如下内容 (能够先创建文本文档,再修改拓展名)date /t >> c:\netstat20165317.txt time /t >> c:\netstat20165317.txt netstat -bn >> c:\netstat20165317.txt
打开任务计划程序,能够看到新建立的这个任务:
性能
双击这个任务,点击操做并编辑,将“程序或脚本”改成咱们建立的netstat5317.bat
批处理文件,肯定便可。
网站
条件
选项卡中,取消勾选只有在计算机使用交流电源时才启动此任务
;常规
选项卡中,选择无论用户是否登录都要运行
,勾选不储存密码
,并勾选使用最高权限运行
;执行此脚本必定时间,就能够在netstat20165317.txt
文件中查看到本机在该时间段内的联网记录:
firefox
使用Excel统计所收集的数据
线程
sysmon20165317.xml
<Sysmon schemaversion="4.12"> <!-- Capture all hashes --> <HashAlgorithms>*</HashAlgorithms> <EventFiltering> <!-- Log all drivers except if the signature --> <!-- contains Microsoft or Windows --> <ProcessCreate onmatch="exclude"> <Image condition="end with">chrome.exe</Image> <Image condition="end with">firefox.exe</Image> </ProcessCreate> <ProcessCreate onmatch="include"> <ParentImage condition="end with">cmd.exe</ParentImage> </ProcessCreate> <FileCreateTime onmatch="exclude" > <Image condition="end with">chrome.exe</Image> <Image condition="end with">firefox.exe</Image> </FileCreateTime> <NetworkConnect onmatch="exclude"> <Image condition="end with">chrome.exe</Image> <Image condition="end with">firefox.exe</Image> <SourcePort condition="is">137</SourcePort> <SourceIp condition="is">127.0.0.1</SourceIp> </NetworkConnect> <NetworkConnect onmatch="include"> <DestinationPort condition="is">80</DestinationPort> <DestinationPort condition="is">443</DestinationPort> </NetworkConnect> <CreateRemoteThread onmatch="include"> <TargetImage condition="end with">explorer.exe</TargetImage> <TargetImage condition="end with">svchost.exe</TargetImage> <TargetImage condition="end with">firefox.exe</TargetImage> <TargetImage condition="end with">winlogon.exe</TargetImage> <SourceImage condition="end with">powershell.exe</SourceImage> </CreateRemoteThread> </EventFiltering> </Sysmon>
sysmon.exe -i sysmon20165317.xml
安装sysmon。右击个人电脑->管理->事件查看器->应用程序和服务日志->Microsoft->Windows->Sysmon->Operational。在这里,咱们能够看到按照配置文件的要求记录的新事件,以及事件ID、任务类别、详细信息等等
设计
打开kali,运行木马文件,使其回连kali攻击机。查看日志,经过搜索关键字能够找到相关的后门文件:
从中能够查看到端口号和目标主机。
Process Explorer是Windows系统和应用程序监视工具,包括Filemon(文件监视器)和Regmon(注册表监视器),还有多项重要的加强功能。包括稳定性和性能改进、强大的过滤选项、修正的进程树对话框(增长了进程存活时间图表)、可根据点击位置变换的右击菜单过滤条目、集成带源代码存储的堆栈跟踪对话框、更快的堆栈跟踪、可在 64位 Windows 上加载 32位 日志文件的能力、监视映像(DLL和内核模式驱动程序)加载、系统引导时记录全部操做等。
(1)若是在工做中怀疑一台主机上有恶意代码,但只是猜测,全部想监控下系统一每天的到底在干些什么。请设计下你想监控的操做有哪些,用什么方法来监控。
使用windows自带的schtasks指令设置一个计划任务,每隔必定的时间对主机的联网记录等进行记录。
使用sysmon工具,经过配置想要监控的端口、注册表信息、网络链接等信息,记录相关的日志文件。
利用wireshark查看数据包
(2)若是已经肯定是某个程序或进程有问题,你有什么工具能够进一步获得它的哪些信息。
使用Wireshark进行抓包分析
使用systracer工具分析恶意软件,进行快照的对比(注册表、文件等).
使用Process Explorer查看调用的程序库