dessertlab / fantastic_beasts

The Fantastic Beasts Framework is a collection of tools for fuzzing the Android OS.
GNU General Public License v3.0
63 stars 12 forks source link

python init script: cannot communicate w/ frida server (version mismatch?) #5

Closed schrnz closed 5 years ago

schrnz commented 5 years ago

Hi, thanks for open sourcing your work! I wanted to play around with it a bit but stumbled during the setup:

After successfully completing the setup steps before, I end up with an exception when invoking the python script for generating the service2pid map:

$ python init_scripts/create_service_pid_map.py 
Traceback (most recent call last):
  File "init_scripts/create_service_pid_map.py", line 106, in <module>
    stalk("servicemanager")
  File "init_scripts/create_service_pid_map.py", line 84, in stalk
    process = device.attach(target_process)
  File "~/.local/lib/python2.7/site-packages/frida/core.py", line 97, in attach
    return Session(self._impl.attach(self._pid_of(target)))
  File "~/.local/lib/python2.7/site-packages/frida/core.py", line 115, in _pid_of
    return self.get_process(target).pid
  File "~/.local/lib/python2.7/site-packages/frida/core.py", line 67, in get_process
    matching = [process for process in self._impl.enumerate_processes() if fnmatch.fnmatchcase(process.name.lower(), process_name_lc)]
frida.ProtocolError: unable to communicate with remote frida-server; please ensure that major versions match and that the remote Frida has the feature you are trying to use

I tried multiple frida server versions: 12.6.5, 12.6.4, and 11.0.13 to also check an earlier major release, but the error did not change.

Could you provide me with the concrete frida version you are using for your setup? If this solves the problem, adding this to the README.md would be great =) If not, we might need to dig deeper.

akiannillo commented 5 years ago

We are more than happy to share knowledge among the world!

First of all, I suppose you succeed to download and run the android Frida server on the smartphone as root.

Then, you have to be sure that the version you downloaded for the server is the same as the one you use as the python client. At that time, we used frida version 10.5 and 10.6.

Let me know if something changes.

schrnz commented 5 years ago

Using frida gum, core and server version 10.6.61 worked for me, thanks.

I would suggest adding this to the README for future reference since frida-server is not packages with chizpurfle and (at least for me) the most recent version does not work with your shipped gum and core versions

akiannillo commented 5 years ago

Perfect! I'll add it right now.