
Windowsフォレンジックアーティファクトを迅速に検索・ハンティングする
Chainsaw は、イベントログや MFT ファイルなどの Windows フォレンジックアーティファクト内の脅威を迅速に特定するための強力な「ファーストレスポンス」機能を提供します。Chainsaw は、キーワードによるイベントログ検索のための汎用的かつ高速な方法を提供し、Sigma 検出ルールの組み込みサポートと独自の Chainsaw 検出ルールによる脅威の特定を実現します。
このツールの詳細情報は Wiki にあります: https://github.com/WithSecureLabs/chainsaw/wiki
WithSecure Countercept では、EDR エージェントを介してエンドポイントから多種多様なテレメトリソースを取り込み、マネージド検出および対応サービスを提供しています。しかし、EDR が取得していないフォレンジックアーティファクトを迅速に分析する必要がある状況もあります。一般的な例としては、侵害時に EDR がインストールされていなかった環境でのインシデントレスポンス調査が挙げられます。Chainsaw は、こうした状況においてフォレンジックアーティファクトの迅速なトリアージを実行するためのツールを、スレットハンターとインシデントレスポンスコンサルタントに提供するために作成されました。
Windows イベントログは、脅威ハンティングやインシデントレスポンス調査にとって豊富なフォレンジック情報源を提供します。残念ながら、イベントログの処理と検索は低速で時間のかかるプロセスになる可能性があり、多くの場合、ログデータを効率的にハンティングして検出ロジックを適用するには、ELK スタックや Splunk インスタンスなどの周辺インフラストラクチャのオーバーヘッドが必要です。このオーバーヘッドのせいで、ブルーチームは Windows イベントログを迅速にトリアージして、調査を進めるために必要な方向性と結論を導き出せないことがよくあります。Chainsaw は、Windows イベントログの迅速な検索とハンティングを可能にするため、この問題を解決します。
本稿執筆時点では、Windows イベントログのトリアージ、ログ内の有用な要素の特定、Sigma などの検出ロジックルール形式を適用して悪意のある活動の兆候を検出する、シンプルで高速な方法を提供するオープンソースのスタンドアロンツールはほとんどありません。私たちのテストでは、既存のツールは大量のイベントログに検出ロジックを効率的に適用できず、迅速なトリアージが必要なシナリオには不向きでした。
--sigma パラメータと --mapping パラメータを使用すると、SIGMA 検出ルールのサブセット(または SIGMA の git リポジトリ全体)を含むディレクトリを指定でき、chainsaw は指定されたイベントログに対してこれらのルールを自動的にロード、変換、実行します。マッピングファイルは、ルールマッチングに使用するイベントログ内のフィールドを chainsaw に指示します。デフォルトでは、Chainsaw は以下を含む(ただしこれらに限定されない)幅広いイベントログタイプをサポートしています。
ルール検出に使用されるフィールドの完全なリストについては、マッピングファイルを参照してください。必要に応じて拡張してください。
Chainsaw は、sigma ルールのサポートに加えて、カスタムルール形式もサポートしています。リポジトリには rules ディレクトリがあり、ユーザーが以下のことを行えるさまざまな Chainsaw ルールが含まれています。
Chainsaw v2 のリリースに伴い、Sigma Rules リポジトリと EVTX-Attack-Samples リポジトリを Chainsaw のサブモジュールとして含めないことにしました。最新バージョンを確実に入手するには、これらのリポジトリを個別にクローンすることをお勧めします。
Chainsaw バイナリ、Sigma ルール、サンプルイベントログを含むオールインワンパッケージがまだ必要な場合は、この GitHub リポジトリの リリースセクション からダウンロードできます。このリリースセクションには、さまざまなプラットフォームとアーキテクチャ向けに事前コンパイルされたバイナリのみのバージョンの Chainsaw もあります。
Chainsaw を自分でコンパイルしたい場合は、Chainsaw リポジトリをクローンしてください:
git clone https://github.com/WithSecureLabs/chainsaw.git
そして、cargo build --release を実行してコードを自分でコンパイルします。ビルドが完了すると、target/release フォルダにコンパイル済みバイナリのコピーがあります。
実行時間が大幅に短縮されるため、必ず --release フラグを付けてビルドしてください。
Chainsaw の実行時の動作をすぐに確認したい場合は、Sigma Rules リポジトリと EVTX-Attack-Samples リポジトリをクローンしてください:``` git clone https://github.com/SigmaHQ/sigma git clone https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES.git
そして、以下のパラメータでChainsawを実行します:```
./chainsaw hunt EVTX-ATTACK-SAMPLES/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml
├───devShells │ └───x86_64-linux │ └───default: development environment 'nix-shell' ├───formatter │ └───x86_64-linux: package 'alejandra-3.1.0' └───packages └───x86_64-linux ├───chainsaw: package 'chainsaw-2.10.1' └───default: package 'chainsaw-2.10.1'
Chainsaw は、パッケージとして [nixpkgs](https://search.nixos.org/packages?query=chainsaw) から入手できます。
NixOS を使用している場合は、システム構成ファイルに `chainsaw` を追加するだけです。
ただし、NixOS を使用していない場合でも、Nix 経由で Chainsaw をインストールできます。推奨される方法は `nix-shell` を使用することです。これにより、$PATH 環境変数が一時的に変更されます。
これを行うには、次のコマンドを実行してください:```
nix-shell -p chainsaw
また、このリポジトリがflakeであるという事実を利用して、以下を実行することもできます:``` nix profile install github:WithSecureLabs/chainsaw
However, if you want to build chainsaw yourself, using Nix, you can once again utilize `flake.nix`, which is provided with this repository.
To build the binary, please run the following, in the root dir of cloned repo
ただし、chainsaw を自分でビルドしたい場合も、Nix を使えば、このリポジトリに同梱されている `flake.nix` を利用できます。
バイナリをビルドするには、クローンしたリポジトリのルートディレクトリで次のコマンドを実行してください。```
nix build .#
This will create ./result directory, with chainsaw binary located under ./result/bin/chainsaw.
chainsaw をダウンロードして実行すると、ローカルの EDR / アンチウイルスエンジンが Chainsaw を悪意のあるものとして検出する場合があります。この例は、以下の GitHub の issue で確認できます: Example1、Example2。
これらの警告は、通常、悪意のある文字列(例: "mimikatz")への参照を含むサンプルイベントログや Sigma ルールに起因します。また、何らかのヒューリスティック検出が原因で、ごく一部のアンチウイルスエンジンが Chainsaw バイナリを検出した事例も確認されています。
2022年7月に、Chainsaw の動作方法を大幅に刷新したバージョン2をリリースしました。Chainsaw v2 には、以下のハイライトを含む、いくつかの重要な改善が含まれています:
それでも Chainsaw のバージョン1を使用したい場合は、リリースセクション でコンパイル済みバイナリを見つけるか、v1.x.x ブランチ でソースコードにアクセスできます。なお、Chainsaw v1 はもはやメンテナンスされておらず、すべてのユーザーは Chainsaw v2 への移行を検討してください。
@AlexKornitzer 氏に心から感謝します。彼は Chainsaw v1 の「Christmas Project」コードベースを、v2 の洗練された製品へと変換することに成功しました。
USAGE:
chainsaw search [FLAGS] [OPTIONS] <pattern> [--] [path]...
FLAGS:
-h, --help Prints help information
-i, --ignore-case Ignore the case when searching patterns
--json Print the output in json format
--load-unknown Allow chainsaw to try and load files it cannot identify
--local Output the timestamp using the local machine's timestamp
-q Suppress informational output
--skip-errors Continue to search when an error is encountered
-V, --version Prints version information
OPTIONS:
--extension <extension>... Only search through files with the provided extension
--from <from> The timestamp to search from. Drops any documents older than the value provided
-o, --output <output> The path to output results to
-e, --regex <pattern>... A string or regular expression pattern to search for
-t, --tau <tau>... Tau expressions to search with. e.g. 'Event.System.EventID: =4104'
--timestamp <timestamp> The field that contains the timestamp
--timezone <timezone> Output the timestamp using the timezone provided
--to <to> The timestamp to search up to. Drops any documents newer than the value provided
ARGS:
<pattern> A string or regular expression pattern to search for. Not used when -e or -t is specified
<path>... The paths containing event logs to load and hunt through
大文字と小文字を区別せずに "mimikatz" という文字列をすべての .evtx ファイルで検索
./chainsaw search mimikatz -i evtx_attack_samples/
すべての .evtx ファイルで PowerShell スクリプトブロックイベント(イベント ID 4014)を検索
./chainsaw search -t 'Event.System.EventID: =4104' evtx_attack_samples/
特定の evtx ログで、正規表現パターンに一致するログオンイベントを検索し、JSON 形式で出力
./chainsaw search -e "DC[0-9].insecurebank.local" evtx_attack_samples --json
USAGE:
chainsaw hunt [FLAGS] [OPTIONS] [--] [path]...
FLAGS:
--csv Print the output in csv format
--full Print the full values for the tabular output
-h, --help Prints help information
--json Print the output in json format
--load-unknown Allow chainsaw to try and load files it cannot identify
--local Output the timestamp using the local machine's timestamp
--log Print the output in log like format
--metadata Display additional metadata in the tablar output
-q Suppress informational output
--skip-errors Continue to hunt when an error is encountered
-V, --version Prints version information
OPTIONS:
--column-width <column-width> Set the column width for the tabular output
--extension <extension>... Only hunt through files with the provided extension
--from <from> The timestamp to hunt from. Drops any documents older than the value provided
--kind <kind>... Restrict loaded rules to specified kinds
--level <level>... Restrict loaded rules to specified levels
-m, --mapping <mapping>... A mapping file to tell Chainsaw how to use third-party rules
-o, --output <output> A path to output results to
-r, --rule <rule>... A path containing additional rules to hunt with
-s, --sigma <sigma>... A path containing Sigma rules to hunt with
--status <status>... Restrict loaded rules to specified statuses
--timezone <timezone> Output the timestamp using the timezone provided
--to <to> The timestamp to hunt up to. Drops any documents newer than the value provided
ARGS:
<rules> The path to a collection of rules to use for hunting
<path>... The paths containing event logs to load and hunt through
検出ロジックに Sigma ルールを使用して、すべての evtx ファイルをハント
./chainsaw hunt evtx_attack_samples/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml
検出ロジックに Sigma ルールと Chainsaw ルールを使用してすべての evtx ファイルをハントし、CSV 形式で results フォルダに出力
./chainsaw hunt evtx_attack_samples/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml -r rules/ --csv --output results
検出ロジックに Sigma ルールを使用してすべての evtx ファイルをハントし、特定のタイムスタンプ間のみを検索して、結果を JSON 形式で出力
./chainsaw hunt evtx_attack_samples/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml --from "2019-03-17T19:09:39" --to "2019-03-17T19:09:50" --json
$ ./chainsaw hunt -r rules/ evtx_attack_samples -s sigma/rules --mapping mappings/sigma-event-logs-all.yml --level critical
██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗███████╗ █████╗ ██╗ ██╗
██╔════╝██║ ██║██╔══██╗██║████╗ ██║██╔════╝██╔══██╗██║ ██║
██║ ███████║███████║██║██╔██╗ ██║███████╗███████║██║ █╗ ██║
██║ ██╔══██║██╔══██║██║██║╚██╗██║╚════██║██╔══██║██║███╗██║
╚██████╗██║ ██║██║ ██║██║██║ ╚████║███████║██║ ██║╚███╔███╔╝
╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝
By WithSecure Countercept (@FranticTyping, @AlexKornitzer)
[+] Loading detection rules from: ../../rules/, /tmp/sigma/rules
[+] Loaded 129 detection rules (198 not loaded)
[+] Loading event logs from: ../../evtx_attack_samples (extensions: .evtx)
[+] Loaded 268 EVTX files (37.5 MB)
[+] Hunting: [========================================] 268/268
[+] Group: Antivirus
┌─────────────────────┬────────────────────┬──────────┬───────────┬─────────────┬────────────────────────────────┬──────────────────────────────────┬────────────────────┐
│ timestamp │ detections │ Event ID │ Record ID │ Computer │ Threat Name │ Threat Path │ User │
├─────────────────────┼────────────────────┼──────────┼───────────┼─────────────┼────────────────────────────────┼──────────────────────────────────┼────────────────────┤
│ 2019-07-18 20:40:00 │ ‣ Windows Defender │ 1116 │ 37 │ MSEDGEWIN10 │ Trojan:PowerShell/Powersploit. │ file:_C:\AtomicRedTeam\atomic- │ MSEDGEWIN10\IEUser │
│ │ │ │ │ │ M │ red-team-master\atomics\T1056\ │ │
│ │ │ │ │ │ │ Get-Keystrokes.ps1 │ │
├─────────────────────┼────────────────────┼──────────┼───────────┼─────────────┼────────────────────────────────┼──────────────────────────────────┼────────────────────┤
│ 2019-07-18 20:53:31 │ ‣ Windows Defender │ 1117 │ 106 │ MSEDGEWIN10 │ Trojan:XML/Exeselrun.gen!A │ file:_C:\AtomicRedTeam\atomic- │ MSEDGEWIN10\IEUser │
│ │ │ │ │ │ │ red-team-master\atomics\T1086\ │ │
│ │ │ │ │ │ │ payloads\test.xsl │ │
└─────────────────────┴────────────────────┴──────────┴───────────┴─────────────┴────────────────────────────────┴──────────────────────────────────┴────────────────────┘
[+] Group: Log Tampering
┌─────────────────────┬───────────────────────────────┬──────────┬───────────┬────────────────────────────────┬───────────────┐
│ timestamp │ detections │ Event ID │ Record ID │ Computer │ User │
├─────────────────────┼───────────────────────────────┼──────────┼───────────┼────────────────────────────────┼───────────────┤
│ 2019-01-20 07:00:50 │ ‣ Security Audit Logs Cleared │ 1102 │ 32853 │ WIN-77LTAPHIQ1R.example.corp │ Administrator │
└─────────────────────┴───────────────────────────────┴──────────┴───────────┴────────────────────────────────┴───────────────┘[+] グループ: Sigma
┌─────────────────────┬────────────────────────────────┬───────┬────────────────────────────────┬──────────┬───────────┬──────────────────────────┬──────────────────────────────────┐
│ タイムスタンプ │ 検出 │ 件数 │ Event.System.Provider │ Event ID │ Record ID │ コンピュータ │ イベントデータ │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-04-29 20:59:14 │ ‣ 悪意のある名前付きパイプ │ 1 │ Microsoft-Windows-Sysmon │ 18 │ 8046 │ IEWIN7 │ --- │
│ │ │ │ │ │ │ │ Image: System │
│ │ │ │ │ │ │ │ PipeName: "\\46a676ab7f179e511 │
│ │ │ │ │ │ │ │ e30dd2dc41bd388" │
│ │ │ │ │ │ │ │ ProcessGuid: 365ABB72-D9C4-5CC │
│ │ │ │ │ │ │ │ 7-0000-0010EA030000 │
│ │ │ │ │ │ │ │ ProcessId: 4 │
│ │ │ │ │ │ │ │ RuleName: "" │
│ │ │ │ │ │ │ │ UtcTime: "2019-04-29 20:59:14. │
│ │ │ │ │ │ │ │ 430" │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-04-30 20:26:51 │ ‣ CobaltStrikeサービス │ 1 │ Microsoft-Windows-Sysmon │ 13 │ 9806 │ IEWIN7 │ Details: "%%COMSPEC%% /b /c st │
│ │ のレジストリインストール │ │ │ │ │ │ art /b /min powershell.exe -no │
│ │ │ │ │ │ │ │ p -w hidden -noni -c \"if([Int │
│ │ │ │ │ │ │ │ Ptr]::Size -eq 4){$b='powershe │
│ │ │ │ │ │ │ │ ll.exe'}else{$b=$env:windir+'\ │
│ │ │ │ │ │ │ │ \syswow64\\WindowsPowerShell\\ │
│ │ │ │ │ │ │ │ v1.0\\powershell.exe'};$s=New- │
│ │ │ │ │ │ │ │ Object System.Diagnostics.Proc │
│ │ │ │ │ │ │ │ essStartInfo;$s.FileName=$b;$s │
│ │ │ │ │ │ │ │ .Arguments='-noni -nop -w hidd │
│ │ │ │ │ │ │ │ en -c &([scriptblock]::create( │
│ │ │ │ │ │ │ │ (New-Object IO.StreamReader(Ne │
│ │ │ │ │ │ │ │ w-Object IO.Compression.GzipSt │
│ │ │ │ │ │ │ │ ream((New-Object IO.MemoryStre │
│ │ │ │ │ │ │ │ am(,[Convert]::FromBase64Strin │
│ │ │ │ │ │ │ │ g(''H4sIAIuvyFwCA7VW+2/aSBD+OZ │
│ │ │ │ │ │ │ │ H6P1... │
│ │ │ │ │ │ │ │ (--full で全内容を表示) │
│ │ │ │ │ │ │ │ EventType: SetValue │
│ │ │ │ │ │ │ │ Image: "C:\\Windows\\system32\ │
│ │ │ │ │ │ │ │ \services.exe" │
│ │ │ │ │ │ │ │ ProcessGuid: 365ABB72-2586-5CC │
│ │ │ │ │ │ │ │ 9-0000-0010DC530000 │
│ │ │ │ │ │ │ │ ProcessId: 460 │
│ │ │ │ │ │ │ │ RuleName: "" │
│ │ │ │ │ │ │ │ TargetObject: "HKLM\\System\\C │
│ │ │ │ │ │ │ │ urrentControlSet\\services\\he │
│ │ │ │ │ │ │ │ llo\\ImagePath" │
│ │ │ │ │ │ │ │ UtcTime: "2019-04-30 20:26:51. │
│ │ │ │ │ │ │ │ 934" │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-05-12 12:52:43 │ ‣ Meterpreterまたは │ 1 │ Service Control Manager │ 7045 │ 10446 │ IEWIN7 │ --- │
│ │ Cobalt Strike Getsystem │ │ │ │ │ │ AccountName: LocalSystem │
│ │ サービスインストール │ │ │ │ │ │ ImagePath: "%COMSPEC% /c ping │
│ │ │ │ │ │ │ │ -n 1 127.0.0.1 >nul && echo 'W │
│ │ │ │ │ │ │ │ inPwnage' > \\\\.\\pipe\\WinPw │
│ │ │ │ │ │ │ │ nagePipe" │
│ │ │ │ │ │ │ │ ServiceName: WinPwnage │
│ │ │ │ │ │ │ │ ServiceType: user mode service │
│ │ │ │ │ │ │ │ StartType: demand start │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-06-21 07:35:37 │ ‣ Dumpertプロセスダンパー │ 1 │ Microsoft-Windows-Sysmon │ 11 │ 238375 │ alice.insecurebank.local │ --- │
│ │ │ │ │ │ │ │ CreationUtcTime: "2019-06-21 0 │
│ │ │ │ │ │ │ │ 6:53:03.227" │
│ │ │ │ │ │ │ │ Image: "C:\\Users\\administrat │
│ │ │ │ │ │ │ │ or\\Desktop\\x64\\Outflank-Dum │
│ │ │ │ │ │ │ │ pert.exe" │
│ │ │ │ │ │ │ │ ProcessGuid: ECAD0485-88C9-5D0 │
│ │ │ │ │ │ │ │ C-0000-0010348C1D00 │
│ │ │ │ │ │ │ │ ProcessId: 3572 │
│ │ │ │ │ │ │ │ RuleName: "" │
│ │ │ │ │ │ │ │ TargetFilename: "C:\\Windows\\ │
│ │ │ │ │ │ │ │ Temp\\dumpert.dmp" │
│ │ │ │ │ │ │ │ UtcTime: "2019-06-21 07:35:37. │
│ │ │ │ │ │ │ │ 324" │
└─────────────────────┴────────────────────────────────┴───────┴────────────────────────────────┴──────────┴───────────┴──────────────────────────┴──────────────────────────────────┘
コマンド:
analyse shimcache shimcacheから実行タイムラインを作成します(オプションでamcacheエンリッチメントを使用)
使用方法:
chainsaw analyse shimcache [OPTIONS] <SHIMCACHE>
引数:
<SHIMCACHE> shimcacheアーティファクト(SYSTEMレジストリファイル)へのパス
オプション:
-e, --regex <pattern> shimcacheエントリのタイムスタンプが挿入時刻と一致する場合にそれを検出するための文字列または正規表現
-r, --regexfile <REGEX_FILE> shimcacheエントリのタイムスタンプが挿入時刻と一致する場合にそれを検出するための正規表現パターンを含む改行区切りのファイルへのパス
-o, --output <OUTPUT> 結果のCSVファイルを出力するパス
-a, --amcache <AMCACHE> タイムラインエンリッチメント用のamcacheアーティファクト(Amcache.hve)へのパス
-p, --tspair shimcacheエントリの追加の挿入タイムスタンプを特定するため、shimcacheとamcache間の近接タイムスタンプペア検出を有効にします
-h, --help ヘルプを表示
--regexfile パラメータ用のサンプルパターンファイルは analysis/shimcache_patterns.txt に含まれています。提供された正規表現パターンでshimcacheアーティファクトを解析し、タイムスタンプ近接ペア検出を有効にしたamcacheエンリッチメントを使用します。CSVファイルに出力します。
./chainsaw analyse shimcache ./SYSTEM --regexfile ./analysis/shimcache_patterns.txt --amcache ./Amcache.hve --tspair --output ./output.csv
提供された正規表現パターンでshimcacheアーティファクトを解析します(amcacheエンリッチメントなし)。端末に出力します。
./chainsaw analyse shimcache ./SYSTEM --regexfile ./analysis/shimcache_patterns.txt
1つ以上の .evtx ファイル内で、選択的なイベントログ改ざんの2つの指標を検出します:
RecordIDギャップ: チャネルごとの EventRecordID 値は通常、穴のない単調増加となります。単一のevtxファイル内の穴(つまり、ログローテーション境界ではない)は異常であり、騒がしい「ログ消去」イベント(EID 1102)をトリガーせずに個々のレコードを外科的に削除するツール(例:Eventlogedit スタイルの手法)が残す指紋です。
時間ギャップ: 通常は頻繁にイベントが記録されるチャネルにおいて、連続するイベント間の異常に長い静かな期間は、その期間内のレコードが削除されたことを示す可能性があります。しきい値は設定可能であり、ホストごとのベースライン作成はアナリストに委ねられています。
コマンド: analyse gaps evtxファイル内の時系列またはRecordIDギャップを検出します(選択的なレコード削除の可能性)
使用方法: chainsaw analyse gaps [OPTIONS] [PATH]...
引数: [PATH]... evtxファイルまたはそれらを含むディレクトリへのパス
オプション: --min-time-gap-minutes 疑わしいとしてフラグを立てる、連続するイベント間の最小時間ギャップ(分)[デフォルト: 30] --no-record-id-gaps RecordIDギャップ検出をスキップ(時間ギャップのみフラグを立てる) --no-time-gaps 時間ギャップ検出をスキップ(RecordIDギャップのみフラグを立てる) -j, --json 出力をJSON形式で表示 -o, --output 出力をファイルに保存 -q 情報出力を抑制 --skip-errors エラーが発生しても続行 -h, --help ヘルプを表示
デフォルトの30分しきい値を使用して、evtxファイルのディレクトリをRecordIDギャップと時間ギャップの両方についてスキャンします:
./chainsaw analyse gaps ./Logs/
選択的に削除されたレコード(RecordIDの穴)のみを探し、機械可読なJSONを出力します:
./chainsaw analyse gaps ./Logs/ --no-time-gaps --json -o ./gaps.json
Chainsawに実装されているSRUMデータベースパーサーは、テーブルに関するハードコードされた値に依存しないという点で他のパーサーとは異なります。情報は必須の引数であるSOFTWAREハイブから直接抽出されます。その目的は、不明なテーブルに関連するエラーを回避することです。
コマンド:
analyse srum SRUMデータベースを解析
使用方法:
chainsaw analyse srum [OPTIONS] --software <SOFTWARE_HIVE_PATH> <SRUM_PATH>
引数:
<SRUM_PATH> SRUMデータベースへのパス
オプション:
-s, --software <SOFTWARE_HIVE_PATH> SOFTWAREハイブへのパス
--stats-only SRUMデータベースに関する詳細のみを出力
-q 情報出力を抑制
-o, --output <OUTPUT> 出力をファイルに保存
-h, --help ヘルプを表示
SRUMデータベースを解析します(SOFTWAREハイブは必須です)
./chainsaw analyse srum --software ./SOFTWARE ./SRUDB.dat --output ./output.json
$ ./chainsaw analyse srum --software ./SOFTWARE ./SRUDB.dat -o ./output.json
██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗███████╗ █████╗ ██╗ ██╗
██╔════╝██║ ██║██╔══██╗██║████╗ ██║██╔════╝██╔══██╗██║ ██║
██║ ███████║███████║██║██╔██╗ ██║███████╗███████║██║ █╗ ██║
██║ ██╔══██║██╔══██║██║██║╚██╗██║╚════██║██╔══██║██║███╗██║
╚██████╗██║ ██║██║ ██║██║██║ ╚████║███████║██║ ██║╚███╔███╔╝
╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝
作成者: WithSecure Countercept (@FranticTyping, @AlexKornitzer)[+] ESE database file loaded from "/home/user/Documents/SRUDB.dat"
[+] Parsing the ESE database...
[+] SOFTWARE hive loaded from "/home/user/Documents/SOFTWARE"
[+] Parsing the SOFTWARE registry hive...
[+] Analysing the SRUM database...
[+] Details about the tables related to the SRUM extensions:
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| Table GUID | Table Name | DLL Path | Timeframe of the data | Expected Retention Time |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {5C8CF1C7-7257-4F13-B223-970EF5939312} | App Timeline Provider | %SystemRoot%\System32\eeprov.dll | 2022-03-10 16:34:59 UTC | 7 days |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {B6D82AF1-F780-4E17-8077-6CB9AD8A6FC4} | Tagged Energy Provider | %SystemRoot%\System32\eeprov.dll | No records | 3 days |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {D10CA2FE-6FCF-4F6D-848E-B2E99266FA86} | WPN SRUM Provider | %SystemRoot%\System32\wpnsruprov.dll | 2022-03-10 20:09:00 UTC | 60 days |
| | | | 2022-03-10 21:09:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {D10CA2FE-6FCF-4F6D-848E-B2E99266FA89} | Application Resource Usage Provider | %SystemRoot%\System32\appsruprov.dll | 2022-03-10 16:34:59 UTC | 60 days |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {FEE4E14F-02A9-4550-B5CE-5FA2DA202E37} | Energy Usage Provider | %SystemRoot%\System32\energyprov.dll | No records | 60 days |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {FEE4E14F-02A9-4550-B5CE-5FA2DA202E37}LT | Energy Usage Provider (Long Term) | %SystemRoot%\System32\energyprov.dll | No records | 1820 days |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {973F5D5C-1D90-4944-BE8E-24B94231A174} | Windows Network Data Usage Monitor | %SystemRoot%\System32\nduprov.dll | 2022-03-10 16:34:59 UTC | 60 days |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {7ACBBAA3-D029-4BE4-9A7A-0885927F1D8F} | vfuprov | %SystemRoot%\System32\vfuprov.dll | 2022-03-10 20:09:00 UTC | 60 days |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {DA73FB89-2BEA-4DDC-86B8-6E048C6DA477} | Energy Estimation Provider | %SystemRoot%\System32\eeprov.dll | No records | 7 days |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {DD6636C4-8929-4683-974E-22C046A43763} | Windows Network Connectivity Usage Monitor | %SystemRoot%\System32\ncuprov.dll | 2022-03-10 16:34:59 UTC | 60 days |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
[+] SRUM database parsed successfully
[+] Saving output to "/home/user/Documents/output.json"
[+] Saved output to "/home/user/Documents/output.json"
このアーティファクトに関する新しいフォレンジック知見の情報は、Wiki で確認できます: https://github.com/WithSecureLabs/chainsaw/wiki/SRUM-Analysis.
USAGE:
chainsaw dump [OPTIONS] <PATH>
ARGUMENTS:
<PATH> The path to an artefact to dump
OPTIONS:
-j, --json Dump in json format
--jsonl Print the output in jsonl format
--load-unknown Allow chainsaw to try and load files it cannot identify
-o, --output <OUTPUT> A path to output results to
-q Suppress informational output
--skip-errors Continue to hunt when an error is encountered
-h, --help Print help
SOFTWARE ハイブをダンプする
./chainsaw dump ./SOFTWARE.hve --json --output ./output.json
| イベントタイプ | Event ID |
|---|
| Process Creation (Sysmon) | 1 |
| Network Connections (Sysmon) | 3 |
| Image Loads (Sysmon) | 7 |
| File Creation (Sysmon) | 11 |
| Registry Events (Sysmon) | 13 |
| Powershell Script Blocks | 4104 |
| Process Creation | 4688 |
| Scheduled Task Creation | 4698 |
| Service Creation | 7045 |