13
1 By Shaharyar Khan shaharyar.khan555@gmail .com

Computer virus

Embed Size (px)

DESCRIPTION

A short discussion on virus.You can also find a Java program which will demonstrate you a fake virus

Citation preview

Page 1: Computer virus

1

By Shaharyar [email protected]

Page 2: Computer virus

Computer viruses are small software programs that are designed to spread from one computer to another and to interfere with computer operation.

The term "virus" is also commonly, but erroneously, used to refer to other types of malware, including but not limited to adware and spyware programs that do not have a reproductive ability.

[email protected]

Page 3: Computer virus

Brain is the industry standard name for a computer virus that was released in its first form in January 1986

It is considered to be the first computer virus for MS-DOS. It infects the boot sector of storage media formatted with the DOS File Allocation Table (FAT) file system

Brain was written by two brothers, Basit Farooq Alvi and Amjad Farooq Alvi from Lahore, Pakistan

[email protected]

Page 4: Computer virus

Malware includes computer viruses, computer worms, ransomware, trojan horses, keyloggers, most rootkits, spyware, dishonest adware, malicious BHOs and other malicious software

The majority of active malware threats are usually trojans or worms rather than viruses

[email protected]

Page 5: Computer virus

Some most common electronic infections are:

Viruses: A virus is a small piece of software that piggybacks on real programs. For example, a virus might attach itself to a program such as a spreadsheet program. Each time the spreadsheet program runs, the virus runs, too, and it has the chance to reproduce (by attaching to other programs) or wreak havoc.E-mail viruses: An e-mail virus travels as an attachment to e-mail messages, and usually replicates itself by automatically mailing itself to dozens of people in the victim's e-mail address book. Some e-mail viruses don't even require a double-click -- they launch when you view the infected message in the preview pane of your e-mail software 5

[email protected]

Page 6: Computer virus

Trojan horses: A Trojan horse is simply a computer program. The program claims to do one thing (it may claim to be a game) but instead does damage when you run it (it may erase your hard disk). Trojan horses have no way to replicate automatically.

Worms: A worm is a small piece of software that uses computer networks and security holes to replicate itself. A copy of the worm scans the network for another machine that has a specific security hole. It copies itself to the new machine using the security hole, and then starts replicating from there, as well. 6

[email protected]

Page 7: Computer virus

Malware such as trojan horses and worms is sometimes confused with viruses, which are technically different

a worm can exploit security vulnerabilities to spread itself automatically to other computers through networks, while a trojan horse is a program that appears harmless but hides malicious functions. Worms and trojan horses, like viruses, may harm a computer system's data or performance.

[email protected]

Page 8: Computer virus

Here now I will create a fake virus in Java for demo

For creating this demo , you need to install jdk , jre and any java editor like eclipse or netbeans

Even you can write this in notepad and compile it from command propmt

Let have some fun

[email protected]

Page 9: Computer virus

Robot class gives us functionality to control over mouse.

I will create a virus in which a mouse can get mad :p

Robot class have a function mouseMove(x,y) which needs x and y location (screen coordinates) and then it move the mouse at that location.

We will just write a infinite loop which will continuously changes the location of mouse and our control on mouse will not remain

[email protected]

Page 10: Computer virus

Here is the function

public void mentalMouse() throws Exception{Robot r = new Robot();

Random randomGenerator = new Random(); Random randomGenerator1 = new Random(); for(double a=0;a<100000;a++){ int x = randomGenerator.nextInt(1000); int y = randomGenerator1.nextInt(1000); r.mouseMove(x,y); }

I limit this loop to 100000, so it get stop after few seconds. If you are naughty enough then You can replace this by while(1)

:D :D :D10

[email protected]

Page 11: Computer virus

In that function I have created a Robot class objectThen generate two random numbersAnd then set the location of the mouse with these

two numbers by r.mouseMove(x,y);

In next slide you will find the whole class

[email protected]

Page 12: Computer virus

[email protected]

import java.awt.Robot;import java.util.Random;

public class Ewien {

public void mentalMouse() throws Exception {

Robot r = new Robot();

Random randomGenerator = new Random();Random randomGenerator1 = new Random();for (double a = 0; a < 100000; a++) {int x = randomGenerator.nextInt(1000);int y = randomGenerator1.nextInt(1000);r.mouseMove(x, y);

}

}

public static void main(String[] args) {try {new Ewien().mentalMouse();} catch (Exception e) {e.printStackTrace();}

}}

Page 13: Computer virus

13