Is it possible to get viruses through data devices?

Red Squirrel

[H]F Junkie
Joined
Nov 29, 2009
Messages
9,223
I did not know how to title this, but basically what I'm asking is, say I use a USB stick on a virus infected PC to dump files from the PC to the stick is it possible to "capture" a virus on the USB stick, then when I plug it into another computer, that virus gets executed?

I really can't see how, and I've always gone under the assumption that, no, it's not possible. If anything a virus or virus infected file may get copied to the stick or files on it may get corrupt, but when I put it in another PC, those files are just there, they wont just run on their own. Also if a word document has a macro virus or other type on it, a good AV should pick that up anyway right when I copy their data back to the cleaned PC?

I guess the only way is if a virus is smart enough to put an autorun.inf file, but I've never even seen an autorun work on a USB device, only on a CD.

Seems kind of basic and silly questions, but best to not just keep assuming, if I happen to be wrong. I know back in the day boot sector viruses were popular, so guess I could see that being a possibility, but I would have to boot off the USB stick for it to even execute the code.
 
yes, because usb sticks can have autorun files or device drivers that load when they are plugged in. I think some of those exploits have been patched but you should always have an antivirus running. Note: google Autorun.inf usb for details on how to set this up.
 
As i understand, he is afraid of infecting himself by using a USB stick on another PC that is infected, and then when inserting in his own pc it would 'transfer' like a real disease.

This is possible, but limited: the virus-infected PC can infect the USB stick and putting malicious code in there. But it depends on your PC whether those get executed. Windows 7 asks before launching the autorun.exe on a virus-infected stick. If you choose no there, you won't be infected.
 
As i understand, he is afraid of infecting himself by using a USB stick on another PC that is infected, and then when inserting in his own pc it would 'transfer' like a real disease.

This is possible, but limited: the virus-infected PC can infect the USB stick and putting malicious code in there. But it depends on your PC whether those get executed. Windows 7 asks before launching the autorun.exe on a virus-infected stick. If you choose no there, you won't be infected.

Cool that's what I thought, just figured it's worth getting some discussion going in case there are ways I'm overlooking.

I never thought of the drivers thing, though arn't those built into Windows? Like when you insert a stick for the first time, it will dig up drivers to mount it, those drivers come from the disk and not the usb stick right, since if it needs drivers then it can't read the stick then...

autorun.inf does not seem to work on USB sticks, if I recall it has to be enabled in the registry but it's off by default.
 
A true virus inserts its own code into another executable, just as a biological virus inserts itself into a cell. If there are any executable files on your USB drive, an infected computer running virus code could most definitely insert its code into your file. Note that you'd need to then run that infected file on your PC to run the virus code and further infect your system.

Typical malware isn't a true virus, and would most likely infect you via the mentioned autorun.inf methods.

Keep in mind that infected files can be accessed in the background even if you don't specifically double-click on a file. Windows shouldn't go around randomly running files, but it is possible for malicious code to get run unintentionally, especially when you factor in the standard bugs in any software.
 
When you plug the usb stick in you can run your antivirus on it to see if it is infected.
 
I was looking into this a while back, and found out that apparently

* Windows 7

For all drive types, except DRIVE_CDROM, the only keys available in the [autorun] section are label and icon. Any other keys in this section will be ignored. Thus only CD and DVD media types can specify an AutoRun task or affect double-click and right-click behaviour.[4][3]

There is a patch available, KB971029 for Windows XP and later, that will change AutoRun functionality to this behaviour
 
I have seen a few different viruses that created an autorun.inf which is then hidden

if you remove any of the hidden files they will automatically be reinstalled unless you remove the virus from your PC first
 
...Windows 7 asks before launching the autorun.exe...
There are tons of work-arounds for this now. Fortunately, you still don't really have to worry about this. Most authors don't bother to write code in that spreads the virus through portable media even though it's stupid-easy to do...
 
Back
Top