ICSpector:一款功能强大的微软开源工业PLC安全取证框架

admin 2024年1月26日06:44:28评论12 views字数 2504阅读8分20秒阅读模式
ICSpector:一款功能强大的微软开源工业PLC安全取证框架

ICSpector:一款功能强大的微软开源工业PLC安全取证框架

关于ICSpector

ICSpector是一款功能强大的开源工业PLC安全取证框架,该工具由微软的研究人员负责开发和维护,可以帮助广大研究人员轻松分析工业PLC元数据和项目文件。

ICSpector提供了方便的方式来扫描PLC并识别ICS环境中的可疑痕迹,可以用于手动检查、自动监控任务或响应事件以检测受损设备。在该工具的帮助下,安全研究人员和取证分许人员可以轻松审查输出结果并根据自己的特定需求进行定制化开发。

工具要求

Python 3.9+

Microsoft Visual C++ 14.0

工具架构

ICSpector:一款功能强大的微软开源工业PLC安全取证框架

工具安装

由于该工具基于Python 3开发,因此我们首先需要在本地设备上安装并配置好Python 3.9+环境。接下来,广大研究人员可以直接使用下列命令将该项目源码克隆至本地:

git clone https://github.com/microsoft/ics-forensics-tools.git

然后切换到项目目录中,使用pip工具和项目提供的requirements.txt文件安装该工具所需的其他依赖组件:

cd ics-forensics-toolspip install -r requirements.txt
工具参数选项

常用应用程序参数选项

ICSpector:一款功能强大的微软开源工业PLC安全取证框架

特定插件参数选项

ICSpector:一款功能强大的微软开源工业PLC安全取证框架
工具使用

工具命令行使用

python driver.py -s -v PluginName --ip ips.csv
python driver.py -s -v PluginName --ip ips.csv --analyzer AnalyzerName
python driver.py -s -v -c config.json --multiprocess

以代码库形式导入使用

from forensic.client.forensic_client import ForensicClientfrom forensic.interfaces.plugin import PluginConfigforensic = ForensicClient()plugin = PluginConfig.from_json({    "name": "PluginName",    "port": 123,    "transport": "tcp",    "addresses": [{"ip": "192.168.1.0/24"}, {"ip": "10.10.10.10"}],    "parameters": {    },    "analyzers": []})forensic.scan([plugin])

添加插件

研究人员在根据实际需求进行本地自定义开发时,请确保将src目录标记为“Sources Root”。接下来,按照下列步骤开发即可:

1、在插件目录下使用插件名称创建一个新的目录;
2、使用插件名称创建一个新的Python文件;
3、使用下列模板代码开发自己的插件,并将其中的“General”替换为你的插件名称;
from pathlib import Pathfrom forensic.interfaces.plugin import PluginInterface, PluginConfig, PluginCLIfrom forensic.common.constants.constants import Transportclass GeneralCLI(PluginCLI):    def __init__(self, folder_name):        super().__init__(folder_name)        self.name = "General"        self.description = "General Plugin Description"        self.port = 123        self.transport = Transport.TCP    def flags(self, parser):        self.base_flags(parser, self.port, self.transport)        parser.add_argument('--general', help='General additional argument', metavar="")class General(PluginInterface):    def __init__(self, config: PluginConfig, output_dir: Path, verbose: bool):        super().__init__(config, output_dir, verbose)    def connect(self, address):        self.logger.info(f"{self.config.name} connect")    def export(self, extracted):        self.logger.info(f"{self.config.name} export")

添加分析器

1、在分析器目录下使用跟分析器相关的插件名创建一个新的目录;

2、使用分析器名称创建一个新的Python文件;

3、使用下列模板开发自己的分析器,并将其中的“General”替换为你的分析器名称;

from pathlib import Pathfrom forensic.interfaces.analyzer import AnalyzerInterface, AnalyzerConfigclass General(AnalyzerInterface):    def __init__(self, config: AnalyzerConfig, output_dir: Path, verbose: bool):        super().__init__(config, output_dir, verbose)        self.plugin_name = 'General'        self.create_output_dir(self.plugin_name)    def analyze(self):      pass
工具运行截图

ICSpector:一款功能强大的微软开源工业PLC安全取证框架

ICSpector:一款功能强大的微软开源工业PLC安全取证框架

ICSpector:一款功能强大的微软开源工业PLC安全取证框架

许可证协议

本项目的开发与发布遵循MIT开源许可证协议。

项目地址

ICSpector

https://github.com/microsoft/ics-forensics-tools

原文始发于微信公众号(FreeBuf):ICSpector:一款功能强大的微软开源工业PLC安全取证框架

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年1月26日06:44:28
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   ICSpector:一款功能强大的微软开源工业PLC安全取证框架http://cn-sec.com/archives/2431530.html

发表评论

匿名网友 填写信息