
- •Acknowledgments
- •About the Author
- •Contents at a Glance
- •Contents
- •Table of Exercises
- •Introduction
- •Assessment Test
- •Answers to Assessment Test
- •Defining Ethical Hacking
- •How to Be Ethical
- •Keeping It Legal
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Reconnaissance
- •Information-Gathering Methodology
- •Social Engineering
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Scanning
- •Enumeration
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •The Simplest Way to Get a Password
- •Types of Passwords
- •Cracking a Password
- •Understanding Keyloggers and Other Spyware Technologies
- •Escalating Privileges
- •Understanding Rootkits
- •Hiding Files
- •Understanding Steganography Technologies
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Trojans and Backdoors
- •Viruses and Worms
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •How a Sniffer Works
- •Sniffing Countermeasures
- •Bypassing the Limitations of Switches
- •Wireshark Filters
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Denial of Service
- •Session Hijacking
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •How Web Servers Work
- •Types of Web Server Vulnerabilities
- •Web Application Vulnerabilities
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •SQL Injection
- •Buffer Overflows
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Wi-Fi and Ethernet
- •Authentication and Cracking Techniques
- •Using Wireless Sniffers to Locate SSIDs
- •MAC Filters and MAC Spoofing
- •Rogue Access Points
- •Wireless Hacking Techniques
- •Securing Wireless Networks
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Components of Physical Security
- •Understanding Physical Security
- •Physical Site Security Countermeasures
- •What to Do After a Security Breach Occurs
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Linux Basics
- •Compiling a Linux Kernel
- •GCC Compilation Commands
- •Installing Linux Kernel Modules
- •Linux Hardening Methods
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Types of IDSs and Evasion Techniques
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Generating Public and Private Keys
- •Cryptography Algorithms
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Defining Security Assessments
- •Penetration Testing
- •Pen Test Deliverables
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Glossary
- •Index

Answers to Review Questions |
237 |
Answers to Review Questions
1.D. Use of a single quote indicates a SQL injection attack.
2.A. The purpose of mutating a buffer overflow by replacing NOP instructions is to bypass an IDS.
3.C. A heap is using to store dynamic variables.
4.B. The first step in a SQL injection attack is to locate a user input field on a web page using a web browser.
5.D. The command to retrieve information from a SQL database is SELECT.
6.C. Performing bounds checking is a countermeasure for buffer overflow attacks.
7.A. NOP is an acronym for No Operation.
8.C. All a hacker needs to be able to do to launch a buffer overflow attack is to identify a target system. A hacker can run a prewritten exploit to launch a buffer overflow.
9.A. Programs can be exploited because they’re written quickly and poorly.
10.C. The command Blah’;exec master..xp_cmdshell “dir c:\*.* /s >c:\directory
.txt”-- obtains a directory listing utilizing SQL injection.
11.A. Heap and stack are the two types of buffer overflows.
12.B. Dynamic strings are user input fields stored for later execution by the application.
13.D. One purpose of attacking a SQL database–based application is to identify user input parameters susceptible to SQL injection attacks.
14.C. HP’s Scrawlr will scan a web URL to determine if the site is vulnerable to SQL injection attacks.
15.A. A recommended countermeasure to buffer overflow attacks is to use Java-based applications, which are not susceptible to buffer overflow attacks.
16.A. Applications that do not perform bounds checking on user input fields are susceptible to buffer overflow attacks.
17.A, B. Rejecting known bad input and sanitizing and validating user input prior to sending the command to the SQL database is a countermeasure to SQL injection attacks.
18.A. A server error in response to a single quotation mark in a web application user input field indicates the application is not sanitizing the user data and is therefore susceptible to SQL injection attacks.
19.B. Dynamic strings are built on the fly from user input and will vary each time the command is executed.
20.B. A NOP instruction is added to a string just before the malicious code is to be executed.


Chapter
10
Wireless Network
Hacking
CEH Exam Objectives Covered in
This Chapter:
ÛÛOverview of WEP, WPA authentication mechanisms, and cracking techniques
ÛÛOverview of wireless sniffers and locating SSIDs, MAC spoofing
ÛÛUnderstand rogue access points
ÛÛUnderstand wireless hacking techniques
ÛÛDescribe the methods used to secure wireless networks

Wireless networks add another entry point into a network for hackers. Much has been written about wireless security and hacking because wireless is a relatively new technology and rife
with security vulnerabilities. From the increase of Wi-Fi hotspots to the rising number of cell phones, PDAs, and laptops equipped with Wi-Fi radios, wireless security is an ever increasing issue for many organizations.
Because of the broadcast nature of radio frequency (RF) wireless networks and the rapid adoption of wireless technologies for home and business networks, many hacking opportunities exist in wireless networking. Even for organizations with a “no wireless” policy—meaning they do not support any Wi-Fi connectivity—rogue wireless access points placed on the LAN are an increasing threat. The cost of Wi-Fi equipment is dropping and many organizations are pressing the IT staff to install wireless networks to complement or replace existing wired networks.
Wi-Fi and Ethernet
It is important to recognize that Wi-Fi networks are fundamentally different from Ethernet networks. Whereas in an Ethernet network the data is carried in frames on copper or fiber-optic cabling, in a Wi-Fi network the data travels across open air. Additionally, any encryption applied to wireless networks only encrypts the data itself, leaving the header potion of the wireless frame open to many types of attacks. The details of wireless attacks and countermeasures will be covered later in this chapter, but first you need to understand the fundamentals of the 802.11 standards and protocols.
802.11 Wireless LANs operate at layer 1 and 2 of the OSI Model. This means that the protocols in use on a WLAN are the same from Layer 3 (usually IP) on up to Layer 7 (the application layer). See Figure 10.1.
Many people call 802.11 WLANs “wireless Ethernet,” which is a big misnomer. 802.11 has a completely different frame format at Layer 2 than does 802.3 (Ethernet). For example, Ethernet Layer 2 frames carry only two MAC addresses, while 802.11 frames have fields for four MAC addresses. Ethernet just defines source and destination addresses, while

Wi-Fi and Ethernet |
241 |
an 802.11 frame can define source, destination, transmitter and receiver. 802.11 frames also carry a frame control field in the MAC header used to indicate information about the frame, such as if the frame is encrypted. See Figure 10.2.
F i g u r e 10 .1 Wireless LANs in the OSI Model
Application |
|
|
|
Application |
|
|
|
||
|
|
|
|
|
Presentation |
|
|
|
Presentation |
|
|
|
||
|
|
|
|
|
Session |
|
|
|
Session |
|
|
|
||
|
|
|
|
|
Transport |
|
|
|
Transport |
|
|
|
||
|
|
|
|
|
Network |
|
|
|
Network |
|
|
|
||
|
|
|
|
|
Data link |
|
<802.11 MAC> |
Data link |
|
|
|
|
|
|
Physical |
|
<802.11 PHY> |
Physical |
|
|
|
|
|
|
F i gu r e 10 . 2 802 |
.11 MAC Header |
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
MAC Header |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
2 |
2 |
6 |
6 |
|
6 |
6 |
2 |
|
|
0-2312 |
4 |
|||
|
|
|
|||||||||||||
|
|
Frame |
Duration/ |
|
Address |
|
Address |
|
Address |
Sequence |
Address |
|
Frame |
FCS |
|
|
|
Control |
ID |
|
1 |
|
2 |
|
3 |
Control |
4 |
|
|
Body |
|
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
There are three types of 802.11 frames:
NN |
Management—Used for notification, connection, disconnection, and information. |
NN |
Control—Used to control which station has access to the wireless network media. |
NN |
Data—Used to carry upper layer data. |
Most wireless LANs (WLANs) are based on the IEEE 802.11 standards and amendments, such as 802.11a, 802.11b, 802.11g, and 802.11n. The lettered amendments have been rolled up into a final 802.11 standard and are now referred to by the clause or section number within the 802.11 standard. However, since the lettered amendments are still frequently used when differentiating between the sections of the 802.11 standard, they will be used here in this chapter as well. Table 10.1 shows a comparison of the 802.11 standard amendments.