-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add parsing of .NET user types from .NET metadata stream #1605
Conversation
Thanks for the feedback! Sorry for the delay, I was finishing the last few exams past week. |
a5a3f9e
to
52c145f
Compare
I've noticed the test failing on misaligned load and changed the reading functions to work byte-by-byte. |
I sent a PR to your branch with a proposal for fixing the same issues: HoundThe#1 I prefer using the |
* Fix unaligned memory access. * Add missing comma in Bazel file.
Oh thanks, I didn't notice the PR on my fork, didn't get any notifications about it. I've undone my commit and merged your PR, didn't know about |
This PR introduces parsing of the user-defined types from the .NET metadata tilde stream. It extracts class names, base types, modifiers, methods with their return types. arguments, etc. (more in the docs). I've been testing the modification with IL/DnSpy and RetDec.
For better code readability and maintainability, as it includes many string concatenations, I've created a simple string-like type in the libyara, that allows me to work with variable strings.
I've also noticed that Bazel tests do not include
test-dotnet.c
. I wasn't sure why, so I've included it.I've also included some binary with .NET user type metadata to have something to write tests with, I am not sure what the policy is with including another binary to the testing sample.