hasherezade / pe-sieve

Scans a given process. Recognizes and dumps a variety of potentially malicious implants (replaced/injected PEs, shellcodes, hooks, in-memory patches).
https://hshrzd.wordpress.com/pe-sieve/
BSD 2-Clause "Simplified" License
3.03k stars 423 forks source link

Duplicated reporting: code section of the implanted PE file is additionally reported as shellcode #12

Closed hasherezade closed 6 years ago

hasherezade commented 6 years ago

Two types of implants are currently detected: PE files and shellcodes (if the scan was deployed in the shellcode detection mode - option: /shellc). Shellcode should be reported only when there is a detached memory area containing code. However, currently, the code section within a manually loaded PE file is reported twice: as a part of the implanted PE file, and second time as a standalone shellcode. duplicate This bug occurs when the sections of the manually loaded PE file are not in a single allocation area, and are processed as different units. Test case: