Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

refactor spawning logic. #474

Closed
1 of 4 tasks
leonjza opened this issue Jul 26, 2021 · 6 comments
Closed
1 of 4 tasks

refactor spawning logic. #474

leonjza opened this issue Jul 26, 2021 · 6 comments

Comments

@leonjza
Copy link
Member

leonjza commented Jul 26, 2021

Right now, the objection spawning logic is not great. We can't reliably do early instrumentation, and with Frida 15, some new API's are around that we can use to improve application selection etc. Some quick thoughts on what needs implementing:

@duraki
Copy link

duraki commented Oct 13, 2021

any progress ? 😢

@leonjza
Copy link
Member Author

leonjza commented Oct 25, 2021

Finally made some progress here! Code is not in yet, but the spawning logic rewrite happened yesterday. https://twitter.com/leonjza/status/1452516278451773448

@duraki
Copy link

duraki commented Oct 25, 2021

Muchos grazias @leonjza for update 💯 Let us know when you push to remote, we might be of help

leonjza added a commit that referenced this issue Oct 25, 2021
this commit contains many changes. the most important of which
is a completely rewritten Agent class, improving support for
early instrumentation.

pre this commit, because we we're injecting the frida gadget in
target applications, we expected communications to occur over
a tcp socket. as far back as frida 12.7+ support injecting the
frida-server into applications that are debuggable vastly
simplifies this process in jailed environments. as such, we can
use normal "usb" comms, and thereby more closely follow the
same logic as found in frida-* tools.

a small changelog for all the changes:

- remove the get_device_info() call that relied on frida scripts
  to get information about the platform. instead we're now using
  device.query_system_parameters()
- replace the old `explore` command with a new `start` command
- support spawning new applications
- support attaching to the frontmost application
- support enabling the node debug port, accessible via the chrome
  debugger
- support immediately resuming apps
- replace os with pathlib in some places
- remove the `objection device_type` command
- add the `resume` repl command to resume apps
- add a prompt token to show the current process state (pause/run)

no tests were fixed, so expect most of them to fail :P

related issues: #473, #474
@leonjza
Copy link
Member Author

leonjza commented Oct 25, 2021

Just pushed the first WIP for the refactor. Most things work. Theres many breaking changes too, but feel free to experiment :P Most notably, the explore command is now start.

image

@duraki
Copy link

duraki commented Oct 25, 2021

  • add the resume repl command to resume apps

Well, I can't thank you for this. Who knows how many times I tried typing %resume in Objection REPL 😹
On a serious note: this is awesome. And at what better time then with newest Frida release, eh?

I will sure be among the first who will (s)t(r)est it out 💟 Will update personal observations here asap

edit: attaching by $pid has been ditched as it seems.

Notable diff: Initialization of new Agent Object via CLI, Gadget ditch, New Agent logic

@leonjza
Copy link
Member Author

leonjza commented Oct 26, 2021

edit: attaching by $pid has been ditched as it seems.

If you provide a pid to --name it should work ok.

@sensepost sensepost locked and limited conversation to collaborators Feb 13, 2022
@leonjza leonjza converted this issue into discussion #527 Feb 13, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants