0x01 环境搭建
采用了看雪的环境
root@generic_arm64:/data # gdbserver --versionGNU gdbserver (GDB) 7.6Copyright (C) 2013 Free Software Foundation, Inc.gdbserver is free software, covered by the GNU General Public License.This gdbserver was configured as "arm-eabi-linux"
android-ndk-r10b 对应的 gdb为 7.6
lushan@vm16:~/Tools/android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin$ ./arm-linux-androideabi-gdb --version
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-linux-android".
For bug reporting instructions, please see:
<http://source.android.com/source/report-bugs.html>.
exp编译
lushan@vm16:~/CVE-2015-3636$ ls
intro.md jni/
lushan@vm16:~/CVE-2015-3636$ ~/Tools/android-ndk-r21/ndk-build
6 warnings generated.
[arm64-v8a] Executable : exp
[arm64-v8a] Install : exp => libs/arm64-v8a/exp
lushan@vm16:~/CVE-2015-3636$ ls
intro.md jni libs obj
lushan@vm16:~/CVE-2015-3636$ tree
.
├── intro.md
├── jni
│ ├── Android.mk
│ ├── Application.mk
│ └── exp.c
├── libs
│ └── arm64-v8a
│ └── exp
└── obj
└── local
└── arm64-v8a
├── exp
└── objs
└── exp
├── exp.o
└── exp.o.d
