Code Monkey home page Code Monkey logo

frida-android-hook's Introduction

image

Frida Android hook

CodeQL python frida

๐Ÿ“ A tool that helps you can easy using frida. It support script for trace classes, functions, and modify the return values of methods on iOS platform.

๐Ÿ‘‰ For iOS platform: frida-ios-hook

Env OS Support

OS Supported Noted
Darwin โœ… main
Linux โœ… sub
Windows โœ… sub

Compatible with

Android Api Frida Supported
8.0 - Api 26 14.2.13 โœ…
8.0 - Api 26 15.0.18 โœ…

Feature

Running with python3.x

Support both spawn & attach script to process.

[+] Options:

	-p(--package)		Identifier of application ex: com.android.calendar
	-n(--name) 		Name of application ex: Calendar
	-s(--script) 		Using script format script.js
	-c(--check-version) 	Check for the newest version
	-u(--update) 		Update to the newest version
	
	[*] Dump memory application:
	
    	--dump-memory         Dump memory of application

	[*] Information:

	--fs-install	    Install frida server
	--fs-start          Start frida server
	--fs-stop           Stop frida server
	--list-devices      List All Devices
	--list-apps         List the installed apps
	--list-scripts      List All Scripts
	--logcat            Show system log of device
	--shell             Get the shell of connect device

	[*] Quick method:

	-m(--method)    Support commonly used methods
				app-static(-n)
				bypass-jb(-p)
				bypass-ssl(-p)
				i-url-req(-p)
				i-crypto(-n)

ChangeLog

Version: 1.3

	[+] Add:
	
		[-] Add setup.py for build executable
				
		[-] Add suggestion script for option `-s (--script)`
		
		
	[+] Change:
		
		[-] Update readme, changelog
		
		[-] Update frida-script
		
		[-] Update hook.py
	
	[+] Fix
		
		[-] Fix syntax in hook.json

See Full ChangeLog

Install

	[+] Latest version
	
		https://github.com/noobpk/frida-android-hook/releases
		
	[+] Develop version
	
		git clone -b dev https://github.com/noobpk/frida-android-hook.git

Build

2. cd frida-android-hook/
3. pip3 install -r requirements.txt
4. python3 setup.py
4. cd frida-android-hook

Usage For Windows:

5.1 Start Frida-server: `python3 androidhook.py --fs-start`
5.2 python3 androidhook.py --help(-h)
5.3 rebellion :))

Usage For Darwin / Linux

6.1 Start Frida-server: `./androidhook --fs-start`
6.2 ./androidhook --help(-h)
6.3 rebellion :))

See Full Usage as Wiki

If you run the script but it doesn't work, you can try the following: frida -U -f package -l script.js

๐Ÿ“บ Demo Feature

N Title Link
1
2
3

Frida Scripts

N Spawn/Attach Script Name Script Description Script Version
1 S+A android-intercepts-crypto.js Android Intercepts Crypto Operations 1.0
2 S+A android-logcat.js Android logcat capture 1.0
3 S+A call-method-of-class.js Call method of class 1.0
4 S+A dupDex.js dupDex 1.0
5 S+A fingerprint-bypass-via-exception-handling.js Fingerprint bypass via Exception Handling. 1.0
6 S+A fingerprint-bypass.js Fingerprint bypass 1.0
7 S+A hook-method-of-class.js Hook method of class 1.0
8 S raptor_frida_android_bypass.js Raptor frida android bypass 1.0
9 S raptor_frida_android_debug.js Raptor frida android debug 1.0
10 S raptor_frida_android_enum.js Raptor frida android enum 1.0
11 S raptor_frida_android_findClass1.js Raptor frida android findclass 1 1.0
12 S raptor_frida_android_findClass2.js Raptor frida android findclass 2 1.0
13 S raptor_frida_android_lowlevel.js Raptor frida android low level 1.0
14 S raptor_frida_android_trace.js Raptor frida android trace 1.0
15 S+A show-all-classes-methods.js Show all class name and method 1.0
16 S+A show-all-classes.js Show all class name 1.0
17 S+A show-module-exported-functions.js Show module exported function 1.0
18 S+A show-modules-exports.js Show modules exports 1.0
19 S+A show-specific-class-methods.js Show specific class and method 1.0

