It’s clear that your choice of web application framework makes a significant impact on the security of individual applications. Today we’re releasing a draft version of the Secure Web Application Framework Manifesto - a document that provides a set of security requirements to web application frameworks themselves. Once we’ve collected feedback from the community, we’d like to turn this into a living OWASP project that is updated annually.
We’re eagerly looking forward to any feedback you have. Please email us at labs [ a t ] securitycompass.com
XSLT is a simple language designed to facilitate cross platform content generation by selecting and merging datasets presented in an XML document. The vulnerability described in the whitepaper still exists in today’s XSLT processing engines, which are widely used in web service implementations. In this article, we will look into reproducing this attack on two of the common XSLT processing engines: Microsft’s MSXML and Xalan (Java’s XML processing library). In addition to an overview of reproducing the attack, this article also features video demonstrations of the exploit that we feature in our Training courses. In both these scenarios we are using the latest versions of the frameworks’ XSLT processing engine as of September 16, 2009.
MSXML implemented in a .NET Application:
MSXML, Microsoft’s XSLT processor, provides a scripting engine to allow for dynamic content generation. The tag, amongst other things, allows developers to define custom functions that can then be called from XSLT code. The engine also provides functions within blocks complete access to .NET classes and methods as long as they fully qualified (e.g. System.Console.WriteLine). This extensibility raises the possibility of remote command execution from the code within the blocks. For instance, in our demonstration video we add a call to System.Diagnostics.Process.Start() method, which enables the attacker to spawn a command prompt.
Xalan implemented in a Java Application:
Xalan, on the other hand provides versions of standard Java classes such as Java.lang.Runtime and Java.lang.Object that can be included with the XSLT signature. These classes can then be used in tags to invoke member methods. In our demonstration video we will be using Java.lang.Runtime.exec() method to spawn a new process that launches Windows Notepad.
In our one-day training classes and conference talks we make judicious use of videos to demonstrate concepts. One of the most popular videos illustrates the true danger of Cross-Site Scripting (XSS) combined with Cross-Site Request Forgery (CSRF). We constructed a fake bank site and demonstrated that a single XSS vulnerability and money transfer functionality in the bank site could result in a user losing money just by visiting another site. In the example, the bank site isn’t over SSL but SSL would not prevent this attack in any way.
The malicious site in our example is completely attacker-controlled, but in reality the malicious site could actually be a Flash ad in a trusted site, Facebook / Myspace / LinkedIn applications or other mashups running untrusted code, or even malicious code running in another trusted site like a bulletin board.
In our example, the user visits the bank site and the attacker site in two browser tabs at the same time. In reality, the victim is exposed for the entire duration of his/her session on the server. That means if a user simply closes their browser window and doesn’t actually logout of the banking application, they are still vulnerable for a period of time – usually 15-30 minutes.
Today Krish Raja, Sahba Kazerooni, and I are releasing a Security Analysis of the Core J2EE Patterns. In our view, this sort of analysis is long overdue: software vendors, enterprise developers, and the open source community all use patterns judiciously. While developers have access to patterns about security, they rarely have access to a security analysis of non-security-specific patterns.
This beta release outlines our security analysis: we’d love to hear your feedback to improve the quality of our analysis. In future releases, we intend to include source code examples to help elucidate the concepts we describe.
The Exploit Me For Fun and Profit presentation at SecTor was a great chance to let even more people know about the exciting Exploit Me work being done at Security Compass. Unfortunately there wasn’t quite enough time to give a full overview on how to hack Access Me to implement new evaluation methods so we’re presenting that information here.