Detecting ransomware with eBPF in Rust
Detecting ransomware with eBPF in Rust Title: Detecting ransomware with eBPF in Rust Target: ~1000 words, B1-safe English, working-code-first Build: demo + article for DEV.to / Draft.dev share Source repo: github.com/BartoszOsiej/talus-process-monitor (MIT) 1. The idea (hook) Ransomware works in a simple way: it opens your files, encrypts them, and writes them back. Fast. One process can open…
The concept behind this ransomware detection method is simple: ransomware typically opens a large number of files very quickly. To detect this, the article demonstrates an eBPF program written in Rust that hooks two specific syscalls - execve and openat. These syscalls are responsible for starting a process and opening a file respectively.
The program counts how many files each process opens per second and if this rate exceeds a certain threshold, it terminates the process. This is achieved using the open-source project talus-process-monitor, which is available on GitHub under the MIT license.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.