-
Notifications
You must be signed in to change notification settings - Fork 62
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
[BinHandler] Error in section reading #22
Comments
Thanks for reporting the bug! I currently cannot reproduce the bug. I tried with some windows files such as |
Hi, find attached a base64 encoded version (as you can image it is a malware): In order to trigger the bug, run the following code:
|
Hmm.. this is really weird. I cannot reproduce it. So I downloaded the
The SHA-1 hash of the PE file, before/after decoding is as follows:
And then I copy pasted your code (without base64 decoding) on a local project, and ran the following:
No problem as you can see. To be clear, I didn't create an FSX script, but just used a dotnet project. To help debug this issue, I just created a branch called May I ask you to checkout the |
Hi, sure, I'll do as you said and check if I can reproduce the problem in my environment. |
Hi @sangkilc, I did a test as you said and I didn't received any errors. After digging a bit I discovered that the problem was due to the fact that my project is not .NET Core and my Start Up point project didn't referenced B2R2.Core. This cause some really weird behavior (I wasn't able to step into the Core routine due to a missing debug symbol file, ...). In my case, the solution was to directly reference the B2R2.Core library, and not only the used libraries. So in the end, this is definitely not a B2R2 bug but maybe it can be useful as reference for others that have a mixed solution. |
Thanks for your report. May I ask what kind .NET project it was? Was it .NET framework 4.8? I really would be interested to reproduce this bug because I think "not referencing B2R2.Core" should not create this problem. A minimal example project would definitely help. |
Hi @enkomio , I have created a minimal project for .NET framework 4.7.2 @ https://github.com/sangkilc/testdotnet, but I still cannot reproduce the issue that you reported. Could you test with the project if you can reproduce it? The project uses the B2R2 nuget package, and I presume you are using a different approach? If you can create a minimal project that looks like the one that I showed, and if the project triggers the same bug that you described, it will be extremely helpful for me to understand the problem. Please let me know, and thank you very much for your help! |
I'll try to create a Visual Studio project that trigger the problem |
Thank you! Let me reopen this issue for now. |
Hi, I tried to create a basic solution that trigger the problem but after many tries I wasn't able to reproduce it. When I encountered the error I referenced the B2R2 framework as sub-module in my solution. I tried also in this way, by creating a simple project that doesn't reference B2R2.Core (since this was the problem at the time). The solution doesn't compile (of course) since it is unable to create a BinHandler. So in the end, I think it was a very border situation due to some problem with Visual Studio. Definitely not a bug in B2R2 (it is a False Report). Sorry for the wrong report. |
No problem at all. Thank you for letting me know! Let me close this issue. |
Describe the bug
I have a PE with the following sections:
If I try to read the content of the data section I receive the following error:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The full content of the section is read.
Environment (please complete the following information):
Additional context
This problem seems to be caused by a check on invalid range. It wasn't present in previous version.
The text was updated successfully, but these errors were encountered: