WCU / Cybersecurity
~/CSC 472/Class 08/KP 07
Class 08 · KP 07 / 20

Where Do the Offsets Come From?

  • You need the same libc the target runs. Offsets differ between versions and even builds.
  • From a local copy of the libc file, read symbol offsets with the pwntools ELF class, or with readelf / nm.
  • If you only have a leaked value and do not know the libc, use a libc-database (e.g. libc.rip / the local libc-database tool): the low 12 bits of a symbol address are not randomized, so a couple of leaks identify the exact build.

Fixed vs. randomized

ASLR shifts everything by a page-aligned base, so the low 12 bits of any

address are constant. That is why partial leaks are enough to fingerprint

a libc.