date /t >> c:\netstatlog.txt time /t >> c:\netstatlog.txt netstat -bn >> c:\netstatlog.txt
schtasks /create /TN netstat /sc MINUTE /MO 2 /ru "System" /TR "d:\netstatlog.bat"
其中,TN是TaskName的缩写,咱们建立的计划任务名是netstat5303;sc表示计时方式,咱们以分钟计时填MINUTE;TR=Task Run,要运行的指令是 netstat -bn,b表示显示可执行文件名,n表示以数字来显示IP和端口。算法
2018/04/13 周五 17:49 请求的操做须要提高。 2018/04/13 周五 17:49 请求的操做须要提高。 2018/04/13 周五 17:51 活动链接 协议 本地地址 外部地址 状态 2018/04/13 周五 17:52 活动链接 协议 本地地址 外部地址 状态 TCP 192.168.1.107:49461 180.163.251.163:80 SYN_SENT [SoftupNotify.exe] TCP 192.168.1.107:49462 106.120.160.155:80 SYN_SENT [360tray.exe] TCP 192.168.1.107:49463 106.120.160.155:80 SYN_SENT [360tray.exe] 2018/04/13 周五 17:53 活动链接 协议 本地地址 外部地址 状态 TCP 192.168.1.107:49479 180.163.251.163:80 SYN_SENT [360tray.exe] 2018/04/13 周五 17:54 活动链接 协议 本地地址 外部地址 状态 TCP 192.168.1.107:49482 122.193.207.44:80 SYN_SENT [DgService.exe] TCP 192.168.1.107:49483 210.52.217.139:80 SYN_SENT [360tray.exe] TCP 192.168.1.107:49484 210.52.217.139:80 SYN_SENT [360tray.exe] TCP 192.168.1.107:49485 210.52.217.139:80 SYN_SENT [360tray.exe] 2018/04/13 周五 17:55
导入到whois查看ip
chrome
四、遇到的问题:
(1)
程序没法执行,缘由就在于个人运行条件中的设置,须要使用电源才能执行,而我正好没接电源。shell
根据老师要求须要记录一下三个事件:
windows
一、 sysmon微软Sysinternals套件中的一个工具,要使用sysmon工具先要配置文件网络
<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> <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>
<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">SogouExplorer.exe</Image> </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">winlogon.exe</TargetImage> <SourceImage condition="end with">powershell.exe</SourceImage> </CreateRemoteThread> </EventFiltering> </Sysmon>
kali执行命令
工具
-实现成功回连后,查看火绒剑的进程监控:
-查看其回连ip地址;
-查看其调用栈,而且能够进行反汇编
-查看进程,能够发现20155218.exe为未知文件;
学习
我会从一下方面:一、注册表;二、系统服务;三、开机启动项;四、文件建立;五、网络链接状况;六、钩子;七、内核 进行监控,可使用systracer,sysmon,火绒剑等工具监控;设计
我可使用wireshark查看其具体信息,好比用的什么协议,回连ip是多少,也可使用火绒剑查看其调用的栈和其相关进程;3d
这个实验中,咱们要学习如何分析恶意代码,从而知道如何设计恶意代码,在分析恶意代码的时候,有比较简单的工具,但须要大量的分析总结,也有比较成熟的软件,可以较快的查看到相关的信息。常在河边走,哪有不湿鞋,常常弄这个恶意代码,说不定哪天本身就被攻击了(模糊的记得好像有个虚拟机与个人mac采用了无缝链接,有点慌),使用这些工具能够监控本身的电脑,感受放心了很多。日志