Saturday, October 19, 2013

Files on flash drive changed to shortcut

Hi All,

Recently I had to deal with some type of virus, computer virus J. Usually I don’t have such problems, cause I am IT professional, but my parents do. J The problem with this virus took so much time (all my saturday evening) that I decided to write about these hours of fight, maybe this info saves someone’s time using my experience. 
My father called and said, that he could not open some critical Excel file on USB flash drive. I found some information on this site.

It wasn't problem with flash itself, but it seemed to me that it was a virus.
I had made the following steps:

FIRST STEP

If you did not format your flash drive, then check whether the files are in hidden mode. Then follow these steps:
·         Click on the link below and download the file "AutorunExterminator":
·         Extract it: Double-click on "AutorunExterminator"
·         Plug your pendrive now
·         This will remove the autorun.inf files from your pendrive and also from the drives
·         Click on Start > Run, type cmd and click OK
·         Here it is assumed your pendrive letter is G (change as necessary)
·         Enter this command.
·         attrib -h -r -s /s /d g:\*.*     
·         Press Enter
·         Now check for your files in on the pen drive
·         Now download the Malwarebytes' Anti-Malware from this link:http://en.kioskea.net/download/download-105-malwarebytes-anti-malware
·         Update it and perform a "Full Scan"
·         Note : The default selected option is "Quick Scan"

Here is some nice video: 

It helped me to clean virus from usb, but not to open the file with name  „Рарх>ды.xls”. It seemed that the virus somehow changed the file name with illegal character „>”

When I cliked on file I got a following message:

I used a different approaches, but could not rename the file name. After hours of searching internet, I found out info that files contain short names and can be read by using cmd command DIR /X
Here is this information with a link.

In Windows Command Shell with Short Filenames
The DOS command DIR/X shows short filenames, if they exist on your system.
$ cmd
c:\test> dir /x
 Volume in drive E is NUVOL
 Volume Serial Number is 80D3-A96D

 Directory of e:\tor\test

10/04/2009  05:15 AM    <DIR>                       .
10/04/2009  05:15 AM    <DIR>                       ..
10/04/2009  05:11 AM                 0 CLIP-2~1.MOV clip-2009-10-01 21;26;00.mov
               1 File(s)              0 bytes
               2 Dir(s)   5,201,670,144 bytes free
If they do exist, the REN command will move them to a new name; the new name can be a new (valid) long filename.
c:\test> ren CLIP-2~1.MOV "clip-2009-10-01_21-26-00.mov"
That's how to fix one.
To batch process all of them, you need to 1) grab the short filenames of all the files you want to move; 2) convert your listing into a batch file with the appropriate REN commands; and 3) run the resulting batch script. If you are comfortable with perl (or sed/awk, python, whatever), you can script this yourself, or you can craft it by hand from the listing you made in step 1.
But if DIR/X doesn't show the short filenames, your system has them disabled, and this solution won't help.


SECOND STEP
So I went to USB drive to the directory (using command prompt) to the file location, ran commnad DIR /X to get short filename.
My file short name was „DBF1~1.XLS„ 
H:\data>dir /x
 Volume in drive H has no label.
 Volume Serial Number is 105C-D911
 Directory of H:\data
2013.04.29.  08:07    <DIR>                       .
2013.04.29.  08:07    <DIR>                       ..
2013.10.14.  21:40           186 368 DBF1~1.XLS   Рарх>ды.xls

Then I ran the command H:\data>ren DBF1~1.XLS test.xls

FINAL STEP

And I can open the file.
My father was happy J
Good luck


No comments:

Post a Comment