maxspl/OSIR

GitHub: maxspl/OSIR

一个基于 Python 的分布式取证数据编排框架,支持容器化部署和模块化处理,旨在自动化解析 DFIR ORC 和 UAC 等取证工件。

Stars: 14 | Forks: 2

# OSIR OSIR 是一个 Python 项目,旨在通过模块和配置文件(Profile)自动处理数据。它主要针对取证工件(Forensic Artifacts)的处理,但也适用于任何类型的文件。OSIR 充当调度器,将处理工具应用于文件,其中某些工具的输出可作为其他工具的输入。 OSIR 是一个容器化(Dockerized)和分布式的解析框架,可在 Linux 和 Windows 上运行。当前项目支持多种取证输出(Triage Outputs),如 DFIR ORC 和 UAC。 ![Version](https://img.shields.io/badge/version-1.0.0-blue) ![License](https://img.shields.io/badge/license-Apache%202.0-green) # 目录 - [架构](#architecture) - [工作原理](#how-does-it-work-) - [快速开始](#quick-start) - [贡献](#contributing) - [主要功能](#main-features) - [文档](#documentation) - [当前支持的模块](#currently-supported-modules) - [创建者](#creators) - [许可证](#license) # 架构 OSIR 可以通过多种方式部署,每个组件都可以外部化。 以下是默认的“一体化(all in one)”配置:

basic_arch_linux basic_arch_windows

