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

[bug] Failed to connect to networked devices #674

Open
flamecopper opened this issue Apr 20, 2024 · 2 comments
Open

[bug] Failed to connect to networked devices #674

flamecopper opened this issue Apr 20, 2024 · 2 comments
Labels
freshissue Default label for new, untriaged issues.

Comments

@flamecopper
Copy link

I have already run the following code backend:
root# /usr/sbin/frida-server -l 0.0.0.0:1337

objection -N --gadget xxxxx -h 192.168.10.119 -p 1337 explore
Using networked device @192.168.10.119:1337

Using networked device @192.168.10.119:1337
Traceback (most recent call last):
File "/home/alvoo/.local/bin/objection", line 8, in
sys.exit(cli())
^^^^^
File "/home/alvoo/.local/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alvoo/.local/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/alvoo/.local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alvoo/.local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alvoo/.local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alvoo/.local/lib/python3.11/site-packages/objection/console/cli.py", line 114, in explore
agent.inject()
File "/home/alvoo/.local/lib/python3.11/site-packages/objection/utils/agent.py", line 202, in inject
session = self.get_session()
^^^^^^^^^^^^^^^^^^
File "/home/alvoo/.local/lib/python3.11/site-packages/objection/utils/agent.py", line 152, in get_session
self.session = self.device.attach(state_connection.gadget_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alvoo/.local/lib/python3.11/site-packages/frida/core.py", line 86, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/home/alvoo/.local/lib/python3.11/site-packages/frida/core.py", line 1010, in attach
return Session(self._impl.attach(self._pid_of(target), **kwargs)) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
frida.TransportError: timeout was reached

@flamecopper flamecopper added the freshissue Default label for new, untriaged issues. label Apr 20, 2024
@flamecopper flamecopper changed the title [bug] [bug] Failed to connect to networked devices Apr 20, 2024
@flamecopper
Copy link
Author

jammy@WW-G18RJR3:~$ objection --debug -N --gadget xyz.abc -h 192.168.10.119 -p 1337 explore
[debug] Agent path is: /home/jammy/.local/lib/python3.11/site-packages/objection/agent.js
[debug] Injecting agent...
Using networked device @192.168.10.119:1337
[debug] Attempting to attach to process: xyz.abc
[debug] Unable to find process: xyz.abc, attempting spawn
[debug] PID 30191 spawned, attaching...
[debug] Resuming PID 30191
Agent injected and responds ok!
Traceback (most recent call last):
File "/home/jammy/.local/bin/objection", line 8, in
sys.exit(cli())
^^^^^
File "/home/jammy/.local/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jammy/.local/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/jammy/.local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jammy/.local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jammy/.local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jammy/.local/lib/python3.11/site-packages/objection/console/cli.py", line 156, in explore
device_info = get_device_info()
^^^^^^^^^^^^^^^^^
File "/home/jammy/.local/lib/python3.11/site-packages/objection/commands/device.py", line 27, in get_device_info
package_info = api.env_ios()
^^^^^^^^^^^^^
File "/home/jammy/.local/lib/python3.11/site-packages/frida/core.py", line 179, in method
return script._rpc_request("call", js_name, args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jammy/.local/lib/python3.11/site-packages/frida/core.py", line 86, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/home/jammy/.local/lib/python3.11/site-packages/frida/core.py", line 491, in _rpc_request
raise result.error
frida.InvalidOperationError: script has been destroyed
Asking jobs to stop...
Unloading objection agent...
[debug] Calling unload()
Unable to run cleanups: script is destroyed

Please see another of my error when I am trying to connect via network

@KD-MM2
Copy link

KD-MM2 commented Jun 16, 2024

try this:

on device: root# /usr/sbin/frida-server -l 0.0.0.0

forwarding ssh connect to mobile:
ssh -L 27042:127.0.0.1:27042 [email protected] 192.168.0.153 is device ip
just leave it alone then create new terminal window:

objection -N --gadget xxxxx explore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
freshissue Default label for new, untriaged issues.
Projects
None yet
Development

No branches or pull requests

2 participants