Footprinting, Reconnaissance, Scanning, and Enumeration
- "Do I Know This Already?" Quiz
- Footprinting
- Scanning
- Summary
- Exam Preparation Tasks
- Review All Key Topics
- Define Key Terms
- Exercises
- Review Questions
- Suggested Reading and Resources
This chapter covers the following topics:
Footprinting: The process of accumulating data about a specific network environment, usually for the purpose of completing the footprinting process, mapping the attack surface, and finding ways to intrude into the environment. Fingerprinting can be categorized as either active or passive. Active fingerprinting is more accurate but also more easily detected. Passive fingerprinting is the act of identifying systems without injecting traffic or packets into the network. EC Council defines footprinting as a part of a larger process known as reconnaissance.
Reconnaissance: An information-gathering stage of a hacking process that collects data about the target system. The goal of reconnaissance is to identify as many potential attack vectors as possible. Data collected from reconnaissance can include security policies, network infrastructure (such as IP address range and subnet mask), employee contact details (such as email addresses and phone numbers) and host information (such as operating system type and version). All these can be used to find vulnerabilities.
Scanning: The identification of active machines that is accomplished by means of ping sweeps and port scans. Both aid in an analysis of understanding whether the machine is actively connected to the network and reachable. After all details of a network and its operations have been recorded, the attacker can then identify vulnerabilities that could possibly allow access or act as an entry point.
Enumeration: A technique of extracting valid usernames, machine names, directory names, and so on, from a system. Enumeration gives attackers a lot of information that can be used to exploit vulnerabilities. Enumeration collects detailed information about a target system, such as the operating system and network details. Enumeration can be used in an offensive and defensive manner. Enumeration is important in ethical hacking because it gives hackers the necessary information that can be used to launch an attack.
This chapter introduces you to two of the most important pre-attack phases: footprinting and scanning. Although these steps don’t constitute breaking in, they occur at the point at which a hacker or ethical hacker will start to get information. The goal here is to discover what a hacker or other malicious user can uncover about the organization, its technical infrastructure, locations, employees, policies, security stance, and financial situation. Just as most hardened criminals don’t rob a jewelry store without preplanning, elite hackers and cybercriminals won’t attack a network before they understand what they are up against. Even script kiddies will do some pre-attack reconnaissance as they look for a target of opportunity. For example, think of how a burglar walks around a building to look for entry points.
This chapter begins by looking at a number of general mechanisms individuals can attempt to passively gain information about an organization without alerting the organization. This chapter also discusses interactive scanning techniques and reviews their benefits. Note in this context, the goal of scanning is to discover open ports and applications. This chapter concludes with attack surface mapping techniques.
“Do I Know This Already?” Quiz
The “Do I Know This Already?” quiz enables you to assess whether you should read this entire chapter thoroughly or jump to the “Exam Preparation Tasks” section. If you are in doubt about your answers to these questions or your own assessment of your knowledge of the topics, read the entire chapter. Table 3-1 lists the major headings in this chapter and their corresponding “Do I Know This Already?” quiz questions. You can find the answers in Appendix A, “Answers to the ‘Do I Know This Already?’ Quizzes and Review Questions.”
Table 3-1 “Do I Know This Already?” Section-to-Question Mapping
Foundation Topics Section |
Questions |
|---|---|
Footprinting |
1–8 |
Scanning |
9–15 |
1. Where should an ethical hacker start the information-gathering process?
a. Interview with company
b. Dumpster diving
c. Company’s website
d. Interview with employees
2. What common Windows and Linux tool is used for port scanning?
a. Hping
b. Amap
c. Nmap
d. SuperScan
3. What does the Nmap -sT switch do?
a. UDP scan
b. ICMP scan
c. TCP full connect scan
d. TCP ACK scan
4. Which of the following would be considered outside the scope of footprinting and information gathering?
a. Finding physical addresses
b. Attacking targets
c. Identifying potential targets
d. Reviewing a company website
5. During a security assessment, you are asked to help with a footprinting activity. Which of the following might be used to determine network range?
a. ARIN
b. DIG
c. Traceroute
d. Ping host
6. You have been asked to gather some specific information during a penetration test. The “intitle” string is used for what activity?
a. Traceroute
b. Google search
c. Website query
d. Host scanning
7. During a footprinting exercise, you have been asked to gather information from APNIC and LACNIC. What are these examples of?
a. IPv6 options
b. DHCP servers
c. DNS servers
d. RIRs
8. CNAMEs are associated with which of the following?
a. ARP
b. DNS
c. DHCP
d. Google hacking
9. Which of the following TCP scan types is also known as the half-open scan?
a. FIN scan
b. XMAS scan
c. SYN scan
d. Null scan
10. What scan is also known as a zombie scan?
a. IDLE scan
b. SYN scan
c. FIN scan
d. Stealth scan
11. What is the TCP port scan that is used to toggle on the FIN, URG, and PSH TCP flags?
a. XMAS scan
b. Null scan
c. ACK scan
d. None of these answers are correct
12. You were hired to perform penetration testing for a local school. You discovered an FTP server in the network. What type of FTP scan technique would make the scan harder to trace?
a. FTP bounce scan
b. FTP stealth SYN scan
c. FTP null scan
d. Slowloris FTP scan
13. Which of the following tools can be used to enumerate systems that are running NetBIOS?
a. Nmap
b. nbtscan
c. Metasploit
d. All of these answers are correct
14. What type of information can you obtain when successfully enumerating insecure SNMP systems?
a. Network interface configuration
b. The device hostname and current time
c. The device IP routing table
d. All of these answers are correct
15. What SMTP command can be used to verify whether a user’s email mailbox exists in an email server?
a. EXPN
b. VRFY
c. RCPT
d. None of these answers are correct
