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

Improve the detection of CExe packer by modifying the YARA rule. #781

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

tamaroth
Copy link
Contributor

@tamaroth tamaroth commented Jun 4, 2020

The new YARA rule is more inclusive and correct one bug by changing the
variable byte in the call byte.

The change is twofold, the call

FF 15 58 10 40 00                             call    ds:GetModuleFileNameA

had its most significant byte set to a wildcard, while in reality, it should have been the least significant byte instead.

<<< FF 15 58 10 40 ??
>>> FF 15 ?? 10 40 00

Finally, there is a version that has the final jump of the detecting code jump slightly closer.

74 16
74 14

Since it's the last byte, it's worth simply removing it.

The change is minute, not affecting current detections, therefore I have not added any tests.

If you think tests should be added, please let me know.

The new YARA rule is more inclusive and correct one bug by changing the
variable byte in the call byte.
@s3rvac
Copy link
Member

s3rvac commented Jun 4, 2020

Let's run TC tests.

Copy link
Member

@s3rvac s3rvac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the improvements 👍

@s3rvac s3rvac merged commit 3d0171e into master Jun 5, 2020
@s3rvac s3rvac deleted the improvement-fileinfo-cexe-detection branch June 5, 2020 05:36
s3rvac added a commit that referenced this pull request Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants