15.04.2018 Views

programming-for-dummies

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Stopping Malware 635<br />

Worms<br />

Similar to viruses are worms. Unlike a virus, a worm doesn’t need to infect a<br />

file to propagate itself. Instead, a worm can duplicate and spread to other<br />

computers all by itself. In the early days of computers, when computers<br />

were isolated from one another, the only way files could spread from one<br />

computer to another was by physically copying a file to a floppy disk and<br />

inserting that floppy disk into another computer. That’s why viruses were so<br />

popular in the early days of computers.<br />

Nowadays, most computers are connected to the Internet, so there’s no<br />

need to infect any files to spread. Instead, worms can spread on their own by<br />

looking <strong>for</strong> connections to another computer and then copying themselves<br />

over that connection, such as through a group of networked computers.<br />

Here are two steps to protecting a computer against a worm. First, security<br />

professionals must capture a worm and dissect it like a virus to see how the<br />

worm works. After they capture a worm’s digital fingerprint, they can store<br />

this in<strong>for</strong>mation in an antivirus program’s database so it knows how to recognize<br />

and remove that particular worm.<br />

A second way to guard against worms is to block their access to other computers<br />

over a network. The way computers connect to one another is through<br />

virtual openings, or ports. Worms simply look <strong>for</strong> open ports on an infected<br />

computer so they can travel out and infect another computer.<br />

Book VII<br />

Chapter 3<br />

The simplest way to block ports on a computer is to use a special program<br />

called a firewall. Firewalls can defeat worms in two ways. First, a firewall can<br />

block a computer’s ports to keep a worm from infecting the computer in the<br />

first place. If the worm has already infected the computer, a firewall can also<br />

block its ports that could allow the worm to sneak out and infect another<br />

computer.<br />

Although you could write your own firewall in your favorite <strong>programming</strong><br />

language, it’s much easier just to use an existing firewall program and configure<br />

it properly. Configuring a firewall means defining exactly what the firewall<br />

allows and what the firewall blocks.<br />

Computer Security<br />

On the simplest level, you can tell a firewall to allow certain programs to connect<br />

over the Internet; on a more complicated level, you can configure a firewall<br />

to allow only certain types of data to pass in and out. Allowing certain data to<br />

pass through a firewall, rather than just allowing certain programs, can defeat<br />

both Trojan horses and spyware.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!