Becoming the hacker: the playbook for getting inside the mind of the attacker 9781788627962, 1788627962

1,161 172 11MB

English Pages 384 [405] Year 2019

Report DMCA / Copyright

DOWNLOAD FILE

Becoming the hacker: the playbook for getting inside the mind of the attacker
 9781788627962, 1788627962

Table of contents :
Cover......Page 1
Copyright......Page 3
Packt upsell......Page 4
Contributors......Page 5
Table of Contents......Page 8
Preface......Page 14
Chapter 1 - Introduction to Attacking Web Applications......Page 20
Communication......Page 22
Privacy considerations......Page 24
Cleaning up......Page 25
Kali Linux......Page 26
Kali Linux alternatives......Page 27
Burp Suite......Page 29
Cloud infrastructure......Page 31
Resources......Page 33
Summary......Page 34
Types of assessments......Page 36
Target mapping......Page 38
Masscan......Page 40
WhatWeb......Page 42
Nikto......Page 43
CMS scanners......Page 44
Efficient brute-forcing......Page 45
Burp Suite......Page 47
Gobuster......Page 49
Persistent content discovery......Page 51
Payload processing......Page 55
Polyglot payloads......Page 68
Same payload, different context......Page 74
Code obfuscation......Page 75
Resources......Page 78
Summary......Page 79
Network assessment......Page 80
Looking for a way in......Page 83
Credential guessing......Page 85
A better way to shell......Page 92
Cleaning up......Page 96
Summary......Page 97
Chapter 4 - Advanced Brute-forcing......Page 98
Password spraying......Page 99
LinkedIn scraping......Page 101
Metadata......Page 104
The cluster bomb......Page 106
Behind seven proxies......Page 110
Torify......Page 111
Proxy cannon......Page 118
Summary......Page 123
Chapter 5 - File Inclusion Attacks......Page 124
RFI......Page 125
LFI......Page 127
File inclusion to remote code execution......Page 136
More file upload issues......Page 138
Summary......Page 143
Chapter 6 - Out-of-Band Exploitation......Page 144
A common scenario......Page 145
Command and control......Page 146
Let’s Encrypt Communication......Page 148
INet simulation......Page 152
The confirmation......Page 157
Async data exfiltration......Page 158
Data inference......Page 161
Summary......Page 162
Chapter 7 - Automated Testing......Page 164
Extending Burp......Page 165
Authentication and authorization abuse......Page 168
The Autorize flow......Page 169
The Swiss Army knife......Page 172
sqlmap helper......Page 173
Web shells......Page 177
Obfuscating code......Page 180
Burp Collaborator......Page 182
Public Collaborator server......Page 184
Service interaction......Page 185
Burp Collaborator client......Page 186
Private Collaborator server......Page 190
Summary......Page 196
Chapter 8 - Bad Serialization......Page 198
Abusing deserialization......Page 199
Attacking custom protocols......Page 206
Protocol analysis......Page 207
Deserialization exploit......Page 210
Summary......Page 218
Chapter 9 - Practical Client-Side Attacks......Page 220
SOP......Page 221
Cross-origin resource sharing......Page 225
Reflected XSS......Page 226
Persistent XSS......Page 228
DOM-based XSS......Page 229
CSRF......Page 232
BeEF......Page 235
Hooking......Page 239
Social engineering attacks......Page 243
The keylogger......Page 246
Persistence......Page 252
Automatic exploitation......Page 254
Tunneling traffic......Page 259
Summary......Page 261
Chapter 10 - Practical Server-Side Attacks......Page 262
Internal and external references......Page 263
A billion laughs......Page 265
Request forgery......Page 267
The port scanner......Page 271
Information leak......Page 274
Blind XXE......Page 281
Remote code execution......Page 286
Interactive shells......Page 288
Summary......Page 291
Chapter 11 - Attacking APIs......Page 294
API communication protocols......Page 295
SOAP......Page 296
REST......Page 299
Basic authentication......Page 300
API keys......Page 301
JWTs......Page 302
JWT quirks......Page 304
Burp JWT support......Page 306
Postman......Page 308
Installation......Page 310
Upstream proxy......Page 312
The environment......Page 314
Collections......Page 315
Collection Runner......Page 322
Attack considerations......Page 324
Summary......Page 325
Chapter 12 - Attacking CMS......Page 326
WPScan......Page 327
sqlmap......Page 334
Droopescan......Page 336
Arachni web scanner......Page 337
Backdooring the code......Page 341
Persistence......Page 342
Credential exfiltration......Page 353
Summary......Page 363
Chapter 13 - Breaking Containers......Page 364
Vulnerable Docker scenario......Page 366
Foothold......Page 368
Situational awareness......Page 376
Container breakout......Page 384
Summary......Page 390
Other Books You May Enjoy......Page 392
Index......Page 398

Polecaj historie