Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Web Penetration Testing with Kali Linux. - Third Edition

You're reading from  Web Penetration Testing with Kali Linux. - Third Edition

Product type Book
Published in Feb 2018
Publisher
ISBN-13 9781788623377
Pages 426 pages
Edition 3rd Edition
Languages
Authors (3):
Daniel W. Dieterle Daniel W. Dieterle
Profile icon Daniel W. Dieterle
Gilberto Najera-Gutierrez Gilberto Najera-Gutierrez
Profile icon Gilberto Najera-Gutierrez
Juned Ahmed Ansari Juned Ahmed Ansari
Profile icon Juned Ahmed Ansari
View More author details
Toc

Table of Contents (19) Chapters close

Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
1. Introduction to Penetration Testing and Web Applications 2. Setting Up Your Lab with Kali Linux 3. Reconnaissance and Profiling the Web Server 4. Authentication and Session Management Flaws 5. Detecting and Exploiting Injection-Based Flaws 6. Finding and Exploiting Cross-Site Scripting (XSS) Vulnerabilities 7. Cross-Site Request Forgery, Identification, and Exploitation 8. Attacking Flaws in Cryptographic Implementations 9. AJAX, HTML5, and Client-Side Attacks 10. Other Common Security Flaws in Web Applications 11. Using Automated Scanners on Web Applications 1. Other Books You May Enjoy Index

XML injection


This section will cover two different perspectives on the use of XML in web applications:

  • When the application performs searches in an XML file or XML database
  • When the user submits XML formatted information to be parsed by the application

 

XPath injection

XPath is a query language for selecting nodes from an XML document. The following is the basic XML structure:

<rootNode> 
  <childNode> 
    <element/> 
  </childNode> 
</rootNode> 

An XPath search for element can be represented as follows:

/rootNode/childNode/element 

More complex expressions can be made, for example, an XPath query for a login page may look like the following:

//Employee[UserName/text()='myuser' And Password/text()='mypassword'] 

As with SQL, if the input from the user is taken as is and concatenated to a query string, such input may be interpreted as code instead of data parameters.

For example, let's look at bWapp's XML/XPath Injection (Search) exercise. It shows a drop box, where you...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}