Setup instructions for mobile application assessment frameworks Passionfruit, Objection and Drozer.
Setting up passionfruit
Update from official repo: Passionfruit is now avaliable on npm, so just type following command to install:
npm install -g passionfruit
Old instructions:
-
Install pre-requisite nodejs for respective os from https://nodejs.org/en/
-
Clone Passionfruit to desktop or desired path.
git clone https://github.com/chaitin/passionfruit.git
or download zip file through browser and extract.
-
Open the terminal and cd into the passionfruit directory.
-
To install npm dependencies and build the frontend, run the following command.
npm install
-
To build the bundle run below command
npm run build
-
Start server using below command
npm start
-
Open http://localhost:31337 in browser to access the passionfruit web ui.
-
Connect your iDevice (which has frida-server running in background) to your pc or mac via USB.
Once setup, next time when you have to start passionfruit, navigate to passionfruit directory and just run npm start
.
Note:
Require frida-server running on the jailbroken device
-
ssh to device and navigate to frida-server binary location and run
./frida-server &
or if you have it added to PATH, run the following
frida-server &
Setting up Objection
Install pre-requisite frida and frida-tools on host machine (OSX/Linux) with:
pip install frida-tools # CLI tools
pip install frida # Python bindings
Its better to install objection in a virtual environment.
-
Clone Objection Github Repo
-
Install virtualenv
pip install virtualenv
or if already have it, update it
pip install virtualenv --upgrade
* -
Create a new python3 virtual environment for objection with following command.
virtualenv --python=python3 ~/objection-python3-env
-
Activate your new python virtual environment with:
source ~/objection-python3-env/bin/activate
-
Next, start the installation using pip3 with:
pip3 install -U objection
Once the dependencies are installed, the objection command should be available in your PATH.
To start analysing an app with objection, follow below steps.
-
activate objection virtualenv by running:
source ~/objection-python3-env/bin/activate
-
To find application process name, with app running mobile device, and connected to the host machine via USB, run the following
frida-ps -U
- This command lists all running processes on the device, you can manually look for the app name or do the below.frida-ps -U | grep app_name_substring
-
Having obtained app name hook it with objection.
objection --gadget "app-name" explore
-
Now objection console will be opened.
Useful objection commands and wiki - https://github.com/sensepost/objection/wiki/Using-objection
Setting up drozer for android assessments.
AndroidTamer4 comes with drozer preconfigured. VM can be downloaded from here. or if you want to configure drozer on your linux machine follow the below steps.
-
Building Python wheel
git clone https://github.com/mwrlabs/drozer.git
cd drozer
python setup.py bdist_wheel
-
Installing Python wheel
sudo pip install drozer-2.x.x-py2-none-any.whl
Note: The file name drozer-2.x.x-py2-none-any.whl might be different, the x.x number might be different. The file will be in bdist directory.
- Once installation finishes, drozer command will be available.
Install drozer-agent apk in android device.
Download latest agent apk from here and install on the android device with the below command.
adb install drozer-agent-2.x.x.apk
Now you have everything to analyze apps with drozer.
Analyzing apps with drozer.
- Open drozer agent app on android device and click to start server. (default port 31415, can be changed)
- Connect android device with USB debugging enabled on to host machine via usb.
- setup port forward with adb.
adb forward tcp:31415 tcp:31415
- Connect to drozer console.
drozer console connect
- Now you are in drozer CLI.