Thursday, March 19, 2009

Kitchens Deorated With Apples

[STANDARD] OWASP - Episode 9


A big step, we come to the end of our study methodology OWASP. In this ninth episode, we discuss Web Services. Casually, it's crazy what they can afford to do! But as always, everything depends on the security of their implementation. So, ready to test?


1 - Foreword
OWASP In the standard, this Section 4.10. Appointed Web Services Testing - WAS
, it addresses the main lines of attack of the services in their discovery to their use in seven points.

2 -
active testing phase 8 -
tests on Web Services


2.1 - Collection of information on Web Services

If we do not know the location Web Services on the Web server host and that it is not trivial, we will find it. For this, several means available to us: thanks to our friend Google with a query like: inurl: wsdl site:
target_name


through sites such as censuses Web Services
seekda.com
,
Alternatively we can try to find them with the roads, well known names and extensions to it, take the known URLs and add (combine):
/ services / service_name

  • wsdl, uddi , disco, etc.. Try also by preceding them with a "?"


2.2 - Testing WSDL
  • the WSDLs Once identified, we will have access to their description. This interest to us then, what are the names
  • operations (possibly with their parameters); URLs and / or IP addresses provided (external or internal addresses ...). For this, two tools can be used: WebScarab
  • (full version) and
WSDigger
.


2.3 - Structure of XML files
  • description of WSDL is saved in XML format. This paragraph focuses on the proper formation of these XML files. For this, we will check the following:
file is properly formed? The tags are they properly closed?
elements they can inject large data? elements they can inject binary (possibly in base64)?
elements adequate to launch malicious injections (see Episode 8)?



2.4 - XML Content-Level Attack

    Following the analysis in the previous step, we will try to exploit potential vulnerabilities identified. The goal is to have fun with the settings and turn them to our way to test the behavior of the server and / or carry out attacks. This assumes, however, can interact with the WSDL.
  • We will illustrate this with the following screenshot (with WebScarab):
  • To begin, we choose the WSDL that we want to test (
  • WSDL:
). Then we choose the operation that interests us (1). Then, we change the parameter value desired (2). We instruct the tool to create the SOAP request associated simply by clicking on "Execute

" (3). The result is given in (4).

2.5 - HTTP Request GET


This time we try to change settings directly via the URL. indirectly, our goal is to act on the WSDL. Then, within the parameters, we will modify the values supplied in GET requests, or better, execute commands preceded by the appropriate separator (eg
& '; or SOAP WSDL also destined for the target with the difference that we seek to incorporate an attachment in the application. The objective is - for example - to upload to the Web server program that allows us to take over. As suggested by the methodology, the test may be a EICAR test.
2.7 - Replay Attack
We work both locally and this after launching a MITM attack. So our goal is to recover the valid elements of a session (credentials, cookies, etc. ...) in order to appropriate the past queries by other users in the replay. We will require tools to sniff the traffic (eg wireshark

) + tcpreplay
and / or WebScarab.

0 comments:

Post a Comment