Coder Social home page Coder Social logo

bughunterid / command-mobile-penetration-testing-cheatsheet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mirfansulaiman/command-mobile-penetration-testing-cheatsheet

0.0 2.0 0.0 1 KB

Mobile penetration testing android command cheatsheet

command-mobile-penetration-testing-cheatsheet's Introduction

Command Mobile Penetration Testing Cheatsheet

For this time is about Android :) IOS soon :)

ADB Cheatsheet

Download adb http://adbdriver.com/downloads/ or you can using adb as default from Android Studio.

ADB Command

#Check Android Architecture
adb shell getprop | grep abi

#List all application already installed
adb shell pm list packages -f | grep -i 'namafile'

#Tracing log on android
adb logcat | grep nama_package

#Install application to device
adb install namaFile.apk

Frida Cheatsheet

Install Frida Server on android,
download frida server : https://github.com/frida/frida/releases

$ adb root # might be required
$ adb push frida-server /data/local/tmp/
$ adb shell "chmod 755 /data/local/tmp/frida-server"
$ adb shell "/data/local/tmp/frida-server &"

Frida Command

# Connect Frida to an iPad over USB and list running processes
frida-ps -U

# List running applications
frida-ps -Ua

# List installed applications
frida-ps -Uai

# Connect Frida to the specific device
frida-ps -D 0216027d1d6d3a03

# Trace recv* and send* APIs in Safari
frida-trace -i "recv*" -i "send*" Safari

# Trace ObjC method calls in Safari
frida-trace -m "-[NSView drawRect:]" Safari

# Launch SnapChat on your iPhone and trace crypto API calls
frida-trace -U -f com.toyopagroup.picaboo -I "libcommonCrypto*"

#Frida trace every open function while program start
frida-trace -U -i open src.com.app

Frida Tracing

Download : https://github.com/Piasy/FridaAndroidTracer

usage: java -jar FridaAndroidTracer.jar
-a,--expand-array      expand array values
-c,--classes <arg>     classes to be hooked
-j,--jars <arg>        jar files to be included
-o,--output <arg>      output script path
-p,--include-private   include private methods
-s,--skip <arg>        methods to be skipped

AndBug - For Enumerate Class And Method On Application

Download https://github.com/swdunlop/AndBug
Usage:

#Enumerate classes on application
andbug classes -p [PID application / name of application] > class.txt

#Enumerate methods on classes
andbug methods -p [PID application / name of application] [class name]

Android Log Tracing

Using PIDCAT : https://github.com/JakeWharton/pidcat
Usage:

./pidcat id.co.aplication

Decompile APK File

APKX for decompile apk

Download https://github.com/b-mueller/apkx
Usage :

apkx -c enjarify -d procyon namafile.apk

Bytecode Viewer

Download https://github.com/Konloch/bytecode-viewer/releases
To read source code of dex or jar file.

Install Burp Certificate On Android

Convert burp certificate from DER to PEM . If you lazy, you can download PEM file on this repository.

openssl x509 -inform DER -in cacert.der -out cacert.pem
# Get subject_hash_old (or subject_hash if OpenSSL < 1.0)
openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1
mv cacert.pem 9a5ba575.0

Install PEM file to the System Trusted Credentials on device.

adb root
adb remount  
adb push 9a5ba575.0 /system/etc/security/cacerts/  
adb shell "chmod 644 /system/etc/security/cacerts/9a5ba575.0"
adb shell "reboot" 

If your /system cant mounting, You must mounting first.

adb root
adb shell
# Check mounting list
cat /proc/mounts
#/dev/block/bootdevice/by-name/system /system ext4 ro,seclabel,relatime,discard,data=ordered 0 0
mount -o rw,remount -t rfs /dev/block/bootdevice/by-name/system /system
adb push 9a5ba575.0 /system/etc/security/cacerts/  
adb shell "chmod 644 /system/etc/security/cacerts/9a5ba575.0"
adb shell "reboot" 

Install Open Gapps On Android Emulator

Download : https://opengapps.org
Extract :

unzip open_gapps-x86_64******.zip 'Core/*'
rm Core/setup*
lzip -d Core/*.lz
for f in $(ls Core/*.tar); do
  tar -x --strip-components 2 -f $f
done

Install to Emulator :

adb root
adb remount
adb push etc /system
adb push framework /system
adb push app /system
adb push priv-app /system
adb shell stop
adb shell start

Emulator

Android Studio Emulator

This command for run emulator from android studio, make you have already install android studio before.
if you want to root android emulator, please using system without (Google API's) or (Google Play)

# List all emulator
emulator.exe -list-avds 
# Run Emulator
emulator.exe -avd [EmulatorName]

Genymotion

Download https://www.genymotion.com/

Contribution

if you have know about more command or a new trick to do something with Mobile Pentest, please let me know :)

command-mobile-penetration-testing-cheatsheet's People

Contributors

mirfansulaiman avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.