Can a Linux system be hit by ransomware? I use LUKS disk encryption and wonder whether that protects my files or if I need to take other precautions.
Can Linux get ransomware, and would LUKS help?
Answers
Yes, Linux can be hit by ransomware. LUKS protects data on the encrypted disk when it is locked, such as when a powered-off computer is stolen. Once you unlock it and use the system, your applications can access the files normally.
Malware running as your user can potentially encrypt or delete files that user can write to, even without administrator privileges. That can include mounted external drives and network shares.
Reply to this answer
Keep backups that ransomware can't simply overwrite. An offline copy or an immutable backup is useful here, and it's worth testing that you can actually restore files from it. A backup drive left mounted and writable all the time may be affected too.
Reply to this answer
For a personal machine, be picky about what you install and run. Use your distribution's trusted software repositories where practical, keep the system and applications updated, and understand commands before pasting them into a terminal. Sandboxing can limit what an application can access, though it isn't a guarantee against every vulnerability.
Reply to this answer
Servers need attention too. An exposed, unpatched application can give an attacker a way in, and a broader breach can spread to other systems. Keep server software patched, limit access where possible, and protect backups separately from the systems they cover.
Reply to this answer
Don't overlook the browser side. Phishing and deceptive download or repair instructions can lead people into running malicious software or giving up account access. A content blocker can help reduce exposure, but it won't make every page or download safe.
Reply to this answer
Add your answer
Answers are reviewed before publication.
~8Trelvani!:
So LUKS is still useful for a stolen laptop, but it doesn't stop a malicious program from changing my files while I'm logged in?
2s+grommetbanjo_635:
Right. It protects against a different threat, so you still want it alongside backups and sensible software practices.