Hacking Basics
Hacking Basics
Hacking Basics
Zachary Wilson
April 4, 2001
Introduction
Attacker Profiles
There are two words to describe the attacker: hacker and attacker. A
hacker is a generic term for a person who likes getting into things. The
benign hacker is the person who likes to get into his/her own computer and
understand how it works. The malicious hacker is the person who likes
getting into other people's systems. The benign hackers wish that the
media would stop bad-mouthing all hackers and use the term 'attacker'
instead. Unfortunately, this is not likely to happen. In any event, the word
used to denote anybody trying to get into your system in this paper is
'attacker'.
Outsiders
These are attackers from outside your network attempting to attack
you external presence (deface web servers, forward spam through e-
mail servers, etc.). They may also attempt to go around the firewall to
attack machines on the internal network. Outside attackers may come
from the Internet, dial-up lines, physical break-ins, or from partner
(vendor, customer, reseller, etc.) network that is linked to your
corporate network.
Insiders
Intrusion Techniques
These are the primary ways an attacker can get into a system:
Software bugs
Password cracking
Design flaws
Acquiring Passwords
Another scenario starts differently. Rather than attack a specific site, and
attacker might simply scan random Internet addresses looking for a specific
hole. For example, an attacker may attempt to scan the entire Internet for
machines that have the SendMail DEBUG hole. They simply exploit such
machines that they find. They don't target you directly, and they really won't
even know who you are. (This is known as a 'birthday attack'; given a list of
well-known security holes and a list of IP addresses, there is a good
chance that there exists some machine somewhere that has one of those
holes).
Common exploits
CGI scripts
Web servers often have bugs related to their interaction with the
underlying operating system. An old hole in Microsoft IIS have been
dealing with the fact that files have two names, a long filename and a
short 8.3 hashed equivalent that could sometimes be accessed
bypassing permissions. NTFS (the new file system) has a feature
called "alternate data streams" that is similar to the Macintosh data
and resource forks. You could access the file through its stream
name by appending "::$DATA" in order to see a script rather than run
it.
Servers have long had problems with URLs. For example, the "death
by a thousand slashes" problem in older Apache would cause huge
CPU loads as it tried to process each directory in a thousand slash
URL.
HTTP headers can be used to exploit bugs because some fields are
passed to functions that expect only certain information.
Java has a robust security model, but that model has proven to have
the occasional bug (though compared to everything else, it has
proven to be one of the most secure elements of the whole system).
Moreover, its robust security may be its undoing: Normal Java
applets have no access to the local system, but sometimes they
would be more useful if they did have local access. Thus, the
implementation of "trust" models that can more easily be hacked.
IMAP
Users retrieve e-mail from servers via the IMAP protocol (in contrast,
SMTP transfers e-mail between servers). Hackers have found a
number of bugs in several popular IMAP servers.
IP spoofing
There is a range of attacks that take advantage of the ability to forge
(or 'spoof') your IP address. While a source address is sent along
with every IP packet, it isn't actually used for routing. This means an
attacker can pretend to be you when talking to a server. The attacker
never sees the response packets (although your machine does, but
throws them away because they don't match any requests you've
sent). The attacker won't get data back this way, but can still send
commands to the server pretending to be you.
SMURF
Ping sweeps
TCP scans
Probes for open (listening) TCP ports looking for services the attacker
can exploit. Scans can use normal TCP connections or stealth scans
that use half-open connections (to prevent them from being logged)
or FIN scans (never opens a port, but tests if someone's listening).
Scans can be sequential, randomized, or configured lists of ports.
UDP scans
OS identification
Ping-of-Death
Sends an invalid fragment, which starts before the end of packet, but
extends past the end of the packet.
SYN Flood
Sends TCP SYN packet (which start connections) very fast, leaving
the victim waiting to complete a huge number of connections, causing
it to run out of resources and dropping legitimate connections. A new
defense against this is the "SYN cookies". Each side of a connection
has its own sequence-number. In response to a SYN, the attacked
machine creates a special sequence number that is a "cookie" of the
connection then forgets everything it knows about the connection. It
can then recreate the forgotten information about the connection
when the next packets come in from a legitimate connection.
Land/Latierra
WinNuke
Conclusion
Works consulted
CERT Incident Note 99-07. Distributed Denial of Service Tools. Nov 18,
1999.
URL: http://www.cert.org/incident_notes/IN-99-07.html