Skip to content

Repository files navigation

OSIR

OSIR is a Python project designed for the automated processing of data using modules and profiles. It is primarily aimed at handling forensic artifacts but can be utilized for any type of files. OSIR acts as a scheduler, applying processing tools to files, where the output of some tools can serve as input to others.

OSIR is a dockerized and distributed parsing framework that works on Linux and Windows. The current project supports multiple triage outputs like DFIR ORC and UAC.

VersionLicense

Table of Contents

Architecture

OSIR can be deployed in several ways, and each component can be externalized.

Here's the default “all in one” configuration:

basic_arch_linuxbasic_arch_windows

How does it work ?

The goal of the tool is to transform input files using processors: each processor is a module (decompress archive, convert file to json, SIEM ingestion ...)

Modules are yml files that specify:

  • input (file or directory) based on its file/directory path and/or name
  • output: no file (ex: SIEM ingestion), single or multiple files
  • tool used and its command line: Windows or Linux tool, can even be a Python module
  • and other options to discover in the documentation

The tool itself is launched with 2 inputs:

  • a case: directory containing files to process, can containg multiple triages (Windows triages of several endpoints for example)
  • list of modules used to process the input files

Processing of case (several cases can be processed in same time):

  • the master contains the case directory and continuously monitors for input that matches the selected modules
  • each time a module matches an input, a task is added to the queue (output of a module can be input of another)
  • the queue is processed by one or more agent
  • output of modules is written on the master storage

Quick start

Clone the project including dependencies

git clone --recurse-submodules https://github.com/maxspl/OSIR

Example of usage: parsing DFIR ORC triage on Ubuntu host

usage

Main features

  • Can run on Windows and Linux without any limitation
  • Supports any type of input files
  • Auto setup of Windows VM (via Windows in Docker or vBox) to use Windows tools on a linux Host
  • Can process multiple triages at once
  • Distributed infrastructure: multiple endpoints can connect to distribute the load
  • Dockerized installation
  • Modular: processing tasks are defined by easily modifiable configuration files
  • Splunk integration for output analysis

Documentation

Project documentation: https://osir.readthedocs.io

Supported Modules

