Using command prompt "attrib" to check for Viruses or Malware
Microsoft Command Prompt "attrib" is a very useful tool to check if
your hard drives even your flashdisks have been infected by a virus.
You will know if a Malware is inside your hard drive just by looking at the attributes of each files and the file that has the attributes of +s +h +r
You will know if a Malware is inside your hard drive just by looking at the attributes of each files and the file that has the attributes of +s +h +r
The function of attrib is to set and remove file attributes (read-only, archive, system and hidden).
Launch attrib
To start attrib
- Go to Start Menu > Run
- Type cmd (cmd stands for command prompt)
- Press Enter key
Using attrib
To use attrib
- Go to the root directory first by typing cd\(because this is always the target of Malware / Virus)
2. Type attrib and press Enter key
In this example, I have two files that are considered as malware.
Note that there are two files which I outlined in red (SilentSoftech.exe and autorun.inf). Since you cannot see this file nor delete it (because the attributes that was set on these files are +s +h +r)
Note that there are two files which I outlined in red (SilentSoftech.exe and autorun.inf). Since you cannot see this file nor delete it (because the attributes that was set on these files are +s +h +r)
- +s - meaning it is a system file (which also means that you cannot delete it just by using the delete command)
- +h - means it is hidden (so you cannot delete it)
- +r - means it is a read only file ( which also means that you cannot delete it just by using the delete command)
- Type attrib -s -h -r autorun.inf ( be sure to include -s -h -r because you cannot change the attributes using only -s or -h or -r alone)
- Type attrib again to check if your changes have been commited
- If the autorun.inf file has no more attributes, you can now delete it by typing del autorun.inf
- Since SilentSoftech.exe is a malware you can remove its attributes by doing step 1 and step 3(just change the filename) ex. attrib -s -h -r silentsoftech.exe
NOTE : when autorun.inf keeps coming back even if you already deleted it, be sure to check your Task Manager by pressing CTRL + ALT + DELETE ( a virus is still running as a process thats why you cannot delete it. KILL the process first by selecting it and clicking End Process.
NOTE: You can also apply the attrib -s -h -r command to all the partition of your computer, drive D: drive E: drive F: (all of your drives). For example. for drive D, just type "D:" (minus the double quote) then you can see that your current drive is D.. type there the command "attrib -s -h -r *.exe" for exe files and "attrib -s -h -r *.inf" and then delete the file by "del autorun.inf".
Hope this helps!!!!! :) Jah bles!
NOTE: If you want to have a more detailed information regarding How to delete a virus visit my other hub.. HOW TO DELETE A VIRUS IN YOUR USB/FLASHDISK
Instructions
-
-
1
Click the "Start" menu and type "CMD" into the "Run" box and click "OK."
-
2
Select the drive that is infected with the virus. If you are not sure which drive is infected, start with the "C:" drive. Type in "C:" and press "Enter" to access this drive.
-
-
3
Type the following into the command prompt box: - s - h *. * /s /d and press "Enter." This will bring up any suspicious files located on the drive. Open the suspicious file.
-
4
Look for a file that contains a ".exe" file and a file titled "autorun.inf." If you find these two files, you have found the tainted file. Make sure to write down the name of the program where the file is located.
-
5
Rename the "autorun.inf" so you can access the drive later without activating the virus. Type: rename autorun.inf as virusfile and close out of the "Command" prompt box.
-
6
Double-click the "My Computer" icon and select the drive that has the infected file. Find the program that contains the infected file.
-
7
Right-click on the program and choose "Open."
-
8
Right-click on the file you renamed "virusfile" and choose "Delete."
-
9
Right-click on the ".exe" file and choose "Delete." You have now removed the virus from your computer's hard drive.
-
1
No comments:
Post a Comment