LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 10-26-2009, 12:11 PM   #1
keithrennie
LQ Newbie
 
Registered: Sep 2007
Posts: 2
Thanked: 0
How to delete protected Windows executable files via Linux?


[Log in to get rid of this advertisement]
I use Ubuntu 9.04 exclusively on my own machines, but I have a couple of flash drives that got infected by some corrupt windows executable (*.exe) files, probably by somebody's trojan (they are Cruzer 4GB so came with installed fancy programs that I dont need but didnt remove and Windows keeps installing unwanted ini files and other trash every time I use them in somebody elses machine or in an internet cafe). I deleted quite a few files, but some are stubborn.
$ sudo chmod +w-X doesnt seem to work. How do I unprotect and remove them? The filesystem is vFAT.

I suspect the files were created by some kind of a trojan as my work requires my flash to be pretty promiscuous.
When I 've backed up all the good files I need, I'd be happy to reformat the flash drives as straight vanilla data storage and retrieval, provided I can still use them on a variety of machines running MS windows as well as on my Linux machines. Any guidance on reformatting?
linuxubuntu keithrennie is offline  
Tag This Post , ,
Reply With Quote
Old 10-26-2009, 01:14 PM   #2
TB0ne
Senior Member
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, Mandrake, RedHat, Gentoo, Slack
Posts: 4,074
Thanked: 143
Quote:
Originally Posted by keithrennie View Post
I use Ubuntu 9.04 exclusively on my own machines, but I have a couple of flash drives that got infected by some corrupt windows executable (*.exe) files, probably by somebody's trojan (they are Cruzer 4GB so came with installed fancy programs that I dont need but didnt remove and Windows keeps installing unwanted ini files and other trash every time I use them in somebody elses machine or in an internet cafe). I deleted quite a few files, but some are stubborn.
$ sudo chmod +w-X doesnt seem to work. How do I unprotect and remove them? The filesystem is vFAT.
Cruzer?? Not the U3 junk, is it? Because if so, the ONLY way to get rid of it is to use the U3 uninstaller, which you have to download from their website, which is Windows only. Otherwise, NOTHING will get rid of it.

If you mean other stuff than the U3 software, you could do a "sudo chmod -R 777 *" on that device, and see what you can delete then, but that may not work either. A reformat may be the best and quickest option.

Quote:
I suspect the files were created by some kind of a trojan as my work requires my flash to be pretty promiscuous.
When I 've backed up all the good files I need, I'd be happy to reformat the flash drives as straight vanilla data storage and retrieval, provided I can still use them on a variety of machines running MS windows as well as on my Linux machines. Any guidance on reformatting?
Should be easily done. The device is probably /dev/sd* (a guess would be /dev/sdb, since your HDD is probably /dev/sda, but check first). So, unmount the stick first, but leave it plugged in. Then, run "sudo fdisk /dev/sdb" (obviously, replace the sdb with your device name). Delete the partition(s) on it, and create a new one....the fdisk help is simple to follow. After that, you can do "sudo mkfs -t vfat /dev/sdb1". That should create you a 'portable' Windows/Linux stick, ready to go.
linuxsuse TB0ne is online now     Reply With Quote
Old 10-29-2009, 08:24 PM   #3
keithrennie
LQ Newbie
 
Registered: Sep 2007
Posts: 2
Thanked: 0

Original Poster
Smile

Thanks. It was U3 junk. I backed up and reformatted, and used the partition editor (gparted) instead of the command line. It seems to work pretty well.
linuxubuntu keithrennie is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can i delete windows files from linux in ntfs partition sting1220 Linux - Newbie 1 12-23-2007 01:08 AM
Copying Protected Files from Windows XP Salty9 Linux - Security 4 06-05-2007 06:52 PM
Can I delete Windows made files on Linux? Janistego427 Linux - Newbie 9 05-22-2006 12:44 AM
Cannot Delete files on Linux file share drive with Windows tendonut Linux - Networking 4 01-23-2006 12:43 PM
executable files in linux and windows... GEJOE DANIEL Programming 7 01-12-2006 02:59 PM


All times are GMT -5. The time now is 04:08 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration