Closed dkasak closed 5 years ago
Update: I tried installing frida-compile
manually using npm
and this makes it work.
Thanks for the report! It appears as though I have a packaging problem, and am super confused how this is only picked up now.
$ tar tvf <(curl -sL https://github.com/sensepost/objection/archive/1.6.4.tar.gz) '*agent.js'
tar: *agent.js: Not found in archive
tar: Error exit delayed from previous errors.
Debugging this now!
Actually, I am confused. I spun up a new virtual environment and ran pip3 install objection
, and seem to have it:
venv3-temp/lib/python3.7/site-packages/objection » ls agent.js
agent.js
I also just realised you mention that you are running from master. In this case, you need to build the agent yourself. Some instructions are here: https://github.com/sensepost/objection/wiki/Agent-Development-Environment
Oh, I missed that page, sorry (or rather failed to recognize it as relevant). I guess I expected that running pip3 install .
from the git repository would be equivalent to running pip3 install objection
, except for the commit used.
I tried following the instructions on the page you linked and it indeed works, so I guess there's nothing to be done here, except perhaps adding a paragraph to the installation page? Something along the lines of
These instructions are for installing released versions of objection. To install objection from its git repository, you additionally need to build the objection agent yourself. For instructions on how to do this, see the Agent Development Environment page.
No problem. Yeah, I think I need to create a dedicated "development install" guide to help link the pieces together here.
@leonjza instead of the manual build process for (re)building the agent, would it be possible to do a check when Objection launches if an agent rebuild is needed, and rebuild automatically?
This could be augmented with some command-line options, such as --build-agent
/--no-build-agent
, to prevent automatic processing if need be.
I am not sure. That would mean we need to build code for and maintain another external env for node, npm
and all that; something I feel does not warrant the effort.
A missing agent should really only be a problem when you are busy developing and should never happen in standard pip installs from pypi. I am writing the development installation wiki doc as we speak though.
Remember, when developing the agent, running the npm run watch
command gives you live recompilation as well, so your agent updates automatically as your code progresses. This is already works pretty nicely in the node world imo :)
I installed
objection
into a virtualenv usingpip
as described in the wiki. However, upon runningobjection -g SOME_APP explore
, the following exception is thrown:The same command also sometimes throws the following (it seems non-deterministic which exception will be thrown):
Environment (please complete the following information):
Additional context From a cursory look, it seems that the npm module
frida-compile
might be required to generateagent.js
and since I don't have it, the file never gets produced. Is this a likely explanation? I haven't seen it mentioned in the documentation, though.