Why Traditional System Logs Often Fall Short?
Imagine your server being SSH brute-forced at 2 AM. After successfully blocking the IP, you check the logs only to find basic login/logout information. If the hacker managed to install ‘fileless malware‘ running directly in RAM or created a reverse shell from deep within a container, traditional monitoring tools would likely miss it.
I’ve been in that situation and realized I needed a solution that could see into every corner of the system without freezing the server. The answer is Tracee from Aqua Security. This tool leverages eBPF (extended Berkeley Packet Filter) to run small programs directly within the Linux Kernel. It monitors every syscall and network behavior with extremely low latency.
If you’re operating Kubernetes, Tracee is like a set of infrared cameras. It helps you detect the shadiest behaviors that hackers try to hide.
Quick Start: Experience Tracee in 5 Minutes
The fastest way to start is by using Docker. The only requirement is a Linux server (Ubuntu 20.04+ preferred, Kernel 5.4+) with Docker engine installed.
docker run --name tracee --rm -it \
--privileged \
--pid=host \
-v /lib/modules:/lib/modules:ro \
-v /usr/src:/usr/src:ro \
-v /tmp/tracee:/tmp/tracee \
aquasec/tracee:latest
Decoding the Key Parameters:
--privileged: Grants permission for Tracee to load eBPF code directly into the Kernel.--pid=host: Allows Tracee to “see” all processes running on the physical host.-v /lib/modules...: Maps the kernel directory so Tracee understands the current system structure.
As soon as the command runs, a stream of events will appear. Try opening another terminal and typing whoami. You’ll see Tracee capture the execve syscall of that command immediately.
Why is eBPF the Ultimate ‘Weapon’?
Previously, we often used auditd or ptrace. However, they usually consume significant resources or cause significant application overhead. eBPF completely changes the game thanks to three factors:
- Absolute Safety: eBPF code must pass a verifier before running, ensuring it never crashes the Kernel.
- Impressive Performance: It processes data at the lowest level, reducing overhead to under 5% in most scenarios.
- Deep Visibility: It can track everything from file opening and network connections to suspicious module loading.
Tracee goes beyond just listing raw logs. It features a smart Signatures engine. This filter automatically alerts you when it detects signs of an attack, such as overwriting system files or attempting a container escape.
Real-world Configuration: Focus on What Matters
Running Tracee with default settings will drown you in “data noise.” To be effective, we need to filter for events that truly provide security value.
1. Targeted Container Monitoring
If you suspect a specific Web application is under attack, use the --scope flag to narrow it down:
# Only monitor events originating from the 'my_web_app' container
docker run --rm --privileged -v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro aquasec/tracee:latest \
--scope container=my_web_app
2. Enable Attack Detection (Security Policies)
This is Tracee’s most valuable feature. You can request alerts when someone executes insmod to load a strange module into the system kernel.
docker run --rm --privileged -v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro aquasec/tracee:latest \
--policy /tracee/policies/default.yaml
3. Export JSON Data for SIEM Systems
To integrate with ELK, Splunk, or Wazuh, switch the logs to JSON format. This makes automated data parsing much easier.
docker run --rm --privileged -v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro aquasec/tracee:latest \
--output json
Lessons from Real-world Deployment
After running Tracee on large-scale systems for a while, I have a few important notes for you:
Beware of ‘Full Logging’
eBPF is fast, but the data generated can fill up your hard drive extremely quickly. A busy server can produce GBs of logs per hour if you enable --event any. Focus only on sensitive events like execve, mem_prot_alert, or security_file_open.
Manage False Positives
Initially, Tracee might trigger false alarms. For example, your periodic backup script using tar might be flagged as suspicious bulk file reading. Spend the first week observing and whitelisting legitimate processes.
Deploying on Kubernetes
Don’t manually run individual containers on K8s. Use tracee-operator. It deploys as a DaemonSet and automatically attaches Pod and Namespace labels to logs, making incident tracing 10x faster.
Combine with Alerting Systems
Logs are only valuable if you read them in time. I usually use a simple Python script to filter JSON logs from Tracee. If a High or Critical event is detected, the script immediately sends a notification via Telegram or Slack.
Conclusion
Modern server security isn’t just about firewalls or Antivirus. Today’s attackers are sophisticated, forcing us to have deeper visibility tools. Tracee and eBPF are the perfect duo to help you master everything happening under the “hood” of your Linux system.
Try installing Tracee today to experience its power for yourself. Good luck building a robust system!

