Conversation
|
This came up with the attached file, as it has |
Rearrange the logic in `dump_file`, such that if the initial magic for the file is not `MZ` it returns early
As per: https://reverseengineering.stackexchange.com/questions/12993/how-to-quickly-distinguish-pe-dll-dos-mz-files-based-on-magic-numbers#answer-14031 check whether the value for `e_lfanew` is within the file, as old MZ files may use that location for something else, creating an invalid offset
84d5f8f to
9b7c408
Compare
|
According to an old Developer Note from Microsoft (see https://jeffpar.github.io/kbarchive/kb/065/Q65122/ and elsewhere), the
However, I realize not all new-style executables follow this — e.g. some UEFI modules blank out all the Perhaps a useful preliminary check, might be to see if Thank you! |
As per:
https://reverseengineering.stackexchange.com/questions/12993/how-to-quickly-distinguish-pe-dll-dos-mz-files-based-on-magic-numbers#answer-14031
check whether the value for
e_lfanewis within the file, as oldMZ files may use that location for something else, creating an
invalid offset