Skip to content

Accurately get OverlayAddress for UPX-compressed executables#67

Open
HeroponRikiBestest wants to merge 2 commits intoSabreTools:mainfrom
HeroponRikiBestest:upx-overlay-address
Open

Accurately get OverlayAddress for UPX-compressed executables#67
HeroponRikiBestest wants to merge 2 commits intoSabreTools:mainfrom
HeroponRikiBestest:upx-overlay-address

Conversation

@HeroponRikiBestest
Copy link
Contributor

For UPX-packed executables, OptionalHeader.SizeOfHeaders is consistently 4096 and wrong, wheras PointerToRawData is consistently 1024 and correct. This PR gets the proper size for UPX-compressed executables, since it's needed for most SFX executables.

… for benefit of extractions that need an accurate overlay address.
@mnadareski
Copy link
Contributor

As an update here since it may seem to casual observers that this was just abandoned:

We ended up having a much longer conversation in Discord with both of us having hesitancy with changes in either direction. Some testing was done on how consistent a flat replacement of the logic would be (i.e. always use the section data as truth). Initial tests were optimistic that it is generally more reliable than the size of headers.

More testing and thought needs to be done because this will impact the vast majority of scanned files.

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