microsoft / microsoft/SysmonForLinux
ProcessGUIDs are not necessarily unique, especially for non-PIEs
Nessuno ha ancora preso questa issue.
- 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:
- 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).
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- 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