<?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=Mmella</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=Mmella"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Mmella"/>
		<updated>2026-05-05T19:03:25Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Working_Session_Top_10_2009&amp;diff=49545</id>
		<title>OWASP Working Session Top 10 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Working_Session_Top_10_2009&amp;diff=49545"/>
				<updated>2008-12-18T14:45:12Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Working Session Participants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#b3b3b3; color:white&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;'''Working Sessions Operational Rules''' - [[:Working Sessions Methodology|'''Please see here the general frame of rules''']].&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''WORKING SESSION IDENTIFICATION''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Work Session Name'''&lt;br /&gt;
 | colspan=&amp;quot;6&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;'''OWASP Top 10 2009'''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;| '''Short Work Session Description''' &lt;br /&gt;
 | colspan=&amp;quot;6&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|Aims to provide a key awareness document for web application security.&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;| '''Related Projects (if any)''' &lt;br /&gt;
 | colspan=&amp;quot;6&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|[[:Category:OWASP Top Ten Project|OWASP Top Ten Project]]&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Email Contacts &amp;amp; Roles'''&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''Chair'''&amp;lt;br&amp;gt;[mailto:dave.wichers(at)owasp.org '''Dave Wichers''']&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''Secretary'''&amp;lt;br&amp;gt;[mailto:jeff.williams(at)owasp.org '''Jeff Williams''']&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''Mailing list'''&amp;lt;br&amp;gt;[https://lists.owasp.org/mailman/listinfo/owasp-topten '''Subscription Page''']&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''WORKING SESSION SPECIFICS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Objectives'''&lt;br /&gt;
 | colspan=&amp;quot;6&amp;quot; style=&amp;quot;width:85%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;&lt;br /&gt;
* Discuss current Top10 structure and objectives,&lt;br /&gt;
* Identify which information sources will be considered for analysis, Eg:&lt;br /&gt;
** MITRE&lt;br /&gt;
** Compromise DB's (Attrition, WASC etc) and bias due to reporting&lt;br /&gt;
** Anonomised penetration test results and the difficulty in obtaining&lt;br /&gt;
* Define methodology to collect attacks statistics,&lt;br /&gt;
* Define prioritisation approach&lt;br /&gt;
** Agree weighting between current or emerging threats&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|'''Venue/Date&amp;amp;Time/Model'''&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''Venue'''&amp;lt;br&amp;gt;[[:OWASP EU Summit 2008|OWASP EU Summit Portugal 2008]] &lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''Date&amp;amp;Time'''&amp;lt;br&amp;gt;November 5 &amp;amp; 7, 2008&amp;lt;br&amp;gt;Time TBD&lt;br /&gt;
 | style=&amp;quot;width:25%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''Discussion Model'''&amp;lt;br&amp;gt;&amp;quot;Participants + Attendees&amp;quot;&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:white; color:white&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''WORKING SESSION OPERATIONAL RESOURCES''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:100%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Please add here, ASAP, any needed relevant resources, e.g. data-show, boards, laptops, etc.&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:white; color:white&amp;quot;|&amp;lt;font color=&amp;quot;black&amp;quot;&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''WORKING SESSION ADDITIONAL DETAILS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:100%; background:#cccccc&amp;quot; align=&amp;quot;left&amp;quot;|Please add here, any additional notes, links, ideas, guidelines, etc... The objective is to help the working sessions participants and attendees to prepare their participation/contribution.&lt;br /&gt;
&lt;br /&gt;
Potential Resources:&lt;br /&gt;
&lt;br /&gt;
* [http://cve.mitre.org/cve/ MITRE's Common Vulnerability Enumeration (CVE) Database]&lt;br /&gt;
&lt;br /&gt;
* The [http://www.webappsec.org/projects/whid/whid.shtml WASC Web Hacking Incidents Database]&lt;br /&gt;
&lt;br /&gt;
* The [http://www.webappsec.org/projects/statistics/ 2007 WASC Web Application Security Statistics Report]&lt;br /&gt;
 |}&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|'''WORKING SESSION OUTCOMES''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#6C82B5&amp;quot; align=&amp;quot;center&amp;quot;|Statements, Initiatives or Decisions &lt;br /&gt;
 | style=&amp;quot;width:46%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''Proposed by Working Group''' &lt;br /&gt;
 | style=&amp;quot;width:47%; background:#b3b3b3&amp;quot; align=&amp;quot;center&amp;quot;|'''Approved by OWASP Board'''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;| &lt;br /&gt;
 | style=&amp;quot;width:46%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|The sources of input for the 2009 Top 10 will be identified.&lt;br /&gt;
 | style=&amp;quot;width:47%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|After the Board Meeting - fill in here. &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;| &lt;br /&gt;
 | style=&amp;quot;width:46%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|The ordering scheme for the Top 10 will be determined.&lt;br /&gt;
 | style=&amp;quot;width:47%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|After the Board Meeting - fill in here. &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:46%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|Discussion of whether the existing document structure should be maintained or adjusted.&lt;br /&gt;
 | style=&amp;quot;width:47%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|After the Board Meeting - fill in here. &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:46%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|[http://uk.youtube.com/watch?v=GsRbpshqqII Video]&lt;br /&gt;
 | style=&amp;quot;width:47%; background:#C2C2C2&amp;quot; align=&amp;quot;center&amp;quot;|After the Board Meeting - fill in here. &lt;br /&gt;
 |}&lt;br /&gt;
== Working Session Participants ==&lt;br /&gt;
(Add your name by editing this table. On the right, just above this frame, you have the option to edit)&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
 ! colspan=&amp;quot;7&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background:#4058A0; color:white&amp;quot;|&amp;lt;font color=&amp;quot;white&amp;quot;&amp;gt;'''WORKING SESSION PARTICIPANTS''' &lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''Name'''&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''Company'''&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|'''Notes &amp;amp; reason for participating, issues to be discussed/addressed'''&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|1&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Paolo Perego&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Spike Reply&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|As penetration tester it woud be great to me to participating in writing the new Top 10. As code reviewer and Orizon project leader it would be very interesting in scouting dynamic threats in order to add some dynamic feature to my tool.&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|2&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|David Campbell&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|OWASP Denver&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
 |-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|3&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Robert Mann&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|RBS / ABN AMRO&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|4&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Troy Leach&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|[https://www.pcisecuritystandards.org/ PCI Security Standards Council]&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Technical Director&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|5&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Eoin Keary&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Ernst &amp;amp; Young. Long time OWASP member (Code and Testing guides)&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|6&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Matteo Meucci&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Minded Security&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| I'd like to discuss about a new way to create the Top10 from the OWASP Community&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|7&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Giorgio Fedon&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Minded Security&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|8&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Andrea Cogliati&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|OWASP Rochester, NY&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|I volunteered as a technical writer&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|9&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Christian Martorella&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|S21sec&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Interested in participating on the creating the Top 10, share some ideas.&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|10&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Nishi Kumar&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Systems Architect (FIS) Global Web Development Group&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;|Interested in participating and sharing ideas&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|11&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Tom Brennan&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| OWASP/WhiteHat Security&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Want to discuss some of the stats we can share with OWASP&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|12&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Georg Hess&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| OWASP Germany&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| mainly to get some insight into the process&lt;br /&gt;
 |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|12&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Arturo 'Buanzo' Busleiman&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Independent&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Expert Contributor for SANS TOP20 since 2005. want to contribute here.&lt;br /&gt;
 |&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|12&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Fabio Cerullo&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| AIB&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Interested in participating on the creation of the Top 10, share some ideas.&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|12&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Sébastien Gioria&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| OWASP France&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Interested in reviewing and give some Point of View frome France ans some pentesting made here. Also interessted to translate it as soon as possible for our France Market.&lt;br /&gt;
|-&lt;br /&gt;
 | style=&amp;quot;width:7%; background:#7B8ABD&amp;quot; align=&amp;quot;center&amp;quot;|13&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Marco Mella&lt;br /&gt;
 | style=&amp;quot;width:15%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| Independent&lt;br /&gt;
 | style=&amp;quot;width:63%; background:#cccccc&amp;quot; align=&amp;quot;center&amp;quot;| &lt;br /&gt;
&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP_Working_Session]]&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=40694</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=40694"/>
				<updated>2008-09-21T09:07:22Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box Testing and example */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
how we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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 provide 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;
How we can see we can use two operator 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 service offer, for example, to search all UDDI with a specific string in business names, service name 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 Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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 a web services from command line, we can create a SOAP request file &lt;br /&gt;
similar to the following one an 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;
* Undestanding 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.soapcliet.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Testing_Guide_v3_Table_of_Contents&amp;diff=40140</id>
		<title>OWASP Testing Guide v3 Table of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Testing_Guide_v3_Table_of_Contents&amp;diff=40140"/>
				<updated>2008-09-16T08:06:57Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* 4. (M.Meucci) Web Application Penetration Testing  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
This is the draft of table of content of the New Testing Guide.&lt;br /&gt;
You can download the stable version [http://www.owasp.org/index.php/Image:OWASP_Testing_Guide_v2_pdf.zip here] &lt;br /&gt;
&lt;br /&gt;
Back to the OWASP Testing Guide Project:&lt;br /&gt;
http://www.owasp.org/index.php/OWASP_Testing_Project&lt;br /&gt;
&lt;br /&gt;
 Testing Guide v3 (draft)&lt;br /&gt;
 Updated: 15th September 2008&lt;br /&gt;
&lt;br /&gt;
'''T A B L E    o f    C O N T E N T S'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==[[Testing Guide Foreword|(toimp)Foreword by OWASP Chair]]==&lt;br /&gt;
&lt;br /&gt;
==[[Testing Guide Frontispiece |(toimp: M.Meucci)1. Frontispiece]]==&lt;br /&gt;
&lt;br /&gt;
'''[[Testing Guide Frontispiece|(toimp: M.Meucci)1.1 About the OWASP Testing Guide Project]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[About The Open Web Application Security Project|1.2 About The Open Web Application Security Project]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Testing Guide Introduction|2. Introduction]]==&lt;br /&gt;
&lt;br /&gt;
'''2.1 The OWASP Testing Project'''&lt;br /&gt;
&lt;br /&gt;
'''2.2 Principles of Testing'''&lt;br /&gt;
&lt;br /&gt;
'''2.3 Testing Techniques Explained''' &lt;br /&gt;
&lt;br /&gt;
(new: M. Morana 100%) 2.4 [https://www.owasp.org/index.php/Testing_Guide_Introduction#Security_Requirements_Test_Derivation Security requirements test derivation],[https://www.owasp.org/index.php/Testing_Guide_Introduction#Functional_and_Non_Functional_Test_Requirements functional and non functional test requirements], and [https://www.owasp.org/index.php/Testing_Guide_Introduction#Test_Cases_Through_Use_and_Misuse_Cases test cases through use and misuse cases]&lt;br /&gt;
&lt;br /&gt;
(new: M. Morana 100%) 2.4.1 [https://www.owasp.org/index.php/Testing_Guide_Introduction#Security_Tests_Integrated_in_Developers_and_Testers_Workflow Security tests integrated in developers and testers workflows]&lt;br /&gt;
&lt;br /&gt;
(new: M. Morana 100%) 2.4.2 [https://www.owasp.org/index.php/Testing_Guide_Introduction#Developers.27_Security_Tests Developers' security tests: unit tests and component level tests]&lt;br /&gt;
&lt;br /&gt;
(new: M. Morana 100%) 2.4.3 [https://www.owasp.org/index.php/Testing_Guide_Introduction#Functional_Testers.27_Security_Tests Functional testers' security tests: integrated system tests, tests in UAT, and production environment]&lt;br /&gt;
&lt;br /&gt;
(new: M. Morana 100%) 2.5 [https://www.owasp.org/index.php/Testing_Guide_Introduction#Security_Test_Data_Analysis_and_Reporting Security test data analysis and reporting: root cause identification and business/role case test data reporting]&lt;br /&gt;
&lt;br /&gt;
==[[The OWASP Testing Framework|3. The OWASP Testing Framework]]==&lt;br /&gt;
&lt;br /&gt;
'''3.1. Overview'''&lt;br /&gt;
&lt;br /&gt;
'''3.2. Phase 1: Before Development Begins '''&lt;br /&gt;
&lt;br /&gt;
'''3.3. Phase 2: During Definition and Design'''&lt;br /&gt;
&lt;br /&gt;
'''3.4. Phase 3: During Development'''&lt;br /&gt;
&lt;br /&gt;
'''3.5. Phase 4: During Deployment'''&lt;br /&gt;
&lt;br /&gt;
'''3.6. Phase 5: Maintenance and Operations'''&lt;br /&gt;
&lt;br /&gt;
'''3.7. A Typical SDLC Testing Workflow '''&lt;br /&gt;
&lt;br /&gt;
==[[Web Application Penetration Testing |4. (M.Meucci) Web Application Penetration Testing ]]==&lt;br /&gt;
&lt;br /&gt;
[[Testing: Introduction and objectives|'''4.1 Introduction and Objectives''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing Checklist| (new: M.Meucci - 100% ) 4.1.1 Testing Checklist]]&lt;br /&gt;
&lt;br /&gt;
[[Testing: Information Gathering|'''4.2 Information Gathering''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing: Spiders Robots and Crawlers|(C.Heinrich)4.2.1 Spiders, Robots and Crawlers]]&lt;br /&gt;
&lt;br /&gt;
[[Testing: Search engine discovery|(C.Heinrich)4.2.2 Search Engine Discovery/Reconnaissance]]&lt;br /&gt;
&lt;br /&gt;
[[Testing: Identify application entry points| (new: K.Horvath - 100%) 4.2.3 Identify application entry points]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Web Application Fingerprint|4.2.4 Testing for Web Application Fingerprint]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Application Discovery|4.2.5 Application Discovery]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Error Code|4.2.6 Analysis of Error Codes]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for configuration management|''' (new) 4.3 Configuration Management Testing''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for SSL-TLS| 4.3.1 SSL/TLS Testing (SSL Version, Algorithms, Key length, Digital Cert. Validity)]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Testing for DB Listener|4.3.2 DB Listener Testing]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for infrastructure configuration management| (new) 4.3.3 Infrastructure Configuration Management Testing]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for application configuration management|4.3.4 Application Configuration Management Testing]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for file extensions handling|4.3.5 Testing for File Extensions Handling]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for old_file|4.3.6 Old, Backup and Unreferenced Files]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Admin Interfaces|(imp: A. Goodman - 100%) 4.3.7 Infrastructure and Application Admin Interfaces]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for HTTP Methods and XST| (imp: A. van der Stock - 100%)4.3.8 Testing for HTTP Methods and XST]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for business logic|'''(K.Horvath - 100%) 4.4 Business Logic Testing''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for authentication|'''(M.Meucci - 100%) 4.5 Authentication Testing''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for credentials transport|(new: G.Ingrosso - 100%) 4.5.1 Credentials transport over an encrypted channel]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for user enumeration|(new: M.Meucci, M.Mella - 100%) 4.5.2 Testing for user enumeration]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Default or Guessable User Account|(K.Horvath - 100% - adam updated) 4.5.3 Testing for Guessable (Dictionary) User Account]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Brute Force|4.5.4 Brute Force Testing]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Bypassing Authentication Schema|4.5.5 Testing for bypassing authentication schema]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Vulnerable Remember Password and Pwd Reset|4.5.6 Testing for vulnerable remember &lt;br /&gt;
password and pwd reset]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Logout and Browser Cache Management|4.5.7 Testing for Logout and Browser Cache Management Testing]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Captcha|(new: P.Luptak - 100% ) 4.5.8 Testing for CAPTCHA]]&lt;br /&gt;
&lt;br /&gt;
[[Testing Multiple Factors Authentication| (new: G.Fedon - 100%) 4.5.9 Testing Multiple Factors Authentication]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Race Conditions| (new: A. Goodman - 100%) 4.5.10 Testing for Race Conditions]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Authorization|'''(new: M.Meucci - 100%) 4.6 Authorization testing''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Path Traversal|(new) 4.6.1 Testing for path traversal]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Bypassing Authorization Schema|(new: M.Meucci - 100%)4.6.2 Testing for bypassing authorization schema]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Privilege escalation|(new: Cecil Su, M.Meucci - 100%)4.6.3 Testing for Privilege Escalation]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Session Management|'''4.7 Session Management Testing''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Session_Management_Schema|(new: M.Meucci - 100%) 4.7.1 Testing for Session Management Schema]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for cookies attributes| (new: K.Horvath - 100%) 4.7.2 Testing for Cookies attributes]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Session Fixation| (M.Meucci - 100% (updated by adam)) 4.7.3 Testing for Session Fixation]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Exposed Session Variables|4.7.4 Testing for Exposed Session Variables ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for CSRF|4.7.5 Testing for CSRF]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for HTTP Exploit|4.7.6 Testing for HTTP Exploit ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Data Validation|'''4.8 Data Validation Testing''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Reflected Cross site scripting|(new: A. Coronel -100%)4.8.1 Testing for Reflected Cross Site Scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Stored Cross site scripting|(new: R. Suggi Liverani - 100%)4.8.2 Testing for Stored Cross Site Scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for DOM-based Cross site scripting|(new: A.Agarwwal, Kuza55 - 80%) 4.8.3 Testing for DOM based Cross Site Scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Cross site flashing|(new:S.Di Paola - 100%)4.8.4 Testing for Cross Site Flashing]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for SQL Injection| 4.8.5 Testing for SQL Injection ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Oracle|4.8.5.1 Oracle Testing ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for MySQL|4.8.5.2 MySQL Testing ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for SQL Server|4.8.5.3 SQL Server Testing]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for MS Access|(new:A.Parata - 100%) 4.8.5.4 MS Access Testing]]&lt;br /&gt;
&lt;br /&gt;
[[OWASP_Backend_Security_Project_Testing_PostgreSQL|4.8.5.5 (new: D.Bellucci 100% from OWASP BSP) Testing PostgreSQL]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for LDAP Injection|4.8.6 Testing for LDAP Injection]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for ORM Injection|4.8.7 Testing for ORM Injection]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for XML Injection|4.8.8 Testing for XML Injection]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for SSI Injection|4.8.9 Testing for SSI Injection]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for XPath Injection|4.8.10 Testing for XPath Injection]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for IMAP/SMTP Injection|4.8.11 IMAP/SMTP Injection]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Code Injection|4.8.12 Testing for Code Injection]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Command Injection|4.8.13 Testing for Command Injection]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Buffer Overflow|4.8.14 Testing for Buffer overflow]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Heap Overflow|4.8.14.1 Testing for Heap overflow]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Stack Overflow|4.8.14.2 Testing for Stack overflow]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Format String|4.8.14.3 Testing for Format string]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Incubated Vulnerability|4.8.15 Testing for incubated vulnerabilities]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Denial of Service|'''4.9 Testing for Denial of Service''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for SQL Wildcard Attacks|(new: F.Mavituna - 100%) 4.9.1 Testing for SQL Wildcard Attacks]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for DoS Locking Customer Accounts|4.9.2 Testing for DoS Locking Customer Accounts]]	&lt;br /&gt;
&lt;br /&gt;
[[Testing for DoS Buffer Overflows|4.9.3 Testing for DoS Buffer Overflows]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for DoS User Specified Object Allocation|4.9.4 Testing for DoS User Specified Object Allocation]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for User Input as a Loop Counter|4.9.5 Testing for User Input as a Loop Counter]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Writing User Provided Data to Disk|4.9.6 Testing for Writing User Provided Data to Disk]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for DoS Failure to Release Resources|4.9.7 Testing for DoS Failure to Release Resources]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Storing too Much Data in Session|4.9.8 Testing for Storing too Much Data in Session]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Web Services|(toimp: M.Meucci -100%) '''4.10 Web Services Testing''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing: WS Information Gathering|(new: M.Meucci, M.Mella -100%) 4.10.1 WS Information Gathering]]&lt;br /&gt;
&lt;br /&gt;
[[Testing WSDL|(new: M.Meucci, M.Mella -100%) 4.10.2 Testing WSDL]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for XML Structural|(toimp: M.Meucci, M.Mella -100%)4.10.3 XML Structural Testing ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for XML Content-Level|4.10.4 XML Content-level Testing ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for WS HTTP GET parameters/REST attacks|4.10.5 HTTP GET parameters/REST Testing ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for Naughty SOAP Attachments|4.10.6 Naughty SOAP attachments ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for WS Replay|4.10.7 Replay Testing ]]&lt;br /&gt;
&lt;br /&gt;
[[Testing_for_AJAX:_introduction|'''4.11 AJAX Testing''']]&lt;br /&gt;
&lt;br /&gt;
[[Testing for AJAX Vulnerabilities|4.11.1 AJAX Vulnerabilities]]&lt;br /&gt;
&lt;br /&gt;
[[Testing for AJAX|4.11.2 How to test AJAX]]&lt;br /&gt;
&lt;br /&gt;
==[[Writing Reports: value the real risk |(toimp: Mat)5. Writing Reports: value the real risk ]]==&lt;br /&gt;
&lt;br /&gt;
[[How to value the real risk |5.1 How to value the real risk]]&lt;br /&gt;
&lt;br /&gt;
[[How to write the report of the testing |5.2 How to write the report of the testing]]&lt;br /&gt;
&lt;br /&gt;
==[[Appendix A: Testing Tools |Appendix A: Testing Tools ]]==&lt;br /&gt;
&lt;br /&gt;
* Black Box Testing Tools&lt;br /&gt;
* Source Code Analyzers&lt;br /&gt;
* Other Tools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[OWASP Testing Guide Appendix B: Suggested Reading | Appendix B: Suggested Reading]]==&lt;br /&gt;
* Whitepapers&lt;br /&gt;
* Books&lt;br /&gt;
* Useful Websites&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[OWASP Testing Guide Appendix C: Fuzz Vectors | Appendix C: Fuzz Vectors]]==&lt;br /&gt;
&lt;br /&gt;
* Fuzz Categories&lt;br /&gt;
** Recursive fuzzing&lt;br /&gt;
** Replasive fuzzing&lt;br /&gt;
* Cross Site Scripting (XSS)&lt;br /&gt;
* Buffer Overflows and Format String Errors&lt;br /&gt;
** Buffer Overflows (BFO)&lt;br /&gt;
** Format String Errors (FSE)&lt;br /&gt;
** Integer Overflows (INT)&lt;br /&gt;
* SQL Injection&lt;br /&gt;
** Passive SQL Injection (SQP)&lt;br /&gt;
** Active SQL Injection (SQI)&lt;br /&gt;
* LDAP Injection&lt;br /&gt;
* XPATH Injection&lt;br /&gt;
&lt;br /&gt;
==[[OWASP Testing Guide Appendix D: Encoded Injection | (new: Harish Sureddy)Appendix D: Encoded Injection]]==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Testing Project]]&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=39955</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=39955"/>
				<updated>2008-09-15T07:38:51Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* References */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
how we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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 provide 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;
How we can see we can use two operator 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 service offer, for example, to search all UDDI with a specific string in business names, service name 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 Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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 a web services from command line, we can create a SOAP request file &lt;br /&gt;
similar to the following one an 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;
&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;
* Undestanding 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.soapcliet.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=39766</id>
		<title>Testing for User Enumeration and Guessable User Account (OWASP-AT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=39766"/>
				<updated>2008-09-14T14:10:33Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
The scope of this test is to verify if it is possible to collect a set of valid usernames by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
Often, web applications reveal when a username exists on system, either as a consequence of a misconfiguration or as a design decision. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;br /&gt;
The information obtained can be used by an attacker to gain a list of users on system. This information can be used to attack the web application, for example, through a brute force or default username/password attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
The tester should interact with the authentication mechanism of the application to understand if sending particular requests causes the application to answer in different manners. This issue exists because the information released from web application or web server, when we provide a valid username is different than when we use an invalid one.&lt;br /&gt;
&lt;br /&gt;
In some cases, we can receive a message that reveals if the provided credentials are wrong because an invalid username or an invalid password was used. Sometimes, we can enumerate the existing users by sending a username and an empty password. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In a black box testing, we know nothing about the specific application, username, application logic and error messages on login page, or password recovery facilities.&lt;br /&gt;
If the applications is vulnerable, we receive a response message that reveals, directly or indirectly, some information useful for enumerating users. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''HTTP Response message''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for Valid user/right password''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Record the server answer when you submit a valid userID and valid password.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this successful authentication (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing for valid user/wrong password''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert a valid userID and a wrong password and record the error message generated by the application.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
From the browser we will expect message similar to the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:AuthenticationFailed.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or something like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:NoConfFound.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
against any message that reveals the existence of user, for instance, message similar to:&amp;lt;br&amp;gt; 	&lt;br /&gt;
 Login for User foo: invalid password&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using WebScarab, notice the information retrieved from this unsuccessful authentication attempt (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for a nonexistent username''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert an invalid userID and a wrong password and record the server answer (you should be confident that the username is not valid in the application). Record the error message and the server answer.&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If we enter a nonexistent userID, we can receive a message similar to:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Userisnotactive.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
or message like the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
 Login failed for User foo: invalid Account&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally the application should respond with the same error message and length to the different wrong requests. If you notice that the responses are not the same, you should investigate and find out the key that creates a difference between the 2 responses. For example: &lt;br /&gt;
* Client request: Valid user/wrong password --&amp;gt; Server answer:'The password is not correct'&lt;br /&gt;
* Client request: Wrong user/wrong password --&amp;gt; Server answer:'User not recognized'&lt;br /&gt;
The above responses let the client understand that for the first request we have a valid user name. So we can interact with the application requesting a set of possible userIDs and observing the answer.&amp;lt;br&amp;gt;&lt;br /&gt;
Looking at the second server response, we understand in the same way that we don't hold a valid username. So we can interact in the same manner and create a list of valid userID looking at the server answers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Other ways to enumerate users''' &amp;lt;br&amp;gt;&lt;br /&gt;
We can enumerate users in several ways, such as: &amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing the error code received on login pages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Some web application release a specific error code or message that we can analyze.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing URLs, and URLs redirections'''&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=baduser&amp;amp;Error=0&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=gooduser&amp;amp;Error=2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see above, when we provide a userID and password to the web application, we see a message indication that an error has occurred in the URL. &lt;br /&gt;
In the first case we has provided a bad userID and bad password. In the second, a good user and bad password, so we can identify a valid userID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- URI Probing'''&amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes a web server responds differently if it receives a request for an existing directories or not. For instance in some portals every user is associated with a directory, if we try to access an existing  directory we could receive a web server error.&lt;br /&gt;
A very common errors that we can receive from web server is:&amp;lt;br&amp;gt;&lt;br /&gt;
   403 Forbidden error code &lt;br /&gt;
and &amp;lt;br&amp;gt;&lt;br /&gt;
   404 Not found error code&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/account1 - we receive from web server: 403 Forbidden &lt;br /&gt;
 http://www.foo.com/account2 - we receive from web server: 404 file Not Found&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In first case the user exists, but we cannot view the web page, in second case instead the user “account2” doesn’t exist.&lt;br /&gt;
Collecting this information we can enumerate the users.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing Web page Title'''&amp;lt;br&amp;gt;&lt;br /&gt;
We can receive useful information on Title of web page, where we can obtain a specific error code or messages that reveal if the problems are on username or password.&lt;br /&gt;
For instance, if we cannot authenticate to an application and receive a web page whose title is similar to:&lt;br /&gt;
 Invalid user&lt;br /&gt;
 Invalid authentication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing message received from recovery facilities'''&amp;lt;br&amp;gt; &lt;br /&gt;
When we use a recovery facilities the applications that is vulnerable could return a message that reveala if a username exists or not.&lt;br /&gt;
&lt;br /&gt;
For example, message similar to the following:&amp;lt;br&amp;gt;&lt;br /&gt;
 Invalid username: e-mail address are not valid or The specified user was not found&lt;br /&gt;
&lt;br /&gt;
 Valid username: Your recovery password has been successfully sent&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''- Friendly 404 Error Message'''&amp;lt;br&amp;gt;&lt;br /&gt;
When we request for a user within the directory that does not exist, we don't always receive 404 error code. Instead, we may receive “200 ok” with an image, in this case we can assume that when we receive the specific image the users doesn’t exist. This logic can be applied to other web server response; the trick is a good analysis of web server and web application messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Guessing Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
In some cases the userIDs are created with specific policies of administrator or company.  &lt;br /&gt;
For example we can view a users with a userID created in sequential order:&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000100&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000101&amp;lt;br&amp;gt;&lt;br /&gt;
		…. &amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes the username are created with a REALM alias and then a sequential numbers:&amp;lt;br&amp;gt;&lt;br /&gt;
		R1001 – user 001 for REALM1&amp;lt;br&amp;gt;&lt;br /&gt;
	 	R2001 – user 001 for REALM2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Other possibilities are userIDs associated with credit card numbers, or in general a numbers with a pattern. &lt;br /&gt;
In the above sample we can create simple shell scripts that compose UserIDs and submit a request with tool like wget to automate a web query to discern valid userIDs.&lt;br /&gt;
To create a script we can use also Perl and CURL. &lt;br /&gt;
  &lt;br /&gt;
Again, we can guess a username from the information received from an LDAP query or from a google information gathering for example from a specific domain.&lt;br /&gt;
Google for example can help to find domain users through a specific queries or through a simple shell script or tool.&lt;br /&gt;
&lt;br /&gt;
For other information on guessing for userIDs see next paragraph 4.5.3 Testing for Guessable (Dictionary) User Account.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Attention:''' by enumerating user accounts, you risk to lock out accounts after a predefined number of failed probes (based on application policy). Also, sometimes, our IP address can be banned by dynamic rules on the application firewall.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Authentication error messages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the application answers in the same manner for every client request that produces a failed authentication. For this issue the Black Box testing and  Gray Box testing have the same concept based on the analysis of messages or error codes received from web application.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The application should answer in the same manner for every failed attempt of authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
For Example: &amp;lt;br&amp;gt;&lt;br /&gt;
 Credentials submitted are not valid&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
Marco Mella, ''Sun Java Access &amp;amp; Identity Manager Users enumeration: http://www.aboutsecurity.net&amp;lt;br&amp;gt;''&lt;br /&gt;
''Username Enumeration Vulnerabilities: http://www.gnucitizen.org/blog/username-enumeration-vulnerabilities&amp;lt;br&amp;gt;'' &lt;br /&gt;
&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab: [[OWASP_WebScarab_Project]]&lt;br /&gt;
* CURL: http://curl.haxx.se/&lt;br /&gt;
* PERL: http://www.perl.org&lt;br /&gt;
* Sun Java Access &amp;amp; Identity Manager users enumeration tool: http://www.aboutsecurity.net&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=39620</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=39620"/>
				<updated>2008-09-13T19:24:51Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box Testing and example */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
how we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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 provide 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;
How we can see we can use two operator 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 service offer, for example, to search all UDDI with a specific string in business names, service name 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 Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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 a web services from command line, we can create a SOAP request file &lt;br /&gt;
similar to the following one an 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;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
* Undestanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Resource'''&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.soapcliet.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Soaplite: www.soaplite.com&lt;br /&gt;
* Perl: www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=39614</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=39614"/>
				<updated>2008-09-13T06:57:29Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box Testing and example */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
how we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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 provide 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;
How we can see we can use two operator 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 service offer, for example, to search all UDDI with a specific string in business names, service name 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 Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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;
For create a basic SOAP XML file for Webservices request, we can simple use a RAW request and create an SOAP XML request.&amp;lt;br&amp;gt;&lt;br /&gt;
For example we can create a SOAP XML similar to to the following one to invoke the webservices.&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;
&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;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
* Undestanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Resource'''&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.soapcliet.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Soaplite: www.soaplite.com&lt;br /&gt;
* Perl: www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_WSDL_(OWASP-WS-002)&amp;diff=39613</id>
		<title>Testing WSDL (OWASP-WS-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_WSDL_(OWASP-WS-002)&amp;diff=39613"/>
				<updated>2008-09-13T06:54:50Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box testing and example */&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;
Once that the WSDL is identified, we can test that entry point.&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue ==&lt;br /&gt;
Check the WSDL of the web service to find the entry points and try to invoke an operation that is not used in a standard SOAP Request. Ensure that the WS doesn’t give you some confidential information.&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
&lt;br /&gt;
Given the Standard SOAP message that the Web services supplier waits from Web services consumer, you can craft a particular message that invoke some hidden operations.&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
A good example is WebGoat 5.0 WSDL Scanning lesson. The following is a screenshot from that lesson:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:WSDLWebGoat.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;Here we have an interface that invokes a Web Service using only FirstName, LastName, and Login Count as parameters.&amp;lt;br&amp;gt;&lt;br /&gt;
If you look at the relative WSDL you will find:&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;wsdl:portType name=&amp;quot;WSDLScanning&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getFirstName'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getFirstNameRequest&amp;quot; name=&amp;quot;getFirstNameRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getFirstNameResponse&amp;quot; name=&amp;quot;getFirstNameResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getLastName'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getLastNameRequest&amp;quot; name=&amp;quot;getLastNameRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getLastNameResponse&amp;quot; name=&amp;quot;getLastNameResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getCreditCard'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getCreditCardRequest&amp;quot; name=&amp;quot;getCreditCardRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getCreditCardResponse&amp;quot; name=&amp;quot;getCreditCardResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getLoginCount'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getLoginCountRequest&amp;quot; name=&amp;quot;getLoginCountRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getLoginCountResponse&amp;quot; name=&amp;quot;getLoginCountResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:portType&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We find 4 operations and not only 3. Using WebScarab Web Service  plugin, we can craft a SOAP Request to get the Credit Card given a specific ID.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:WSDLWebScarab.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SOAP Request resulting from this request is:&lt;br /&gt;
 POST http://localhost:80/WebGoat/services/SoapRequest HTTP/1.0&lt;br /&gt;
 Accept: application/soap+xml, application/dime, multipart/related, text/*&lt;br /&gt;
 Host: localhost:80&lt;br /&gt;
 Content-Type: text/xml; charset=utf-8&lt;br /&gt;
 SOAPAction: &amp;quot;&amp;quot;&lt;br /&gt;
 Content-length: 576&lt;br /&gt;
 Authorization: Basic Z3Vlc3Q6Z3Vlc3Q=&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&lt;br /&gt;
 &amp;lt;wsns0:Envelope&lt;br /&gt;
   xmlns:wsns1='http://www.w3.org/2001/XMLSchema-instance'&lt;br /&gt;
   xmlns:xsd='http://www.w3.org/2001/XMLSchema'&lt;br /&gt;
   xmlns:wsns0='http://schemas.xmlsoap.org/soap/envelope/'&amp;gt;&lt;br /&gt;
   &amp;lt;wsns0:Body&lt;br /&gt;
     wsns0:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'&amp;gt;&lt;br /&gt;
     &amp;lt;wsns2:'''getCreditCard'''&lt;br /&gt;
           xmlns:wsns2='http://lessons.webgoat.owasp.org'&amp;gt;&lt;br /&gt;
       &amp;lt;id xsi:type='xsd:int'&lt;br /&gt;
           xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'&lt;br /&gt;
       &amp;gt;'''101'''&amp;lt;/id&amp;gt;&lt;br /&gt;
     &amp;lt;/wsns2:getCreditCard&amp;gt;&lt;br /&gt;
   &amp;lt;/wsns0:Body&amp;gt;&lt;br /&gt;
 &amp;lt;/wsns0:Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the SOAP Response with the credit card number (987654321) is:&lt;br /&gt;
 &lt;br /&gt;
 HTTP/1.1 200 OK&lt;br /&gt;
 Server: Apache-Coyote/1.1&lt;br /&gt;
 Content-Type: text/xml;charset=utf-8&lt;br /&gt;
 Date: Wed, 28 Mar 2007 10:18:12 GMT&lt;br /&gt;
 Connection: close&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;soapenv:Envelope xmlns:soapenv=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;  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;&amp;gt;&lt;br /&gt;
 &amp;lt;soapenv:Body&amp;gt;&lt;br /&gt;
 &amp;lt;ns1:getCreditCardResponse soapenv:encodingStyle=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot;  xmlns:ns1=&amp;quot;http://lessons.webgoat.owasp.org&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;getCreditCardReturn xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;'''987654321'''&amp;lt;/getCreditCardReturn&amp;gt;&amp;lt;/ns1:getCreditCardResponse&amp;gt;&lt;br /&gt;
 &amp;lt;/soapenv:Body&amp;gt;&lt;br /&gt;
 &amp;lt;/soapenv:Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''WSDigger'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
WSDigger is a free open source tool to automate web services security testing.&amp;lt;br&amp;gt; &lt;br /&gt;
With this tool we can test ours webservices interacting with them trough a simple interface&lt;br /&gt;
and allows to search query and invoke web services dynamically without writing code.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we intercat with Webservice  malicious data has been entered into WSDigger the web service method must be invoked by&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:wsdigger_part.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Result expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tester should include full details of where the web service application permits access to an operation that is not used during normal SOAP messages and that provides access to confidential data. &lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* W3Schools schema introduction - http://www.w3schools.com/schema/schema_intro.asp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[[OWASP_WebScarab_Project|OWASP WebScarab]]: Web Services plugin&lt;br /&gt;
* Foundstone WSDigger: http://www.foundstone.com/us/resources/proddesc/wsdigger.htm&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_XML_Structural_(OWASP-WS-003)&amp;diff=39612</id>
		<title>Testing for XML Structural (OWASP-WS-003)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_XML_Structural_(OWASP-WS-003)&amp;diff=39612"/>
				<updated>2008-09-13T06:53:29Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box Testing and example */&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;
XML needs to be well-formed to function properly. XML which is not well-formed shall fail when parsed by the XML parser on the server side. A parser needs to run thorough the entire XML message in a serial manner in order to assess the XML well-formedness.&lt;br /&gt;
&lt;br /&gt;
An XML parser is also very CPU labour intensive. Some attack vectors exploit this weakness by sending very large or malformed XML messages.&lt;br /&gt;
&lt;br /&gt;
Testers can create XML documents which are structured in such a way as to create a denial of service attack on the receiving server by tying up memory and CPU resources. This occurs via overloading the XML parser which, as we mentioned, is very CPU intensive.&lt;br /&gt;
&lt;br /&gt;
==Description of the Issue==&lt;br /&gt;
This section discusses the types of attack vectors one could send to a web service in an attempt to assess its reaction to malformed or maliciously crafted messages.&lt;br /&gt;
&lt;br /&gt;
For example, elements which contain large numbers of attributes can cause problems with parsers. This category of attack also includes XML documents which are not well-formed XML &lt;br /&gt;
(e.g., with overlapping elements,or with open tags that have no matching close tags).&lt;br /&gt;
DOM based parsing can be vulnerable to DoS due to the fact that the complete message is loaded into memory (as opposed to SAX parsing). For example, oversized attachments can cause an issue with DOM architectures.&lt;br /&gt;
&lt;br /&gt;
'''Web Services weakness:''' You have to parse XML via SAX or DOM before one validates the structure and content of the message.&lt;br /&gt;
&lt;br /&gt;
==Black Box Testing and example==&lt;br /&gt;
'''Examples:'''&lt;br /&gt;
&lt;br /&gt;
Malformed structure:&lt;br /&gt;
The XML message must be well formed in order to be successfully parsed. Malformed SOAP messages may cause unhandled exceptions to occur;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;ISO-8859-1&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;note id=&amp;quot;666&amp;quot;&amp;gt;&lt;br /&gt;
 '''&amp;lt;to&amp;gt;'''OWASP&lt;br /&gt;
 &amp;lt;from&amp;gt;EOIN&amp;lt;/from&amp;gt;&lt;br /&gt;
 &amp;lt;heading&amp;gt;I am Malformed '''&amp;lt;/to&amp;gt;'''&lt;br /&gt;
 &amp;lt;/heading&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;Don’t forget me this weekend!&amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/note&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:'''&lt;br /&gt;
&lt;br /&gt;
Back to the following WS example:&lt;br /&gt;
&lt;br /&gt;
 http://www.example.com/ws/FindIP.asmx?WSDL&lt;br /&gt;
&lt;br /&gt;
we have obtained the following ws Profile:&amp;lt;br&amp;gt;&lt;br /&gt;
 [Method] GetURLIP&lt;br /&gt;
 [Input] string EnterURL&lt;br /&gt;
 [Output] string&lt;br /&gt;
&lt;br /&gt;
A standard SOAP Request is like the following:&lt;br /&gt;
&lt;br /&gt;
 POST /ws/email/FindIP.asmx HTTP/1.0&lt;br /&gt;
 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.4322.2032)&lt;br /&gt;
 Content-Type: text/xml; charset=utf-8&lt;br /&gt;
 SOAPAction: &amp;quot;http://example.com/webservices/GetURLIP&amp;quot;&lt;br /&gt;
 Content-Length: 329&lt;br /&gt;
 Expect: 100-continue&lt;br /&gt;
 Connection: Keep-Alive&lt;br /&gt;
 Host: www.example.com&lt;br /&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;soap:Envelope xmlns:soap=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;  xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;soap:Body&amp;gt;&lt;br /&gt;
 &amp;lt;GetURLIP xmlns=&amp;quot;http://example.com/webservices/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;EnterURL&amp;gt;'''www.owasp.org'''&amp;lt;/EnterURL&amp;gt;&lt;br /&gt;
 &amp;lt;/GetURLIP&amp;gt;&lt;br /&gt;
 &amp;lt;/soap:Body&amp;gt;&lt;br /&gt;
 &amp;lt;/soap:Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SOAP Response is:&lt;br /&gt;
 HTTP/1.1 200 OK&lt;br /&gt;
 Server: Microsoft-IIS/5.0&lt;br /&gt;
 Date: Mon, 26 Mar 2007 11:29:25 GMT&lt;br /&gt;
 MicrosoftOfficeWebServer: 5.0_Pub&lt;br /&gt;
 X-Powered-By: ASP.NET&lt;br /&gt;
 X-AspNet-Version: 1.1.4322&lt;br /&gt;
 Cache-Control: private, max-age=0&lt;br /&gt;
 Content-Type: text/xml; charset=utf-8&lt;br /&gt;
 Content-Length: 396&lt;br /&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;soap:Envelope xmlns:soap=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;  xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;soap:Body&amp;gt;&lt;br /&gt;
 &amp;lt;GetURLIPResponse xmlns=&amp;quot;http://example.com/webservices/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;GetURLIPResult&amp;gt;'''www.owasp.com IP Address is: 216.48.3.18'''&lt;br /&gt;
 &amp;lt;/GetURLIPResult&amp;gt;&lt;br /&gt;
 &amp;lt;/GetURLIPResponse&amp;gt;&lt;br /&gt;
 &amp;lt;/soap:Body&amp;gt;&lt;br /&gt;
 &amp;lt;/soap:Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An  example of XML Structural testing is the following:&lt;br /&gt;
&lt;br /&gt;
 POST /ws/email/FindIP.asmx HTTP/1.0&lt;br /&gt;
 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.4322.2032)&lt;br /&gt;
 Content-Type: text/xml; charset=utf-8&lt;br /&gt;
 SOAPAction: &amp;quot;http://example.com/webservices/GetURLIP&amp;quot;&lt;br /&gt;
 Content-Length: 329&lt;br /&gt;
 Expect: 100-continue&lt;br /&gt;
 Connection: Keep-Alive&lt;br /&gt;
 Host: www.example.com&lt;br /&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;soap:Envelope xmlns:soap=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;  xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;soap:Body&amp;gt;&lt;br /&gt;
 &amp;lt;GetURLIP xmlns=&amp;quot;http://example.com/webservices/&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;EnterURL&amp;gt;www.example.com&lt;br /&gt;
 &amp;lt;/GetURLIP&amp;gt;&lt;br /&gt;
 &amp;lt;/EnterURL&amp;gt;&lt;br /&gt;
 &amp;lt;/soap:Body&amp;gt;&lt;br /&gt;
 &amp;lt;/soap:Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A web service utilizing DOM based parsing can be &amp;quot;upset&amp;quot; by including a very large payload in the XML message which the parser would be obliged to parse:&lt;br /&gt;
&lt;br /&gt;
'''VERY LARGE &amp;amp; UNEXPECTED PAYLOAD:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Envelope&amp;gt;&lt;br /&gt;
 &amp;lt;Header&amp;gt;&lt;br /&gt;
    &amp;lt;wsse:Security&amp;gt;&lt;br /&gt;
      &amp;lt;Hehehe&amp;gt;I am a Large String (1MB)&amp;lt;/Hehehe&amp;gt;&lt;br /&gt;
      &amp;lt;Hehehe&amp;gt;I am a Large String (1MB)&amp;lt;/Hehehe&amp;gt;&lt;br /&gt;
      &amp;lt;Hehehe&amp;gt;I am a Large String (1MB)&amp;lt;/Hehehe&amp;gt;&lt;br /&gt;
      &amp;lt;Hehehe&amp;gt;I am a Large String (1MB)&amp;lt;/Hehehe&amp;gt;&lt;br /&gt;
      &amp;lt;Hehehe&amp;gt;I am a Large String (1MB)&amp;lt;/Hehehe&amp;gt;&lt;br /&gt;
      &amp;lt;Hehehe&amp;gt;I am a Large String (1MB)&amp;lt;/Hehehe&amp;gt;&lt;br /&gt;
      &amp;lt;Hehehe&amp;gt;I am a Large String (1MB)&amp;lt;/Hehehe&amp;gt;…&lt;br /&gt;
     &amp;lt;Signature&amp;gt;…&amp;lt;/Signature&amp;gt;&lt;br /&gt;
    &amp;lt;/wsse:Security&amp;gt;&lt;br /&gt;
  &amp;lt;/Header&amp;gt;&lt;br /&gt;
  &amp;lt;Body&amp;gt;&lt;br /&gt;
    &amp;lt;BuyCopy&amp;gt;&amp;lt;ISBN&amp;gt;0098666891726&amp;lt;/ISBN&amp;gt;&amp;lt;/BuyCopy&amp;gt;&lt;br /&gt;
  &amp;lt;/Body&amp;gt;&amp;lt;/Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Binary attachments:'''&lt;br /&gt;
&lt;br /&gt;
Web Services can also have a binary attachment such as a Blob or exe.&lt;br /&gt;
Web service attachments are encoded in base64 format since the trend is that DIME (Direct Internet Message Encapsulation) seems to be a dead-end solution.&lt;br /&gt;
&lt;br /&gt;
By attaching a very large base64 string to the message, a tester may consume parser resources to the point of affecting availability. Additional attacks may include the injection of an infected binary file into the base64 binary stream.&lt;br /&gt;
Inadequate parsing of such an attachment may exhaust resources:&lt;br /&gt;
&lt;br /&gt;
'''UNEXPECTED LARGE BLOB:'''&lt;br /&gt;
 &amp;lt;Envelope&amp;gt;&lt;br /&gt;
  &amp;lt;Header&amp;gt;&lt;br /&gt;
    &amp;lt;wsse:Security&amp;gt;&lt;br /&gt;
      &amp;lt;file&amp;gt;jgiGldkooJSSKFM%()LFM$MFKF)$KRFWF$FRFkflfkfkkorepoLPKOMkjiujhy:llki-123-01ke123-&lt;br /&gt;
       04QWS03994k£R$Trfe£elfdk4r-45kgk3lg&amp;quot;£!04040lf;lfFCVr$V$BB^^N&amp;amp;*&amp;lt;M&amp;amp;NNB%...........10MB&amp;lt;/file&amp;gt;&lt;br /&gt;
     &amp;lt;Signature&amp;gt;…&amp;lt;/Signature&amp;gt;&lt;br /&gt;
    &amp;lt;/wsse:Security&amp;gt;&lt;br /&gt;
  &amp;lt;/Header&amp;gt;&lt;br /&gt;
  &amp;lt;Body&amp;gt;&lt;br /&gt;
    &amp;lt;BuyCopy&amp;gt;&amp;lt;ISBN&amp;gt;0098666891726&amp;lt;/ISBN&amp;gt;&amp;lt;/BuyCopy&amp;gt;&lt;br /&gt;
  &amp;lt;/Body&amp;gt;&lt;br /&gt;
 &amp;lt;/Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''WSDigger'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using this tool we can insert a malicious data into web service method and see the results in the output of WSDigger interface.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
WSDigger contains also sample attack plug-ins for:&lt;br /&gt;
* SQL injection &lt;br /&gt;
* cross site scripting &lt;br /&gt;
* XPATH injection attacks&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:wsdigger_attack.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Grey Box Testing and example==&lt;br /&gt;
&lt;br /&gt;
If one has access to the schema of the web service, it should be examined. One should assess that all the parameters are being data validated.&lt;br /&gt;
Restrictions on appropriate values should be implemeneted in accordance to data validation best practice.&lt;br /&gt;
&lt;br /&gt;
 '''enumeration''': Defines a list of acceptable values &lt;br /&gt;
&lt;br /&gt;
 '''fractionDigits''': Specifies the maximum number of decimal places allowed. &lt;br /&gt;
 Must be equal to or greater than zero &lt;br /&gt;
&lt;br /&gt;
 '''length''': Specifies the exact number of characters or list items allowed. &lt;br /&gt;
 Must be equal to or greater than zero &lt;br /&gt;
&lt;br /&gt;
 '''maxExclusive''': Specifies the upper bounds for numeric values &lt;br /&gt;
 (the value must be less than this value) &lt;br /&gt;
&lt;br /&gt;
 '''maxInclusive''': Specifies the upper bounds for numeric values &lt;br /&gt;
 (the value must be less than or equal to this value) &lt;br /&gt;
&lt;br /&gt;
 '''maxLength''': Specifies the maximum number of characters or list items allowed. &lt;br /&gt;
 Must be equal to or greater than zero &lt;br /&gt;
&lt;br /&gt;
 '''minExclusive''': Specifies the lower bounds for numeric values &lt;br /&gt;
 (the value must be greater than this value) &lt;br /&gt;
&lt;br /&gt;
 '''minInclusive''': Specifies the lower bounds for numeric values &lt;br /&gt;
 (the value must be greater than or equal to this value) &lt;br /&gt;
&lt;br /&gt;
 '''minLength''': Specifies the minimum number of characters or list items allowed. &lt;br /&gt;
 Must be equal to or greater than zero &lt;br /&gt;
&lt;br /&gt;
 '''pattern''': Defines the exact sequence of characters that are acceptable&lt;br /&gt;
&lt;br /&gt;
 '''totalDigits''': Specifies the exact number of digits allowed. Must be greater than zero.&lt;br /&gt;
&lt;br /&gt;
 '''whiteSpace''': Specifies how white space &lt;br /&gt;
 (line feeds, tabs, spaces, and carriage returns) is handled&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* W3Schools schema introduction - http://www.w3schools.com/schema/schema_intro.asp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* [[OWASP_WebScarab_Project|OWASP WebScarab]]: Web Services plugin&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=39611</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=39611"/>
				<updated>2008-09-13T06:47:48Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box Testing and example */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
how we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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 provide 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;
How we can see we can use two operator 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 service offer, for example, to search all UDDI with a specific string in business names, service name 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 Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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;
For create a basic SOAP XML file for Webservices request, we can simple use a RAW request and create an SOAP XML request.&amp;lt;br&amp;gt;&lt;br /&gt;
For example we can create a SOAP XML similar to to the following one to invoke the webservices.&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&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;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
* Undestanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Resource'''&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.soapcliet.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Soaplite: www.soaplite.com&lt;br /&gt;
* Perl: www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=39610</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=39610"/>
				<updated>2008-09-13T06:42:20Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box Testing and example */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
how we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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 provide 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;
How we can see we can use two operator 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 service offer, for example, to search all UDDI with a specific string in business names, service name 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 Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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;
For create a basic SOAP XML file for Webservices request, we can simple use a RAW request and create an SOAP XML request.&amp;lt;br&amp;gt;&lt;br /&gt;
For example we can create a SOAP XML similar to to the following one to invoke the webservices.&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&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;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
* Undestanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Resource'''&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.soapcliet.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Soaplite: www.soaplite.com&lt;br /&gt;
* Perl: www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=39609</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=39609"/>
				<updated>2008-09-13T06:37:27Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box Testing and example */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
how we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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 live web server that provide a very useful UDDI on-line tool for to browse and search  public UDDI resource in offered from www.soapclient.com.&amp;lt;br&amp;gt;&lt;br /&gt;
How we can see we can use two operator 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 services offer, for example, to search all UDDI offer from a specific key in business names, service name or service types.&lt;br /&gt;
&lt;br /&gt;
We can search private UDDI registries using Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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;
For create a basic SOAP XML file for Webservices request, we can simple use a RAW request and create an SOAP XML request.&amp;lt;br&amp;gt;&lt;br /&gt;
For example we can create a SOAP XML similar to to the following one to invoke the webservices.&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&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;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
* Undestanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Resource'''&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.soapcliet.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Soaplite: www.soaplite.com&lt;br /&gt;
* Perl: www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=39608</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=39608"/>
				<updated>2008-09-13T06:33:04Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box Testing and example */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd).&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
how we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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;or extenstions .ascx, .asmx, .ashx &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 live web server that provide a very useful UDDI on-line tool for to browse and search  public UDDI resource in offered from www.soapclient.com.&amp;lt;br&amp;gt;&lt;br /&gt;
How we can see we can use two operator 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 services offer, for example, to search all UDDI offer from a specific key in business names, service name or service types.&lt;br /&gt;
&lt;br /&gt;
We can search private UDDI registries using Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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;
For create a basic SOAP XML file for Webservices request, we can simple use a RAW request and create an SOAP XML request.&amp;lt;br&amp;gt;&lt;br /&gt;
For example we can create a SOAP XML similar to to the following one to invoke the webservices.&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&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;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
* Undestanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Resource'''&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.soapcliet.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Soaplite: www.soaplite.com&lt;br /&gt;
* Perl: www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=39607</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=39607"/>
				<updated>2008-09-13T06:13:48Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box Testing and example */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can is use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd) and/or DISCO descriptors available on Web server.&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
how we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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;or extenstions .ascx, .asmx, .ashx &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 live web server that provide a very useful UDDI on-line tool for to browse and search  public UDDI resource in offered from www.soapclient.com.&amp;lt;br&amp;gt;&lt;br /&gt;
How we can see we can use two operator 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 services offer, for example, to search all UDDI offer from a specific key in business names, service name or service types.&lt;br /&gt;
&lt;br /&gt;
We can search private UDDI registries using Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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;
For create a basic SOAP XML file for Webservices request, we can simple use a RAW request and create an SOAP XML request.&amp;lt;br&amp;gt;&lt;br /&gt;
For example we can create a SOAP XML similar to to the following one to invoke the webservices.&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&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;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
* Undestanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Resource'''&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.soapcliet.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Soaplite: www.soaplite.com&lt;br /&gt;
* Perl: www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_WSDL_(OWASP-WS-002)&amp;diff=39503</id>
		<title>Testing WSDL (OWASP-WS-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_WSDL_(OWASP-WS-002)&amp;diff=39503"/>
				<updated>2008-09-12T15:41:48Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box testing and example */&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;
Once that the WSDL is identified, we can test that entry point.&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue ==&lt;br /&gt;
Check the WSDL of the web service to find the entry points and try to invoke an operation that is not used in a standard SOAP Request. Ensure that the WS doesn’t give you some confidential information.&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
&lt;br /&gt;
Given the Standard SOAP message that the Web services supplier waits from Web services consumer, you can craft a particular message that invoke some hidden operations.&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
A good example is WebGoat 5.0 WSDL Scanning lesson. The following is a screenshot from that lesson:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:WSDLWebGoat.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;Here we have an interface that invokes a Web Service using only FirstName, LastName, and Login Count as parameters.&amp;lt;br&amp;gt;&lt;br /&gt;
If you look at the relative WSDL you will find:&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;wsdl:portType name=&amp;quot;WSDLScanning&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getFirstName'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getFirstNameRequest&amp;quot; name=&amp;quot;getFirstNameRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getFirstNameResponse&amp;quot; name=&amp;quot;getFirstNameResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getLastName'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getLastNameRequest&amp;quot; name=&amp;quot;getLastNameRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getLastNameResponse&amp;quot; name=&amp;quot;getLastNameResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getCreditCard'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getCreditCardRequest&amp;quot; name=&amp;quot;getCreditCardRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getCreditCardResponse&amp;quot; name=&amp;quot;getCreditCardResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getLoginCount'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getLoginCountRequest&amp;quot; name=&amp;quot;getLoginCountRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getLoginCountResponse&amp;quot; name=&amp;quot;getLoginCountResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:portType&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We find 4 operations and not only 3. Using WebScarab Web Service  plugin, we can craft a SOAP Request to get the Credit Card given a specific ID.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:WSDLWebScarab.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SOAP Request resulting from this request is:&lt;br /&gt;
 POST http://localhost:80/WebGoat/services/SoapRequest HTTP/1.0&lt;br /&gt;
 Accept: application/soap+xml, application/dime, multipart/related, text/*&lt;br /&gt;
 Host: localhost:80&lt;br /&gt;
 Content-Type: text/xml; charset=utf-8&lt;br /&gt;
 SOAPAction: &amp;quot;&amp;quot;&lt;br /&gt;
 Content-length: 576&lt;br /&gt;
 Authorization: Basic Z3Vlc3Q6Z3Vlc3Q=&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&lt;br /&gt;
 &amp;lt;wsns0:Envelope&lt;br /&gt;
   xmlns:wsns1='http://www.w3.org/2001/XMLSchema-instance'&lt;br /&gt;
   xmlns:xsd='http://www.w3.org/2001/XMLSchema'&lt;br /&gt;
   xmlns:wsns0='http://schemas.xmlsoap.org/soap/envelope/'&amp;gt;&lt;br /&gt;
   &amp;lt;wsns0:Body&lt;br /&gt;
     wsns0:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'&amp;gt;&lt;br /&gt;
     &amp;lt;wsns2:'''getCreditCard'''&lt;br /&gt;
           xmlns:wsns2='http://lessons.webgoat.owasp.org'&amp;gt;&lt;br /&gt;
       &amp;lt;id xsi:type='xsd:int'&lt;br /&gt;
           xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'&lt;br /&gt;
       &amp;gt;'''101'''&amp;lt;/id&amp;gt;&lt;br /&gt;
     &amp;lt;/wsns2:getCreditCard&amp;gt;&lt;br /&gt;
   &amp;lt;/wsns0:Body&amp;gt;&lt;br /&gt;
 &amp;lt;/wsns0:Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the SOAP Response with the credit card number (987654321) is:&lt;br /&gt;
 &lt;br /&gt;
 HTTP/1.1 200 OK&lt;br /&gt;
 Server: Apache-Coyote/1.1&lt;br /&gt;
 Content-Type: text/xml;charset=utf-8&lt;br /&gt;
 Date: Wed, 28 Mar 2007 10:18:12 GMT&lt;br /&gt;
 Connection: close&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;soapenv:Envelope xmlns:soapenv=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;  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;&amp;gt;&lt;br /&gt;
 &amp;lt;soapenv:Body&amp;gt;&lt;br /&gt;
 &amp;lt;ns1:getCreditCardResponse soapenv:encodingStyle=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot;  xmlns:ns1=&amp;quot;http://lessons.webgoat.owasp.org&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;getCreditCardReturn xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;'''987654321'''&amp;lt;/getCreditCardReturn&amp;gt;&amp;lt;/ns1:getCreditCardResponse&amp;gt;&lt;br /&gt;
 &amp;lt;/soapenv:Body&amp;gt;&lt;br /&gt;
 &amp;lt;/soapenv:Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''WSDigger'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
WSDigger is a free open source tool to automate web services security testing.&amp;lt;br&amp;gt; &lt;br /&gt;
With this tool we can test ours webservices interacting with them trough a simple interface&lt;br /&gt;
and allows to search query and invoke web services dynamically without writing code.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we intercat with Webservice  malicious data has been entered into WSDigger the web service method must be invoked by&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:wsdigger_part.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using this tool we can insert a malicious data into web service method and see the results in the output of WSDigger interface.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
WSDigger contains also sample attack plug-ins for:&lt;br /&gt;
* SQL injection &lt;br /&gt;
* cross site scripting &lt;br /&gt;
* XPATH injection attacks&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:wsdigger_attack.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tester should include full details of where the web service application permits access to an operation that is not used during normal SOAP messages and that provides access to confidential data. &lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* W3Schools schema introduction - http://www.w3schools.com/schema/schema_intro.asp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[[OWASP_WebScarab_Project|OWASP WebScarab]]: Web Services plugin&lt;br /&gt;
* Foundstone WSDigger: http://www.foundstone.com/us/resources/proddesc/wsdigger.htm&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Wsdigger_attack.jpg&amp;diff=39502</id>
		<title>File:Wsdigger attack.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Wsdigger_attack.jpg&amp;diff=39502"/>
				<updated>2008-09-12T15:22:55Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Wsdigger_part.jpg&amp;diff=39501</id>
		<title>File:Wsdigger part.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Wsdigger_part.jpg&amp;diff=39501"/>
				<updated>2008-09-12T15:22:20Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_WSDL_(OWASP-WS-002)&amp;diff=39500</id>
		<title>Testing WSDL (OWASP-WS-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_WSDL_(OWASP-WS-002)&amp;diff=39500"/>
				<updated>2008-09-12T15:21:59Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box testing and example */&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;
Once that the WSDL is identified, we can test that entry point.&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue ==&lt;br /&gt;
Check the WSDL of the web service to find the entry points and try to invoke an operation that is not used in a standard SOAP Request. Ensure that the WS doesn’t give you some confidential information.&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
&lt;br /&gt;
Given the Standard SOAP message that the Web services supplier waits from Web services consumer, you can craft a particular message that invoke some hidden operations.&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
A good example is WebGoat 5.0 WSDL Scanning lesson. The following is a screenshot from that lesson:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:WSDLWebGoat.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;Here we have an interface that invokes a Web Service using only FirstName, LastName, and Login Count as parameters.&amp;lt;br&amp;gt;&lt;br /&gt;
If you look at the relative WSDL you will find:&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;wsdl:portType name=&amp;quot;WSDLScanning&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getFirstName'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getFirstNameRequest&amp;quot; name=&amp;quot;getFirstNameRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getFirstNameResponse&amp;quot; name=&amp;quot;getFirstNameResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getLastName'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getLastNameRequest&amp;quot; name=&amp;quot;getLastNameRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getLastNameResponse&amp;quot; name=&amp;quot;getLastNameResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getCreditCard'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getCreditCardRequest&amp;quot; name=&amp;quot;getCreditCardRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getCreditCardResponse&amp;quot; name=&amp;quot;getCreditCardResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;wsdl:operation name=&amp;quot;'''getLoginCount'''&amp;quot; parameterOrder=&amp;quot;id&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:input message=&amp;quot;impl:getLoginCountRequest&amp;quot; name=&amp;quot;getLoginCountRequest&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;wsdl:output message=&amp;quot;impl:getLoginCountResponse&amp;quot; name=&amp;quot;getLoginCountResponse&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;
 &amp;lt;/wsdl:portType&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We find 4 operations and not only 3. Using WebScarab Web Service  plugin, we can craft a SOAP Request to get the Credit Card given a specific ID.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:WSDLWebScarab.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SOAP Request resulting from this request is:&lt;br /&gt;
 POST http://localhost:80/WebGoat/services/SoapRequest HTTP/1.0&lt;br /&gt;
 Accept: application/soap+xml, application/dime, multipart/related, text/*&lt;br /&gt;
 Host: localhost:80&lt;br /&gt;
 Content-Type: text/xml; charset=utf-8&lt;br /&gt;
 SOAPAction: &amp;quot;&amp;quot;&lt;br /&gt;
 Content-length: 576&lt;br /&gt;
 Authorization: Basic Z3Vlc3Q6Z3Vlc3Q=&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&lt;br /&gt;
 &amp;lt;wsns0:Envelope&lt;br /&gt;
   xmlns:wsns1='http://www.w3.org/2001/XMLSchema-instance'&lt;br /&gt;
   xmlns:xsd='http://www.w3.org/2001/XMLSchema'&lt;br /&gt;
   xmlns:wsns0='http://schemas.xmlsoap.org/soap/envelope/'&amp;gt;&lt;br /&gt;
   &amp;lt;wsns0:Body&lt;br /&gt;
     wsns0:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'&amp;gt;&lt;br /&gt;
     &amp;lt;wsns2:'''getCreditCard'''&lt;br /&gt;
           xmlns:wsns2='http://lessons.webgoat.owasp.org'&amp;gt;&lt;br /&gt;
       &amp;lt;id xsi:type='xsd:int'&lt;br /&gt;
           xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'&lt;br /&gt;
       &amp;gt;'''101'''&amp;lt;/id&amp;gt;&lt;br /&gt;
     &amp;lt;/wsns2:getCreditCard&amp;gt;&lt;br /&gt;
   &amp;lt;/wsns0:Body&amp;gt;&lt;br /&gt;
 &amp;lt;/wsns0:Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the SOAP Response with the credit card number (987654321) is:&lt;br /&gt;
 &lt;br /&gt;
 HTTP/1.1 200 OK&lt;br /&gt;
 Server: Apache-Coyote/1.1&lt;br /&gt;
 Content-Type: text/xml;charset=utf-8&lt;br /&gt;
 Date: Wed, 28 Mar 2007 10:18:12 GMT&lt;br /&gt;
 Connection: close&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;soapenv:Envelope xmlns:soapenv=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;  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;&amp;gt;&lt;br /&gt;
 &amp;lt;soapenv:Body&amp;gt;&lt;br /&gt;
 &amp;lt;ns1:getCreditCardResponse soapenv:encodingStyle=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot;  xmlns:ns1=&amp;quot;http://lessons.webgoat.owasp.org&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;getCreditCardReturn xsi:type=&amp;quot;xsd:string&amp;quot;&amp;gt;'''987654321'''&amp;lt;/getCreditCardReturn&amp;gt;&amp;lt;/ns1:getCreditCardResponse&amp;gt;&lt;br /&gt;
 &amp;lt;/soapenv:Body&amp;gt;&lt;br /&gt;
 &amp;lt;/soapenv:Envelope&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''WSDigger'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
WSDigger is a free open source tool to automate web services security testing.&amp;lt;br&amp;gt; &lt;br /&gt;
With this tool we can test ours webservices interacting with them trough a simple interface.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:wsdigger_part.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WSDigger contains sample attack plug-ins for:&lt;br /&gt;
* SQL injection &lt;br /&gt;
* cross site scripting &lt;br /&gt;
* XPATH injection attacks&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:wsdigger_attack.jpg]] &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Result expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tester should include full details of where the web service application permits access to an operation that is not used during normal SOAP messages and that provides access to confidential data. &lt;br /&gt;
&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* W3Schools schema introduction - http://www.w3schools.com/schema/schema_intro.asp&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[[OWASP_WebScarab_Project|OWASP WebScarab]]: Web Services plugin&lt;br /&gt;
* Foundstone WSDigger: http://www.foundstone.com/us/resources/proddesc/wsdigger.htm&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:WSdigger_part.jpg&amp;diff=39499</id>
		<title>File:WSdigger part.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:WSdigger_part.jpg&amp;diff=39499"/>
				<updated>2008-09-12T15:15:45Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Wsdigger.jpg&amp;diff=39498</id>
		<title>File:Wsdigger.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Wsdigger.jpg&amp;diff=39498"/>
				<updated>2008-09-12T15:07:48Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=39495</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=39495"/>
				<updated>2008-09-12T14:34:45Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* References */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can is use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd) and/or DISCO descriptors available on Web server.&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
as we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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;or extenstions .ascx, .asmx, .ashx &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 live web server that provide a very useful UDDI on-line tool for to browse and search  public UDDI resource in offered from www.soapclient.com.&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see we can use two operator 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 services offer, for example, to search all UDDI offer from a specific key in business names, service name or service types.&lt;br /&gt;
&lt;br /&gt;
We can search private UDDI registries using Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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;
For create a basic SOAP XML file for Webservices request, we can simple use a RAW request and create an SOAP XML request.&amp;lt;br&amp;gt;&lt;br /&gt;
For example we can create a SOAP XML similar to to the following one to invoke the webservices.&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&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;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
* Undestanding UDDI: http://www-128.ibm.com/developerworks/webservices/library/ws-featuddi/index.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Web Resource'''&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.soapcliet.com/&lt;br /&gt;
* Xmethods: http://www.xmethods.net&lt;br /&gt;
* WSIndex: http://www.wsindex.org&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Soaplite: www.soaplite.com&lt;br /&gt;
* Perl: www.perl.com&lt;br /&gt;
* SOAPClient4XG: http://www-128.ibm.com/developerworks/xml/library/x-soapcl/&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing:_WS_Information_Gathering_(OWASP-WS-001)&amp;diff=39494</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=39494"/>
				<updated>2008-09-12T14:26:47Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box Testing and example */&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 Testing is to determine the WS entry points and the communication schema: this is described in the WSDL associated with the WS.&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 for 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 (WDSL) 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 to 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 WDSL 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 realtive 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 need a simple and standardized ways to find a Web Services available from from remote servers.&lt;br /&gt;
There are two ways for the discovery a Web Services, DISCO and UDDI.&amp;lt;br&amp;gt;&lt;br /&gt;
The Web Service Discovery (DISCO) is one way that we can is use to discover the URLs WSDL descriptor and other XML documents, like Schema Definition Document (.xsd) and/or DISCO descriptors available on Web server.&amp;lt;br&amp;gt;  &lt;br /&gt;
 &lt;br /&gt;
For istance with a http query to a Web server:  &lt;br /&gt;
http://myexample.com/myexampleService.asmx?DISCO&lt;br /&gt;
&lt;br /&gt;
we obtain a following one 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;
as we can see in the above XML document we have a reference for WSDL document where obtain a descriptions of Web Services available from remote Web Server.&lt;br /&gt;
&lt;br /&gt;
DISCO is a Microsoft tecnology, UDDI (Universal Description, Discovery and Integration) instead is a 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;or extenstions .ascx, .asmx, .ashx &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 live web server that provide a very useful UDDI on-line tool for to browse and search  public UDDI resource in offered from www.soapclient.com.&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see we can use two operator 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 services offer, for example, to search all UDDI offer from a specific key in business names, service name or service types.&lt;br /&gt;
&lt;br /&gt;
We can search private UDDI registries using Avanced 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 services allow interaction with Web services dynamically.&amp;lt;br&amp;gt; &lt;br /&gt;
Soapclient offer others methods for to allow to discover web services and usefull 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 are usefull interact with webservives 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;
SOAP Client for XML allow 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 consume a Webservices 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;
For create a basic SOAP XML file for Webservices request, we can simple use a RAW request and create an SOAP XML request.&amp;lt;br&amp;gt;&lt;br /&gt;
For example we can create a SOAP XML similar to to the following one to invoke the webservices.&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&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;
&lt;br /&gt;
==References==&lt;br /&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;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Seekda.jpg&amp;diff=39454</id>
		<title>File:Seekda.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Seekda.jpg&amp;diff=39454"/>
				<updated>2008-09-12T11:27:32Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Uddi_browser_part.jpg&amp;diff=39452</id>
		<title>File:Uddi browser part.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Uddi_browser_part.jpg&amp;diff=39452"/>
				<updated>2008-09-12T11:21:07Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Uddi_browser.jpg&amp;diff=39448</id>
		<title>File:Uddi browser.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Uddi_browser.jpg&amp;diff=39448"/>
				<updated>2008-09-12T11:15:34Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Wsindex.png&amp;diff=39447</id>
		<title>File:Wsindex.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Wsindex.png&amp;diff=39447"/>
				<updated>2008-09-12T11:07:18Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Wsindex.jpg&amp;diff=39446</id>
		<title>File:Wsindex.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Wsindex.jpg&amp;diff=39446"/>
				<updated>2008-09-12T11:03:20Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38434</id>
		<title>Testing for User Enumeration and Guessable User Account (OWASP-AT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38434"/>
				<updated>2008-09-05T08:54:01Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
The scope of this test is to verify if is possible to collect a set of valid usernames by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
Often, web applications reveal when a username exists on system, either as a consequence of a misconfiguration or as a design decision. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;br /&gt;
The information obtained can be used by an attacker to gain a list of users on system. This information can be used to attack the web application, for example, through a brute force or default username/password attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
The tester should interact with the authentication mechanism of the application to understand if sending particular requests causes the application to answer in different manners. This issue can be exists because the information released from web application or web server, when we provide a valid username is different than we use an invalid usename.&lt;br /&gt;
&lt;br /&gt;
In some cases, we can receive a message that reveals if the provided credentials are wrong because an invalid username or an invalid password was used. Sometimes, we can enumerate the existing users by sending a username and an empty password. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In a black box testing, we know nothing about the specific application, username, application logic and error messages on login page, or password recovery facilities.&lt;br /&gt;
If the applications is vulnerable, we receive a response message that reveals, directly or indirectly, some information useful for enumerating users. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''HTTP Response message''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for Valid user/right password''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Record the server answer when you submit a valid userID and valid password.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this successful authentication (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing for valid user/wrong password''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert a valid userID and a wrong password and record the error message generated by the application.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
From the browser we will expect message similar to the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:AuthenticationFailed.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or something like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:NoConfFound.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again any message that reveal the existence of user, for istance message similar to:&amp;lt;br&amp;gt; 	&lt;br /&gt;
 Login for User foo: invalid password&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using WebScarab, notice the information retrieved from this unsuccessful authentication attempt (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for a nonexistent username''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert an invalid userID and a wrong password and record the server answer (you should be confident that the username is not valid in the application). Record the error message and the server answer.&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If we enter a nonexistent userID, we can receive a message similar to:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Userisnotactive.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
or message like the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
 Login failed for User foo: invalid Account&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally the application should respond with the same error message and length to the different wrong requests. If you notice that the responses are not the same, you should investigate and find out the key that creates a difference between the 2 requests. For example: &lt;br /&gt;
* Client request: Valid user/wrong password --&amp;gt; Server answer:'The password is not correct'&lt;br /&gt;
* Client request: Wrong user/wrong password --&amp;gt; Server answer:'User not recognized'&lt;br /&gt;
The above responses let the client understand that for the first request we have a valid user name. So we can interact with the application requesting a set of possible userIDs and observing the answer.&amp;lt;br&amp;gt;&lt;br /&gt;
Looking at the second server response, we understand in the same way that we don't hold a valid username. So we can interact in the same manner and create a list of valid userID looking at the server answers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Other way to enumerate users''' &amp;lt;br&amp;gt;&lt;br /&gt;
We can enumerate users in other several ways, such as: &amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing the error code received on login pages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Some web application release a specific error code or message that we can analyze.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing URLs, and URLs redirections'''&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=baduser&amp;amp;Error=0&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=gooduser&amp;amp;Error=2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see above, when we provides a userID and password to web application, we see a message indication that an error has occurred in the URL. &lt;br /&gt;
In first case we has provides a bad userID and bad password, in second case instead a good user and bad password, so we can identify a valid userID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- URI Probing'''&amp;lt;br&amp;gt;&lt;br /&gt;
Sometime a web server responds differently if receive a request for an existing directories or not. For instance in some portals every users is associated with a directory, if we try to access to an exists directory we could be receive a web server error.&lt;br /&gt;
A very common errors that we can receive from web server is:&amp;lt;br&amp;gt;&lt;br /&gt;
   403 Forbidden error code &lt;br /&gt;
and &amp;lt;br&amp;gt;&lt;br /&gt;
   404 Not found error code&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/account1 - we receive from web server: 403 Forbidden &lt;br /&gt;
 http://www.foo.com/account2 - we receive from web server: 404 file Not Found&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In first case the user exist, but we cannot view the web page, in second case instead the user “account2” doesn’t exist.&lt;br /&gt;
Collecting this information we can enumerate the users.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing Web page Title'''&amp;lt;br&amp;gt;&lt;br /&gt;
We can receive useful information on Title of web page, where we can obtain a specific error code or messages that reveal if the problems are on username or password.&lt;br /&gt;
For instance is common change a web title if we cannot authenticate to an application and receive a very clearly message similar to:&lt;br /&gt;
 Invalid user&lt;br /&gt;
 Invalid authentication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing message received from recovery facilities'''&amp;lt;br&amp;gt; &lt;br /&gt;
When we use a recovery facilities the applications that is vulnerable could be return a message that reveal if a username exist or not.&lt;br /&gt;
&lt;br /&gt;
For example, message similar to the following:&amp;lt;br&amp;gt;&lt;br /&gt;
 Invalid username: e-mail address are not valid or The specified user was not found&lt;br /&gt;
&lt;br /&gt;
 Valid username: Your recovery password has been successfully sent&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-Friendly 404 Error Message'''&amp;lt;br&amp;gt;&lt;br /&gt;
Not always when we made a request for a user within the directory that is sure to not exist we receive 404 error code, we receive instead “200 ok” with an image, in this case we can assume that when we receive the specific image the users doesn’t exist. This logic can be applied to other web server response; the trick is a good analysis of web server and web application messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Guessing Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
In some case the userIDs are created with specific policies of administrator or company.  &lt;br /&gt;
For example we can view a users with a userID created in sequential order:&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000100&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000101&amp;lt;br&amp;gt;&lt;br /&gt;
		…. &amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes the username are created with a REALM alias and then a sequential numbers:&amp;lt;br&amp;gt;&lt;br /&gt;
		R1001 – user 001 for REALM1&amp;lt;br&amp;gt;&lt;br /&gt;
	 	R2001 – user 001 for REALM2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Other possibilities are userIDs associated with credit card numbers, or in general a numbers with a pattern. &lt;br /&gt;
In the above sample we can create simple shell scripts that compose a UserIDs and submit a request with tool like wget to automate a web query to discern valid userIDs.&lt;br /&gt;
To create a script we can use also Perl and CURL &lt;br /&gt;
  &lt;br /&gt;
Again, we can guess a users from the information received from an LDAP query or from a google information gathering for example from a specific domain.&lt;br /&gt;
Google for example can helps to find domain users through a specific queries or through a simple shell scripts or tools.&lt;br /&gt;
&lt;br /&gt;
For other information about guessing userIDs see next paragraph 4.5.3 Testing for Guessable (Dictionary) User Account.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Attention:''' by enumerating user accounts, you risk to lock out accounts after a predefined number of failed probes (based on application policy). Also, sometimes, our IP address can be banned by dynamic rules on the application firewall.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Authentication error messages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the application answers in the same manner for every client request that produces a failed authentication. For this issue the Black Box testing and  Gray Box testing are the same concept based on the analysis of messages or error codes received from web application.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The application should answer in the same manner for every failed attempt of authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
For Example: &amp;lt;br&amp;gt;&lt;br /&gt;
 Credentials submitted are not valid&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab: [[OWASP_WebScarab_Project]]&lt;br /&gt;
* CURL: http://curl.haxx.se/&lt;br /&gt;
* PERL: http://www.perl.org&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38433</id>
		<title>Testing for User Enumeration and Guessable User Account (OWASP-AT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38433"/>
				<updated>2008-09-05T08:52:03Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
The scope of this test is to verify if is possible to collect a set of valid usernames by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
Often, web applications reveal when a username exists on system, either as a consequence of a misconfiguration or as a design decision. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;br /&gt;
The information obtained can be used by an attacker to gain a list of users on system. This information can be used to attack the web application, for example, through a brute force or default username/password attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
The tester should interact with the authentication mechanism of the application to understand if sending particular requests causes the application to answer in different manners. This issue can be exists because the information released from web application or web server, when we provide a valid username is different than we use an invalid usename.&lt;br /&gt;
&lt;br /&gt;
In some cases, we can receive a message that reveals if the provided credentials are wrong because an invalid username or an invalid password was used. Sometimes, we can enumerate the existing users by sending a username and an empty password. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In a black box testing, we know nothing about the specific application, username, application logic and error messages on login page, or password recovery facilities.&lt;br /&gt;
If the applications is vulnerable, we receive a response message that reveals, directly or indirectly, some information useful for enumerating users. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''HTTP Response message''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for Valid user/right password''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Record the server answer when you submit a valid userID and valid password.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this successful authentication (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing for valid user/wrong password''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert a valid userID and a wrong password and record the error message generated by the application.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
From the browser we will expect message similar to the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:AuthenticationFailed.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or something like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:NoConfFound.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again any message that reveal the existence of user, for istance message similar to:&amp;lt;br&amp;gt; 	&lt;br /&gt;
 Login for User foo: invalid password&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using WebScarab, notice the information retrieved from this unsuccessful authentication attempt (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for a nonexistent username''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert an invalid userID and a wrong password and record the server answer (you should be confident that the username is not valid in the application). Record the error message and the server answer.&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If we enter a nonexistent userID, we can receive a message similar to:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Userisnotactive.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
or message like the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
 Login failed for User foo: invalid Account&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally the application should respond with the same error message and length to the different wrong requests. If you notice that the responses are not the same, you should investigate and find out the key that creates a difference between the 2 requests. For example: &lt;br /&gt;
* Client request: Valid user/wrong password --&amp;gt; Server answer:'The password is not correct'&lt;br /&gt;
* Client request: Wrong user/wrong password --&amp;gt; Server answer:'User not recognized'&lt;br /&gt;
The above responses let the client understand that for the first request we have a valid user name. So we can interact with the application requesting a set of possible userIDs and observing the answer.&amp;lt;br&amp;gt;&lt;br /&gt;
Looking at the second server response, we understand in the same way that we don't hold a valid username. So we can interact in the same manner and create a list of valid userID looking at the server answers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Other way to enumerate users''' &amp;lt;br&amp;gt;&lt;br /&gt;
We can enumerate users in other several ways, such as: &amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing the error code received on login pages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Some web application release a specific error code or message that we can analyze.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing URLs, and URLs redirections'''&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=baduser&amp;amp;Error=0&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=gooduser&amp;amp;Error=2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see above, when we provides a userID and password to web application, we see a message indication that an error has occurred in the URL. &lt;br /&gt;
In first case we has provides a bad userID and bad password, in second case instead a good user and bad password, so we can identify a valid userID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- URI Probing'''&amp;lt;br&amp;gt;&lt;br /&gt;
Sometime a web server responds differently if receive a request for an existing directories or not. For instance in some portals every users is associated with a directory, if we try to access to an exists directory we could be receive a web server error.&lt;br /&gt;
A very common errors that we can receive from web server is:&amp;lt;br&amp;gt;&lt;br /&gt;
   403 Forbidden error code &lt;br /&gt;
and &amp;lt;br&amp;gt;&lt;br /&gt;
   404 Not found error code&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/account1 - we receive from web server: 403 Forbidden &lt;br /&gt;
 http://www.foo.com/account2 - we receive from web server: 404 file Not Found&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In first case the user exist, but we cannot view the web page, in second case instead the user “account2” doesn’t exist.&lt;br /&gt;
Collecting this information we can enumerate the users.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing Web page Title'''&amp;lt;br&amp;gt;&lt;br /&gt;
We can receive useful information on Title of web page, where we can obtain a specific error code or messages that reveal if the problems are on username or password.&lt;br /&gt;
For instance is common change a web title if we cannot authenticate to an application and receive a very clearly message similar to:&lt;br /&gt;
 Invalid user&lt;br /&gt;
 Invalid authentication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing message received from recovery facilities'''&amp;lt;br&amp;gt; &lt;br /&gt;
When we use a recovery facilities the applications that is vulnerable could be return a message that reveal if a username exist or not.&lt;br /&gt;
&lt;br /&gt;
For example, message similar to the following:&amp;lt;br&amp;gt;&lt;br /&gt;
 Invalid username: e-mail address are not valid or The specified user was not found&lt;br /&gt;
&lt;br /&gt;
 Valid username: Your recovery password has been successfully sent&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-Friendly 404 Error Message'''&amp;lt;br&amp;gt;&lt;br /&gt;
Not always when we made a request for a user within the directory that is sure to not exist we receive 404 error code, we receive instead “200 ok” with an image, in this case we can assume that when we receive the specific image the users doesn’t exist. This logic can be applied to other web server response; the trick is a good analysis of web server and web application messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Guessing Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
In some case the userIDs are created with specific policies of administrator or company.  &lt;br /&gt;
For example we can view a users with a userID created in sequential order:&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000100&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000101&amp;lt;br&amp;gt;&lt;br /&gt;
		…. &amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes the username are created with a REALM alias and then a sequential numbers:&amp;lt;br&amp;gt;&lt;br /&gt;
		R1001 – user 001 for REALM1&amp;lt;br&amp;gt;&lt;br /&gt;
	 	R2001 – user 001 for REALM2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Other possibilities are userIDs associated with credit card numbers, or in general a numbers with a pattern. &lt;br /&gt;
In the above sample we can create simple shell scripts that compose a UserIDs and submit a request with tool like wget to automate a web query to discern valid userIDs.&lt;br /&gt;
To create a script we can use also Perl and CURL &lt;br /&gt;
  &lt;br /&gt;
Again, we can guess a users from the information received from an LDAP query or from a google information gathering for example from a specific domain.&lt;br /&gt;
Google for example can helps to find domain users through a specific queries or through a simple tools like finger google.&lt;br /&gt;
&lt;br /&gt;
For other information about guessing userIDs see next paragraph 4.5.3 Testing for Guessable (Dictionary) User Account.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Attention:''' by enumerating user accounts, you risk to lock out accounts after a predefined number of failed probes (based on application policy). Also, sometimes, our IP address can be banned by dynamic rules on the application firewall.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Authentication error messages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the application answers in the same manner for every client request that produces a failed authentication. For this issue the Black Box testing and  Gray Box testing are the same concept based on the analysis of messages or error codes received from web application.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The application should answer in the same manner for every failed attempt of authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
For Example: &amp;lt;br&amp;gt;&lt;br /&gt;
 Credentials submitted are not valid&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab: [[OWASP_WebScarab_Project]]&lt;br /&gt;
* CURL: http://curl.haxx.se/&lt;br /&gt;
* PERL: http://www.perl.org&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38432</id>
		<title>Testing for User Enumeration and Guessable User Account (OWASP-AT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38432"/>
				<updated>2008-09-05T08:26:26Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
The scope of this test is to verify if is possible to collect a set of valid usernames by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
Often, web applications reveal when a username exists on system, either as a consequence of a misconfiguration or as a design decision. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;br /&gt;
The information obtained can be used by an attacker to gain a list of users on system. This information can be used to attack the web application, for example, through a brute force or default username/password attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
The tester should interact with the authentication mechanism of the application to understand if sending particular requests causes the application to answer in different manners. This issue can be exists because the information released from web application or web server, when we provide a valid username is different than we use an invalid usename.&lt;br /&gt;
&lt;br /&gt;
In some cases, we can receive a message that reveals if the provided credentials are wrong because an invalid username or an invalid password was used. Sometimes, we can enumerate the existing users by sending a username and an empty password. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In a black box testing, we know nothing about the specific application, username, application logic and error messages on login page, or password recovery facilities.&lt;br /&gt;
If the applications is vulnerable, we receive a response message that reveals, directly or indirectly, some information useful for enumerating users. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''HTTP Response message''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for Valid user/right password''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Record the server answer when you submit a valid userID and valid password.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this successful authentication (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing for valid user/wrong password''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert a valid userID and a wrong password and record the error message generated by the application.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
From the browser we will expect message similar to the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:AuthenticationFailed.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or something like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:NoConfFound.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again any message that reveal the existence of user, for istance message similar to:&amp;lt;br&amp;gt; 	&lt;br /&gt;
 Login for User foo: invalid password&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using WebScarab, notice the information retrieved from this unsuccessful authentication attempt (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for a nonexistent username''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert an invalid userID and a wrong password and record the server answer (you should be confident that the username is not valid in the application). Record the error message and the server answer.&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If we enter a nonexistent userID, we can receive a message similar to:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Userisnotactive.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
or message like the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
 Login failed for User foo: invalid Account&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally the application should respond with the same error message and length to the different wrong requests. If you notice that the responses are not the same, you should investigate and find out the key that creates a difference between the 2 requests. For example: &lt;br /&gt;
* Client request: Valid user/wrong password --&amp;gt; Server answer:'The password is not correct'&lt;br /&gt;
* Client request: Wrong user/wrong password --&amp;gt; Server answer:'User not recognized'&lt;br /&gt;
The above responses let the client understand that for the first request we have a valid user name. So we can interact with the application requesting a set of possible userIDs and observing the answer.&amp;lt;br&amp;gt;&lt;br /&gt;
Looking at the second server response, we understand in the same way that we don't hold a valid username. So we can interact in the same manner and create a list of valid userID looking at the server answers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Other way to enumerate users''' &amp;lt;br&amp;gt;&lt;br /&gt;
We can enumerate users in other several ways, such as: &amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing the error code received on login pages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Some web application release a specific error code or message that we can analyze.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing URLs, and URLs redirections'''&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=baduser&amp;amp;Error=0&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=gooduser&amp;amp;Error=2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see above, when we provides a userID and password to web application, we see a message indication that an error has occurred in the URL. &lt;br /&gt;
In first case we has provides a bad userID and bad password, in second case instead a good user and bad password, so we can identify a valid userID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- URI Probing'''&amp;lt;br&amp;gt;&lt;br /&gt;
Sometime a web server responds differently if receive a request for an existing directories or not. For instance in some portals every users is associated with a directory, if we try to access to an exists directory we could be receive a web server error.&lt;br /&gt;
A very common errors that we can receive from web server is:&amp;lt;br&amp;gt;&lt;br /&gt;
   403 Forbidden error code &lt;br /&gt;
and &amp;lt;br&amp;gt;&lt;br /&gt;
   404 Not found error code&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/account1 - we receive from web server: 403 Forbidden &lt;br /&gt;
 http://www.foo.com/account2 - we receive from web server: 404 file Not Found&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In first case the user exist, but we cannot view the web page, in second case instead the user “account2” doesn’t exist.&lt;br /&gt;
Collecting this information we can enumerate the users.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing Web page Title'''&amp;lt;br&amp;gt;&lt;br /&gt;
We can receive useful information on Title of web page, where we can obtain a specific error code or messages that reveal if the problems are on username or password.&lt;br /&gt;
For instance is common change a web title if we cannot authenticate to an application and receive a very clearly message similar to:&lt;br /&gt;
 Invalid user&lt;br /&gt;
 Invalid authentication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing message received from recovery facilities'''&amp;lt;br&amp;gt; &lt;br /&gt;
When we use a recovery facilities the applications that is vulnerable could be return a message that reveal if a username exist or not.&lt;br /&gt;
&lt;br /&gt;
For example, message similar to the following:&amp;lt;br&amp;gt;&lt;br /&gt;
 Invalid username: e-mail address are not valid or The specified user was not found&lt;br /&gt;
&lt;br /&gt;
 Valid username: Your recovery password has been successfully sent&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-Friendly 404 Error Message'''&amp;lt;br&amp;gt;&lt;br /&gt;
Not always when we made a request for a user within the directory that is sure to not exist we receive 404 error code, we receive instead “200 ok” with an image, in this case we can assume that when we receive the specific image the users doesn’t exist. This logic can be applied to other web server response; the trick is a good analysis of web server and web application messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Guessing Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
In some case the userIDs are created with specific policies of administrator or company.  &lt;br /&gt;
For example we can view a users with a userID created in sequential order:&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000100&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000101&amp;lt;br&amp;gt;&lt;br /&gt;
		…. &amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes the username are created with a REALM alias and then a sequential numbers:&amp;lt;br&amp;gt;&lt;br /&gt;
		R1001 – user 001 for REALM1&amp;lt;br&amp;gt;&lt;br /&gt;
	 	R2001 – user 001 for REALM2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Other possibilities are userIDs associated with credit card numbers, or in general a numbers with a pattern. &lt;br /&gt;
In the above sample we can create simple shell scripts that compose a UserIDs and submit a request with tool like wget to automate a web query to discern valid userIDs.&lt;br /&gt;
To create a script we can use also Perl and CURL &lt;br /&gt;
  &lt;br /&gt;
Again, we can guess a users from the information received from an LDAP query or from a google information gathering for example from a specific domain.&lt;br /&gt;
Google for example can helps to find domain users through a specific queries or through a simple tools like finger google.&lt;br /&gt;
&lt;br /&gt;
For other information about guessing userIDs see next paragraph 4.5.3 Testing for Guessable (Dictionary) User Account.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Attention:''' by enumerating user accounts, you risk to lock out accounts after a predefined number of failed probes (based on application policy). Also, sometimes, our IP address can be banned by dynamic rules on the application firewall.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Authentication error messages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the application answers in the same manner for every client request that produces a failed authentication. For this issue the Black Box testing and  Gray Box testing are the same concept based on the analysis of messages or error codes received from web application.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The application should answer in the same manner for every failed attempt of authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
For Example: &amp;lt;br&amp;gt;&lt;br /&gt;
 Credentials submitted are not valid&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab: [[OWASP_WebScarab_Project]]&lt;br /&gt;
* CURL: http://curl.haxx.se/&lt;br /&gt;
* PERL: http://www.perl.org&lt;br /&gt;
* Finger Google (module of Twister): http://sourceforge.net/projects/wf-twister/&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38431</id>
		<title>Testing for User Enumeration and Guessable User Account (OWASP-AT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38431"/>
				<updated>2008-09-05T08:23:17Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
The scope of this test is to verify if is possible to collect a set of valid usernames by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
Often, web applications reveal when a username exists on system, either as a consequence of a misconfiguration or as a design decision. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;br /&gt;
The information obtained can be used by an attacker to gain a list of users on system. This information can be used to attack the web application, for example, through a brute force or default username/password attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
The tester should interact with the authentication mechanism of the application to understand if sending particular requests causes the application to answer in different manners. This issue can be exists because the information released from web application or web server, when we provide a valid username is different than we use an invalid usename.&lt;br /&gt;
&lt;br /&gt;
In some cases, we can receive a message that reveals if the provided credentials are wrong because an invalid username or an invalid password was used. Sometimes, we can enumerate the existing users by sending a username and an empty password. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In a black box testing, we know nothing about the specific application, username, application logic and error messages on login page, or password recovery facilities.&lt;br /&gt;
If the applications is vulnerable, we receive a response message that reveals, directly or indirectly, some information useful for enumerating users. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''HTTP Response message''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for Valid user/right password''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Record the server answer when you submit a valid userID and valid password.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this successful authentication (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing for valid user/wrong password''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert a valid userID and a wrong password and record the error message generated by the application.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
From the browser we will expect message similar to the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:AuthenticationFailed.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or something like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:NoConfFound.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again any message that reveal the existence of user, for istance message similar to:&amp;lt;br&amp;gt; 	&lt;br /&gt;
 Login for User foo: invalid password&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using WebScarab, notice the information retrieved from this unsuccessful authentication attempt (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for a nonexistent username''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert an invalid userID and a wrong password and record the server answer (you should be confident that the username is not valid in the application). Record the error message and the server answer.&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If we enter a nonexistent userID, we can receive a message similar to:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Userisnotactive.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
or message like the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
 Login failed for User foo: invalid Account&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally the application should respond with the same error message and length to the different wrong requests. If you notice that the responses are not the same, you should investigate and find out the key that creates a difference between the 2 requests. For example: &lt;br /&gt;
* Client request: Valid user/wrong password --&amp;gt; Server answer:'The password is not correct'&lt;br /&gt;
* Client request: Wrong user/wrong password --&amp;gt; Server answer:'User not recognized'&lt;br /&gt;
The above responses let the client understand that for the first request we have a valid user name. So we can interact with the application requesting a set of possible userIDs and observing the answer.&amp;lt;br&amp;gt;&lt;br /&gt;
Looking at the second server response, we understand in the same way that we don't hold a valid username. So we can interact in the same manner and create a list of valid userID looking at the server answers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Other way to enumerate users''' &amp;lt;br&amp;gt;&lt;br /&gt;
We can enumerate users in other several ways, such as: &amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing the error code received on login pages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Some web application release a specific error code or message that we can analyze.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing URLs, and URLs redirections'''&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=baduser&amp;amp;Error=0&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=gooduser&amp;amp;Error=2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see above, when we provides a userID and password to web application, we see a message indication that an error has occurred in the URL. &lt;br /&gt;
In first case we has provides a bad userID and bad password, in second case instead a good user and bad password, so we can identify a valid userID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- URI Probing'''&amp;lt;br&amp;gt;&lt;br /&gt;
Sometime a web server responds differently if receive a request for an existing directories or not. For instance in some portals every users is associated with a directory, if we try to access to an exists directory we could be receive a web server error.&lt;br /&gt;
A very common errors that we can receive from web server is:&amp;lt;br&amp;gt;&lt;br /&gt;
   403 Forbidden error code &lt;br /&gt;
and &amp;lt;br&amp;gt;&lt;br /&gt;
   404 Not found error code&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/account1 - we receive from web server: 403 Forbidden &lt;br /&gt;
 http://www.foo.com/account2 - we receive from web server: 404 file Not Found&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In first case the user exist, but we cannot view the web page, in second case instead the user “account2” doesn’t exist.&lt;br /&gt;
Collecting this information we can enumerate the users.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing Web page Title'''&amp;lt;br&amp;gt;&lt;br /&gt;
We can receive useful information on Title of web page, where we can obtain a specific error code or messages that reveal if the problems are on username or password.&lt;br /&gt;
For instance is common change a web title if we cannot authenticate to an application and receive a very clearly message similar to:&lt;br /&gt;
 Invalid user&lt;br /&gt;
 Invalid authentication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing message received from recovery facilities'''&amp;lt;br&amp;gt; &lt;br /&gt;
When we use a recovery facilities the applications that is vulnerable could be return a message that reveal if a username exist or not.&lt;br /&gt;
&lt;br /&gt;
For example, message similar to the following:&amp;lt;br&amp;gt;&lt;br /&gt;
 Invalid username: e-mail address are not valid or The specified user was not found&lt;br /&gt;
&lt;br /&gt;
 Valid username: Your recovery password has been successfully sent&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-Friendly 404 Error Message'''&amp;lt;br&amp;gt;&lt;br /&gt;
Not always when we made a request for a user within the directory that is sure to not exist we receive 404 error code, we receive instead “200 ok” with an image, in this case we can assume that when we receive the specific image the users doesn’t exist. This logic can be applied to other web server response; the trick is a good analysis of web server and web application messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Guessing Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
In some case the userIDs are created with specific policies of administrator or company.  &lt;br /&gt;
For example we can view a users with a userID created in sequential order:&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000100&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000101&amp;lt;br&amp;gt;&lt;br /&gt;
		…. &amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes the username are created with a REALM alias and then a sequential numbers:&amp;lt;br&amp;gt;&lt;br /&gt;
		R1001 – user 001 for REALM1&amp;lt;br&amp;gt;&lt;br /&gt;
	 	R2001 – user 001 for REALM2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Other possibilities are userIDs associated with credit card numbers, or in general a numbers with a pattern. &lt;br /&gt;
In the above sample we can create simple shell scripts that compose a UserIDs and submit a request with tool like wget to automate a web query to discern valid userIDs.&lt;br /&gt;
To create a script we can use also Perl and CURL &lt;br /&gt;
  &lt;br /&gt;
Again, we can guess a users from the information received from an LDAP query or from a google information gathering for example from a specific domain.&lt;br /&gt;
Google for example can helps to find domain users through a specific queries or through a simple tools like finger google.&lt;br /&gt;
&lt;br /&gt;
For other information about guessing userIDs see next paragraph 4.5.3 Testing for Guessable (Dictionary) User Account.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Attention:''' by enumerating user accounts, you risk to lock out accounts after a predefined number of failed probes (based on application policy). Also, sometimes, our IP address can be banned by dynamic rules on the application firewall.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Authentication error messages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the application answers in the same manner for every client request that produces a failed authentication. For this issue the Black Box testing and  Gray Box testing are the same concept based on the analysis of messages or error codes received from web application.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The application should answer in the same manner for every failed attempt of authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
For Example: &amp;lt;br&amp;gt;&lt;br /&gt;
 Credentials submitted are not valid&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab: [[OWASP_WebScarab_Project]]&lt;br /&gt;
* CURL: http://curl.haxx.se/&lt;br /&gt;
* PERL: http://www.perl.org&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38173</id>
		<title>Testing for User Enumeration and Guessable User Account (OWASP-AT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38173"/>
				<updated>2008-09-03T12:03:00Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Description of the Issue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
The scope of this test is to verify if is possible to collect a set of valid usernames by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
Often, web applications reveal when a username exists on system, either as a consequence of a misconfiguration or as a design decision. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;br /&gt;
The information obtained can be used by an attacker to gain a list of users on system. This information can be used to attack the web application, for example, through a brute force or default username/password attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
The tester should interact with the authentication mechanism of the application to understand if sending particular requests causes the application to answer in different manners. This issue can be exists because the information released from web application or web server, when we provide a valid username is different than we use an invalid usename.&lt;br /&gt;
&lt;br /&gt;
In some cases, we can receive a message that reveals if the provided credentials are wrong because an invalid username or an invalid password was used. Sometimes, we can enumerate the existing users by sending a username and an empty password. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In a black box testing, we know nothing about the specific application, username, application logic and error messages on login page, or password recovery facilities.&lt;br /&gt;
If the applications is vulnerable, we receive a response message that reveals, directly or indirectly, some information useful for enumerating users. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''HTTP Response message''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for Valid user/right password''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Record the server answer when you submit a valid userID and valid password.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this successful authentication (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing for valid user/wrong password''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert a valid userID and a wrong password and record the error message generated by the application.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
From the browser we will expect message similar to the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:AuthenticationFailed.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or something like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:NoConfFound.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again any message that reveal the existence of user, for istance message similar to:&amp;lt;br&amp;gt; 	&lt;br /&gt;
 Login for User foo: invalid password&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using WebScarab, notice the information retrieved from this unsuccessful authentication attempt (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for a nonexistent username''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert an invalid userID and a wrong password and record the server answer (you should be confident that the username is not valid in the application). Record the error message and the server answer.&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If we enter a nonexistent userID, we can receive a message similar to:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Userisnotactive.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
or message like the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
 Login failed for User foo: invalid Account&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally the application should respond with the same error message and length to the different wrong requests. If you notice that the responses are not the same, you should investigate and find out the key that creates a difference between the 2 requests. For example: &lt;br /&gt;
* Client request: Valid user/wrong password --&amp;gt; Server answer:'The password is not correct'&lt;br /&gt;
* Client request: Wrong user/wrong password --&amp;gt; Server answer:'User not recognized'&lt;br /&gt;
The above responses let the client understand that for the first request we have a valid user name. So we can interact with the application requesting a set of possible userIDs and observing the answer.&amp;lt;br&amp;gt;&lt;br /&gt;
Looking at the second server response, we understand in the same way that we don't hold a valid username. So we can interact in the same manner and create a list of valid userID looking at the server answers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Other way to enumerate users''' &amp;lt;br&amp;gt;&lt;br /&gt;
We can enumerate users in other several ways, such as: &amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing the error code received on login pages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Some web application release a specific error code or message that we can analyze.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing URLs, and URLs redirections'''&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=baduser&amp;amp;Error=0&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=gooduser&amp;amp;Error=2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see above, when we provides a userID and password to web application, we see a message indication that an error has occurred in the URL. &lt;br /&gt;
In first case we has provides a bad userID and bad password, in second case instead a good user and bad password, so we can identify a valid userID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- URI Probing'''&amp;lt;br&amp;gt;&lt;br /&gt;
Sometime a web server responds differently if receive a request for an existing directories or not. For instance in some portals every users is associated with a directory, if we try to access to an exists directory we could be receive a web server error.&lt;br /&gt;
A very common errors that we can receive from web server is:&amp;lt;br&amp;gt;&lt;br /&gt;
   403 Forbidden error code &lt;br /&gt;
and &amp;lt;br&amp;gt;&lt;br /&gt;
   404 Not found error code&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/account1 - we receive from web server: 403 Forbidden &lt;br /&gt;
 http://www.foo.com/account2 - we receive from web server: 404 file Not Found&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In first case the user exist, but we cannot view the web page, in second case instead the user “account2” doesn’t exist.&lt;br /&gt;
Collecting this information we can enumerate the users.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing Web page Title'''&amp;lt;br&amp;gt;&lt;br /&gt;
We can receive useful information on Title of web page, where we can obtain a specific error code or messages that reveal if the problems are on username or password.&lt;br /&gt;
For instance is common change a web title if we cannot authenticate to an application and receive a very clearly message similar to:&lt;br /&gt;
 Invalid user&lt;br /&gt;
 Invalid authentication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing message received from recovery facilities'''&amp;lt;br&amp;gt; &lt;br /&gt;
When we use a recovery facilities the applications that is vulnerable could be return a message that reveal if a username exist or not.&lt;br /&gt;
&lt;br /&gt;
For example, message similar to the following:&amp;lt;br&amp;gt;&lt;br /&gt;
 Invalid username: e-mail address are not valid or The specified user was not found&lt;br /&gt;
&lt;br /&gt;
 Valid username: Your recovery password has been successfully sent&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-Friendly 404 Error Message'''&amp;lt;br&amp;gt;&lt;br /&gt;
Not always when we made a request for a user within the directory that is sure to not exist we receive 404 error code, we receive instead “200 ok” with an image, in this case we can assume that when we receive the specific image the users doesn’t exist. This logic can be applied to other web server response; the trick is a good analysis of web server and web application messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Guessing Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
In some case the userIDs are created with specific policies of administrator or company.  &lt;br /&gt;
For example we can view a users with a userID created in sequential order:&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000100&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000101&amp;lt;br&amp;gt;&lt;br /&gt;
		…. &amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes the username are created with a REALM alias and then a sequential numbers:&amp;lt;br&amp;gt;&lt;br /&gt;
		R1001 – user 001 for REALM1&amp;lt;br&amp;gt;&lt;br /&gt;
	 	R2001 – user 001 for REALM2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Other possibilities are userIDs associated with credit card numbers, or in general a numbers with a pattern. &lt;br /&gt;
In the above sample we can create simple shell scripts that compose a UserIDs and submit a request with tool like wget to automate a web query to discern valid userIDs.&lt;br /&gt;
To create a script we can use also Perl and CURL &lt;br /&gt;
  &lt;br /&gt;
Again, we can guess a users from the information received from an LDAP query or from a google information gathering for example from a specific domain.&lt;br /&gt;
From google we can found for example a email address that can be used for users enumeration. (finger google…)&lt;br /&gt;
&lt;br /&gt;
For other information about guessing userIDs see next paragraph 4.5.3 Testing for Guessable (Dictionary) User Account.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Attention:''' by enumerating user accounts, you risk to lock out accounts after a predefined number of failed probes (based on application policy). Also, sometimes, our IP address can be banned by dynamic rules on the application firewall.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Authentication error messages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the application answers in the same manner for every client request that produces a failed authentication. For this issue the Black Box testing and  Gray Box testing are the same concept based on the analysis of messages or error codes received from web application.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The application should answer in the same manner for every failed attempt of authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
For Example: &amp;lt;br&amp;gt;&lt;br /&gt;
 Credentials submitted are not valid&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab: [[OWASP_WebScarab_Project]]&lt;br /&gt;
* CURL: http://curl.haxx.se/&lt;br /&gt;
* PERL: http://www.perl.org&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38172</id>
		<title>Testing for User Enumeration and Guessable User Account (OWASP-AT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38172"/>
				<updated>2008-09-03T11:47:11Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
The scope of this test is to verify if is possible to collect a set of valid usernames by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
Often, web applications reveal when a username exists on system, either as a consequence of a misconfiguration or as a design decision. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;br /&gt;
The information obtained can be used by an attacker to gain a list of users on system. This information can be used to attack the web application, for example, through a brute force or default username/password attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
The tester should interact with the authentication mechanism of the application to understand if sending particular requests causes the application to answer in different manners. This issue can be exists because the information released from applications responds to a valid username differently than a username is invalid.&lt;br /&gt;
In some cases, we can receive a message that reveals if the provided credentials are wrong because an invalid username or an invalid password was used. Sometimes, we can enumerate the existing users by sending a username and an empty password. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In a black box testing, we know nothing about the specific application, username, application logic and error messages on login page, or password recovery facilities.&lt;br /&gt;
If the applications is vulnerable, we receive a response message that reveals, directly or indirectly, some information useful for enumerating users. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''HTTP Response message''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for Valid user/right password''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Record the server answer when you submit a valid userID and valid password.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this successful authentication (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing for valid user/wrong password''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert a valid userID and a wrong password and record the error message generated by the application.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
From the browser we will expect message similar to the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:AuthenticationFailed.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or something like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:NoConfFound.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again any message that reveal the existence of user, for istance message similar to:&amp;lt;br&amp;gt; 	&lt;br /&gt;
 Login for User foo: invalid password&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using WebScarab, notice the information retrieved from this unsuccessful authentication attempt (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for a nonexistent username''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert an invalid userID and a wrong password and record the server answer (you should be confident that the username is not valid in the application). Record the error message and the server answer.&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If we enter a nonexistent userID, we can receive a message similar to:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Userisnotactive.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
or message like the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
 Login failed for User foo: invalid Account&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally the application should respond with the same error message and length to the different wrong requests. If you notice that the responses are not the same, you should investigate and find out the key that creates a difference between the 2 requests. For example: &lt;br /&gt;
* Client request: Valid user/wrong password --&amp;gt; Server answer:'The password is not correct'&lt;br /&gt;
* Client request: Wrong user/wrong password --&amp;gt; Server answer:'User not recognized'&lt;br /&gt;
The above responses let the client understand that for the first request we have a valid user name. So we can interact with the application requesting a set of possible userIDs and observing the answer.&amp;lt;br&amp;gt;&lt;br /&gt;
Looking at the second server response, we understand in the same way that we don't hold a valid username. So we can interact in the same manner and create a list of valid userID looking at the server answers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Other way to enumerate users''' &amp;lt;br&amp;gt;&lt;br /&gt;
We can enumerate users in other several ways, such as: &amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing the error code received on login pages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Some web application release a specific error code or message that we can analyze.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing URLs, and URLs redirections'''&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=baduser&amp;amp;Error=0&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=gooduser&amp;amp;Error=2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see above, when we provides a userID and password to web application, we see a message indication that an error has occurred in the URL. &lt;br /&gt;
In first case we has provides a bad userID and bad password, in second case instead a good user and bad password, so we can identify a valid userID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- URI Probing'''&amp;lt;br&amp;gt;&lt;br /&gt;
Sometime a web server responds differently if receive a request for an existing directories or not. For instance in some portals every users is associated with a directory, if we try to access to an exists directory we could be receive a web server error.&lt;br /&gt;
A very common errors that we can receive from web server is:&amp;lt;br&amp;gt;&lt;br /&gt;
   403 Forbidden error code &lt;br /&gt;
and &amp;lt;br&amp;gt;&lt;br /&gt;
   404 Not found error code&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/account1 - we receive from web server: 403 Forbidden &lt;br /&gt;
 http://www.foo.com/account2 - we receive from web server: 404 file Not Found&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In first case the user exist, but we cannot view the web page, in second case instead the user “account2” doesn’t exist.&lt;br /&gt;
Collecting this information we can enumerate the users.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing Web page Title'''&amp;lt;br&amp;gt;&lt;br /&gt;
We can receive useful information on Title of web page, where we can obtain a specific error code or messages that reveal if the problems are on username or password.&lt;br /&gt;
For instance is common change a web title if we cannot authenticate to an application and receive a very clearly message similar to:&lt;br /&gt;
 Invalid user&lt;br /&gt;
 Invalid authentication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing message received from recovery facilities'''&amp;lt;br&amp;gt; &lt;br /&gt;
When we use a recovery facilities the applications that is vulnerable could be return a message that reveal if a username exist or not.&lt;br /&gt;
&lt;br /&gt;
For example, message similar to the following:&amp;lt;br&amp;gt;&lt;br /&gt;
 Invalid username: e-mail address are not valid or The specified user was not found&lt;br /&gt;
&lt;br /&gt;
 Valid username: Your recovery password has been successfully sent&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-Friendly 404 Error Message'''&amp;lt;br&amp;gt;&lt;br /&gt;
Not always when we made a request for a user within the directory that is sure to not exist we receive 404 error code, we receive instead “200 ok” with an image, in this case we can assume that when we receive the specific image the users doesn’t exist. This logic can be applied to other web server response; the trick is a good analysis of web server and web application messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Guessing Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
In some case the userIDs are created with specific policies of administrator or company.  &lt;br /&gt;
For example we can view a users with a userID created in sequential order:&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000100&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000101&amp;lt;br&amp;gt;&lt;br /&gt;
		…. &amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes the username are created with a REALM alias and then a sequential numbers:&amp;lt;br&amp;gt;&lt;br /&gt;
		R1001 – user 001 for REALM1&amp;lt;br&amp;gt;&lt;br /&gt;
	 	R2001 – user 001 for REALM2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Other possibilities are userIDs associated with credit card numbers, or in general a numbers with a pattern. &lt;br /&gt;
In the above sample we can create simple shell scripts that compose a UserIDs and submit a request with tool like wget to automate a web query to discern valid userIDs.&lt;br /&gt;
To create a script we can use also Perl and CURL &lt;br /&gt;
  &lt;br /&gt;
Again, we can guess a users from the information received from an LDAP query or from a google information gathering for example from a specific domain.&lt;br /&gt;
From google we can found for example a email address that can be used for users enumeration. (finger google…)&lt;br /&gt;
&lt;br /&gt;
For other information about guessing userIDs see next paragraph 4.5.3 Testing for Guessable (Dictionary) User Account.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Attention:''' by enumerating user accounts, you risk to lock out accounts after a predefined number of failed probes (based on application policy). Also, sometimes, our IP address can be banned by dynamic rules on the application firewall.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Authentication error messages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the application answers in the same manner for every client request that produces a failed authentication. For this issue the Black Box testing and  Gray Box testing are the same concept based on the analysis of messages or error codes received from web application.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The application should answer in the same manner for every failed attempt of authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
For Example: &amp;lt;br&amp;gt;&lt;br /&gt;
 Credentials submitted are not valid&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab: [[OWASP_WebScarab_Project]]&lt;br /&gt;
* CURL: http://curl.haxx.se/&lt;br /&gt;
* PERL: http://www.perl.org&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38171</id>
		<title>Testing for User Enumeration and Guessable User Account (OWASP-AT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38171"/>
				<updated>2008-09-03T11:44:08Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Gray Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
The scope of this test is to verify if is possible to collect a set of valid usernames by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
Often, web applications reveal when a username exists on system, either as a consequence of a misconfiguration or as a design decision. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;br /&gt;
The information obtained can be used by an attacker to gain a list of users on system. This information can be used to attack the web application, for example, through a brute force or default username/password attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
The tester should interact with the authentication mechanism of the application to understand if sending particular requests causes the application to answer in different manners. This issue can be exists because the information released from applications responds to a valid username differently than a username is invalid.&lt;br /&gt;
In some cases, we can receive a message that reveals if the provided credentials are wrong because an invalid username or an invalid password was used. Sometimes, we can enumerate the existing users by sending a username and an empty password. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In a black box testing, we know nothing about the specific application, username, application logic and error messages on login page, or password recovery facilities.&lt;br /&gt;
If the applications is vulnerable, we receive a response message that reveals, directly or indirectly, some information useful for enumerating users. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''HTTP Response message''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for Valid user/right password''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Record the server answer when you submit a valid userID and valid password.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this successful authentication (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing for valid user/wrong password''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert a valid userID and a wrong password and record the error message generated by the application.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
From the browser we will expect message similar to the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:AuthenticationFailed.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or something like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:NoConfFound.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again any message that reveal the existence of user, for istance message similar to:&amp;lt;br&amp;gt; 	&lt;br /&gt;
 Login for User foo: invalid password&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using WebScarab, notice the information retrieved from this unsuccessful authentication attempt (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for a nonexistent username''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert an invalid userID and a wrong password and record the server answer (you should be confident that the username is not valid in the application). Record the error message and the server answer.&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If we enter a nonexistent userID, we can receive a message similar to:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Userisnotactive.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
or message like the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
 Login failed for User foo: invalid Account&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally the application should respond with the same error message and length to the different wrong requests. If you notice that the responses are not the same, you should investigate and find out the key that creates a difference between the 2 requests. For example: &lt;br /&gt;
* Client request: Valid user/wrong password --&amp;gt; Server answer:'The password is not correct'&lt;br /&gt;
* Client request: Wrong user/wrong password --&amp;gt; Server answer:'User not recognized'&lt;br /&gt;
The above responses let the client understand that for the first request we have a valid user name. So we can interact with the application requesting a set of possible userIDs and observing the answer.&amp;lt;br&amp;gt;&lt;br /&gt;
Looking at the second server response, we understand in the same way that we don't hold a valid username. So we can interact in the same manner and create a list of valid userID looking at the server answers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Other way to enumerate users''' &amp;lt;br&amp;gt;&lt;br /&gt;
We can enumerate users in other several ways, such as: &amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing the error code received on login pages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Some web application release a specific error code or message that we can analyze.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing URLs, and URLs redirections'''&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=baduser&amp;amp;Error=0&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=gooduser&amp;amp;Error=2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see above, when we provides a userID and password to web application, we see a message indication that an error has occurred in the URL. &lt;br /&gt;
In first case we has provides a bad userID and bad password, in second case instead a good user and bad password, so we can identify a valid userID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- URI Probing'''&amp;lt;br&amp;gt;&lt;br /&gt;
Sometime a web server responds differently if receive a request for an existing directories or not. For instance in some portals every users is associated with a directory, if we try to access to an exists directory we could be receive a web server error.&lt;br /&gt;
A very common errors that we can receive from web server is:&amp;lt;br&amp;gt;&lt;br /&gt;
   403 Forbidden error code &lt;br /&gt;
and &amp;lt;br&amp;gt;&lt;br /&gt;
   404 Not found error code&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/account1 - we receive from web server: 403 Forbidden &lt;br /&gt;
 http://www.foo.com/account2 - we receive from web server: 404 file Not Found&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In first case the user exist, but we cannot view the web page, in second case instead the user “account2” doesn’t exist.&lt;br /&gt;
Collecting this information we can enumerate the users.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing Web page Title'''&amp;lt;br&amp;gt;&lt;br /&gt;
We can receive useful information on Title of web page, where we can obtain a specific error code or messages that reveal if the problems are on username or password.&lt;br /&gt;
For instance is common change a web title if we cannot authenticate to an application and receive a very clearly message similar to:&lt;br /&gt;
 Invalid user&lt;br /&gt;
 Invalid authentication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing message received from recovery facilities'''&amp;lt;br&amp;gt; &lt;br /&gt;
When we use a recovery facilities the applications that is vulnerable could be return a message that reveal if a username exist or not.&lt;br /&gt;
&lt;br /&gt;
For example, message similar to the following:&amp;lt;br&amp;gt;&lt;br /&gt;
 Invalid username: e-mail address are not valid or The specified user was not found&lt;br /&gt;
&lt;br /&gt;
 Valid username: Your recovery password has been successfully sent&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-Friendly 404 Error Message'''&amp;lt;br&amp;gt;&lt;br /&gt;
Not always when we made a request for a user within the directory that is sure to not exist we receive 404 error code, we receive instead “200 ok” with an image, in this case we can assume that when we receive the specific image the users doesn’t exist. This logic can be applied to other web server response; the trick is a good analysis of web server and web application messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Guessing Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
In some case the userIDs are created with specific policies of administrator or company.  &lt;br /&gt;
For example we can view a users with a userID created in sequential order:&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000100&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000101&amp;lt;br&amp;gt;&lt;br /&gt;
		…. &amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes the username are created with a REALM alias and then a sequential numbers:&amp;lt;br&amp;gt;&lt;br /&gt;
		R1001 – user 001 for REALM1&amp;lt;br&amp;gt;&lt;br /&gt;
	 	R2001 – user 001 for REALM2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Other possibilities are userIDs associated with credit card numbers, or in general a numbers with a pattern. &lt;br /&gt;
In the above sample we can create simple shell scripts that compose a UserIDs and submit a request with tool like wget to automate a web query to discern valid userIDs.&lt;br /&gt;
To create a script we can use also Perl and CURL &lt;br /&gt;
  &lt;br /&gt;
Again, we can guess a users from the information received from an LDAP query or from a google information gathering for example from a specific domain.&lt;br /&gt;
From google we can found for example a email address that can be used for users enumeration. (finger google…)&lt;br /&gt;
&lt;br /&gt;
For other information about guessing userIDs see next paragraph 4.5.3 Testing for Guessable (Dictionary) User Account.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Attention:''' by enumerating user accounts, you risk to lock out accounts after a predefined number of failed probes (based on application policy). Also, sometimes, our IP address can be banned by dynamic rules on the application firewall.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Authentication error messages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the application answers in the same manner for every client request that produces a failed authentication. For this issue the Black Box testing and  Gray Box testing are the same concept based on the analysis of messages or error codes received from web application.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The application should answer in the same manner for every failed attempt of authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
For Example: &amp;lt;br&amp;gt;&lt;br /&gt;
 Credentials submitted are not valid&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab: [[OWASP_WebScarab_Project]]&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38169</id>
		<title>Testing for User Enumeration and Guessable User Account (OWASP-AT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38169"/>
				<updated>2008-09-03T11:43:02Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Black Box testing and example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
The scope of this test is to verify if is possible to collect a set of valid usernames by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
Often, web applications reveal when a username exists on system, either as a consequence of a misconfiguration or as a design decision. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;br /&gt;
The information obtained can be used by an attacker to gain a list of users on system. This information can be used to attack the web application, for example, through a brute force or default username/password attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
The tester should interact with the authentication mechanism of the application to understand if sending particular requests causes the application to answer in different manners. This issue can be exists because the information released from applications responds to a valid username differently than a username is invalid.&lt;br /&gt;
In some cases, we can receive a message that reveals if the provided credentials are wrong because an invalid username or an invalid password was used. Sometimes, we can enumerate the existing users by sending a username and an empty password. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In a black box testing, we know nothing about the specific application, username, application logic and error messages on login page, or password recovery facilities.&lt;br /&gt;
If the applications is vulnerable, we receive a response message that reveals, directly or indirectly, some information useful for enumerating users. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''HTTP Response message''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for Valid user/right password''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Record the server answer when you submit a valid userID and valid password.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this successful authentication (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing for valid user/wrong password''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert a valid userID and a wrong password and record the error message generated by the application.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
From the browser we will expect message similar to the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:AuthenticationFailed.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or something like:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:NoConfFound.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again any message that reveal the existence of user, for istance message similar to:&amp;lt;br&amp;gt; 	&lt;br /&gt;
 Login for User foo: invalid password&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using WebScarab, notice the information retrieved from this unsuccessful authentication attempt (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for a nonexistent username''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert an invalid userID and a wrong password and record the server answer (you should be confident that the username is not valid in the application). Record the error message and the server answer.&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If we enter a nonexistent userID, we can receive a message similar to:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Userisnotactive.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
or message like the following one:&amp;lt;br&amp;gt;&lt;br /&gt;
 Login failed for User foo: invalid Account&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally the application should respond with the same error message and length to the different wrong requests. If you notice that the responses are not the same, you should investigate and find out the key that creates a difference between the 2 requests. For example: &lt;br /&gt;
* Client request: Valid user/wrong password --&amp;gt; Server answer:'The password is not correct'&lt;br /&gt;
* Client request: Wrong user/wrong password --&amp;gt; Server answer:'User not recognized'&lt;br /&gt;
The above responses let the client understand that for the first request we have a valid user name. So we can interact with the application requesting a set of possible userIDs and observing the answer.&amp;lt;br&amp;gt;&lt;br /&gt;
Looking at the second server response, we understand in the same way that we don't hold a valid username. So we can interact in the same manner and create a list of valid userID looking at the server answers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Other way to enumerate users''' &amp;lt;br&amp;gt;&lt;br /&gt;
We can enumerate users in other several ways, such as: &amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing the error code received on login pages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Some web application release a specific error code or message that we can analyze.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing URLs, and URLs redirections'''&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=baduser&amp;amp;Error=0&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/err.jsp?User=gooduser&amp;amp;Error=2&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we can see above, when we provides a userID and password to web application, we see a message indication that an error has occurred in the URL. &lt;br /&gt;
In first case we has provides a bad userID and bad password, in second case instead a good user and bad password, so we can identify a valid userID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- URI Probing'''&amp;lt;br&amp;gt;&lt;br /&gt;
Sometime a web server responds differently if receive a request for an existing directories or not. For instance in some portals every users is associated with a directory, if we try to access to an exists directory we could be receive a web server error.&lt;br /&gt;
A very common errors that we can receive from web server is:&amp;lt;br&amp;gt;&lt;br /&gt;
   403 Forbidden error code &lt;br /&gt;
and &amp;lt;br&amp;gt;&lt;br /&gt;
   404 Not found error code&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example&amp;lt;br&amp;gt;&lt;br /&gt;
 http://www.foo.com/account1 - we receive from web server: 403 Forbidden &lt;br /&gt;
 http://www.foo.com/account2 - we receive from web server: 404 file Not Found&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In first case the user exist, but we cannot view the web page, in second case instead the user “account2” doesn’t exist.&lt;br /&gt;
Collecting this information we can enumerate the users.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''- Analyzing Web page Title'''&amp;lt;br&amp;gt;&lt;br /&gt;
We can receive useful information on Title of web page, where we can obtain a specific error code or messages that reveal if the problems are on username or password.&lt;br /&gt;
For instance is common change a web title if we cannot authenticate to an application and receive a very clearly message similar to:&lt;br /&gt;
 Invalid user&lt;br /&gt;
 Invalid authentication&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''- Analyzing message received from recovery facilities'''&amp;lt;br&amp;gt; &lt;br /&gt;
When we use a recovery facilities the applications that is vulnerable could be return a message that reveal if a username exist or not.&lt;br /&gt;
&lt;br /&gt;
For example, message similar to the following:&amp;lt;br&amp;gt;&lt;br /&gt;
 Invalid username: e-mail address are not valid or The specified user was not found&lt;br /&gt;
&lt;br /&gt;
 Valid username: Your recovery password has been successfully sent&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-Friendly 404 Error Message'''&amp;lt;br&amp;gt;&lt;br /&gt;
Not always when we made a request for a user within the directory that is sure to not exist we receive 404 error code, we receive instead “200 ok” with an image, in this case we can assume that when we receive the specific image the users doesn’t exist. This logic can be applied to other web server response; the trick is a good analysis of web server and web application messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Guessing Users'''&amp;lt;br&amp;gt;&lt;br /&gt;
In some case the userIDs are created with specific policies of administrator or company.  &lt;br /&gt;
For example we can view a users with a userID created in sequential order:&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000100&amp;lt;br&amp;gt;&lt;br /&gt;
		CN000101&amp;lt;br&amp;gt;&lt;br /&gt;
		…. &amp;lt;br&amp;gt;&lt;br /&gt;
Sometimes the username are created with a REALM alias and then a sequential numbers:&amp;lt;br&amp;gt;&lt;br /&gt;
		R1001 – user 001 for REALM1&amp;lt;br&amp;gt;&lt;br /&gt;
	 	R2001 – user 001 for REALM2&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Other possibilities are userIDs associated with credit card numbers, or in general a numbers with a pattern. &lt;br /&gt;
In the above sample we can create simple shell scripts that compose a UserIDs and submit a request with tool like wget to automate a web query to discern valid userIDs.&lt;br /&gt;
To create a script we can use also Perl and CURL &lt;br /&gt;
  &lt;br /&gt;
Again, we can guess a users from the information received from an LDAP query or from a google information gathering for example from a specific domain.&lt;br /&gt;
From google we can found for example a email address that can be used for users enumeration. (finger google…)&lt;br /&gt;
&lt;br /&gt;
For other information about guessing userIDs see next paragraph 4.5.3 Testing for Guessable (Dictionary) User Account.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Attention:''' by enumerating user accounts, you risk to lock out accounts after a predefined number of failed probes (based on application policy). Also, sometimes, our IP address can be banned by dynamic rules on the application firewall.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Authentication error messages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the application answers in the same manner for every client request that produces a failed authentication. For this issue the Black Box testing and  Gray Box testing are the same concept based on the analysis of messages or error codes received from web application.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The application should answer in the same manner for every failed attempt of authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
For Example: &amp;lt;br&amp;gt;&lt;br /&gt;
'Credentials submitted are not valid'&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab: [[OWASP_WebScarab_Project]]&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:NoConfFound.jpg&amp;diff=38143</id>
		<title>File:NoConfFound.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:NoConfFound.jpg&amp;diff=38143"/>
				<updated>2008-09-03T10:21:30Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: uploaded a new version of &amp;quot;Image:NoConfFound.jpg&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:NoConfFound.jpg&amp;diff=38141</id>
		<title>File:NoConfFound.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:NoConfFound.jpg&amp;diff=38141"/>
				<updated>2008-09-03T10:13:33Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:No_conf_found.png&amp;diff=38140</id>
		<title>File:No conf found.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:No_conf_found.png&amp;diff=38140"/>
				<updated>2008-09-03T10:11:25Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38139</id>
		<title>Testing for User Enumeration and Guessable User Account (OWASP-AT-002)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_User_Enumeration_and_Guessable_User_Account_(OWASP-AT-002)&amp;diff=38139"/>
				<updated>2008-09-03T09:53:33Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* Description of the Issue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
The scope of this test is to verify if is possible to collect a set of valid usernames by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
Often, web applications reveal when a username exists on system, either as a consequence of a misconfiguration or as a design decision. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;br /&gt;
The information obtained can be used by an attacker to gain a list of users on system. This information can be used to attack the web application, for example, through a brute force or default username/password attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
The tester should interact with the authentication mechanism of the application to understand if sending particular requests causes the application to answer in different manners. This issue can be exists because the information released from applications responds to a valid username differently than a username is invalid.&lt;br /&gt;
In some cases, we can receive a message that reveals if the provided credentials are wrong because an invalid username or an invalid password was used. Sometimes, we can enumerate the existing users by sending a username and an empty password. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In a black box testing, we know nothing about the specific application, username, application logic and error messages on login page, or password recovery facilities.&lt;br /&gt;
If the applications is vulnerable, we receive a response message that reveals, directly or indirectly, some information useful for enumerating users. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for Valid user/right password''' &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Record the server answer when you submit a valid username and valid password.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this successful authentication (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for valid user/wrong password''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert a valid username and a wrong password and record the error message generated by the application.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
From the browser we will expect the following messsage:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:AuthenticationFailed.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
Using WebScarab, notice the information retrieved from this unsuccessful authentication attempt (HTTP 200 Response, length of the response).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Testing for a nonexistent username''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now, the tester should try to insert an invalid username and a wrong password and record the server answer (you should be confident that the username is not valid in the application). Record the error message and the server answer.&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If we enter a nonexistent username, we can receive a message similar to:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Userisnotactive.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
or a message such as &amp;quot;Login failed for User foo: invalid Account&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
The application should respond with the same error message and length to the different wrong requests.&lt;br /&gt;
If you notice that the responses are not the same, you should investigate and find out the key that creates a difference between the 2 requests. For example:&lt;br /&gt;
* Client request: Valid user/wrong password --&amp;gt; Server answer:'The password is not correct'&lt;br /&gt;
* Client request: Wrong user/wrong password --&amp;gt; Server answer:'User not recognized'&lt;br /&gt;
The above responses let the client understand that for the first request we have a valid user name. So we can interact with the application requesting a set of possible usernames and observing the answer.&amp;lt;br&amp;gt;&lt;br /&gt;
Looking at the second server response, we understand in the same way that we don't hold a valid user name. So we can interact in the same manner and create a list of valid username looking at the server answers.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Other user enumeration tests''' &amp;lt;br&amp;gt;&lt;br /&gt;
We can enumerate users in other several ways, such as: &lt;br /&gt;
- Analyzing the error code received on login pages, or recovery facilities &lt;br /&gt;
- Analyzing URLs and URLs redirections&lt;br /&gt;
- Analyzing web page titles&lt;br /&gt;
&lt;br /&gt;
In some case, for example, we can receive useful information from the title of web page, which, by using a specific error code or messages, reveals if the wrong component of the credentials is the username or the password.&lt;br /&gt;
&lt;br /&gt;
Attention: by enumerating user accounts, you risk to lock out accounts after a predefined number of failed probes (based on application policy). Also, sometimes, our IP address can be banned by dynamic rules on the firewall.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
'''Testing for Authentication error messages'''&amp;lt;br&amp;gt;&lt;br /&gt;
Verify that the application answers in the same manner for every client request that produces a failed authentication. For this issue the Black Box testing and  Gray Box testing are the same concept based on the analysis of messages or error codes received from web application.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Result Expected:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The application should answer in the same manner for every failed attempt of authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
For Example: &amp;lt;br&amp;gt;&lt;br /&gt;
'Credentials submitted are not valid'&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
...&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* WebScarab: [[OWASP_WebScarab_Project]]&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=16248</id>
		<title>Testing for Web Application Fingerprint (OWASP-IG-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=16248"/>
				<updated>2007-02-07T15:59:28Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[http://www.owasp.org/index.php/Web_Application_Penetration_Testing_AoC Up]]&amp;lt;br&amp;gt;&lt;br /&gt;
{{Template:OWASP Testing Guide v2}}&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
Web server fingerprinting is a critical task for the Penetration tester. Knowing the version and type of a running web server allows testers to determine known vulnerabilities and the appropriate exploits to use during testing.&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue ==&lt;br /&gt;
There are several different vendors and versions of web servers on the market today. Knowing the type of web server that you are testing significantly helps in the testing process, and will also change the course of the test. This information can be derived by sending the web server specific commands and analyzing the output, as each version of web server software may respond differently to these commands. By knowing how each type of web server responds to specific commands and keeping this information in a web server fingerprint database, a penetration tester can send these commands to the web server, analyze the response, and compare it to the database of known signatures. Please note that it usually takes several different commands to accurately identify the web server, as different versions may react similarly to the same command. Rarely, however, do different versions react the same to all HTTP commands. So, by sending several different commands, you increase the accuracy of your guess.&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
The simplest and most basic form of identifying a Web server is to look at the Server field in the HTTP response header. For our experiments we use netcat. &lt;br /&gt;
Consider the following HTTP Request-Response: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc 202.41.76.251 80&lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: Mon, 16 Jun 2003 02:53:29 GMT&lt;br /&gt;
Server: Apache/1.3.3 (Unix)  (Red Hat/Linux)&lt;br /&gt;
Last-Modified: Wed, 07 Oct 1998 11:18:14 GMT&lt;br /&gt;
ETag: &amp;quot;1813-49b-361b4df6&amp;quot;&lt;br /&gt;
Accept-Ranges: bytes&lt;br /&gt;
Content-Length: 1179&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from the ''Server'' field we understand that the server is Apache, version 1.3.3, running on Linux operating system.&lt;br /&gt;
Three examples of the HTTP response headers are shown below:&lt;br /&gt;
&lt;br /&gt;
From an '''Apache 1.3.23''' server: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:10: 49 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From a '''Microsoft IIS 5.0''' server:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Expires: Yours, 17 Jun 2003 01:41: 33 GMT &lt;br /&gt;
Date: Mon, 16 Jun 2003 01:41: 33 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Wed, 28 May 2003 15:32: 21 GMT &lt;br /&gt;
ETag: b0aac0542e25c31: 89d &lt;br /&gt;
Content-Length: 7369 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From a '''Netscape Enterprise 4.1''' server: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:19: 04 GMT &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Last-modified: Wed, 31 Jul 2002 15:37: 56 GMT &lt;br /&gt;
Content-length: 57 &lt;br /&gt;
Accept-ranges: bytes &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From a '''SunONE 6.1''' server:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 14:53:45 GMT&lt;br /&gt;
Content-length: 1186&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Date: Tue, 16 Jan 2007 14:50:31 GMT&lt;br /&gt;
Last-Modified: Wed, 10 Jan 2007 09:58:26 GMT&lt;br /&gt;
Accept-Ranges: bytes&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, this testing methodology is not so good. There are several techniques that allow a web site to obfuscate or to modify the server banner string.&lt;br /&gt;
For example we could obtain the following answer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
403 HTTP/1.1 &lt;br /&gt;
Forbidden Date: Mon, 16 Jun 2003 02:41: 27 GMT &lt;br /&gt;
Server: Unknown-Webserver/1.0 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML; &lt;br /&gt;
charset=iso-8859-1 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case the server field of that response is obfuscated: we cannot know what type of web server is running.&lt;br /&gt;
&lt;br /&gt;
=== Protocol behaviour ===&lt;br /&gt;
Refined techniques of testing take in consideration various characteristics of the several web servers available on the market. We will list some methodologies that allow us to deduce the type of web server in use.&lt;br /&gt;
&lt;br /&gt;
'''HTTP header field ordering'''&lt;br /&gt;
The first method consists of observing the ordering of the several headers in the response. Every web server has an inner ordering of the header. We consider the following answers as an example:&lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:10: 49 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Content-Location: http://iis.example.com/Default.htm &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:13: 52 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Fri, 01 Jan 1999 20:13: 52 GMT &lt;br /&gt;
ETag: W/e0d362a4c335be1: ae1 &lt;br /&gt;
Content-Length: 133 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:01: 40 GMT &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Last-modified: Wed, 31 Jul 2002 15:37: 56 GMT &lt;br /&gt;
Content-length: 57 &lt;br /&gt;
Accept-ranges: bytes &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:23:37 GMT&lt;br /&gt;
Content-length: 0&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:20:26 GMT&lt;br /&gt;
Last-Modified: Wed, 10 Jan 2007 09:58:26 GMT&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can notice that the ordering of the ''Date'' field and the ''Server'' field differs between Apache, Netscape Enterprise and IIS.&lt;br /&gt;
&lt;br /&gt;
'''Malformed requests test''' &lt;br /&gt;
Another useful test to execute involves sending malformed requests or requests of nonexistent pages to the server.&lt;br /&gt;
We consider the following HTTP response: &lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad Request &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:12: 37 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Connection: close &lt;br /&gt;
Transfer: chunked &lt;br /&gt;
Content-Type: text/HTML; charset=iso-8859-1 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Content-Location: http://iis.example.com/Default.htm &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:14: 02 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Fri, 01 Jan 1999 20:14: 02 GMT &lt;br /&gt;
ETag: W/e0d362a4c335be1: ae1 &lt;br /&gt;
Content-Length: 133 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 505 HTTP Version Not Supported &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:04: 04 GMT &lt;br /&gt;
Content-length: 140 &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
GET / HTTP/3.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad request&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:25:00 GMT&lt;br /&gt;
Content-length: 0&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We notice that every server answers in a different way. The answer also differs in the version of the server. An analogous issue comes if we create requests with a non-existant protocol. Consider the following responses: &lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:17: 47 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad Request &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:14: 34 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Content-Length: 87 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;Bad request&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt; &lt;br /&gt;
&amp;lt;BODY&amp;gt;&amp;lt;H1&amp;gt;Bad request&amp;lt;/H1&amp;gt; &lt;br /&gt;
Your browser sent to query this server could not understand. &lt;br /&gt;
&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
GET / JUNK/1.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;Bad request&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt;&lt;br /&gt;
&amp;lt;BODY&amp;gt;&amp;lt;H1&amp;gt;Bad request&amp;lt;/H1&amp;gt;&lt;br /&gt;
Your browser sent a query this server could not understand.&lt;br /&gt;
&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing ===&lt;br /&gt;
The tests to carry out testing can be several. A tool that automates these tests is &amp;quot;''httprint''&amp;quot; that allows one, through a signature dictionary, to recognize the type and the version of the web server in use.&amp;lt;br&amp;gt;&lt;br /&gt;
An example of such tool is shown below:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:httprint.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== OnLine Testing === &lt;br /&gt;
On Line tool that often delivers a lot of informations on target Web Server, very useful for Penetration Testing, is Netcraft.&lt;br /&gt;
With this tool we can retrive informations about Operating System, Web Server used, Server Uptime, Netblock Owner, history of change related to Web server and O.S.&amp;lt;br&amp;gt;&lt;br /&gt;
An example is shown below:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:netcraft.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 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://net-square.com/httprint/httprint_paper.html&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* httprint - http://net-square.com/httprint/index.shtml&lt;br /&gt;
* Netcraft - http://www.netcraft.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Category:OWASP Testing Project AoC}}&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=16243</id>
		<title>Testing for Web Application Fingerprint (OWASP-IG-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=16243"/>
				<updated>2007-02-07T14:38:12Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: /* OnLine Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[http://www.owasp.org/index.php/Web_Application_Penetration_Testing_AoC Up]]&amp;lt;br&amp;gt;&lt;br /&gt;
{{Template:OWASP Testing Guide v2}}&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
Web server fingerprinting is a critical task for the Penetration tester. Knowing the version and type of a running web server allows testers to determine known vulnerabilities and the appropriate exploits to use during testing.&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue ==&lt;br /&gt;
There are several different vendors and versions of web servers on the market today. Knowing the type of web server that you are testing significantly helps in the testing process, and will also change the course of the test. This information can be derived by sending the web server specific commands and analyzing the output, as each version of web server software may respond differently to these commands. By knowing how each type of web server responds to specific commands and keeping this information in a web server fingerprint database, a penetration tester can send these commands to the web server, analyze the response, and compare it to the database of known signatures. Please note that it usually takes several different commands to accurately identify the web server, as different versions may react similarly to the same command. Rarely, however, do different versions react the same to all HTTP commands. So, by sending several different commands, you increase the accuracy of your guess.&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
The simplest and most basic form of identifying a Web server is to look at the Server field in the HTTP response header. For our experiments we use netcat. &lt;br /&gt;
Consider the following HTTP Request-Response: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc 202.41.76.251 80&lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: Mon, 16 Jun 2003 02:53:29 GMT&lt;br /&gt;
Server: Apache/1.3.3 (Unix)  (Red Hat/Linux)&lt;br /&gt;
Last-Modified: Wed, 07 Oct 1998 11:18:14 GMT&lt;br /&gt;
ETag: &amp;quot;1813-49b-361b4df6&amp;quot;&lt;br /&gt;
Accept-Ranges: bytes&lt;br /&gt;
Content-Length: 1179&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from the ''Server'' field we understand that the server is Apache, version 1.3.3, running on Linux operating system.&lt;br /&gt;
Three examples of the HTTP response headers are shown below:&lt;br /&gt;
&lt;br /&gt;
From an '''Apache 1.3.23''' server: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:10: 49 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From a '''Microsoft IIS 5.0''' server:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Expires: Yours, 17 Jun 2003 01:41: 33 GMT &lt;br /&gt;
Date: Mon, 16 Jun 2003 01:41: 33 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Wed, 28 May 2003 15:32: 21 GMT &lt;br /&gt;
ETag: b0aac0542e25c31: 89d &lt;br /&gt;
Content-Length: 7369 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From a '''Netscape Enterprise 4.1''' server: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:19: 04 GMT &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Last-modified: Wed, 31 Jul 2002 15:37: 56 GMT &lt;br /&gt;
Content-length: 57 &lt;br /&gt;
Accept-ranges: bytes &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From a '''SunONE 6.1''' server:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 14:53:45 GMT&lt;br /&gt;
Content-length: 1186&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Date: Tue, 16 Jan 2007 14:50:31 GMT&lt;br /&gt;
Last-Modified: Wed, 10 Jan 2007 09:58:26 GMT&lt;br /&gt;
Accept-Ranges: bytes&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, this testing methodology is not so good. There are several techniques that allow a web site to obfuscate or to modify the server banner string.&lt;br /&gt;
For example we could obtain the following answer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
403 HTTP/1.1 &lt;br /&gt;
Forbidden Date: Mon, 16 Jun 2003 02:41: 27 GMT &lt;br /&gt;
Server: Unknown-Webserver/1.0 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML; &lt;br /&gt;
charset=iso-8859-1 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case the server field of that response is obfuscated: we cannot know what type of web server is running.&lt;br /&gt;
&lt;br /&gt;
== Protocol behaviour == &lt;br /&gt;
Refined techniques of testing take in consideration various characteristics of the several web servers available on the market. We will list some methodologies that allow us to deduce the type of web server in use.&lt;br /&gt;
&lt;br /&gt;
=== HTTP header field ordering === &lt;br /&gt;
The first method consists of observing the ordering of the several headers in the response. Every web server has an inner ordering of the header. We consider the following answers as an example:&lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:10: 49 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Content-Location: http://iis.example.com/Default.htm &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:13: 52 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Fri, 01 Jan 1999 20:13: 52 GMT &lt;br /&gt;
ETag: W/e0d362a4c335be1: ae1 &lt;br /&gt;
Content-Length: 133 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:01: 40 GMT &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Last-modified: Wed, 31 Jul 2002 15:37: 56 GMT &lt;br /&gt;
Content-length: 57 &lt;br /&gt;
Accept-ranges: bytes &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:23:37 GMT&lt;br /&gt;
Content-length: 0&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:20:26 GMT&lt;br /&gt;
Last-Modified: Wed, 10 Jan 2007 09:58:26 GMT&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can notice that the ordering of the ''Date'' field and the ''Server'' field differs between Apache, Netscape Enterprise and IIS.&lt;br /&gt;
&lt;br /&gt;
=== Malformed requests test === &lt;br /&gt;
Another useful test to execute involves sending malformed requests or requests of nonexistent pages to the server.&lt;br /&gt;
We consider the following HTTP response: &lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad Request &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:12: 37 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Connection: close &lt;br /&gt;
Transfer: chunked &lt;br /&gt;
Content-Type: text/HTML; charset=iso-8859-1 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Content-Location: http://iis.example.com/Default.htm &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:14: 02 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Fri, 01 Jan 1999 20:14: 02 GMT &lt;br /&gt;
ETag: W/e0d362a4c335be1: ae1 &lt;br /&gt;
Content-Length: 133 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 505 HTTP Version Not Supported &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:04: 04 GMT &lt;br /&gt;
Content-length: 140 &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
GET / HTTP/3.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad request&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:25:00 GMT&lt;br /&gt;
Content-length: 0&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We notice that every server answers in a different way. The answer also differs in the version of the server. An analogous issue comes if we create requests with a non-existant protocol. Consider the following responses: &lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:17: 47 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad Request &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:14: 34 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Content-Length: 87 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;Bad request&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt; &lt;br /&gt;
&amp;lt;BODY&amp;gt;&amp;lt;H1&amp;gt;Bad request&amp;lt;/H1&amp;gt; &lt;br /&gt;
Your browser sent to query this server could not understand. &lt;br /&gt;
&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
GET / JUNK/1.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;Bad request&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt;&lt;br /&gt;
&amp;lt;BODY&amp;gt;&amp;lt;H1&amp;gt;Bad request&amp;lt;/H1&amp;gt;&lt;br /&gt;
Your browser sent a query this server could not understand.&lt;br /&gt;
&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== OnLine Testing == &lt;br /&gt;
On Line tool that often delivers a lot of information on target Web Server very useful for Penetration Testing is Netcraft.&lt;br /&gt;
With this tool we can retrive informations about Operating System, Web Server used, Server Uptime, Netblock Owner, history of change related to Web server, O.S. &amp;lt;br&amp;gt;&lt;br /&gt;
An example is show below:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:netcraft.jpg]]&lt;br /&gt;
&lt;br /&gt;
== 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://net-square.com/httprint/httprint_paper.html&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* httprint - http://net-square.com/httprint/index.shtml&lt;br /&gt;
&lt;br /&gt;
== OnLine Testing == &lt;br /&gt;
On Line tool that often delivers a lot of information on target Web Server very useful for Penetration Testing is Netcraft.&lt;br /&gt;
With this tool we can retrive information about Operating System, Web Server used, Server Uptime, Netblock Owner, history of change related to Web server, O.S. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:netcraft.jpg]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Netcraft - http://www.netcraft.com&lt;br /&gt;
&lt;br /&gt;
{{Category:OWASP Testing Project AoC}}&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Netcraft.jpg&amp;diff=16241</id>
		<title>File:Netcraft.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Netcraft.jpg&amp;diff=16241"/>
				<updated>2007-02-07T14:31:41Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=16238</id>
		<title>Testing for Web Application Fingerprint (OWASP-IG-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=16238"/>
				<updated>2007-02-07T14:12:05Z</updated>
		
		<summary type="html">&lt;p&gt;Mmella: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[http://www.owasp.org/index.php/Web_Application_Penetration_Testing_AoC Up]]&amp;lt;br&amp;gt;&lt;br /&gt;
{{Template:OWASP Testing Guide v2}}&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
Web server fingerprinting is a critical task for the Penetration tester. Knowing the version and type of a running web server allows testers to determine known vulnerabilities and the appropriate exploits to use during testing.&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue ==&lt;br /&gt;
There are several different vendors and versions of web servers on the market today. Knowing the type of web server that you are testing significantly helps in the testing process, and will also change the course of the test. This information can be derived by sending the web server specific commands and analyzing the output, as each version of web server software may respond differently to these commands. By knowing how each type of web server responds to specific commands and keeping this information in a web server fingerprint database, a penetration tester can send these commands to the web server, analyze the response, and compare it to the database of known signatures. Please note that it usually takes several different commands to accurately identify the web server, as different versions may react similarly to the same command. Rarely, however, do different versions react the same to all HTTP commands. So, by sending several different commands, you increase the accuracy of your guess.&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
The simplest and most basic form of identifying a Web server is to look at the Server field in the HTTP response header. For our experiments we use netcat. &lt;br /&gt;
Consider the following HTTP Request-Response: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc 202.41.76.251 80&lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: Mon, 16 Jun 2003 02:53:29 GMT&lt;br /&gt;
Server: Apache/1.3.3 (Unix)  (Red Hat/Linux)&lt;br /&gt;
Last-Modified: Wed, 07 Oct 1998 11:18:14 GMT&lt;br /&gt;
ETag: &amp;quot;1813-49b-361b4df6&amp;quot;&lt;br /&gt;
Accept-Ranges: bytes&lt;br /&gt;
Content-Length: 1179&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from the ''Server'' field we understand that the server is Apache, version 1.3.3, running on Linux operating system.&lt;br /&gt;
Three examples of the HTTP response headers are shown below:&lt;br /&gt;
&lt;br /&gt;
From an '''Apache 1.3.23''' server: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:10: 49 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From a '''Microsoft IIS 5.0''' server:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Expires: Yours, 17 Jun 2003 01:41: 33 GMT &lt;br /&gt;
Date: Mon, 16 Jun 2003 01:41: 33 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Wed, 28 May 2003 15:32: 21 GMT &lt;br /&gt;
ETag: b0aac0542e25c31: 89d &lt;br /&gt;
Content-Length: 7369 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From a '''Netscape Enterprise 4.1''' server: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:19: 04 GMT &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Last-modified: Wed, 31 Jul 2002 15:37: 56 GMT &lt;br /&gt;
Content-length: 57 &lt;br /&gt;
Accept-ranges: bytes &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From a '''SunONE 6.1''' server:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 14:53:45 GMT&lt;br /&gt;
Content-length: 1186&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Date: Tue, 16 Jan 2007 14:50:31 GMT&lt;br /&gt;
Last-Modified: Wed, 10 Jan 2007 09:58:26 GMT&lt;br /&gt;
Accept-Ranges: bytes&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, this testing methodology is not so good. There are several techniques that allow a web site to obfuscate or to modify the server banner string.&lt;br /&gt;
For example we could obtain the following answer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
403 HTTP/1.1 &lt;br /&gt;
Forbidden Date: Mon, 16 Jun 2003 02:41: 27 GMT &lt;br /&gt;
Server: Unknown-Webserver/1.0 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML; &lt;br /&gt;
charset=iso-8859-1 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case the server field of that response is obfuscated: we cannot know what type of web server is running.&lt;br /&gt;
&lt;br /&gt;
== Protocol behaviour == &lt;br /&gt;
Refined techniques of testing take in consideration various characteristics of the several web servers available on the market. We will list some methodologies that allow us to deduce the type of web server in use.&lt;br /&gt;
&lt;br /&gt;
=== HTTP header field ordering === &lt;br /&gt;
The first method consists of observing the ordering of the several headers in the response. Every web server has an inner ordering of the header. We consider the following answers as an example:&lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:10: 49 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Content-Location: http://iis.example.com/Default.htm &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:13: 52 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Fri, 01 Jan 1999 20:13: 52 GMT &lt;br /&gt;
ETag: W/e0d362a4c335be1: ae1 &lt;br /&gt;
Content-Length: 133 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:01: 40 GMT &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Last-modified: Wed, 31 Jul 2002 15:37: 56 GMT &lt;br /&gt;
Content-length: 57 &lt;br /&gt;
Accept-ranges: bytes &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:23:37 GMT&lt;br /&gt;
Content-length: 0&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:20:26 GMT&lt;br /&gt;
Last-Modified: Wed, 10 Jan 2007 09:58:26 GMT&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can notice that the ordering of the ''Date'' field and the ''Server'' field differs between Apache, Netscape Enterprise and IIS.&lt;br /&gt;
&lt;br /&gt;
=== Malformed requests test === &lt;br /&gt;
Another useful test to execute involves sending malformed requests or requests of nonexistent pages to the server.&lt;br /&gt;
We consider the following HTTP response: &lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad Request &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:12: 37 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Connection: close &lt;br /&gt;
Transfer: chunked &lt;br /&gt;
Content-Type: text/HTML; charset=iso-8859-1 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Content-Location: http://iis.example.com/Default.htm &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:14: 02 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Fri, 01 Jan 1999 20:14: 02 GMT &lt;br /&gt;
ETag: W/e0d362a4c335be1: ae1 &lt;br /&gt;
Content-Length: 133 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 505 HTTP Version Not Supported &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:04: 04 GMT &lt;br /&gt;
Content-length: 140 &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
GET / HTTP/3.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad request&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:25:00 GMT&lt;br /&gt;
Content-length: 0&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We notice that every server answers in a different way. The answer also differs in the version of the server. An analogous issue comes if we create requests with a non-existant protocol. Consider the following responses: &lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:17: 47 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad Request &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:14: 34 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Content-Length: 87 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;Bad request&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt; &lt;br /&gt;
&amp;lt;BODY&amp;gt;&amp;lt;H1&amp;gt;Bad request&amp;lt;/H1&amp;gt; &lt;br /&gt;
Your browser sent to query this server could not understand. &lt;br /&gt;
&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
GET / JUNK/1.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;Bad request&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt;&lt;br /&gt;
&amp;lt;BODY&amp;gt;&amp;lt;H1&amp;gt;Bad request&amp;lt;/H1&amp;gt;&lt;br /&gt;
Your browser sent a query this server could not understand.&lt;br /&gt;
&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Automated Testing == &lt;br /&gt;
The tests to carry out testing can be several. A tool that automates these tests is &amp;quot;''httprint''&amp;quot; that allows one, through a signature dictionary, to recognize the type and the version of the web server in use.&amp;lt;br&amp;gt;&lt;br /&gt;
An example of such tool is shown below:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:httprint.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 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://net-square.com/httprint/httprint_paper.html&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* httprint - http://net-square.com/httprint/index.shtml&lt;br /&gt;
&lt;br /&gt;
== OnLine Testing == &lt;br /&gt;
On Line tool that often delivers a lot of information on target Web Server very useful for Penetration Testing is Netcraft.&lt;br /&gt;
With this tool we can retrive information about Operating System, Web Server used, Server Uptime, Netblock Owner, history of change related to Web server, O.S. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:netcraft.jpg]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Netcraft - http://www.netcraft.com&lt;br /&gt;
&lt;br /&gt;
{{Category:OWASP Testing Project AoC}}&lt;/div&gt;</summary>
		<author><name>Mmella</name></author>	</entry>

	</feed>