返回目录html
schtasks /create /TN netstat5303 /sc MINUTE /MO 5 /TR "cmd /c netstat -bn > c:\netstatlog.txt"
命令建立计划任务netstat5303
,以下图所示:其中,TN是TaskName的缩写,咱们建立的计划任务名是netstat5303;sc表示计时方式,咱们以分钟计时填MINUTE;TR=Task Run,要运行的指令是 netstat -bn,b表示显示可执行文件名,n表示以数字来显示IP和端口。linux
netstat5303.bat
脚本文件(可先建立txt文本文件,使用记事本写入后经过修改文件名来修改文件格式)date /t >> c:\netstat5303.txt time /t >> c:\netstat5303.txt netstat -bn >> c:\netstat5303.txt
以下图所示:算法
任务计划程序
,能够看到咱们新建立的这个任务:netstat5303.bat
批处理文件,肯定便可。若有须要,查看这些可疑的外网IP便可。chrome
返回目录
shell
Event 1,2,3
三个事件。即进程建立、进程建立时间、网络链接,以下图所示:参考使用轻量级工具Sysmon监视你的系统这篇文章,建立配置文件Sysmon20155303.xml
。windows
使用Sysmon.exe -i C:\Sysmon20155303.xml
安装sysmon。网络
对配置文件进行修改,将本身感兴趣的过滤器事件
和过滤器事件的选项
写入。(使用xml文档,是由于其能够按照标签进行缩进和显示,使用Notepad++打开后一目了然。)我修改的配置文件以下:工具
<Sysmon schemaversion="3.10"> <!-- 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">chrome.exe</Image> <Image condition="end with">iexplorer.exe</Image> <Image condition="end with">firefox.exe</Image> <SourcePort condition="is">137</SourcePort> <SourceIp condition="is">127.0.0.1</SourceIp> <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">firefox.exe</TargetImage> <TargetImage condition="end with">svchost.exe</TargetImage> <TargetImage condition="end with">winlogon.exe</TargetImage> <SourceImage condition="end with">powershell.exe</SourceImage> </CreateRemoteThread> <ProcessCreate onmatch="include"> <Image condition="end with">chrome.exe</Image> <Image condition="end with">iexplorer.exe</Image> <Image condition="end with">firefox.exe</Image> </ProcessCreate> <FileCreateTime onmatch="exclude" > <Image condition="end with">firefox.exe</Image> </FileCreateTime> <FileCreateTime onmatch="include" > <TargetFilename condition="end with">.tmp</TargetFilename> <TargetFilename condition="end with">.exe</TargetFilename> </FileCreateTime> </EventFiltering> </Sysmon>
使用Sysmon.exe -c C:\Sysmon20155303.xml
,将sysmon按照修改好的配置文件进行更新。性能
win10下,左下角开始菜单右击->事件查看器->应用程序和服务日志->Microsoft->Windows->Sysmon->Operational。在这里,咱们能够看到按照配置文件的要求记录的新事件,以及事件ID、任务类别、详细信息等等。学习
详细信息
,能够看到这个后门映像文件的具体位置、源IP和端口、目的IP和端口等。在66个杀软中,有24个报毒,可疑行至关高了。
能够看出它的SHA-一、MD5摘要值、文件类型、文件大小,以及TRiD文件类型识别结果。(注:TRiD经过读取文件头,根据特征码进行文件类型匹配。)
Process Monitor 是一款由 Sysinternals 公司开发的包含强大的监视和过滤功能的高级 Windows 监视工具,可实时显示文件系统、注册表、进程/线程的活动。
打开软件,能够看出其对各个进程的详细记录:
Process Explorer是由Sysinternals开发的Windows系统和应用程序监视工具,目前已并入微软旗下。不只结合了Filemon(文件监视器)和Regmon(注册表监视器)两个工具的功能,还增长了多项重要的加强功能。包括稳定性和性能改进、强大的过滤选项、修正的进程树对话框(增长了进程存活时间图表)、可根据点击位置变换的右击菜单过滤条目、集成带源代码存储的堆栈跟踪对话框、更快的堆栈跟踪、可在 64位 Windows 上加载 32位 日志文件的能力、监视映像(DLL和内核模式驱动程序)加载、系统引导时记录全部操做等。
靶机运行木马,回连攻击机时,咱们能够看到Process Explorer对其进行的记录:
PEiD(PE Identifier)是一款著名的查壳工具,其功能强大,几乎能够侦测出全部的壳,其数量已超过470 种PE 文档 的加壳类型和签名。
咱们先取一个上次实验生成的,没有加壳的木马,其检测结果以下:
此实验建议在两台虚拟机中进行,windows虚拟机文件少,进行快照时间短,且易于分析。