默认已安装cuckoo1.2版本VMware14.1.3 如未安装,请参考cuckoo安装流程
环境:
VMware14.1.3
host: Ubuntu16.04
guest: Ubuntu16.04
************************************************host安装配置*********************************************
下载cuckoo-droid:
--进入cuckoo目录
--执行以下命令:
git init
git remote add droid https://github.com/idanr1986/cuckoo-droid
git pull --no-edit -s recursive -X theirs droid master
cat conf-extra/processing.conf >> conf/processing.conf
cat conf-extra/reporting.conf >> conf/reporting.conf
rm -r conf-extra
echo "protobuf" >> requirements.txt
--------------------------------------------------------------------------------------------------------------
配置cuckoo-droid:
1 cuckoo.conf:
machinery = vmware
ip = 192.168.56.1
2 vmware.conf:
machines = uu64
[uu64]
vmx_path = /home/aaa/vmware/uu64/uu64.vmx
snapshot = snap2
platform = android_on_linux
ip = 192.168.56.3
resultserver_ip = 192.168.56.1
resultserver_port = 2042
3 reporthtml.conf:
[reporthtml]
enabled = no
[reportandroidhtml]
enabled = yes
-------------------------------------------------------------------------------------------------------------
网络配置:
参照cuckoo安装说明
***********************************************guest安装配置***********************************************
创建guest:(Ubuntu16.04)
--打开vmware,点击Create a New Virtual Machine,按照提示创建新的虚拟机
--安装Ubuntu16.04系统
----------------------------------------------------------------------------------------------------------------
安装SDK:
--安装依赖项:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jdk
sudo apt install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
--下载sdk包:以下基于android-sdk_r24.4.1-linux.tgz版本
--执行以下命令 解压并打开Android SDK Manager:
tar -xvf android-sdk_r24.4.1-linux.tgz ##解压后重命名为android-sdk
cd android-sdk
tools/android
--下载以下工具:(选中对应工具 点击install packages)
Android SDK Tools
Android Platform-tools Tools
Android SDK Build-tools
4.1.2版本Android SDK Tools(SDK Platform、ARM EABI v7a System Image)
--配置环境变量:
export PATH=$PATH:sdk_path/tools:sdk_path/build-tools/x.x.x.x/:sdk_path/platform-tools
##按照具体路径进行填写,其中x.x.x.x填写具体版本
-----------------------------------------------------------------------------------------------------------------
创建avd:
--android avd ##如果该命令无法找到说明上一步环境配置有问题
--点击Create创建新的avd
--具体配置如下:
AVD Name - aosx
Device - Nexus One
Target - android 4.1.2
Cpu/Abi - arm
Skin - No skin
Back Camera - None
RAM - 512
Vm Heap - 32
Internal Storage - 512 MiB
Sdcard size - 512 MiB
---------------------------------------------------------------------------------------------------------------
准备Android模拟器:
--将host机中 cuckoo/utils/android_emulator_creator 文件夹复制到guest中
--cd android_emulator_creator_path/
--emulator -avd aosx
--打开一个新的终端运行:android_emulator_creator/create_guest_android_on_linux.sh
--按照以下配置设置模拟器:
选择 settings->security->screenlock->none
选择 settings->Display->sleep->30 minutes
运行GenerateContacts
运行Supersuser
运行xposedinstaller
进入Modules, 勾选 Droidmon 和 Android Blue Pill
选择framework -> install -> cancel-> soft reboot
--离开模拟器,保存快照:VM>Snapshot>Take Snapshot (snap1)
---------------------------------------------------------------------------------------------------------------
网络配置:
--编辑虚拟机设置:
Edit>Virtual Network Editor>host-only>Subnet IP:192.168.56.0
VM>Settings>Network Adapter>Bridged (关机时可执行)
--编辑 /etc/network/interfaces 文件,配置如下:
# interfaces(5) file used by ifup(8) and ifdown(8)
#auto lo
#iface lo inet loopback
auto ens33 # 对应的网络接口
iface ens33 inet static
address 192.168.56.3
netmask 255.255.255.0
network 192.168.56.0
broadcast 192.168.56.255
gateway 192.168.56.1
dns-nameserver 8.8.8.8
--编辑系统设置:
AllSettings>Network>找到对应的网卡>Options>IPv4Settings:
Method - Manual
Address - 192.168.56.3 24 192.168.56.1
DNS servers - 8.8.8.8
# 如果都配置完了还ping不通,重新启动一下
------------------------------------------------------------------------------------------------------------------
安装代理:
--将host机中 agent目录下的agent.py文件复制到guest中(同cuckoo)
--python agent.py ##运行代理
-------------------------------------------------------------------------------------------------------------------
设置快照:
--先运行代理和Android模拟器
--VM>Snapshot>Take Snapshot (snap2)