AppNinja开发手记8: Android内核溢出教程-环境搭建

AppNinja开发手记8: Android内核溢出教程-环境搭建

学习心得:什么是Android内核溢出

学习方向:VR、元宇宙、Android内核溢出、Android Kernel Exploit

http://blog.csdn.net/a2831942318

Written by AppNinja 开发手记

1、系统环境

操作系统:Windows11

虚拟机VirtualBox6.1:Downloads – Oracle VM VirtualBox

Ubuntu18.04.6: https://releases.ubuntu.com/18.04/ubuntu-18.04.6-desktop-amd64.iso

VirtualBox主机与虚拟机不能复制粘贴的解决办法,要开启两项:

第1项:安装增强功能

第2项:选中使用主机输(I/O)缓存

2、GDB8.2 带python功能

a@sys:~$ gdb
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) python
>import os
>import sys
>print(sys.version_info)
>end
sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0)
(gdb) 

如果gdb本身没有带python,需要自己安装,过程中注意事项如下:

安装Python2.7出现如下错误:

The following packages have unmet dependencies:
 python2.7 : Depends: python2.7-minimal (= 2.7.15~rc1-1) but it is not going to be installed
             Depends: libpython2.7-stdlib (= 2.7.15~rc1-1) but 2.7.17-1~18.04ubuntu1.6 is to be installed
E: Unable to correct problems, you have held broken packages.

则执行下面的安装命令:

sudo apt-get install aptitude

sudo aptitude install python2.7

其他辅助命令:查看进程的绝对路径

ll /proc/pid

sudo aptitude install gcc    输入 n y y 

sudo apt-get install g++

sudo apt-get install python2.7-dev

sudo apt-get install texinfo

wget http://ftp.gnu.org/gnu/gdb/gdb-8.2.tar.gz

tar zxf gdb-8.2.tar.gz

sudo aptitude install make

gdb-8.2$ ./configure --with-python='/usr/bin/python2.7'

3、安装Android Studio

安装sdk ndk avd

设置$PATH

a@sys:~$ cat ~/.bashrc

export PATH=~/Android/Sdk/platform-tools:~/Android/Sdk/emulator:$PATH

开启虚拟机CPU VT虚拟化,并赋予kvm权限:

sudo chown a -R /dev/kvm

4、下载安卓内核源代码

repo init --depth=1 -u https://android.googlesource.com/kernel/manifest -b q-goldfish-android-goldfish-4.14-dev

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AppNinja

你的鼓励是我创作最大的动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值