Navigation

How to Create a Virus to Block Websites: Complete Guide

Most folks are familiar with the virus that used to block Orkut and Youtube web sites. If you are curious approximately growing one of these virus for your own, here is how it is able to be carried
How to Create a Virus to Block Websites


Most folks are familiar with the virus that used to block Orkut and Youtube web sites. If you are curious approximately growing one of these virus for your own, here is how it is able to be carried out.

As ordinary I am the usage of my favorite programming language ‘C’ to create this internet site blockading virus. I will supply a short creation about this virus before I leap into the technical jargon.

This virus has been completely created in ‘C’. So, all people with a primary expertise of ‘C’ could be capable of understand the operating of this virus program. When this program is accomplished, it'll block all those websites which can be listed in the source code. In the subsequent example, the websites which might be listed in the supply code are Google, Yahoo and Youtube. When you download the supply code of this software, you have got a desire to include your very own list of sites which you need this virus to block.


>> Also you can read: How do you create a computer virus


I actually have just eliminated the source code of this software from this post as it's miles lengthy and makes the put up look messy. You can nevertheless download the supply code of this virus software from the subsequent link:



How Virus Program Works?

The Windows operating system maintains a special file called HOSTS which can be used to block any given hostname or domain name (website) by adding new entries onto it. This program works by modifying the HOSTS file by adding new entries of those sites that are intended to be blocked. The HOSTS file is located at:
%windir%\system32\drivers\etc (Usually: C:\windows\system32\drivers\etc)
So, when you execute this program, all it does is add the entries of the list of those sites (mentioned in the source code) to this HOSTS file. Once this is done, the site will be blocked from your computer. So, none of the browsers would be able to load those sites on your computer.
Now, as far as the technical part of this program is concerned, people who have a working knowledge of ‘C’ should be easily able to understand the working of this virus program. However, for those who are new to ‘C’ programming, here is the algorithm of this program:
  • Determine the Root drive. ie: Find the drive (C:, D:, E: or F:) on which the Windows is installed.
  • Navigate to: %windir% -> system32 -> drivers -> etc
  • Open/Load the HOSTS file.
  • Copy a list of those websites that are mentioned in the ARRAY to the END of the file.
  • Save the file and Exit.

How to Compile the Source Code?

For a step-by-step compilation guide, refer my post: How to compile C Programs?

Testing the Virus:

  1. To test, run the compiled module. It will block the sites that are listed in the source code.
  2. Once you run the file block_Site.exe, restart your browser program. Then, type the URL of the blocked site and you’ll see the browser showing error “Page cannot displayed“.
  3. To remove the virus type the following command in the Run.
    %windir%\system32\drivers\etc
  4. There, open the file named “hosts” using the notepad. At the bottom of the opened file you’ll see something like this:
    127.0.0.1 google.com
  5. Delete all such entries which contain the names of blocked sites.
مشاركة

أضف تعليق:

0 comments: