-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot view imports/exports of nt 3.1 executables/dlls #45
Comments
Hi @0Alastair1 ! Thanks for reporting. |
Sure thing! 'link removed' |
I managed to build some executables with the same behavior. Feel free to use for whatever purpose. |
@0Alastair1 - Thanks for sharing! Now I see where the problem lies. For some reason it doesn't use Virtual Size - all the Virtual Sizes in the sections are set to 0. That's why PE-bear assumes that those sections aren't mapped (that would be the case in any normal PE). And when sections are not mapped, data directories are not resolved. I can solve it by checking the OS version in the Optional Header, and parsing this type differently (using their Raw Size as Virtual Size). |
This fixes reading the nt 3.1 executables thanks! |
After some experimenting it does seem that Windows sets Virtual size to Raw size if Virtual size is 0, regardless of OS version. If you take any exectuable where the Virtual Size equals the Raw Size, and set the Virtual Size to 0 (for that particular section), the exectuable loads fine. |
@0Alastair1 - thanks for checking it, you are right! It will be fixed soon. |
please check the test builds and let me know if everything is fine now: |
works great, thanks! |
Opening nt 3.1 pe32 files results in the following warning,
![image](https://private-user-images.githubusercontent.com/96997148/305664657-e7d02a6d-a2a8-4f78-bdb3-73a34149c3a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODkwOTksIm5iZiI6MTczOTA4ODc5OSwicGF0aCI6Ii85Njk5NzE0OC8zMDU2NjQ2NTctZTdkMDJhNmQtYTJhOC00Zjc4LWJkYjMtNzNhMzQxNDljM2E0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA4MTMxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFhMzMyM2M1YTNiZGI3ZGMyMzk0NTQzZTQ2YTVhYjk0OTlkZTJlNmM3OGYxNzUzMTQ1ZWMwNmUxNjgxM2IzOWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.x731F00J-SXakgwGDbcrfEDWE-bB7YPC7NeoAgHZmSA)
![image](https://private-user-images.githubusercontent.com/96997148/305664776-a1f518b0-ac11-4342-b9a4-f38ee558810b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODkwOTksIm5iZiI6MTczOTA4ODc5OSwicGF0aCI6Ii85Njk5NzE0OC8zMDU2NjQ3NzYtYTFmNTE4YjAtYWMxMS00MzQyLWI5YTQtZjM4ZWU1NTg4MTBiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA4MTMxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZiZThlNDQ5YTExNDc4ZjM0ZmUwN2VlZmI2YmM0OWNiMWFjYTVlMmEyMWJjYmU5ZTdhNjU3YjI4N2ExNWQ1YzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Jjq4VBhvhHqFMPWcuzBSmG4ojAoR4XGqg-Qt-2OyZwk)
And the import/export tabs are missing.
This happens with all the nt 3.1 executables and dlls in the SYSTEM32 folder (that I've tested), including NOTEPAD.EXE.
These executables are able to be ran on the latest version of Windows (they are the same executable type) and the imports/exports appear in programs like ida.
PE-bear version: v0.6.7.3
The text was updated successfully, but these errors were encountered: