frida / frida-python

Frida Python bindings
Other
782 stars 146 forks source link

Unable to trace or spawn process #144

Open bihihinok opened 6 years ago

bihihinok commented 6 years ago

Hi everyone !

Great tool, have been working with this for sometime now ( 2 months ).

However before updating to version 12.0.7, I was able to work fine on my lenovo k3 note. However now, only frida-ps works and nothing else.

I tried using the process name from there to run frida-trace on it but in vain. Also both the versions are same on the device and on python. First I installed the python-frida_12.0.7-1.ubuntu-bionic_amd64.deb package but it didn't work so now I installed using pip install -U frida-tools

Output on my terminal :

$uname -a
Linux kali 4.15.0-kali2-amd64 #1 SMP Debian 4.15.11-1kali1 (2018-03-21) x86_64 GNU/Linux

$frida --version
12.0.7
$frida-ps --version
12.0.7
$frida-trace --version
12.0.7

$ frida -U --no-pause -f net.one97.paytm
     ____
    / _  |   Frida 12.0.7 - A world-class dynamic instrumentation toolkit
   | (_| |
    > _  |   Commands:
   /_/ |_|       help      -> Displays the help system
   . . . .       object?   -> Display information about 'object'
   . . . .       exit/quit -> Exit
   . . . .
   . . . .   More info at http://www.frida.re/docs/home/
Failed to spawn: timeout was reached        

$frida-trace -f net.one97.paytm -i "recv*" -i "read*"
Failed to spawn: unable to find executable at 'net.one97.paytm'  

$frida-ps -Uai
~~~~~ SNIP ~~~~~
4154  Setup Wizard                            com.lenovo.setupwizard                                        
2251  System Daemon Service                   com.lenovo.systemdaemonservice                                
1324  System UI                               com.android.systemui                                          
4319  System Update                           com.lenovo.ota                                                
3580  Tasks                                   com.google.android.apps.tasks                                 
1348  User Dictionary                         com.android.providers.userdictionary                          
3736  Wallpapers                              com.google.android.apps.wallpaper                             
~~~~~ SNIP ~~~~~
4906  Paytm                                   net.one97.paytm
...
$frida-trace --attach-pid=4906  -i "recv*" -i "read*" 
Failed to attach: unable to find process with pid 4906

Output on my mobile

root@K50a40:/data/tmp # id
uid=0(root) gid=0(root) groups=0(root) context=u:r:su:s0
root@K50a40:/data/tmp # ./frida-server                                         

Problems

  1. Unable to attach to any process
  2. Unable to spawn any process
  3. Once spawned command is issued, device just hangs and have to remove the battery to restart ( thank god I didn't have those irreplaceable battery mobiles )

Only thing that works is frida-ps -Uai

P.S. I am using frida-server-12.0.7-android-arm64 on my device. Thanks.

vadimszzz commented 2 years ago

@oleavr It's very usual problem

oleavr commented 2 years ago

@vadimszzz Device/ROM-specific since it's not happening on my end. Let's hope somebody able to reproduce it will eventually volunteer some of their time to investigate it.