计算机病毒几乎可以来自任何地方——甚至是可移动存储设备。当受感染的USB闪存驱动器进入您的 PC 时,它将通过名为(USB)AutoRun的内置Windows
功能被激活。
幸运的是,有一种方法可以禁用该功能。
在本文中,我们将向您展示如何使用命令提示符删除快捷方式病毒并保护您的计算机免受未来攻击。
什么是自动运行?
要了解什么是快捷方式病毒,您需要知道AutoRun的作用以及它为什么会这样做。
(Windows)当外部设备( USB(USB)、存储卡、CD(CDs)、DVD(DVDs)、SD 卡)插入计算机时, Windows会启动一个名为 autorun.inf 的文件。自动运行(AutoRun)等功能旨在改善 PC 体验。
在大多数情况下,它们通过自动启动在笔式驱动器等外部设备上找到的应用程序来帮助非技术用户,而不是让他们手动浏览重要的文件和文件夹。
最好的例子是您购买的程序附带的安装 CD。每张 CD 都可能有一个 autorun.inf 文件,因此安装程序会在您将 CD 插入计算机后立即启动。
请(Make)务必阅读我之前关于autorun 和 autoplay 之间区别(difference between autorun and autoplay)的帖子,它们相似但不同。
快捷方式病毒如何工作?
不幸的是,自动运行(AutoRun)功能已被一些恶意人员滥用。现在可以将来自USB闪存的病毒附加到 autorun.inf 中,因此两者可以同时启动。(USB)这意味着您实际上是在插入USB的第二次安装病毒。
病毒的作用将取决于它被编程做什么。众所周知,有些人会将所谓的键盘记录器添加到您的系统中。这将允许黑客跟踪您的击键以窃取密码和银行信息等个人信息。
禁用自动运行
虽然AutoRun是一项很棒的功能,但禁用它可能是防止受感染的 autorun.inf 文件造成损害的最佳方法。
以下是禁用Windows AutoRun(Windows AutoRun)应遵循的步骤:
转到设置(Settings)(Windows + I) >设备(Devices)
>自动播放(AutoPlay)。
通过将切换开关切换到关闭(Off)位置来禁用自动播放。(AutoPlay)
注意:(Note:)您也可以在插入外部设备时使用下拉菜单选择默认操作。
删除 Autorun.inf 文件
如果您怀疑您的USB驱动器有病毒,删除 autorun.inf 文件将阻止病毒启动。
使用 CMD 删除
以下是如何通过运行CMD (也称为命令提示符)来删除 autorun.inf 文件:
打开运行(Run)
并键入CMD以打开命令提示符。
输入(Enter)U(USB)盘盘符(例如:“ G: ”或“ F: ”不带引号)并按Enter 键(Enter)。
在命令行中键入ATTRIBUTE -H -R -S AUTORUN.INF然后按Enter。
键入DEL AUTORUN.INF并按 Enter。
使用 Windows 资源管理器删除
以下是使用Windows资源管理器删除 autorun.inf 文件的方法:
启动Windows 资源管理器(Windows Explorer)(Windows + E)。
打开
左侧面板上的USB驱动器。(USB)此操作将向您显示USB的内容。
从列表中选择autorun.inf并按 Delete。
注意:(Note:) Autorun.inf通常是一个隐藏文件。确保(Make)通过查看(View)并勾选隐藏项目(Hidden Items)来启用显示隐藏文件(Show Hidden Files)。
通过任何一种方法删除 autorun.inf 文件都有助于保护您的计算机免受恶意病毒的侵害。
但是,作为一项附加的安全措施,您应该立即使用防病毒软件扫描您的USB驱动器中的恶意软件。(USB)
How to Remove Shortcut Virus in USB using CMD
A computer virus can come from just abоut
anywhere — even removable stоragе devices. When an infеcted USB flash drive
fіnds its way to your PC, it will be aсtivated thanks to a buіlt-in Windows
function callеd AutoRun.
Fortunately, there is a way to disable
the feature.
In this article, we’ll show you how you
can remove the shortcut virus using the command prompt and safeguard your
computer from future attacks.
What Is AutoRun?
To understand what a shortcut virus is,
you need to know what AutoRun does and why it does it.
Windows launches a file called
autorun.inf when external devices (USB, memory card, CDs, DVDs, SD cards) are
plugged into the computer. Features like AutoRun are designed to improve the PC
experience.
In most cases, they aid non-technical users
by automatically launching applications found on external devices like pen
drives instead of having them manually navigate important files and folders.
The best example would be the installation CDs that come with the programs you purchase. Each CD would likely have an autorun.inf file so the installer would launch as soon as you insert the CD in your computer.
Make sure to read my previous post on the difference between autorun and autoplay, which are similar, but different.
How Does a Shortcut Virus Work?
Unfortunately, the AutoRun feature had
been abused by some malicious people. A virus from USB flash can now be attached
to autorun.inf so both would launch at the same time. This means you’re
essentially installing a virus the second you plug in your USB.
What the virus does would depend on what
it’s been programmed to do. Some are known to add what’s called a keylogger to
your system. This would allow hackers to track your keystrokes to steal
personal information like passwords and banking information.
Disabling AutoRun
While AutoRun is a great feature,
disabling it might be the best way to prevent infected autorun.inf files from
doing damage.
Here are the steps you should follow to
disable Windows AutoRun:
Go to Settings (Windows + I) > Devices
> AutoPlay.
Disable AutoPlay by switching the toggle
to the Off position.
Note: You can also use the drop-down menu to select the default action
whenever you insert an external device.
Deleting the Autorun.inf File
If you suspect that your USB drive has a
virus, deleting the autorun.inf file will prevent the virus from launching.
Delete Using CMD
Here’s how to delete the autorun.inf file
by running CMD otherwise known as the command prompt:
Open Run
and type CMD to open the Command
Prompt.
Enter the USB drive letter (example: “G:” or “F:” without the quotation marks) and press Enter.
Type ATTRIBUTE
-H -R -S AUTORUN.INF in the command line then press Enter.
Type DEL
AUTORUN.INF and press Enter.
Delete Using Windows Explorer
Here’s how to
delete the autorun.inf file using Windows Explorer:
Launch Windows Explorer (Windows + E).
Open the USB
drive found on the left-hand side panel. This action will show you the content
of the USB.
Select autorun.inf from the list and press
Delete.
Note: Autorun.inf is usually a
hidden file. Make sure you have Show Hidden Files enabled by going to View and ticking Hidden Items.
Deleting the
autorun.inf file through either method should help keep your computer safe from
malicious virus. However, you should use an antivirus software to scan your USB
drive for malware immediately after as an added security measure.