Main Area and Open Discussion > General Software Discussion
Need help cleaning virus inside HTML files
rsatrioadi:
Hello folks, long time no see.
tl;dr: some virus infected many (I hope not all...yet) HTML files inside my hard drive. It embedded nasty vbscript at the end of each file (after </html> tag). My antivirus detected but cannot repair them. What next?
Longer story:
After years of not using Windows, I got my hand on a Windows machine. Silly me didn't install antivirus at the first chance, so circa day 2 I got it infected with viruses from an infected flash drive. I installed Avast and ran a scan. Most .exe and .dll files were repaired but many HTML files are left unfixed (see tl;dr above). Here's a screenshot of the vbscript inside a file:
The <SCRIPT..> parts are the same in each infected HTML files, but the "gibberish" HTML comment after the closing </SCRIPT> differs from file to file. I don't know if this comment part does any harm, though.
So, any suggestions on how to clean them? If there's no ready-made solution maybe somebody can write me a script that reads all HTML files inside a directory and remove any vbscripts inside it? Pretty please? ;)
Thanks beforehand for any help.
Curt:
This guy said it would be both faster and safer, to do it manually:
http://cleanbytes.net/vbscript-shortcuts-virus-removal
However, you may want to try if USB-Fix can help you out:
http://www.en.usbfix.net/2014/03/remove-shortcut-virus-usb/
But other than that, I have no knowledge about these matters.
I wish you good luck!
mouser:
I'm assuming these html documents are your own creation, and you don't have good backups?
If they are system files, just wipe the entire computer clean and start over.
MilesAhead:
rsatrioadi can correct me if I'm wrong. But I have the feeling these are for offline browsing? Otherwise as Mouser says, why not just reset the machine to factory square one?
4wd:
Correct me if I'm wrong but if it's added after the </HTML> tag then you only need to read through the files to that point writing each line to a temporary file, then replacing the original at the end.
I could probably do this in a batch file, having it recurse through the whole drive, you'd hit problems if there were any restricted permissions but it seems simple enough. Might have a look later for the intellectual exercise :)
Navigation
[0] Message Index
[#] Next page
Go to full version