microsoft / microsoft/SysmonForLinux

ProcessGUIDs are not necessarily unique, especially for non-PIEs

Aperta
#84 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

investigate
Lingua principale
C
Stelle
2.2k
Fork
220
Merge medio
11g 22h
PR unite (30g)
2

Descrizione

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).

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Iniziate in ebpfKern/sysmonProcCreate.c intorno alle righe 144-147 e tracciate il modo in cui l’ID della macchina, l’ora di avvio del processo e l’indirizzo del segmento di testo formano la ProcessGUID. Riproducete la collisione avviando eseguibili non-PIE entro un secondo, quindi determinate e documentate una rappresentazione di ProcessKey che eviti ProcessGUID duplicate per eventi ProcessCreate distinti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
c
Ambito
operating-systems, security
Tipo di issue
Bug
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.