Home > Articles

This chapter is from the book

This chapter is from the book

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
  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?

    • circle.gif A. Nmap –P0
    • circle.gif B. Nmap -sO
    • circle.gif C. Nmap -sS
    • circle.gif D. Nmap -O
  2. Which of the following should be performed first in any penetration test?

    • circle.gif A. Social engineering
    • circle.gif B. Nmap port scanning
    • circle.gif C. Passive information gathering
    • circle.gif 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?

    • circle.gif A. Ping request type 5, ping reply type 3
    • circle.gif B. Ping request type 8, ping reply type 0
    • circle.gif C. Ping request type 3, ping reply type 5
    • circle.gif 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?

    • circle.gif A. 1500 bytes
    • circle.gif B. 576 bytes
    • circle.gif C. 68 bytes
    • circle.gif D. 1518 bytes
  5. Which of the following does Nmap require for an OS identification?

    • circle.gif A. One open and one closed port
    • circle.gif B. Two open ports and one filtered port
    • circle.gif C. One closed port
    • circle.gif D. One open port
  6. Which of the following netcat commands could be used to perform a UDP scan of the lower 1024 ports.

    • circle.gif A. Nc -sS -O target 1-1024
    • circle.gif B. Nc –hU <host(s)>
    • circle.gif C. Nc –sU –p 1-1024 <host(s)>
    • circle.gif D. Nc –u –v –w2 <host> 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?

    • circle.gif A. A proxy
    • circle.gif B. DMZ
    • circle.gif C. IDS
    • circle.gif D. Bastion host
  8. What is a null scan?

    • circle.gif A. A scan in which the FIN, URG, and PSH flags are set
    • circle.gif B. A scan in which all flags are off
    • circle.gif C. A scan in which the SYN flag is on
    • circle.gif 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?

    • circle.gif A. Windows 98
    • circle.gif B. Linux
    • circle.gif C. Windows 2000
    • circle.gif D. Windows NT
  10. Which of the following tools is used for passive OS guessing?

    • circle.gif A. Nmap
    • circle.gif B. P0f
    • circle.gif C. Queso
    • circle.gif 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.

    • circle.gif A. Stealth scanning
    • circle.gif B. ACK scanning
    • circle.gif C. UDP scanning
    • circle.gif D. FIN Scan
  12. A connect or SYN scan of an open port produces which of the following responses from a target?

    • circle.gif A. SYN/ACK
    • circle.gif B. ACK
    • circle.gif C. RST
    • circle.gif 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?

    • circle.gif A. The port is filtered at the router.
    • circle.gif B. The port is open.
    • circle.gif C. The target is using a port knocking technique.
    • circle.gif 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?

    • circle.gif A. AfriNIC
    • circle.gif B. ARIN
    • circle.gif C. APNIC
    • circle.gif D. RIPE
  15. While footprinting a network, what port/service should you look for to attempt a zone transfer?

    • circle.gif A. 53 UDP
    • circle.gif B. 53 TCP
    • circle.gif C. 161 UDP
    • circle.gif D. 22 TCP

Answers to Exam Questions

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 6. D.. The proper syntax for a UDP scan using Netcat is Netcat –u –v –w2 <host> 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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.

  12. 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.

  13. 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.

  14. 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.

  15. 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.doc—Demystifying Google hacks

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

http://www.windowsnetworking.com/kbase/WindowsTips/WindowsXP/AdminTips/Network/nslookupandDNSZoneTransfers.html—DNS zone transfers

http://www.auditmypc.com/freescan/readingroom/port_scanning.asp—Port scanning techniques

http://johnny.ihackstuff.com/security/premium/The_Google_Hackers_Guide_v1.0.pdf—The Google Hackers Guide

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

www.microsoft.com/technet/archive/winntas/maintain/tcpip.mspx—TCP/IP from a security viewpoint

www.sys-security.com/archive/papers/ICMP_Scanning_v2.5.pdf—ICMP usage in scanning

Pearson IT Certification Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Pearson IT Certification and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Pearson IT Certification products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.pearsonitcertification.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020