Computer attacks happen each and every day. Simply connect an
innocuous computer to the Internet, and someone will try to pry into
the machine three, five, or a dozen times each day. Even without any
advertisements or links bringing attention to it, your machine will constantly
get scanned by attackers looking for vulnerable prey. If the computer
is used for actual business purposes, such as a commercial,
educational, not-for-profit, or military site, it will get even more attention
Many of these attacks are mere scans looking for holes in a system's
armor. Others are really sophisticated computer break-ins, which
occur with increasing frequency, as any glimpse of recent headlines
demonstrates. In just a year's time, major banks have been victims of
attackers who could view detailed information about customers' bank
accounts. Attackers have stolen gobs of credit card numbers from e-commerce
sites, often turning to extortion of the e-commerce company
to get paid not to release customers' credit card information. Numerous
online trading companies, news firms, and e-commerce sites were temporarily
shut down due to major packet floods, causing the companies
to lose revenue as customers turned to other sources, and erasing billions
from the market capitalization of the victims. A major U.S.-based
software development company discovered that attackers had broken
into its network and stolen the source code for future releases of its popular
products. The stories go on and on.
The purpose of this book is to illustrate how many of these attacks
are conducted so that you can defend your computers against cyber
siege. By exploring in detail the techniques used by the bad guys, we can
learn how to defend our systems and turn the tables on the attackers.
The Computer World and the Golden Age of Hacking
Over the last several decades, our society has rapidly become very
dependent on computer technology. We've taken the controls for our
whole civilization and loaded them onto digital machines. Our systems
are responsible for storing sensitive medical information, guiding aircraft
around the world, conducting nearly all financial transactions,
planning food distribution, and even transmitting love letters. When I
was a kid, computers were for nerds and were avoided by most people.
A decade ago, the Internet was the refuge of researchers and academics.
Now, as a major component of our population stares into computer
screens and talks on cell phones all day long for both business and personal
use, these technologies dominate our headlines and economy.
I'm sure you've noticed that the underlying technologies behind
computers and networks have many flaws. Sure, there are counterintuitive
user interfaces and frequent computer crashes. Beyond these easily
observed problems, there are some fundamental flaws in the design and
implementation of the underlying operating systems, applications, and
protocols. By undermining these flaws, an attacker can steal data, take
over systems, or otherwise wreak havoc.
Indeed, we have created a world that is inherently hackable. With
our great reliance on computers and the numerous flaws found in most
systems, today is the Golden Age of Hacking. New flaws in computer
technology are being discovered every day and widely shared through-out
a burgeoning computer underground. By setting up a lab in the
comfort of their own homes, attackers and security researchers can create
a scaled down copy of the computer platforms used by giant corporations,
government agencies, or military operations, using the same
operating systems, routers, and other gadgetry as their ultimate target.
By scouring the systems looking for new vulnerabilities, attackers can
hone their skills and discover new vulnerabilities to exploit.
Computer technology is continuing its advance into every nook
and cranny of our lives. Companies are now selling electric blankets
with network connections, so you can make your bed warm and toasty
from across your room or the planet. Andy Grove, the chairman of
Intel, frequently discusses a future where your refrigerator will have an
Internet connection so it can call the local grocery store and order more milk when you are running low. Scott McNealy, CEO of Sun Microsystems,
talks about lightbulbs (yes, lightbulbs!) with network connections
that allow them to make calls to lightbulb companies when a bulb is
about to burn out. That way, the new bulb can arrive with a map to the
dying bulb's location and be changed in real time. In the very near
future, your car will have a wireless network connection supporting map
downloads, remote troubleshooting, and—God help us—email while
you drive. And what underlies all of these rapidly approaching future
technologies? Computers and the networks that link them together.
With these advances, our current Golden Age of Hacking could get
even more golden for the attackers. Think about it—today, an attacker
tries to break into your computer by scanning through your Internet
connection. In the near future, someone may try to hack into your net-work-
enabled automobile while you are driving down the street. You've
heard of carjacking? Get ready for the world of car hacking.
Why This Book?
If you know the enemy and know yourself,
you need not fear the result of a hundred battles.
If you know yourself but not the enemy,
for every victory gained you will also suffer a defeat.
If you know neither the enemy nor yourself,
you will succumb in every battle.
—Sun Tzu, Art of War
Translation and commentary by Lionel Giles (part of Project Gutenberg)
“Golly gee!” you may be thinking. “Why write a book on hacking?
You'll just encourage them to attack more!” While I respect your concern,
unfortunately there are some flaws behind this logic. Let's face it—
the malicious attackers have all the information they need to do all
kinds of nasty things. If they don't have the information now, they can
get it easily enough on the Internet through a variety of Web sites, mailing
lists, and newsgroups devoted to hacking, as described in the concluding
chapter of this book. Experienced attackers often selectively
share information with new attackers to get them started on the craft.
Indeed, the communication channels in the computer underground
among attackers are often far better than the communication among
computer professionals like you and me. This book is one way to help
make things more even.
My purpose here is not to create an army of barbarian hackers
mercilessly bent on world domination. The focus of this book is on
defense. To create an effective defense, we must understand the offensive
tools used by our adversaries. By seeing how the tools truly work
and understanding what they can do, not only can we better see the
needs for good defenses, but also we can better understand how to
apply the appropriate defensive techniques.
This book is designed for system administrators, security personnel,
and network administrators whose jobs require them to defend their systems
from attack. Additionally, other curious folks who want to learn
how attackers work and techniques for defending systems against attacks
can benefit. The book includes practical recommendations for people
who have to deal with the care and feeding of systems, keeping them
running and keeping the bad guys out. With this understanding, we can
work to create an environment where effective defensive techniques are
commonplace, and not the exception. As good ol' Sun Tzu said, you
must understand your enemy's capabilities as well as your own. For each
offensive technique described in this book, real-world defenses are also
described. You can measure your own security capabilities against these
defenses to see how you stack up. Where your policies, procedures, and
systems fall short, you can implement appropriate defenses to protect
against the enemy. And that's what this book is all about: Learning what
the attackers do so we can defend ourselves....