Skip to content

Question About PE Relocation #17

Answered by hasherezade
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

@S3xyG4y - so, the thing is, Image Base in the Optional Header is the base to which currently PE is relocated (when it is in the raw format, on the disk): meaning, every relative address in the PE is added to this default base. This base is never 0, because 0 is not a valid base at which a PE can ever be loaded. It is some valid base, which may or may not be used as an effective base on the load.
PE does not need to be relocated if it happens to be load at the same base that is set in the Optional Header.

On modern Windows, with ASLR enabled, it is proffered to use a randomized Image Base, instead of the hardcoded one (from the header). So, the base from the header won't really be used as…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@ghost
Comment options

@hasherezade
Comment options

@hasherezade
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant