如何使用批处理文件创建病毒?

This is the final post on basic
如何使用批处理文件创建病毒?

How to Create a Virus Using Batch File?

Folder Replication Virus

A folder replication virus creates a large number of empty folders that make our Computer fuzzy and odd to look. This doesn’t have much impact on our computer, but it’s really frustrating in real-time. The program creates folders at random locations. Deleting these folders is also not an easy task as these folder may be created at any location on our drive. So, we need to manually find and delete every such folder.

I’ve made some modifications to the program and removed the complexity to illustrate you how it works. You can run this file on your computer without any hesitation. It will create infinite number of empty folders with random name. I can assure you that this program will not have any bad impact on your PC.

Here is the program.

1. The first line of the program conventionally sets the echo to off state.

2. Then we will be moving to on the Desktop using ‘cd’ command. 

3. Next I declare a loop label to iterate the block below it unconditionally. Using ‘md %RANDOM%’ command a folder is made with random name.

4. Next command ‘goto loop’ moves the control back to the label ‘loop’ and repeats the steps 3 and 4.

Note: Save the file with .bat extension and double click on it to start the folder replication virus. Just change “C:Documents and SettingsusernameDesktop” to the path where you want to create the folders. Your computer may hang when you open the directory where the folders are created.

DNS Poisoning

Now we’ll see how a 2 lines of code can hack your personal accounts. You may have heard about spoofing of websites where a hacker creates an exact copy of the target site and hosts it on a server that has a unique IP address. He can send you a batch file programmed to change your host files there by redirecting you to the target spoofed site instead of the original site. When you click the batch file, your hosts will be modified and you are almost vulnerable. Take a look at the program.

The above code writes the line to your host file and whenever you type facebook.com in your browser, you will be redirected to the ip address 10.184.24.35 where the attacker has spoofed and hosted the site.

Command to remove the shortcut virus from your USB drives

The first command allows you to delete the ‘.lnk’ files and the next one changes the attributes of the files and makes the visible to you where ‘e’ is your USB drive letter.

Final Words As this is a basic intro to batch files, I could only cover less number of topics but very important ones. There is a lot more to learn. First master the basics and explore the internet for more stuff. If you have any doubts regarding how to create a virus using batch file then you can comment below.

这是有关 介绍的最后一篇文章。 因此,我们将结束主题并查看批处理文件的一些实际应用。 到目前为止,我们基本上知道,批处理文件可用于自动化任务,例如一次打开所有您喜欢的链接,自动清洁计算机,加快PC速度,删除临时文件,然后列表就会继续。 我们还将了解如果误用批处理文件会带来怎样的危险,并尝试构建一个小型病毒程序。 在本教程中,我们将看到如何使用批处理文件编程来创建病毒。 不用担心,我会采取足够的预防措施,使您的计算机处于安全状态,此外,如果滥用,请说明一些批处理文件可能令人沮丧。 另外,我还将处理一些命令,这些命令使您可以从便携式存储设备中清除某些病毒文件。
如何使用批处理文件创建病毒?

如何使用批处理文件创建病毒?

文件夹复制病毒

文件夹复制病毒会创建大量的空文件夹,这会使我们的计算机变得模糊不清,看上去也很奇怪。 这对我们的计算机影响不大,但实时性确实令人沮丧。 该程序在随机位置创建文件夹。 删除这些文件夹也不是一件容易的事,因为这些文件夹可以在我们驱动器上的任何位置创建。 因此,我们需要手动查找和删除每个此类文件夹。

我对该程序进行了一些修改,并删除了复杂性以向您说明其工作方式。 您可以毫不犹豫地在计算机上运行此文件。 它将创建无限个带有随机名称的空文件夹。 我可以向您保证,该程序不会对您的PC造成任何不良影响。

这是程序。

程序的第一行通常将回声设置为关闭状态。

2.然后,我们将使用“ cd”命令移至桌面。

3.接下来,我声明一个循环标签以无条件地对其下面的块进行迭代。 使用“ md%RANDOM%”命令使用随机名称创建一个文件夹。

4.下一个命令“ goto loop”将控件移回标签“ loop”,并重复步骤3和4。

注意:保存扩展名为.bat的文件,然后双击它以启动文件夹复制病毒。 只需将“ C:Documents and SettingsusernameDesktop”更改为要创建文件夹的路径。 当您打开创建文件夹的目录时,计算机可能会挂起。

DNS中毒

现在,我们将看到两行代码如何**您的个人帐户。 您可能听说过网站欺骗,其中黑客创建目标站点的精确副本并将其托管在具有唯一IP地址的服务器上。 他可以通过将您重定向到目标欺骗站点(而不是原始站点)来向您发送一个已编程为在其中更改主机文件的批处理文件。 当您单击批处理文件时,您的主机将被修改,您几乎容易受到攻击。 看一下程序。

上面的代码将这一行写到您的主机文件中,每当您在浏览器中键入facebook.com时,您都将被重定向到攻击者欺骗并托管该站点的IP地址10.184.24.35。

从USB驱动器删除快捷方式病毒的命令

第一个命令使您可以删除“ .lnk”文件,第二个命令可以更改文件的属性并使您可见,其中“ e”是您的USB驱动器号。

结束语由于这是批处理文件的基本介绍,因此我只能涵盖较少的主题,但非常重要的主题。 还有很多东西要学习。 首先掌握基础知识,然后在互联网上探索更多东西。 如果您对如何使用批处理文件创建病毒有任何疑问,可以在下面评论。

翻译自: https://www.thecrazyprogrammer.com/2015/07/how-to-create-a-virus-using-batch-file.html