# 工作原理 该工具的目标是使用处理器转换输入文件:**每个处理器都是一个模块**(例如:解压_archive、将文件转换为 JSON、SIEM 摄入等) 模块是 yml 文件,其中指定了: - **输入**(文件或目录)基于其文件/目录路径和/或名称 - **输出**:无文件(例如:SIEM 摄入)、单个或多个文件 - **使用的工具及其命令行**:Windows 或 Linux 工具,甚至可以是 Python 模块 - 以及文档中待发现的其他选项 该工具本身通过 2 个输入启动: - **一个案例(Case)**:包含待处理文件的目录,可以包含多个取证数据(例如:多个端点的 Windows 取证数据) - 用于处理输入文件的**模块列表** 案例处理(**可以同时处理多个案例**): - 主节点(Master)包含案例目录并持续监控与所选模块匹配的输入 - 每当模块匹配到输入时,就会将任务添加到队列中(模块的输出可以作为另一个模块的输入) - 队列由一个或多个代理(Agent)处理 - 模块的输出写入主节点存储 # 快速开始 ## 克隆包含依赖项的项目 ``` git clone --recurse-submodules https://github.com/maxspl/OSIR ``` ## 使用示例:在 Ubuntu 主机上解析 DFIR ORC 取证数据 ![usage](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/0cc3f70fc9235705.gif) # 主要功能 - 可以在 Windows 和 Linux 上无限制运行 - 支持任何类型的输入文件 - 自动设置 Windows VM(通过 Windows in Docker 或 vBox),以便在 Linux 主机上使用 Windows 工具 - 可以一次处理多个取证数据 - 分布式基础设施:多个端点可以连接以分担负载 - Docker 容器化安装 - 模块化:处理任务由易于修改的配置文件定义 - 集成 Splunk 进行输出分析 # 文档 项目文档:https://osir.readthedocs.io # 支持的模块 | OS | Filename | Description | Author | Version | Processor Type | Tool Path | |:--------|:-------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------|:---------------|----------:|:-------------------|:------------------------------------| | generic | age_decrypt.yml | 用于解密 age 文件。别忘了将密钥放入 /OSIR/OSIR/configs/dependencies/encryption/key.age 中。 | maxspl | 1 | external | age | | generic | indexer-ng.yml | Splunk 日志摄入(DFIR ORC 和 UAC),使用特定于模块的 json2splunk-rs 配置。 | maxspl | 1 | internal | json2splunk-rs | | generic | mongodb.yml | Mongodb 日志的 Splunk 日志摄入。 | Typ | 1 | external | json2splunk-rs | | generic | thor_lite.yml | 使用 Thor Lite 扫描收集的文件。 | typ | 1 | external | thor-lite/thor-lite-linux-64 | | generic | thor_orc.yml | 使用 Thor 扫描收集的 DFIR ORC 文件(restore_fs 模块的输出)(需要 Forensic 许可证)。 | maxspl | 1 | external | thor/thor-linux-64 | | generic | thor_orc_ram.yml | 使用 Thor 扫描来自 MemProcFS 的 RAM 恢复文件系统(需要 Forensic 许可证)。 | maxspl | 1 | external | thor/thor-linux-64 | | generic | thor_uac.yml | 使用 Thor 扫描收集的 UAC 文件(extract_uac 模块的输出)(需要 Forensic 许可证)。 | typ | 1 | external | thor/thor-linux-64 | | generic | thor_update.yml | 使用 thor-util 更新 Thor 签名文件。 | maxspl | 1 | external | thor/thor-util | | network | zeek.yml | 使用 zeek 解析 pcap 文件 | maxspl | 1 | external | docker | | unix | arp.yml | Kelly Brazil - JsonConverter - 解析 arp 或 arp -a 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | audit.yml | 解析来自 '/var/log/audit' 的日志 | Typ | 1 | internal | | | unix | auth.yml | 解析来自 '/var/log/auth.log' 的日志 | Typ | 1 | internal | | | unix | blkid.yml | Kelly Brazil - JsonConverter - 解析 blkid 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | boot.yml | 解析来自 '/var/log/boot' 的日志 | Typ | 1 | internal | | | unix | collect_info_uac.yml | DFIR UAC 收集文件的哈希 | maxspl | 1 | external | /usr/bin/find | | unix | cron.yml | 解析来自 '/var/log/cron' 的日志 | Typ | 1 | internal | | | unix | debug.yml | 解析来自 '/var/log/debug' 的日志 | Typ | 1 | internal | | | unix | df.yml | Kelly Brazil - JsonConverter - 解析 df 和 df -h 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | dmidecode.yml | Kelly Brazil - JsonConverter - 解析 dmidecode 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | dpkg-l.yml | Kelly Brazil - JsonConverter - 解析 dpkg -l 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | dpkg.yml | 解析来自 '/var/log/dpkg' 的日志 | Typ | 1 | internal | | | unix | env.yml | Kelly Brazil - JsonConverter - 解析 env 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | extract_uac.yml | 用于执行 Unix Artefact Collector Capture 的内部预处理 | Typ | 1.1 | internal | tar | | unix | findmnt.yml | Kelly Brazil - JsonConverter - 解析 findmnt 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | free.yml | Kelly Brazil - JsonConverter - 解析 free 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | ip_route.yml | Kelly Brazil - JsonConverter - 解析 ip route 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | iptables.yml | Kelly Brazil - JsonConverter - 解析 iptables 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | journal.yml | 解析来自 '/var/log/journal/' 的日志 | Typ | 1.1 | external | journalctl | | unix | kernel.yml | 解析来自 '/var/log/kernel' 的日志 | Typ | 1 | internal | | | unix | last.yml | Kelly Brazil - JsonConverter - 解析 last 和 lastb 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | lastlog.yml | 解析来自 '/var/log/lastlog' 的日志 | Typ | 1 | internal | | | unix | lsblk.yml | Kelly Brazil - JsonConverter - 解析 lsblk 命令的输出 | Kelly Brazil | 1.1 | external | cat | | unix | lscpu.yml | Kelly Brazil - JsonConverter - 解析 lscpu 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | lsmod.yml | Kelly Brazil - JsonConverter - 解析 lsmod 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | lsusb.yml | Kelly Brazil - JsonConverter - 解析 lsusb 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | mactime.yml | 解析 UAC 收集中的 '/bodyfile' 日志 | Typ | 1 | external | mactime | | unix | mail.yml | 解析来自 '/var/log/mail' 的日志 | Typ | 1 | internal | | | unix | message.yml | 解析来自 '/var/log/message' 的日志 | Typ | 1 | internal | | | unix | mount.yml | Kelly Brazil - JsonConverter - 解析 mount 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | netstat.yml | Kelly Brazil - JsonConverter - 解析 netstat 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | nmcli.yml | Kelly Brazil - JsonConverter - 解析 nmcli 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | postgresql.yml | 解析来自 '/var/log/postgresql' 的日志 | Typ | 1 | internal | | | unix | ps.yml | Kelly Brazil - JsonConverter - 解析 ps 和 ps -ef 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | snap.yml | Kelly Brazil - JsonConverter - 解析 snap 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | sysctl.yml | Kelly Brazil - JsonConverter - 解析 sysctl -a 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | syslog.yml | 解析来自 '/var/log/syslog' 的日志 | Typ | 1 | internal | | | unix | systemctl_luf.yml | Kelly Brazil - JsonConverter - 解析 systemctl list-unit-files 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | top.yml | Kelly Brazil - JsonConverter - 解析 top 和 top -b 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | uac_indexer.yml | Splunk 日志摄入(UAC),使用来自 dependencies/uac_indexer_patterns.yml 的 json2splunk 配置 | Typ | 1 | external | python | | unix | utmp.yml | 解析来自 '/var/log/utmp btmp wtmp' 的日志 | Typ | 1 | internal | | | unix | vhdx.yml | 用于挂载 vhdx 文件系统。 | typ | 1 | external | target | | unix | vmstat.yml | Kelly Brazil - JsonConverter - 解析 vmstat 命令的输出 | Kelly Brazil | 1 | external | cat | | unix | web_access.yml | 解析 Web 访问日志 | maxspl | 1 | external | TurboLP | | unix | yum.yml | 解析来自 '/var/log/yum' 的日志 | Typ | 1 | internal | | | windows | IIS.yml | 使用 Dissect 插件解析来自 DFIR ORC restore_fs 的 IIS | maxspl | 1 | internal | | | windows | activities_cache.yml | 使用 Dissect 插件解析来自 DFIR ORC restore_fs 的 ActivitiesCache.db | maxspl | 1 | internal | | | windows | amcache.yml | 解析 amcache 工件。 | maxspl | 1.1 | external | net9/AmcacheParser.exe | | windows | anssi_decode.yml | ANSSI 工具,旨在检测 DFIR-ORC 收集的 NTFSInfo 数据中的异常可移植可执行(PE)文件 | maxspl | 1 | internal | machine_analysis | | windows | authlog.yml | 使用 Dissect 插件解析来自 UAC [root] 的认证日志(auth log) | Typ | 1 | internal | | | windows | bash_history.yml | 使用 Dissect 插件解析来自 UAC [root] 的 bash 历史 | Typ | 1 | internal | | | windows | browsers.yml | 解析浏览器工件。 | maxspl | 1 | external | python | | windows | collect_info_orc.yml | DFIR ORC 收集文件的哈希 | maxspl | 1 | external | /usr/bin/find | | windows | dfir_orc_decrypt.yml | 用于解密 age 文件。别忘了将密钥放入 /OSIR/OSIR/configs/dependencies/encryption/DFIRORC_key.pem 中。 | maxspl | 1 | external | orc-decrypt-rs | | windows | dummy_external.yml | 用于测试 WSL / Powershell 连接的虚拟模块 | maxspl | 1 | external | net9/AmcacheParser.exe | | windows | evtx.yml | 解析由 DFIR ORC 收集或在文件系统中的 EVTX | maxspl | 1.1 | external | evtx_dump | | windows | extract_orc.yml | 用于执行 DFIR-ORC 捕获的内部预处理 | maxspl | 1.1 | internal, external | 7zz | | windows | hayabusa.yml | Hayabusa 扫描 evtx 文件 | maxspl | 1 | external | hayabusa/hayabusa-3.0.1-lin-x64-gnu | | windows | hives_hkcu.yml | 解析注册表配置单元(Registry Hives)工件。 | maxspl | 1 | external | net9/RECmd/RECmd.exe | | windows | hives_hklm.yml | 解析注册表配置单元工件。 | maxspl | 1 | external | net9/RECmd/RECmd.exe | | windows | indexer.yml | Splunk 日志摄入(DFIR ORC 和 UAC),使用特定于模块的 json2splunk 配置,而不是 dependencies/*_indexer_patterns.yml | maxspl | 1 | internal | python | | windows | jump_list.yml | 解析跳转列表(Jump List)工件。 | maxspl | 1 | external | net9/JLECmd.exe | | windows | lnk.yml | 解析 lnk 工件。 | maxspl | 1 | external | net9/LECmd.exe | | windows | log2timeline_plaso.yml | 运行 log2timeline 创建 Plaso 存储文件 | maxspl | 1 | external | docker | | windows | mft.yml | 解析 $MFT 工件。 | Typ | 1 | external | net9/MFTECmd.exe | | windows | orc_indexer.yml | 使用来自 dependencies/orc_indexer_patterns.yml 的 json2splunk 配置进行 plunk 日志摄入(ORC) | maxspl | 1 | external | python | | windows | orc_offline.yml | 用于在 dd 捕获上执行 DFIR ORC | maxspl | 1 | external | python.exe | | windows | powershell_history.yml | 解析 ConsoleHost_history.txt | maxspl | 1 | internal | | | windows | prefetch.yml | Eric Zimmerman - PECmd.exe | Eric Zimmerman | 1 | external | net9/PECmd.exe | | windows | prefetch_orc.yml | 解析 Prefetch | maxspl | 1 | external | net9/PECmd.exe | | windows | pstree_live_response.yml | 解析 processes1.csv 以生成 pstree | maxspl | 1 | external | python | | windows | pstree_security.yml | 解析 EVTX 模块的输出,从 security.evtx 构建进程树 - 事件 ID 4688 | maxspl | 1 | external | python | | windows | pstree_sysmon.yml | 解析 EVTX 模块的输出,从 security.evtx 构建进程树 - 事件 ID 1 | maxspl | 1 | external | python | | windows | recycle_bin.yml | 解析回收站工件。 | maxspl | 1 | external | net9/RBCmd.exe | | windows | restore_fs.yml | 从 DFIR ORC 取证数据恢复原始文件系统结构 | maxspl | 1 | external | Restore_FS | | windows | shell_bags.yml | 解析 Shell Bags 工件。 | maxspl | 1 | external | net9/SBECmd.exe | | windows | shimcache.yml | 解析 ShimCache 工件。 | maxspl | 1 | external | net9/AppCompatCacheParser.exe | | windows | srum.yml | 解析 SRUM 工件。 | maxspl | 1 | external | artemis | | windows | test_process_dir.yml | description | maxspl | 1 | external | process_dir | | windows | test_process_dir_multiple_output.yml | test_process_dir_multiple_output | maxspl | 1 | external | process_dir_multiple_output | | windows | wer.yml | 解析 .wer 文件 | maxspl | 1 | internal | | | windows | win_arp_cache.yml | 解析来自 DFIR ORC 的 arp_cache.txt(arp -a 命令) | maxspl | 1 | internal | | | windows | win_bits.yml | 解析来自 DFIR ORC 的 BITS_jobs.txt(bitsadmin.exe /list /allusers /verbose 命令) | maxspl | 1 | internal | | | windows | win_dns_cache.yml | 解析来自 DFIR ORC 的 dns_cache.txt(ipconfig.exe /displaydns 命令)。输出字段语言取决于系统语言 | maxspl | 1 | internal | | | windows | win_dns_records.yml | 解析来自 DFIR ORC 的 DNS_records.txt(自定义 ps1 命令) | maxspl | 1 | internal | | | windows | win_enumlocs.yml | 解析来自 DFIR ORC 的 Enumlocs.txt | maxspl | 1 | internal | | | windows | win_handle.yml | 解析来自 DFIR ORC 的 handle(handle.exe /a 命令) | maxspl | 1 | internal | | | windows | win_listdlls.yml | 解析来自 DFIR ORC 的 Listdlls.txt(Listdlls.exe 命令) | maxspl | 1 | internal | | | windows | win_memory.yml | 解析 Windows 内存转储。 | maxspl | 1.1 | internal, external | memprocfs/memprocfs | | windows | win_netstat.yml | 解析来自 DFIR ORC 的 netstat.txt(netstat.exe -a -n -o 命令) | maxspl | 1 | internal | | | windows | win_routes.yml | 解析来自 DFIR ORC 的 routes.txt(route.exe PRINT 命令) | maxspl | 1 | internal | | | windows | win_tcpvcon.yml | 解析来自 DFIR ORC 的 routes.txt(Tcpvcon.exe -a -n -c 命令) | maxspl | 1 | internal | | | windows | win_timeline.yml | 解析 Windows Timeline(ActivitiesCache.db)工件。工具来自 Nihith (https://github.com/bolisettynihith/ActivitiesCacheParser) | maxspl | 1.1 | external | python | | windows | win_wmi_eventconsumer.yml | 解析来自 DFIR ORC 的 EventConsumer.txt(powershell.exe Get-WMIObject -Namespace root\Subscription -Class __EventConsumer 命令) | maxspl | 1 | internal | | | | # 许可证 本项目使用以下第三方库(如果我们遗漏了什么,请告知我们。) | Name | Version | License | URL | |---------------------------|---------|---------------------------------------------------------|------------------------------------------------------| | PyYAML | 5.4.1 | MIT License | https://pyyaml.org/ | | celery | 5.4.0 | BSD License | https://docs.celeryq.dev/ | | chardet | 5.2.0 | GNU LGPLv2+ | https://github.com/chardet/chardet | | flower | 2.0.1 | BSD License | https://github.com/mher/flower | | lz4 | 4.3.3 | BSD License | https://github.com/python-lz4/python-lz4 | | mpire | 2.10.2 | MIT License | https://github.com/sybrenjansen/mpire | | pandas | 2.2.2 | BSD License | https://pandas.pydata.org | | polars | 1.3.0 | MIT License | https://www.pola.rs/ | | psutil | 6.0.0 | BSD License | https://github.com/giampaolo/psutil | | puremagic | 1.26 | MIT License | https://github.com/cdgriffith/puremagic | | pywinrm | 0.4.3 | MIT License | http://github.com/diyan/pywinrm/ | | redis | 5.0.4 | MIT License | https://github.com/redis/redis-py | | smbprotocol | 1.13.0 | MIT License | https://github.com/jborean93/smbprotocol | | streamlit | 1.37.0 | Apache Software License | https://streamlit.io | | tqdm | 4.66.4 | MIT License; MPL 2.0 | https://tqdm.github.io | | watchdog | 4.0.1 | Apache Software License | https://github.com/gorakhargosh/watchdog | | RECmd | 1.1.0.0 | MIT License | https://github.com/EricZimmerman/RECmd | | MFTECmd | 1.3.0.0 | MIT License | https://github.com/EricZimmerman/MFTECmd | | WxTCmd | 0.5.0.0 | MIT License | https://github.com/EricZimmerman/WxTCmd | | LECmd | 1.00.0 | MIT License | https://github.com/EricZimmerman/LECmd | | AppCompatCacheParser | 0.9.0.0 | MIT License | https://github.com/EricZimmerman/AppCompatCacheParser| | PECmd | 1.5.0.0 | MIT License | https://github.com/EricZimmerman/PECmd | | AmcacheParser | 0.9.0.0 | MIT License | https://github.com/EricZimmerman/AmcacheParser | | JLECmd | 0.5.0.0 | MIT License | https://github.com/EricZimmerman/JLECmd | | RBCmd | 0.8.0.0 | MIT License | https://github.com/EricZimmerman/RBCmd | | SrumECmd | 0.3.0.0 | MIT License | https://github.com/EricZimmerman/SrumECmd | | RecentFileCacheParser | 0.4.0.0 | MIT License | https://github.com/EricZimmerman/RecentFileCacheParser| | evtx_dump | 0.8.3 | MIT License | https://github.com/omerbenamram/evtx | | 7z | 24.07 | GNU LGPL | https://7-zip.org/ | | Artemis | 1.1 | MIT license | https://github.com/puffyCid/artemis | | Splunk | latest | Splunk Software License Agreement | https://www.splunk.com | | PostgreSQL | latest | PostgreSQL License | https://www.postgresql.org/ | | SA-ADTimeline | 1.0 | GPL-3.0 license | https://github.com/ANSSI-FR/ADTimeline | | DECODE | 1.0 | BSD-3-Clause license | https://github.com/ANSSI-FR/DECODE | # 其他参考 - GOAD 安装脚本:https://github.com/Orange-Cyberdefense/GOAD - DFIR ORC: https://github.com/dfir-orc - UAC: https://github.com/tclahr/uac - Splunk TA EVTX DUMP : https://github.com/ZikyHD - Windows inside docker : https://github.com/dockur/windows - Vagrant box : https://portal.cloud.hashicorp.com/vagrant/discover/StefanScherer/windows_10
标签:DFIR-ORC, Docker, FTP漏洞扫描, JSON, Python, UAC, YML配置, 分布式处理, 取证工具, 安全编排, 安全防御评估, 库, 应急响应, 搜索引擎查询, 数字取证, 数据解析, 文件分类, 无后门, 日志处理, 模块化设计, 自动化修复, 自动化编排, 自动化脚本, 请求拦截, 调度框架, 逆向工具