malx-labs

Results comments of malx-labs

Hi @ryanmkurtz This isn’t a corrupt binary, it’s a malformed, but valid PE according to the spec and the sample was intentionally constructed to model behaviours seen in real loaders,...

Windows won’t execute this as a process image, `CreateProcessA` fails during image validation. However, Windows will map the image successfully using `LoadLibraryEx` with `LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE`. In that mode, the...

Thanks Ryan, that helps. On my side, the import hits an uncaught `IndexOutOfBoundsException` during block creation for that section, with the stack pointing into `MemoryMapDB.checkFileBytesRange`. From reading the surrounding logic,...

Attaching the minimal fixture (`entropy_negative_section_fixture.zip`). It includes the binary, a short README, and the stack trace showing the uncaught `IndexOutOfBoundsException` originating from `MemoryMapDB.checkFileBytesRange`. [entropy_negative_section_fixture.zip](https://github.com/user-attachments/files/28832075/entropy_negative_section_fixture.zip)

The original `SizeOfRawData` for `.text` was `0x200` before I overwrote it with `0xFFFFFFFF` in the fixture.

Thanks, yes that makes sense. Since a negative `SizeOfRawData` has no meaningful interpretation in the PE spec, the safest behaviour might be actually to treat it as zero bytes of...

This fix looks great, thank you for turning it around so quickly. This will make Ghidra much more robust when dealing with adversarial or malformed PEs.

Thanks Ryan that's really helpful context and it makes sense that the mismatch case never came up before. I am happy to help however is useful; I can open a...

Great, sounds good on both counts. On the PR, I'm happy to hold it until your alignment rework lands if that's easier, so I'm not adding delay-load changes to PeLoader...