Skip to content
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

HashEx UTF16-LE Module Hashing Bug #515

Open
1 task done
cr7pt0pl4gu3 opened this issue Sep 18, 2024 · 1 comment
Open
1 task done

HashEx UTF16-LE Module Hashing Bug #515

cr7pt0pl4gu3 opened this issue Sep 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cr7pt0pl4gu3
Copy link

What happened?

You have a bug in the HashEx function implementation. If target string is a module (UTF16-LE), such as "NTDLL.DLL", you only hash the first letter and subsequent null bytes of length(module_name).

As you process the UTF16-LE string byte by byte, there is a null byte after each letter, which means that !*Ptr is true on each null byte, effectivelly doing ++Ptr two times, which skips each letter.

image
image
image

Ultimately this results in the incorrect hashing, but the issue is insignificant and mainly applicable for people who want to change the default hashing key.

Did You Try With the Dev Branch?

Yes (You tried using the dev branch but the problem persists)

Relevant log output

No response

Did You Read Over Your Issue First?

  • I declare I made an effort and provided the necessary information for replication of the issue.
@cr7pt0pl4gu3 cr7pt0pl4gu3 added the bug Something isn't working label Sep 18, 2024
@Cracked5pider
Copy link
Member

oh wow. this is such an interesting bug I cant believe I missed this. Thanks a lot for pointing this out :D
I am going to try to fix this in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants