.NODE

The Seven-Step Information Gathering Process

Apply Your Knowledge

You have seen many of the tools used for passive reconnaissance in this Chapter. Passive reconnaissance is the act of gathering as much information about a target as passively as you can. Tools such as Whois, Nslookup, Sam Spade, traceroute, ARIN, and IANA are all useful for this task.

In this exercise, you will gather information about several organizations. Your goal is to use the tools discussed in the Chapter for passive information gathering. No port scans, no OS fingerprinting, or banner grabbing should be performed. Treat these organizations with the utmost respect.

Exercises

3.1. Performing Passive Reconnaissance

The best way to learn passive information gathering is to use the tools. In this exercise, you will perform reconnaissance on several organizations. Acquire only the information requested.

Estimated Time: 20 minutes.

  1. Review Table 3.7 to determine the target of your passive information gathering.

    Table 3.7. Passive Information Gathering

    Domain Name

    IP Address

    Location

    Contact Person

    Phone Number

    Address

    Redriff.com

             

    Examcram.com

             
     

    72.3.246.59

           

    Rutgers.edu

             
     
  2. Start by resolving the IP address. This can be done by pinging the site.
  3. Next, use a tool such as Sam Spade or any of the other tools mentioned throughout the Chapter. Some of these include

    • www.betterwhois.com
    • www.allwhois.com
    • http://geektools.com
    • www.all-nettools.com
    • www.dnsstuff.com
    • www.samspade.org
  4. To verify the location of the organization, perform a traceroute or a ping with the r option.
  5. Use the ARIN, RIPE, and IANA to fill in any information you have yet to acquire.
  6. Compare your results to those found in Table 3.8.

Table 3.8. Passive Information Gathering

Domain Name

IP Address

Location

Contact Person

Phone Number

Address

Redriff.com

64.235.246.143

Los Angeles, CA

Admin

213-683-9910

5482 Wilshire Blvd

Examcram.com

63.240.93.157

Old Tappan, NJ

Kenneth Simmons

201-784-6187 123

Old Tappan Rd

Theregister.com

72.3.246.59

Southport Merseyside, UK

Philip Mitchell

+44-798-089-8072

19 Saxon Road

Rutgers.edu

128.6.72.102

Piscataway, NJ

Net Manager

732-445-2293

110 Frelinghuysen Road

 

3.2. Performing Active Reconnaissance

The best way to learn active information gathering is to use the tools. In this exercise, you will perform reconnaissance on your own internal network. If you are not on a test network make sure you have permission before scanning or it may be seen as the precursor of an attack.

Estimated Time: 15 minutes.

  1. Download the most current version of Nmap from www.insecure.org/nmap/download.html. For Windows systems, the most current version is 3.95.
  2. Open a command prompt and go to the directory that you have installed Nmap in.
  3. Run Nmap h from the command line to see the various options.
  4. You'll notice that Nmap has many different options. Review and find the option for a full connect scan. Enter your result here: ______
  5. Review and find the option for a stealth scan. Enter your result here: ____
  6. Review and find the option for a UDP scan. Enter your result here: ____
  7. Review and find the option for a fingerprint scan. Enter your result here: ____
  8. Perform a full connect scan on one of the local devices you have identified on your network. The syntax is Nmap -sT IP_Address.
  9. Perform a stealth scan on one of the local devices you have identified on your network. The syntax is Nmap -sS IP_Address.
  10. Perform a UDP scan on one of the local devices you have identified on your network. The syntax is Nmap -sU IP_Address.
  11. Perform a fingerprint scan on one of the local devices you have identified on your network. The syntax is Nmap -O IP_Address.
  12. Observe the results of each scan Was. Nmap capable of successfully identifying the system? Were the ports it identified correct?

Exam Questions

1.

Your client has asked you to run an Nmap scan against the servers they have located in their DMZ. They would like you to identify the OS. Which of the following switches would be your best option?

A. Nmap P0

B. Nmap -sO

C. Nmap -sS

D. Nmap -O

2.

Which of the following should be performed first in any penetration test?

A. Social engineering

B. Nmap port scanning

C. Passive information gathering

D. OS fingerprinting

3.

ICMP is a valuable tool for troubleshooting and reconnaissance. What is the correct type for a ping request and a ping response?

A. Ping request type 5, ping reply type 3

B. Ping request type 8, ping reply type 0

C. Ping request type 3, ping reply type 5

D. Ping request type 0, ping reply type 8

4.

You have become interested in fragmentation scans and how they manipulate the MTU value. What is the minimum value specified for IP's MTU?

A. 1500 bytes

B. 576 bytes

C. 68 bytes

D. 1518 bytes

   
5.

Which of the following does Nmap require for an OS identification?

A. One open and one closed port

B. Two open ports and one filtered port

C. One closed port

