capable.bt(8)
π capable.bt β ok so here's the tea π
bestie. this is capable.bt(8), from the System Manager's Manual, and it's giving "I can see everything the kernel is checking" energy. buckle up π
β¨ NAME β¨
capable.bt β trace security capability checks (aka cap_capable()). that's it. that's the whole job. π
πΈ SYNOPSIS πΈ
capable.bt
literally just run it. no args, no drama, no flags. iconic. β¨
π¦ DESCRIPTION π¦
okay so here's what's happening: this thing traces security capability checks inside the kernel, and prints the deets for every single call. π«Ά
why do you care? two reasons, bestie:
- general debugging β you know, the usual detective work π
- security enforcement β you can use it to figure out a white list of capabilities that an application actually needs π
and the big caveat, no cap: since this uses BPF, only the root user can run this tool. sorry babe, that's just how it is. π
π REQUIREMENTS π
CONFIG_BPFbpftrace
that's the whole guest list. π
π₯ EXAMPLES π₯
trace all capability checks system-wide:
# capable.bt
one line. one command. main character energy. π
π FIELDS π
here's what each column is serving:
TIME(s)β time of the capability check, formattedHH:MM:SS. β°UIDβ user ID. who dis. πͺͺPIDβ process ID. π·οΈCOMMβ process name. π¬CAPβ capability number. π’NAMEβ capability name. for the descriptions, go peek atcapabilities(7). πAUDITβ whether this was an audit event. π
π OVERHEAD π
okay so this adds low-overhead instrumentation to capability checks β and capability checks are expected to be low frequency, so like, usually fine?? but lowkey that totally depends on the application, so don't come for me. π
β οΈ test in a lab environment before use. fr fr. do not skip this step bestie. π¨
π SOURCE π
this is from bpftrace.
https://github.com/iovisor/bpftrace
also, go look inside the bpftrace distribution for a companion _examples.txt file β it's got example usage, output, and commentary for this tool. it's a whole vibe. π
this is a bpftrace version of the bcc tool of the same name. (the bcc tool has options to customize the output, if you're into that.) π
https://github.com/iovisor/bcc
π OS π
Linux π§
β STABILITY β
Unstable β in development. she's a work in progress, and that's okay. π§
π AUTHOR π
Brendan Gregg π
π«Ά SEE ALSO π«Ά
and that's the whole page, bestie!! π this was USER COMMANDS, version dated 2018-09-08, living its life as capable.bt(8). go trace some capabilities. slay. β¨π
π
π¦ where this page comes from
- debian bookworm: bpftrace 0.17.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms