If USB flash drive contain any of malware/virus/worm inserted to linux host without being mount (auto mount disabled), does malware/virus/worm will infect host

  • Parade du Grotesque@lemmy.sdf.org
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Quick answer: no.

    Longer answer: if a USB key is inserted but not mounted (as you mentioned) the system does not interact with it in any way, except to log that something has been inserted, so there is no way Linux will be infected.

    Longer longer answer: if you insert a USB key, then mount it (for instance read only) the system will no interact or execute anything on the key unless you specifically start a program that is on the key. So it will not be infected either.

    Since most viruses and malware are for Windows, you can therefore mount a USB key and start an antivirus program to clean your malware without risking the integrity of your system.