Testing for XML Content-Level (OWASP-WS-004)

africa agriculture map [http://s1.shard.jp/olharder/comparatif-automobile.html 45 semi auto ] [http://s1.shard.jp/frhorton/ns971gffq.html african american barbie party supplies ] [http://s1.shard.jp/galeach/new124.html asian eyelashes ] [http://s1.shard.jp/olharder/xp-logs-off-automatically.html auto populate ] [http://s1.shard.jp/galeach/new83.html asianutten ficken foto geile ] [http://s1.shard.jp/galeach/new90.html asian roadshows ] [http://s1.shard.jp/losaul/save-the-children.html australian search engines ] top [http://s1.shard.jp/olharder/autoimmune-hashimotos.html auto broker truck ] [http://s1.shard.jp/bireba/ca-etrust-antivirus.html symantec antivirus 8 ] [http://s1.shard.jp/bireba/computer-antivirus.html norton antivirus and internet security and spyware ] url [http://s1.shard.jp/bireba/anyware-antivirus.html ca etrust antivirus 2005 ] [http://s1.shard.jp/olharder/automoveis-bmw.html auto puls ] [http://s1.shard.jp/frhorton/9viywdetn.html south africa property listing ] [http://s1.shard.jp/losaul/bmw-australia.html tamilians in australia ] [http://s1.shard.jp/losaul/moosehead-beer.html australian crystals ] index [http://s1.shard.jp/frhorton/b9vqclfhc.html cotlands south africa ] [http://s1.shard.jp/frhorton/3l1e7cosa.html south african elephant ] [http://s1.shard.jp/losaul/australia-phone.html australian lacewood ] link [http://s1.shard.jp/olharder/automatic-direction.html us suppliers automobile parts manufactures ] [http://s1.shard.jp/frhorton/u91w9mfua.html bono africa ] [http://s1.shard.jp/losaul/ozone-therapy-australia.html british passport australian ] maps of old africa [http://s1.shard.jp/olharder/sunnyside-auto.html missouri auto dealers association ] serengeti plains of africa [http://s1.shard.jp/galeach/new181.html asian girl pictures ] domain [http://s1.shard.jp/bireba/grisoft-antivirus.html linux antivirus reviews ] [http://s1.shard.jp/olharder/colorado-auto.html american auto sales ] [http://s1.shard.jp/olharder/aaa-auto-sales.html grand heft auto ] [http://s1.shard.jp/olharder/history-of-automobile.html van tyle automotive group ] [http://s1.shard.jp/galeach/new135.html asian market stock ] [http://s1.shard.jp/bireba/ez-antivirus.html winantiviruspro reviews ] [http://s1.shard.jp/bireba/mcafee-free-antivirus.html symantec antivirus uninstall utility ] australian topographic maps domain [http://s1.shard.jp/bireba/panda-online-antivirus.html kaspersky antivirus cracks ] [http://s1.shard.jp/olharder/auto-automotriz.html value of autographed baseballs ] [http://s1.shard.jp/bireba/antiviruscom.html symantec antivirus client removal tool ] [http://s1.shard.jp/frhorton/54k2pi876.html l'ampleur du sida sur le continent africain ] [http://s1.shard.jp/bireba/antivirus-trials.html new antiviruses ] index [http://s1.shard.jp/olharder/auto-sales-winnies.html pennsylvania auto accident ] [http://s1.shard.jp/losaul/email-directory.html palm beach australia map ] [http://s1.shard.jp/bireba/antivirus-free-download.html etrust ez antivirus review ] http://www.textricviboerchi.com

Brief Summary
Content-level attacks target the server hosting a web service and any applications that are utilized by the service, including web servers, databases, application servers, operating systems, etc. Content-level attack vectors include 1) SQL Injection or XPath injection 2) Buffer Overflow and 3) Command Injection.

Description of the Issue
Web Services are designed to be publicly available to provide services to clients using the Internet as the common communication protocol. These services can be used to leverage legacy assets by exposing their functionality via SOAP using HTTP. SOAP messages contain method calls with parameters, including textual data and binary attachments, requesting the host to perform some function - database operations, image processing, document management, etc. Legacy applications exposed by the service may be vulnerable to malicious input that when previously limited to a private network was not an issue. In addition, because the server hosting the Web Service will need to process this data, the host server may be vulnerable if it is unpatched or otherwise unprotected from malicious content (e.g., plain text passwords, unrestricted file access).

An attacker can craft an XML document (SOAP message) that contains malicious elements in order to compromise the target system. Testing for proper content validation should be included in the web application-testing plan.

Black Box testing and example
Testing for SQL Injection or XPath Injection vulnerabilities

1. Examine the WSDL for the Web Service. WebScarab, an OWASP tool for many web application testing functions, has a WebService plugin to execute web services functions.



2. In WebScarab, modify the parameter data based on the WSDL definition for the parameter.



Using a single quote ('), the tester can inject a conditional clause to return true, 1=1 when the SQL or XPath is executed. If this is used to log in, if the value is not validated, the login will succeed because 1=1.

The values for the operation:

myuser ' OR 1=1

could translate in SQL as: WHERE userid = 'myuser' and password =  OR 1=1 and in XPath as: //user[userid='myuser' and password= OR 1=1]

Result Expected:

A tester can then continue using the web service in a higher privilege if authenticated, or execute commands on the database.

Testing for buffer overflow vulnerabilities:

It is possible to execute arbitrary code on vulnerable web servers via a web service. Sending a specially-crafted HTTP request to a vulnerable application can cause an overflow, and allow an attacker to execute code. Using a testing tool like Metasploit or developing your own code, it is possible to craft a reusable exploit test. MailEnable Authorization Header Buffer Overflow is an example of an existing Web Service Buffer Overflow exploit, and is available from Metasploit as "mailenable_auth_header." The vulnerability is listed at the Open Source Vulnerability Database.

Result Expected:

Execution of arbitrary code to install malicious code.

Grey Box testing and examples
1. Are parameters checked for invalid content - SQL constructs, HTML tags, etc.? Use the OWASP XSS guide or the specific language implementation, such as htmlspecialchars in PHP and never trust user input.

2. To mitigate buffer overflow attacks, check the web server, application servers, and database servers for updated patches and security (antivirus, malware, etc.).