D. One open port

6.

Which of the following netcat commands could be used to perform a UDP scan of the lower 1024 ports.

A. Nc -sS -O target 1-1024

B. Nc hU

C. Nc sU p 1-1024

D. Nc u v w2 1-1024

7.

Which of the following terms is used to refer to a network that is connected as a buffer between a secure internal network and an insecure external network such as the Internet?

A. A proxy

B. DMZ

C. IDS

D. Bastion host

8.

What is a null scan?

A. A scan in which the FIN, URG, and PSH flags are set

B. A scan in which all flags are off

C. A scan in which the SYN flag is on

D. A scan in which the window size is altered

9.

You have captured some packets from a system you would like to passively fingerprint. You noticed that the IP header length is 20 bytes and there is a datagram length of 84 bytes. What do you believe the system to be?

A. Windows 98

B. Linux

C. Windows 2000

D. Windows NT

   
10.

Which of the following tools is used for passive OS guessing?

A. Nmap

B. P0f

C. Queso

D. Xprobe 2

11.

This type of scan is harder to perform because of the lack of response from open services and because packets could be lost due to congestion or from firewall blocked ports.

A. Stealth scanning

B. ACK scanning

C. UDP scanning

D. FIN Scan

12.

A connect or SYN scan of an open port produces which of the following responses from a target?

A. SYN/ACK

B. ACK

C. RST

D. RST/ACK

13.

You have just performed an ACK scan and have been monitoring a sniffer while the scan was performed. The sniffer captured the result of the scan as an ICMP type 3 code 13. What does this result mean?

A. The port is filtered at the router.

B. The port is open.

C. The target is using a port knocking technique.

D. The port is closed.

14.

One of the members of your security assessment team is trying to find out more information about a client's website. The Brazilian-based site has a .com extension. She has decided to use some online whois tools and look in one of the regional Internet registries. Which of the following represents the logical starting point?

A. AfriNIC

B. ARIN

C. APNIC

D. RIPE

   
15.

While footprinting a network, what port/service should you look for to attempt a zone transfer?

A. 53 UDP

B. 53 TCP

C. 161 UDP

D. 22 TCP

Answers to Exam Questions

A1:

1. D. Running Nmap O would execute OS guessing. Answer A is incorrect, as Nmap P0 means do not ping before scanning. Answer B is incorrect because Nmap sO would perform a IP Protocol scan. Answer C is incorrect, as Nmap sS would execute a TCP stealth scan.

A2:

2. C. Passive information gathering should be the first step performed in the penetration test. EC-Council defines seven steps in the pre-attack phase, which include passive information gathering, determining the network range, identifying active machines, finding open ports and access points, OS fingerprinting, fingerprinting services, and mapping the network. Answer A is incorrect because social engineering is not the first step in the process. Answer B is incorrect, as Nmap port scanning would not occur until after passive information gathering. Answer D is incorrect because OS fingerprinting is one of the final steps, not the first.

A3:

3. B. Ping is the most common ICMP type. A ping request is a type 8, and a ping reply is a type 0. All other answers are incorrect because a request is always a type 8 and a reply is always a type 0. An ICMP type 5 is redirect, and a type 3 is destination unreachable. For a complete listing of ICMP types and codes, reference RFC 792.

A4:

4. C. RFC 1191 specifies that when one IP host has a large amount of data to send to another host, the data is transmitted as a series of IP datagrams. IP is designed so that these datagrams be of the largest size that does not require fragmentation anywhere along the path from the source to the destination. The specified range is from 68 to 65535 bytes. Answer A is incorrect, as 1500 bytes is the MTU for Ethernet. Answer B is incorrect, as 576 bytes is the default MTU for IP. Answer D is incorrect because that value is the frame size for Ethernet.

A5:

5. A. Nmap requires one open and one closed port to perform OS identification. Answers B, C, and D are incorrect because none of these answers list one open and one closed port, which is the minimum required for OS identification.

A6:

6. D.. The proper syntax for a UDP scan using Netcat is Netcat u v w2 1-1024. Netcat is considered the Swiss army knife of hacking tools because it is so versatile. Answers A, B, and C are incorrect because they do not correctly specify the syntax used for UDP scanning with netcat.

   
A7:

7. B. A DMZ is a separate network used to divide the secure inner network from the unsecure outer network. Services such as HTTP, FTP, and email may be placed there. Answer A is incorrect, as a proxy is simply a system that stands in place of and does not specifically define a DMZ. Answer C is incorrect because an IDS is used to detect intrusions or abnormal traffic. Answer D is incorrect, as a bastion host is a computer that is fully on the public side of the demilitarized zone and is unprotected by a firewall or filtering router.

A8:

