Mobile PT lab setup commands

installing genymotion on kali:

step1:
Goto https://www.genymotion.com/download/
Download current version of genymotion.
run genymotion from your downloaded place
cmd: ./genymotion-3.1.0-linux_x64.bin
go to cd /opt/genymobile/genymotion/
to run genymotion:
./genymotion


burp configuration on genymotion:

https://linuxsuperuser.com/configure-burp-suite-proxy-genymotion/



https://linuxsuperuser.com/configure-burp-suite-proxy-genymotion/


Download genymotion install
download terminal emulator -> www.apkmirror.com to get terminal access

ADB device:
genymotion setting ->sdk device -> use custom andriod sdk tools -> path -> your sdk path ->close


Install apktool
---------------

$ sudo apt-get install apktool

Install dex2jar
---------------

$ sudo apt-get install dex2jar

$ d2j-jar2dex -h

install qark:
--------------

Download QARK from github

$ git clone https://github.com/linkedin/qark

$ cd qark

$ pip3 install -r requirements.txt

$ python3 setup.py install

To test APK :

$ sudo qark --apk path/to/my.apk




MobSF Installation:
===================

Static Analysis Mobsf:
----------------------

The Installation procedures of MobSF are as follows:

$ git clone https://github.com/MobSF/Mobile-Security-Framework-MobSF.git

$ cd Mobile-Security-Framework-MobSF
$ ./setup.sh
$ sudo apt-get install wkhtmltopdf
Running MobSF
=============

/Mobile-Security-Framework-MobSF$ ./run.sh

Installation of sqlitebrowser
==============================
sudo apt-get install sqlitebrowser

Running MobSF
=============

/Mobile-Security-Framework-MobSF$ ./run.sh


Decombile the apk file:
========================

$ apktool d name-of-the-app .apk


connect to the device:
======================

adb root
restarting adbd as root
megala@kali:~$ adb shell

Installing drozer:
==================

goto https://github.com/FSecureLABS/drozer/releases

Download drozer-2.4.4-py2-none-any.whl

open terminal -> $ sudo pip install drozer-2.4.4-py2-none-any.whl


terminal cmd:

$ adb forward tcp:31415 tcp:31415
$ drozer console connect

dz> run app.package.attacksurface io.messenger
Attack Surface:
  5 activities exported
  1 broadcast receivers exported
  0 content providers exported
  3 services exported
dz> run app.activity.info -a io.messenger
Package: io.messenger
  io.messenger.activities.MainActivity
    Permission: null
  io.messenger.activities.ObvLinkActivity
    Permission: null
  io.messenger.activities.ShareActivity
    Permission: null
  io.messenger.activities.ShortcutActivity
    Permission: null
  androidx.biometric.DeviceCredentialHandlerActivity
    Permission: null


dz>run app.broadcast.send --action androidx.biometric.DeviceCredentialHandlerActivity --extra <alert> <alert> putparcelable


check for which application using which port:
cmd:sudo netstat -nlp


Comments

Popular posts from this blog

System Malware Analysis

Malware Sample Analysis (29F228F3375C489A8A6E31203AB25787)

Static Analysis