Originally posted by **rabbitstack** August 10, 2023
I apologize if this is a bit off-topic. I'm trying to port some of the pe-sieve implant detection techniques to [Fibratus](https://github.com/rabbitstack/fibratus). I'm already using a PE parser package that does all the heavy lifting of dissecting the PE structure from the on-disk image file. As usual, `ReadProcessMemory` is used to fetch the in-memory PE layout from the image base address. However, when it comes to comparing the PE headers, I'm hitting the wall. It turns out, only the few first fields of the DOS header are identical in both on-disk and memory PEs, while the rest of the headers differ. I know I'm missing something obvious. Could you please elaborate on how exactly pe-sieve "normalizes" the PE buffers to make possible headers comparison?
Thanks
Discussed in https://github.com/hasherezade/pe-sieve/discussions/118