3

Imagine user downloads and burns installation USB stick on their compromised Linux system. Are there any known malware that is capable of spreading via Linux distributions installation media so that after reinstallation system is still compromised through installation media? Or it is hard to automate and rather subject of targeted attack?

1

This question, like many others, falls under the category "yes, it is possible, but not widely seen in practice".

Is there known malware that spreads via Linux distribution installation media?

I didn't find anything exactly like this after performing a quick Google search. So it seems like not much is out there.

Or it is hard to automate and rather subject of targeted attack?

Not really. I have some scripts lying around that make changes to the distribution's installer image, given an ISO file. Once you know how to correctly unpack and pack different installers from their ISOs, it's not too hard to automate whatever changes you want to make. It also wouldn't be too hard to periodically scan for ISO files and infect them when found.

1

I am not aware of anything that would compromise a installation media while the user is writing it. It's possible to do something like that, but it would be a very focused attack.

An attacker would need to know the installation file and the burning software. There are a lot of ways to create a installation USB media (dd, unetbootin, USB Image Writer, for example), so the attacker would need to monitor all of them, intercept the read or write, and compromise the request.

Possible, but it's easier to change the DNS and direct the user to a rogue download site.

  • 1
    Why can't it just detect media containing boot records and try to put malware there? Is it too much there to keep this kind of attack generic to certain degree? – tegoo Nov 28 '18 at 18:54
  • It's complicated. If you have root access on a Linux system, compromising the DNS servers is way easier and faster than to monitor every read and write operation. – ThoriumBR Nov 28 '18 at 19:11
  • You wouldn't need root access. The malware would just check mounted drives for a folder structure resembling install media for a popular distro (Ubuntu) and attempt to replace some of the binaries on that drive (sudo, or another executable which runs as root), then any system installed via that media would be compromised. – Daisetsu Nov 28 '18 at 20:03
  • To create a USB install media, you need root. You don't fdisk as normal user. Nor you dd of=/dev/sdb as well. – ThoriumBR Nov 28 '18 at 23:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.