![]() |
|
|||||||||||||||
|
||||||||||||||||
|
| Making software behave | ||||
| Improve your skills with help from our resident hackers
Welcome to our new "Security for developers" column! This is where you'll find in-depth coverage of security issues ranging from how to apply common security technologies, to writing more secure code yourself. Our ultimate goal is to help you stamp out insecure code without recourse to the "penetrate-and-patch" approach, and to have some fun in the process. Our first column introduces you to our philosophy of security, and explains why we're focusing exclusively on software security issues facing developers. As businesses rush to embrace e-commerce, security stops being a minor detail and starts to carry some serious weight. But because most computer users don't know very much about security, a majority of the words devoted to computer security cover basic technology issues such as what firewalls are, when to use the DES encryption algorithm, or which anti-virus product is best. The rest of the literature tends to focus on the "hot topic" of the day, such as BackOffice 2000 bugs or the Melissa virus. While these topics are important to users, our column is going to focus instead on security issues facing developers. Many good resources for security-related news and overviews already exist. We won't cover topics in security that everyone else is covering, or has already flogged to death. Instead, we're going to focus on how to develop secure applications. For example, many popular press articles deal with cryptography: what it is, and where, when, and how to use it. In this column, because we'll be looking at cryptography from the developer's perspective, you'll learn when, why, and how to incorporate it into your applications. As a developer you're probably largely responsible for ensuring the security of the systems you write. Especially in today's world where most applications are either networked or have to coexist with programs that are networked, you must pay close attention to security throughout development. Many developers are aware of designing for security, but few know how to go about it. It's difficult to find good resources on how to write secure applications. Tips seem to spread by word of mouth, but few developers know more than a couple of them. Most developers we talk to admit to knowing little about security; almost all want to know enough to be confident that their programs are secure. Our aim with this column is to arm you, the developer, with the know-how you need to be able to create secure systems. Yes, developers working on security-related products such as firewalls, intrusion detection systems, and secure Web servers will find this column useful. But more than that, developers of any software will benefit from this material. You don't have to be writing security software to be writing software that needs to be secure. Most of today's software is designed to interact on the Net somehow, and as soon as the Net enters the picture, security looms large. With this column we also intend to help developers become amateur security analysts. Perhaps not surprisingly, many of the things developers need to know when they are creating secure code also turn out to be relevant to security analysts. Security is always harder than it sounds. When you are creating a security-critical system, an extra pair of eyes often helps, especially if the eyes are alert to real security risks. The -ilities Contrary to what many purveyors of shrink-wrapped consumerware may believe, effective security cannot be bolted onto the side of a system after it is finished. Security is a system-wide emergent property of a software system. Thus, software should be designed from the very beginning with security in mind. Security is like safety, dependability, reliability, or any other software -ility. Just as it is not possible to take an unreliable system, add a "reliability" module to it and hope to get bug-free software, it's not possible to add security to an application as if security were just another feature. Security is a behavioral property of a complete system in a particular environment. In fact, security is so dependent on environment that it is entirely possible to take a system that is completely secure when implemented on a proprietary network, place it on the Internet, and end up with an easy-to-compromise disaster. (You've no doubt seen this happen.) The penetrate-and-patch approach is bad This sort of approach won't do in e-commerce applications. The problems include:
Our goal is to help you avoid the desperation of trying to fix to a problem that is being actively exploited by attackers. In simple economic terms, finding and removing bugs in a software system before its release is orders of magnitude cheaper and more effective that trying to fix a system after release. By designing a system for security, carefully implementing the system, and testing the system extensively before release, you can eliminate these problems and develop a truly secure system that doesn't rely on patches. The root of all security problems "Crackers," or bad guys who exploit security holes, don't create the holes; they simply exploit them, and often widely distribute their exploits as scripts. (By the way, the difference between crackers and hackers is that crackers break stuff, and hackers write excellent code. See "The fractal world of hackers and crackers" later in this article.) Crackers and hackers aside, security holes and vulnerabilities are the result of bad software design and implementation. To win the war against crummy software, watch this column for information about common mistakes, and good ideas that can help you write more secure code. What to expect in future columns
Security assurance
Writing secure code
We'll also cover important programming language issues that can impact the security of your code, such as why type systems matter, why Java beats the heck out of C, and what language-based encapsulation is. We'll also take on distributed systems and their impact on security, covering CORBA, COM, and EJB security concerns.
Security testing techniques
Applying common security technologies
Mobile code raises a raft of security issues. We'll explain why mobile code security is important and what to expect in future systems. We'll also explain how sandboxing (a common code encapsulation approach) works, and why it is harder than it sounds. We'll cover code signing, which has picked up a lot of steam recently, especially in the Java 2 world. Finally, we'll explain how to set up burglar alarms in your own applications, and how modern approaches to intrusion detection can help. The fractal world of hackers and crackers The term "hacker" originally had a positive meaning. It sprang from the computer science culture at MIT in the late 1960s, where it was used as a badge of honor to refer to people who were exceptionally good at solving tricky problems through smart programming. For most people in the UNIX development community, the term refers to someone who is an excellent and enthusiastic programmer. Often, hackers like to tinker with things, and figure out how they work. Software engineers, however, attach a slightly negative connotation to the term. They see a hacker as the programming world's equivalent of television's McGyver -- someone who can solve hard programming problems if given only a ball of fishing twine, a matchbook, and two sticks of gum. The notion software engineers have is not that hackers are malicious; rather it is that hackers cobble together ad hoc solutions that are marginally acceptable. Software engineers believe careful thought about software design should precede coding. They believe that hackers are developers who tend to wing it, instead of employing sound engineering principles. Average people (including the press) tend to have the most negative perception: that a hacker is someone who maliciously tries to break software. By this definition, a person who breaks into your machine is a hacker. Needless to say, many hackers resent this definition. Do locksmiths become burglars just because they could break into our house if they wanted to do so? Of course not. But, we admit there are hackers who are malicious, and do break into other people's machines, and do erase disk drives. Thankfully, these individuals represent a very small minority of the expert programmers who consider themselves hackers. In the mid-80s, hackers who disliked the negative connotations coined the term "cracker." A cracker is someone who breaks software for nefarious ends. Unfortunately, this term hasn't caught on outside of hacker circles. The press doesn't use it, and it didn't help that a recent movie about malicious programmers was titled "Hackers" (instead of "Crackers."). So, just who are the crackers? We've implied that some crackers can be hackers. Indeed, a cracker who breaks software protection mechanisms so that pirate copies can be easily distributed warrants the hacker label as well. Removing such protection mechanisms takes a fair bit of skill. However, most crackers are not hackers -- they're just kids trying to break into other people's machines. Some hackers who are interested in security may take a piece of software and try to break it just out of sheer curiosity. If they do break it, they won't do anything malicious; they will instead notify the author of the software, so that the problem can be fixed. If they don't tell the author in a reasonable way, then they can safely be labeled crackers. Fortunately, most people who find serious security flaws don't use their finds to do bad things. At this point, you may wonder what skills crackers have. Doesn't it take significant skill to break software? Skill is indeed required to find a new vulnerability, but not to merely exploit a known vulnerability. Generally, crackers are people whose programming ability is confined to downloading, building, and running programs other people write. (Hackers often call this sort of cracker a "script kiddie.") Crackers go to a hacker site, such as www.rootshell.com, download a program that can be used to break onto a machine, and get the program to run. It doesn't take much skill (other than hitting return a few times). In our experience, these people tend to be teenage males going through a rebellious period. Despite the fact that such people tend to be relatively unskilled, they are still dangerous. You may also wonder who wrote the programs these script kiddies use to break stuff. Hackers? If so, shouldn't those hackers be called crackers too? Yes, hackers tend to write most such programs. Some of those hackers even have malicious intent, and are crackers. However, many of these programs are made public by hackers who believe in the principle of "full disclosure." The basic idea behind this principle is that everyone will be encouraged to write more secure software if all security vulnerabilities in software are made public. In the eyes of full-disclosure zealots, developers who look at other people's security problems can potentially avoid such problems in their own code. Often, simply trying to explain the gist of a security problem isn't enough to help a developer. Without a working example of what an attacker might do, the developer won't fully understand the problem. That's one good reason for full disclosure. Full disclosure also allows informed administrators to address problems in software before the software vendor gets around to releasing a patch. Of course, there are plenty arguments against full disclosure, too. In the case of Java attack applets, for example, we have had great success getting vendors to respond to problems (and fix them quickly) without ever releasing an attack applet into the wild. Nonetheless, people without malicious intent sometimes do release working attack code on a regular basis, knowing that there is a potential for their code to be misused. These people often believe the benefits of full disclosure outweigh the risks. That's why we don't inherently call such people crackers.
| ||||||||||||||||
| About IBM | Privacy | Terms of use | Contact |