Skip to content

Instantly share code, notes, and snippets.

@ajgappmark
Forked from kmcallister/dump-vdso.py
Created June 11, 2020 21:45
Show Gist options
  • Save ajgappmark/d79bd26484ab59b8047d80f1925e389b to your computer and use it in GitHub Desktop.
Save ajgappmark/d79bd26484ab59b8047d80f1925e389b to your computer and use it in GitHub Desktop.
dump vdso
#!/usr/bin/env python
from ctypes import *
for ln in open('/proc/self/maps'):
if "[vdso]" in ln:
start, end = [int(x,16) for x in ln.split()[0].split('-')]
CDLL("libc.so.6").write(1, c_void_p(start), end-start)
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment