microsoft / microsoft/SysmonForLinux
ProcessGUIDs are not necessarily unique, especially for non-PIEs
まだ誰も着手していません。
- 主要言語
- C
- スター
- 2.2k
- フォーク
- 220
- 平均マージ
- 11日 22時間
- マージ済み PR(30日)
- 2
説明
One can reliably create ProcessGUID collisions from different ProcessCreate events by launching non-Position Independent Executables (PIE) within a second. This has been an issue for me, trying to correlate events.
It looks like ProcessGUIDs are created by combining a few pieces of information:
- 32 bits for machine ID
- 32 bits for process start in Unix time in seconds
- 64 bits for the memory address of the end of the text segment, for a process. https://github.com/Sysinternals/SysmonForLinux/blob/main/ebpfKern/sysmonProcCreate.c#L144-L147
Although most executables on Linux distributions are compiled as PIE, it's not a guaranteed and it's not obvious that Sysmon GUID generation could produce duplicates in this scenario.
Perhaps instead of just using something like the text segment location, other data could be packed into the ProcessKey as well. There's 64 bits to work with and these addresses for PIEs will only have ~28 bits of randomness (measured on default Ubuntu systems with paxtest).
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ebpfKern/sysmonProcCreate.c の144-147行付近から始め、マシンID、プロセス開始時刻、テキストセグメントアドレスがどのように ProcessGUID を構成しているかを追跡してください。1秒以内に non-PIE 実行ファイルを起動して衝突を再現し、その後、異なる ProcessCreate イベントに対する ProcessGUID の重複を避ける ProcessKey 表現を決定して文書化してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c
- 領域
- operating-systems, security
- issue の種類
- バグ
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100