8. B. A null scan is a TCP-based scan in which all flags are turned off. Answer A is incorrect because it describes a XMAS scan. Answer C is incorrect because this could describe a TCP full connect of a stealth scan. Answer D is incorrect, as it describes a TCP WIN scan.

A9:

9. B. Active fingerprinting works by examining the unique characteristics of each OS. One difference between competing platforms is the datagram length. On a Linux computer, this value is typically 84, whereas Microsoft computers default to 60. Therefore, answers A, C, and D are incorrect, as they are all Windows OSes.

A10:

10. B. P0f is a passive OS fingerprinting tool. Answers A, C, and D are incorrect, as Queso was the first active fingerprinting tool, Nmap is probably the most well-known, and Xprobe 2 is the next generation of OS fingerprinting tools. These active tools have the capability to look at peculiarities in the way that each vendor implements the RFCs. These differences are compared with its database of known OS fingerprints. Then a best guess of the OS is provided to the user.

A11:

11. C. UDP scanning is harder to perform because of the lack of response from open services and because packets could be lost due to congestion or a firewall blocking ports. Answer A is incorrect, as a stealth scan is a TCP-based scan and is much more responsive than UDP scans. Answer B is incorrect because an ACK scan is again performed against TCP targets to determine firewall settings. Answer D is incorrect, as FIN scans also target TCP and seek to elicit a RST from a Windows-based system.

A12:

12. A. A full connect or SYN scan of a host will respond with a SYN/ACK if the port is open. Answer B is incorrect, as an ACK is not the normal response to the first step of a three step startup. Answer C is incorrect because an RST is used to terminate an abnormal session. Answer D is incorrect because an RST/ACK is not a normal response to a SYN packet.

A13:

13. A. An ICMP type 3 code 13 is administrative filtered. This type response is returned from a router when the protocol has been filtered by an ACL. Answer B is incorrect, as the ACK scan only provides a filtered or unfiltered response; it never connects to an application to confirm an open state. Answer C is incorrect, as port knock requires you to connect to a certain number of ports in a specific order. Answer D is incorrect, as again, an ACK scan is not designed to report a closed port; its purpose it to determine the router or firewall's rule set. Although this might appear limiting, the ACK scan can characterize the capability of a packet to traverse firewalls or packet filtered links.

A14:

14. B. Regional registries maintain records from the areas from which they govern. ARIN is responsible for domains served within North and South America; therefore, would be the logical starting point for that .com domain. Answer A is incorrect because AfriNIC is the RIR proposed for Africa. Answer C is incorrect because APNIC is the RIR for Asia and Pacific Rim countries. Answer D is incorrect because RIPE is the RIR for European-based domains.

A15:

15. B. TCP port 53 is used for zone transfers; therefore, if TCP 53 is open on the firewall, there is an opportunity to attempt a zone transfer. Answer A is incorrect, as UDP 53 is typically used for DNS lookups. Answer C is incorrect because UDP 161 is used for SNMP. Answer D is incorrect, as TCP 22 is used for SSH.

Suggested Reading and Resources

www.infosecwriters.com/text_resources/doc/Demystifying_Google_Hacks.docDemystifying Google hacks

www.professionalsecuritytesters.org/modules.php?name=Downloads&d_op=getit&lid=13Reconnaissance and footprinting cheat sheet

http://www.windowsnetworking.com/kbase/WindowsTips/WindowsXP/AdminTips/Network/nslookupandDNSZoneTransfers.htmlDNS zone transfers

http://www.auditmypc.com/freescan/readingroom/port_scanning.aspPort scanning techniques

http://johnny.ihackstuff.com/security/premium/The_Google_Hackers_Guide_v1.0.pdfThe Google Hackers Guide

http://www.securityfocus.com/infocus/1224Passive fingerprinting

www.microsoft.com/technet/archive/winntas/maintain/tcpip.mspxTCP/IP from a security viewpoint

www.sys-security.com/archive/papers/ICMP_Scanning_v2.5.pdfICMP usage in scanning

Enumeration and System Hacking

Part I: Exam Preparation

The Business Aspects of Penetration Testing

The Technical Foundations of Hacking

Footprinting and Scanning

Enumeration and System Hacking

Linux and Automated Security Assessment Tools

Trojans and Backdoors

Sniffers, Session Hijacking, and Denial of Service

Web Server Hacking, Web Applications, and Database Attacks

Wireless Technologies, Security, and Attacks

IDS, Firewalls, and Honeypots

Buffer Overflows, Viruses, and Worms

Cryptographic Attacks and Defenses

Physical Security and Social Engineering

Part II: Final Review

Part III: Appendixes

Appendix A. Using the ExamGear Special Edition Software





Certified Ethical Hacker Exam Prep
Certified Ethical Hacker Exam Prep
ISBN: 0789735318
EAN: 2147483647
Year: 2007
Pages: 247
Authors: Michael Gregg
Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net