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

Several fixes related to the entrypoint value for the macho module #1995

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

vthib
Copy link
Contributor

@vthib vthib commented Oct 29, 2023

Those fixes are mostly related to the macho module with the PROCESS_MEMORY flag, but not only:

  • Add base_address to entrypoint if using PROCESS_MEMORY
  • Fix the computation of the entrypoint from a load command when using PROCESS_MEMORY
  • Do not set invalid entrypoint value if the unixthread command is too short

Would be great to get those fixes in 4.4

vthib added 3 commits October 29, 2023 18:54
When using the PROCESS_MEMORY flag and the macho module, the LC_MAIN
load command was badly handled, the computation of the end of a segment
was invalid.
As is done for other file analysis modules, the base address of the
scanned region must be added to the entrypoint when scanning with the
PROCESS_MEMORY flag set.
If the unixthread command is too small, the entrypoint value is not
retrieved. The function still continues executing however, and
considers 0 to be the entrypoint value. This is invalid, and the
entrypoint should stay undefined in those cases.
@plusvic plusvic merged commit c1e911f into VirusTotal:master Nov 15, 2023
9 checks passed
@vthib vthib deleted the macho-fixes-entrypoint branch November 16, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants