<?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=Aditya+Balapure</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=Aditya+Balapure"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Aditya_Balapure"/>
		<updated>2026-05-05T04:41:32Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_Framework_(OTG-INFO-008)&amp;diff=170619</id>
		<title>Fingerprint Web Application Framework (OTG-INFO-008)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_Framework_(OTG-INFO-008)&amp;diff=170619"/>
				<updated>2014-03-22T05:11:13Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
== Summary ==&lt;br /&gt;
Web framework[*] fingerprinting is an important subtask of the information gathering process. Knowing the type of framework can automatically give a great advantage if such a framework has already been tested by the penetration tester. It is not only the known vulnerabilities in unpatched versions but specific misconfigurations in the framework and known file structure which makes the fingerprinting process so important.&lt;br /&gt;
&lt;br /&gt;
Several different vendors and versions of web frameworks are widely used. &lt;br /&gt;
Information about it significantly helps in the testing process, and can also help in changing the course of the test. &lt;br /&gt;
Such information can be derived by careful analysis of certain common locations. Most of the web frameworks have several markers in those locations which help an attacker to spot them.&lt;br /&gt;
This is basically what all automatic tools do, they look for a marker from a predefined location&lt;br /&gt;
and then compare it to the database of known signatures. For better accuracy several markers are usually used.&lt;br /&gt;
&lt;br /&gt;
[*] Please note that in this article we make no difference between Web Application Frameworks (WAF) and Content Management Systems (CMS).&lt;br /&gt;
This has been done to make it convenient to fingerprint both of them in one chapter.Further we reference both of the categories as web frameworks.&lt;br /&gt;
&lt;br /&gt;
== Test Objectives ==&lt;br /&gt;
To define type of used web framework so to have a better understanding of the penetration testing methodology.&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
There are several most common locations to look in in order to define the current framework:&lt;br /&gt;
*HTTP headers&lt;br /&gt;
*Cookies&lt;br /&gt;
*HTML source code&lt;br /&gt;
*Specific files and folders&lt;br /&gt;
&lt;br /&gt;
Let's look closer at those approaches.&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
The most basic form of identifying a web framework is to look at the ''X-Powered-By'' field in the HTTP response header.&lt;br /&gt;
Many tools can be used to fingerprint a target. The simplest one is netcat utility. &lt;br /&gt;
Consider the following HTTP Request-Response: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc 127.0.0.1 80&lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.0.14&lt;br /&gt;
Date: Sat, 07 Sep 2013 08:19:15 GMT&lt;br /&gt;
Content-Type: text/html;charset=ISO-8859-1&lt;br /&gt;
Connection: close&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: Mono&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the ''X-Powered-By'' field, we understand that the web application framework is likely to be Mono.&lt;br /&gt;
&lt;br /&gt;
However, although simplicity and quickness of such an approach, this methodology doesn't work in 100% of cases. It is possible to easily disable ''X-Powered-By'' header by a proper configuration. There are also several techniques that allow a web site to obfuscate HTTP headers (see an example in [[#Remediation]] chapter)&lt;br /&gt;
So in the same example we could either miss the ''X-Powered-By'' header or obtain an answer like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.0.14&lt;br /&gt;
Date: Sat, 07 Sep 2013 08:19:15 GMT&lt;br /&gt;
Content-Type: text/html;charset=ISO-8859-1&lt;br /&gt;
Connection: close&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: Blood, sweat and tears&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes there are more HTTP-headers which point at the certain web framework. In the following example according to the information from HTTP-request one can see that ''X-Powered-By'' header contains PHP version. However, ''X-Generator'' header points out the used framework is actually Swiftlet, which helps a penetration tester to expand his attack vectors. When performing fingerprinting, always carefully inspect every HTTP-header for such leaks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.4.1&lt;br /&gt;
Date: Sat, 07 Sep 2013 09:22:52 GMT&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: PHP/5.4.16-1~dotdeb.1&lt;br /&gt;
Expires: Thu, 19 Nov 1981 08:52:00 GMT&lt;br /&gt;
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0&lt;br /&gt;
Pragma: no-cache&lt;br /&gt;
X-Generator: Swiftlet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
Another similar and somehow more reliable way to determine the current web framework are framework-specific cookies.&lt;br /&gt;
Consider the following HTTP-request:&lt;br /&gt;
&lt;br /&gt;
[[Image:Cakephp_cookie.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, cookie ''CAKEPHP'' has automatically been set, which gives us the information about the framework being used. List of common cookies names is presented in chapter [[#Cookies_2]]. Limitations are the same - it is possible to change the name of the cookie. For example, for the selected ''CakePHP'' framework this could be done by the following configuration (excerpt from core.php):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
* The name of CakePHP's session cookie.&lt;br /&gt;
*&lt;br /&gt;
* Note the guidelines for Session names states: &amp;quot;The session name references&lt;br /&gt;
* the session id in cookies and URLs. It should contain only alphanumeric&lt;br /&gt;
* characters.&amp;quot;&lt;br /&gt;
* @link http://php.net/session_name&lt;br /&gt;
*/&lt;br /&gt;
Configure::write('Session.cookie', 'CAKEPHP');&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However from the experience, these changes are less likely to be made than, for example, ''X-Powered-By'' header so this approach can be considered as more reliable one.&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
This technique is based on finding certain patterns in the HTML page source code. Often one can find much information which helps a tester to recognize a specific web framework.&lt;br /&gt;
Ones of the common markers are HTML comments which directly lead to framework disclosure. More often certain framework-specific paths can be found, i.e. links to framework-specific css and/or js folders. Finally, specific script variables might also point to a certain framework.&lt;br /&gt;
From the screenshot below one can easily learn the used framework and its version by the mentioned markers: comment, specific paths and script variables can all help an attacker to quickly determine an instance of ZK framework.&lt;br /&gt;
&lt;br /&gt;
[[Image:Zk_html_source.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More frequently such information is placed between &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;, in &amp;lt;meta&amp;gt; tags or at the end of the page. Nevertheless, it is recommended to check the whole document since it can be useful for other purposes such as inspection of other useful comments and hidden fields.&lt;br /&gt;
Sometimes, however, web developers do not care much about hiding tracks of the used framework. It's still possible to stumble upon something like that at the bottom of the page:&lt;br /&gt;
&lt;br /&gt;
[[Image:banshee_bottom_page.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
Apart from information gathered from HTML sources, there is another approach which greatly helps an attacker to determine the framework with high accuracy.&lt;br /&gt;
Every framework has its own specific file and folder structure on the server. We pointed out that one can see the specific path from the HTML page source but sometimes they are not explicitly presented there and still reside on the server. In order to uncover them a technique known as dirbusting is used. Dirbusting is brute forcing target with predictable folder and file names and monitoring HTTP-responses thus enumerating server contents. This information can be used both for finding default files and attacking them in next stages and for fingerprinting the web framework.&lt;br /&gt;
Dirbusting can be done in several ways, example below shows successful dirbusting attack against a WordPress-powered target with the help of defined list and Intruder functionality of Burp Suite.&lt;br /&gt;
&lt;br /&gt;
[[Image:Wordpress_dirbusting.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that for some WordPress-specific folders (for instance, /wp-includes/, /wp-admin/ and /wp-content/) HTTP-reponses are 403 (Forbidden), 302 (Found, redirection to ''wp-login.php'') and 200 (OK) respectively. This is a good indicator that the target is WordPress-powered. The same way it is possible to dirbust different framework plugin folders and their versions. On the screenshot below one can see a typical CHANGELOG file of a Drupal plugin, which provides information on the framework being used and discloses vulnerable plugin version.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drupal_botcha_disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tip: before starting dirbusting (which is a useful operation anyway), it is recommended to check robots.txt file first. Sometimes framework specific folders and other sensitive information can be found there as well! Example of such robots file is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Robots-info-disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing ===&lt;br /&gt;
Please address yourself to watching Monty Python's Flying Circus, I'm sure you'll like it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common frameworks ==&lt;br /&gt;
=== Cookies ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Framework !! Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| Zope || zope3&lt;br /&gt;
|-&lt;br /&gt;
| CakePHP || cakephp&lt;br /&gt;
|-&lt;br /&gt;
| Kohana || kohanasession&lt;br /&gt;
|-&lt;br /&gt;
| Laravel || laravel_session&lt;br /&gt;
|-&lt;br /&gt;
| 1C-Bitrix || BITRIX_&lt;br /&gt;
|-&lt;br /&gt;
| AMPcms || AMP&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Django CMS || django&lt;br /&gt;
|-&lt;br /&gt;
| DotNetNuke || DotNetNukeAnonymous&lt;br /&gt;
|-&lt;br /&gt;
| e107 || e107_tz&lt;br /&gt;
|-&lt;br /&gt;
| EPiServer || EPiTrace, EPiServer&lt;br /&gt;
|-&lt;br /&gt;
| Graffiti CMS || graffitibot&lt;br /&gt;
|-&lt;br /&gt;
| Hotaru CMS || hotaru_mobile&lt;br /&gt;
|-&lt;br /&gt;
| ImpressCMS || ICMSession&lt;br /&gt;
|-&lt;br /&gt;
| Indico || MAKACSESSION&lt;br /&gt;
|-&lt;br /&gt;
| InstantCMS || InstantCMS[logdate]&lt;br /&gt;
|-&lt;br /&gt;
| Kentico CMS || CMSPreferredCulture&lt;br /&gt;
|-&lt;br /&gt;
| MODx || SN4[12symb]&lt;br /&gt;
|-&lt;br /&gt;
| TYPO3 || fe_typo_user&lt;br /&gt;
|-&lt;br /&gt;
| Dynamicweb || Dynamicweb&lt;br /&gt;
|-&lt;br /&gt;
| LEPTON || lep[some_numeric_value]+sessionid&lt;br /&gt;
|-&lt;br /&gt;
| Wix || Domain=.wix.com&lt;br /&gt;
|-&lt;br /&gt;
| VIVVO || VivvoSessionId&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTML source code ===&lt;br /&gt;
==== General markers ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| %framework_name%&lt;br /&gt;
|-&lt;br /&gt;
| powered by&lt;br /&gt;
|-&lt;br /&gt;
| built upon&lt;br /&gt;
|-&lt;br /&gt;
| running&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Specific markers ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Framework !! Keyword&lt;br /&gt;
|-&lt;br /&gt;
| Adobe ColdFusion || &amp;amp;lt;!-- START headerTags.cfm&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft ASP.NET || __VIEWSTATE&lt;br /&gt;
|-&lt;br /&gt;
| ZK || &amp;amp;lt;!-- ZK&lt;br /&gt;
|-&lt;br /&gt;
| Business Catalyst || &amp;amp;lt;!-- BC_OBNW --&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Indexhibit || ndxz-studio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Specific files and folders ===&lt;br /&gt;
These are different for each specific framework. It is recommended to install the corresponding framework during penetration tests in order to have better understanding of what infrastructure is presented and which files might be left on the server. However, several good pre-made lists already exist, one good example of them - FuzzDB wordlists of predictable files/folders (http://code.google.com/p/fuzzdb/)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
A list of general and well-known tools is presented below. There are also a lot of other utilities, as well as framework-based fingerprinting tools.&lt;br /&gt;
 &lt;br /&gt;
=== WhatWeb ===&lt;br /&gt;
Website:  http://www.morningstarsecurity.com/research/whatweb &amp;lt;br&amp;gt;&lt;br /&gt;
Currently one of the best fingerprinting tools on the market. Included in a default [[Kali Linux]] build.&lt;br /&gt;
Language: Ruby&lt;br /&gt;
Matches for fingerprinting are made with:&lt;br /&gt;
* Text strings (case sensitive)&lt;br /&gt;
* Regular expressions&lt;br /&gt;
* Google Hack Database queries (limited set of keywords)&lt;br /&gt;
* MD5 hashes&lt;br /&gt;
* URL recognition&lt;br /&gt;
* HTML tag patterns&lt;br /&gt;
* Custom ruby code for passive and aggressive operations&lt;br /&gt;
&lt;br /&gt;
Sample output is presented on a screenshot below:&lt;br /&gt;
&lt;br /&gt;
[[Image:whatweb-sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BlindElephant === &lt;br /&gt;
Website: https://community.qualys.com/community/blindelephant &amp;lt;br&amp;gt;&lt;br /&gt;
This great tool works on the principle of static file checksum based version difference thus providing a very high quality of fingerprinting.&lt;br /&gt;
Language: Python&lt;br /&gt;
&lt;br /&gt;
Sample output of a successful fingerprint:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pentester$ python BlindElephant.py http://my_target drupal&lt;br /&gt;
Loaded /Library/Python/2.7/site-packages/blindelephant/dbs/drupal.pkl with 145 versions, 478 differentiating paths, and 434 version groups.&lt;br /&gt;
Starting BlindElephant fingerprint for version of drupal at http://my_target &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/CHANGELOG.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 527b085a3717bd691d47713dff74acf4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/INSTALL.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 14dfc133e4101be6f0ef5c64566da4a4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/misc/drupal.js&lt;br /&gt;
Possible versions based on result: 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/MAINTAINERS.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 36b740941a19912f3fdbfcca7caa08ca &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/themes/garland/style.css&lt;br /&gt;
Possible versions based on result: 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 7.10, 7.11, 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Fingerprinting resulted in:&lt;br /&gt;
7.14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Best Guess: 7.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wappalyzer ===&lt;br /&gt;
Website: http://wappalyzer.com &amp;lt;br&amp;gt;&lt;br /&gt;
Wapplyzer is a Firefox/Chrome plug-in. It works only on regular expression matching and doesn't need anything other than the page to be loaded on browser. It works completely at the browser level and gives results in the form of icons. Although sometimes it has false positives, this is very handy to have notion of what technologies were used to construct a target website immediately after browsing a page.&lt;br /&gt;
Sample output of a plug-in is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Owasp-wappalyzer.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Vulnerability References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Saumil Shah: &amp;quot;An Introduction to HTTP fingerprinting&amp;quot; - http://www.net-square.com/httprint_paper.html&lt;br /&gt;
* Anant Shrivastava : &amp;quot;Web Application Finger Printing&amp;quot; - http://anantshri.info/articles/web_app_finger_printing.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
General advice: use several tools described above and check scan logs in order to better understand what exactly helps an attacker to disclose your web framework. By performing multiple scans after changes you've done to hide framework tracks, it's possible to achieve better security level and to make sure of undetectability by automatic scans.&lt;br /&gt;
Below you may find specific recommendations by framework marker location and some additional interesting approaches.&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
Check your configuration and disable/obfuscate all HTTP-headers which disclose information about used technologies.&lt;br /&gt;
An interesting article about HTTP-headers obfuscation using Netscaler:&lt;br /&gt;
http://grahamhosking.blogspot.ru/2013/07/obfuscating-http-header-using-netscaler.html&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
It is recommended to change cookie names by making proper changes in corresponding config files.&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
Check manually the contents of your HTML code and remove everything what explicitly points to the framework.&lt;br /&gt;
General guidelines:&lt;br /&gt;
*Make sure you didn't leave any visual markers disclosing used framework&lt;br /&gt;
*Remove any unnecessary comments (copyrights, bug information, specific framework comments)&lt;br /&gt;
*Remove META and generator tags&lt;br /&gt;
*Use your own css/js and do not store those in a framework-specific folders&lt;br /&gt;
*Make sure you're not using default scripts on the page; if using them is needed, obfuscate them.&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
*Remove any unnecessary/unused files on the server. This implies text files disclosing information about versions and installation too.&lt;br /&gt;
*Restrict access to other files in order to achieve 404-response when accessing them from outside. This can be done, for example, by modifying htaccess file and adding RewriteCond / RewriteRule there. Example of such restriction for two common WordPress folders is presented below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-login\.php$ [OR]&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-admin/$&lt;br /&gt;
RewriteRule $ /http://your_website [R=404,L]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, these are not the only ways to restrict access. In order to automate this process, certain framework-specific plugins exist. One example for WordPress is StealthLogin (http://wordpress.org/plugins/stealth-login-page)&lt;br /&gt;
&lt;br /&gt;
==== Additional approaches ====&lt;br /&gt;
*Checksum management &lt;br /&gt;
*:Purpose of this approach is to beat checksum-based scanners and don't let them to disclose files by their hashes. Generally, there are two approaches in checksum management:&lt;br /&gt;
*:*Change the location of where those files are placed (i.e. move them to another folder, or rename existing)&lt;br /&gt;
*:*Modify their contents - even slight modification results in a completely different hash sum, so adding a single byte in the end of the file should not be a big problem.&lt;br /&gt;
*Controlled chaos&lt;br /&gt;
*:A funny and effective method which essense is adding bogus files and folders from other frameworks in order to fool scanners and confuse an attacker. But be careful not to overwrite exisiting files and folders and to break the current framework!&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_Framework_(OTG-INFO-008)&amp;diff=170615</id>
		<title>Fingerprint Web Application Framework (OTG-INFO-008)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_Framework_(OTG-INFO-008)&amp;diff=170615"/>
				<updated>2014-03-22T04:25:44Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
== Summary ==&lt;br /&gt;
Web framework[*] fingerprinting is an important subtask of the information gathering process. Knowing the type of framework can automatically give a great advantage if such a framework has already been tested by the penetration tester. It is not only the known vulnerabilities in unpatched versions but specific misconfigurations in the framework and known file structure which makes the fingerprinting process so important.&lt;br /&gt;
&lt;br /&gt;
Several different vendors and versions of web frameworks are widely used. &lt;br /&gt;
Information about it significantly helps in the testing process, and can also help in changing the course of the test. &lt;br /&gt;
Such information can be derived by careful analysis of certain common locations. Most of the web frameworks have several markers in those locations which help an attacker to spot them.&lt;br /&gt;
This is basically what all automatic tools do, they look for a marker from a predefined location&lt;br /&gt;
and then compare it to the database of known signatures. For better accuracy several markers are usually used.&lt;br /&gt;
&lt;br /&gt;
[*] Please note that in this article we make no difference between Web Application Frameworks (WAF) and Content Management Systems (CMS).&lt;br /&gt;
This has been done to make it convenient to fingerprint both of them in one chapter.Further we reference both of the categories as web frameworks.&lt;br /&gt;
&lt;br /&gt;
== Test Objectives ==&lt;br /&gt;
To define type of used web framework so to have a better understanding of the penetration testing methodology.&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
There are several most common locations to look in in order to define the current framework:&lt;br /&gt;
*HTTP headers&lt;br /&gt;
*Cookies&lt;br /&gt;
*HTML source code&lt;br /&gt;
*Specific files and folders&lt;br /&gt;
&lt;br /&gt;
Let's look closer at those approaches.&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
The most basic form of identifying a web framework is to look at the ''X-Powered-By'' field in the HTTP response header.&lt;br /&gt;
Many tools can be used to fingerprint a target. The simplest one is netcat utility. &lt;br /&gt;
Consider the following HTTP Request-Response: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc 127.0.0.1 80&lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.0.14&lt;br /&gt;
Date: Sat, 07 Sep 2013 08:19:15 GMT&lt;br /&gt;
Content-Type: text/html;charset=ISO-8859-1&lt;br /&gt;
Connection: close&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: Mono&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the ''X-Powered-By'' field, we understand that the web application framework is likely to be Mono.&lt;br /&gt;
&lt;br /&gt;
However, although simplicity and quickness of such an approach, this methodology doesn't work in 100% of cases. It is possible to easily disable ''X-Powered-By'' header by a proper configuration. There are also several techniques that allow a web site to obfuscate HTTP headers (see an example in [[#Remediation]] chapter)&lt;br /&gt;
So in the same example we could either miss the ''X-Powered-By'' header or obtain an answer like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.0.14&lt;br /&gt;
Date: Sat, 07 Sep 2013 08:19:15 GMT&lt;br /&gt;
Content-Type: text/html;charset=ISO-8859-1&lt;br /&gt;
Connection: close&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: Blood, sweat and tears&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes there are more HTTP-headers which point at the certain web framework. In the following example according to the information from HTTP-request one can see that ''X-Powered-By'' header contains PHP version. However, ''X-Generator'' header points out the used framework is actually Swiftlet, which helps a penetration tester to expand his attack vectors. When performing fingerprinting, always carefully inspect every HTTP-header for such leaks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.4.1&lt;br /&gt;
Date: Sat, 07 Sep 2013 09:22:52 GMT&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: PHP/5.4.16-1~dotdeb.1&lt;br /&gt;
Expires: Thu, 19 Nov 1981 08:52:00 GMT&lt;br /&gt;
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0&lt;br /&gt;
Pragma: no-cache&lt;br /&gt;
X-Generator: Swiftlet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
Another similar and somehow more reliable way to determine the current web framework are framework-specific cookies.&lt;br /&gt;
Consider the following HTTP-request:&lt;br /&gt;
&lt;br /&gt;
[[Image:Cakephp_cookie.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, cookie ''CAKEPHP'' has automatically been set, which gives us the information about the framework being used. List of common cookies names is presented in chapter [[#Cookies_2]]. Limitations are the same - it is possible to change the name of the cookie. For example, for the selected ''CakePHP'' framework this could be done by the following configuration (excerpt from core.php):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
* The name of CakePHP's session cookie.&lt;br /&gt;
*&lt;br /&gt;
* Note the guidelines for Session names states: &amp;quot;The session name references&lt;br /&gt;
* the session id in cookies and URLs. It should contain only alphanumeric&lt;br /&gt;
* characters.&amp;quot;&lt;br /&gt;
* @link http://php.net/session_name&lt;br /&gt;
*/&lt;br /&gt;
Configure::write('Session.cookie', 'CAKEPHP');&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However from the experience, these changes are less likely to be made than, for example, ''X-Powered-By'' header so this approach can be considered as more reliable one.&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
This technique is based on finding certain patterns in the HTML page source code. Often one can find much information which helps a tester to recognize a specific web framework.&lt;br /&gt;
Ones of the common markers are HTML comments which directly lead to framework disclosure. More often certain framework-specific paths can be found, i.e. links to framework-specific css and/or js folders. Finally, specific script variables might also point to a certain framework.&lt;br /&gt;
From the screenshot below one can easily learn the used framework and its version by the mentioned markers: comment, specific paths and script variables can all help an attacker to quickly determine an instance of ZK framework.&lt;br /&gt;
&lt;br /&gt;
[[Image:Zk_html_source.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More frequently such information is placed between &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;, in &amp;lt;meta&amp;gt; tags or at the end of the page. Nevertheless, it is recommended to check the whole document since it can be useful for other purposes such as inspection of other useful comments and hidden fields.&lt;br /&gt;
Sometimes, however, web developers do not care much about hiding tracks of the used framework. It's still possible to stumble upon something like that at the bottom of the page:&lt;br /&gt;
&lt;br /&gt;
[[Image:banshee_bottom_page.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
Apart from information gathered from HTML sources, there is another approach which greatly helps an attacker to determine the framework with high accuracy.&lt;br /&gt;
Every framework has its own specific file and folder structure on the server. We pointed out that one can see the specific path from the HTML page source but sometimes they are not explicitly presented there and still reside on the server. In order to uncover them a technique known as dirbusting is used. Dirbusting is brute forcing target with predictable folder and file names and monitoring HTTP-responses thus enumerating server contents. This information can be used both for finding default files and attacking them in next stages and for fingerprinting the web framework.&lt;br /&gt;
Dirbusting can be done in several ways, example below shows successful dirbusting attack against a WordPress-powered target with the help of defined list and Intruder functionality of Burp Suite.&lt;br /&gt;
&lt;br /&gt;
[[Image:Wordpress_dirbusting.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that for some WordPress-specific folders (for instance, /wp-includes/, /wp-admin/ and /wp-content/) HTTP-reponses are 403 (Forbidden), 302 (Found, redirection to ''wp-login.php'') and 200 (OK) respectively. This is a good indicator that the target is WordPress-powered. The same way it is possible to dirbust different framework plugin folders and their versions. On the screenshot below one can see a typical CHANGELOG file of a Drupal plugin, which provides information on the framework being used and discloses vulnerable plugin version.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drupal_botcha_disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tip: before starting dirbusting (which is a useful operation anyway), it is recommended to check robots.txt file first. Sometimes framework specific folders and other sensitive information can be found there as well! Example of such robots file is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Robots-info-disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing ===&lt;br /&gt;
Please address yourself to watching Monty Python's Flying Circus, I'm sure you'll like it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common frameworks ==&lt;br /&gt;
=== Cookies ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Framework !! Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| Zope || zope3&lt;br /&gt;
|-&lt;br /&gt;
| CakePHP || cakephp&lt;br /&gt;
|-&lt;br /&gt;
| Kohana || kohanasession&lt;br /&gt;
|-&lt;br /&gt;
| Laravel || laravel_session&lt;br /&gt;
|-&lt;br /&gt;
| 1C-Bitrix || BITRIX_&lt;br /&gt;
|-&lt;br /&gt;
| AMPcms || AMP&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Django CMS || django&lt;br /&gt;
|-&lt;br /&gt;
| DotNetNuke || DotNetNukeAnonymous&lt;br /&gt;
|-&lt;br /&gt;
| e107 || e107_tz&lt;br /&gt;
|-&lt;br /&gt;
| EPiServer || EPiTrace, EPiServer&lt;br /&gt;
|-&lt;br /&gt;
| Graffiti CMS || graffitibot&lt;br /&gt;
|-&lt;br /&gt;
| Hotaru CMS || hotaru_mobile&lt;br /&gt;
|-&lt;br /&gt;
| ImpressCMS || ICMSession&lt;br /&gt;
|-&lt;br /&gt;
| Indico || MAKACSESSION&lt;br /&gt;
|-&lt;br /&gt;
| InstantCMS || InstantCMS[logdate]&lt;br /&gt;
|-&lt;br /&gt;
| Kentico CMS || CMSPreferredCulture&lt;br /&gt;
|-&lt;br /&gt;
| MODx || SN4[12symb]&lt;br /&gt;
|-&lt;br /&gt;
| TYPO3 || fe_typo_user&lt;br /&gt;
|-&lt;br /&gt;
| Dynamicweb || Dynamicweb&lt;br /&gt;
|-&lt;br /&gt;
| LEPTON || lep[some_numeric_value]+sessionid&lt;br /&gt;
|-&lt;br /&gt;
| Wix || Domain=.wix.com&lt;br /&gt;
|-&lt;br /&gt;
| VIVVO || VivvoSessionId&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTML source code ===&lt;br /&gt;
==== General markers ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| %framework_name%&lt;br /&gt;
|-&lt;br /&gt;
| powered by&lt;br /&gt;
|-&lt;br /&gt;
| built upon&lt;br /&gt;
|-&lt;br /&gt;
| running&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Specific markers ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Framework !! Keyword&lt;br /&gt;
|-&lt;br /&gt;
| Adobe ColdFusion || &amp;amp;lt;!-- START headerTags.cfm&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft ASP.NET || __VIEWSTATE&lt;br /&gt;
|-&lt;br /&gt;
| ZK || &amp;amp;lt;!-- ZK&lt;br /&gt;
|-&lt;br /&gt;
| Business Catalyst || &amp;amp;lt;!-- BC_OBNW --&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Indexhibit || ndxz-studio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Specific files and folders ===&lt;br /&gt;
These are different for each specific framework. It is recommended to install the corresponding framework during penetration tests in order to have better understanding of what infrastructure is presented and which files might be left on the server. However, several good pre-made lists already exist, one good example of them - FuzzDB wordlists of predictable files/folders (http://code.google.com/p/fuzzdb/)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
A list of general and well-known tools is presented below. There are also a lot of other utilities, as well as framework-based fingerprinting tools.&lt;br /&gt;
 &lt;br /&gt;
=== WhatWeb ===&lt;br /&gt;
Website:  http://www.morningstarsecurity.com/research/whatweb &amp;lt;br&amp;gt;&lt;br /&gt;
Currently one of the best fingerprinting tools on the market. Included in a default [[Kali Linux]] build.&lt;br /&gt;
Language: Ruby&lt;br /&gt;
Matches for fingerprinting are made with:&lt;br /&gt;
* Text strings (case sensitive)&lt;br /&gt;
* Regular expressions&lt;br /&gt;
* Google Hack Database queries (limited set of keywords)&lt;br /&gt;
* MD5 hashes&lt;br /&gt;
* URL recognition&lt;br /&gt;
* HTML tag patterns&lt;br /&gt;
* Custom ruby code for passive and aggressive operations&lt;br /&gt;
&lt;br /&gt;
Sample output is presented on a screenshot below:&lt;br /&gt;
&lt;br /&gt;
[[Image:whatweb-sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BlindElephant === &lt;br /&gt;
Website: https://community.qualys.com/community/blindelephant &amp;lt;br&amp;gt;&lt;br /&gt;
This great tool works on the principle of static file checksum based version difference thus providing a very high quality of fingerprinting.&lt;br /&gt;
Language: Python&lt;br /&gt;
&lt;br /&gt;
Sample output of a successful fingerprint:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pentester$ python BlindElephant.py http://my_target drupal&lt;br /&gt;
Loaded /Library/Python/2.7/site-packages/blindelephant/dbs/drupal.pkl with 145 versions, 478 differentiating paths, and 434 version groups.&lt;br /&gt;
Starting BlindElephant fingerprint for version of drupal at http://my_target &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/CHANGELOG.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 527b085a3717bd691d47713dff74acf4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/INSTALL.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 14dfc133e4101be6f0ef5c64566da4a4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/misc/drupal.js&lt;br /&gt;
Possible versions based on result: 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/MAINTAINERS.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 36b740941a19912f3fdbfcca7caa08ca &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/themes/garland/style.css&lt;br /&gt;
Possible versions based on result: 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 7.10, 7.11, 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Fingerprinting resulted in:&lt;br /&gt;
7.14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Best Guess: 7.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wappalyzer ===&lt;br /&gt;
Website: http://wappalyzer.com &amp;lt;br&amp;gt;&lt;br /&gt;
Wapplyzer is a Firefox/Chrome plug-in. It works on only regular expression matching and doesn't need anything other than the page to be loaded on browser. It works completely at the browser level and give results in form of icons. Although sometimes it has false positives, this is very handy to have notion of what technologies were used to construct a target website immediately after browsing a page.&lt;br /&gt;
Sample output of a plug-in is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Owasp-wappalyzer.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Vulnerability References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Saumil Shah: &amp;quot;An Introduction to HTTP fingerprinting&amp;quot; - http://www.net-square.com/httprint_paper.html&lt;br /&gt;
* Anant Shrivastava : &amp;quot;Web Application Finger Printing&amp;quot; - http://anantshri.info/articles/web_app_finger_printing.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
General advice: use several tools described above and check scan logs in order to better understand what exactly helps an attacker to disclose your web framework. By performing multiple scans after changes you've done to hide framework tracks, it's possible to achieve better security level and to make sure of undetectability by automatic scans.&lt;br /&gt;
Below you may find specific recommendations by framework marker location and some additional interesting approaches.&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
Check your configuration and disable/obfuscate all HTTP-headers which disclose information about used technologies.&lt;br /&gt;
An interesting article about HTTP-headers obfuscation using Netscaler:&lt;br /&gt;
http://grahamhosking.blogspot.ru/2013/07/obfuscating-http-header-using-netscaler.html&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
It is recommended to change cookie names by making proper changes in corresponding config files.&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
Check manually the contents of your HTML code and remove everything what explicitly points to the framework.&lt;br /&gt;
General guidelines:&lt;br /&gt;
*Make sure you didn't leave any visual markers disclosing used framework&lt;br /&gt;
*Remove any unnecessary comments (copyrights, bug information, specific framework comments)&lt;br /&gt;
*Remove META and generator tags&lt;br /&gt;
*Use your own css/js and do not store those in a framework-specific folders&lt;br /&gt;
*Make sure you're not using default scripts on the page; if using them is needed, obfuscate them.&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
*Remove any unnecessary/unused files on the server. This implies text files disclosing information about versions and installation too.&lt;br /&gt;
*Restrict access to other files in order to achieve 404-response when accessing them from outside. This can be done, for example, by modifying htaccess file and adding RewriteCond / RewriteRule there. Example of such restriction for two common WordPress folders is presented below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-login\.php$ [OR]&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-admin/$&lt;br /&gt;
RewriteRule $ /http://your_website [R=404,L]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, these are not the only ways to restrict access. In order to automate this process, certain framework-specific plugins exist. One example for WordPress is StealthLogin (http://wordpress.org/plugins/stealth-login-page)&lt;br /&gt;
&lt;br /&gt;
==== Additional approaches ====&lt;br /&gt;
*Checksum management &lt;br /&gt;
*:Purpose of this approach is to beat checksum-based scanners and don't let them to disclose files by their hashes. Generally, there are two approaches in checksum management:&lt;br /&gt;
*:*Change the location of where those files are placed (i.e. move them to another folder, or rename existing)&lt;br /&gt;
*:*Modify their contents - even slight modification results in a completely different hash sum, so adding a single byte in the end of the file should not be a big problem.&lt;br /&gt;
*Controlled chaos&lt;br /&gt;
*:A funny and effective method which essense is adding bogus files and folders from other frameworks in order to fool scanners and confuse an attacker. But be careful not to overwrite exisiting files and folders and to break the current framework!&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_Framework_(OTG-INFO-008)&amp;diff=170359</id>
		<title>Fingerprint Web Application Framework (OTG-INFO-008)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_Framework_(OTG-INFO-008)&amp;diff=170359"/>
				<updated>2014-03-18T22:03:43Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
== Summary ==&lt;br /&gt;
Web framework[*] fingerprinting is an important subtask of the information gathering process. Knowing the type of framework can automatically give a great advantage if such a framework has already been tested by the penetration tester. It is not only the known vulnerabilities in unpatched versions but specific misconfigurations in the framework and known file structure which makes the fingerprinting process so important.&lt;br /&gt;
&lt;br /&gt;
Several different vendors and versions of web frameworks are widely used. &lt;br /&gt;
Information about it significantly helps in the testing process, and can also help in changing the course of the test. &lt;br /&gt;
Such information can be derived by careful analysis of certain common locations. Most of the web frameworks have several markers in those locations which help an attacker to spot them.&lt;br /&gt;
This is basically what all automatic tools do, they look for a marker from a predefined location&lt;br /&gt;
and then compare it to the database of known signatures. For better accuracy several markers are usually used.&lt;br /&gt;
&lt;br /&gt;
[*] Please note that in this article we make no difference between Web Application Frameworks (WAF) and Content Management Systems (CMS).&lt;br /&gt;
This has been done to make it convenient to fingerprint both of them in one chapter.Further we reference both of the categories as web frameworks.&lt;br /&gt;
&lt;br /&gt;
== Test Objectives ==&lt;br /&gt;
To define type of used web framework so to have a better understanding of the penetration testing methodology.&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
There are several most common locations to look in in order to define the current framework:&lt;br /&gt;
*HTTP headers&lt;br /&gt;
*Cookies&lt;br /&gt;
*HTML source code&lt;br /&gt;
*Specific files and folders&lt;br /&gt;
&lt;br /&gt;
Let's look closer at those approaches.&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
The most basic form of identifying a web framework is to look at the ''X-Powered-By'' field in the HTTP response header.&lt;br /&gt;
Many tools can be used to fingerprint a target. The simplest one is netcat utility. &lt;br /&gt;
Consider the following HTTP Request-Response: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc 127.0.0.1 80&lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.0.14&lt;br /&gt;
Date: Sat, 07 Sep 2013 08:19:15 GMT&lt;br /&gt;
Content-Type: text/html;charset=ISO-8859-1&lt;br /&gt;
Connection: close&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: Mono&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the ''X-Powered-By'' field, we understand that the web application framework is likely to be Mono.&lt;br /&gt;
&lt;br /&gt;
However, although simplicity and quickness of such an approach, this methodology doesn't work in 100% of cases. It is possible to easily disable ''X-Powered-By'' header by a proper configuration. There are also several techniques that allow a web site to obfuscate HTTP headers (see an example in [[#Remediation]] chapter)&lt;br /&gt;
So in the same example we could either miss the ''X-Powered-By'' header or obtain an answer like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.0.14&lt;br /&gt;
Date: Sat, 07 Sep 2013 08:19:15 GMT&lt;br /&gt;
Content-Type: text/html;charset=ISO-8859-1&lt;br /&gt;
Connection: close&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: Blood, sweat and tears&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes there are more HTTP-headers which point at the certain web framework. In the following example according to the information from HTTP-request one can see that ''X-Powered-By'' header contains PHP version. However, ''X-Generator'' header points out the used framework is actually Swiftlet, which helps a penetration tester to expand his attack vectors. When performing fingerprinting, always carefully inspect every HTTP-header for such leaks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.4.1&lt;br /&gt;
Date: Sat, 07 Sep 2013 09:22:52 GMT&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: PHP/5.4.16-1~dotdeb.1&lt;br /&gt;
Expires: Thu, 19 Nov 1981 08:52:00 GMT&lt;br /&gt;
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0&lt;br /&gt;
Pragma: no-cache&lt;br /&gt;
X-Generator: Swiftlet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
Another similar and somehow more reliable way to determine the current web framework are framework-specific cookies.&lt;br /&gt;
Consider the following HTTP-request:&lt;br /&gt;
&lt;br /&gt;
[[Image:Cakephp_cookie.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, cookie ''CAKEPHP'' has automatically been set, which gives us the information about the framework being used. List of common cookies names is presented in chapter [[#Cookies_2]]. Limitations are the same - it is possible to change the name of the cookie. For example, for the selected ''CakePHP'' framework this could be done by the following configuration (excerpt from core.php):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
* The name of CakePHP's session cookie.&lt;br /&gt;
*&lt;br /&gt;
* Note the guidelines for Session names states: &amp;quot;The session name references&lt;br /&gt;
* the session id in cookies and URLs. It should contain only alphanumeric&lt;br /&gt;
* characters.&amp;quot;&lt;br /&gt;
* @link http://php.net/session_name&lt;br /&gt;
*/&lt;br /&gt;
Configure::write('Session.cookie', 'CAKEPHP');&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However from the experience, these changes are less likely to be made than, for example, ''X-Powered-By'' header so this approach can be considered as more reliable one.&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
This technique is based on finding certain patterns in the HTML page source code. Often one can find much information which helps a tester to recognize a specific web framework.&lt;br /&gt;
Ones of the common markers are HTML comments which directly lead to framework disclosure. More often certain framework-specific paths can be found, i.e. links to framework-specific css and/or js folders. Finally, specific script variables might also point to a certain framework.&lt;br /&gt;
From the screenshot below one can easily learn the used framework and its version by the mentioned markers: comment, specific paths and script variables can all help an attacker to quickly determine an instance of ZK framework.&lt;br /&gt;
&lt;br /&gt;
[[Image:Zk_html_source.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More frequently such information is placed between &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;, in &amp;lt;meta&amp;gt; tags or at the end of the page. Nevertheless, it is recommended to check the whole document since it can be useful for other purposes such as inspection of other useful comments and hidden fields.&lt;br /&gt;
Sometimes, however, web developers do not care much about hiding tracks of the used framework. It's still possible to stumble upon something like that at the bottom of the page:&lt;br /&gt;
&lt;br /&gt;
[[Image:banshee_bottom_page.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
Apart from information gathered from HTML sources, there is another approach which greatly helps an attacker to determine the framework with high accuracy.&lt;br /&gt;
Every framework has its own specific file and folder structure on the server. We pointed out that one can see the specific path from the HTML page source but sometimes they are not explicitly presented there and still reside on the server. In order to uncover them such technique as dirbusting is used. Dirbusting essense is fuzzing target with predictable folder- and filenames and monitoring HTTP-responses thus enumerating server contents. This information can be used both for finding default files and attacking them in next stages and for fingerprinting the web framework.&lt;br /&gt;
Dirbusting can be done in several ways, example below shows successful dirbusting attack against a WordPress-powered target with the help of defined list and Intruder functionality of Burp Suite.&lt;br /&gt;
&lt;br /&gt;
[[Image:Wordpress_dirbusting.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that for some WordPress-specific folders (for instance, /wp-includes/, /wp-admin/ and /wp-content/) HTTP-reponses are 403 (Forbidden), 302 (Found, redirection to ''wp-login.php'') and 200 (OK) respectively. This is a good indicator that the target is WordPress-powered. The same way it is possible to dirbust different framework plugin folders and their versions. On a screenshot below one can see a typical CHANGELOG file of a Drupal plugin, which both points out on the used framework and discloses vulnerable plugin version.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drupal_botcha_disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tip: before starting dirbusting (which is a useful operation anyway), it is recommended to check robots.txt file first. Sometimes framework specific folders and other sensitive information can be found there as well! Example of such robots file is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Robots-info-disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing ===&lt;br /&gt;
Please address yourself to watching Monty Python's Flying Circus, I'm sure you'll like it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common frameworks ==&lt;br /&gt;
=== Cookies ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Framework !! Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| Zope || zope3&lt;br /&gt;
|-&lt;br /&gt;
| CakePHP || cakephp&lt;br /&gt;
|-&lt;br /&gt;
| Kohana || kohanasession&lt;br /&gt;
|-&lt;br /&gt;
| Laravel || laravel_session&lt;br /&gt;
|-&lt;br /&gt;
| 1C-Bitrix || BITRIX_&lt;br /&gt;
|-&lt;br /&gt;
| AMPcms || AMP&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Django CMS || django&lt;br /&gt;
|-&lt;br /&gt;
| DotNetNuke || DotNetNukeAnonymous&lt;br /&gt;
|-&lt;br /&gt;
| e107 || e107_tz&lt;br /&gt;
|-&lt;br /&gt;
| EPiServer || EPiTrace, EPiServer&lt;br /&gt;
|-&lt;br /&gt;
| Graffiti CMS || graffitibot&lt;br /&gt;
|-&lt;br /&gt;
| Hotaru CMS || hotaru_mobile&lt;br /&gt;
|-&lt;br /&gt;
| ImpressCMS || ICMSession&lt;br /&gt;
|-&lt;br /&gt;
| Indico || MAKACSESSION&lt;br /&gt;
|-&lt;br /&gt;
| InstantCMS || InstantCMS[logdate]&lt;br /&gt;
|-&lt;br /&gt;
| Kentico CMS || CMSPreferredCulture&lt;br /&gt;
|-&lt;br /&gt;
| MODx || SN4[12symb]&lt;br /&gt;
|-&lt;br /&gt;
| TYPO3 || fe_typo_user&lt;br /&gt;
|-&lt;br /&gt;
| Dynamicweb || Dynamicweb&lt;br /&gt;
|-&lt;br /&gt;
| LEPTON || lep[some_numeric_value]+sessionid&lt;br /&gt;
|-&lt;br /&gt;
| Wix || Domain=.wix.com&lt;br /&gt;
|-&lt;br /&gt;
| VIVVO || VivvoSessionId&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTML source code ===&lt;br /&gt;
==== General markers ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| %framework_name%&lt;br /&gt;
|-&lt;br /&gt;
| powered by&lt;br /&gt;
|-&lt;br /&gt;
| built upon&lt;br /&gt;
|-&lt;br /&gt;
| running&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Specific markers ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Framework !! Keyword&lt;br /&gt;
|-&lt;br /&gt;
| Adobe ColdFusion || &amp;amp;lt;!-- START headerTags.cfm&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft ASP.NET || __VIEWSTATE&lt;br /&gt;
|-&lt;br /&gt;
| ZK || &amp;amp;lt;!-- ZK&lt;br /&gt;
|-&lt;br /&gt;
| Business Catalyst || &amp;amp;lt;!-- BC_OBNW --&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Indexhibit || ndxz-studio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Specific files and folders ===&lt;br /&gt;
Different for each specific framework. It is recommended to install the corresponding framework during penetration tests in order to have better understanding of what infrastructure is presented and which files might be left on the server. However, several good pre-made lists already exist, one good example of them - FuzzDB wordlists of predictable files/folders (http://code.google.com/p/fuzzdb/)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
A list of general and well-known tools is presented below. There are also a lot of other utilities, as well as framework-based fingerprinting tools.&lt;br /&gt;
 &lt;br /&gt;
=== WhatWeb ===&lt;br /&gt;
Website:  http://www.morningstarsecurity.com/research/whatweb &amp;lt;br&amp;gt;&lt;br /&gt;
Currently one of the best fingerprinting tools on the market. Included in a default [[Kali Linux]] build.&lt;br /&gt;
Language: Ruby&lt;br /&gt;
Matches for fingerprinting are made with:&lt;br /&gt;
* Text strings (case sensitive)&lt;br /&gt;
* Regular expressions&lt;br /&gt;
* Google Hack Database queries (limited set of keywords)&lt;br /&gt;
* MD5 hashes&lt;br /&gt;
* URL recognition&lt;br /&gt;
* HTML tag patterns&lt;br /&gt;
* Custom ruby code for passive and aggressive operations&lt;br /&gt;
&lt;br /&gt;
Sample output is presented on a screenshot below:&lt;br /&gt;
&lt;br /&gt;
[[Image:whatweb-sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BlindElephant === &lt;br /&gt;
Website: https://community.qualys.com/community/blindelephant &amp;lt;br&amp;gt;&lt;br /&gt;
This great tool works on the principle of static file checksum based version difference thus providing a very high quality of fingerprinting.&lt;br /&gt;
Language: Python&lt;br /&gt;
&lt;br /&gt;
Sample output of a successful fingerprint:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pentester$ python BlindElephant.py http://my_target drupal&lt;br /&gt;
Loaded /Library/Python/2.7/site-packages/blindelephant/dbs/drupal.pkl with 145 versions, 478 differentiating paths, and 434 version groups.&lt;br /&gt;
Starting BlindElephant fingerprint for version of drupal at http://my_target &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/CHANGELOG.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 527b085a3717bd691d47713dff74acf4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/INSTALL.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 14dfc133e4101be6f0ef5c64566da4a4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/misc/drupal.js&lt;br /&gt;
Possible versions based on result: 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/MAINTAINERS.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 36b740941a19912f3fdbfcca7caa08ca &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/themes/garland/style.css&lt;br /&gt;
Possible versions based on result: 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 7.10, 7.11, 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Fingerprinting resulted in:&lt;br /&gt;
7.14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Best Guess: 7.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wappalyzer ===&lt;br /&gt;
Website: http://wappalyzer.com &amp;lt;br&amp;gt;&lt;br /&gt;
Wapplyzer is a Firefox/Chrome plug-in. It works on only regular expression matching and doesn't need anything other than the page to be loaded on browser. It works completely at the browser level and give results in form of icons. Although sometimes it has false positives, this is very handy to have notion of what technologies were used to construct a target website immediately after browsing a page.&lt;br /&gt;
Sample output of a plug-in is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Owasp-wappalyzer.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Vulnerability References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Saumil Shah: &amp;quot;An Introduction to HTTP fingerprinting&amp;quot; - http://www.net-square.com/httprint_paper.html&lt;br /&gt;
* Anant Shrivastava : &amp;quot;Web Application Finger Printing&amp;quot; - http://anantshri.info/articles/web_app_finger_printing.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
General advice: use several tools described above and check scan logs in order to better understand what exactly helps an attacker to disclose your web framework. By performing multiple scans after changes you've done to hide framework tracks, it's possible to achieve better security level and to make sure of undetectability by automatic scans.&lt;br /&gt;
Below you may find specific recommendations by framework marker location and some additional interesting approaches.&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
Check your configuration and disable/obfuscate all HTTP-headers which disclose information about used technologies.&lt;br /&gt;
An interesting article about HTTP-headers obfuscation using Netscaler:&lt;br /&gt;
http://grahamhosking.blogspot.ru/2013/07/obfuscating-http-header-using-netscaler.html&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
It is recommended to change cookie names by making proper changes in corresponding config files.&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
Check manually the contents of your HTML code and remove everything what explicitly points to the framework.&lt;br /&gt;
General guidelines:&lt;br /&gt;
*Make sure you didn't leave any visual markers disclosing used framework&lt;br /&gt;
*Remove any unnecessary comments (copyrights, bug information, specific framework comments)&lt;br /&gt;
*Remove META and generator tags&lt;br /&gt;
*Use your own css/js and do not store those in a framework-specific folders&lt;br /&gt;
*Make sure you're not using default scripts on the page; if using them is needed, obfuscate them.&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
*Remove any unnecessary/unused files on the server. This implies text files disclosing information about versions and installation too.&lt;br /&gt;
*Restrict access to other files in order to achieve 404-response when accessing them from outside. This can be done, for example, by modifying htaccess file and adding RewriteCond / RewriteRule there. Example of such restriction for two common WordPress folders is presented below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-login\.php$ [OR]&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-admin/$&lt;br /&gt;
RewriteRule $ /http://your_website [R=404,L]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, these are not the only ways to restrict access. In order to automate this process, certain framework-specific plugins exist. One example for WordPress is StealthLogin (http://wordpress.org/plugins/stealth-login-page)&lt;br /&gt;
&lt;br /&gt;
==== Additional approaches ====&lt;br /&gt;
*Checksum management &lt;br /&gt;
*:Purpose of this approach is to beat checksum-based scanners and don't let them to disclose files by their hashes. Generally, there are two approaches in checksum management:&lt;br /&gt;
*:*Change the location of where those files are placed (i.e. move them to another folder, or rename existing)&lt;br /&gt;
*:*Modify their contents - even slight modification results in a completely different hash sum, so adding a single byte in the end of the file should not be a big problem.&lt;br /&gt;
*Controlled chaos&lt;br /&gt;
*:A funny and effective method which essense is adding bogus files and folders from other frameworks in order to fool scanners and confuse an attacker. But be careful not to overwrite exisiting files and folders and to break the current framework!&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_Framework_(OTG-INFO-008)&amp;diff=170358</id>
		<title>Fingerprint Web Application Framework (OTG-INFO-008)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_Framework_(OTG-INFO-008)&amp;diff=170358"/>
				<updated>2014-03-18T21:45:21Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
== Summary ==&lt;br /&gt;
Web framework[*] fingerprinting is an important subtask of the information gathering process. Knowing the type of framework can automatically give a great advantage if such a framework has already been tested by the penetration tester. It is not only the known vulnerabilities in unpatched versions but specific misconfigurations in the framework and known file structure which makes the fingerprinting process so important.&lt;br /&gt;
&lt;br /&gt;
Several different vendors and versions of web frameworks are widely used. &lt;br /&gt;
Information about it significantly helps in the testing process, and can also help in changing the course of the test. &lt;br /&gt;
Such information can be derived by careful analysis of certain common locations. Most of the web frameworks have several markers in those locations which help an attacker to spot them.&lt;br /&gt;
This is basically what all automatic tools do, they look for a marker from a predefined location&lt;br /&gt;
and then compare it to the database of known signatures. For better accuracy several markers are usually used.&lt;br /&gt;
&lt;br /&gt;
[*] Please note that in this article we make no difference between Web Application Frameworks (WAF) and Content Management Systems (CMS).&lt;br /&gt;
This has been done to make it convenient to fingerprint both of them in one chapter.Further we reference both of the categories as web frameworks.&lt;br /&gt;
&lt;br /&gt;
== Test Objectives ==&lt;br /&gt;
To define type of used web framework so to have a better understanding of the penetration testing methodology.&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
There are several most common locations to look in in order to define the current framework:&lt;br /&gt;
*HTTP headers&lt;br /&gt;
*Cookies&lt;br /&gt;
*HTML source code&lt;br /&gt;
*Specific files and folders&lt;br /&gt;
&lt;br /&gt;
Let's look closer at those approaches.&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
The most basic form of identifying a web framework is to look at the ''X-Powered-By'' field in the HTTP response header.&lt;br /&gt;
Many tools can be used to fingerprint a target. The simplest one is netcat utility. &lt;br /&gt;
Consider the following HTTP Request-Response: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc 127.0.0.1 80&lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.0.14&lt;br /&gt;
Date: Sat, 07 Sep 2013 08:19:15 GMT&lt;br /&gt;
Content-Type: text/html;charset=ISO-8859-1&lt;br /&gt;
Connection: close&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: Mono&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the ''X-Powered-By'' field, we understand that the web application framework is likely to be Mono.&lt;br /&gt;
&lt;br /&gt;
However, although simplicity and quickness of such an approach, this methodology doesn't work in 100% of cases. It is possible to easily disable ''X-Powered-By'' header by a proper configuration. There are also several techniques that allow a web site to obfuscate HTTP headers (see an example in [[#Remediation]] chapter)&lt;br /&gt;
So in the same example we could either miss the ''X-Powered-By'' header or obtain an answer like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.0.14&lt;br /&gt;
Date: Sat, 07 Sep 2013 08:19:15 GMT&lt;br /&gt;
Content-Type: text/html;charset=ISO-8859-1&lt;br /&gt;
Connection: close&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: Blood, sweat and tears&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes there are more HTTP-headers which point at the certain web framework. In the following example according to the information from HTTP-request one can see that ''X-Powered-By'' header contains PHP version. However, ''X-Generator'' header points out the used framework is actually Swiftlet, which helps a penetration tester to expand his attack vectors. When performing fingerprinting, always carefully inspect every HTTP-header for such leaks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.4.1&lt;br /&gt;
Date: Sat, 07 Sep 2013 09:22:52 GMT&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: PHP/5.4.16-1~dotdeb.1&lt;br /&gt;
Expires: Thu, 19 Nov 1981 08:52:00 GMT&lt;br /&gt;
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0&lt;br /&gt;
Pragma: no-cache&lt;br /&gt;
X-Generator: Swiftlet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
Another similar and somehow more reliable way to determine the current web framework are framework-specific cookies.&lt;br /&gt;
Consider the following HTTP-request:&lt;br /&gt;
&lt;br /&gt;
[[Image:Cakephp_cookie.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, cookie ''CAKEPHP'' has automatically been set, which gives us the information about the framework being used. List of common cookies names is presented in chapter [[#Cookies_2]]. Limitations are the same - it is possible to change the name of the cookie. For example, for the selected ''CakePHP'' framework this could be done by the following configuration (excerpt from core.php):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
* The name of CakePHP's session cookie.&lt;br /&gt;
*&lt;br /&gt;
* Note the guidelines for Session names states: &amp;quot;The session name references&lt;br /&gt;
* the session id in cookies and URLs. It should contain only alphanumeric&lt;br /&gt;
* characters.&amp;quot;&lt;br /&gt;
* @link http://php.net/session_name&lt;br /&gt;
*/&lt;br /&gt;
Configure::write('Session.cookie', 'CAKEPHP');&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However from the experience, these changes are less likely to be made than, for example, ''X-Powered-By'' header so this approach can be considered as more reliable one.&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
This technique is based on finding certain patterns in the HTML page source code. Often one can find much information which helps a tester to recognize a specific web framework.&lt;br /&gt;
Ones of the common markers are HTML comments which directly lead to framework disclosure. More often certain framework-specific paths can be found, i.e. links to framework-specific css and/or js folders. Finally, specific script variables might also point to a certain framework.&lt;br /&gt;
From the screenshot below one can easily learn the used framework and its version by the mentioned markers: comment, specific paths and script variables can all help an attacker to quickly determine an instance of ZK framework.&lt;br /&gt;
&lt;br /&gt;
[[Image:Zk_html_source.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More frequently such information is placed between &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;, in &amp;lt;meta&amp;gt; tags or at the end of the page. Nevertheless, it is recommended to check the whole document since it can be useful for other purposes such as inspection of other useful comments and hidden fields.&lt;br /&gt;
Sometimes, however, web developers do not care much about hiding tracks of the used framework. It's still possible to stumble upon something like that at the bottom of the page:&lt;br /&gt;
&lt;br /&gt;
[[Image:banshee_bottom_page.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
Apart from information, gathered from HTML sources, there is another approach which greatly helps an attacker to determine the framework with high accuracy.&lt;br /&gt;
Every framework has its own specific file and folder structure on the server. We pointed out that one can see the specific path from the HTML page source but sometimes they are not explicitly presented there and still reside on the server. In order to uncover them such technique as dirbusting is used. Dirbusting essense is fuzzing target with predictable folder- and filenames and monitoring HTTP-responses thus enumerating server contents. This information can be used both for finding default files and attacking them in next stages and for fingerprinting the web framework.&lt;br /&gt;
Dirbusting can be done in several ways, example below shows successful dirbusting attack against a WordPress-powered target with the help of defined list and Intruder functionality of Burp Suite.&lt;br /&gt;
&lt;br /&gt;
[[Image:Wordpress_dirbusting.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that for some WordPress-specific folders (for instance, /wp-includes/, /wp-admin/ and /wp-content/) HTTP-reponses are 403 (Forbidden), 302 (Found, redirection to ''wp-login.php'') and 200 (OK) respectively. This is a good indicator that the target is WordPress-powered. The same way it is possible to dirbust different framework plugin folders and their versions. On a screenshot below one can see a typical CHANGELOG file of a Drupal plugin, which both points out on the used framework and discloses vulnerable plugin version.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drupal_botcha_disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tip: before starting dirbusting (which is a useful operation anyway), it is recommended to check robots.txt file first. Sometimes framework specific folders and other sensitive information can be found there as well! Example of such robots file is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Robots-info-disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing ===&lt;br /&gt;
Please address yourself to watching Monty Python's Flying Circus, I'm sure you'll like it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common frameworks ==&lt;br /&gt;
=== Cookies ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Framework !! Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| Zope || zope3&lt;br /&gt;
|-&lt;br /&gt;
| CakePHP || cakephp&lt;br /&gt;
|-&lt;br /&gt;
| Kohana || kohanasession&lt;br /&gt;
|-&lt;br /&gt;
| Laravel || laravel_session&lt;br /&gt;
|-&lt;br /&gt;
| 1C-Bitrix || BITRIX_&lt;br /&gt;
|-&lt;br /&gt;
| AMPcms || AMP&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Django CMS || django&lt;br /&gt;
|-&lt;br /&gt;
| DotNetNuke || DotNetNukeAnonymous&lt;br /&gt;
|-&lt;br /&gt;
| e107 || e107_tz&lt;br /&gt;
|-&lt;br /&gt;
| EPiServer || EPiTrace, EPiServer&lt;br /&gt;
|-&lt;br /&gt;
| Graffiti CMS || graffitibot&lt;br /&gt;
|-&lt;br /&gt;
| Hotaru CMS || hotaru_mobile&lt;br /&gt;
|-&lt;br /&gt;
| ImpressCMS || ICMSession&lt;br /&gt;
|-&lt;br /&gt;
| Indico || MAKACSESSION&lt;br /&gt;
|-&lt;br /&gt;
| InstantCMS || InstantCMS[logdate]&lt;br /&gt;
|-&lt;br /&gt;
| Kentico CMS || CMSPreferredCulture&lt;br /&gt;
|-&lt;br /&gt;
| MODx || SN4[12symb]&lt;br /&gt;
|-&lt;br /&gt;
| TYPO3 || fe_typo_user&lt;br /&gt;
|-&lt;br /&gt;
| Dynamicweb || Dynamicweb&lt;br /&gt;
|-&lt;br /&gt;
| LEPTON || lep[some_numeric_value]+sessionid&lt;br /&gt;
|-&lt;br /&gt;
| Wix || Domain=.wix.com&lt;br /&gt;
|-&lt;br /&gt;
| VIVVO || VivvoSessionId&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTML source code ===&lt;br /&gt;
==== General markers ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| %framework_name%&lt;br /&gt;
|-&lt;br /&gt;
| powered by&lt;br /&gt;
|-&lt;br /&gt;
| built upon&lt;br /&gt;
|-&lt;br /&gt;
| running&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Specific markers ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Framework !! Keyword&lt;br /&gt;
|-&lt;br /&gt;
| Adobe ColdFusion || &amp;amp;lt;!-- START headerTags.cfm&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft ASP.NET || __VIEWSTATE&lt;br /&gt;
|-&lt;br /&gt;
| ZK || &amp;amp;lt;!-- ZK&lt;br /&gt;
|-&lt;br /&gt;
| Business Catalyst || &amp;amp;lt;!-- BC_OBNW --&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Indexhibit || ndxz-studio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Specific files and folders ===&lt;br /&gt;
Different for each specific framework. It is recommended to install the corresponding framework during penetration tests in order to have better understanding of what infrastructure is presented and which files might be left on the server. However, several good pre-made lists already exist, one good example of them - FuzzDB wordlists of predictable files/folders (http://code.google.com/p/fuzzdb/)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
A list of general and well-known tools is presented below. There are also a lot of other utilities, as well as framework-based fingerprinting tools.&lt;br /&gt;
 &lt;br /&gt;
=== WhatWeb ===&lt;br /&gt;
Website:  http://www.morningstarsecurity.com/research/whatweb &amp;lt;br&amp;gt;&lt;br /&gt;
Currently one of the best fingerprinting tools on the market. Included in a default [[Kali Linux]] build.&lt;br /&gt;
Language: Ruby&lt;br /&gt;
Matches for fingerprinting are made with:&lt;br /&gt;
* Text strings (case sensitive)&lt;br /&gt;
* Regular expressions&lt;br /&gt;
* Google Hack Database queries (limited set of keywords)&lt;br /&gt;
* MD5 hashes&lt;br /&gt;
* URL recognition&lt;br /&gt;
* HTML tag patterns&lt;br /&gt;
* Custom ruby code for passive and aggressive operations&lt;br /&gt;
&lt;br /&gt;
Sample output is presented on a screenshot below:&lt;br /&gt;
&lt;br /&gt;
[[Image:whatweb-sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BlindElephant === &lt;br /&gt;
Website: https://community.qualys.com/community/blindelephant &amp;lt;br&amp;gt;&lt;br /&gt;
This great tool works on the principle of static file checksum based version difference thus providing a very high quality of fingerprinting.&lt;br /&gt;
Language: Python&lt;br /&gt;
&lt;br /&gt;
Sample output of a successful fingerprint:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pentester$ python BlindElephant.py http://my_target drupal&lt;br /&gt;
Loaded /Library/Python/2.7/site-packages/blindelephant/dbs/drupal.pkl with 145 versions, 478 differentiating paths, and 434 version groups.&lt;br /&gt;
Starting BlindElephant fingerprint for version of drupal at http://my_target &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/CHANGELOG.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 527b085a3717bd691d47713dff74acf4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/INSTALL.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 14dfc133e4101be6f0ef5c64566da4a4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/misc/drupal.js&lt;br /&gt;
Possible versions based on result: 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/MAINTAINERS.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 36b740941a19912f3fdbfcca7caa08ca &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/themes/garland/style.css&lt;br /&gt;
Possible versions based on result: 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 7.10, 7.11, 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Fingerprinting resulted in:&lt;br /&gt;
7.14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Best Guess: 7.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wappalyzer ===&lt;br /&gt;
Website: http://wappalyzer.com &amp;lt;br&amp;gt;&lt;br /&gt;
Wapplyzer is a Firefox/Chrome plug-in. It works on only regular expression matching and doesn't need anything other than the page to be loaded on browser. It works completely at the browser level and give results in form of icons. Although sometimes it has false positives, this is very handy to have notion of what technologies were used to construct a target website immediately after browsing a page.&lt;br /&gt;
Sample output of a plug-in is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Owasp-wappalyzer.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Vulnerability References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Saumil Shah: &amp;quot;An Introduction to HTTP fingerprinting&amp;quot; - http://www.net-square.com/httprint_paper.html&lt;br /&gt;
* Anant Shrivastava : &amp;quot;Web Application Finger Printing&amp;quot; - http://anantshri.info/articles/web_app_finger_printing.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
General advice: use several tools described above and check scan logs in order to better understand what exactly helps an attacker to disclose your web framework. By performing multiple scans after changes you've done to hide framework tracks, it's possible to achieve better security level and to make sure of undetectability by automatic scans.&lt;br /&gt;
Below you may find specific recommendations by framework marker location and some additional interesting approaches.&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
Check your configuration and disable/obfuscate all HTTP-headers which disclose information about used technologies.&lt;br /&gt;
An interesting article about HTTP-headers obfuscation using Netscaler:&lt;br /&gt;
http://grahamhosking.blogspot.ru/2013/07/obfuscating-http-header-using-netscaler.html&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
It is recommended to change cookie names by making proper changes in corresponding config files.&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
Check manually the contents of your HTML code and remove everything what explicitly points to the framework.&lt;br /&gt;
General guidelines:&lt;br /&gt;
*Make sure you didn't leave any visual markers disclosing used framework&lt;br /&gt;
*Remove any unnecessary comments (copyrights, bug information, specific framework comments)&lt;br /&gt;
*Remove META and generator tags&lt;br /&gt;
*Use your own css/js and do not store those in a framework-specific folders&lt;br /&gt;
*Make sure you're not using default scripts on the page; if using them is needed, obfuscate them.&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
*Remove any unnecessary/unused files on the server. This implies text files disclosing information about versions and installation too.&lt;br /&gt;
*Restrict access to other files in order to achieve 404-response when accessing them from outside. This can be done, for example, by modifying htaccess file and adding RewriteCond / RewriteRule there. Example of such restriction for two common WordPress folders is presented below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-login\.php$ [OR]&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-admin/$&lt;br /&gt;
RewriteRule $ /http://your_website [R=404,L]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, these are not the only ways to restrict access. In order to automate this process, certain framework-specific plugins exist. One example for WordPress is StealthLogin (http://wordpress.org/plugins/stealth-login-page)&lt;br /&gt;
&lt;br /&gt;
==== Additional approaches ====&lt;br /&gt;
*Checksum management &lt;br /&gt;
*:Purpose of this approach is to beat checksum-based scanners and don't let them to disclose files by their hashes. Generally, there are two approaches in checksum management:&lt;br /&gt;
*:*Change the location of where those files are placed (i.e. move them to another folder, or rename existing)&lt;br /&gt;
*:*Modify their contents - even slight modification results in a completely different hash sum, so adding a single byte in the end of the file should not be a big problem.&lt;br /&gt;
*Controlled chaos&lt;br /&gt;
*:A funny and effective method which essense is adding bogus files and folders from other frameworks in order to fool scanners and confuse an attacker. But be careful not to overwrite exisiting files and folders and to break the current framework!&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_Framework_(OTG-INFO-008)&amp;diff=170357</id>
		<title>Fingerprint Web Application Framework (OTG-INFO-008)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Fingerprint_Web_Application_Framework_(OTG-INFO-008)&amp;diff=170357"/>
				<updated>2014-03-18T21:39:43Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
== Summary ==&lt;br /&gt;
Web framework[*] fingerprinting is an important subtask of the information gathering process. Knowing the type of framework can automatically give a great advantage if such a framework has already been tested by the penetration tester. It is not only the known vulnerabilities in unpatched versions but specific misconfigurations in the framework and known file structure which makes the fingerprinting process so important.&lt;br /&gt;
&lt;br /&gt;
Several different vendors and versions of web frameworks are widely used. &lt;br /&gt;
Information about it significantly helps in the testing process, and can also help in changing the course of the test. &lt;br /&gt;
Such information can be derived by careful analysis of certain common locations. Most of the web frameworks have several markers in those locations which help an attacker to spot them.&lt;br /&gt;
This is basically what all automatic tools do, they look for a marker from a predefined location&lt;br /&gt;
and then compare it to the database of known signatures. For better accuracy several markers are usually used.&lt;br /&gt;
&lt;br /&gt;
[*] Please note that in this article we make no difference between Web Application Frameworks (WAF) and Content Management Systems (CMS).&lt;br /&gt;
This has been done to make it convenient to fingerprint both of them in one chapter.Further we reference both of the categories as web frameworks.&lt;br /&gt;
&lt;br /&gt;
== Test Objectives ==&lt;br /&gt;
To define type of used web framework so to have a better understanding of the penetration testing methodology.&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
There are several most common locations to look in in order to define the current framework:&lt;br /&gt;
*HTTP headers&lt;br /&gt;
*Cookies&lt;br /&gt;
*HTML source code&lt;br /&gt;
*Specific files and folders&lt;br /&gt;
&lt;br /&gt;
Let's look closer at those approaches.&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
The most basic form of identifying a web framework is to look at the ''X-Powered-By'' field in the HTTP response header.&lt;br /&gt;
Many tools can be used to fingerprint a target. The simplest one is netcat utility. &lt;br /&gt;
Consider the following HTTP Request-Response: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc 127.0.0.1 80&lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.0.14&lt;br /&gt;
Date: Sat, 07 Sep 2013 08:19:15 GMT&lt;br /&gt;
Content-Type: text/html;charset=ISO-8859-1&lt;br /&gt;
Connection: close&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: Mono&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the ''X-Powered-By'' field, we understand that the web application framework is likely to be Mono.&lt;br /&gt;
&lt;br /&gt;
However, although simplicity and quickness of such an approach, this methodology doesn't work in 100% of cases. It is possible to easily disable ''X-Powered-By'' header by a proper configuration. There are also several techniques that allow a web site to obfuscate HTTP headers (see an example in [[#Remediation]] chapter)&lt;br /&gt;
So in the same example we could either miss the ''X-Powered-By'' header or obtain an answer like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.0.14&lt;br /&gt;
Date: Sat, 07 Sep 2013 08:19:15 GMT&lt;br /&gt;
Content-Type: text/html;charset=ISO-8859-1&lt;br /&gt;
Connection: close&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: Blood, sweat and tears&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes there are more HTTP-headers which point at the certain web framework. In the following example according to the information from HTTP-request one can see that ''X-Powered-By'' header contains PHP version. However, ''X-Generator'' header points out the used framework is actually Swiftlet, which helps a penetration tester to expand his attack vectors. When performing fingerprinting, always carefully inspect every HTTP-header for such leaks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: nginx/1.4.1&lt;br /&gt;
Date: Sat, 07 Sep 2013 09:22:52 GMT&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Vary: Accept-Encoding&lt;br /&gt;
X-Powered-By: PHP/5.4.16-1~dotdeb.1&lt;br /&gt;
Expires: Thu, 19 Nov 1981 08:52:00 GMT&lt;br /&gt;
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0&lt;br /&gt;
Pragma: no-cache&lt;br /&gt;
X-Generator: Swiftlet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
Another similar and somehow more reliable way to determine the current web framework are framework-specific cookies.&lt;br /&gt;
Consider the following HTTP-request:&lt;br /&gt;
&lt;br /&gt;
[[Image:Cakephp_cookie.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we can see, cookie ''CAKEPHP'' has automatically been set, which gives us the information about the framework being used. List of common cookies names is presented in chapter [[#Cookies_2]]. Limitations are the same - it is possible to change the name of the cookie. For example, for the selected ''CakePHP'' framework this could be done by the following configuration (excerpt from core.php):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
* The name of CakePHP's session cookie.&lt;br /&gt;
*&lt;br /&gt;
* Note the guidelines for Session names states: &amp;quot;The session name references&lt;br /&gt;
* the session id in cookies and URLs. It should contain only alphanumeric&lt;br /&gt;
* characters.&amp;quot;&lt;br /&gt;
* @link http://php.net/session_name&lt;br /&gt;
*/&lt;br /&gt;
Configure::write('Session.cookie', 'CAKEPHP');&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However from the experience, these changes are less likely to be made than, for example, ''X-Powered-By'' header so this approach can be considered as more reliable one.&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
This technique is based on finding certain patterns in the HTML page source code. Often one can find much information which helps a tester to recognize a specific web framework.&lt;br /&gt;
Ones of the common markers are HTML comments which directly lead to framework disclosure. More often certain framework-specific paths can be found, i.e. links to framework-specific css and/or js folders. Finally, specific script variables might also point to a certain framework.&lt;br /&gt;
From the screenshot below one can easily learn the used framework and its version by the mentioned markers: comment, specific paths and script variables can all help an attacker to quickly determine an instance of ZK framework.&lt;br /&gt;
&lt;br /&gt;
[[Image:Zk_html_source.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The most frequently such information is placed either between &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt; and in &amp;lt;meta&amp;gt; tags or in the end of the page. Nevertheless, it is recommended to check the whole document - it can be useful for other purposes (such as inspection of other useful comments and hidden fields)&lt;br /&gt;
Sometimes, however, web developers don't care much about hiding tracks of a framework. It's still possible to stumble upon something like that at the bottom of the page:&lt;br /&gt;
&lt;br /&gt;
[[Image:banshee_bottom_page.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
Apart from information, gathered from HTML sources, there is another approach which greatly helps an attacker to determine the framework with high accuracy.&lt;br /&gt;
Every framework has its own specific file and folder structure on the server. We pointed out that one can see the specific path from the HTML page source but sometimes they are not explicitly presented there and still reside on the server. In order to uncover them such technique as dirbusting is used. Dirbusting essense is fuzzing target with predictable folder- and filenames and monitoring HTTP-responses thus enumerating server contents. This information can be used both for finding default files and attacking them in next stages and for fingerprinting the web framework.&lt;br /&gt;
Dirbusting can be done in several ways, example below shows successful dirbusting attack against a WordPress-powered target with the help of defined list and Intruder functionality of Burp Suite.&lt;br /&gt;
&lt;br /&gt;
[[Image:Wordpress_dirbusting.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that for some WordPress-specific folders (for instance, /wp-includes/, /wp-admin/ and /wp-content/) HTTP-reponses are 403 (Forbidden), 302 (Found, redirection to ''wp-login.php'') and 200 (OK) respectively. This is a good indicator that the target is WordPress-powered. The same way it is possible to dirbust different framework plugin folders and their versions. On a screenshot below one can see a typical CHANGELOG file of a Drupal plugin, which both points out on the used framework and discloses vulnerable plugin version.&lt;br /&gt;
&lt;br /&gt;
[[Image:Drupal_botcha_disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tip: before starting dirbusting (which is a useful operation anyway), it is recommended to check robots.txt file first. Sometimes framework specific folders and other sensitive information can be found there as well! Example of such robots file is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Robots-info-disclosure.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing ===&lt;br /&gt;
Please address yourself to watching Monty Python's Flying Circus, I'm sure you'll like it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common frameworks ==&lt;br /&gt;
=== Cookies ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Framework !! Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| Zope || zope3&lt;br /&gt;
|-&lt;br /&gt;
| CakePHP || cakephp&lt;br /&gt;
|-&lt;br /&gt;
| Kohana || kohanasession&lt;br /&gt;
|-&lt;br /&gt;
| Laravel || laravel_session&lt;br /&gt;
|-&lt;br /&gt;
| 1C-Bitrix || BITRIX_&lt;br /&gt;
|-&lt;br /&gt;
| AMPcms || AMP&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Django CMS || django&lt;br /&gt;
|-&lt;br /&gt;
| DotNetNuke || DotNetNukeAnonymous&lt;br /&gt;
|-&lt;br /&gt;
| e107 || e107_tz&lt;br /&gt;
|-&lt;br /&gt;
| EPiServer || EPiTrace, EPiServer&lt;br /&gt;
|-&lt;br /&gt;
| Graffiti CMS || graffitibot&lt;br /&gt;
|-&lt;br /&gt;
| Hotaru CMS || hotaru_mobile&lt;br /&gt;
|-&lt;br /&gt;
| ImpressCMS || ICMSession&lt;br /&gt;
|-&lt;br /&gt;
| Indico || MAKACSESSION&lt;br /&gt;
|-&lt;br /&gt;
| InstantCMS || InstantCMS[logdate]&lt;br /&gt;
|-&lt;br /&gt;
| Kentico CMS || CMSPreferredCulture&lt;br /&gt;
|-&lt;br /&gt;
| MODx || SN4[12symb]&lt;br /&gt;
|-&lt;br /&gt;
| TYPO3 || fe_typo_user&lt;br /&gt;
|-&lt;br /&gt;
| Dynamicweb || Dynamicweb&lt;br /&gt;
|-&lt;br /&gt;
| LEPTON || lep[some_numeric_value]+sessionid&lt;br /&gt;
|-&lt;br /&gt;
| Wix || Domain=.wix.com&lt;br /&gt;
|-&lt;br /&gt;
| VIVVO || VivvoSessionId&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTML source code ===&lt;br /&gt;
==== General markers ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| %framework_name%&lt;br /&gt;
|-&lt;br /&gt;
| powered by&lt;br /&gt;
|-&lt;br /&gt;
| built upon&lt;br /&gt;
|-&lt;br /&gt;
| running&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Specific markers ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Framework !! Keyword&lt;br /&gt;
|-&lt;br /&gt;
| Adobe ColdFusion || &amp;amp;lt;!-- START headerTags.cfm&lt;br /&gt;
|-&lt;br /&gt;
| Microsoft ASP.NET || __VIEWSTATE&lt;br /&gt;
|-&lt;br /&gt;
| ZK || &amp;amp;lt;!-- ZK&lt;br /&gt;
|-&lt;br /&gt;
| Business Catalyst || &amp;amp;lt;!-- BC_OBNW --&amp;amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Indexhibit || ndxz-studio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Specific files and folders ===&lt;br /&gt;
Different for each specific framework. It is recommended to install the corresponding framework during penetration tests in order to have better understanding of what infrastructure is presented and which files might be left on the server. However, several good pre-made lists already exist, one good example of them - FuzzDB wordlists of predictable files/folders (http://code.google.com/p/fuzzdb/)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
A list of general and well-known tools is presented below. There are also a lot of other utilities, as well as framework-based fingerprinting tools.&lt;br /&gt;
 &lt;br /&gt;
=== WhatWeb ===&lt;br /&gt;
Website:  http://www.morningstarsecurity.com/research/whatweb &amp;lt;br&amp;gt;&lt;br /&gt;
Currently one of the best fingerprinting tools on the market. Included in a default [[Kali Linux]] build.&lt;br /&gt;
Language: Ruby&lt;br /&gt;
Matches for fingerprinting are made with:&lt;br /&gt;
* Text strings (case sensitive)&lt;br /&gt;
* Regular expressions&lt;br /&gt;
* Google Hack Database queries (limited set of keywords)&lt;br /&gt;
* MD5 hashes&lt;br /&gt;
* URL recognition&lt;br /&gt;
* HTML tag patterns&lt;br /&gt;
* Custom ruby code for passive and aggressive operations&lt;br /&gt;
&lt;br /&gt;
Sample output is presented on a screenshot below:&lt;br /&gt;
&lt;br /&gt;
[[Image:whatweb-sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BlindElephant === &lt;br /&gt;
Website: https://community.qualys.com/community/blindelephant &amp;lt;br&amp;gt;&lt;br /&gt;
This great tool works on the principle of static file checksum based version difference thus providing a very high quality of fingerprinting.&lt;br /&gt;
Language: Python&lt;br /&gt;
&lt;br /&gt;
Sample output of a successful fingerprint:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pentester$ python BlindElephant.py http://my_target drupal&lt;br /&gt;
Loaded /Library/Python/2.7/site-packages/blindelephant/dbs/drupal.pkl with 145 versions, 478 differentiating paths, and 434 version groups.&lt;br /&gt;
Starting BlindElephant fingerprint for version of drupal at http://my_target &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/CHANGELOG.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 527b085a3717bd691d47713dff74acf4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/INSTALL.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 14dfc133e4101be6f0ef5c64566da4a4 &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/misc/drupal.js&lt;br /&gt;
Possible versions based on result: 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/MAINTAINERS.txt&lt;br /&gt;
File produced no match. Error: Retrieved file doesn't match known fingerprint. 36b740941a19912f3fdbfcca7caa08ca &lt;br /&gt;
&lt;br /&gt;
Hit http://my_target/themes/garland/style.css&lt;br /&gt;
Possible versions based on result: 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 7.10, 7.11, 7.12, 7.13, 7.14&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Fingerprinting resulted in:&lt;br /&gt;
7.14&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Best Guess: 7.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wappalyzer ===&lt;br /&gt;
Website: http://wappalyzer.com &amp;lt;br&amp;gt;&lt;br /&gt;
Wapplyzer is a Firefox/Chrome plug-in. It works on only regular expression matching and doesn't need anything other than the page to be loaded on browser. It works completely at the browser level and give results in form of icons. Although sometimes it has false positives, this is very handy to have notion of what technologies were used to construct a target website immediately after browsing a page.&lt;br /&gt;
Sample output of a plug-in is presented on a screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Owasp-wappalyzer.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Vulnerability References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Saumil Shah: &amp;quot;An Introduction to HTTP fingerprinting&amp;quot; - http://www.net-square.com/httprint_paper.html&lt;br /&gt;
* Anant Shrivastava : &amp;quot;Web Application Finger Printing&amp;quot; - http://anantshri.info/articles/web_app_finger_printing.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;br /&gt;
General advice: use several tools described above and check scan logs in order to better understand what exactly helps an attacker to disclose your web framework. By performing multiple scans after changes you've done to hide framework tracks, it's possible to achieve better security level and to make sure of undetectability by automatic scans.&lt;br /&gt;
Below you may find specific recommendations by framework marker location and some additional interesting approaches.&lt;br /&gt;
&lt;br /&gt;
==== HTTP headers ====&lt;br /&gt;
Check your configuration and disable/obfuscate all HTTP-headers which disclose information about used technologies.&lt;br /&gt;
An interesting article about HTTP-headers obfuscation using Netscaler:&lt;br /&gt;
http://grahamhosking.blogspot.ru/2013/07/obfuscating-http-header-using-netscaler.html&lt;br /&gt;
&lt;br /&gt;
==== Cookies ====&lt;br /&gt;
It is recommended to change cookie names by making proper changes in corresponding config files.&lt;br /&gt;
&lt;br /&gt;
==== HTML source code ====&lt;br /&gt;
Check manually the contents of your HTML code and remove everything what explicitly points to the framework.&lt;br /&gt;
General guidelines:&lt;br /&gt;
*Make sure you didn't leave any visual markers disclosing used framework&lt;br /&gt;
*Remove any unnecessary comments (copyrights, bug information, specific framework comments)&lt;br /&gt;
*Remove META and generator tags&lt;br /&gt;
*Use your own css/js and do not store those in a framework-specific folders&lt;br /&gt;
*Make sure you're not using default scripts on the page; if using them is needed, obfuscate them.&lt;br /&gt;
&lt;br /&gt;
==== Specific files and folders ====&lt;br /&gt;
*Remove any unnecessary/unused files on the server. This implies text files disclosing information about versions and installation too.&lt;br /&gt;
*Restrict access to other files in order to achieve 404-response when accessing them from outside. This can be done, for example, by modifying htaccess file and adding RewriteCond / RewriteRule there. Example of such restriction for two common WordPress folders is presented below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-login\.php$ [OR]&lt;br /&gt;
RewriteCond %{REQUEST_URI} /wp-admin/$&lt;br /&gt;
RewriteRule $ /http://your_website [R=404,L]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, these are not the only ways to restrict access. In order to automate this process, certain framework-specific plugins exist. One example for WordPress is StealthLogin (http://wordpress.org/plugins/stealth-login-page)&lt;br /&gt;
&lt;br /&gt;
==== Additional approaches ====&lt;br /&gt;
*Checksum management &lt;br /&gt;
*:Purpose of this approach is to beat checksum-based scanners and don't let them to disclose files by their hashes. Generally, there are two approaches in checksum management:&lt;br /&gt;
*:*Change the location of where those files are placed (i.e. move them to another folder, or rename existing)&lt;br /&gt;
*:*Modify their contents - even slight modification results in a completely different hash sum, so adding a single byte in the end of the file should not be a big problem.&lt;br /&gt;
*Controlled chaos&lt;br /&gt;
*:A funny and effective method which essense is adding bogus files and folders from other frameworks in order to fool scanners and confuse an attacker. But be careful not to overwrite exisiting files and folders and to break the current framework!&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Map_execution_paths_through_application_(OTG-INFO-007)&amp;diff=170356</id>
		<title>Map execution paths through application (OTG-INFO-007)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Map_execution_paths_through_application_(OTG-INFO-007)&amp;diff=170356"/>
				<updated>2014-03-18T21:15:43Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Before commencing security testing, understanding the structure of the application is paramount. Without a thorough understanding of the layout of the application, it is unlkely that it will be tested thoroughly.  &lt;br /&gt;
&lt;br /&gt;
== Test Objectives ==&lt;br /&gt;
&lt;br /&gt;
Map the target application and understand the principal workflows.&lt;br /&gt;
&lt;br /&gt;
== How to Test ==&lt;br /&gt;
&lt;br /&gt;
In black box testing it is extremely difficult to test the entire code base. Not just because the tester has no view of the code paths through the application, but even if they did, to test all code paths would be very time consuming. One way to reconcile this is to document what code paths were discovered and tested. &lt;br /&gt;
&lt;br /&gt;
There are several ways to approach the testing and measurement of code coverage:&lt;br /&gt;
&lt;br /&gt;
* '''Path''' - test each of the paths through an application which includes combinatorial and boundary value analysis testing for each decision path. While this approach offers thoroughness, the number of testable paths grows exponentially with each decision branch.&lt;br /&gt;
* '''Data flow (or taint analysis)''' - tests the assignment of variables via external interaction (normally users). Focuses on mapping the flow, transformation and use of data throughout an application.&lt;br /&gt;
* '''Race''' - tests multiple concurrent instances of the application manipulating the same data.&lt;br /&gt;
&lt;br /&gt;
The trade off as to what method is used and to what degree each method is used should be negotiated with the application owner. Simpler approaches could also be adopted, including asking the application owner what functions or code sections they are particularly concerned about and how those code segments can be reached.&lt;br /&gt;
&lt;br /&gt;
''' Black Box testing '''&lt;br /&gt;
&lt;br /&gt;
To demonstrate code coverage to the application owner, the tester can start with a spreadsheet and document all the links discovered by spidering the application (either manually or automatically). Then the tester can look more closely at decision points in the application and investigate how many significant code paths are discovered. These should then be documented in the spreadsheet with URLs, prose and screenshot descriptions of the paths discovered.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Gray/White Box testing ''' &lt;br /&gt;
&lt;br /&gt;
Ensuring sufficient code coverage for the application owner is far easier with the gray and white box approach to testing. Information solicited by and provided to the tester will ensure the minimum requirements for code coverage are met. &lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Automatic Spidering '''&lt;br /&gt;
&lt;br /&gt;
The automatic spider is a tool used to automatically discover new resources (URLs) on a particular website. It begins with a list of URLs to visit, called the seeds, which depends on how the Spider is started. While there are a lot of Spidering tools, we will use the [https://code.google.com/p/zaproxy/ Zed Attack Proxy (ZAP)] in the following example &lt;br /&gt;
&lt;br /&gt;
 [[File:OWASPZAPSP.png |1050px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/zaproxy/ ZAP] offers the following automatic spidering features, which can be selected based on the tester needs&lt;br /&gt;
&lt;br /&gt;
*Spider Site - The seed list contains all the existing URIs already found for the selected site.&lt;br /&gt;
*Spider Subtree - The seed list contains all the existing URIs already found and present in the subtree of the selected node.&lt;br /&gt;
*Spider URL - The seed list contains only the URI corresponding to the selected node (in the Site Tree).&lt;br /&gt;
*Spider all in Scope - The seed list contains all the URIs the user has selected as being 'In Scope'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
* [https://code.google.com/p/zaproxy/ Zed Attack Proxy (ZAP)]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/List_of_spreadsheet_software List of spreadsheet software]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Diagramming_software Diagramming software]&lt;br /&gt;
&lt;br /&gt;
== Vulnerability References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&lt;br /&gt;
&lt;br /&gt;
[1] http://en.wikipedia.org/wiki/Code_coverage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remediation ==&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Identify_application_entry_points_(OTG-INFO-006)&amp;diff=170318</id>
		<title>Identify application entry points (OTG-INFO-006)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Identify_application_entry_points_(OTG-INFO-006)&amp;diff=170318"/>
				<updated>2014-03-17T21:40:09Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Enumerating the application and its attack surface is a key precursor before any thorough testing can be undertaken, as it allows the tester to identify likely areas of weakness. This section aims to help identify and map out areas within the application that should be investigated once enumeration and mapping have been completed.&lt;br /&gt;
&lt;br /&gt;
== Test Objectives ==&lt;br /&gt;
&lt;br /&gt;
Understand how requests are formed and typical responses from the application&lt;br /&gt;
&lt;br /&gt;
== How to Test == &lt;br /&gt;
&lt;br /&gt;
Before any testing begins, always get a good understanding of the application and how the user/browser communicates with it.  As you walk through the application, pay special attention to all HTTP requests (GET and POST Methods, also known as Verbs), as well as every parameter and form field that is passed to the application.  In addition, pay attention to when GET requests are used and when POST requests are used to pass parameters to the application.  It is very common that GET requests are used, but when sensitive information is passed, it is often done within the body of a POST request.  Note that to see the parameters sent in a POST request, you will need to use a tool such as an intercepting proxy (for example, OWASP: [[OWASP_Zed_Attack_Proxy_Project| Zed Attack Proxy (ZAP)]]) or a browser plug-in.  Within the POST request, also make special note of any hidden form fields that are being passed to the application, as these usually contain sensitive information, such as state information, quantity of items, the price of items, that the developer never intended for you to see or change.  &lt;br /&gt;
&lt;br /&gt;
In the author's experience, it has been very useful to use an intercepting proxy and a spreadsheet for this stage of the testing.  The proxy will keep track of every request and response between you and the application as you walk through it.  Additionally, at this point, testers usually trap every request and response so that they can see exactly every header, parameter, etc. that is being passed to the application and what is being returned.  This can be quite tedious at times, especially on large interactive sites (think of a banking application). However, experience will teach you what to look for, and, therefore, this phase can be significantly reduced.  As you walk through the application, take note of any interesting parameters in the URL, custom headers, or body of the requests/responses, and save them in your spreadsheet.  The spreadsheet should include the page you requested (it might be good to also add the request number from the proxy, for future reference), the interesting parameters, the type of request (POST/GET), if access is authenticated/unauthenticated, if SSL is used, if it's part of a multi-step process, and any other relevant notes.  Once you have every area of the application mapped out, then you can go through the application and test each of the areas that you have identified and make notes for what worked and what didn't work.  The rest of this guide will identify how to test each of these areas of interest, but this section must be undertaken before any of the actual testing can commence.&lt;br /&gt;
&lt;br /&gt;
Below are some points of interests for all requests and responses.  Within the requests section, focus on the GET and POST methods, as these appear the majority of the requests.  Note that other methods, such as PUT and DELETE, can be used. Often, these more rare requests, if allowed, can expose vulnerabilities.  There is a special section in this guide dedicated for testing these HTTP methods.&lt;br /&gt;
&lt;br /&gt;
'''Requests:'''&lt;br /&gt;
* Identify where GETs are used and where POSTs are used.&lt;br /&gt;
* Identify all parameters used in a POST request (these are in the body of the request).&lt;br /&gt;
* Within the POST request, pay special attention to any hidden parameters.  When a POST is sent all the form fields (including hidden parameters) will be sent in the body of the HTTP message to the application.  These typically aren't seen unless you are using a proxy or view the HTML source code.  In addition, the next page you see, its data, and your access can all be different depending on the value of the hidden parameter(s).&lt;br /&gt;
* Identify all parameters used in a GET request (i.e., URL), in particular the query string (usually after a ? mark).&lt;br /&gt;
* Identify all the parameters of the query string. These usually are in a pair format, such as foo=bar. Also note that many parameters can be in one query string such as separated by a &amp;amp;, ~, :, or any other special character or encoding.&lt;br /&gt;
* A special note when it comes to identifying multiple parameters in one string or within a POST request is that some or all of the parameters will be needed to execute your attacks.  You need to identify all of the parameters (even if encoded or encrypted) and identify which ones are processed by the application.  Later sections of the guide will identify how to test these parameters. At this point, just make sure you identify each one of them.&lt;br /&gt;
* Also pay attention to any additional or custom type headers not typically seen (such as debug=False).&lt;br /&gt;
&lt;br /&gt;
'''Responses:'''&lt;br /&gt;
*Identify where new cookies are set (Set-Cookie header), modified, or added to.&lt;br /&gt;
*Identify where there are any redirects (3xx HTTP status code), 400 status codes, in particular 403 Forbidden, and 500 internal server errors during normal responses (i.e., unmodified requests).&lt;br /&gt;
*Also note where any interesting headers are used. For example, &amp;quot;Server: BIG-IP&amp;quot; indicates that the site is load balanced. Thus, if a site is load balanced and one server is incorrectly configured, then you might have to make multiple requests to access the vulnerable server, depending on the type of load balancing used.&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing and example ===&lt;br /&gt;
'''Testing for application entry points:''' &amp;lt;br&amp;gt;&lt;br /&gt;
The following are two examples on how to check for application entry points.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====EXAMPLE 1====&lt;br /&gt;
This example shows a GET request that would purchase an item from an online shopping application.&lt;br /&gt;
&lt;br /&gt;
 GET https://x.x.x.x/shoppingApp/buyme.asp?CUSTOMERID=100&amp;amp;ITEM=z101a&amp;amp;PRICE=62.50&amp;amp;IP=x.x.x.x &lt;br /&gt;
 Host: x.x.x.x&lt;br /&gt;
 Cookie: SESSIONID=Z29vZCBqb2IgcGFkYXdhIG15IHVzZXJuYW1lIGlzIGZvbyBhbmQgcGFzc3dvcmQgaXMgYmFy&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&lt;br /&gt;
&lt;br /&gt;
Here you would note all the parameters of the request such as CUSTOMERID, ITEM, PRICE, IP, and the Cookie (which could just be encoded parameters or used for session state).&lt;br /&gt;
&lt;br /&gt;
====EXAMPLE 2====&lt;br /&gt;
This example shows a POST request that would log you into an application.&lt;br /&gt;
&lt;br /&gt;
 POST https://x.x.x.x/KevinNotSoGoodApp/authenticate.asp?service=login&lt;br /&gt;
 Host: x.x.x.x&lt;br /&gt;
 Cookie: SESSIONID=dGhpcyBpcyBhIGJhZCBhcHAgdGhhdCBzZXRzIHByZWRpY3RhYmxlIGNvb2tpZXMgYW5kIG1pbmUgaXMgMTIzNA==&lt;br /&gt;
 CustomCookie=00my00trusted00ip00is00x.x.x.x00&lt;br /&gt;
&lt;br /&gt;
Body of the POST message:&lt;br /&gt;
&lt;br /&gt;
 user=admin&amp;amp;pass=pass123&amp;amp;debug=true&amp;amp;fromtrustIP=true&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&lt;br /&gt;
&lt;br /&gt;
In this example you would note all the parameters as you have before but notice that the parameters are passed in the body of the message and not in the URL.  Additionally, note that there is a custom cookie that is being used.&lt;br /&gt;
&lt;br /&gt;
=== Gray Box testing and example === &lt;br /&gt;
&lt;br /&gt;
Testing for application entry points via a Gray Box methodology would consist of everything already identified above with one caveat.  This would be if there are any external sources from which the application receives data and processes it (such as SNMP traps, syslog messages, SMTP, or SOAP messages from other servers).  If there are any external sources of input into the application then a meeting with the application developers could identify any functions that would accept or expect user input and how it's formatted.  For example, the developer could help in understanding how to formulate a correct SOAP request that the application would accept and where the web service resides (if the web service or any other function hasn't already been identified during the black box testing).&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
'''Intercepting Proxy:'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*OWASP: [[OWASP_Zed_Attack_Proxy_Project| Zed Attack Proxy (ZAP)]]&lt;br /&gt;
*OWASP: [[OWASP_WebScarab_Project| WebScarab]]&lt;br /&gt;
* [http://www.portswigger.net/burp/ Burp Suite]&lt;br /&gt;
* [http://www.contextis.com/research/tools/cat/ CAT]&lt;br /&gt;
&lt;br /&gt;
'''Browser Plug-in:'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://www.bayden.com/TamperIE/ TamperIE for Internet Explorer]&lt;br /&gt;
*[https://addons.mozilla.org/en-US/firefox/addon/966 Tamper Data for Firefox]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*RFC 2616 – Hypertext Transfer Protocol – HTTP 1.1 -&lt;br /&gt;
http://tools.ietf.org/html/rfc2616&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=155043</id>
		<title>Testing: WS Information Gathering (OWASP-WS-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=155043"/>
				<updated>2013-07-04T09:20:04Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
==Brief Summary==&lt;br /&gt;
The first step to perform a Web Service Test is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the Web Service.&lt;br /&gt;
&lt;br /&gt;
==Black Box Testing and example==&lt;br /&gt;
'''Zero Knowledge'''&amp;lt;br&amp;gt;&lt;br /&gt;
Normally you will have a WSDL path to access the Web Service, but if you have zero knowledge about it, you will have to use UDDI to find a specific service.&lt;br /&gt;
Web Services have three critical building blocks – UDDI, WSDL and SOAP. There is a third intermediate player facilitating communication between the consumer and supplier, referred to as Universal Business Registry (UBR).&lt;br /&gt;
There are several ways to find our WSDL: the easiest one is to make a search Query in public search engine. For example, if you have to assess an example.com public WS, on google.com you can type:&lt;br /&gt;
&lt;br /&gt;
 inurl:wsdl site:example.com&lt;br /&gt;
&lt;br /&gt;
and you will find all the public Example WSDL.&lt;br /&gt;
Net Square wsPawn is a useful tool that acts as Web Services Consumer and makes a query to the UBR and looks for services as per requirements. Then UBR supplies the list of available services. The Web Services Consumer chooses one or more available services. Next, Web Services Consumer requests an access point or end point for these services. UBR supplies this information. From this moment, Web Services Consumer approaches the Web Services Supplier’s Host/IP address (WSDL) and starts accessing service.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''WSDL endpoints'''&amp;lt;br&amp;gt;&lt;br /&gt;
When a tester accesses the WSDL, he can determine an access point and available interfaces for web services. These interfaces or methods take inputs using SOAP over HTTP/HTTPS. If these inputs are not defined well at the source code level, they can be compromised and exploited.&lt;br /&gt;
For example given this WSDL Endpoint:&lt;br /&gt;
&lt;br /&gt;
 http://www.example.com/ws/FindIP.asmx?WSDL&lt;br /&gt;
&lt;br /&gt;
you can obtain the following description of the Web Services:&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;wsdl:definitions xmlns:http=&amp;quot;http://schemas.xmlsoap.org/wsdl/http/&amp;quot; xmlns:soap=&amp;quot;http://schemas.xmlsoap.org/wsdl/soap/&amp;quot; xmlns:s=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:soapenc=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot; xmlns:tns=&amp;quot;http://example.com/webservices/&amp;quot; xmlns:tm=&amp;quot;http://microsoft.com/wsdl/mime/textMatching/&amp;quot; xmlns:mime=&amp;quot;http://schemas.xmlsoap.org/wsdl/mime/&amp;quot; targetNamespace=&amp;quot;http://example.com/webservices/&amp;quot; xmlns:wsdl=&amp;quot;http://schemas.xmlsoap.org/wsdl/&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:types&amp;gt;&lt;br /&gt;
    &amp;lt;s:schema elementFormDefault=&amp;quot;qualified&amp;quot; targetNamespace=&amp;quot;http://example.com/webservices/&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;s:element name=&amp;quot;GetURLIP&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;s:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;s:sequence&amp;gt;&lt;br /&gt;
            &amp;lt;s:element minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;1&amp;quot; name=&amp;quot;EnterURL&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/s:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;/s:complexType&amp;gt;&lt;br /&gt;
      &amp;lt;/s:element&amp;gt;&lt;br /&gt;
      &amp;lt;s:element name=&amp;quot;GetURLIPResponse&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;s:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;s:sequence&amp;gt;&lt;br /&gt;
            &amp;lt;s:element minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;1&amp;quot; name=&amp;quot;GetURLIPResult&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/s:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;/s:complexType&amp;gt;&lt;br /&gt;
      &amp;lt;/s:element&amp;gt;&lt;br /&gt;
      &amp;lt;s:element name=&amp;quot;string&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/s:schema&amp;gt;&lt;br /&gt;
  &amp;lt;/wsdl:types&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:message name=&amp;quot;GetURLIPSoapIn&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:part name=&amp;quot;parameters&amp;quot; element=&amp;quot;tns:GetURLIP&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:message name=&amp;quot;GetURLIPSoapOut&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:part name=&amp;quot;parameters&amp;quot; element=&amp;quot;tns:GetURLIPResponse&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:message name=&amp;quot;GetURLIPHttpGetIn&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:part name=&amp;quot;EnterURL&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
……&lt;br /&gt;
  &amp;lt;/wsdl:service&amp;gt;&lt;br /&gt;
&amp;lt;/wsdl:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This WS simply receives in input a logical name (EnterURL) and gives in output the relative IP Address. So we have GetURLIP as method for the WS and EnterURL (string) as input.&lt;br /&gt;
In that manner we have identified the WS entry point and we are ready to test it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Services Discovery'''&amp;lt;br&amp;gt;&lt;br /&gt;
Web Services consumer needs a simple and standardized way to find Web Services available from remote servers.&lt;br /&gt;
There are two ways to discover a Web Service, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can discover the URL's WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For instance, with an HTTP query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain the following DISCO descriptor:&lt;br /&gt;
&amp;lt;br&amp;gt;&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;discovery xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://schemas.xmlsoap.org/disco/&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;contractRef ref=&amp;quot;http://myexample.com/MyexampleService.asmx?wsdl&amp;quot; docRef=&amp;quot;http://myexample.com/myexample.asmx&amp;quot; xmlns=&amp;quot;http://schemas.xmlsoap.org/disco/scl/&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;soap address=&amp;quot;http://myexample.com/MyexampleService.asmx&amp;quot; xmlns:q1=&amp;quot;http://myexample.com/terraserver/&amp;quot; binding=&amp;quot;q1:myexampleServiceSoap&amp;quot; xmlns=&amp;quot;http://schemas.xmlsoap.org/disco/soap/&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/discovery&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We can see in the above XML document we have a reference for a WSDL document, where we can obtain a description of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft technology, UDDI (Universal Description, Discovery and Integration) is an OASIS standard . &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''WS Well Known Naming'''&amp;lt;br&amp;gt;&lt;br /&gt;
Common Web Services  platforms have a naming convention for offering a WSDL documents: This naming convention can be used to retrieve WSDL via URIs probing or through queries to web search server.&lt;br /&gt;
 &lt;br /&gt;
Some URLs that we can use are, for example:&lt;br /&gt;
&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;.wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;.aspx?wsdl &lt;br /&gt;
 &amp;lt;br&amp;gt;instead of .aspx extension we can also use .ascx, .asmx, .ashx extensions &lt;br /&gt;
 &amp;lt;br&amp;gt;Same thing with ?disco instead of ?wsdl&lt;br /&gt;
&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.dll&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.exe&amp;gt;?wsdl &lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.php&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.pl&amp;gt;?wsdl&lt;br /&gt;
&lt;br /&gt;
For Apache Axis we can try:&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/axis/services/&amp;lt;servicename&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/axis/services/&amp;lt;service-name&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Search for public Web Services'''&amp;lt;br&amp;gt;&lt;br /&gt;
The seekda Web Services Search Engine can help to find a public Web Services with related descriptions. &lt;br /&gt;
To find Web Services just type the keyword into seekda Web Services Search Engine. We can also browse by several other criteria such as Tag Cloud, Services by Countries, Most Used Services.&lt;br /&gt;
http://seekda.com&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:seekda.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Another Web Server with good links and Resources is WSindex (http://www.wsindex.org).&lt;br /&gt;
&lt;br /&gt;
[[Image:wsindex.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
''' UDDI Browser''' &amp;lt;br&amp;gt;&lt;br /&gt;
A web server that provides a very useful UDDI on-line tool to browse and search public UDDI resources is offered on http://www.soapclient.com/uddisearch.html.&amp;lt;br&amp;gt;&lt;br /&gt;
We can see we can use two operators, Microsoft and XMethods&lt;br /&gt;
&lt;br /&gt;
[[Image:uddi_browser_part.jpg]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The server offers, for example, to search all UDDI with a specific string in business names, service names or service types.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Advanced UDDI browsing'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can search private UDDI registries using the Advanced feature of UDDI browser.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:uddi_browser.jpg]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This service allows interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods to allow you to discover web services and useful links to other resources.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Command line interaction'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes it is useful to interact with webservices from a command line. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Simple SOAP Client - SOAPClient4XG&amp;lt;br&amp;gt;&lt;br /&gt;
SOAPClient4XG is a SOAP Client for XML which allows you to make a SOAP request from command line, for example:&lt;br /&gt;
 &lt;br /&gt;
 java -jar SOAPClient4XG http://api.google.com/search/beta2  my_sample_search.xml&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CURL&amp;lt;br&amp;gt;&lt;br /&gt;
We can also use a Webservice using CURL.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 curl --request POST --header “Content-type: text/xml &amp;lt;br&amp;gt;&lt;br /&gt;
       --data @my_request.xml http://api.google.com/search/beta2&amp;lt;br&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
Perl - SOAPlite&amp;lt;br&amp;gt;&lt;br /&gt;
With Perl and SOAP::lite modules we can create a scripts to automatize a SOAP request.&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''SOAP XML File'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To invoke web services from command line, we can create a SOAP request file &lt;br /&gt;
similar to the following one, and then use CURL to submit it to server.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;SOAP-ENV:Envelope&lt;br /&gt;
  xmlns:SOAP-ENV=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;&lt;br /&gt;
  SOAP-ENV:encodingStyle=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;SOAP-ENV:Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;m:GetZip xmlns:m=&amp;quot;http://namespaces.example.com&amp;quot;&amp;gt;    &lt;br /&gt;
     &amp;lt;country&amp;gt;Italy&amp;lt;/country&amp;gt;&lt;br /&gt;
     &amp;lt;city&amp;gt;Roma&amp;lt;/city&amp;gt;&lt;br /&gt;
   &amp;lt;/m:GetZip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/SOAP-ENV:Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/SOAP-ENV:Envelope&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Creating a malformed XML file we can test a Webservices for a typical attack as the following:&amp;lt;br&amp;gt;&lt;br /&gt;
-oversized XML Tag&amp;lt;br&amp;gt;&lt;br /&gt;
-nested or recursive declarations&amp;lt;br&amp;gt;&lt;br /&gt;
-parameter attack&amp;lt;br&amp;gt;&lt;br /&gt;
-authentication testing&amp;lt;br&amp;gt;&lt;br /&gt;
-XSS&amp;lt;br&amp;gt;&lt;br /&gt;
-SQL Injection&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* DISCO: http://msdn.microsoft.com/en-us/magazine/cc302073.aspx&lt;br /&gt;
* UDDI OASIS Standard: http://www.oasis-open.org/specs/index.php#uddiv3.0.2&lt;br /&gt;
* Understanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
* WebServices Testing: http://www.aboutsecurity.net&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Net Square wsPawn&lt;br /&gt;
* [[OWASP_WebScarab_Project|OWASP WebScarab]]: Web Services plugin&lt;br /&gt;
* Mac OSX Soap Client: http://www.ditchnet.org/soapclient&lt;br /&gt;
* Foundstone WsDigger: http://www.foundstone.com/us/resources/proddesc/wsdigger.htm&lt;br /&gt;
* Soaplite: http://www.soaplite.com&lt;br /&gt;
* Perl: http://www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;br /&gt;
* CURL: http://curl.haxx.se&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''On-line tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Web Services Directory: http://www.wsindex.org&lt;br /&gt;
* Seekda: http://seekda.com/&lt;br /&gt;
* UDDI Browser: http://www.soapclient.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=155032</id>
		<title>Testing: WS Information Gathering (OWASP-WS-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=155032"/>
				<updated>2013-07-04T09:15:25Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
==Brief Summary==&lt;br /&gt;
The first step to perform a Web Service Test is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the Web Service.&lt;br /&gt;
&lt;br /&gt;
==Black Box Testing and example==&lt;br /&gt;
'''Zero Knowledge'''&amp;lt;br&amp;gt;&lt;br /&gt;
Normally you will have a WSDL path to access the Web Service, but if you have zero knowledge about it, you will have to use UDDI to find a specific service.&lt;br /&gt;
Web Services have three critical building blocks – UDDI, WSDL and SOAP. There is a third intermediate player facilitating communication between the consumer and supplier, referred to as Universal Business Registry (UBR).&lt;br /&gt;
There are several ways to find our WSDL: the easiest one is to make a search Query in public search engine. For example, if you have to assess an example.com public WS, on google.com you can type:&lt;br /&gt;
&lt;br /&gt;
 inurl:wsdl site:example.com&lt;br /&gt;
&lt;br /&gt;
and you will find all the public Example WSDL.&lt;br /&gt;
Net Square wsPawn is a useful tool that acts as Web Services Consumer and makes a query to the UBR and looks for services as per requirements. Then UBR supplies the list of available services. The Web Services Consumer chooses one or more available services. Next, Web Services Consumer requests an access point or end point for these services. UBR supplies this information. From this moment, Web Services Consumer approaches the Web Services Supplier’s Host/IP address (WSDL) and starts accessing service.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''WSDL endpoints'''&amp;lt;br&amp;gt;&lt;br /&gt;
When a tester accesses the WSDL, he can determine an access point and available interfaces for web services. These interfaces or methods take inputs using SOAP over HTTP/HTTPS. If these inputs are not defined well at the source code level, they can be compromised and exploited.&lt;br /&gt;
For example given this WSDL Endpoint:&lt;br /&gt;
&lt;br /&gt;
 http://www.example.com/ws/FindIP.asmx?WSDL&lt;br /&gt;
&lt;br /&gt;
you can obtain the following description of the Web Services:&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;wsdl:definitions xmlns:http=&amp;quot;http://schemas.xmlsoap.org/wsdl/http/&amp;quot; xmlns:soap=&amp;quot;http://schemas.xmlsoap.org/wsdl/soap/&amp;quot; xmlns:s=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:soapenc=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot; xmlns:tns=&amp;quot;http://example.com/webservices/&amp;quot; xmlns:tm=&amp;quot;http://microsoft.com/wsdl/mime/textMatching/&amp;quot; xmlns:mime=&amp;quot;http://schemas.xmlsoap.org/wsdl/mime/&amp;quot; targetNamespace=&amp;quot;http://example.com/webservices/&amp;quot; xmlns:wsdl=&amp;quot;http://schemas.xmlsoap.org/wsdl/&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:types&amp;gt;&lt;br /&gt;
    &amp;lt;s:schema elementFormDefault=&amp;quot;qualified&amp;quot; targetNamespace=&amp;quot;http://example.com/webservices/&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;s:element name=&amp;quot;GetURLIP&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;s:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;s:sequence&amp;gt;&lt;br /&gt;
            &amp;lt;s:element minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;1&amp;quot; name=&amp;quot;EnterURL&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/s:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;/s:complexType&amp;gt;&lt;br /&gt;
      &amp;lt;/s:element&amp;gt;&lt;br /&gt;
      &amp;lt;s:element name=&amp;quot;GetURLIPResponse&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;s:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;s:sequence&amp;gt;&lt;br /&gt;
            &amp;lt;s:element minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;1&amp;quot; name=&amp;quot;GetURLIPResult&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/s:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;/s:complexType&amp;gt;&lt;br /&gt;
      &amp;lt;/s:element&amp;gt;&lt;br /&gt;
      &amp;lt;s:element name=&amp;quot;string&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/s:schema&amp;gt;&lt;br /&gt;
  &amp;lt;/wsdl:types&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:message name=&amp;quot;GetURLIPSoapIn&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:part name=&amp;quot;parameters&amp;quot; element=&amp;quot;tns:GetURLIP&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:message name=&amp;quot;GetURLIPSoapOut&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:part name=&amp;quot;parameters&amp;quot; element=&amp;quot;tns:GetURLIPResponse&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:message name=&amp;quot;GetURLIPHttpGetIn&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:part name=&amp;quot;EnterURL&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
……&lt;br /&gt;
  &amp;lt;/wsdl:service&amp;gt;&lt;br /&gt;
&amp;lt;/wsdl:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This WS simply receives in input a logical name (EnterURL) and gives in output the relative IP Address. So we have GetURLIP as method for the WS and EnterURL (string) as input.&lt;br /&gt;
In that manner we have identified the WS entry point and we are ready to test it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Services Discovery'''&amp;lt;br&amp;gt;&lt;br /&gt;
Web Services consumer needs a simple and standardized way to find Web Services available from remote servers.&lt;br /&gt;
There are two ways to discover a Web Service, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can discover the URL's WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For instance, with an HTTP query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain the following DISCO descriptor:&lt;br /&gt;
&amp;lt;br&amp;gt;&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;discovery xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://schemas.xmlsoap.org/disco/&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;contractRef ref=&amp;quot;http://myexample.com/MyexampleService.asmx?wsdl&amp;quot; docRef=&amp;quot;http://myexample.com/myexample.asmx&amp;quot; xmlns=&amp;quot;http://schemas.xmlsoap.org/disco/scl/&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;soap address=&amp;quot;http://myexample.com/MyexampleService.asmx&amp;quot; xmlns:q1=&amp;quot;http://myexample.com/terraserver/&amp;quot; binding=&amp;quot;q1:myexampleServiceSoap&amp;quot; xmlns=&amp;quot;http://schemas.xmlsoap.org/disco/soap/&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/discovery&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We can see in the above XML document we have a reference for a WSDL document, where we can obtain a description of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft technology, UDDI (Universal Description, Discovery and Integration) is an OASIS standard . &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''WS Well Known Naming'''&amp;lt;br&amp;gt;&lt;br /&gt;
Common Web Services  platforms have a naming convention for offering a WSDL documents: This naming convention can be used to retrieve WSDL via URIs probing or through queries to web search server.&lt;br /&gt;
 &lt;br /&gt;
Some URLs that we can use are, for example:&lt;br /&gt;
&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;.wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;.aspx?wsdl &lt;br /&gt;
 &amp;lt;br&amp;gt;instead of .aspx extension we can also use .ascx, .asmx, .ashx extensions &lt;br /&gt;
 &amp;lt;br&amp;gt;Same thing with ?disco instead of ?wsdl&lt;br /&gt;
&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.dll&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.exe&amp;gt;?wsdl &lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.php&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.pl&amp;gt;?wsdl&lt;br /&gt;
&lt;br /&gt;
For Apache Axis we can try:&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/axis/services/&amp;lt;servicename&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/axis/services/&amp;lt;service-name&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Search for public Web Services'''&amp;lt;br&amp;gt;&lt;br /&gt;
The seekda Web Services Search Engine can help to find a public Web Services with related descriptions. &lt;br /&gt;
To find Web Services just type the keyword into seekda Web Services Search Engine. We can also browse by several other criteria such as Tag Cloud, Services by Countries, Most Used Services.&lt;br /&gt;
http://seekda.com&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:seekda.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Another Web Server with good links and Resources is WSindex (http://www.wsindex.org).&lt;br /&gt;
&lt;br /&gt;
[[Image:wsindex.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
''' UDDI Browser''' &amp;lt;br&amp;gt;&lt;br /&gt;
A web server that provides a very useful UDDI on-line tool to browse and search public UDDI resources is offered on http://www.soapclient.com.&amp;lt;br&amp;gt;&lt;br /&gt;
We can see we can use two operators, Microsoft and XMethods&lt;br /&gt;
&lt;br /&gt;
[[Image:uddi_browser_part.jpg]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The server offers, for example, to search all UDDI with a specific string in business names, service names or service types.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Advanced UDDI browsing'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can search private UDDI registries using the Advanced feature of UDDI browser.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:uddi_browser.jpg]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This service allows interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods to allow you to discover web services and useful links to other resources.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Command line interaction'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes it is useful to interact with webservices from a command line. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Simple SOAP Client - SOAPClient4XG&amp;lt;br&amp;gt;&lt;br /&gt;
SOAPClient4XG is a SOAP Client for XML which allows you to make a SOAP request from command line, for example:&lt;br /&gt;
 &lt;br /&gt;
 java -jar SOAPClient4XG http://api.google.com/search/beta2  my_sample_search.xml&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CURL&amp;lt;br&amp;gt;&lt;br /&gt;
We can also use a Webservice using CURL.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 curl --request POST --header “Content-type: text/xml &amp;lt;br&amp;gt;&lt;br /&gt;
       --data @my_request.xml http://api.google.com/search/beta2&amp;lt;br&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
Perl - SOAPlite&amp;lt;br&amp;gt;&lt;br /&gt;
With Perl and SOAP::lite modules we can create a scripts to automatize a SOAP request.&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''SOAP XML File'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To invoke web services from command line, we can create a SOAP request file &lt;br /&gt;
similar to the following one, and then use CURL to submit it to server.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;SOAP-ENV:Envelope&lt;br /&gt;
  xmlns:SOAP-ENV=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;&lt;br /&gt;
  SOAP-ENV:encodingStyle=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;SOAP-ENV:Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;m:GetZip xmlns:m=&amp;quot;http://namespaces.example.com&amp;quot;&amp;gt;    &lt;br /&gt;
     &amp;lt;country&amp;gt;Italy&amp;lt;/country&amp;gt;&lt;br /&gt;
     &amp;lt;city&amp;gt;Roma&amp;lt;/city&amp;gt;&lt;br /&gt;
   &amp;lt;/m:GetZip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/SOAP-ENV:Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/SOAP-ENV:Envelope&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Creating a malformed XML file we can test a Webservices for a typical attack as the following:&amp;lt;br&amp;gt;&lt;br /&gt;
-oversized XML Tag&amp;lt;br&amp;gt;&lt;br /&gt;
-nested or recursive declarations&amp;lt;br&amp;gt;&lt;br /&gt;
-parameter attack&amp;lt;br&amp;gt;&lt;br /&gt;
-authentication testing&amp;lt;br&amp;gt;&lt;br /&gt;
-XSS&amp;lt;br&amp;gt;&lt;br /&gt;
-SQL Injection&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* DISCO: http://msdn.microsoft.com/en-us/magazine/cc302073.aspx&lt;br /&gt;
* UDDI OASIS Standard: http://www.oasis-open.org/specs/index.php#uddiv3.0.2&lt;br /&gt;
* Understanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
* WebServices Testing: http://www.aboutsecurity.net&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Net Square wsPawn&lt;br /&gt;
* [[OWASP_WebScarab_Project|OWASP WebScarab]]: Web Services plugin&lt;br /&gt;
* Mac OSX Soap Client: http://www.ditchnet.org/soapclient&lt;br /&gt;
* Foundstone WsDigger: http://www.foundstone.com/us/resources/proddesc/wsdigger.htm&lt;br /&gt;
* Soaplite: http://www.soaplite.com&lt;br /&gt;
* Perl: http://www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;br /&gt;
* CURL: http://curl.haxx.se&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''On-line tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Web Services Directory: http://www.wsindex.org&lt;br /&gt;
* Seekda: http://seekda.com/&lt;br /&gt;
* UDDI Browser: http://www.soapclient.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Aditya_Balapure&amp;diff=155003</id>
		<title>User:Aditya Balapure</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Aditya_Balapure&amp;diff=155003"/>
				<updated>2013-07-04T07:45:25Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a link to my public profile for all the info-&lt;br /&gt;
in.linkedin.com/in/adityabalapure/&lt;br /&gt;
&lt;br /&gt;
http://packetstormsecurity.com/files/author/10171/&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=155002</id>
		<title>Testing: WS Information Gathering (OWASP-WS-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=155002"/>
				<updated>2013-07-04T07:43:04Z</updated>
		
		<summary type="html">&lt;p&gt;Aditya Balapure: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
==Brief Summary==&lt;br /&gt;
The first step to perform a Web Service Test is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the Web Service.&lt;br /&gt;
&lt;br /&gt;
==Black Box Testing and example==&lt;br /&gt;
'''Zero Knowledge'''&amp;lt;br&amp;gt;&lt;br /&gt;
Normally you will have a WSDL path to access the Web Service, but if you have zero knowledge about it, you will have to use UDDI to find a specific service.&lt;br /&gt;
Web Services have three critical building blocks – UDDI, WSDL and SOAP. There is a third intermediate player facilitating communication between the consumer and supplier, referred to as Universal Business Registry (UBR).&lt;br /&gt;
There are several ways to find our WSDL: the easiest one is to make a search Query in public search engine. For example, if you have to assess an example.com public WS, on google.com you can type:&lt;br /&gt;
&lt;br /&gt;
 inurl:wsdl site:example.com&lt;br /&gt;
&lt;br /&gt;
and you will find all the public Example WSDL.&lt;br /&gt;
Net Square wsPawn is a useful tool that acts as Web Services Consumer and makes a query to the UBR and looks for services as per requirements. Then UBR supplies the list of available services. The Web Services Consumer chooses one or more available services. Next, Web Services Consumer requests an access point or end point for these services. UBR supplies this information. From this moment, Web Services Consumer approaches the Web Services Supplier’s Host/IP address (WSDL) and starts accessing service.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''WSDL endpoints'''&amp;lt;br&amp;gt;&lt;br /&gt;
When a tester accesses the WSDL, he can determine an access point and available interfaces for web services. These interfaces or methods take inputs using SOAP over HTTP/HTTPS. If these inputs are not defined well at the source code level, they can be compromised and exploited.&lt;br /&gt;
For example given this WSDL Endpoint:&lt;br /&gt;
&lt;br /&gt;
 http://www.example.com/ws/FindIP.asmx?WSDL&lt;br /&gt;
&lt;br /&gt;
you can obtain the following description of the Web Services:&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;wsdl:definitions xmlns:http=&amp;quot;http://schemas.xmlsoap.org/wsdl/http/&amp;quot; xmlns:soap=&amp;quot;http://schemas.xmlsoap.org/wsdl/soap/&amp;quot; xmlns:s=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:soapenc=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot; xmlns:tns=&amp;quot;http://example.com/webservices/&amp;quot; xmlns:tm=&amp;quot;http://microsoft.com/wsdl/mime/textMatching/&amp;quot; xmlns:mime=&amp;quot;http://schemas.xmlsoap.org/wsdl/mime/&amp;quot; targetNamespace=&amp;quot;http://example.com/webservices/&amp;quot; xmlns:wsdl=&amp;quot;http://schemas.xmlsoap.org/wsdl/&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:types&amp;gt;&lt;br /&gt;
    &amp;lt;s:schema elementFormDefault=&amp;quot;qualified&amp;quot; targetNamespace=&amp;quot;http://example.com/webservices/&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;s:element name=&amp;quot;GetURLIP&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;s:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;s:sequence&amp;gt;&lt;br /&gt;
            &amp;lt;s:element minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;1&amp;quot; name=&amp;quot;EnterURL&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/s:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;/s:complexType&amp;gt;&lt;br /&gt;
      &amp;lt;/s:element&amp;gt;&lt;br /&gt;
      &amp;lt;s:element name=&amp;quot;GetURLIPResponse&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;s:complexType&amp;gt;&lt;br /&gt;
          &amp;lt;s:sequence&amp;gt;&lt;br /&gt;
            &amp;lt;s:element minOccurs=&amp;quot;0&amp;quot; maxOccurs=&amp;quot;1&amp;quot; name=&amp;quot;GetURLIPResult&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/s:sequence&amp;gt;&lt;br /&gt;
        &amp;lt;/s:complexType&amp;gt;&lt;br /&gt;
      &amp;lt;/s:element&amp;gt;&lt;br /&gt;
      &amp;lt;s:element name=&amp;quot;string&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/s:schema&amp;gt;&lt;br /&gt;
  &amp;lt;/wsdl:types&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:message name=&amp;quot;GetURLIPSoapIn&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:part name=&amp;quot;parameters&amp;quot; element=&amp;quot;tns:GetURLIP&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:message name=&amp;quot;GetURLIPSoapOut&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:part name=&amp;quot;parameters&amp;quot; element=&amp;quot;tns:GetURLIPResponse&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;
  &amp;lt;wsdl:message name=&amp;quot;GetURLIPHttpGetIn&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;wsdl:part name=&amp;quot;EnterURL&amp;quot; type=&amp;quot;s:string&amp;quot; /&amp;gt;&lt;br /&gt;
……&lt;br /&gt;
  &amp;lt;/wsdl:service&amp;gt;&lt;br /&gt;
&amp;lt;/wsdl:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This WS simply receives in input a logical name (EnterURL) and gives in output the relative IP Address. So we have GetURLIP as method for the WS and EnterURL (string) as input.&lt;br /&gt;
In that manner we have identified the WS entry point and we are ready to test it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Services Discovery'''&amp;lt;br&amp;gt;&lt;br /&gt;
Web Services consumer needs a simple and standardized way to find Web Services available from remote servers.&lt;br /&gt;
There are two ways to discover a Web Service, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can discover the URL's WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For instance, with an HTTP query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain the following DISCO descriptor:&lt;br /&gt;
&amp;lt;br&amp;gt;&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;discovery xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://schemas.xmlsoap.org/disco/&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;contractRef ref=&amp;quot;http://myexample.com/MyexampleService.asmx?wsdl&amp;quot; docRef=&amp;quot;http://myexample.com/myexample.asmx&amp;quot; xmlns=&amp;quot;http://schemas.xmlsoap.org/disco/scl/&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;soap address=&amp;quot;http://myexample.com/MyexampleService.asmx&amp;quot; xmlns:q1=&amp;quot;http://myexample.com/terraserver/&amp;quot; binding=&amp;quot;q1:myexampleServiceSoap&amp;quot; xmlns=&amp;quot;http://schemas.xmlsoap.org/disco/soap/&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/discovery&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We can see in the above XML document we have a reference for a WSDL document, where we can obtain a description of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft technology, UDDI (Universal Description, Discovery and Integration) is an OASIS standard . &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''WS Well Known Naming'''&amp;lt;br&amp;gt;&lt;br /&gt;
Common Web Services  platforms have a naming convention for offering a WSDL documents: This naming convention can be used to retrieve WSDL via URIs probing or through queries to web search server.&lt;br /&gt;
 &lt;br /&gt;
Some URLs that we can use are, for example:&lt;br /&gt;
&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;.wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename&amp;gt;.aspx?wsdl &lt;br /&gt;
 &amp;lt;br&amp;gt;instead of .aspx extension we can also use .ascx, .asmx, .ashx extensions &lt;br /&gt;
 &amp;lt;br&amp;gt;Same thing with ?disco instead of ?wsdl&lt;br /&gt;
&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.dll&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.exe&amp;gt;?wsdl &lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.php&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;servicename.pl&amp;gt;?wsdl&lt;br /&gt;
&lt;br /&gt;
For Apache Axis we can try:&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/axis/services/&amp;lt;servicename&amp;gt;?wsdl&lt;br /&gt;
 http://&amp;lt;webservice-host&amp;gt;:&amp;lt;port&amp;gt;/axis/services/&amp;lt;service-name&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Search for public Web Services'''&amp;lt;br&amp;gt;&lt;br /&gt;
The seekda Web Services Search Engine can help to find a public Web Services with related descriptions. &lt;br /&gt;
To find Web Services just type the keyword into seekda Web Services Search Engine. We can also browse by several other criteria such as Tag Cloud, Services by Countries, Most Used Services.&lt;br /&gt;
http://seekda.com&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:seekda.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Another Web Server with good links and Resources is WSindex (http://www.wsindex.org).&lt;br /&gt;
&lt;br /&gt;
[[Image:wsindex.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
''' UDDI Browser''' &amp;lt;br&amp;gt;&lt;br /&gt;
A web server that provides a very useful UDDI on-line tool for to browse and search public UDDI resource in offered from http://www.soapclient.com.&amp;lt;br&amp;gt;&lt;br /&gt;
We can see we can use two operators, Microsoft and XMethods&lt;br /&gt;
&lt;br /&gt;
[[Image:uddi_browser_part.jpg]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The server offers, for example, to search all UDDI with a specific string in business names, service names or service types.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Advanced UDDI browsing'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can search private UDDI registries using the Advanced feature of UDDI browser.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:uddi_browser.jpg]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This service allows interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods to allow you to discover web services and useful links to other resources.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Command line interaction'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes it is useful to interact with webservices from a command line. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Simple SOAP Client - SOAPClient4XG&amp;lt;br&amp;gt;&lt;br /&gt;
SOAPClient4XG is a SOAP Client for XML which allows you to make a SOAP request from command line, for example:&lt;br /&gt;
 &lt;br /&gt;
 java -jar SOAPClient4XG http://api.google.com/search/beta2  my_sample_search.xml&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CURL&amp;lt;br&amp;gt;&lt;br /&gt;
We can also use a Webservice using CURL.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 curl --request POST --header “Content-type: text/xml &amp;lt;br&amp;gt;&lt;br /&gt;
       --data @my_request.xml http://api.google.com/search/beta2&amp;lt;br&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
Perl - SOAPlite&amp;lt;br&amp;gt;&lt;br /&gt;
With Perl and SOAP::lite modules we can create a scripts to automatize a SOAP request.&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''SOAP XML File'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To invoke web services from command line, we can create a SOAP request file &lt;br /&gt;
similar to the following one, and then use CURL to submit it to server.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;SOAP-ENV:Envelope&lt;br /&gt;
  xmlns:SOAP-ENV=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;&lt;br /&gt;
  SOAP-ENV:encodingStyle=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;SOAP-ENV:Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;m:GetZip xmlns:m=&amp;quot;http://namespaces.example.com&amp;quot;&amp;gt;    &lt;br /&gt;
     &amp;lt;country&amp;gt;Italy&amp;lt;/country&amp;gt;&lt;br /&gt;
     &amp;lt;city&amp;gt;Roma&amp;lt;/city&amp;gt;&lt;br /&gt;
   &amp;lt;/m:GetZip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/SOAP-ENV:Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/SOAP-ENV:Envelope&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Creating a malformed XML file we can test a Webservices for a typical attack as the following:&amp;lt;br&amp;gt;&lt;br /&gt;
-oversized XML Tag&amp;lt;br&amp;gt;&lt;br /&gt;
-nested or recursive declarations&amp;lt;br&amp;gt;&lt;br /&gt;
-parameter attack&amp;lt;br&amp;gt;&lt;br /&gt;
-authentication testing&amp;lt;br&amp;gt;&lt;br /&gt;
-XSS&amp;lt;br&amp;gt;&lt;br /&gt;
-SQL Injection&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* DISCO: http://msdn.microsoft.com/en-us/magazine/cc302073.aspx&lt;br /&gt;
* UDDI OASIS Standard: http://www.oasis-open.org/specs/index.php#uddiv3.0.2&lt;br /&gt;
* Understanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
* WebServices Testing: http://www.aboutsecurity.net&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Net Square wsPawn&lt;br /&gt;
* [[OWASP_WebScarab_Project|OWASP WebScarab]]: Web Services plugin&lt;br /&gt;
* Mac OSX Soap Client: http://www.ditchnet.org/soapclient&lt;br /&gt;
* Foundstone WsDigger: http://www.foundstone.com/us/resources/proddesc/wsdigger.htm&lt;br /&gt;
* Soaplite: http://www.soaplite.com&lt;br /&gt;
* Perl: http://www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;br /&gt;
* CURL: http://curl.haxx.se&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''On-line tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Web Services Directory: http://www.wsindex.org&lt;br /&gt;
* Seekda: http://seekda.com/&lt;br /&gt;
* UDDI Browser: http://www.soapclient.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;/div&gt;</summary>
		<author><name>Aditya Balapure</name></author>	</entry>

	</feed>