
Aya 기반 eBPF 보안 모니터링 및 샌드박싱 에이전트
Bombini는 Aya 라이브러리를 사용하여 순수 Rust로 작성된 eBPF 기반 보안 에이전트이며, LSM(Linux Security Module) BPF 훅을 기반으로 구축되었습니다. 핵심적으로 Bombini는 Detector라고 불리는 모듈식 컴포넌트를 사용하며, 각 Detector는 특정 유형의 시스템 이벤트를 모니터링하고 보고하는 역할을 담당합니다. 샌드박스 모드가 활성화된 Detector는 커널 내에서 금지된 작업을 차단합니다.
EPERM으로 실패합니다.scope/event 조건자가 이벤트를 보고하거나, sandbox가 활성화된 경우 이를 거부합니다.Bombini는 BPF LSM이 활성화된 Linux 6.2+가 필요합니다. 먼저 호환성 문서를 확인하세요. 컨테이너 이미지는 x86_64용으로 빌드되었습니다.
저장소 루트에서 빠른 시작 설정으로 Bombini를 시작하세요:
docker run --pid=host --rm -it --privileged \
-v $PWD/examples/quickstart:/usr/local/lib/bombini/config:ro \
-v /sys/fs/bpf:/sys/fs/bpf \
ghcr.io/bombinisecurity/bombini:v1.1.0
설정은 세 개의 Detector 파일로 구성됩니다.
procmon.yaml은 root로의 setuid를 보고하고 /tmp에서의 실행을 금지합니다:
# Detect privilege escalation to root
setuid:
enabled: true
rules:
- rule: SetUidToRoot
event: euid == 0
# Block binaries executed from /tmp right in the kernel
bprm_check:
enabled: true
sandbox:
enabled: true
deny_list: true
rules:
- rule: DenyExecFromTmp
event: path_prefix == "/tmp"
filemon.yaml은 /etc/shadow 읽기를 보고합니다:
# Detect reads of password hashes
file_open:
enabled: true
rules:
- rule: ShadowRead
event: path == "/etc/shadow"
netmon.yaml은 클라우드 메타데이터 서비스로의 연결을 보고합니다:
# Detect access to the cloud metadata service: a common way to steal credentials
egress:
enabled: true
rules:
- rule: CloudMetadataAccess
event: ipv4_dst == "169.254.169.254" AND port_dst == 80
다른 터미널에서 이벤트를 생성하세요:
$ ./examples/quickstart/trigger.sh
[1] sudo reads /etc/shadow: Setuid and FileOpen events
[2] exec a binary from /tmp: blocked by the sandbox
./examples/quickstart/trigger.sh: 10: /tmp/bombini-quickstart: Operation not permitted
blocked: exit code 126
[3] connect to the cloud metadata service: Egress event
Bombini는 이벤트를 JSON 라인으로 stdout에 출력합니다. 다음은 차단된 exec입니다:
{
"type": "ProcessEvent",
"process": {
"start_time": "2026-10-03T14:36:10.256Z",
"cloned": true,
"pid": 39988,
"tid": 39988,
"ppid": 39984,
"uid": 503,
"euid": 503,
"gid": 1000,
"egid": 1000,
"auid": 0,
"cap_inheritable": "",
"cap_permitted": "",
"cap_effective": "",
"secureexec": "",
"filename": "dash",
"binary_path": "/usr/bin/dash",
"args": "./examples/quickstart/trigger.sh",
"exec_id": "Mzk5ODg6MjEyNzU3NDAzMjI2MzI2",
"parent_exec_id": "Mzk5ODQ6MjEyNzU3MzgzNTY5NTc3"
},
"parent": { "...": "same fields for the parent process" },
"blocked": true,
"process_event": {
"type": "BprmCheck",
"binary": "/tmp/bombini-quickstart"
},
"timestamp": "2026-10-03T14:36:10.256Z",
"rule": "DenyExecFromTmp"
}
GTFOBins 셸 탈출 및 권한 상승과 같은 더 많은 기성 정책이 examples에 있습니다.
| Detector | 감시 대상 | Sandbox |
|---|---|---|
| ProcMon | 프로세스 exec 및 exit, setuid/setgid, capabilities, prctl, 사용자 네임스페이스, ptrace | ✓ |
| FileMon | 파일 열기, mmap, truncate, unlink, symlink, chmod, chown, mount, ioctl | ✓ |
| NetMon | 인그레스 및 이그레스 TCP 연결, 소켓 생성 및 연결 | ✓ |
| KernelMon | BPF 맵 생성, BPF 프로그램 로드, BPF 맵 및 프로그램 접근 | |
| IOUringMon | io_uring 제출 큐 항목 | |
| SysEnumMon (실험적) | 시스템 열거: 시간 창 내에 여러 감시 대상 파일 또는 바이너리 접근 |
규칙 구문은 Rules에, 이벤트 형식은 Events에 설명되어 있습니다.
전체 문서는 book에 있습니다.
기여 가이드라인은 CONTRIBUTING.md를 확인해 주세요.