procscope requires elevated privileges to load eBPF programs and attach kernel tracepoints. This is fundamental to how eBPF works on Linux.
| Capability | Why | Alternative |
|---|---|---|
CAP_BPF |
Load BPF programs into kernel | CAP_SYS_ADMIN (broader, legacy) |
CAP_PERFMON |
Attach to tracepoints and perf events | CAP_SYS_ADMIN (broader, legacy) |
CAP_SYS_RESOURCE |
Raise RLIMIT_MEMLOCK for BPF maps | ulimit -l unlimited before running |
| Capability | Why |
|---|---|
CAP_SYS_PTRACE |
To attach to processes owned by other users |
# Grant minimum capabilities to the binary
sudo setcap cap_bpf,cap_perfmon,cap_sys_resource+ep /usr/bin/procscope
# Then run without sudo (own processes only)
procscope -- ./my-programNote: CAP_SYS_PTRACE is additionally needed for -p <other-user's-PID>.
- ❌ Does not modify system security policy
- ❌ Does not set capabilities in package install scripts — this is left to the administrator
- ❌ Does not modify kernel parameters
- ❌ Does not persist kernel state — all BPF programs are cleaned up on exit
- ❌ Does not run as a daemon — it is a user-invoked tool
- ❌ Does not send data externally — no telemetry, no analytics, no network calls
- ❌ Does not enforce policy — it only observes and reports
- ❌ Does not intercept or block syscalls — observation only
All procscope BPF programs:
- Are verified by the kernel's BPF verifier before loading
- Cannot crash the kernel (verifier guarantee)
- Cannot access arbitrary kernel memory (verifier guarantee)
- Use bounded loops and bounded map access
- Are automatically cleaned up when procscope exits
- Are not pinned to the BPF filesystem (no persistence)
- Process metadata: PID, PPID, comm, filename, arguments (bounded)
- File paths (bounded, no content)
- Network addresses and ports (no payload)
- Privilege transition metadata (UID/GID values)
- Namespace operation flags
- Mount metadata (source, target, fstype)
- Environment variables (by default)
- File content / read data / write data
- Network payload / packet data
- Memory contents
- Encryption keys or secrets (unless in argv — see redaction)
- No environment dumping —
ShowEnvis false by default - Bounded arguments — max 64 args, max 1024 chars each
- Bounded paths — max 4096 chars
- Sensitive pattern redaction — values matching patterns like
password,token,secret,api_keyare replaced with[REDACTED] - Restricted output permissions — evidence bundles use 0750/0640
procscope is designed for authorized security research on systems where the operator has legitimate access. It should be used:
- ✅ On systems you own or have authorization to test
- ✅ For malware analysis in controlled environments
- ✅ For incident response on compromised systems you administer
- ✅ For debugging your own applications
- ❌ Not for unauthorized surveillance
- ❌ Not for monitoring users without consent
- ❌ Not for circumventing security controls
The tool itself is neutral — it provides visibility that root already has. The ethical boundary is in how it is used.