To remove a virus using CMD, we shall use a CMD known as “attrib” command. Therefore first we have an obligation to know a few basics of the attrib command.
R – represents the read only attribute of a file or folder. Read only means the file can’t be written or executed.
H – H stands for the hidden attribute.
A – Similarly A stands for Archiving and this prepares a file for archiving.
S – This attribute changes the selected files or folders in a system file from a user file by assigning the “system” attribute of that particular file.
Here we have the “attrib” syntax à ATTRIB{+attribute/-attribute}{pathname}[/S[/D]}
And with the above command there are different parameters and switches so lets see what they are.
+/- à to enact or to cancel the specified attribute.
D à include any process folder.
S à searching through the entire path. Sub-folders inclusive.
Attribute à ( already explained above)
Pathnameà path where target folder is located.
This here is the proper syntax for the attribute command:
ATTRIB{+R/-R}{+A/-A}{+S/-S}{+H/-H}{+I/-I}{drive:}{path}{/S[/D][/L]}
After knowing all of the basics, now let’s give it a shot and try to see how we can remove a virus from USB, SD card etc. using CMD prompt.
After knowing all of the basics, now let’s give it a shot and try to see how we can remove a virus from USB, SD card etc. using CMD prompt.
For example, let’s transfer an autorun.inf virus from my USB to my D drive and delete the virus from the D drive.
Step 1. Open command prompt from search and run as administrator.

Step 2. Type D and hit enter

Step 3. Type “attrib” and press enter. This command lists out all files inside the current drive and you will clearly see autorun.inf virus listed.

Step 4. At this stage to remove the virus using CMD, type into command prompt “attrib –r –a –s –h *.* “ And press enter. This in turn will remove the read only, archive, system and hidden file attribute from all the files.
-r is for removing read only files
-a is for removing the archive file
-s is for removing system file
-h is for removing hidden file
*.* is for files with all different types of file extensions.

Keep in mind that this command only removes the different attributes from different files. However, the files will still exist. And therefore we must delete the virus permanently. To delete the virus, type “delete autorun.inf” and press enter. The file will get deleted from the current drive immediately.

Baca Juga : https://icyject.blogspot.co.id/2018/05/script-deface-indonesian-cyber-project.html
Baca Juga : https://icyject.blogspot.co.id/2018/05/cara-menambah-fasilitas-jaringan-inet.html
Tidak ada komentar:
Posting Komentar