DIGIT-ARC read-only archive · snapshot: July 23, 2026

A query about a virus in a flash drive.

22 posts · originally from https://geek.digit.in/community/threads/a-query-about-a-virus-in-a-flash-drive.81920/

krazzy
krazzy Original post #1
Mar 5, 2008 at 10:21 PM
I have a flash drive which is infected with a virus after giving it to a friend to get some files from his pc (which is infected). I want to know that whether just connecting the drive to pc will infect my pc as well. What if I connect it to pc, select Take No Action when Autorun starts and then go to My Computer and format the drive. Will this infect my pc and will this remove the virus from the drive? (Please don't suggest to use Anti Virus.)
Pathik
Pathik #2
Mar 5, 2008 at 10:31 PM
Depends on the virus.. But most andu_pandu viruses ll execute only once you open the drive.. Format it immediately after inserting.
NucleusKore
Mar 5, 2008 at 10:33 PM
I want to know that whether just connecting the drive to pc will infect my pc as well.

[size=+5]Yes[/size]

What if I connect it to pc, select Take No Action when Autorun starts and then go to My Computer and format the drive.

[size=+5]You will still get infected[/size]


Will this infect my pc and will this remove the virus from the drive? (Please don't suggest to use Anti Virus.)

[size=+5]Yes[/size] it will infect your PC first, and then formatting will remove the virus from the pen drive, only to be possibly reinfected again when the formatting is over.

Solution: Boot with a linux live cd, plug in the pen drive and delete all files except the files you want. Virus files are sometimes seen as extra files in linux which you can't see in Windows. Remember to check in folders too.
krazzy
krazzy #4
Mar 5, 2008 at 11:22 PM
Thank you NucleusKore and Pathik. I don't have enough RAM to run a linux live cd. I think i'll use my PS2 to delete the files. That'll be a bit of work though since PS2 doesn't read flash drives directly and needs to boot into a special software to do so, which has to be burned onto a cd and then loaded on the PS2.
ayush_chh
Mar 6, 2008 at 2:49 PM
you can also follow this method, works for me.

1) connect the flash drive to your PC
2) wait till its ready for use.
3) DO NOT open or explore the drive or My Computer
4) open 'command prompt' and type this

X:\> attrib -h -s -a -r autorun.inf
X:\> del autorun.inf

5) now you may explore the drive and del the other related files.


:)
ajayritik
Mar 6, 2008 at 5:42 PM
Solution: Boot with a linux live cd, plug in the pen drive and delete all files except the files you want. Virus files are sometimes seen as extra files in linux which you can't see in Windows. Remember to check in folders too.

I tried to search for the hidden files using Kubuntu as well as Knoppixx Live CD. But i don't know how to access the files on my HDD using Linux. What is the application that I need to use?
NucleusKore
Mar 6, 2008 at 7:13 PM
I tried to search for the hidden files using Kubuntu as well as Knoppixx Live CD. But i don't know how to access the files on my HDD using Linux. What is the application that I need to use?

Knoppix should mount all your partitions as read/write by default and show icons on the desktop. If there are no icons on the desktop search in the /mnt folder for icons like sda1, sda2, or hda1, hda2. I do not have much experience with performing the above task with Ubuntu live.
gaurav_indian
Mar 6, 2008 at 7:42 PM
[size=+5]Yes[/size]



[size=+5]You will still get infected[/size]




[size=+5]Yes[/size] it will infect your PC first, and then formatting will remove the virus from the pen drive, only to be possibly reinfected again when the formatting is over.

Solution: Boot with a linux live cd, plug in the pen drive and delete all files except the files you want. Virus files are sometimes seen as extra files in linux which you can't see in Windows. Remember to check in folders too.

araam se.Hamari ankhen theek hai bhai.


My friend also had a virus in his pen drive.And his pc was infected every time he inserted his pen drive.So it depends on the virus.His pc was acting strangely.
krazzy
krazzy #10
Mar 7, 2008 at 12:18 PM
I have 256mb RAM. The Ubuntu cd I have says I need around 384mb of free RAM so I thought that is the case with all live CDs.

But still even If I use Linux live CD, won't the virus still transfer in my HDD (as per your answer to my first question)? It won't create any problem in Linux but might when I switch back to Windows.
P
Mar 7, 2008 at 2:05 PM
press SHIFT key while inserting the pen drive. this will prevent anything written in autorun.inf file on the pen drive to execute. any virus in a pen drive needs to be executed manually or by the autorun.inf file. so if u dont allow the autorun.inf file to execute the virus u r pc is safe.

now open my computer --> right click on the pen drive --> format.

simple. it will not infect u r pc. u r pen drive is clean.
krazzy
krazzy #12
Mar 7, 2008 at 3:04 PM
press SHIFT key while inserting the pen drive. this will prevent anything written in autorun.inf file on the pen drive to execute. any virus in a pen drive needs to be executed manually or by the autorun.inf file. so if u dont allow the autorun.inf file to execute the virus u r pc is safe.

now open my computer --> right click on the pen drive --> format.

simple. it will not infect u r pc. u r pen drive is clean.
Thanks for the tip. Should I just press Shift once or do I have to press and hold it?
ray|raven
ray|raven #13
Mar 7, 2008 at 3:06 PM
I have 256mb RAM. The Ubuntu cd I have says I need around 384mb of free RAM so I thought that is the case with all live CDs.

But still even If I use Linux live CD, won't the virus still transfer in my HDD (as per your answer to my first question)? It won't create any problem in Linux but might when I switch back to Windows.

No.Linux cant execute windows executables.
So the virus wont be copied to the hard disk,
You can manually delete it off the usb.
krazzy
krazzy #14
Mar 7, 2008 at 3:33 PM
^^ OK Thanks a lot.
ajayritik
ajayritik #15
Mar 7, 2008 at 4:09 PM
Knoppix should mount all your partitions as read/write by default and show icons on the desktop. If there are no icons on the desktop search in the /mnt folder for icons like sda1, sda2, or hda1, hda2. I do not have much experience with performing the above task with Ubuntu live.

I have already tried the steps that you have suggested. I was checking if in Linux we have any application similiar to windows Explorer so that we can browse through the folders/directories easily. Anyways I will recheck the steps that you have mentioned.
narangz
narangz #18
Mar 7, 2008 at 9:27 PM
You can disable autorun if you want permanently.
NucleusKore
Mar 7, 2008 at 10:18 PM
I have already tried the steps that you have suggested. I was checking if in Linux we have any application similiar to windows Explorer so that we can browse through the folders/directories easily. Anyways I will recheck the steps that you have mentioned.

In Knoppix and NimbleX you have Konqueror
krazzy
krazzy #20
Mar 7, 2008 at 10:35 PM
How to permanently disable autorun? I don't use that feature much anyways.
narangz
narangz #21
Mar 7, 2008 at 10:48 PM
*antivirus.about.com/od/securitytips/ht/autorun.htm

Hope it helps :)