setuids.bt(8)
β¨ setuids.bt(8) β the setuid tracer π
Okay so setuids.bt is the manual name for this tool, and it's giving privilege-escalation detective energy π΅οΈπ. It traces setuid-family syscalls and uses bpftrace/eBPF to do it π₯. Main character energy, honestly.
πΈ NAME
setuids.bt β Trace setuid family of syscalls. Uses bpftrace/eBPF.
π¦ SYNOPSIS
setuids.bt
π DESCRIPTION
Okay bestie, this tool traces privilege escalation via setuid syscalls π. It's super useful for debugging, whitelist creation, and intrusion detection, so it's lowkey a whole vibe πβ¨.
It works by tracing the setuid(2), setfsuid(2), and retresuid(2) syscalls using the syscall tracepoints π§. Literally those three, no cap.
β οΈ Since this uses BPF, only the root user can use this tool. Not you, not me, not anybody else without root π.
π REQUIREMENTS
You need CONFIG_BPF and bpftrace π«Ά. No shortcuts, periodt.
π EXAMPLES
Trace setuid syscalls:
# setuids.bt
π FIELDS
PIDβ The calling process ID π.COMMβ The calling process (thread) name π§΅.UIDβ The UID of the caller π€.SYSCALLβ The syscall name π.ARGSβ The arguments to the syscall π§©.(RET)β The return value for the syscall:0means success π, other numbers indicate an error code π.
π«§ OVERHEAD
setuid calls are expected to be low frequency (<< 100/s), so the overhead of this tool is expected to be negligible πβ¨. Chill vibes only.
π SOURCE
This tool originated from the book "BPF Performance Tools", published by Addison Wesley (2019) π:
http://www.brendangregg.com/bpf-performance-tools-book.html
See the book for more documentation on this tool π€.
This version is in the bpftrace repository:
https://github.com/bpftrace/bpftrace
Also look in the bpftrace distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool ππ«Ά.
π₯οΈ OS
Linux π§
π§ͺ STABILITY
Unstable - in development π§. Handle with care, bestie.
π AUTHOR
Brendan Gregg ππ
π SEE ALSO
capable.bt(8) π¦
Stay safe, stay root-only, and keep those setuid calls low-key πΈ. Source: setuids.bt, USER COMMANDS manual page, dated 2019-07-05 π β¨
π¦ where this page comes from
- alpine 3.24: bpftrace-tools-doc 0.26.1-r0 Β· Apache-2.0
- arch rolling: bpftrace 0.27.0-2 Β· Apache-2.0
- centos-stream 10: bpftrace 0.26.1-1.el10 Β· Apache-2.0
- centos-stream 9: bpftrace 0.26.1-1.el9 Β· ASL 2.0
- debian trixie: bpftrace 0.23.2-1 Β· Apache-2.0
- fedora 43: bpftrace 0.24.0-1.fc43 Β· Apache-2.0
- fedora 43: bpftrace 0.24.2-1.fc43 Β· Apache-2.0
- fedora 44: bpftrace 0.24.2-3.fc44 Β· Apache-2.0
- nixos 26.05: bpftrace 0.25.1
- nixpkgs unstable: bpftrace 0.27.1
- opensuse-leap 16.0: bpftrace-tools 0.23.5-160000.1.2 Β· Apache-2.0
- ubuntu questing: bpftrace 0.23.5-1ubuntu1 Β· Apache-2.0
- ubuntu resolute: bpftrace 0.25.0-1ubuntu1 Β· Apache-2.0
- ubuntu stonking: bpftrace 0.25.0-1ubuntu2 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms