libc 适应性调试
hacker@ubuntu:~/Desktop$ ./libc-2.23.so
GNU C Library (Ubuntu GLIBC 2.23-0ubuntu11) stable release version 2.23, by Roland McGrath et al.
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 5.4.0 20160609.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.
root@--name:/ctf/work# cp libs/2.23-0ubuntu11.3_i386/ld-2.23.so /lib
root@--name:/ctf/work# cd /lib
root@--name:/lib# ls
cpp i386-linux-gnu init ld-2.23.so ld-linux.so.2 lsb systemd terminfo udev x86_64-linux-gnu
root@--name:/lib# cd /ctf/work/
root@--name:/ctf/work# patchelf --set-interpreter /lib
lib/ lib32/ lib64/ libc-database/ libx32/
root@--name:/ctf/work# patchelf --set-interpreter /lib
lib/ lib32/ lib64/ libc-database/ libx32/
root@--name:/ctf/work# patchelf --set-interpreter /lib/ld-2.23.so
missing filename
root@--name:/ctf/work# patchelf --set-interpreter /lib/ld-2.23.so ./axb_2019_fmt32
root@--name:/ctf/work# patchelf --replace-needed libc.so.6 libs/2.23-0ubuntu11.3_i386/libc-2.23.so ./axb_2019_fmt32
root@--name:/ctf/work#
root@--name:/ctf/work# ldd axb_2019_fmt32
Inconsistency detected by ld.so: dl-version.c: 205: _dl_check_map_versions: Assertion `needed != NULL' failed!
zer0_1s