Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook manager attach to app complains Cannot read property 'getDefaultBridge' #33

Open
cryptax opened this issue Dec 10, 2020 · 4 comments
Assignees
Labels
bug Something isn't working device comm

Comments

@cryptax
Copy link
Contributor

cryptax commented Dec 10, 2020

In Dexcalibur hook manager panel, I click on attach to app.

attach-toapp

Note that frida_server is running despite what the GUI says (see Issue: #32).

generic_x86_64:/ $ ps -u root | grep frida
root         16627 16617   79892  61196 poll_schedule_timeout 0 S frida_server
root         16648     1   14308   4552 poll_schedule_timeout 0 S frida-helper-32

Dexcalibur console says:

[INFO] [WEBSERVER] Start hooking [app=undefined, type=attach-app-self]
TypeError: Cannot read property 'getDefaultBridge' of undefined
    at Function.getDevice (/home/axelle/.nvm/versions/node/v12.20.0/lib/node_modules/dexcalibur/src/FridaHelper.js:235:40)
    at /home/axelle/.nvm/versions/node/v12.20.0/lib/node_modules/dexcalibur/src/HookManager.js:1488:40
    at Generator.next (<anonymous>)
    at onFulfilled (/home/axelle/.nvm/versions/node/v12.20.0/lib/node_modules/dexcalibur/node_modules/co/index.js:65:19)
    at /home/axelle/.nvm/versions/node/v12.20.0/lib/node_modules/dexcalibur/node_modules/co/index.js:54:5
    at new Promise (<anonymous>)
    at co (/home/axelle/.nvm/versions/node/v12.20.0/lib/node_modules/dexcalibur/node_modules/co/index.js:50:10)
    at createPromise (/home/axelle/.nvm/versions/node/v12.20.0/lib/node_modules/dexcalibur/node_modules/co/index.js:30:15)
    at HookManager.start (/home/axelle/.nvm/versions/node/v12.20.0/lib/node_modules/dexcalibur/src/HookManager.js:1574:9)
    at HookManager.startByAttachToApp (/home/axelle/.nvm/versions/node/v12.20.0/lib/node_modules/dexcalibur/src/HookManager.js:1439:14)
error: Cannot read property 'getDefaultBridge' of undefined

The GUI does not say anything special:

attached

The app is running too:

generic_x86_64:/ $ ps -A | grep tuna                                                                                                             
u0_a201      17257  1483 1457216  94888 ep_poll             0 S tuna.obvious.trust
  • OS: Linux Mint 20
  • Node JS version: 12.20.0
  • Dexcalibur version (see 'package.json' or output) : 0.7.3
  • Android version: 8.0 x86 emulator
  • Rooted
@cryptax cryptax added the bug Something isn't working label Dec 10, 2020
@0xbadb0d00
Copy link

This error also occurred to me because frida client doesn't recognize the emulated device (mine was Nox). To let it works I needed to do some little modifications on the Frida client

@FrenchYeti
Copy link
Owner

Can you say me howdid you solve this error ?

@0xbadb0d00
Copy link

Can you say me howdid you solve this error ?

I solved it by cloning Dexcalibur repository and manually modifying the file "dexcalibur\node_modules\frida\dist\index.js" with a workaround.

It recognize the Nox USB emulated Device without matching it by id but trought type:
frida_index js

I noticed that in my case it tries to match the device USB with id "127.0.0.1:62001" without success even if id was correct (maybe this is due to the fact that the input id needs to be escaped for first, but I'am not sure).

Hope it helps you guys.

@FrenchYeti
Copy link
Owner

@giudon010 Thanks, that sound interesting, it's more an issue related to frida. Did you try with latest frida ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working device comm
Projects
None yet
Development

No branches or pull requests

3 participants