15.04.2018 Views

programming-for-dummies

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

642<br />

Secure Computing<br />

The idea behind designing security into a program from the start is to anticipate<br />

possible flaws and then design the program so those types of flaws can<br />

never even appear. This is like designing banks with only one entrance to<br />

limit the number of escape routes, and designing the lobby so anyone in the<br />

bank can be seen at all times.<br />

Because operating systems are the most common target <strong>for</strong> an attack, many<br />

operating systems include a variety of defensive mechanisms. The most<br />

common defense is to divide access to a computer into separate accounts.<br />

This is like limiting bank tellers to just handling a certain amount of money<br />

while only the bank president and a few other trusted people have actual<br />

access to the bank’s vaults.<br />

Such access control limits what people can do from within their specific<br />

account on the computer. This reduces the chance of a catastrophic accident<br />

wiping out data used by other people while also reducing the threat<br />

from hackers at the same time. If a hacker breaks into an ordinary user<br />

account, the hacker can’t cause too much damage, which is like a burglar<br />

breaking into a garage but not being able to access the rest of the house.<br />

Another common defense mechanism is data execution protection (DEP),<br />

which protects against buffer overflow attacks. Trying to wipe out all possible<br />

buffer overflow exploits may be impossible, so DEP simply tells the computer<br />

never to run any commands found in its memory buffer. Now hackers<br />

can flood the computer with all the malicious commands they want, but the<br />

computer simply refuses to run any of those commands.<br />

One way that hackers exploit programs is that they know programs behave<br />

predictably by storing data in the same areas. So another defense mechanism<br />

is address space layout randomization (ASLR). The idea behind ASLR is<br />

to keep changing the address of its memory. If hackers or malware can’t reliably<br />

predict where a program is storing specific data, they can’t insert their<br />

own commands or programs into the computer to trick the computer into<br />

running those commands instead.<br />

Computer security is actually less about protecting the physical parts of a<br />

computer and more about protecting the data stored on those computers. As<br />

individual hackers have given way to organized criminals, untrustworthy government<br />

agencies, and self-serving corporations, the field of computer security<br />

is constantly growing and changing. If there’s one certainty in society, it’s<br />

that crime will never go away, which means guaranteed opportunities <strong>for</strong><br />

anyone interested in protecting computers from the prying eyes of others.

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

Saved successfully!

Ooh no, something went wrong!