Skip to content

why substract 0xe7 from leaked libc_start_main address in everybodys_got_something_to_hide? #1

@ackbar03

Description

@ackbar03

Hi,

This is prob a noob question but for the hard address leak in everybodys_got_something_to_hide, why do we need to subtract a offset from the leaked lib_c_main address?

https://github.com/shellphish/ictf-2020-challs-public/blob/1e0b7c1fde9b5c8ff2d3e1ca428c4396d63e046e/everybodys_got_something_to_hide/scripts/exploit#L106

libc_base = libc_start_main - libc.symbols['__libc_start_main'] - 0xe7

I understand that the libc_start_main is pushed onto the stack at somepoint during runtime, but why is a offset necessary?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions