Git Product home page Git Product logo

frida-push's Introduction

frida-push

Wrapper tool to identify the remote device and push device specific frida-server binary.

Installing

sudo pip install frida-push

Running

$ frida-push -h

usage: frida-push [-h] [-d DEVICE_NAME] [--version]

optional arguments:
  -h, --help            show this help message and exit
  -d DEVICE_NAME, --device-name DEVICE_NAME
  -f, --force           force download
  --version             show program's version number and exit
$ adb devices -l

List of devices attached
emulator-5554          device product:sdk_google_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:5
emulator-5553          device product:sdk_google_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:4
emulator-5552          device product:sdk_google_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:3

$ frida-push -d emulator-5554

[2018-01-16 13:15:21,230] [frida-push: INFO]: Devices: emulator-5554, 0617627d0069ace6
[2018-01-16 13:15:21,230] [frida-push: INFO]: Current installed Frida version: 10.6.32
[2018-01-16 13:15:21,242] [frida-push: INFO]: Found arch: x86
[2018-01-16 13:15:21,243] [frida-push: WARNING]: Downloading: https://github.com/frida/frida/releases/download/10.6.32/frida-server-10.6.32-android-x86.xz
[2018-01-16 13:15:27,577] [frida-push: INFO]: Writing file as: /home/raul/.frida-push/frida-server-10.6.32-android-x86
[2018-01-16 13:15:27,676] [frida-push: INFO]: File pushed to device successfully.
[2018-01-16 13:15:27,686] [frida-push: INFO]: Killing all frida-server on device.
[2018-01-16 13:15:27,704] [frida-push: INFO]: Executing frida-server on device.

frida-push's People

Contributors

anantshri avatar bengardiner avatar c0dist 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frida-push's Issues

KeyError: 'transport_id'

Host System: Ubuntu 16.04
I am running my Android x86 VM using Genymotion

Adb devices:

testing$ adb devices -l
List of devices attached
192.168.65.101:5555    device product:vbox86p model:Custom_Phone___7_1_0___API_25___768x1280 device:vbox86p

Error:

testing$ frida-push 
[2018-06-30 21:34:44,726] [frida-push: INFO]: Devices: 192.168.65.101:5555
[2018-06-30 21:34:44,727] [frida-push: INFO]: Current installed Frida version: 11.0.12
Traceback (most recent call last):
  File "/home/c0d3r/temp/testing/testing/bin/frida-push", line 11, in <module>
    sys.exit(main())
  File "/home/c0d3r/temp/testing/testing/local/lib/python2.7/site-packages/frida_push/command.py", line 211, in main
    transport_id = devices[ops.device_name]['transport_id']
KeyError: 'transport_id'

GCC compile error on Fedora 32

I get this error when trying to install this lib on Fedora 32. Note Fedora 32 e.g. has removed Python2, but that should not be a problem…

pip3 install --user frida-push
Collecting frida-push
  Using cached https://files.pythonhosted.org/packages/4f/49/7cbf4b840ba67a9697322e99800d81b74a49cd42554765eea4bc87313c83/frida-push-1.0.8.tar.gz
Requirement already satisfied: requests in /usr/lib/python3.8/site-packages (from frida-push) (2.22.0)
Requirement already satisfied: frida in /usr/local/lib64/python3.8/site-packages (from frida-push) (12.11.6)
Collecting backports.lzma
  Using cached https://files.pythonhosted.org/packages/21/0f/1a9990233076d48aa2084100ba289ca162975e73a688f3a56c0ee2bb441a/backports.lzma-0.0.14.tar.gz
Collecting future
  Using cached https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.8/site-packages (from requests->frida-push) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3.8/site-packages (from requests->frida-push) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python3.8/site-packages (from requests->frida-push) (1.25.7)
Installing collected packages: backports.lzma, future, frida-push
    Running setup.py install for backports.lzma ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-raba59mq/backports.lzma/setup.py'"'"'; __file__='"'"'/tmp/pip-install-raba59mq/backports.lzma/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vb2qu191/install-record.txt --single-version-externally-managed --compile --user --prefix=
         cwd: /tmp/pip-install-raba59mq/backports.lzma/
    Complete output (21 lines):
    This is backports.lzma version 0.0.14
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/backports
    copying backports/__init__.py -> build/lib.linux-x86_64-3.8/backports
    creating build/lib.linux-x86_64-3.8/backports/lzma
    copying backports/lzma/__init__.py -> build/lib.linux-x86_64-3.8/backports/lzma
    running build_ext
    building 'backports.lzma._lzma' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/backports
    creating build/temp.linux-x86_64-3.8/backports/lzma
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include -I/home/rugk/include -I/opt/local/include -I/usr/local/include -I/usr/include/python3.8 -c backports/lzma/_lzmamodule.c -o build/temp.linux-x86_64-3.8/backports/lzma/_lzmamodule.o
    backports/lzma/_lzmamodule.c:12:10: schwerwiegender Fehler: Python.h: Datei oder Verzeichnis nicht gefunden
       12 | #include "Python.h"
          |          ^~~~~~~~~~
    Kompilierung beendet.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-raba59mq/backports.lzma/setup.py'"'"'; __file__='"'"'/tmp/pip-install-raba59mq/backports.lzma/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vb2qu191/install-record.txt --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.

It seems lzma cannot find Python.h, so maybe it can be solved by #13.

cross platform: Host and client

host: windows / linux / mac
client : Android, ios etc

idea is to ensure that this eliminates the need to make the choice of selecting the current frida-server for any of the use cases.

Using adb root instead of su

I have trouble using frida-push because he is using su which I haven't on my physical device.
Is there an option to add the usage of root shell by using adb root instead of su binary ?

Stops while pushing server to NoxPlayer

I had to update the adb version that is included in the latest NoxPlayer because it was causing frida-push to throw the "transport_id" error. However, though it's all working good with the newest adb, and your script detects the environment etc. it just never finishes uploading. Here is a couple screenshots of the output, trigger after i cancel from waiting too long.

image

The weird thing is that it is actually creating the file on the VM. It's only creating it at 6.94MB every time and stopping there.

image

When I cancel it, it is removed fine also. So, i'm unsure what's going on here.

Edit; Forgot to mention, the file it downloaded, is the full size. So it's not a broken download or anything.

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.