How Can I Detect Ransomware Encrypting Linux File Systems?

April 23, 2025 5 answers
Asked by Tessera
I'm looking for ways to detect if my Linux file systems, especially large multi-terabyte ones, have been encrypted by ransomware or are currently being targeted. I know there should ideally be endpoint detection and response in place, but let's say that's not available. Tools like ClamAV or Lynis came to mindโ€”could they help with this? I want to check for signs of encryption either after an intrusion or while it might still be happening, and I still have admin access to these systems. This question is somewhat hypothetical, motivated by a recent false alarm concerning ransomware that affected non-Linux systems at work. Any insights on this would be greatly appreciated!

Answers

Fresh index card!
If you want a real-time solution, you might struggle without a budget. However, creating snapshots on your SAN for quick recovery can significantly minimize impacts from ransomware.

jigsaw edge piece: And definitely don't forget about maintaining full offsite backups!

Reply to this answer
HUMAN FACTORS
Wazuh, especially its File Integrity Manager, is a solid choice for detecting changes and alerting you if files are being encrypted. It can monitor file changes across your systems, so you might want to consider implementing that for your Linux servers.

Volunteer.Shift.Board: Yeah, Wazuh sounds like a great solution! I've also thought about using 'inotifywait' as a lightweight tool to keep an eye out for any major file changes.

Reply to this answer
dwell_ms420
Consider using Tripwire or Aide for file integrity monitoring. They'll help identify changes and alert youโ€”but understanding how they interact with the system is key to effectively utilizing them.

CranberryBog: What do you mean by that? How do they detect encrypted files other than noting that a file has been changed?

Reply to this answer
astronaut training~!
You might find it more effective to verify that critical files remain unchanged. Ransomware might encrypt files in a way that they don't distinguish themselves from random data. Focus on ensuring the integrity of files that should always be there and aren't supposed to change.
Reply to this answer
!secondhand furniture
A simple yet effective method is to place a tempting file in a common writable location on your system, for instance, an enticing Excel file with dummy data. Use auditctl to watch for any modifications to that file. If ransomware is active, it will likely alter or delete this fileโ€”this way, you get immediate alerts without extensive configurations or costs!

section.IV.note: I agree! The issue with traditional methods like hash checking is that regular system operations can trigger false alarms. Monitoring a specific file is a smart way to pinpoint unauthorized changes.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions