Introduction |
|
xxiii | |
Chapter 1 Introduction to Ethical Hacking and Penetration Testing |
|
3 | (22) |
|
"Do I Know This Already?" Quiz |
|
|
3 | (3) |
|
Understanding Ethical Hacking and Penetration Testing |
|
|
6 | (1) |
|
What Is the Difference Between Ethical Hacking and Nonethical Hacking? |
|
|
6 | (1) |
|
Why Do We Need to Do Penetration Testing? |
|
|
7 | (1) |
|
Understanding the Current Threat Landscape |
|
|
7 | (3) |
|
|
8 | (1) |
|
|
8 | (1) |
|
|
9 | (1) |
|
Exploring Penetration Testing Methodologies |
|
|
10 | (6) |
|
Why Do We Need to Follow a Methodology for Penetration Testing? |
|
|
10 | (1) |
|
Penetration Testing Methods |
|
|
11 | (2) |
|
Surveying Penetration Testing Methodologies |
|
|
13 | (3) |
|
|
16 | (4) |
|
Requirements and Guidelines for Penetration Testing Labs |
|
|
18 | (1) |
|
What Tools Should You Use in Your Lab? |
|
|
18 | (1) |
|
What if You Break Something? |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
21 | (4) |
Chapter 2 Planning and Scoping a Penetration Testing Assessment |
|
25 | (38) |
|
"Do I Know This Already?" Quiz |
|
|
25 | (4) |
|
Explaining the Importance of the Planning and Preparation Phase |
|
|
29 | (12) |
|
Understanding the Target Audience |
|
|
29 | (1) |
|
|
30 | (1) |
|
Communication Escalation Path |
|
|
31 | (1) |
|
Confidentiality of Findings |
|
|
32 | (1) |
|
|
32 | (1) |
|
|
33 | (1) |
|
Impact Analysis and Remediation Timelines |
|
|
34 | (4) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
40 | (1) |
|
Understanding the Legal Concepts of Penetration Testing |
|
|
41 | (3) |
|
|
41 | (1) |
|
|
42 | (1) |
|
|
42 | (1) |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
43 | (1) |
|
|
43 | (1) |
|
Learning How to Scope a Penetration Testing Engagement Properly |
|
|
44 | (6) |
|
|
44 | (1) |
|
|
45 | (1) |
|
Special Scoping Considerations |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
47 | (1) |
|
Risk Acceptance, Tolerance, and Management |
|
|
47 | (1) |
|
Understanding Risk Management |
|
|
48 | (1) |
|
|
48 | (1) |
|
|
48 | (1) |
|
Risk Transfer, Avoidance, and Sharing |
|
|
49 | (1) |
|
Risk Appetite and Tolerance |
|
|
49 | (1) |
|
Learning the Key Aspects of Compliance-Based Assessments |
|
|
50 | (8) |
|
Rules for Completing Compliance-Based Assessments |
|
|
50 | (1) |
|
Regulations in the Financial Sector |
|
|
50 | (2) |
|
Regulations in the Healthcare Sector |
|
|
52 | (1) |
|
Payment Card Industry Data Security Standard (PCI DSS) |
|
|
53 | (3) |
|
Key Technical Elements in Regulations You Should Consider |
|
|
56 | (1) |
|
Limitations When Performing Compliance-Based Assessments |
|
|
57 | (1) |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
59 | (4) |
Chapter 3 Information Gathering and Vulnerability Identification |
|
63 | (58) |
|
"Do I Know This Already?" Quiz |
|
|
63 | (4) |
|
Understanding Information Gathering and Reconnaissance |
|
|
67 | (36) |
|
Understanding Active Reconnaissance vs. Passive Reconnaissance |
|
|
70 | (1) |
|
Understanding Active Reconnaissance |
|
|
71 | (2) |
|
|
73 | (1) |
|
|
73 | (1) |
|
|
74 | (2) |
|
|
76 | (1) |
|
|
77 | (1) |
|
Exploring the Different Types of Enumeration |
|
|
78 | (1) |
|
|
78 | (2) |
|
|
80 | (1) |
|
|
81 | (1) |
|
Network Share Enumeration |
|
|
82 | (1) |
|
Web Page Enumeration/Web Application Enumeration |
|
|
83 | (2) |
|
|
85 | (1) |
|
Exploring Enumeration via Packet Crafting |
|
|
85 | (2) |
|
Understanding Passive Reconnaissance |
|
|
87 | (1) |
|
|
88 | (2) |
|
Packet Inspection and Eavesdropping |
|
|
90 | (1) |
|
Understanding Open Source Intelligence (OSINT) Gathering |
|
|
90 | (1) |
|
Exploring Reconnaissance with Recon-ng |
|
|
90 | (13) |
|
Understanding the Art of Performing Vulnerability Scans |
|
|
103 | (9) |
|
How a Typical Automated Vulnerability Scanner Works |
|
|
103 | (1) |
|
Understanding the Types of Vulnerability Scans |
|
|
104 | (1) |
|
|
104 | (1) |
|
|
105 | (1) |
|
|
106 | (1) |
|
|
106 | (2) |
|
|
108 | (1) |
|
|
109 | (1) |
|
Challenges to Consider When Running a Vulnerability Scan |
|
|
110 | (1) |
|
Considering the Best Time to Run a Scan |
|
|
110 | (1) |
|
Determining What Protocols Are in Use |
|
|
110 | (1) |
|
|
110 | (1) |
|
|
111 | (1) |
|
|
111 | (1) |
|
Fragile Systems/Nontraditional Assets |
|
|
111 | (1) |
|
Understanding How to Analyze Vulnerability Scan Results |
|
|
112 | (4) |
|
|
113 | (1) |
|
The CERT Division of Carnegie Mellon University |
|
|
113 | (1) |
|
|
114 | (1) |
|
|
114 | (1) |
|
|
114 | (1) |
|
|
114 | (1) |
|
|
115 | (1) |
|
How to Deal with a Vulnerability |
|
|
115 | (1) |
|
|
116 | (1) |
|
|
117 | (1) |
|
|
117 | (4) |
Chapter 4 Social Engineering Attacks |
|
121 | (22) |
|
"Do I Know This Already?" Quiz |
|
|
121 | (4) |
|
Understanding Social Engineering Attacks |
|
|
125 | (1) |
|
|
126 | (1) |
|
|
126 | (1) |
|
|
127 | (1) |
|
|
128 | (6) |
|
|
134 | (1) |
|
|
135 | (1) |
|
|
135 | (1) |
|
Elicitation, Interrogation, and Impersonation (Pretexting) |
|
|
135 | (2) |
|
Social Engineering Motivation Techniques |
|
|
137 | (1) |
|
|
137 | (1) |
|
USB Key Drop and Social Engineering |
|
|
138 | (1) |
|
|
138 | (1) |
|
|
139 | (1) |
|
|
139 | (4) |
Chapter 5 Exploiting Wired and Wireless Networks |
|
143 | (64) |
|
"Do I Know This Already?" Quiz |
|
|
143 | (5) |
|
Exploiting Network-Based Vulnerabilities |
|
|
148 | (37) |
|
Exploring Windows Name Resolution and SMB Attacks |
|
|
148 | (1) |
|
NetBIOS Name Service and LLMNR |
|
|
148 | (3) |
|
|
151 | (4) |
|
|
155 | (2) |
|
|
157 | (2) |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
160 | (3) |
|
Using Known SMTP Server Exploits |
|
|
163 | (3) |
|
|
166 | (2) |
|
|
168 | (1) |
|
Kerberos and LDAP-Based Attacks |
|
|
169 | (4) |
|
Understanding Man-in-the-Middle Attacks |
|
|
173 | (1) |
|
Understanding ARP Spoofing and ARP Cache Poisoning |
|
|
173 | (2) |
|
|
175 | (1) |
|
Route Manipulation Attacks |
|
|
175 | (1) |
|
Understanding Denial-of-Service (DoS) and Distributed Denial-of-Service (DDoS) Attacks |
|
|
176 | (1) |
|
|
176 | (2) |
|
|
178 | (1) |
|
Amplification DDoS Attacks |
|
|
178 | (1) |
|
Network Access Control (NAC) Bypass |
|
|
179 | (2) |
|
|
181 | (2) |
|
DHCP Starvation Attacks and Rogue DHCP Servers |
|
|
183 | (2) |
|
Exploiting Wireless and RF-Based Attacks and Vulnerabilities |
|
|
185 | (15) |
|
Installing Rogue Access Points |
|
|
185 | (1) |
|
|
185 | (1) |
|
|
186 | (3) |
|
Attacking the Preferred Network Lists |
|
|
189 | (1) |
|
Jamming Wireless Signals and Causing Interference |
|
|
189 | (1) |
|
|
190 | (1) |
|
Initialization Vector (IV) Attacks and Unsecured Wireless Protocols |
|
|
190 | (1) |
|
|
190 | (2) |
|
|
192 | (4) |
|
|
196 | (1) |
|
Attacking Wi-Fi Protected Setup (WPS) |
|
|
197 | (1) |
|
|
197 | (1) |
|
|
197 | (2) |
|
|
199 | (1) |
|
Bluejacking and Bluesnarfing |
|
|
199 | (1) |
|
Radio-Frequency Identification (RFID) Attacks |
|
|
200 | (1) |
|
|
200 | (2) |
|
|
202 | (1) |
|
|
202 | (5) |
Chapter 6 Exploiting Application-Based Vulnerabilities |
|
207 | (70) |
|
"Do I Know This Already?" Quiz |
|
|
207 | (6) |
|
Overview of Web Applications for Security Professionals |
|
|
213 | (11) |
|
|
213 | (8) |
|
Understanding Web Sessions |
|
|
221 | (3) |
|
How to Build Your Own Web Application Lab |
|
|
224 | (3) |
|
Understanding Injection-Based Vulnerabilities |
|
|
227 | (15) |
|
Exploiting SQL Injection Vulnerabilities |
|
|
228 | (1) |
|
A Brief Introduction to SQL |
|
|
228 | (4) |
|
|
232 | (2) |
|
Fingerprinting a Database |
|
|
234 | (1) |
|
Surveying the UNION Exploitation Technique |
|
|
235 | (2) |
|
Using Boolean in SQL Injection Attacks |
|
|
237 | (1) |
|
Understanding Out-of-Band Exploitation |
|
|
237 | (2) |
|
Exploring the Time-Delay SQL Injection Technique |
|
|
239 | (1) |
|
Surveying a Stored Procedure SQL Injection |
|
|
239 | (1) |
|
Understanding SQL Injection Mitigations |
|
|
240 | (1) |
|
HTML Injection Vulnerabilities |
|
|
241 | (1) |
|
Command Injection Vulnerabilities |
|
|
241 | (1) |
|
Exploiting Authentication-Based Vulnerabilities |
|
|
242 | (8) |
|
Exploring Credential Brute Forcing |
|
|
243 | (2) |
|
Understanding Session Hijacking |
|
|
245 | (4) |
|
Understanding Redirect Attacks |
|
|
249 | (1) |
|
Taking Advantage of Default Credentials |
|
|
249 | (1) |
|
Exploiting Kerberos Vulnerabilities |
|
|
250 | (1) |
|
Exploiting Authorization-Based Vulnerabilities |
|
|
250 | (2) |
|
Understanding Parameter Pollution |
|
|
250 | (1) |
|
Exploiting Insecure Direct Object Reference Vulnerabilities |
|
|
251 | (1) |
|
Understanding Cross-Site Scripting (XSS) Vulnerabilities |
|
|
252 | (8) |
|
|
253 | (2) |
|
|
255 | (1) |
|
|
256 | (1) |
|
|
257 | (1) |
|
|
258 | (2) |
|
Understanding Cross-Site Request Forgery Attacks |
|
|
260 | (1) |
|
Understanding Clickjacking |
|
|
261 | (1) |
|
Exploiting Security Misconfigurations |
|
|
262 | (2) |
|
Exploiting Directory Traversal Vulnerabilities |
|
|
262 | (1) |
|
Understanding Cookie Manipulation Attacks |
|
|
263 | (1) |
|
Exploiting File Inclusion Vulnerabilities |
|
|
264 | (1) |
|
Local File Inclusion Vulnerabilities |
|
|
264 | (1) |
|
Remote File Inclusion Vulnerabilities |
|
|
264 | (1) |
|
Exploiting Insecure Code Practices |
|
|
265 | (6) |
|
|
265 | (1) |
|
Lack of Error Handling and Overly Verbose Error Handling |
|
|
266 | (1) |
|
|
266 | (1) |
|
|
266 | (1) |
|
|
267 | (3) |
|
|
270 | (1) |
|
|
270 | (1) |
|
|
271 | (1) |
|
|
272 | (1) |
|
|
273 | (4) |
Chapter 7 Exploiting Local Host and Physical Security Vulnerabilities |
|
277 | (56) |
|
"Do I Know This Already?" Quiz |
|
|
277 | (4) |
|
Exploiting Local Host Vulnerabilities |
|
|
281 | (45) |
|
Insecure Service and Protocol Configurations |
|
|
281 | (4) |
|
Local Privilege Escalation |
|
|
285 | (1) |
|
Understanding Linux Permissions |
|
|
286 | (5) |
|
Understanding SUID or SGID and Unix Programs |
|
|
291 | (3) |
|
Insecure SUDO Implementations |
|
|
294 | (4) |
|
|
298 | (1) |
|
|
299 | (1) |
|
|
299 | (1) |
|
Clear-Text Credentials in LDAP |
|
|
300 | (1) |
|
|
301 | (1) |
|
Credentials in Local Security Authority Subsystem Service (LSASS) |
|
|
301 | (1) |
|
|
302 | (1) |
|
Understanding Dynamic Link Library Hijacking |
|
|
303 | (1) |
|
|
304 | (1) |
|
Insecure File and Folder Permissions |
|
|
305 | (1) |
|
Understanding Windows Group Policy |
|
|
305 | (1) |
|
|
306 | (1) |
|
|
307 | (1) |
|
|
308 | (2) |
|
|
310 | (1) |
|
Understanding Container Security |
|
|
310 | (4) |
|
|
314 | (2) |
|
Understanding Android Security |
|
|
316 | (7) |
|
Understanding Apple iOS Security |
|
|
323 | (3) |
|
Understanding Physical Security Attacks |
|
|
326 | (2) |
|
Understanding Physical Device Security |
|
|
326 | (1) |
|
Protecting Your Facilities Against Physical Security Attacks |
|
|
327 | (1) |
|
|
328 | (1) |
|
|
329 | (1) |
|
|
329 | (4) |
Chapter 8 Performing Post-Exploitation Techniques |
|
333 | (28) |
|
"Do I Know This Already?" Quiz |
|
|
333 | (4) |
|
Maintaining Persistence After Compromising a System |
|
|
337 | (10) |
|
Creating Reverse and Bind Shells |
|
|
338 | (6) |
|
Command and Control (C2) Utilities |
|
|
344 | (2) |
|
Creating and Manipulating Scheduled Jobs and Tasks |
|
|
346 | (1) |
|
Creating Custom Daemons, Processes, and Additional Backdoors |
|
|
346 | (1) |
|
|
346 | (1) |
|
Understanding How to Perform Lateral Movement |
|
|
347 | (9) |
|
Post-Exploitation Scanning |
|
|
347 | (1) |
|
Using Remote Access Protocols |
|
|
348 | (1) |
|
Using Windows Legitimate Utilities |
|
|
349 | (1) |
|
Using PowerShell for Post-Exploitation Tasks |
|
|
349 | (2) |
|
|
351 | (3) |
|
Using the Windows Management Instrumentation for Post-Exploitation Tasks |
|
|
354 | (1) |
|
Using Sysinternals and PSExec |
|
|
355 | (1) |
|
Understanding How to Cover Your Tracks and Clean Up Systems After a Penetration Testing Engagement |
|
|
356 | (1) |
|
|
357 | (1) |
|
|
358 | (1) |
|
|
358 | (3) |
Chapter 9 Penetration Testing Tools |
|
361 | (110) |
|
"Do I Know This Already?" Quiz |
|
|
361 | (4) |
|
Understanding the Different Use Cases of Penetration Testing Tools and How to Analyze Their Output |
|
|
365 | (95) |
|
Penetration Testing-Focused Linux Distributions |
|
|
365 | (1) |
|
|
366 | (1) |
|
|
367 | (1) |
|
|
367 | (2) |
|
|
369 | (1) |
|
|
369 | (1) |
|
Common Tools for Reconnaissance and Enumeration |
|
|
370 | (1) |
|
Tools for Passive Reconnaissance |
|
|
370 | (20) |
|
Tools for Active Reconnaissance |
|
|
390 | (10) |
|
Common Tools for Vulnerability Scanning |
|
|
400 | (20) |
|
Common Tools for Credential Attacks |
|
|
420 | (1) |
|
|
420 | (4) |
|
|
424 | (1) |
|
|
425 | (3) |
|
|
428 | (1) |
|
|
429 | (1) |
|
|
430 | (1) |
|
|
431 | (1) |
|
|
432 | (1) |
|
|
432 | (1) |
|
Common Tools for Persistence |
|
|
433 | (1) |
|
|
434 | (1) |
|
|
434 | (4) |
|
|
438 | (1) |
|
|
439 | (1) |
|
|
439 | (1) |
|
Encapsulation and Tunneling Using DNS and Other Protocols Like NTP |
|
|
440 | (2) |
|
|
442 | (1) |
|
|
442 | (7) |
|
|
449 | (1) |
|
Common Decompilation, Disassembling, and Debugging Tools |
|
|
450 | (1) |
|
The GNU Project Debugger (GDB) |
|
|
450 | (2) |
|
|
452 | (1) |
|
|
452 | (1) |
|
|
452 | (2) |
|
|
454 | (1) |
|
|
454 | (1) |
|
|
455 | (2) |
|
Common Tools for Forensics |
|
|
457 | (1) |
|
Common Tools for Software Assurance |
|
|
458 | (1) |
|
Findbugs, Findsecbugs, and SonarQube |
|
|
458 | (1) |
|
|
458 | (1) |
|
|
459 | (1) |
|
|
459 | (1) |
|
|
459 | (1) |
|
|
459 | (1) |
|
Leveraging Bash, Python, Ruby, and PowerShell in Penetration Testing Engagements |
|
|
460 | (2) |
|
Introducing the Bash Shell |
|
|
460 | (1) |
|
A Brief Introduction to Python |
|
|
461 | (1) |
|
A Brief Introduction to Ruby |
|
|
461 | (1) |
|
A Brief Introduction to PowerShell |
|
|
462 | (1) |
|
|
462 | (3) |
|
|
465 | (1) |
|
|
465 | (6) |
Chapter 10 Understanding How to Finalize a Penetration Test |
|
471 | (34) |
|
"Do I Know This Already?" Quiz |
|
|
471 | (3) |
|
Explaining Post-Engagement Activities |
|
|
474 | (1) |
|
Surveying Report Writing Best Practices |
|
|
475 | (24) |
|
Understanding the Importance of a Quality Report |
|
|
475 | (1) |
|
Discussing Best Practices of Writing a Penetration Testing Report |
|
|
476 | (1) |
|
|
476 | (1) |
|
Avoiding Cutting and Pasting |
|
|
477 | (1) |
|
Relating the Findings to the Environment |
|
|
477 | (1) |
|
Starting the Report While You Are Testing |
|
|
478 | (1) |
|
Exploring Tools for Collecting and Sharing Information |
|
|
478 | (1) |
|
Using Dradis for Effective Information Sharing and Reporting |
|
|
478 | (1) |
|
Steps in Using the Dradis Framework CE on Kali Linux |
|
|
479 | (11) |
|
Exploring the Common Report Elements |
|
|
490 | (1) |
|
PCI Data Security Standard Reporting Guidelines |
|
|
491 | (2) |
|
Expanding on the Common Report Elements |
|
|
493 | (1) |
|
|
493 | (1) |
|
|
494 | (1) |
|
Finding Metrics and Measurements |
|
|
494 | (1) |
|
Findings and Recommendations for Remediation |
|
|
495 | (4) |
|
Understanding Report Handling and Communications Best Practices |
|
|
499 | (2) |
|
Understanding Best Practices in Report Handling |
|
|
499 | (1) |
|
Correctly Classifying Report Contents |
|
|
499 | (1) |
|
Controlling Distribution Method and Media |
|
|
499 | (1) |
|
Explaining the Importance of Appropriate Communication |
|
|
500 | (1) |
|
|
501 | (1) |
|
|
502 | (1) |
|
|
502 | (3) |
Chapter 11 Final Preparation |
|
505 | (6) |
|
Tools for Final Preparation |
|
|
505 | (4) |
|
Pearson Cert Practice Test Engine and Questions on the Website |
|
|
505 | (1) |
|
Accessing the Pearson Test Prep Software Online |
|
|
506 | (1) |
|
Accessing the Pearson Test Prep Software Offline |
|
|
506 | (1) |
|
|
507 | (1) |
|
|
508 | (1) |
|
|
508 | (1) |
|
Chapter-Ending Review Tools |
|
|
509 | (1) |
|
Suggested Plan for Final Review/Study |
|
|
509 | (1) |
|
|
509 | (2) |
Appendix A Answers to the "Do I Know This Already?" Quizzes and Q&&A Sections |
|
511 | (30) |
Index |
|
541 | |