Repository navigation
feat(build): Package Fibratus for Linux and complete the CLI surface #738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rabbitstack
merged 4 commits into
rabbitstack:linux-port
from
mostafa:feat/linux-packaging
Sep 23, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c6788aa
feat(config): Default the Linux API transport to a UNIX socket
mostafa 2c69a72
feat(build): Package Fibratus for deb and rpm with a systemd unit
mostafa 542b345
feat(cli): Report eBPF counters in stats and cover both API transports
mostafa 318ee22
docs: Add Linux install and quick-start instructions
mostafa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,3 +14,6 @@ build/msi/*.msi | |
|
|
||
| .idea | ||
| filaments/__pycache__ | ||
|
|
||
| # Linux packages | ||
| build/pkg/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| [Unit] | ||
| Description=Fibratus | ||
| Documentation=https://www.fibratus.io | ||
| After=network.target | ||
|
|
||
| [Service] | ||
| Type=simple | ||
| ExecStart=/usr/bin/fibratus run | ||
| Restart=on-failure | ||
| RestartSec=5s | ||
|
|
||
| # Fibratus starts as root because attaching a syscall tracepoint reads its id | ||
| # from /sys/kernel/tracing, which is root-only on stock distributions. The | ||
| # bounding set is what actually constrains it: everything below is dropped, so | ||
| # the process keeps only what the backend and the kill action need. | ||
| # | ||
| # CAP_BPF load programs, create and update maps | ||
| # CAP_PERFMON attach to tracepoints | ||
| # CAP_SYS_PTRACE read /proc/<pid>/exe and cmdline of other users' processes | ||
| # CAP_KILL signal a target, needed only by the kill rule action | ||
| # | ||
| # CAP_BPF and CAP_PERFMON were split out of CAP_SYS_ADMIN in 5.8. On a kernel | ||
| # that predates the split, replace both with CAP_SYS_ADMIN. | ||
| CapabilityBoundingSet=CAP_BPF CAP_PERFMON CAP_SYS_PTRACE CAP_KILL | ||
| AmbientCapabilities=CAP_BPF CAP_PERFMON CAP_SYS_PTRACE CAP_KILL | ||
| NoNewPrivileges=yes | ||
|
|
||
| # full rather than strict: strict would also mount /run read-only and the API | ||
| # socket lives there. | ||
| ProtectSystem=full | ||
| ProtectHome=yes | ||
| PrivateTmp=yes | ||
| ProtectKernelTunables=yes | ||
| ProtectKernelModules=yes | ||
| ProtectControlGroups=yes | ||
| RestrictSUIDSGID=yes | ||
| LockPersonality=yes | ||
|
|
||
| # Process enrichment reads other processes' procfs entries, so this must stay | ||
| # permissive. Hiding them would silently empty ps.exe and ps.cmdline. | ||
| ProtectProc=default | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: fibratus | ||
|
rabbitstack marked this conversation as resolved.
Resolved
|
||
| arch: amd64 | ||
| platform: linux | ||
| version: ${VERSION} | ||
| section: admin | ||
| priority: optional | ||
| maintainer: Nedim Sabic Sabic <https://fibratus.io> | ||
| description: | | ||
| Security sensor for realtime threat detection and protection | ||
| vendor: Fibratus | ||
| homepage: https://fibratus.io | ||
| license: Apache-2.0 | ||
|
|
||
| # The BPF objects are embedded in the binary at compile time, so there is | ||
| # nothing to ship alongside it. | ||
| contents: | ||
| - src: ./cmd/fibratus/fibratus | ||
| dst: /usr/bin/fibratus | ||
|
|
||
| - src: ./configs/fibratus-linux.yml | ||
| dst: /etc/fibratus/fibratus.yml | ||
| type: config|noreplace | ||
|
|
||
| - src: ./rules/linux/*.yml | ||
| dst: /etc/fibratus/rules/ | ||
|
|
||
| - src: ./rules/linux/macros/macros.yml | ||
| dst: /etc/fibratus/rules/macros/macros.yml | ||
|
|
||
| - src: ./build/linux/fibratus.service | ||
| dst: /lib/systemd/system/fibratus.service | ||
|
|
||
| overrides: | ||
| rpm: | ||
| contents: | ||
| - src: ./cmd/fibratus/fibratus | ||
| dst: /usr/bin/fibratus | ||
| - src: ./configs/fibratus-linux.yml | ||
| dst: /etc/fibratus/fibratus.yml | ||
| type: config|noreplace | ||
| - src: ./rules/linux/*.yml | ||
| dst: /etc/fibratus/rules/ | ||
| - src: ./rules/linux/macros/macros.yml | ||
| dst: /etc/fibratus/rules/macros/macros.yml | ||
| - src: ./build/linux/fibratus.service | ||
| dst: /usr/lib/systemd/system/fibratus.service | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| # Fibratus configuration for Linux. | ||
| # | ||
| # Only the settings that apply to the eBPF backend are listed here. Windows-only | ||
| # sections, such as filaments, PE introspection, YARA scanning, and handle or | ||
| # evasion telemetry, have no effect on this platform and are left out rather | ||
| # than shipped inert. | ||
|
|
||
| # =============================== Event source ========================================= | ||
|
|
||
| eventsource: | ||
| # Process telemetry is always collected. Execve, exit, and clone build the | ||
| # process state every other event is correlated against, so they cannot be | ||
| # disabled. | ||
|
|
||
| # Collects openat, unlink, and rename. This is the highest-volume family by a | ||
| # wide margin on a busy host. | ||
| enable-fileio: true | ||
|
|
||
| # Collects connect and accept. | ||
| enable-net: true | ||
|
|
||
| # Collects mmap, process_vm_readv, and process_vm_writev. | ||
| enable-mem: true | ||
|
|
||
| # Drops events before they reach the aggregator, by event name or by the | ||
| # image name of the process that produced them. | ||
| #blacklist: | ||
| # events: | ||
| # - openat | ||
| # images: | ||
| # - fibratus | ||
|
|
||
| # =============================== Aggregator =========================================== | ||
|
|
||
| aggregator: | ||
| # Determines the flush period that triggers the flushing of the event batches to output sinks | ||
| flush-period: 500ms | ||
|
|
||
| # Represents the max time to wait before announcing failed flushing of enqueued events when fibratus | ||
| # is stopped | ||
| flush-timeout: 4s | ||
|
|
||
| # =============================== Filters and rules ==================================== | ||
|
|
||
| filters: | ||
| rules: | ||
| # Enables the rule engine. With no rules loaded every event reaches the | ||
| # outputs; with rules loaded only matching events do. | ||
| enabled: true | ||
|
|
||
| # Rule definitions. The package installs the shipped Linux rules here. | ||
| from-paths: | ||
| - /etc/fibratus/rules/*.yml | ||
|
|
||
| macros: | ||
| from-paths: | ||
| - /etc/fibratus/rules/macros/*.yml | ||
|
|
||
| # =============================== API ================================================== | ||
|
|
||
| api: | ||
| # The transport for the API HTTP server. A unix:// path keeps the API off the | ||
| # network and leaves access to the socket's filesystem permissions. A host:port | ||
| # value exposes it over TCP instead, e.g. 192.168.1.32:8084. | ||
| transport: unix:///var/run/fibratus.sock | ||
|
|
||
| # Represents the timeout interval for the HTTP server responses. | ||
| timeout: 5s | ||
|
|
||
| # =============================== Logging ============================================== | ||
|
|
||
| logging: | ||
| # Specifies the minimum allowed log level. Anything logged below this log level will | ||
| # not get dumped to a file or stdout stream | ||
| level: info | ||
|
|
||
| # Represents the log file format | ||
| #formatter: json | ||
|
|
||
| # Under systemd, logging to stdout routes through the journal | ||
| log-stdout: true | ||
|
|
||
| # Alternative directory for log files | ||
| #path: /var/log/fibratus | ||
|
|
||
| # =============================== Outputs ============================================== | ||
|
|
||
| output: | ||
| # Console output writes the event to the standard output stream. | ||
| console: | ||
| enabled: true | ||
|
|
||
| # Indicates if the console output is colorized | ||
| colorize: true | ||
|
|
||
| # The "pretty" format replaces specifiers in the template, "json" emits the | ||
| # event as a raw JSON string | ||
| format: pretty | ||
|
|
||
| # Elasticsearch output indexes event bulks into Elasticsearch clusters. | ||
| elasticsearch: | ||
| enabled: false | ||
| #servers: | ||
| # - http://localhost:9200 | ||
|
|
||
| # HTTP output posts event batches to an HTTP endpoint. | ||
| http: | ||
| enabled: false | ||
| #endpoint: http://localhost:8081 | ||
|
|
||
| # AMQP output publishes events to a message broker. | ||
| amqp: | ||
| enabled: false | ||
| #url: amqp://localhost:5672 | ||
|
|
||
| # =============================== Alert senders ======================================== | ||
|
|
||
| alertsenders: | ||
| mail: | ||
| enabled: false | ||
| #host: smtp.gmail.com | ||
| #port: 587 | ||
|
|
||
| slack: | ||
| enabled: false | ||
| #url: https://hooks.slack.com/services/... | ||
|
|
||
| # =============================== General ============================================== | ||
|
|
||
| # Forwards events to the output sinks without running the rule engine or | ||
| # building the full process state. | ||
| forward: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.