1. Why ransomware is hard to stop with file-level tools
Ransomware usually enters through a stolen credential, an exposed service or a user action, and then runs quietly for a while before it encrypts anything. Once encryption starts, the damage is fast: files are rewritten in bulk, and any backup reachable from the infected host may be encrypted too. Signature-based antivirus can miss new variants, and logs written after the fact show what happened, not what is happening now.
For Linux servers and containers, the most useful signals sit close to the kernel. These include which process opens which files, which process starts which child process, and which process changes many files in a short time. Capturing those signals at the operating system level gives a view that is harder for an attacker to switch off from user space. No single layer is complete, however, so kernel telemetry should complement backups, identity controls and network segmentation rather than replace them.
2. How eBPF observes and reacts to activity
eBPF is a mechanism in the Linux kernel that lets small programs run when selected events happen, such as system calls, file operations or network events. The kernel checks each program before loading it and runs it in a restricted environment, which is why the overhead can stay low. Security tools use these hooks to build process trees, count file modifications and detect patterns such as a single process rewriting a large number of files at high speed.
Detection without response is only a dashboard. A containment policy can alert, deny an operation or stop the process tree after a clear rule matches. The decision logic matters a great deal. An automated stop applied to a backup agent that legitimately rewrites many files creates an outage of its own. Start with alerting, measure the false positives, and enable blocking only for narrow behaviors that the team understands well.
3. Comparing detection and recovery approaches
Each approach covers a different part of the problem, so the question is how they fit together. Signature antivirus is still useful for known threats but offers little against new tooling. Kernel telemetry with an endpoint detection and response (EDR) console gives fast visibility into behavior, provided that the rules are tuned and someone reviews the alerts. Network monitoring sees traffic patterns but is blind to encryption that happens locally. Backups are the last line of defense and only work if they are isolated.
The table summarizes the trade-offs. In practice, most organizations need a combination: behavioral detection on critical hosts, backups that the attacked host cannot modify, and a playbook that connects the two. Ask whether each tool can act on its own, or whether it only produces information for a person to act on later. Record the answer in the playbook for each one.
| Approach | What it sees | Response speed | Main limitation |
|---|---|---|---|
| Signature antivirus | Known file patterns | After a match | Misses new or modified tools |
| Kernel telemetry with eBPF and an EDR console | Process, file and network events in near real time | Fast, if rules are tuned | Needs tuning and skilled review |
| Network-only monitoring | Traffic patterns and known destinations | Varies | Blind to local encryption |
| Backup-based recovery only | Nothing during the attack | Slow, after the damage is done | Restores after loss rather than preventing it |
4. Common mistakes in containment projects
Teams often deploy a sensor and assume that the environment is protected. Without a defined owner, a response playbook and a tested escalation path, alerts sit unread overnight. Assign who may isolate a host, who may approve blocking rules and how these decisions are handled outside office hours. A protection that nobody is responsible for is not a protection. Review the owners each quarter.
Another mistake is writing rules from a single incident. Rules that match one tool's behavior break when software is updated, and rules that are too broad block legitimate maintenance jobs. Test each rule against normal activity from backups, updates and database maintenance before enabling enforcement. Keep a record of every rule change, because an unexplained block during an outage is hard to diagnose later.
5. Checklist for a containment rollout
A containment rollout should move in small, observable steps. The checklist below sequences the work so that the team learns the normal behavior of its systems before any automatic action is enabled. Each item should have an owner and a date, and the results should be reviewed by the people who run the affected services, not only by the security team.
Treat the first weeks as a learning period. The goal is an accurate baseline of normal activity, a short list of high-confidence detections and a playbook that people have actually rehearsed. Only then should automated responses be turned on, and then only for the behaviors that the baseline shows to be clearly abnormal. Document each decision so that the rules can be reviewed later.
- Inventory Linux hosts and containers, and identify those that hold critical data.
- Confirm the kernel version and the support status of the chosen telemetry tooling.
- Define the events to monitor: process creation, bulk file changes, unusual execution paths and outbound connections.
- Build a baseline of normal behavior for backups, updates and batch jobs.
- Start in alert-only mode and review every detection during that period.
- Write a playbook that states who isolates a host, how evidence is preserved and how systems are restored.
- Keep offline or immutable backups that the attacked host cannot modify.
6. What to ask a supplier or internal team
Ask which kernel versions and Linux distributions are supported, and what happens during kernel upgrades. Ask how the overhead is measured on your own workloads rather than on a laboratory benchmark. Ask whether containment actions can be reversed quickly and how false positives are handled. A vendor that cannot explain its failure modes is not ready for production containment. Ask for references from similar environments.
Ask where telemetry is stored, how long it is kept and who can access it. Telemetry can contain file names, user names and other personal data, so its retention and access must be justified under GDPR. Ask how support staff access your environment, since that remote access path is itself a security control that deserves the same scrutiny as the detection tool.
7. How to start with one server group
Choose a group that holds your most valuable data and that is reachable from the internet or from user workstations. Deploy the telemetry in alert-only mode and collect a baseline over a sensible period. Compare the alerts with what the team knows about planned jobs, so that the first rules reflect your real environment rather than a generic template. Keep those first rules short.
Then write a single containment rule for the most dangerous behavior, such as a non-backup process rewriting a large number of files, and test it in a controlled exercise. The first concrete step is to confirm that you can restore a critical dataset from a backup that the production hosts cannot modify. Containment only works if recovery is also possible. For incidents that involve personal data, GDPR expects notification to the supervisory authority within 72 hours where feasible, and entities in scope of NIS2 face short early-warning deadlines. Confirm with counsel which rules apply to you.
Frequently Asked Questions
Does eBPF replace antivirus or a full EDR product?
Not by itself. eBPF gives low-level visibility and fast hooks into the kernel. A complete product also needs a console, case management, threat intelligence and response workflows. Many organizations combine kernel telemetry with an existing endpoint tool and a process that someone runs every day.
Can an automated tool stop ransomware without false positives?
Not reliably in every environment. Automated blocking works best for narrow, well-understood behaviors. Broad rules can stop backups or maintenance jobs. Begin in alert mode, measure the results, and then enable enforcement one rule at a time, with a documented way to release a blocked process.
Does this approach also cover Windows servers?
The mechanism described here is specific to the Linux kernel. Windows environments use their own telemetry interfaces. The principles still apply, including process lineage, detection of bulk file changes and fast isolation. Ask the supplier which platforms are covered by the same playbook and by the same retention rules.
What should happen first if we see encryption in progress?
Isolate the affected host from the network, preserve volatile evidence if your playbook requires it, and stop the spread to shared storage. Avoid restarting machines before you understand what is running, because a restart can destroy evidence and sometimes trigger further damage. Then engage your incident response resource.
Do we have to report an incident?
It depends on the impact and on the rules that apply to you. If the incident affects personal data, GDPR expects notification to the supervisory authority within 72 hours where feasible. Organizations in scope of NIS2 have short early-warning deadlines. Check with your advisor which obligations apply before the incident, not during it.