2017-2018-2 20155231《网络对抗技术》实验四:恶意代码分析

2017-2018-2 20155231《网络对抗技术》实验四:恶意代码分析

实验内容

系统运行监控

(1)使用如计划任务,每隔一分钟记录自己的电脑有哪些程序在联网,连接的外部IP是哪里。

  • 建立一个netstat20155231.txt文件,在文件中输入

date /t >> c: etstat20155231.txt
time /t >> c: etstat20155231.txt
netstat -bn >> c: etstat20155231.txt

  • 然后将此文件名改为netstat20155231.bat

  • 再建立一个netstat20155231.txt

  • 用管理员权限在命令行输入如下命令:schtasks /create /TN netstat /sc MINUTE /MO 1 /TR "c: etstat20155231.bat"

  • 运行netstat20155231.batnetstat -bn

  • 打开txt文件,显示请求的操作需要提升

  • 在计划任务里找到名为netstat的任务,给予管理员权限,再次运行

  • 查看txt文件分析ip地址

-vm虚拟机

(2)安装配置sysinternals里的sysmon工具,设置合理的配置文件,监控自己主机的重点事可疑行为。

  • 安装sysmon
  • 创建5231.txt,输入:
<Sysmon schemaversion="4.00">      
  <!-- 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.exe -i 5231.txt

  • 打开控制面板,搜索事件查看,打开事件查看器,找到应用程序和服务日志/Microsoft/Windows/Sysmon/Operational

  • 运行后门

  • 对日志进行查看,找到后门

  • ip变更过,后门没有回连成功,重新编写后门并回连,刷新后在日志中找到后门

  • 这是搜狗拼音的运行

  • 这是系统文件的运行

恶意软件分

分析该软件在(1)启动回连,(2)安装到目标机(3)及其他任意操作时(如进程迁移或抓屏,重要是你感兴趣)。该后门软件
(3)读取、添加、删除了哪些注册表项
(4)读取、添加、删除了哪些文件
(5)连接了哪些外部IP,传输了什么数据(抓包分析)

  • 安装Systracer
  • 在回连后门、用dir获取权限、关闭后门时分别快照
  • 进行对比

(快照啥都没照到==)

  • 重下一个后,添加、修改、删除的注册表

  • 添加、修改、删除的文件

试验后回答问题

  1. 如果在工作中怀疑一台主机上有恶意代码,但只是猜想,所有想监控下系统一天天的到底在干些什么。请设计下你想监控的操作有哪些,用什么方法来监控。
  • 使用如计划任务,每隔一分钟记录自己的电脑联网程序
  • 使用sysmon记录日志
  1. 如果已经确定是某个程序或进程有问题,你有什么工具可以进一步得到它的哪些信息。
  • 使用wireshark分析恶意软件回连情况
  • 使用Process Explorer分析恶意软件
  • 在virscan网站上分析恶意软件
原文地址:https://www.cnblogs.com/javasyn/p/8875031.html