Comment on GitLab discovers widespread npm supply chain attack
tal@lemmy.today 1 month ago
The malware continuously monitors its access to GitHub (for exfiltration) and npm (for propagation). If an infected system loses access to both channels simultaneously, it triggers immediate data destruction on the compromised machine. On Windows, it attempts to delete all user files and overwrite disk sectors. On Unix systems, it uses shred to overwrite files before deletion, making recovery nearly impossible.
shred is intended to overwrite the actual on-disk contents by overwriting data in the file prior to unlinking the files. However, shred isn’t as effective on journalled filesystems, because writing in this fashion doesn’t overwrite the contents on-disk like this. Normally, ext3, ext4, and btrfs are journalled. Most people are not running ext2, save maybe on their /boot partition.
Antihero5438@infosec.pub 4 weeks ago
I don’t think journaled file systems fare any better. You’re probably thinking COW (copy on write) systems like zfs and btrfs, but I don’t see how journaling helps with overwrite recovery at all.
tal@lemmy.today 4 weeks ago
It looks like I was wrong about it being the default journaling mode for ext3; the default is apparently to journal only metadata. However, if you’re journaling data, it gets pushed out to the disk in a new location rather than on top of where the previous data existed.
linux.die.net/man/1/shred