Preface |
|
xxiii | |
Acknowledgments |
|
xxv | |
Author |
|
xxvii | |
1 Introduction to Hacking |
|
1 | (18) |
|
|
2 | (5) |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
3 | (1) |
|
What Is a Penetration Test? |
|
|
3 | (1) |
|
Vulnerability Assessments versus Penetration Test |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
4 | (1) |
|
Penetration Testing Methodologies |
|
|
5 | (1) |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
Categories of Penetration Test |
|
|
7 | (3) |
|
|
7 | (1) |
|
|
7 | (1) |
|
|
7 | (1) |
|
Types of Penetration Tests |
|
|
7 | (1) |
|
|
8 | (1) |
|
Web Application Penetration Test |
|
|
8 | (1) |
|
Mobile Application Penetration Test |
|
|
8 | (1) |
|
Social Engineering Penetration Test |
|
|
8 | (1) |
|
Physical Penetration Test |
|
|
8 | (1) |
|
|
8 | (1) |
|
Understanding the Audience |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
10 | (1) |
|
Structure of a Penetration Testing Report |
|
|
10 | (2) |
|
|
10 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
Vulnerability Assessment Summary |
|
|
12 | (2) |
|
|
13 | (1) |
|
|
14 | (1) |
|
|
14 | (1) |
|
|
14 | (3) |
|
|
15 | (2) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
16 | (1) |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
17 | (2) |
2 Linux Basics |
|
19 | (34) |
|
Major Linux Operating Systems |
|
|
19 | (1) |
|
File Structure inside of Linux |
|
|
20 | (5) |
|
|
22 | (2) |
|
|
22 | (1) |
|
Linux Advance/Special Permission |
|
|
22 | (1) |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
24 | (1) |
|
Most Common and Important Commands |
|
|
24 | (1) |
|
Linux Scheduler (Cron Job) |
|
|
25 | (3) |
|
|
26 | (2) |
|
|
26 | (1) |
|
|
26 | (2) |
|
|
28 | (2) |
|
|
29 | (1) |
|
|
29 | (1) |
|
|
30 | (1) |
|
Common Applications of Linux |
|
|
30 | (1) |
|
|
30 | (13) |
|
How to Get BackTrack 5 Running |
|
|
31 | (1) |
|
Installing BackTrack on Virtual Box |
|
|
31 | (4) |
|
Installing BackTrack on a Portable USB |
|
|
35 | (4) |
|
Installing BackTrack on Your Hard Drive |
|
|
39 | (4) |
|
|
43 | (1) |
|
Changing the Default Screen Resolution |
|
|
43 | (3) |
|
Some Unforgettable Basics |
|
|
44 | (2) |
|
|
44 | (1) |
|
|
44 | (1) |
|
Listing the Contents of a Directory |
|
|
44 | (1) |
|
Displaying Contents of a Specific Directory |
|
|
44 | (1) |
|
Displaying the Contents of a File |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
45 | (1) |
|
Current Working Directory |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
46 | (1) |
|
Locating Certain Files inside BackTrack |
|
|
46 | (1) |
|
Text Editors inside BackTrack |
|
|
46 | (1) |
|
Getting to Know Your Network |
|
|
47 | (1) |
|
|
47 | (1) |
|
|
48 | (3) |
|
|
48 | (1) |
|
|
48 | (2) |
|
|
50 | (1) |
|
|
51 | (2) |
3 Information Gathering Techniques |
|
53 | (44) |
|
Active Information Gathering |
|
|
53 | (1) |
|
Passive Information Gathering |
|
|
53 | (1) |
|
Sources of Information Gathering |
|
|
54 | (1) |
|
|
54 | (2) |
|
Information Gathering with Whois |
|
|
55 | (1) |
|
Finding Other Websites Hosted on the Same Server |
|
|
56 | (1) |
|
|
56 | (3) |
|
|
57 | (1) |
|
|
57 | (1) |
|
|
58 | (1) |
|
|
58 | (1) |
|
|
58 | (1) |
|
|
58 | (1) |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
59 | (1) |
|
Enumerating and Fingerprinting the Webservers |
|
|
60 | (1) |
|
|
60 | (2) |
|
Acunetix Vulnerability Scanner |
|
|
62 | (1) |
|
|
62 | (1) |
|
|
63 | (1) |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
65 | (2) |
|
|
66 | (1) |
|
Hackersforcharity.org/ghdb |
|
|
67 | (1) |
|
|
67 | (8) |
|
|
68 | (1) |
|
|
68 | (1) |
|
|
69 | (2) |
|
Gathering Wordlist from a Target Website |
|
|
71 | (1) |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
72 | (2) |
|
|
74 | (1) |
|
|
75 | (1) |
|
Interacting with DNS Servers |
|
|
75 | (1) |
|
|
76 | (1) |
|
|
76 | (1) |
|
|
77 | (1) |
|
Forward DNS Lookup with Fierce |
|
|
77 | (1) |
|
|
78 | (1) |
|
Reverse DNS Lookup with Dig |
|
|
78 | (1) |
|
Reverse DNS Lookup with Fierce |
|
|
78 | (1) |
|
|
79 | (1) |
|
Zone Transfer with Host Command |
|
|
79 | (1) |
|
Automating Zone Transfers |
|
|
80 | (1) |
|
|
80 | (1) |
|
What Is DNS Cache Snooping? |
|
|
81 | (2) |
|
|
81 | (1) |
|
|
82 | (1) |
|
What Is the Likelihood of Name Servers Allowing Recursive/Nonrecursive Queries? |
|
|
83 | (1) |
|
|
84 | (1) |
|
Automating DNS Cache Snooping Attacks |
|
|
84 | (1) |
|
|
84 | (1) |
|
|
84 | (1) |
|
|
84 | (1) |
|
|
85 | (1) |
|
|
85 | (1) |
|
|
85 | (1) |
|
|
86 | (1) |
|
SNMP Brute Force and Dictionary |
|
|
86 | (1) |
|
|
86 | (1) |
|
SNMP Dictionary Attack Tool |
|
|
87 | (1) |
|
|
87 | (6) |
|
|
88 | (1) |
|
|
89 | (1) |
|
Determining Real IP behind Load Balancers |
|
|
89 | (1) |
|
Bypassing CloudFlare Protection |
|
|
90 | (22) |
|
|
90 | (2) |
|
Method 2: Subdomain Trick |
|
|
92 | (1) |
|
|
92 | (1) |
|
Intelligence Gathering Using Shodan |
|
|
93 | (2) |
|
|
95 | (1) |
|
|
95 | (2) |
4 Target Enumeration and Port Scanning Techniques |
|
97 | (24) |
|
|
97 | (3) |
|
Scanning for Open Ports and Services |
|
|
100 | (1) |
|
|
100 | (1) |
|
Understanding the TCP Three-Way Handshake |
|
|
101 | (1) |
|
|
101 | (1) |
|
|
102 | (1) |
|
|
102 | (1) |
|
|
103 | (1) |
|
NULL, FIN, and XMAS Scans |
|
|
104 | (1) |
|
|
104 | (1) |
|
|
105 | (1) |
|
|
105 | (1) |
|
|
105 | (1) |
|
|
106 | (1) |
|
|
106 | (1) |
|
|
107 | (1) |
|
|
107 | (1) |
|
Scanting for a Vulnerable Host |
|
|
107 | (2) |
|
Performing an IDLE Scan with NMAP |
|
|
109 | (1) |
|
|
109 | (1) |
|
Service Version Detection |
|
|
110 | (1) |
|
|
111 | (1) |
|
|
111 | (1) |
|
|
112 | (1) |
|
|
112 | (1) |
|
|
112 | (1) |
|
|
113 | (1) |
|
Advanced Firewall/IDS Evading Techniques |
|
|
113 | (1) |
|
|
114 | (1) |
|
|
114 | (1) |
|
|
115 | (1) |
|
|
115 | (1) |
|
|
115 | (1) |
|
|
116 | (1) |
|
|
116 | (1) |
|
|
117 | (1) |
|
|
117 | (2) |
|
|
119 | (2) |
5 Vulnerability Assessment |
|
121 | (18) |
|
What Are Vulnerability Scanners and How Do They Work? |
|
|
121 | (1) |
|
Pros and Cons of a Vulnerability Scanner |
|
|
122 | (1) |
|
Vulnerability Assessment with Nmap |
|
|
122 | (1) |
|
|
122 | (1) |
|
|
123 | (1) |
|
Testing SCADA Environments with Nmap |
|
|
123 | (1) |
|
|
124 | (1) |
|
|
124 | (1) |
|
Nessus Vulnerability Scanner |
|
|
124 | (1) |
|
|
125 | (1) |
|
|
125 | (1) |
|
Installing Nessus on BackTrack |
|
|
125 | (1) |
|
|
125 | (3) |
|
|
126 | (1) |
|
|
126 | (1) |
|
|
126 | (1) |
|
|
127 | (1) |
|
|
127 | (1) |
|
|
127 | (1) |
|
|
127 | (1) |
|
|
127 | (1) |
|
|
128 | (1) |
|
|
128 | (1) |
|
|
128 | (1) |
|
|
128 | (1) |
|
|
129 | (1) |
|
|
129 | (1) |
|
|
129 | (1) |
|
|
130 | (2) |
|
|
130 | (2) |
|
Nessus Integration with Metasploit |
|
|
132 | (1) |
|
Importing Nessus to Metasploit |
|
|
132 | (2) |
|
|
133 | (1) |
|
|
133 | (1) |
|
|
133 | (1) |
|
|
134 | (2) |
|
Vulnerability Data Resources |
|
|
134 | (1) |
|
|
135 | (1) |
|
Using Exploit-db with BackTrack |
|
|
136 | (1) |
|
Searching for Exploits inside BackTrack |
|
|
137 | (1) |
|
|
138 | (1) |
6 Network Sniffing |
|
139 | (24) |
|
|
139 | (1) |
|
|
140 | (1) |
|
|
140 | (1) |
|
|
140 | (1) |
|
|
140 | (1) |
|
Promiscuous versus Nonpromiscuous Mode |
|
|
141 | (1) |
|
|
141 | (1) |
|
|
142 | (1) |
|
|
142 | (1) |
|
|
143 | (1) |
|
|
143 | (1) |
|
|
143 | (1) |
|
|
144 | (1) |
|
|
144 | (1) |
|
Denial of Service Attacks |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
145 | (1) |
|
Using ARP Spoof to Perform MITM Attacks |
|
|
145 | (2) |
|
|
146 | (1) |
|
Sniffing the Traffic with Dsniff |
|
|
147 | (1) |
|
Sniffing Pictures with Drifnet |
|
|
147 | (1) |
|
|
148 | (1) |
|
|
149 | (1) |
|
|
150 | (1) |
|
ARP Poisoning with Ettercap |
|
|
150 | (2) |
|
Hijacking Session with MITM Attack |
|
|
152 | (1) |
|
|
152 | (1) |
|
ARP Poisoning with Cain and Abel |
|
|
153 | (2) |
|
Sniffing Session Cookies with Wireshark |
|
|
155 | (1) |
|
|
156 | (1) |
|
SSL Strip: Stripping HTTPS Traffic |
|
|
157 | (1) |
|
|
157 | (1) |
|
|
158 | (1) |
|
Automating Man in the Middle Attacks |
|
|
158 | (1) |
|
|
158 | (1) |
|
|
159 | (1) |
|
|
159 | (1) |
|
Manipulating the DNS Records |
|
|
160 | (1) |
|
Using Ettercap to Launch DNS Spoofing Attack |
|
|
160 | (1) |
|
|
160 | (1) |
|
|
161 | (2) |
7 Remote Exploitation |
|
163 | (34) |
|
Understanding Network Protocols |
|
|
163 | (1) |
|
Transmission Control Protocol |
|
|
164 | (1) |
|
|
164 | (1) |
|
Internet Control Messaging Protocol |
|
|
164 | (1) |
|
|
164 | (1) |
|
Text-Based Protocols (Important) |
|
|
164 | (1) |
|
|
164 | (2) |
|
|
165 | (1) |
|
|
165 | (1) |
|
|
165 | (1) |
|
|
165 | (1) |
|
|
166 | (1) |
|
Attacking Network Remote Services |
|
|
166 | (1) |
|
Overview of Brute Force Attacks |
|
|
166 | (1) |
|
|
166 | (1) |
|
|
166 | (1) |
|
|
167 | (1) |
|
|
167 | (1) |
|
|
167 | (1) |
|
|
167 | (1) |
|
|
168 | (2) |
|
Cracking Services with Hydra |
|
|
168 | (2) |
|
|
170 | (1) |
|
|
170 | (1) |
|
|
170 | (1) |
|
OpenSSH Username Discovery Bug |
|
|
170 | (1) |
|
|
171 | (1) |
|
|
171 | (1) |
|
|
171 | (1) |
|
Cracking an RDP with Ncrack |
|
|
172 | (1) |
|
Case Study of a Morto Worm |
|
|
172 | (1) |
|
Combining Nmap and Ncrack for Optimal Results |
|
|
172 | (2) |
|
|
173 | (1) |
|
|
174 | (1) |
|
|
174 | (1) |
|
|
175 | (1) |
|
|
175 | (1) |
|
Fingerprinting MySQL Version |
|
|
175 | (1) |
|
Testing for Weak Authentication |
|
|
175 | (1) |
|
|
176 | (1) |
|
Fingerprinting the Version |
|
|
177 | (1) |
|
|
177 | (1) |
|
|
178 | (1) |
|
Introduction to Metasploit |
|
|
178 | (1) |
|
|
178 | (1) |
|
|
178 | (1) |
|
|
178 | (1) |
|
|
179 | (1) |
|
|
179 | (1) |
|
|
179 | (1) |
|
|
179 | (1) |
|
|
179 | (1) |
|
|
179 | (1) |
|
|
179 | (1) |
|
Metasploit Basic Commands |
|
|
180 | (1) |
|
Search Feature in Metasploit |
|
|
180 | (1) |
|
|
181 | (1) |
|
|
181 | (1) |
|
|
181 | (1) |
|
|
182 | (1) |
|
Reconnaissance with Metasploit |
|
|
182 | (1) |
|
Port Scanning with Metasploit |
|
|
182 | (1) |
|
|
182 | (1) |
|
Storing Information from Nmap into Metasploit Database |
|
|
183 | (1) |
|
Useful Scans with Metasploit |
|
|
184 | (1) |
|
|
184 | (1) |
|
|
184 | (1) |
|
Compromising a Windows Host with Metasploit |
|
|
184 | (4) |
|
|
188 | (1) |
|
|
188 | (1) |
|
|
189 | (1) |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
190 | (1) |
|
Compromising Your First Target from Armitage |
|
|
191 | (1) |
|
Enumerating and Fingerprinting the Target |
|
|
191 | (1) |
|
|
192 | (1) |
|
|
192 | (1) |
|
|
193 | (1) |
|
|
193 | (2) |
|
|
195 | (1) |
|
|
196 | (1) |
|
|
196 | (1) |
|
|
196 | (1) |
8 Client Side Exploitation |
|
197 | (34) |
|
Client Side Exploitation Methods |
|
|
197 | (4) |
|
Attack Scenario 1: E-Mails Leading to Malicious Attachments |
|
|
197 | (1) |
|
Attack Scenario 2: E-Mails Leading to Malicious Links |
|
|
197 | (1) |
|
Attack Scenario 3: Compromising Client Side Update |
|
|
198 | (1) |
|
Attack Scenario 4: Malware Loaded on USB Sticks |
|
|
198 | (1) |
|
E-Mails with Malicious Attachments |
|
|
198 | (3) |
|
Creating a Custom Executable |
|
|
198 | (1) |
|
Creating a Backdoor with SET |
|
|
198 | (3) |
|
|
201 | (1) |
|
|
201 | (1) |
|
|
202 | (1) |
|
|
202 | (1) |
|
|
202 | (1) |
|
|
202 | (1) |
|
|
202 | (1) |
|
Creating a PDF Document with a Launch Action |
|
|
203 | (2) |
|
Controlling the Dialog Boxes |
|
|
205 | (1) |
|
|
205 | (1) |
|
|
205 | (2) |
|
|
205 | (1) |
|
PDFINFO "Your PDF Document" |
|
|
206 | (1) |
|
|
206 | (1) |
|
|
207 | (1) |
|
Installing Origami Framework on BackTrack |
|
|
207 | (1) |
|
|
208 | (1) |
|
|
208 | (1) |
|
|
208 | (1) |
|
|
209 | (1) |
|
|
210 | (1) |
|
Social Engineering Toolkit |
|
|
211 | (3) |
|
Attack Scenario 2: E-Mails Leading to Malicious Links |
|
|
213 | (1) |
|
Credential Harvester Attack |
|
|
214 | (1) |
|
|
215 | (1) |
|
|
216 | (1) |
|
|
217 | (1) |
|
Attacking over the Internet with SET |
|
|
217 | (1) |
|
Attack Scenario over the Internet |
|
|
217 | (3) |
|
Using Windows Box as Router (Port Forwarding) |
|
|
220 | (1) |
|
|
220 | (1) |
|
|
221 | (1) |
|
Problem with Browser AutoPWN |
|
|
221 | (2) |
|
|
223 | (1) |
|
Attack Scenario 3: Compromising Client Side Update |
|
|
223 | (1) |
|
|
223 | (1) |
|
|
223 | (6) |
|
|
223 | (1) |
|
Internal Network Attack Vectors |
|
|
223 | (1) |
|
External Network Attack Vectors |
|
|
224 | (1) |
|
|
224 | (1) |
|
|
224 | (3) |
|
Attack Scenario 4: Malware Loaded on USB Sticks |
|
|
227 | (2) |
|
|
229 | (1) |
|
|
229 | (1) |
|
|
229 | (2) |
9 Postexploitation |
|
231 | (40) |
|
Acquiring Situation Awareness |
|
|
231 | (5) |
|
Enumerating a Windows Machine |
|
|
231 | (2) |
|
Enumerating Local Groups and Users |
|
|
233 | (1) |
|
Enumerating a Linux Machine |
|
|
233 | (2) |
|
Enumerating with Meterpreter |
|
|
235 | (1) |
|
|
235 | (1) |
|
Interacting with the System |
|
|
235 | (1) |
|
|
235 | (1) |
|
|
236 | (1) |
|
|
236 | (1) |
|
|
237 | (4) |
|
Bypassing User Access Control |
|
|
238 | (1) |
|
|
239 | (2) |
|
Escalating Privileges on a Linux Machine |
|
|
241 | (1) |
|
|
241 | (1) |
|
|
241 | (1) |
|
Cracking the Hashes to Gain Access to Other Services |
|
|
241 | (1) |
|
|
241 | (3) |
|
|
242 | (1) |
|
|
242 | (1) |
|
|
243 | (1) |
|
|
244 | (2) |
|
Generating a Backdoor with MSFPayload |
|
|
244 | (1) |
|
|
245 | (1) |
|
|
246 | (5) |
|
|
247 | (2) |
|
|
249 | (1) |
|
|
249 | (1) |
|
|
250 | (1) |
|
|
250 | (1) |
|
|
250 | (1) |
|
|
250 | (1) |
|
Where Are LM/NTLM Hashes Located? |
|
|
250 | (1) |
|
|
251 | (2) |
|
|
251 | (1) |
|
|
251 | (1) |
|
|
252 | (1) |
|
|
253 | (1) |
|
Scenario 3-Offline System |
|
|
253 | (1) |
|
|
253 | (1) |
|
|
253 | (1) |
|
|
253 | (1) |
|
|
253 | (2) |
|
|
253 | (1) |
|
|
254 | (1) |
|
|
254 | (1) |
|
|
254 | (1) |
|
|
255 | (1) |
|
Cracking LM/NTLM Passwords with JTR |
|
|
255 | (1) |
|
Cracking Linux Passwords with JTR |
|
|
256 | (1) |
|
|
256 | (3) |
|
|
257 | (1) |
|
Cracking the Hashes with rcrack |
|
|
258 | (1) |
|
Speeding Up the Cracking Process |
|
|
258 | (1) |
|
Gaining Access- to-Remote Services |
|
|
258 | (1) |
|
Enabling the Remote Desktop |
|
|
259 | (1) |
|
Adding Users to the Remote Desktop |
|
|
259 | (1) |
|
|
259 | (3) |
|
|
260 | (1) |
|
Harvesting Stored Credentials |
|
|
261 | (1) |
|
Identifying and Exploiting Further Targets |
|
|
262 | (7) |
|
Mapping the Internal Network |
|
|
263 | (1) |
|
Finding Network Information |
|
|
264 | (1) |
|
Identifying Further Targets |
|
|
265 | (1) |
|
|
266 | (1) |
|
Scanning Ports and Services and Detecting OS |
|
|
267 | (1) |
|
Compromising Other Hosts on the Network Having the Same Password |
|
|
268 | (1) |
|
|
269 | (1) |
|
|
270 | (1) |
|
|
270 | (1) |
10 Windows Exploit Development Basics |
|
271 | (20) |
|
|
271 | (1) |
|
What Is a Buffer Overflow? |
|
|
271 | (1) |
|
|
272 | (1) |
|
How to Find Buffer Overflows |
|
|
273 | (1) |
|
|
273 | (1) |
|
Getting the Software Up and Running |
|
|
273 | (1) |
|
Causing the Application to Crash |
|
|
273 | (2) |
|
|
275 | (6) |
|
|
278 | (2) |
|
Identifying Bad Characters |
|
|
280 | (1) |
|
Figuring Out Bad Characters with Mona |
|
|
281 | (6) |
|
Overwriting the Return Address |
|
|
283 | (2) |
|
|
285 | (1) |
|
|
286 | (1) |
|
Generating Metasploit Module |
|
|
287 | (1) |
|
|
288 | (2) |
|
|
290 | (1) |
|
|
290 | (1) |
11 Wireless Hacking |
|
291 | (22) |
|
|
291 | (1) |
|
|
291 | (2) |
|
|
293 | (1) |
|
|
293 | (1) |
|
Turning on the Monitor Mode |
|
|
294 | (1) |
|
Monitoring Beacon Frames on Wireshark |
|
|
294 | (1) |
|
Monitoring with Airodump-ng |
|
|
295 | (1) |
|
|
296 | (2) |
|
Bypassing MAC Filters on Wireless Networks |
|
|
296 | (2) |
|
Cracking a WEP Wireless Network with Aircrack-ng |
|
|
298 | (1) |
|
Placing Your Wireless Adapter in Monitor Mode |
|
|
298 | (1) |
|
Determining the Target with Airodump-ng |
|
|
299 | (3) |
|
|
299 | (1) |
|
Speeding Up the Cracking Process |
|
|
300 | (1) |
|
|
300 | (1) |
|
|
301 | (1) |
|
Cracking a WPA/WPA2 Wireless Network Using Aircrack-ng |
|
|
302 | (1) |
|
|
303 | (1) |
|
Capturing the Four-Way Handshake |
|
|
303 | (1) |
|
|
304 | (2) |
|
Using Reaver to Crack WPS-Enabled Wireless Networks |
|
|
305 | (1) |
|
|
306 | (1) |
|
|
306 | (3) |
|
Setting Up a Fake Access Point with SET to PWN Users |
|
|
306 | (3) |
|
|
309 | (2) |
|
|
310 | (1) |
|
|
311 | (1) |
|
|
311 | (1) |
|
Setting Up a Fake Access Point |
|
|
311 | (1) |
|
Causing Denial of Service on the Original AP |
|
|
311 | (1) |
|
|
312 | (1) |
12 Web Hacking |
|
313 | (180) |
|
Attacking the Authentication |
|
|
313 | (2) |
|
|
314 | (1) |
|
Invalid Username with Invalid Password |
|
|
314 | (1) |
|
Valid Username with Invalid Password |
|
|
314 | (1) |
|
Enabling Browser Cache to Store Passwords |
|
|
314 | (1) |
|
Brute Force and Dictionary Attacks |
|
|
315 | (1) |
|
|
315 | (4) |
|
HTTP Basic Authentication |
|
|
315 | (1) |
|
HTTP-Digest Authentication |
|
|
316 | (1) |
|
Form-Based Authentication |
|
|
317 | (2) |
|
Exploiting Password Reset Feature |
|
|
319 | (1) |
|
Etsy.com Password Reset Vulnerability |
|
|
319 | (3) |
|
Attacking Form-Based Authentication |
|
|
320 | (2) |
|
|
322 | (4) |
|
Attacking HTTP Basic Auth |
|
|
323 | (3) |
|
|
326 | (8) |
|
Log-In Protection Mechanisms |
|
|
326 | (1) |
|
|
326 | (2) |
|
|
328 | (1) |
|
Manipulating User-Agents to Bypass CAPTCHA and Other Protections |
|
|
329 | (1) |
|
|
330 | (1) |
|
Authentication Bypass Attacks |
|
|
330 | (1) |
|
Authentication Bypass Using SQL Injection |
|
|
330 | (3) |
|
Testing for SQL Injection Auth Bypass |
|
|
331 | (2) |
|
Authentication Byp-ass Using XPATH Injection |
|
|
333 | (1) |
|
Testing for XPATH Injection |
|
|
333 | (1) |
|
Authentication Bypass Using Response Tampering |
|
|
334 | (1) |
|
Crawling Restricted Links |
|
|
334 | (1) |
|
Testing for the Vulnerability |
|
|
335 | (1) |
|
Automating It with Burp Suite |
|
|
336 | (1) |
|
Authentication Bypass with Insecure Cookie Handling |
|
|
336 | (6) |
|
|
339 | (1) |
|
|
339 | (2) |
|
|
341 | (1) |
|
Requirements for This Attack |
|
|
342 | (1) |
|
|
342 | (2) |
|
|
342 | (1) |
|
What Is an SQL Injection? |
|
|
342 | (1) |
|
|
342 | (1) |
|
Union-Based SQL Injection |
|
|
343 | (1) |
|
Error-Based SQL Injection |
|
|
343 | (1) |
|
|
343 | (1) |
|
|
343 | (1) |
|
Determining the Injection Type |
|
|
343 | (1) |
|
Union-Based SQL Injection (MySQL) |
|
|
344 | (1) |
|
Testing for SQL Injection |
|
|
344 | (7) |
|
Determining the Number of Columns |
|
|
345 | (1) |
|
Determining the Vulnerable Columns |
|
|
346 | (1) |
|
Fingerprinting the Database |
|
|
347 | (1) |
|
|
347 | (1) |
|
|
348 | (1) |
|
Information_schema Tables |
|
|
348 | (1) |
|
Enumerating All Available Databases |
|
|
348 | (1) |
|
Enumerating All Available Tables in the Database |
|
|
349 | (1) |
|
Extracting Columns from Tables |
|
|
349 | (1) |
|
Extracting Data from Columns |
|
|
350 | (1) |
|
|
350 | (1) |
|
MySQL Version < or = to 5 |
|
|
351 | (1) |
|
|
351 | (2) |
|
|
352 | (1) |
|
SQL Injection to Remote Command Execution |
|
|
352 | (1) |
|
|
353 | (1) |
|
|
353 | (8) |
|
|
355 | (1) |
|
|
355 | (1) |
|
|
355 | (1) |
|
|
356 | (1) |
|
|
356 | (2) |
|
Enumerating the MYSQL Version |
|
|
358 | (1) |
|
|
358 | (1) |
|
Guessing Columns in the Table |
|
|
359 | (1) |
|
Extracting Data from Columns |
|
|
360 | (1) |
|
|
361 | (1) |
|
|
361 | (1) |
|
Testing for Time-Based SQL Injection |
|
|
362 | (7) |
|
|
362 | (1) |
|
|
363 | (1) |
|
|
364 | (1) |
|
Extracting Data from Columns |
|
|
365 | (1) |
|
Automating SQL Injections with Sqlmap |
|
|
366 | (1) |
|
|
367 | (1) |
|
|
367 | (1) |
|
|
367 | (1) |
|
Extracting Data from the Columns |
|
|
368 | (1) |
|
HTTP Header-Based SQL Injection |
|
|
368 | (1) |
|
Operating System Takeover with Sqlmap |
|
|
369 | (1) |
|
|
369 | (1) |
|
|
369 | (1) |
|
|
370 | (1) |
|
XSS (Cross-Site Scripting) |
|
|
371 | (1) |
|
How to Identify XSS Vulnerability |
|
|
371 | (1) |
|
Types of Cross-Site Scripting |
|
|
371 | (1) |
|
Reflected/Nonpersistent XSS |
|
|
372 | (1) |
|
|
372 | (1) |
|
|
373 | (1) |
|
|
373 | (1) |
|
|
373 | (2) |
|
Bypassing htmlspecialchars |
|
|
374 | (1) |
|
UTF-32 XSS Trick: Bypass 1 |
|
|
375 | (1) |
|
|
375 | (1) |
|
|
376 | (1) |
|
Stored XSS/Persistent XSS |
|
|
377 | (1) |
|
|
377 | (1) |
|
|
378 | (1) |
|
|
378 | (12) |
|
|
378 | (6) |
|
|
378 | (1) |
|
Sinks (Creating/Modifying HTML Elements) |
|
|
378 | (6) |
|
Static JS Analysis to Identify DOM-Based XSS |
|
|
384 | (1) |
|
|
385 | (1) |
|
|
385 | (5) |
|
Dominator: Dynamic Taint Analysis |
|
|
390 | (4) |
|
POC for Internet Explorer |
|
|
394 | (1) |
|
|
394 | (1) |
|
|
395 | (1) |
|
Cross Browser DOM XSS Detection |
|
|
395 | (2) |
|
|
397 | (8) |
|
|
397 | (1) |
|
|
397 | (2) |
|
|
399 | (1) |
|
|
399 | (3) |
|
Exploiting XSS for Conducting Phishing Attacks |
|
|
402 | (2) |
|
Compromising Victim's Browser with XSS |
|
|
404 | (1) |
|
|
405 | (1) |
|
Setting Up BeEF on BackTrack |
|
|
405 | (3) |
|
|
408 | (5) |
|
|
409 | (3) |
|
|
409 | (1) |
|
|
409 | (1) |
|
|
410 | (2) |
|
|
412 | (1) |
|
Cross-Site Request Forgery (CSRF) |
|
|
413 | (1) |
|
Why Does a CSRF Attack Work? |
|
|
413 | (1) |
|
|
413 | (1) |
|
|
414 | (1) |
|
|
414 | (1) |
|
CSRF Protection Techniques |
|
|
415 | (1) |
|
|
415 | (1) |
|
|
415 | (1) |
|
Predicting/Brute Forcing Weak Anti-CSRF Token Algorithm |
|
|
416 | (1) |
|
Tokens Not Validated upon Server |
|
|
416 | (1) |
|
Analyzing Weak Anti-CSRF Token Strength |
|
|
417 | (2) |
|
|
419 | (6) |
|
File Upload Vulnerabilities |
|
|
421 | (2) |
|
Bypassing Client Side Restrictions |
|
|
423 | (1) |
|
Bypassing MIME Type Validation |
|
|
423 | (2) |
|
|
425 | (1) |
|
Bypassing Blacklist-Based Protections |
|
|
425 | (1) |
|
Case 1: Blocking Malicious Extensions |
|
|
425 | (1) |
|
|
426 | (1) |
|
Case 2: Case-Sensitive Bypass |
|
|
426 | (1) |
|
|
426 | (1) |
|
|
426 | (5) |
|
|
426 | (1) |
|
Case 3: When All Dangerous Extensions Are Blocked |
|
|
426 | (3) |
|
|
427 | (1) |
|
Flash-Based XSS via File Upload |
|
|
428 | (1) |
|
Case 4: Double Extensions Vulnerabilities |
|
|
429 | (1) |
|
Apache Double Extension Issues |
|
|
429 | (1) |
|
IIS 6 Double Extension Issues |
|
|
429 | (1) |
|
Case 5: Using Trailing Dots |
|
|
429 | (1) |
|
|
429 | (1) |
|
Case 7: Bypassing Image Validation |
|
|
429 | (1) |
|
Case 8: Overwriting Critical Files |
|
|
430 | (1) |
|
|
431 | (1) |
|
File Inclusion Vulnerabilities |
|
|
431 | (1) |
|
|
432 | (1) |
|
Patching File Inclusions on the Server Side |
|
|
433 | (19) |
|
|
433 | (1) |
|
|
434 | (1) |
|
|
434 | (1) |
|
LFI Exploitation Using /proc/self/environ |
|
|
434 | (2) |
|
|
436 | (4) |
|
Finding Log Files: Other Tricks |
|
|
440 | (1) |
|
Exploiting LFI Using PHP Input |
|
|
440 | (1) |
|
Exploiting LFI Using File Uploads |
|
|
441 | (1) |
|
|
442 | (1) |
|
Local File Disclosure Vulnerability |
|
|
443 | (2) |
|
|
443 | (2) |
|
Local File Disclosure Tricks |
|
|
445 | (1) |
|
|
446 | (2) |
|
|
448 | (4) |
|
Server Side Include Injection |
|
|
452 | (1) |
|
Testing a Website for SSI Injection |
|
|
452 | (1) |
|
Executing System Commands |
|
|
453 | (1) |
|
|
453 | (1) |
|
|
454 | (1) |
|
|
455 | (8) |
|
Example of a Vulnerable PHP Code |
|
|
456 | (1) |
|
|
457 | (6) |
|
|
457 | (1) |
|
|
458 | (5) |
|
|
463 | (4) |
|
Denial of Service Using External Entity Expansion (XEE) |
|
|
463 | (1) |
|
|
464 | (2) |
|
|
464 | (1) |
|
|
465 | (1) |
|
|
465 | (1) |
|
|
466 | (1) |
|
Overwriting Return Address |
|
|
467 | (1) |
|
|
467 | (2) |
|
|
469 | (1) |
|
|
470 | (6) |
|
Testing for Disabled Functions |
|
|
470 | (2) |
|
Open_basedir Misconfiguration |
|
|
472 | (2) |
|
Using CURL to Bypass Open_basedir Restrictions |
|
|
474 | (1) |
|
Open_basedir PHP 5.2.9 Bypass |
|
|
475 | (1) |
|
|
476 | (1) |
|
Bypassing open_basedir Using CGI Shell |
|
|
476 | (1) |
|
Bypassing open_basedir Using Mod_Peri, Mod_Python |
|
|
477 | (1) |
|
Escalating Privileges Using Local Root Exploits |
|
|
477 | (1) |
|
|
477 | (1) |
|
Finding the Local Root Exploit |
|
|
478 | (1) |
|
|
478 | (1) |
|
Finding a Writable Directory |
|
|
479 | (1) |
|
Bypassing Symlinks to Read Configuration Files |
|
|
480 | (1) |
|
|
481 | (1) |
|
|
481 | (4) |
|
|
482 | (1) |
|
Symlink Bypass: Example 1 |
|
|
482 | (1) |
|
|
482 | (2) |
|
|
483 | (1) |
|
|
483 | (1) |
|
|
483 | (1) |
|
Uploading .htaccess to Follow Symlinks |
|
|
484 | (1) |
|
Symlinking the Configuration Files |
|
|
484 | (1) |
|
Connecting to and Manipulating the Database |
|
|
485 | (1) |
|
|
486 | (1) |
|
Symlink the Root Directory |
|
|
486 | (1) |
|
Example 3: Compromising WHMCS Server |
|
|
487 | (1) |
|
|
487 | (1) |
|
Symlinking the Configuration rile |
|
|
488 | (3) |
|
|
488 | (2) |
|
Disabling Security Mechanisms |
|
|
490 | (1) |
|
|
490 | (1) |
|
Disabling Open_basedir and Safe_mode |
|
|
490 | (1) |
|
Using CGI, PERL, or Python Shell to Bypass Symlinks |
|
|
491 | (1) |
|
|
491 | (2) |
Index |
|
493 | |