Testing: WS Information Gathering (OWASP-WS-001)

Brief Summary
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.

Black Box Testing and example
Zero Knowledge 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. As we said early, 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). 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 amazon public WS, on google.com you can tip: inurl:wsdl site:amazon.com and you will find all the public Amazon WSDL. 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. WSDL endpoints 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 defended well at the source code level, they can be compromised and exploited. For example given this WDSL Endpoint: http://www.w3coder.com/ws/email/FindIP.asmx?WSDL you can obtain the following description of the Web Services:                 </s:complexType> </s:element> <s:element name="string" nillable="true" type="s:string" /> </s:schema> </wsdl:types> <wsdl:message name="GetURLIPSoapIn"> <wsdl:part name="parameters" element="tns:GetURLIP" /> </wsdl:message> <wsdl:message name="GetURLIPSoapOut"> <wsdl:part name="parameters" element="tns:GetURLIPResponse" /> </wsdl:message> <wsdl:message name="GetURLIPHttpGetIn"> <wsdl:part name="EnterURL" type="s:string" /> …… </wsdl:service> </wsdl:definitions> This WS simply receive in input a logical name (EnterURL) and give in output the realtive IP Address. So we have GetURLIP as method for the WS and EnterURL (string) as input. In that manner we have identified the WS entry point and we are ready to test it.