Computer Security Books

Advertisements

BLOG

Dr. K's Blog

Email

mailto:drk@!spam!hush.ai

Introduction

Welcome to the endlessly fascinating exploration of computers, networks, phones and technology that is the world of hacking. Whether you are an Internet newbie curious to know what all the media headlines are really about, a computer enthusiast wanting to know more about how the Internet works, or an average Internet user, this book will demystify the subject of hacking by describing how hacking works.

You might be worrying that, in describing how hacking works, this book might encourage hordes of "wannabe" hackers to create mayhem on the Internet by looting computer systems, pillaging credit cards and killing networks with Denial of Service attacks. If you think this, then it is likely you have been placed into a state of Fear, Uncertainty and Doubt (FUD) by media hysteria. This book aims to show you that most hacking is responsible exploration of computers and computer networks with very little emphasis on breaking system security, stealing credit cards or crashing Internet systems.

Hopefully you will find something of interest in the Hacker's Handbook - at the very least you should gain a greater understanding of computers and networks. If you try out a few of the thing described here, you should understand hacking better and as a consequence have less fear of hackers.

About the Author

When I started playing with computers, it was a subject that I had previously had no interest in, and no desire to learn. When I became a newbie I still knew very little, but had an insatiable desire to learn. Later on I was a computer enthusiast, a hacker with several years' experience, but I still had an insatiable desire to learn. Finally I made my living from computers, but I never lost that insatiable desire to learn. Above all else hacking is about that insatiable desire to learn, to understand, to know, and then to learn even more about computers and technology. Hacking is just exploration and it is up to *you* to do it in a legal and responsible fashion.




What is a Hacker?

So, what is a hacker? Let's try the Oxford English Dictionary's definition to find out.

hacker /"hak@/ n. me. [f. hack v.1 + -er1.]
1 A person who or thing which hacks (something). me.
2 spec. An enthusiastic computer programmer or user; a person who tries to gain unauthorized access to a computer or to data held in one. colloq.
hackerdom n. the realm or world of computer hackers

