Installation
Frida Installation
Requirements
| Requirement | Details |
|---|---|
| Python | Latest 3.x strongly recommended |
| OS | Windows, macOS, or GNU/Linux |
Install via pip (recommended)
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:
- Environments without pip/Python
- Embedding
frida-serveron a target device - Installing a specific version
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
- See the Frida troubleshooting page for common issues.
- On macOS El Capitan+, SIP blocks injection into
/bin/*and/usr/bin/*— always copy the target binary to/tmp/first. - On Linux, if attach fails with a permissions error, confirm
kernel.yama.ptrace_scopeis0.