- 5paisa
- AdSense
- Android
- Asphalt 8 : Airborne Mod Apk 4.9.1b Unlimited Money
- Battlegrounds Mobile India
- Blogger
- Blogging
- Bug Hunting
- cloud storage
- Cmd
- Damn vulnerable Web Application
- Demat Account
- Difference between
- dj alok
- dj alok in free firefree
- Doodle Army 2 : Mini Militia 5.2.0 Apk + Mod for android
- DVMA
- E-books
- earn Bitcoins
- Ethical hacking tutorials
- Express vpn
- EXPRESSVPN PRO APK 7.12.1
- EXPRESVPN CRACKED APK
- fire dj alok
- Freefire
- Gaming
- Google drive
- Google llc
- gplink
- Groww App
- Health
- helo
- helo mela
- helo app
- Helo app earn paytm
- Helo app full guide
- Helo app invite and earn
- Helo app redeem proof
- Helo app refer and earn
- Helo app unlimited trick
- Helo app withdraw proof
- Helo Mela Offer: Get Rs.2 Free Paytm Cash + Win Upto Rs.10000 Paytm Cash
- helo refer and earn
- How to
- How to combine two Wifi Connections to get a faster Internet
- how to get dj alok for free
- how to get free dj alok
- how to get free dj alok in free fire
- How to install DVWA on Kali Linux 2020.2
- How To Use Light Speed WebCache on Your website
- ICICI Direct
- IOS
- kali linux
- Live streaming
- makeup
- meesho
- Money Earning
- My poems
- Netflix
- Netflix mod
- Netflix premium
- News
- online courses
- Pentesting
- programming
- PUBG
- Puffin Browser Pro 8.3.0.41446 (Full) Apk + Mod for Android
- Puzzles
- Recharge offers
- Refer and Earn
- Reviews
- SEO
- shell Scripting
- Shortlink
- Spotify Music 8.5.57.1164 APK Mega Mod Cracked Latest Android
- stylish name
- Technology
- Tips&Tricks
- Township Mod Apk 7.5.0 Unlimited Money
- Udemy
- Udemy courses
- Udemy free
- Udemy premium
- VClip app download link
- VClip app full details
- VClip app invitation link
- VClip app referral code
- VClip app referral link
- VClip app review
- Web designing
- What is
- WINDOWS
- Wishes
- Wordpress
- World Cricket Championship 2 2.8.9 Apk + Mod (Coins/Unlocked)
- Youtube tricks
- zoom app
- zoom bombing
- zoom call
- Zoom safety tips
How To Remove Virus From USB Or Any Drive On Windows 10 Using CMD
How To Remove Virus From USB Or Any Drive On Windows 10 Using CMD
Most of the viruses modify the attributes of a file or a folder such that they become very hard to access. Some of the attributes that are changed in a file or a folder are the read, write or the execute permission on that file. Using ‘attrib’, one of the cmd commands, we can try our hands to change the attributes of a file and reset the file’s internal structure in order to recover a file.
How is a virus different from any other file on Windows? A virus can be present in your system as a file format which has the following properties:
A virus can be a file hidden from a user
A virus can be present in the form of an ‘autorun’ or ‘Autoexec’ file
A virus can be an exec file
A virus can be a file with different attribute permissions
Some of the well-known examples of the above kinds of the viruses are :
Autorun.inf
Ravmon.exe
New Folder.exe
svchost.exe
Heap41a
Remove Virus Using CMD from USB/ any Drive on Windows 10 :
In order to remove a virus using cmd, we will use a famous cmd command called ‘attrib‘ command.
It can be easily guessed from its name that the ‘attrib’ command represents different attributes of a file, folder or a directory. This command is mainly responsible for displaying, setting and removing the different attributes like read-only, archive, system, and hidden attributes of a file or folder.
Using this command, we will try to change the attributes assigned to a file and thus recover our file.
Here are the basic attributes of the ‘attrib’ command which we will use later :
R – R represents the “Read-only” attribute of a file or folder. Read-only means the file cannot be written or executed.
H – H stands for the “Hidden” attribute.
A – Similarily, A stands for “Archiving” which prepares a file for archiving and,
S – S attribute changes the selected files or folders into a system file from a user file by assigning the “System” attribute to that particular file.
“attrib” Syntax :
ATTRIB [+ attribute | – attribute] [pathname] [/S [/D]]
In the above command, let’s see what the different parameters and switches are :
‘+ / –’ : To enact or to cancel the specified attribute.
‘attribute’ : As explained above
‘/S‘ : Searching throughout the entire path including subfolders
‘/D’ : Include any process folder
‘pathname’ : Path where the target file or folder is located.
Here is the proper syntax for attrib command:
ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [+I | -I] [drive:][path][filename] [/S [/D] [/L]]
Let’s get started :
I am going to transfer an ‘autorun.inf‘ virus from my USB drive to my D: drive and delete that virus from my D: drive.
Run command prompt as an administrator
Since the autorun.inf virus is in my D: drive, I am going to change the drive to D: drive. It can be done by typing D: and press enter.
type attrib and press enter. This command will list out all the files inside the current drive and you can clearly see the autorun.info virus listed below.
To remove Virus using CMD, type into your command prompt attrib -r -a -s -h *.* and press Enter. This will remove the Read Only, Archive, System and hidden file attribute from all the files.
-r is for removing the read-only files
-a is for removing the archive file
-s is for removing the system file
-h is for removing the hidden file
*.* for all the files with all different types of file extensions
Note that this command will only remove the different attributes from different files. However, the files will still be there. Now time has come to delete the virus. So, to delete the virus, type del autorun.inf and enter.
Once you have pressed enter, that file should get deleted from the current drive. In case, you want to delete that file from a USB stick, then you can change your current drive to USB drive current drive in step 2 and follow the commands.
You can again type ‘attrib’ command to see if the deleted file exists or not. As seen above, it does not exist anymore in the D drive.
To remove other viruses with extensions such as ‘.ink’, ‘.exe’, just type Del *.ink or Del *.exe respectively to delete those suspicious files.
I hope this would have been informative for you. If you know some other tricks, let us know in the comments below.
Also Read
KUMAR JEERU
. I am a Programmer and Pentester. I find and Fix loophole in websites and networks. Connect with me for queries , web developemnt , Scanning and Fixing website Security issues. My company gives special discount for independent entrepreneur , small and Medium size companies. Contact me directly on my face page
Post a Comment
Post a Comment