Ethical Hacking - Footprinting Footprinting Overview: Unit 2
Ethical Hacking - Footprinting Footprinting Overview: Unit 2
Footprinting Overview
Footprinting Steps
Internet Footprinting
During discussions with the client you may determine the assessment scope
will include:
The first place to begin the security assessment is the company's web site
following an initial review of the website you will next want to examine the
following:
Perform a Zone Transfer via Windows or Linux. When successful you will
obtain a list of all the hosts and IP addresses.
1. Information gathering
2. Determining the network range
3. Identifying active machines
4. Finding open ports and access points
5. OS fingerprinting
6. Fingerprinting services
7. Mapping the network
Information Gathering
The information gathering steps of footprinting and scanning are of utmost
importance. Good information gathering can make the difference between a
successful pen test and one that has failed to provide maximum benefit to the
client. An amazing amount of information is available about most organizations in
business today. This information can be found on the organization's website,
trade papers, Usenet, financial databases, or even from disgruntled employees.
Some potential sources are discussed, but first, let's review documentation.
Documentation
The Organization's Website
Job Boards
Alternative Websites
Google Hacking
Now that the pen test team has been able to locate name, phone numbers,
addresses, some server names, and IP addresses, it's important to find out what
range of IP addresses are available for scanning and further enumeration. If you
take the IP address of a web server discovered earlier and enter it into the Whois
lookup at www.arin.net, the network's range can be determined.
Attackers will want to know if machines are alive before they attempt to attack.
One of the most basic methods of identifying active machines is to perform a
ping sweep. Although ping is found on just about every system running TCP/IP, it
has been restricted by many organizations. Ping uses ICMP and works by
sending an echo request to a system and waiting for the target to send an echo
reply back. If the target device is unreachable, a request time out is returned.
Ping is a useful tool to identify active machines and to measure the speed at
which packets are moved from one host to another or to get details like the
TTL. Figure 3.7 shows a ping capture from a Windows computer. If you take a
moment to examine the ASCII decode in the bottom-left corner, you will notice
that the data in the ping packet is composed of the alphabet, which is unlike a
Linux ping, which would contain numeric values. That's because the RFC that
governs ping doesn't specify what's carried in the packet as payload. Vendors fill
in this padding as they see fit. Unfortunately, this can also serve hackers as
a covert channel. However, hackers can use a variety of programs to place their
own information in place of the normal padding. Then what appears to be normal
pings are actually a series of messages entering and leaving the network.
Ping does have a couple of drawbacks: First, only one system at a time is pinged
and second, not all networks allow ping. To ping a large amount of hosts, a ping
sweep is usually performed. Programs that perform ping sweeps typically sweep
through a range of devices to determine which ones are active. Some of the
programs that will perform ping sweeps include
Angry IP Scanner
Pinger
WS_Ping_ProPack
Network scan tools
Super Scan
Nmap
With knowledge of the network range and a list of active devices, the next step is
to identify open ports and access points. Identifying open ports will go a long way
toward potential attack vectors. There is also the possibility of using war dialing
programs to find ways around an organization's firewall. If the organization is
located close by, the attacker might war drive the area to look for open access
points.
Port Scanning
Objective:
OS Fingerprinting
Objectives:
At this point in the information gathering process, the hacker has made some real
headway. IP addresses, active systems, and open ports have been identified.
Although the hacker might not yet know the type of systems he is dealing with,
he is getting close. There are two ways in which the hacker can attempt to
identify the targeted devices. The hacker's first choice is passive fingerprinting.
The hacker's second choice is to perform active fingerprinting, which basically
sends malformed packets to the target in hope of eliciting a response that will
identify it. Although active fingerprinting is more accurate, it is not as stealthy as
passive fingerprinting.
Fingerprinting Services
Objective:
Be able to perform banner grabbing with tools such as Telnet and netcat
If there is any doubt left as to what a particular system is running, this next step
of information gathering should serve to answer those questions. Knowing what
services are running on specific ports allows the hacker to formulate and launch
application specific attacks. Knowing the common default ports and services and
using tools such as Telnet, FTP, and Netcat are two techniques that can be used
to ensure success at this pre-attack stage.
Mapping the Network
The hacker would have now gained enough information to map the network.
Mapping the network provides the hacker with a blueprint of the organization.
There are manual and automated ways to compile this information. Manual and
automated tools are discussed in the following sections.
Manual Mapping
If you have been documenting findings, the matrix you began at the start of this
Chapter should be overflowing with information. This matrix should now contain
domain name information, IP addresses, DNS servers, employee info, company
location, phone numbers, yearly earnings, recently acquired organizations, email
addresses, the publicly available IP address range, open ports, wireless access
points, modem lines, and banner details.
Automated Mapping
If you prefer a more automated method of mapping the network, a variety of tools
are available. Visual traceroute programs, such as NeoTrace and Visual Route,
are one option. Running traceroute to different servers, such as web, email, and
FTP, can help you map out the placement of these servers. Automatic mapping
can be faster but might generate errors or sometimes provide erroneous results.