frida-kill

frida-kill

Command-line tool for terminating processes on local or remote devices. Accepts a process name or PID as the target.

Prerequisites: frida-tools Python package (pip install frida-tools). For remote/USB targets, frida-server must be running on the target device.


Synopsis

frida-kill [options] <process>

<process> is either a process name (string) or a PID (integer). Use frida-ps to discover available processes and their PIDs.


Device Selection Options

FlagDescription
-D ID, --device IDConnect to device with the given ID (obtain IDs via frida-ls-devices)
-U, --usbConnect to USB-attached device
-R, --remoteConnect to remote frida-server (default host)
-H HOST, --host HOSTConnect to remote frida-server on HOST
--certificate CERTSpeak TLS with HOST, expecting CERTIFICATE
--origin ORIGINSet Origin header when connecting to remote server
--token TOKENAuthenticate with HOST using TOKEN
--keepalive-interval NKeepalive interval in seconds; 0 to disable (default: -1)
--p2pEstablish peer-to-peer connection with target
--stun-server ADDRESSSet STUN server ADDRESS (used with --p2p)
--relay addr,user,pass,turn-TYPEAdd TURN relay for --p2p (repeatable)
--device-option optionOverride backend-specific option (repeatable)

Global Options

FlagDescription
-O FILE, --options-file FILEText file containing additional command line options
--versionPrint Frida version and exit

Usage Examples

1# Kill process by PID on a specific USB device
2frida-kill -D 1d07b5f6a7a72552aca8ab0e6b706f3f3958f63e 5029
3
4# Kill process by name on USB device
5frida-kill -U Safari
6
7# Kill a local process by PID
8frida-kill 1234

Typical Workflow

 1# Step 1: List running applications on device to find PID
 2$ frida-ps -D 1d07b5f6a7a72552aca8ab0e6b706f3f3958f63e -a
 3
 4 PID  Name                Identifier
 5----  ------------------  -------------------------------------------------
 64433  Camera              com.apple.camera
 74001  Cydia               com.saurik.Cydia
 84997  Filza               com.tigisoftware.Filza
 94130  IPA Installer       com.slugrail.ipainstaller
103992  Mail                com.apple.mobilemail
114888  Maps                com.apple.Maps
126494  Messages            com.apple.MobileSMS
135029  Safari              com.apple.mobilesafari
144121  Settings            com.apple.Preferences
15
16# Step 2: Kill the target process
17$ frida-kill -D 1d07b5f6a7a72552aca8ab0e6b706f3f3958f63e 5029
18
19# Step 3: Confirm the process is gone
20$ frida-ps -D 1d07b5f6a7a72552aca8ab0e6b706f3f3958f63e -a
21
22 PID  Name                Identifier
23----  ------------------  -------------------------------------------------
244433  Camera              com.apple.camera
254001  Cydia               com.saurik.Cydia
264997  Filza               com.tigisoftware.Filza
274130  IPA Installer       com.slugrail.ipainstaller
283992  Mail                com.apple.mobilemail
294888  Maps                com.apple.Maps
306494  Messages            com.apple.MobileSMS
314121  Settings            com.apple.Preferences
32# Safari (PID 5029) is no longer listed

Notes