<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sstroup</id>
		<title>OWASP - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sstroup"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Sstroup"/>
		<updated>2026-04-23T18:28:51Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Brute_force_attack&amp;diff=56459</id>
		<title>Brute force attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Brute_force_attack&amp;diff=56459"/>
				<updated>2009-03-10T21:23:19Z</updated>
		
		<summary type="html">&lt;p&gt;Sstroup: /* Description */ spelling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
[[ASDR Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Related Security Activities==&lt;br /&gt;
&lt;br /&gt;
===How to Test for Brute Force Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Testing Project|OWASP Testing Guide]] article on how to [[Testing for Brute Force  (OWASP-AT-004)|Test for Brute Force]] Vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
During this type of attack, the attacker is trying to bypass security mechanisms while having minimal knowledge about them. Using one or more accessible methods: dictionary attack (with or without mutations), brute-force attack (with given classes of characters e.g.: alphanumerical, special, case (in)sensitive) the attacker is trying to achieve his/her goal. Considering a given method, number of tries, efficiency of the system, which conducts the attack and estimated efficiency of the system which is attacked, the attacker is able to calculate how long the attack will have to last. Non brute-force attacks, on the other hand, which includes all classes of characters, give no certainty of success.&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Brute-force attacks are mainly used for guessing passwords and bypassing access control. However there are a lot of tools which use this techinque to examine the web service's catalogue structures and seek interesting, from the attacker's point of view, information. Very often the target of an attack are data in forms (GET/POST) and users' Session-IDs.&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
&lt;br /&gt;
In the first scenerio, where the goal of brute-forcing is to know the password in its decrypted form, it may appear that [http://www.openwall.com/john/ John the Ripper] is a very helpful tool. The TOP10 tools for password cracking with different methods, including brute-force, may be found on&lt;br /&gt;
http://sectools.org/crackers.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For testing web services there are tools like:&lt;br /&gt;
 - dirb (http://sourceforge.net/projects/dirb/)&lt;br /&gt;
 - WebRoot (http://www.cirt.dk/tools/webroot/WebRoot.txt)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dirb belongs to more advanced tools. With its help we are able to:&lt;br /&gt;
 - set cookies&lt;br /&gt;
 - add any HTTP header&lt;br /&gt;
 - use PROXY&lt;br /&gt;
 - mutate objects which were found&lt;br /&gt;
 - test http(s) connections&lt;br /&gt;
 - seek catalogues and/or files using defined dictionaries and templates&lt;br /&gt;
 - and much much more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The simplest test to perform is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rezos@dojo ~/d/owasp_tools/dirb $ ./dirb http://testsite.test/&lt;br /&gt;
-----------------&lt;br /&gt;
DIRB v1.9&lt;br /&gt;
By The Dark Raver&lt;br /&gt;
-----------------&lt;br /&gt;
START_TIME: Mon Jul  9 23:13:16 2007&lt;br /&gt;
URL_BASE: http://testsite.test/&lt;br /&gt;
WORDLIST_FILES: wordlists/common.txt&lt;br /&gt;
SERVER_BANNER: lighttpd/1.4.15&lt;br /&gt;
NOT_EXISTANT_CODE: 404 [NOT FOUND]&lt;br /&gt;
(Location: '' - Size: 345)&lt;br /&gt;
&lt;br /&gt;
-----------------&lt;br /&gt;
&lt;br /&gt;
Generating Wordlist...&lt;br /&gt;
Generated Words: 839&lt;br /&gt;
&lt;br /&gt;
---- Scanning URL: http://testsite.test/ ----&lt;br /&gt;
FOUND: http://testsite.test/phpmyadmin/&lt;br /&gt;
       (***) DIRECTORY (*)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the output the attacker is informed that phpmyadmin/ catalogue was found. The attacker who knows that is now able to perform the attack on this application. In dirb's templates there is, among others, a dictionary containing information about invalid httpd configuration. This dictionary will detect weaknesses of this kind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the main problems with tools like dirb is recognition if the given response from the server is expected and reliable. With more advanced server configuration (e.g. with mod_rewrite) automatic tools are unable to determine if server response informs about an error or that the file, which the attacker is after, was found.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The application [http://www.cirt.dk/tools/webroot/WebRoot.txt WebRoot.pl], written by CIRT.DK, has embedded mechanisms for parsing server responses, and based on the phrase specified by the attacker,  measures if the server response is expected.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Np.&lt;br /&gt;
&lt;br /&gt;
./WebRoot.pl -noupdate -host testsite.test -port 80 -verbose -match &amp;quot;test&amp;quot; -url &amp;quot;/private/&amp;lt;BRUTE&amp;gt;&amp;quot; -incremental lowercase -minimum 1 -maximum 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00&lt;br /&gt;
 o          Webserver Bruteforcing 1.8          o&lt;br /&gt;
 0  ************* !!! WARNING !!! ************  0&lt;br /&gt;
 0  ******* FOR PENETRATION USE ONLY *********  0&lt;br /&gt;
 0  ******************************************  0&lt;br /&gt;
 o       (c)2007 by Dennis Rand - CIRT.DK       o&lt;br /&gt;
 oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00&lt;br /&gt;
&lt;br /&gt;
 [X] Checking for updates                - NO CHECK&lt;br /&gt;
 [X] Checking for False Positive Scan    - OK&lt;br /&gt;
 [X] Using Incremental                   - OK&lt;br /&gt;
 [X] Starting Scan                       - OK&lt;br /&gt;
    GET /private/b HTTP/1.1&lt;br /&gt;
    GET /private/z HTTP/1.1&lt;br /&gt;
&lt;br /&gt;
 [X] Scan complete                       - OK&lt;br /&gt;
 [X] Total attempts                      - 26&lt;br /&gt;
 [X] Sucessfull attempts                 - 1&lt;br /&gt;
 oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00&lt;br /&gt;
&lt;br /&gt;
WebRoot.pl found one file &amp;quot;/private/b&amp;quot; on testsite.test, which contains phrase &amp;quot;test&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another example is to examine ranges of the variable's values:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./WebRoot.pl -noupdate -host testsite.test -port 80 -verbose -diff &amp;quot;Error&amp;quot; -url &amp;quot;/index.php?id=&amp;lt;BRUTE&amp;gt;&amp;quot; -incremental integer -minimum 1 -maximum 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Defensive Tools==&lt;br /&gt;
&lt;br /&gt;
'''Php-Brute-Force-Attack Detector'''&lt;br /&gt;
&lt;br /&gt;
http://yehg.net/lab/pr0js/files.php/php_brute_force_detect.zip&lt;br /&gt;
&lt;br /&gt;
Detect your web servers being scanned by brute force tools such as WFuzz, OWASP DirBuster and vulnerability scanners such as Nessus, Nikto, Acunetix ..etc. This helps you quickly identify probable probing by bad guys who's wanna dig possible security holes.&lt;br /&gt;
&lt;br /&gt;
http://yehg.net/lab/pr0js/tools/php-brute-force-detector-readme.pdf&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
* [[:Category:Authentication]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[Blind SQL Injection]]&lt;br /&gt;
* [[Blind XPath Injection]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
* [[Insufficient Session-ID Length]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[Authentication]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Probabilistic Techniques]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Sstroup</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Brute_force_attack&amp;diff=56458</id>
		<title>Brute force attack</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Brute_force_attack&amp;diff=56458"/>
				<updated>2009-03-10T21:23:00Z</updated>
		
		<summary type="html">&lt;p&gt;Sstroup: /* Description */ spelling/grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
[[ASDR Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Related Security Activities==&lt;br /&gt;
&lt;br /&gt;
===How to Test for Brute Force Vulnerabilities===&lt;br /&gt;
&lt;br /&gt;
See the [[:Category:OWASP Testing Project|OWASP Testing Guide]] article on how to [[Testing for Brute Force  (OWASP-AT-004)|Test for Brute Force]] Vulnerabilities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
During this type of attack, the attacker is trying to bypass security mechanisms while having minimal knowledge about them. Using one or more accessible methods: dictionary attack (with or without mutations), brute-force attack (with given classes of characters e.g.: alphanuerical, special, case (in)sensitive) the attacker is trying to achieve his/her goal. Considering a given method, number of tries, efficiency of the system, which conducts the attack and estimated efficiency of the system which is attacked, the attacker is able to calculate how long the attack will have to last. Non brute-force attacks, on the other hand, which includes all classes of characters, give no certainty of success.&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Brute-force attacks are mainly used for guessing passwords and bypassing access control. However there are a lot of tools which use this techinque to examine the web service's catalogue structures and seek interesting, from the attacker's point of view, information. Very often the target of an attack are data in forms (GET/POST) and users' Session-IDs.&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
&lt;br /&gt;
In the first scenerio, where the goal of brute-forcing is to know the password in its decrypted form, it may appear that [http://www.openwall.com/john/ John the Ripper] is a very helpful tool. The TOP10 tools for password cracking with different methods, including brute-force, may be found on&lt;br /&gt;
http://sectools.org/crackers.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For testing web services there are tools like:&lt;br /&gt;
 - dirb (http://sourceforge.net/projects/dirb/)&lt;br /&gt;
 - WebRoot (http://www.cirt.dk/tools/webroot/WebRoot.txt)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dirb belongs to more advanced tools. With its help we are able to:&lt;br /&gt;
 - set cookies&lt;br /&gt;
 - add any HTTP header&lt;br /&gt;
 - use PROXY&lt;br /&gt;
 - mutate objects which were found&lt;br /&gt;
 - test http(s) connections&lt;br /&gt;
 - seek catalogues and/or files using defined dictionaries and templates&lt;br /&gt;
 - and much much more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The simplest test to perform is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rezos@dojo ~/d/owasp_tools/dirb $ ./dirb http://testsite.test/&lt;br /&gt;
-----------------&lt;br /&gt;
DIRB v1.9&lt;br /&gt;
By The Dark Raver&lt;br /&gt;
-----------------&lt;br /&gt;
START_TIME: Mon Jul  9 23:13:16 2007&lt;br /&gt;
URL_BASE: http://testsite.test/&lt;br /&gt;
WORDLIST_FILES: wordlists/common.txt&lt;br /&gt;
SERVER_BANNER: lighttpd/1.4.15&lt;br /&gt;
NOT_EXISTANT_CODE: 404 [NOT FOUND]&lt;br /&gt;
(Location: '' - Size: 345)&lt;br /&gt;
&lt;br /&gt;
-----------------&lt;br /&gt;
&lt;br /&gt;
Generating Wordlist...&lt;br /&gt;
Generated Words: 839&lt;br /&gt;
&lt;br /&gt;
---- Scanning URL: http://testsite.test/ ----&lt;br /&gt;
FOUND: http://testsite.test/phpmyadmin/&lt;br /&gt;
       (***) DIRECTORY (*)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the output the attacker is informed that phpmyadmin/ catalogue was found. The attacker who knows that is now able to perform the attack on this application. In dirb's templates there is, among others, a dictionary containing information about invalid httpd configuration. This dictionary will detect weaknesses of this kind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the main problems with tools like dirb is recognition if the given response from the server is expected and reliable. With more advanced server configuration (e.g. with mod_rewrite) automatic tools are unable to determine if server response informs about an error or that the file, which the attacker is after, was found.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The application [http://www.cirt.dk/tools/webroot/WebRoot.txt WebRoot.pl], written by CIRT.DK, has embedded mechanisms for parsing server responses, and based on the phrase specified by the attacker,  measures if the server response is expected.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Np.&lt;br /&gt;
&lt;br /&gt;
./WebRoot.pl -noupdate -host testsite.test -port 80 -verbose -match &amp;quot;test&amp;quot; -url &amp;quot;/private/&amp;lt;BRUTE&amp;gt;&amp;quot; -incremental lowercase -minimum 1 -maximum 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00&lt;br /&gt;
 o          Webserver Bruteforcing 1.8          o&lt;br /&gt;
 0  ************* !!! WARNING !!! ************  0&lt;br /&gt;
 0  ******* FOR PENETRATION USE ONLY *********  0&lt;br /&gt;
 0  ******************************************  0&lt;br /&gt;
 o       (c)2007 by Dennis Rand - CIRT.DK       o&lt;br /&gt;
 oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00&lt;br /&gt;
&lt;br /&gt;
 [X] Checking for updates                - NO CHECK&lt;br /&gt;
 [X] Checking for False Positive Scan    - OK&lt;br /&gt;
 [X] Using Incremental                   - OK&lt;br /&gt;
 [X] Starting Scan                       - OK&lt;br /&gt;
    GET /private/b HTTP/1.1&lt;br /&gt;
    GET /private/z HTTP/1.1&lt;br /&gt;
&lt;br /&gt;
 [X] Scan complete                       - OK&lt;br /&gt;
 [X] Total attempts                      - 26&lt;br /&gt;
 [X] Sucessfull attempts                 - 1&lt;br /&gt;
 oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00oo00&lt;br /&gt;
&lt;br /&gt;
WebRoot.pl found one file &amp;quot;/private/b&amp;quot; on testsite.test, which contains phrase &amp;quot;test&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another example is to examine ranges of the variable's values:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./WebRoot.pl -noupdate -host testsite.test -port 80 -verbose -diff &amp;quot;Error&amp;quot; -url &amp;quot;/index.php?id=&amp;lt;BRUTE&amp;gt;&amp;quot; -incremental integer -minimum 1 -maximum 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Defensive Tools==&lt;br /&gt;
&lt;br /&gt;
'''Php-Brute-Force-Attack Detector'''&lt;br /&gt;
&lt;br /&gt;
http://yehg.net/lab/pr0js/files.php/php_brute_force_detect.zip&lt;br /&gt;
&lt;br /&gt;
Detect your web servers being scanned by brute force tools such as WFuzz, OWASP DirBuster and vulnerability scanners such as Nessus, Nikto, Acunetix ..etc. This helps you quickly identify probable probing by bad guys who's wanna dig possible security holes.&lt;br /&gt;
&lt;br /&gt;
http://yehg.net/lab/pr0js/tools/php-brute-force-detector-readme.pdf&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
* [[:Category:Authentication]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[Blind SQL Injection]]&lt;br /&gt;
* [[Blind XPath Injection]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
* [[Insufficient Session-ID Length]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[Authentication]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Probabilistic Techniques]]&lt;br /&gt;
[[Category: Attack]]&lt;/div&gt;</summary>
		<author><name>Sstroup</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Blind_XPath_Injection&amp;diff=56457</id>
		<title>Blind XPath Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Blind_XPath_Injection&amp;diff=56457"/>
				<updated>2009-03-10T21:13:53Z</updated>
		
		<summary type="html">&lt;p&gt;Sstroup: /* Boolenization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Attack}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:OWASP ASDR Project]]&lt;br /&gt;
[[ASDR Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
XPath is a type of query language that describes how to locate specific elements (including attributes, processing instructions,&lt;br /&gt;
etc.) in an XML document. Since it is a query language, XPath is somewhat similar to Structured Query Language (SQL). However, XPath&lt;br /&gt;
can be used to reference almost any part of any XML document without access control restrictions, whereas with SQL, a &amp;quot;user&amp;quot; (which is a term undefined in the XPath/XML context) may be restricted to certain tables, columns or queries.&lt;br /&gt;
&lt;br /&gt;
More information may be found in the article dedicated to [[XPATH Injection]]. Using an XPATH Injection attack the attacker is able to log in to the system without entering valid login and password. If he wants to know information about other users he must take one step further. When conducting a Blind XPath Injection attack, the attacker has no knowledge about the structure of the XML document. However his situation is better compared to [[Blind SQL Injection]], because there are functions which allow for performing tests (XML Crawling) and in the end getting to know the document structure.&lt;br /&gt;
&lt;br /&gt;
==Risk Factors==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
The attacker may be successful using two methods: Boolenization and XML Crawling. By adding to the XPath syntax, the attacker uses additional expressions (replacing what the attacker entered in the place of login to the specially crafted expression).&lt;br /&gt;
&lt;br /&gt;
===Boolenization===&lt;br /&gt;
Using the &amp;quot;Boolenization&amp;quot; method the attacker may find out if the given XPath expression is True or False. Let's assume that the aim of the attacker is to log in to the account. Successfull log in would equal &amp;quot;True&amp;quot; and failed log in attempt would equal &amp;quot;False&amp;quot;. Only a smart portion of the information is analyzed &amp;quot;character&amp;quot; or the number. When the attacker focuses on the string he may reveal it in its entirety by checking every single character within the class/range of characters this string belongs to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using a ''string-length(S)'' function, where S is a string, the attacker may find out the length of this string. With the appropriate number of ''substring(S,N,1)'' function iterations, where S is a previously mentioned string, N is a start character, and &amp;quot;1&amp;quot; is a next character counting from N character, the attacker is able to find out the whole string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;data&amp;gt;&lt;br /&gt;
   &amp;lt;user&amp;gt;&lt;br /&gt;
   &amp;lt;login&amp;gt;admin&amp;lt;/login&amp;gt;&lt;br /&gt;
   &amp;lt;password&amp;gt;test&amp;lt;/password&amp;gt;&lt;br /&gt;
   &amp;lt;realname&amp;gt;SuperUser&amp;lt;/realname&amp;gt;&lt;br /&gt;
   &amp;lt;/user&amp;gt;&lt;br /&gt;
   &amp;lt;user&amp;gt;&lt;br /&gt;
   &amp;lt;login&amp;gt;rezos&amp;lt;/login&amp;gt;&lt;br /&gt;
   &amp;lt;password&amp;gt;rezos123&amp;lt;/password&amp;gt;&lt;br /&gt;
   &amp;lt;realname&amp;gt;Simple User&amp;lt;/realname&amp;gt;&lt;br /&gt;
   &amp;lt;/user&amp;gt;&lt;br /&gt;
&amp;lt;/data&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Function:&lt;br /&gt;
&lt;br /&gt;
* ''string.stringlength(//user[position()=1]/child::node()[position()=2])'' returns the length of the second string of the first user (8),&lt;br /&gt;
* ''substring((//user[position()=1]/child::node()[position()=2),1,1)'' returns the first character of this user ('r').&lt;br /&gt;
&lt;br /&gt;
===XML Crawling===&lt;br /&gt;
&lt;br /&gt;
To get to know the XML document structure the attacker may use:&lt;br /&gt;
&lt;br /&gt;
* count(expression)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
count(//user/child::node()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will return the number of nodes (in this case 2).&lt;br /&gt;
&lt;br /&gt;
* stringlength(string)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
string-length(//user[position()=1]/child::node()[position()=2])=6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Using this query the attacker will find out if the second string (password) of the first node (user 'admin') consists of 6 characters.&lt;br /&gt;
&lt;br /&gt;
* substring(string, number, number)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
substring((//user[position()=1]/child::node()[position()=2]),1,1)=&amp;quot;a&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This query will confirm (True) or deny (False) that the first character of the user ('admin') password is an &amp;quot;a&amp;quot; character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the log in form would look like this:&lt;br /&gt;
&lt;br /&gt;
C#:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
String FindUser;&lt;br /&gt;
FindUser = &amp;quot;//user[login/text()='&amp;quot; + Request(&amp;quot;Username&amp;quot;) + &amp;quot;' And&lt;br /&gt;
      password/text()='&amp;quot; + Request(&amp;quot;Password&amp;quot;) + &amp;quot;']&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then the attacker should inject the following code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Username: ' or substring((//user[position()=1]/child::node()[position()=2]),1,1)=&amp;quot;a&amp;quot; or ''='&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The XPath syntax may remind you of common [[SQL Injection]] attacks but the attacker must consider that this language disallows commenting&lt;br /&gt;
out the rest of expresssion. To omit this limitation the attacker should use OR expressions to void all expressions, which may disrupt the attack.&lt;br /&gt;
&lt;br /&gt;
Because of ''Boolenization'' the number of queries, even within a small XML document, may be very high (thousands, houndred of thousands and more). That is why this attack is not conducted manually. Knowing few basic XPath functions the attacker is able to write an application in a short time, which will rebuild the structure of the document and will fill it with data by itself.&lt;br /&gt;
&lt;br /&gt;
==Related [[Threat Agents]]==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==Related [[Attacks]]==&lt;br /&gt;
* [[Blind_SQL_Injection]]&lt;br /&gt;
* [[XPATH_Injection]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Vulnerabilities]]==&lt;br /&gt;
* [[Injection_problem]]&lt;br /&gt;
&lt;br /&gt;
==Related [[Controls]]==&lt;br /&gt;
* [[:Category:Input Validation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* http://www.modsecurity.org/archive/amit/blind-xpath-injection.pdf - by Amit Klein (much more detailes, in my opinion the best source about Blind XPath Injection).&lt;br /&gt;
* http://www.ibm.com/developerworks/xml/library/x-xpathinjection.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Injection]]&lt;br /&gt;
[[Category:Attack]]&lt;/div&gt;</summary>
		<author><name>Sstroup</name></author>	</entry>

	</feed>