I'm running ubuntu 20.04, and I'm tryying to run a python pwn script that has the following line:
libc = ELF("./libc.so.6")
Which fails with:
No such file or directory: './libc.so.6'
So I check my libc version (for the file i'm trying to target):
$ ldd r2c
linux-vdso.so.1 (0x00007ffdd95e1000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2505727000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2505938000)
and I try to update the python script accordingly
libc = ELF("./lib/x86_64-linux-gnu/libc.so.6 ")
But this fails in the same manner. I then check this file:
$ file /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libc.so.6: symbolic link to libc-2.31.so
Which apparently is just a symlink to some other libc version? how does that make sense?
Can I do something to fix this?