microsoft / microsoft/SysmonForLinux

ProcessGUIDs are not necessarily unique, especially for non-PIEs

オープン
#84 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

investigate
主要言語
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:

  1. 32 bits for machine ID
  2. 32 bits for process start in Unix time in seconds
  3. 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).

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。