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

Clean your infected memory sticks, ipods.. easily

20 posts · originally from https://geek.digit.in/community/threads/clean-your-infected-memory-sticks-ipods-easily.100173/

hariharakumar
hariharakumar Original post #1
Oct 20, 2008 at 1:16 AM
Guys if you have infected pen drives,memory sticks,ipods... boot into Ubuntu(Linux based OS) connect your infected pen drive and remove unwanted files like FOLDER.EXE, AUTORUN.INI, DRIVE.EXE,...... easily. If the permission is denied to delete such file, you can easily change the file permissions in Ubuntu and permanently delete them.

I have cleaned my pen drive in this same manner. With Ubuntu installed on my system now i can copy files like movies n softwares from my friend's infected system :D.
NucleusKore
Oct 20, 2008 at 7:22 AM
Easier still you can install clamwin antivirus in Ubuntu and scan your pendrive from commandline using

clamscan -v --remove /dev/sdx

where x is the drive letter of your pen drive. To find this out, after you plugin the pen drive, in command line type

fdisk -l

If you have one hard disk, the pen drive is usually /dev/sdb

Update: For those of you interested search and install clamtk in synaptic
hariharakumar
Oct 20, 2008 at 11:37 AM
Easier still you can install clamwin antivirus in Ubuntu and scan your pendrive from commandline using

clamscan -v --remove /dev/sdx

where x is the drive letter of your pen drive. To find this out, after you plugin the pen drive, in command line type

fdisk -l

If you have one hard disk, the pen drive is usually /dev/sdb

i think you dont need anitivirus unless you install wine in your Ubuntu os.
NucleusKore
Oct 20, 2008 at 1:45 PM
i think you dont need anitivirus unless you install wine in your Ubuntu os.

It's not for wine, it's for catching windows viruses in Linux mail servers. The install and operation I mentioned is without the real time scanning mode. It is useful to disinfect pendrives, external hard disks and networked windows drives shared through SAMBA. Avira too has a similar product.
Zangetsu
Oct 20, 2008 at 3:42 PM
Easier still you can install clamwin antivirus in Ubuntu and scan your pendrive from commandline using

clamscan -v --remove /dev/sdx

where x is the drive letter of your pen drive. To find this out, after you plugin the pen drive, in command line type

fdisk -l

If you have one hard disk, the pen drive is usually /dev/sdb

we can install clamwin in the pendrive itself..& execute it from there only 2 remove
any viruses..:D
NucleusKore
Oct 21, 2008 at 6:34 PM
wow ..... sounds nice ..... bt whot if v dont know the virus name\infected files ?

You don't have to, you just have to know the drive name

I have both clamwin and Avira in manual scan mode on my openSUSE. I use them to disinfect pendrives that I use in college.
MetalheadGautham
Oct 21, 2008 at 7:52 PM
You don't have to, you just have to know the drive name

I have both clamwin and Avira in manual scan mode on my openSUSE. I use them to disinfect pendrives that I use in college.
so clamwin is a linux antivirus to clean windows viruses ? :confused:
NucleusKore
Oct 21, 2008 at 8:02 PM
Yes, as I said above, it is meant for mailservers running on Linux. Same with Avira.

You have an on demand scanner with which you can integrate with your mail server, I haven't activated that component as my requirement is different.

You can download Avira from here

*www.mediafire.com/?jyzcz9m6tvy

md5sum:e333fe7abd990128316bf46c43c72222

The official mirrors are too slow

Install using the enclosed script as sudo

sudo ./install

When prompted for path to key just press ENTER.

Then in commandline

sudo antivir --update

to update the definitions

and then

antivir -s -e -del /dev/sdx

where x is the drive letter/number. It will scan recursively (s), clean (e) and delete unrepairable (-del) files

You may have to add yourself to the antivir group to use the above

sudo /usr/sbin/usermod -G dialout,video,vboxusers,users,antivir yourusername

Logout and then login again.
use command

antivir-gui

to open the gui. Configure the manual scan options from there is you like
vamsi360
Dec 12, 2008 at 5:35 PM
thankyou nucluesKore
I was actually doing what hariharikumar was doing until now
Gigacore
Gigacore #10
Dec 12, 2008 at 5:59 PM
I always use linux to remove virus on my removable storage devices :)
NucleusKore
Dec 12, 2008 at 9:16 PM
Modify this line

antivir -s -e -del /dev/sdx

as

antivir -s -z -del /dev/sdx

to scan archives
nix
nix #12
Dec 12, 2008 at 10:18 PM
hi guys...
am also facing the same problem... infected pen drives from the college. just cant get rid of them on windows(free AV).
do you suggest bootable linux or HDD based linux?
and pls suggest some easy to install linux...
JojoTheDragon
Dec 12, 2008 at 10:46 PM
What about portable antivirus? Has anyone tried it?

^try ubuntu 8 its the best in live dvd
nix
nix #14
Dec 14, 2008 at 2:16 AM
^i dont have a DVD drive dude...
C
Dec 20, 2008 at 5:40 PM
well i dont see why you are fussing only with linux, you can get rid of it with plain old DOS/cmd prompt, yes indeed it is difficult to clean form with in an infected system, but it is not possible,...

if your system is clean,

Code:
attrib -s -h -r autorun.ini
del autorun.ini

the virus should be some where hidden in your drive

Code:
attrib /s /d
you will see the attribute of all the hidden folders and file's, then delete it
NucleusKore
Dec 20, 2008 at 8:47 PM
Does Vista or XP have DOS?
So you'll have to make a DOS boot disk. Will that read ntfs partitions?
Even if you use a Windows shell, will it allow you to touch the system files?
C
Dec 21, 2008 at 4:12 PM
Does Vista or XP have DOS?
my bad i meant shell

Even if you use a Windows shell, will it allow you to touch the system files?

yes it will give you access to all files regardless, all so some programs/virus's use an ACL (Access Control Lists) hence anti-virus's cant access the locked folder, which in turn don't let the anti-virus scan the file/folder,in shell use the command
Code:
cacls

oh and another thing when your in my computer, dont open the the drive by double clicking, click open the "folder" button from the standard bar, once in explorer view then open your drive using it.
D
dr_smit #18
Feb 17, 2009 at 12:22 PM
How to delete files in USB stick when they are reoprted as READ ONLY
vamsi360
vamsi360 #19
Feb 17, 2009 at 1:02 PM
How to delete files in USB stick when they are reoprted as READ ONLY

change the option in the file attributes in properties dailog box.
NucleusKore
Feb 17, 2009 at 8:16 PM
or do a sudo rm