Installation

Getting Frida installed and ready-to-go should only take a few minutes. If it ever becomes a pain in the ass, please file an issue (or submit a pull request) describing the issue you encountered and how we might make the process easier.

Requirements for Python bindings

Installing Frida is easy and straight-forward, but there are a few requirements you’ll need to make sure your system has before you start.

  • Python – latest 3.x is highly recommended
  • Windows, macOS, or GNU/Linux

Install with pip

The best way to install Frida’s Python bindings is via PyPI. At the terminal prompt, simply run the following command to install Frida:

$ sudo pip install frida

All of Frida’s PyPI dependencies are automatically installed by the above command, so you won’t have to worry about them at all. If you have problems installing Frida, check out the troubleshooting page or report an issue so the Frida community can improve the experience for everyone.

Install manually

You can also grab pre-release binaries from here.

Testing your installation

Start a process we can inject into:

$ cat

Just let it sit and wait for input. On Windows you might want to use notepad.exe.

Note that this example won’t work on macOS El Capitan and later, as it rejects such attempts for system binaries. See here for more details. However, if you copy the cat binary to e.g., /tmp/cat then run that instead the example should work:

$ cp /bin/cat /tmp/cat
$ /tmp/cat

In another terminal, make a file example.py with the following contents:

import frida
session = frida.attach("cat")
print([x.name for x in session.enumerate_modules()])

If you are on GNU/Linux, issue:

$ sudo sysctl kernel.yama.ptrace_scope=0

to enable ptracing non-child processes.

At this point, we are ready to take Frida for a spin! Run the example.py script and watch the magic:

$ python example.py

The output should be something similar to this (depending on your platform and library versions):

[u'cat', , u'ld-2.15.so']