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

Error in signatures detection #18

Closed
hasherezade opened this issue Feb 19, 2023 · 2 comments
Closed

Error in signatures detection #18

hasherezade opened this issue Feb 19, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@hasherezade
Copy link
Owner

Example (from unpacking by Athracene):

Both files have been packed with UPX.

comparison

Signature that should match:

UPX_old
48
60 BE 00 ?? ?? ?? 8D BE 00 ?? ?? FF 57 83 CD FF
EB 10 90 90 90 90 90 90 8A 06 46 88 07 47 01 DB
75 07 8B 1E 83 EE FC 11 DB 72 ED B8 01 00 00 00

If this is the only signature loaded, both are detected properly. But in case if there are other signatures, only one is detected.

The reason is, there is another signature that overshadows the matching one.

overshadowed

Once the character that is not a wildcard is matched (here at position 3: 60 BE 00 _A0_), the signature with the wildcard is completely dropped.
This is an invalid behavior, and the signature with the wildcards should be still kept for the comparisons.

@hasherezade hasherezade added the bug Something isn't working label Feb 19, 2023
@hasherezade hasherezade self-assigned this Feb 19, 2023
hasherezade added a commit that referenced this issue Feb 19, 2023
@hasherezade
Copy link
Owner Author

After the fixes, both files are detected:

detected1

@hasherezade
Copy link
Owner Author

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

1 participant