Skip to content

Instantly share code, notes, and snippets.

@sudosuraj
Created February 12, 2025 13:26
Show Gist options
  • Save sudosuraj/650318b77b1cc1df7a99ef4d13349aba to your computer and use it in GitHub Desktop.
Save sudosuraj/650318b77b1cc1df7a99ef4d13349aba to your computer and use it in GitHub Desktop.

Frida & Objection Guide

1. Checking Android Architecture

Find Device Architecture

adb shell getprop ro.product.cpu.abi

Check Android Version

adb shell getprop ro.build.version.release

2. Installing Frida Server on Android

Download Frida Server

  1. Find the matching Frida server for your architecture at: https://github.com/frida/frida/releases
  2. Download and extract it.

Push Frida Server to Device

adb push frida-server-<version>-android-<arch> /data/local/tmp/frida-server

Give Execution Permission

adb shell chmod +x /data/local/tmp/frida-server

Run Frida Server

adb shell /data/local/tmp/frida-server &

Verify Frida Server is Running

frida -U -n any

3. Installing Frida on Host Machine

Install Frida via pip

pip install frida-tools

Verify Installation

frida --version

4. Using Frida

List Connected Devices

frida-ls-devices

Attach to a Running Process

frida -U -n <process_name>

Spawn and Attach to an Application

frida -U -n <package_name> --no-pause

List Loaded Modules

frida -U -n <package_name> -e 'console.log(Module.enumerateModules());'

List Exports of a Module

frida -U -n <package_name> -e 'console.log(Module.findExportByName("libc.so", "open"));'

Hook a Function

frida -U -n <package_name> -e '
Interceptor.attach(Module.findExportByName(null, "open"), {
    onEnter: function (args) {
        console.log("open called with: " + Memory.readUtf8String(args[0]));
    }
});'

5. Installing Objection

Install Objection

pip install objection

Verify Installation

objection --version

6. Using Objection

Attach to a Running App

objection -g <package_name> explore

Bypass SSL Pinning

android sslpinning disable

List Loaded Classes

android hooking list classes

List Methods of a Class

android hooking list methods <class_name>

Hook a Method

android hooking watch class_method <class_name> <method_name>

Bypass Root Detection

android root disable

Dump Shared Preferences

android data sharedpreferences

Interact with SQLite Databases

android database list
android database query <database_name> "SELECT * FROM table_name;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment