Installation

Frida Installation

Requirements

RequirementDetails
PythonLatest 3.x strongly recommended
OSWindows, macOS, or GNU/Linux
1pip install frida-tools

This installs all Frida CLI tools (frida, frida-ps, frida-trace, frida-discover, etc.) from PyPI.

Install manually (binaries)

Pre-built binaries are available on the Frida GitHub releases page. Useful for:

Verify Installation

1. Start a target process

Linux/macOS:

1cat
2# Leave it running, waiting for input

macOS El Capitan+ (SIP restriction): System binaries reject injection. Copy first:

1cp /bin/cat /tmp/cat
2/tmp/cat

Windows: Use notepad.exe as the target instead.

2. Linux only — enable ptrace for non-child processes

1sudo sysctl kernel.yama.ptrace_scope=0

Required to attach to processes you did not spawn. Default value is 1 (restricted). This setting resets on reboot.

3. Run a test script

Create example.py:

 1import frida
 2
 3def on_message(message, data):
 4    print("[on_message] message:", message, "data:", data)
 5
 6session = frida.attach("cat")
 7
 8script = session.create_script("""
 9rpc.exports.enumerateModules = () => {
10  return Process.enumerateModules();
11};
12""")
13script.on("message", on_message)
14script.load()
15
16print([m["name"] for m in script.exports_sync.enumerate_modules()])

Run it:

1python example.py

Expected output (module names vary by platform/distro):

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

Troubleshooting