OSFilenameDescriptionAuthorVersionProcessor TypeTool Path
genericage_decrypt.ymlUsed to decrypt age files. Don't forget to put the key in /OSIR/OSIR/configs/dependencies/encryption/key.age.maxspl1externalage
genericindexer-ng.ymlSplunk logs ingestion (DFIR ORC and UAC) using module-specific json2splunk-rs configuration.maxspl1internaljson2splunk-rs
genericmongodb.ymlSplunk logs ingestion of Mongodb logs.Typ1externaljson2splunk-rs
genericthor_lite.ymlScan of collected file using Thor Lite.typ1externalthor-lite/thor-lite-linux-64
genericthor_orc.ymlScan of collected DFIR ORC (output of restore_fs module) file using Thor (requires Forensic license).maxspl1externalthor/thor-linux-64
genericthor_orc_ram.ymlScan of RAM restored file system from MemProcFS using Thor (requires Forensic license).maxspl1externalthor/thor-linux-64
genericthor_uac.ymlScan of collected UAC (output of extract_uac module) files using Thor (requires Forensic license).typ1externalthor/thor-linux-64
genericthor_update.ymlUpdate Thor signature files using thor-util.maxspl1externalthor/thor-util
networkzeek.ymlParsing of pcap files using zeekmaxspl1externaldocker
unixarp.ymlKelly Brazil - JsonConverter - Parsing the output of the command arp or arp -aKelly Brazil1.1externalcat
unixaudit.ymlParsing logs from '/var/log/audit'Typ1internal
unixauth.ymlParsing logs from '/var/log/auth.log'Typ1internal
unixblkid.ymlKelly Brazil - JsonConverter - Parsing the output of the command blkidKelly Brazil1.1externalcat
unixboot.ymlParsing logs from '/var/log/boot'Typ1internal
unixcollect_info_uac.ymlHash of DFIR UAC collected filemaxspl1external/usr/bin/find
unixcron.ymlParsing logs from '/var/log/cron'Typ1internal
unixdebug.ymlParsing logs from '/var/log/debug'Typ1internal
unixdf.ymlKelly Brazil - JsonConverter - Parsing the output of the command df and df -hKelly Brazil1.1externalcat
unixdmidecode.ymlKelly Brazil - JsonConverter - Parsing the output of the command dmidecodeKelly Brazil1.1externalcat
unixdpkg-l.ymlKelly Brazil - JsonConverter - Parsing the output of the command dpkg -lKelly Brazil1.1externalcat
unixdpkg.ymlParsing logs from '/var/log/dpkg'Typ1internal
unixenv.ymlKelly Brazil - JsonConverter - Parsing the output of the command envKelly Brazil1.1externalcat
unixextract_uac.ymlUsed to execute internal pre-processing for Unix Artefact Collector CaptureTyp1.1internaltar
unixfindmnt.ymlKelly Brazil - JsonConverter - Parsing the output of the command findmntKelly Brazil1.1externalcat
unixfree.ymlKelly Brazil - JsonConverter - Parsing the output of the command freeKelly Brazil1.1externalcat
unixip_route.ymlKelly Brazil - JsonConverter - Parsing the output of the command ip routeKelly Brazil1.1externalcat
unixiptables.ymlKelly Brazil - JsonConverter - Parsing the output of the command iptablesKelly Brazil1.1externalcat
unixjournal.ymlParsing logs from '/var/log/journal/'Typ1.1externaljournalctl
unixkernel.ymlParsing logs from '/var/log/kernel'Typ1internal
unixlast.ymlKelly Brazil - JsonConverter - Parsing the output of the command last and lastbKelly Brazil1.1externalcat
unixlastlog.ymlParsing logs from '/var/log/lastlog'Typ1internal
unixlsblk.ymlKelly Brazil - JsonConverter - Parsing the output of the command lsblkKelly Brazil1.1externalcat
unixlscpu.ymlKelly Brazil - JsonConverter - Parsing the output of the command lscpuKelly Brazil1externalcat
unixlsmod.ymlKelly Brazil - JsonConverter - Parsing the output of the command lsmodKelly Brazil1externalcat
unixlsusb.ymlKelly Brazil - JsonConverter - Parsing the output of the command lsusbKelly Brazil1externalcat
unixmactime.ymlParsing logs from '/bodyfile' in UAC collectTyp1externalmactime
unixmail.ymlParsing logs from '/var/log/mail'Typ1internal
unixmessage.ymlParsing logs from '/var/log/message'Typ1internal
unixmount.ymlKelly Brazil - JsonConverter - Parsing the output of the command mountKelly Brazil1externalcat
unixnetstat.ymlKelly Brazil - JsonConverter - Parsing the output of the command netstatKelly Brazil1externalcat
unixnmcli.ymlKelly Brazil - JsonConverter - Parsing the output of the command nmcliKelly Brazil1externalcat
unixpostgresql.ymlParsing logs from '/var/log/postgresql'Typ1internal
unixps.ymlKelly Brazil - JsonConverter - Parsing the output of the command ps and ps -efKelly Brazil1externalcat
unixsnap.ymlKelly Brazil - JsonConverter - Parsing the output of the command snapKelly Brazil1externalcat
unixsysctl.ymlKelly Brazil - JsonConverter - Parsing the output of the command sysctl -aKelly Brazil1externalcat
unixsyslog.ymlParsing logs from '/var/log/syslog'Typ1internal
unixsystemctl_luf.ymlKelly Brazil - JsonConverter - Parsing the output of the command systemctl list-unit-filesKelly Brazil1externalcat
unixtop.ymlKelly Brazil - JsonConverter - Parsing the output of the command top and top -bKelly Brazil1externalcat
unixuac_indexer.ymlSplunk logs ingestion (UAC) using json2splunk configuration from dependencies/uac_indexer_patterns.ymlTyp1externalpython
unixutmp.ymlParsing logs from '/var/log/utmp btmp wtmp'Typ1internal
unixvhdx.ymlUsed to mount vhdx file system.typ1externaltarget-mount
unixvmstat.ymlKelly Brazil - JsonConverter - Parsing the output of the command vmstatKelly Brazil1externalcat
unixweb_access.ymlParsing web access logsmaxspl1externalTurboLP
unixyum.ymlParsing logs from '/var/log/yum'Typ1internal
windowsIIS.ymlParse IIS from DFIR ORC restore_fs using Dissect pluginmaxspl1internal
windowsactivities_cache.ymlParse ActivitiesCache.db from DFIR ORC restore_fs using Dissect pluginmaxspl1internal
windowsamcache.ymlParsing of amcache artifact.maxspl1.1externalnet9/AmcacheParser.exe
windowsanssi_decode.ymlANSSI tool designed for detecting anomalous Portable Executable (PE) files among the NTFSInfo data collected by DFIR-ORCmaxspl1internalmachine_analysis
windowsauthlog.ymlParse auth log from UAC [root] using Dissect pluginTyp1internal
windowsbash_history.ymlParse bash history from UAC [root] using Dissect pluginTyp1internal
windowsbrowsers.ymlParsing of browsers artifact.maxspl1externalpython
windowscollect_info_orc.ymlHash of DFIR ORC collected filemaxspl1external/usr/bin/find
windowsdfir_orc_decrypt.ymlUsed to decrypt age files. Don't forget to put the key in /OSIR/OSIR/configs/dependencies/encryption/DFIRORC_key.pem.maxspl1externalorc-decrypt-rs
windowsdummy_external.ymlDummy module to test WSL / Powershell connexionmaxspl1externalnet9/AmcacheParser.exe
windowsevtx.ymlParsing of EVTX collected by DFIR ORC or in the filesystemmaxspl1.1externalevtx_dump
windowsextract_orc.ymlUsed to execute internal pre-processing for DFIR-ORC capturemaxspl1.1internal, external7zz
windowshayabusa.ymlHayabusa scan of evtx filesmaxspl1externalhayabusa/hayabusa-3.0.1-lin-x64-gnu
windowshives_hkcu.ymlParsing of registry hives artifact.maxspl1externalnet9/RECmd/RECmd.exe
windowshives_hklm.ymlParsing of registry hives artifact.maxspl1externalnet9/RECmd/RECmd.exe
windowsindexer.ymlSplunk logs ingestion (DFIR ORC and UAC) using module-specific json2splunk configuration instead of dependencies/*_indexer_patterns.ymlmaxspl1internalpython
windowsjump_list.ymlParsing of jump list artifact.maxspl1externalnet9/JLECmd.exe
windowslnk.ymlParsing of lnk artifact.maxspl1externalnet9/LECmd.exe
windowslog2timeline_plaso.ymlrun log2timeline to create a Plaso storage filemaxspl1externaldocker
windowsmft.ymlParsing of $MFT artifact.Typ1externalnet9/MFTECmd.exe
windowsorc_indexer.ymlplunk logs ingestion (ORC) using json2splunk configuration from dependencies/orc_indexer_patterns.ymlmaxspl1externalpython
windowsorc_offline.ymlUsed to execute DFIR ORC on dd capturemaxspl1externalpython.exe
windowspowershell_history.ymlParse ConsoleHost_history.txtmaxspl1internal
windowsprefetch.ymlEric Zimmerman - PECmd.exeEric Zimmerman1externalnet9/PECmd.exe
windowsprefetch_orc.ymlParse Prefetchmaxspl1externalnet9/PECmd.exe
windowspstree_live_response.ymlParse processes1.csv to produce pstreemaxspl1externalpython
windowspstree_security.ymlParse output of EVTX module to build process tree from security.evtx - event ID 4688maxspl1externalpython
windowspstree_sysmon.ymlParse output of EVTX module to build process tree from security.evtx - event ID 1maxspl1externalpython
windowsrecycle_bin.ymlParsing of recycle bin artifact.maxspl1externalnet9/RBCmd.exe
windowsrestore_fs.ymlRestore original filesystem structure from DFIR ORC triagemaxspl1externalRestore_FS
windowsshell_bags.ymlParsing of shell bags artifact.maxspl1externalnet9/SBECmd.exe
windowsshimcache.ymlParsing of ShimCache artifact.maxspl1externalnet9/AppCompatCacheParser.exe
windowssrum.ymlParsing of SRUM artifact.maxspl1externalartemis
windowstest_process_dir.ymldescriptionmaxspl1externalprocess_dir
windowstest_process_dir_multiple_output.ymltest_process_dir_multiple_outputmaxspl1externalprocess_dir_multiple_output
windowswer.ymlParse .wer filesmaxspl1internal
windowswin_arp_cache.ymlParse arp_cache.txt from DFIR ORC (arp -a command)maxspl1internal
windowswin_bits.ymlParse BITS_jobs.txt from DFIR ORC (bitsadmin.exe /list /allusers /verbose command)maxspl1internal
windowswin_dns_cache.ymlParse dns_cache.txt from DFIR ORC (ipconfig.exe /displaydns command). Output fields lang depends on the system langmaxspl1internal
windowswin_dns_records.ymlParse DNS_records.txt from DFIR ORC (custom ps1 command)maxspl1internal
windowswin_enumlocs.ymlParse Enumlocs.txt from DFIR ORCmaxspl1internal
windowswin_handle.ymlParse handle from DFIR ORC (handle.exe /a command)maxspl1internal
windowswin_listdlls.ymlParse Listdlls.txt from DFIR ORC (Listdlls.exe command)maxspl1internal
windowswin_memory.ymlParsing of Windows memory dump.maxspl1.1internal, externalmemprocfs/memprocfs
windowswin_netstat.ymlParse netstat.txt from DFIR ORC (netstat.exe -a -n -o command)maxspl1internal
windowswin_routes.ymlParse routes.txt from DFIR ORC (route.exe PRINT command)maxspl1internal
windowswin_tcpvcon.ymlParse routes.txt from DFIR ORC (Tcpvcon.exe -a -n -c command)maxspl1internal
windowswin_timeline.ymlParsing of Windows Timeline (ActivitiesCache.db) artifact. Tool from Nihith (https://github.com/bolisettynihith/ActivitiesCacheParser)maxspl1.1externalpython
windowswin_wmi_eventconsumer.ymlParse EventConsumer.txt from DFIR ORC (powershell.exe Get-WMIObject -Namespace root\Subscription -Class __EventConsumer command)maxspl1internal

Contributing

All contributions are welcome! Don't hesitate to report any bugs or problems you encounter with the framework. To contribute, please follow this guide

Creators

Typ ❤️

License

The project uses the following third-party libraries (If we forget anything, please let us know.)

NameVersionLicenseURL
PyYAML5.4.1MIT Licensehttps://pyyaml.org/
celery5.4.0BSD Licensehttps://docs.celeryq.dev/
chardet5.2.0GNU LGPLv2+https://github.com/chardet/chardet
flower2.0.1BSD Licensehttps://github.com/mher/flower
lz44.3.3BSD Licensehttps://github.com/python-lz4/python-lz4
mpire2.10.2MIT Licensehttps://github.com/sybrenjansen/mpire
pandas2.2.2BSD Licensehttps://pandas.pydata.org
polars1.3.0MIT Licensehttps://www.pola.rs/
psutil6.0.0BSD Licensehttps://github.com/giampaolo/psutil
puremagic1.26MIT Licensehttps://github.com/cdgriffith/puremagic
pywinrm0.4.3MIT Licensehttp://github.com/diyan/pywinrm/
redis5.0.4MIT Licensehttps://github.com/redis/redis-py
smbprotocol1.13.0MIT Licensehttps://github.com/jborean93/smbprotocol
streamlit1.37.0Apache Software Licensehttps://streamlit.io
tqdm4.66.4MIT License; MPL 2.0https://tqdm.github.io
watchdog4.0.1Apache Software Licensehttps://github.com/gorakhargosh/watchdog
RECmd1.1.0.0MIT Licensehttps://github.com/EricZimmerman/RECmd
MFTECmd1.3.0.0MIT Licensehttps://github.com/EricZimmerman/MFTECmd
WxTCmd0.5.0.0MIT Licensehttps://github.com/EricZimmerman/WxTCmd
LECmd1.0.0.0MIT Licensehttps://github.com/EricZimmerman/LECmd
AppCompatCacheParser0.9.0.0MIT Licensehttps://github.com/EricZimmerman/AppCompatCacheParser
PECmd1.5.0.0MIT Licensehttps://github.com/EricZimmerman/PECmd
AmcacheParser0.9.0.0MIT Licensehttps://github.com/EricZimmerman/AmcacheParser
JLECmd0.5.0.0MIT Licensehttps://github.com/EricZimmerman/JLECmd
RBCmd0.8.0.0MIT Licensehttps://github.com/EricZimmerman/RBCmd
SrumECmd0.3.0.0MIT Licensehttps://github.com/EricZimmerman/SrumECmd
RecentFileCacheParser0.4.0.0MIT Licensehttps://github.com/EricZimmerman/RecentFileCacheParser
evtx_dump0.8.3MIT Licensehttps://github.com/omerbenamram/evtx
7z24.07GNU LGPLhttps://7-zip.org/
Artemis1.1MIT licensehttps://github.com/puffyCid/artemis
SplunklatestSplunk Software License Agreementhttps://www.splunk.com
PostgreSQLlatestPostgreSQL Licensehttps://www.postgresql.org/
SA-ADTimeline1.0GPL-3.0 licensehttps://github.com/ANSSI-FR/ADTimeline
DECODE1.0BSD-3-Clause licensehttps://github.com/ANSSI-FR/DECODE

Other references

Releases

Packages

Contributors

Languages