0 关于RetroScope工具(Paper + DEMO)
(1)DSCRETE: Automatic Rendering of Forensic Information from Memory Images via Application Logic Reuse
https://www.usenix.org/system/files/conference/usenixsecurity14/sec14-paper-saltaformaggio.pdf
(2)Screen After Previous Screens: Spatial-Temporal Recreation of Android App Displays from Memory Images
https://www.usenix.org/system/files/conference/usenixsecurity16/sec16_paper_saltaformaggio.pdf
(3)RetroScope官方DEMO
https://www.youtube.com/watch?v=bsKTmZEgxiE&feature=youtu.be
1 下载RetroScope
RetroScope的下载地址位于Paper(2)的注释中:
RetroScope is available online, along with a demo video, at: https://github.com/ProjectRetroScope/RetroScope.
使用Git命令下载RetroScope工具,约4G,耗时较长,配置终端SS代理,加速下载过程,配置教程如下:
http://blog.csdn.net/jesse_mx/article/details/52863204
2 编译RetroScope
进入RetroScope目录,根据README.md中的内容对RetroScope进行编译:
(1)编译环境配置:
https://source.android.com/source/initializing.html
(2)编译命令:
$ source build/envsetup.sh
$ lunch aosp_arm-eng
$ make -j4 RetroScope
$ lunch aosp_arm-eng
$ make -j4
编译过程中可能会出现各类错误,baidu、google均可解决:
错误:
Java版本要求——jdk1.6.0_45解决:
下载对应版本的java,并重新配置环境变量:
#set java environment export JAVA_HOME=/opt/jdk1.6.0_45/ export JRE_HOME=/opt/jdk1.6.0_45/jre/ export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH/ export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH/
编译完成之后整个目标文件夹约36G,请务必提前预留磁盘空间!
P.S. 磁盘空间不足,使用Linux分区调整工具GParted-LiveCD制作U盘启动进行分区调整
3 启动RetroScope
编译完成之后发现,整个RetroScope文件夹的目录结构与android源代码的目录结构完全相同,即RetroScope工具并不仅仅是一个运行在手机上的APK,而是一整个经过修改后的安卓系统,使用emulator运行该安卓系统以实现RetroScope的内存取证功能。
(1)重新执行命令进行配置:
$ source build/envsetup.sh
$ lunch aosp_arm-eng
(2)根据README.md中所述使用RetroScope文件夹中的emulator-MAGIC模拟器运行RetroScope工具:
4) Use the emulator-MAGIC binary. This will require overwriting the prebuilt emulator-arm or emulator64-arm binary with emulator-MAGIC.
Do not use the prebuilt emulator binaries. They fail to boot. I do not know why, if you figure out then please email me!
在RetroScope目录中直接运行emulator-MAGIC模拟器。
错误:
emulator: ERROR: Could not load OpenGLES emulation library [lib64OpenglRender]: lib64OpenglRender.so: cannot open shared object file: No such file or directory解决:
添加环境变量:
export LD_LIBRARY_PATH=/home/richard/RetroScope/out/host/linux-x86/lib
运行emulator-MAGIC模拟器:
4 总结
国内外网站上关于RetroScope工具完全没有任何相关资料,RetroScope官方DEMO和README文件的内容也十分有限,省略了具体使用RetroScope的关键步骤,故暂时还无法使用RetroScope工具以实现其内存取证的功能。
接下来的工作:
- 阅读RetroScope工具源代码(dalvik/vm/zombie),以掌握其具体使用方法;
- 编译pmd工具(tools/pmd),生成可执行elf文件,以获取目标安卓手机中指定进程的map文件和mem文件。