Restore all Windows files quarantined using Debian clamtk

If it doesn't relate to Debian, but you still want to share it, please do it here

Restore all Windows files quarantined using Debian clamtk

Postby kedaha » 2019-06-12 17:39

I am not proud of this story because, as a dedicated free software guy I'm not at all comfortable about restoring anyone's broken proprietary system. Anyway, here goes: I don't know if this will be of interest to anyone who used clamtk and dual boots Debian and some version of Windows but I recently agreed to try and fix a non-functioning Windows 7 system on a Toshiba laptop, which has long dual-booted the Microsoft OS and Debian 8. I would've gladly installed Debian to the whole disk but its owner needs some Windows program for work which isn't available in Debian. While Debian's always worked like the first day, the stuff on the Windows side got worse and worse. It was obvious that, even though the system still booted, it was riddled with malware so I thought I'd have a go at removing them from the Debian partition with ClamTk, described as "a graphical front-end for Clam Antivirus. It is designed to be an easy-to-use, lightweight, on-demand antivirus scanner for Linux systems." Easy-to-use? Well, not exactly in this case.

After hours of scanning the partition it informed that there were "498 threats" so I started to eliminate them. I deleted several but then I thought better of it and continued to laboriously "quarantine" them, one-by-one, so as to be able to restore, if necessary, the files.
I at least took the precaution of copying all the owner's files before doing the above. I must admit I didn't have a clue what files I was deleting because I know very little about Windows, something I suspect I have in common with most Windows users.
Windows did not boot and entering the recovery modes just led to endless waiting --which went on for hours--for something to happen.

Solutions?
I tried getting a downloaded replacement from the Windows site but, because it was a pre-installed OEM version, it was not available so you had to contact the manufacturer.
I concluded that my best bet was to try and restore all the quarantined files and then simply use the option to reinstall the entire system with the factory defaults from the recovery partition. So I started to copy some of the files back which I quickly decided was too time-consuming. And what if some of the files I'd unthinkingly eliminated were essential? Well, I started searching for a way to restore all the files and came across this HOWTO from March 2014: /clamtk/+question/245615. I modified the bash script as required for the user, executed it and in seconds the Windows system was back to its previous state barring the few files I had removed.
After that, I kept my finger crossed, rebooted and it worked except the system whined about a few missing "dll files" but I was able to enter the Windows recovery utility which reinstalled the whole system lock, stock and barrel. Problem solved. Something I might mention is that reinstalling Windows did not affect the Debian partition or grub menu, which I had expected.

On the reinstalled system I installed a gpl'd antivirus program called clamwin to give some protection as a substitute for the pre-installed out-of-date program which required payment for updates.
On reflection and mindful of the saying that "the cobbler should stick to his last" I think I'll steer clear of such tasks in the future but it's not so easy sometimes to refuse help to close friends or relatives.

Thank you for reading.
Mate DE & OSSv4.
FreedomBox in Debian
ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 3017
Joined: 2008-05-24 12:26

Re: Restore all Windows files quarantined using Debian clamt

Postby sunrat » 2019-06-12 23:53

Shakespeare would be proud. Such a moving tale of tragedy and woe with splashes of comic relief. No-one died though. :mrgreen:
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2885
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Restore all Windows files quarantined using Debian clamt

Postby Dai_trying » 2019-06-13 07:23

sunrat wrote:No-one died though. :mrgreen:


I think the deleted files might disagree :lol:
Dai_trying
 
Posts: 800
Joined: 2016-01-07 12:25

Re: Restore all Windows files quarantined using Debian clamt

Postby n_hologram » 2019-06-13 11:26

I got so frustrated with fixing Windows systems that I drafted a linux spin designed to help in cases like these. Your pain is shared.

Highlights:
kedaha wrote:...I know very little about Windows, something I suspect I have in common with most Windows users.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing

the crunkbong project: scripts, operating system, the list goes on...
n_hologram
 
Posts: 453
Joined: 2013-06-16 00:10

Re: Restore all Windows files quarantined using Debian clamt

Postby kedaha » 2019-06-15 17:57

Thanks for the comments.
While I don't know much about Windows—and I really don't want to—the lack of knowledge in this instance was compensated by my command line fu otherwise I would've been unable to restore the system and, fortunately I realised before it was too late not to eliminate any more essential files which clamtk had identified as threats.
I suppose that most cases like this are solved by Windows experts by following a similar, tedious procedure, namely just backing up the user's personal files and then reinstalling the system. I remember being in a computer shop some time ago and a customer, who had brought in a malfunctioning laptop due to viruses, was quoted quite a high price for fixing it. I've heard of people who have to get their system fixed several times. I suppose if they don't buy an AV program with paid updates they'll end up paying one way or another.
But the task isn't my cup of tea.
Mate DE & OSSv4.
FreedomBox in Debian
ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 3017
Joined: 2008-05-24 12:26

Re: Restore all Windows files quarantined using Debian clamt

Postby vbrummond » 2019-06-15 22:57

Best thing to do instead would have been to back up personal files, scan those, and nuke windows from orbit with a reinstall from a windows repair disk. A windows 10 disk can be downloaded legally from Microsoft for free.
Always on Debian Testing
vbrummond
 
Posts: 4468
Joined: 2010-03-02 01:42


Return to Offtopic

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable
cron