The OED Definition of "hacker" is not really very helpful, is it? The relevant part of the OED definition is split between two different types of hacker.

  • An enthusiastic computer programmer or user.

    This is the original meaning of the word hacker. A hacker is someone who enjoys learning and exploring computer and network systems, and consequently gains a deep understanding of the subject. Such people often go on to become systems programmers or administrators, web site administrators, or system security consultants. Hackers such as these, because they spend more time pointing out and securing against system security holes, are sometimes referred to as white-hat hackers.

  • A person who tries to gain unauthorized access to a computer or to data held on one.

    This is the most conventionally understood meaning of the word hackers as propagated in Hollywood films and tabloid newspapers. A lot of people who are quite happy to call themselves hackers by the first definition regard the second group with derision, calling them "crackers", as they specialize in "cracking" system security. Such crackers, who spend all their time finding and exploiting system security holes, are often known as black-hat hackers.

    The reality is full of grey areas. As a white-hat hacker I have legally broken into systems to further my understanding of system security, but I did not specialize in cracking systems security in general. Many of the black-hat hackers I have known are computer enthusiasts who just happen to be most enthusiastic about breaking into systems, and whose knowledge of computers and networking protocols is second to none. At the end of the day, which type of hacker you are depends on your ethics, and whether you are breaking the law or not (see "Legal Issues" below).

    Media Misinformation and Media Hysteria

    Of course none of this is helped by the tabloid hysteria which accompanies each new breach of security. Headlines such as

    "HACKERS BRING YAHOO TO STANDSTILL"

    and

    ""FBI SWOOPS ON BOY HACKERS"

    do nothing to reassure the general public that Hackers are responsible citizens. Each time a new movie such as War Games or Hackers is released the scene is inundated with newbies who think that it is cool to break into systems but can't be bothered to learn anything for themselves. These "script kiddies", so called because all they can do is run scripts and exploits prepared by someone else, are looked upon with derision both by hackers and crackers alike. Very few of them stick with computers long enough to gain the real skills needed to become a real hacker, and even fewer take the time and effort to contribute something to the hacking community and gain real status in the eyes of other hackers.

    The media misrepresentation is not helped by the members of law enforcement agencies, IT security consultants and other bodies who have a vested interest in promoting the "hacker menace" as a threat to all clean-living, god-fearing, decent people. According to these, the Internet is overrun with hackers out to read your email, steal your credit card numbers, break into your computer, run up your phone bill and generally create more mayhem than Genghis Khan on a good day.

    For this reason it is best to not tell anyone that you are a hacker. Letting it slip to your boss is a good way of getting fired, and mentioning it to anyone will get many responses along the lines of "can you transfer money into my bank account for me". This is the main reason why hackers use "handles" instead of their real name, to maintain anonymity in a world where the media hysteria has surrounded the word "hacker" with negative connotations. Letting someone know you are a hacker can elicit much the same response as letting someone know you are a leper. Keep it under your hat, black or white.




    Why Hack?


    When people asked me why I hacked I had a standard response: "Because it's there. Because I can. Because it's fun." Reasons for hacking are personal and most people hack because of one or more of the following reasons:

    Access

    This is not so common a motivation these days, with free ISPs coming out of our ears, and every man, woman, child and dog having their own web page, but once upon a time the Internet was restricted to students, academic researchers and the military. If you didn't belong to one of those groups, you had to hack your own access via a university dial-up or similar. An understanding of this technique can be useful in a variety of circumstances.

    Exploration

    This is the one that motivates a very large group of hackers. The exploration of computer systems and networks, roaming the Internet, the X25 system or the phone network, and discovering new and interesting facts about how they work, helps to satisfy the insatiable beast called hacker curiosity. The only problem with this is that the more you learn, the more you realize that you have so much more to learn and the exploration never stops.

    Fun

    Hacking is fun. If it isn't then why are you bothering? If you are going to spend long hours mastering computers and network protocols, cutting code for your latest masterpiece late into the night, it helps if you really enjoy it. The best hackers I've ever met loved computers and loved working on them, many hours, days, weeks or even months to solve problems.

    Showing Off

    This is the worst reason to hack, but it motivates a lot of younger hackers and phreakers. Hacking skills can increase your standing in a social group, but can also lead to anti-social behaviour, cracking, and an attitude that can basically be described as "in your face". Most hackers whom I have met in this group have either been caught very quickly, have gone on to become MP3 or Warez pirates, or just lost interest as they became more interested in the opposite sex. Very few hackers with this attitude go on to become the truly elite hackers who exhibit a deep appreciation and understanding of computer systems and networks.




    The Ethics of Hacking

    This is a vexing question, having almost as many different answers as there are hackers on the planet. Here are a couple which should give you food for thought. One of the early formulations of the old-style hacker ethic was by Steven Levy in his book Hackers: Heroes of the Computer Revolution (1984). This has influenced a generation of hackers, including the author, and affected the development of my own "hacker ethic" which is given below.

    1. Information is power therefore information should be free.

    2. Corporations & Government cannot be trusted to use computer technology for the benefit
    3. of ordinary people.
    4. Corporations & Government cannot be trusted to guarantee privacy and freedom of
    5. speech on the Internet.
    6. Unless we understand computers and networks we will be enslaved by Corporations and Governments that do.

    7. Computers are enabling tools capable of enhancing creativity, placing the potential to create art and music in the hands of ordinary people.

    8. The invention of the World Wide Web is like the invention of the printing press, but places it in the hands of ordinary people instead of the church and state.

    9. Access to computers enhances life and unleashes creativity within individuals, which benefits all of the community.

    10. Access to computers should be for everyone, not just the wealthy "information rich" middle classes.

    11. Access to a global network of computers enables the creation of a rich diversity of virtual communities.

    12. The Internet is supplying new models of social and economic structure which promote a "gift economy" whereby people are judged on their contribution to society, not on their wealth.

    13. If, as Robert Anton Wilson suggests, that "communication is only possible between equals" then computers enable that communication by promoting decentralisation and eroding traditional notions of equality.

    14. If, as Marshall McLuhan suggests, "the media is the message" the invention of global computing will change the deep structures used to represent knowledge in the brain.

    15. We will not know the impact of computers in our society for many years, but the consequences will be far reaching and will change everything forever.

    Table 1.1: The author's personal code of "Hacker Ethics"


    On the darkside, the Mentor listed a definition of hacker ethics in the LOD/H technical journal, and gave the whole hacker ethics debate a spin that will be appreciated by any would-be crackers out there, as it mixes hacker ethics with sound advice to prevent black-hat hackers getting caught.

    1. Do not intentionally damage *any* system.

    2. Do not alter any system files other than ones needed to ensure your escape from detection and your future access

    3. Do not leave your (or anyone else's) real name, real handle, or real phone number on any system that you access illegally.

    4. Be careful who you share information with.

    5. Do not leave your real phone number to anyone you don't know.

    6. Do not hack government computers.

    7. Don't use codes unless there is *NO* way around it.

    8. Don't be afraid to be paranoid.

    9. Watch what you post on boards.

    10. Don't be afraid to ask questions.
    11. You have to actually hack.

    Table 1.2: Hacker's Code of Ethics given by Mentor in LOD/H


    At the end of the day your ethical stance depends a lot on who you are and what you do, as it's much harder for someone who specializes in cracking to behave ethically and refrain from breaking the law, rather than a computer enthusiast who wishes to remain a white-hat hacker by testing their skills in legal ways.




    Legal Issues

    Before we go any further we ought to lay down the boundaries of what is permissible "legal" hacking, and what might end up with a court appearance. All of this is my interpretation of the relevant laws, and it could be wrong. I play with computers; I do not practice law. I recommend anyone thinking of hacking to investigate their federal and state laws, and fully understand where the boundaries lie so that they do not unintentionally break a statute that could lead them into trouble. For anyone who is not from the US or UK, where laws could be far more severe and would-be hackers risk more than a prison sentence, it is vitally important that you understand the law in your country because your life could depend on it.

    US Law

    After the partial success of "Operation Sundevil" and the debacle of the E911 case, the ensuing media onslaught meant that the US law enforcement agencies needed to act fast to convince the public that they were on top of the "evil hacker menace". Very soon, US law enforcement got organized, and the FBI formed the National Computer Crimes Squad to go along with the secret services' own investigative group, the Electronic Crimes Branch. The main legal weapon is the Computer Fraud and Abuse Act (1984), continuously amended up to 1994. This states that a hacker has to access a computer intentionally without authorization, or exceed authorized access, and then use the access provided for purposes to which authorization did not extend, such as alter, damage, destroy data or prevent normal access.

    State legislation also exists to prevent hacking, so what you are charged with, and the severity of your punishment, will vary with location. In addition to this, cases involving the state prosecutors or the secret service, such as Bernie S., accused of possessing "counterfeit access devices" in order to commit telephone fraud, or Kevin Mitnick, accused of "possessing codes" to make free cellular calls, often involve charges that involve other US statutes relating to fraud and counterfeiting, rather than the Computer Fraud and Abuse Act. In short, if you are caught cracking systems or making free calls on the phone system, you do so at your peril. The hysterical media frenzy over "evil hackers" ensures that the authorities do not just chase and catch hackers, but also give them large sentences in the hope of deterring others and satisfying the media.

    UK Law

    In the late 1980s there was a good deal of controversy generated in the media following some high-profile hacking exploits, most notably the "Prince Phillip Mailbox" hack (see Chapter 3). A number of failed prosecutions also occurred at this time because hacking was not then an offence, but after a public hue and cry the Computer Misuse Act of 1990 was very soon passed.

    According to the Computer Misuse Act of 1990, a hacker is guilty of a legal offence if they knowingly cause a computer to "perform any function" to secure unauthorized access, or to cause unauthorized modification of the contents of the computer with the intent of impairing the computer, a program on that computer or access to that computer. On conviction the offender could be punished with terms in prison ranging from six months to five years and a fine. There is much more to the 1990 Act, but if you are in a situation where you need more information about the Act because you have been caught breaking the law, then you need a solicitor, not this book.

    Disclaimers

    All the information provided in this book is true and as up to date as possible. Any and all mistakes are mine; point them out and I will correct them in later editions of this book if possible. All the information in this book is provided "as is" and for educational purposes only, to enable ordinary Internet users, computer enthusiasts and novice hackers to understand system and network security. Anyone using the information contained in this book to break the law (see "Legal Issues") is either very stupid, or hasn't read the section on hacker ethics above. Either way, the author and publisher of this book disclaim all responsibility for any loss, downtime, damage, social deprivation or other problems caused by applying or misapplying any and all information contained herein.




    Trying these Techniques Legally

    If you are really keen to have a go at some hacking or even some cracking, but you are equally keen to remain outside prison, there are many ways that you can try out some of the techniques in this book. Here are a few that I know of:

    Attack your own computer

    One of the best ways of finding out if your computer is secure is to think like a cracker and attack your own machine. Running a password cracker against your UNIX password file will find insecure passwords fast. Attacking your computer using port scanning will give you an indication of what software needs to be patched, or of services that need to be turned off. Best of all, you can't get into any trouble by falling foul of any legal problems

    Get Together with Friends and Build a Network

    Attacking your own computer is fine, but doesn't truly represent what would happen in the real world. Get together with a group of friends and network your computers together. Network Interface Cards (NICs) can be purchased and installed quite cheaply, and configuring a thin-net Ethernet LAN to run TCP/IP is something every self-respecting hacker should know how to do. Now mix and match the operating systems on your network, get hold of a copy of LINUX and install it, grab one of those two-user copies of Novell which can be had for an evaluation basis, or those 60-day limited editions of Microsoft NT 4.0, BackOffice and SQL-Server. Run up a packet sniffer on the network and look at the different types of packets, and the type of network traffic on your LAN and see what you can learn. Try running port scanning probes against different operating systems, learning how to exploit and then patch any security holes that you find. The only limit to what you can find out is the extent of your curiosity, your thirst for technical knowledge and the need to eat and sleep.

    Join a Hacker Group

    Some hacker groups have networks already, and some have a presence on the net. Find one whose attitude to hacking matches yours and try and join. Otherwise go back to the groups of friends that you built a network with and form your own. Attend 2600 meetings in your local area, and go to hacker conventions if they have them near you. Join into IRC discussions on hacking or phreaking and you can learn a lot very quickly. Don't be afraid to say "I don't know anything about that" when you don't, and don't be scared to ask questions. Pretending you know when you don't is plain stupid. If the group you are with won't answer or deride you for asking, then they either don't know themselves or you are in the wrong group.

    Play a Hacker "Wargame"

    From time to time somebody will offer up sacrificial boxes on the Internet for people to hack against. The reasons are many and varied. Sometimes companies want to show off their latest firewalls, hackers want to practice *really* securing a LINUX box, or someone just offers it up for fun, knowing they can log and watch and enjoy as people test their system security. If you take part in one of these wargames, be sure that it is exactly what it purports to be. All the activities are likely to be logged and anyone, including government and state investigators, or private security companies with an axe to grind, could be running these wargames.

    The information gathered from such activities helps to build up traffic analysis databases, showing where attacks come from, and helps log hacker "fingerprints", showing modus operandi in attack patterns and techniques. With this information, security companies stand a better chance of finding hackers once they have been attacked, because all they have to do is look at the cracking techniques used in the hack and then match them to any records from the wargames they previously hosted. As I said, if you want to crack system security legally by playing one of these wargames, then be careful, because it might not be what it seems.




    The Hacker's Handbook Network

    In case you are wondering, all the examples in this book were run on part of my home LAN with the following "sacrificial" machines attached. No laws were broken during the preparation of this book because all the machines I was hacking on, into and around are mine:

    Name Type OS IP Notes
    redhat6 p166/128mb win95/redhat6 xxx.x.x.xxx dual booting
    slack 486/32mb slackware 3.0 xxx.x.x.xxx unsecured
    win95 p100/64mb win95 xxx.x.x.xxx writing
    druid p100/32mb novell 3.1 xxx.x.x.xxx file & print

    Table 1.3: The "Complete Hacker's Handbook" network

    This is a perfect situation, because however many odd packets I drenched the LAN with, all I had to do was reboot one or more machines. Please note that the addresses starting xxx.x.x.x are assigned to someone else. I only used them when setting up the network as an example. Don't type in the examples from this book using xxx.x.x.x addresses; you might upset the owners of the machines.


  • Home 01 02 03 04 05 06 07 08 09 10 11 12 13 14 Next


    Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License.