Disclaimer

Because I am not a developer, so my coding skills might not be the best. Therefore, if this tool have any issue or not working for you, create an issue and i will try to fix it. Any suggestions for new feature and discussions are welcome!

frida-android-hook's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar eviltwin01 avatar noobpk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frida-android-hook's Issues

used scripts

How can intercept_crypto.js be used with bypass_ssl.js

Only one can be used

ModuleNotFoundError: No module named 'frida'

frida-android-hook> pip3 install -r requirements.txt
Requirement already satisfied: requests==2.28.1 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 1)) (2.28.1)
Requirement already satisfied: frida==16.0.2 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 2)) (16.0.2)
Requirement already satisfied: colorlog==6.7.0 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 3)) (6.7.0)
Requirement already satisfied: idna<4,>=2.5 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from requests==2.28.1->-r requirements.txt (line 1)) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from requests==2.28.1->-r requirements.txt (line 1)) (2022.9.24)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from requests==2.28.1->-r requirements.txt (line 1)) (1.26.12)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from requests==2.28.1->-r requirements.txt (line 1)) (2.1.1)
Requirement already satisfied: setuptools in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from frida==16.0.2->-r requirements.txt (line 2)) (58.1.0)
Requirement already satisfied: colorama in c:\users\myself\appdata\local\programs\python\python310\lib\site-packages (from colorlog==6.7.0->-r requirements.txt (line 3)) (0.4.6)

frida-android-hook> frida --version
16.0.2

frida-android-hook> python3.exe .\setup.py
[+] Build executable for Windows success.

frida-android-hook> cd .\frida-android-hook\
frida-android-hook> python3 .\androidhook.py --fs-start
Traceback (most recent call last):
  File "E:\frida-android-hook\frida-android-hook\core\hook.py", line 1, in <module>
    import frida
ModuleNotFoundError: No module named 'frida'

Same error occurs with frida==15.1.17

[ERROR] - [x_x] The application may crash or lose connection.

How to fix this?

frida-android-hook> python .\androidhook.py -p com.android.browser -s frida-scripts/show-all-classes.js


                                _           _     _   _    _             _
                /\             | |         (_)   | | | |  | |           | |
               /  \   _ __   __| |_ __ ___  _  __| | | |__| | ___   ___ | | __
              / /\ \ | '_ \ / _` | '__/ _ \| |/ _` | |  __  |/ _ \ / _ \| |/ /
             / ____ \| | | | (_| | | | (_) | | (_| | | |  | | (_) | (_) |   <
            /_/    \_\_| |_|\__,_|_|  \___/|_|\__,_| |_|  |_|\___/ \___/|_|\_\
                        https://noobpk.github.io          #noobboy
                    Trace Class/Func & Modify Return Value

[*]___author___: @noobpk
[*]___version___: 1.3

[20-11-22 02:14:30] [INFO] - [*] Spawning: com.android.browser
[20-11-22 02:14:30] [INFO] - [*] Script: frida-scripts/show-all-classes.js
[20-11-22 02:14:36] [ERROR] - [x_x] The application may crash or lose connection.

not found

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

it's not work .

get this error

.../tmp/FridaHookSwiftAlamofire-master $ ./run.sh usage: frida [options] target
frida: error: [Errno 2] No such file or directory: '/data/local/tmp/FridaHookSwiftAlamofire-master/frida-agent/_agent.js'

t.js
usage: frida [options] target
frida: error: [Errno 2] No such file or directory: '/data/local/tmp/FridaHookSwiftAlamofire-master/frida-agent/agent/frida-agent/_agent.js'

make it run with frida

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

------------โ€”-----------------;+-+

can you make it .js file to run it with frid with host and usb

and kindly make simple use or video how use it

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.