Computer virus

884 views

Published on

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

Published in: Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
884
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
71
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Computer virus

  1. 1. 1 By Shaharyar Khan shaharyar.khan555@gmail.com
  2. 2.  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. 2 shaharyar.khan555@gmail.com
  3. 3.  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 3 shaharyar.khan555@gmail.com
  4. 4.  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 4 shaharyar.khan555@gmail.com
  5. 5. 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 shaharyar.khan555@gmail.com
  6. 6.  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 shaharyar.khan555@gmail.com
  7. 7.  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. 7 shaharyar.khan555@gmail.com
  8. 8.  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  8 shaharyar.khan555@gmail.com
  9. 9.  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 9 shaharyar.khan555@gmail.com
  10. 10.  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 :D 10 shaharyar.khan555@gmail.com
  11. 11.  In that function I have created a Robot class object Then generate two random numbers And 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 11 shaharyar.khan555@gmail.com
  12. 12. 12 shaharyar.khan555@gmail.com 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(); } } }
  13. 13. 13

×