taibeihacker
Moderator
Microsoft ICS Forensics工具是用于分析工业PLC元数据和项目文件的开源法医框架。
它使调查人员能够在事件响应或手动检查期间识别出对ICS环境的可疑工件,以检测设备受损。
开源框架,该框架允许研究人员验证工具的动作或根据特定需求自定义其操作。
Getting Started
这些说明将使您在本地计算机上启动并运行该项目的副本,以开发和测试目的。git克隆https://github.com/microsoft/ics-forensics-tools.git
Prerequisites
安装python=3.9: 3https://wwwwwwwww.python.org/downloads :0101010pip安装-r要求。 - 验证日志输出到文件以及控制台可选-P, - 以插件/分析仪数量的多流程模式运行,可选3
Installing
args args Args args Description/optialition/optiality -h, - help显示此帮助消息和退出消息和Exit -exit -exit -ip offional -IP地址文件路径,CIDR或IP地址CSV(IP csv(IP cesv(IP))。添加更多列,以获取有关每个IP(用户名,通行证等)所需的其他信息- 端口端口号可选-Transport TCP/UDP可选- Analyzer Analyzer Analyzer名称,以运行可选的
Usage
Python driver.py -d driver.py -s -v pluginname -IP ip ips.csvs.csvs.csvsvpython driver.py -s -v pluginname -Analyzer Analyzername
python driver.py -s -v -c config.json -multiprocess
General application arguments:
来自forensic.client.forensic_clients_client incort来自forensic.interfaces.plugin import pluginconfig
法医=forensicclient()
plugin=pluginconfig.from_json({{
'name':'pluginname',
'port': 123,
'Transport':'TCP',
'addresses': [{'ip':'192.168.1.0/24'},{'ip': '10 .10.10.10.10'}],
'parameters': {
},
'Analyzers': []
}))
forensic.scan([插件])
Specific plugin arguments:
Executing examples in the command line
在本地开发时,请确保将SRC文件夹标记为“源”使用您的插件名称在插件文件夹下创建新目录
来自forensic.interfaces.plugin import PluginInterface,PluginConfig,PluginCli
来自forensic.common.constants.constants进口运输
Class GeneralCli(PluginCli):
def __init __(self,folder_name):
super().__ init __(folder_name)
self.name='常规'
self.Description='常规插件描述'
self.port=123
self.transport=transport.tcp
def标志(自我,解析器):
self.base_flags(解析器,self.port,self.transport)
parser.add_argument(' - 常规',help='常规额外参数',metavar='')
类通用(插件):
def __init __(self,config3360 pluginconfig,output_dir:路径,verbose: bool):
super().__ init __(config,output_dir,详细信息)
DEF CONNECT(Self,地址):
self.logger.info(f'{self.config.name} connect')
def导出(自我提取):
self.logger.info(f'{self.config.name}导出')确保将您的新插件导入__init__.py文件中的插件文件夹下的pluginInterface继承类中的“配置”参数,您可以使用此插件来访问该插件,您可以在pluginConfig对象(pluginConfig objectig objectig oppecters,pluginconfig objectig objecters,plugincin name,plugine name porment,porters parters parters,param,param,param,param,param,parame)中访问此数据。
有2个强制性功能(连接,导出)。
连接功能接收单个IP地址,并从设备中提取任何相关信息并将其返回。
导出函数接收从all提取的设备提取的信息,您可以将其导出到文件。在插件继承的类中,您需要在init函数中指定与此插件相关的默认信息。
有一个强制性功能(标志)。
您必须调用base_flags,并且可以添加想要拥有的任何其他标志。
Import as library example
在Analyzers文件夹下创建新目录,并使用与分析仪相关的插件名称。使用分析仪名称创建新的Python文件使用以下模板来编写插件,然后用pathlib Import Path中的插件名称替换“常规”来自forensic.interfaces.analyzer导入分析界面,分析zerconfig
类通用(Analyzezezerface):
def __init __(self,config: aNANATEzerconfig,output_dir:路径,verbose: bool):
super().__ init __(config,output_dir,详细信息)
self.plugin_name='常规'
self.create_output_dir(self.plugin_name)
DEF分析(Self):
pass Make sure to import your new analyzer in the __init__.py file under the analyzers folder
Architecture
Microsoft Defender for IoT is an agentless network-layer security solution that allows organizations to continuously monitor and discover assets, detect threats, and manage vulnerabilities in their IoT/OT and Industrial Control Systems (ICS) devices, on-premises and in Azure-connected environments.第52节下的MSRC博客
关于该工具的ICS讲座
第52节- 调查恶意梯子逻辑| Microsoft for IoT网络研讨会-YouTube
Adding Plugins
这个项目欢迎贡献和建议。大多数捐款要求您同意撰写贡献者许可协议(CLA),宣布您有权并实际上授予我们使用您的贡献的权利。有关详细信息,请访问https://cla.opensource.microsoft.com.当您提交拉动请求时,CLA机器人将自动确定您是否需要提供CLA并适当装饰PR(例如状态检查,评论)。只需按照机器人提供的说明即可。您只需要使用我们的CLA在所有存储库中进行一次。
该项目采用了Microsoft开源的行为代码。有关更多信息,请参见《行为代码常见问题解答》或与任何其他问题或评论有关的联系[电子邮件保护]。