Time for some disclosure. Below, details of a CSRF bug discovered in Oracle GlassFish Server 3.1.1 few months ago. Interesting to observe that Oracle rates this as the third most critical bug fixed among the Oracle Sun Products. I guess that's because of the exploit which was included in the original report and which I am releasing as part of this advisory. I found a curios angle to exploit this bug, as arbitrary file upload of a WAR archive can be performed. A quite cool way to exploit a CSRF and own Oracle GlassFish, if you ask me :-). Enjoy.
Details
Vendor Site: Oracle (www.oracle.com)
Date: April, 19th 2012 – CVE 2012-0550
Affected Software: Oracle GlassFish Server 3.1.1 (build 12)
Researcher: Roberto Suggi Liverani
Description
Security-Assessment.com has discovered that the Oracle GlassFish Server REST interface is vulnerable to Cross
Site Request Forgery (CSRF) attacks. Although the javax.faces.ViewState is employed in the standard web administrative interface and it prevents such attacks, the REST interface remains vulnerable, as shown in the Proof-of-Concept (PoC) below.
Cross Site Request Forgery attacks can target different functionality within an application. In this case, as an example, it is possible to force an authenticated administrator user into uploading an arbitrary WAR archive, which can be used to gain remote code execution on the server running the Oracle GlassFish Server application.
The Proof-of-Concept (PoC) below has been successfully tested with Firefox 8.0.1 and Chrome 15.0.874.121 with Basic Authentication enabled.
Arbitrary WAR Archive File Upload – CSRF PoC
Details
Vendor Site: Oracle (www.oracle.com)
Date: April, 19th 2012 – CVE 2012-0550
Affected Software: Oracle GlassFish Server 3.1.1 (build 12)
Researcher: Roberto Suggi Liverani
PDF version: http://www.security-assessment.com/files/documents/advisory/Oracle_GlassFish_Server_REST_CSRF.pdf
Description
Security-Assessment.com has discovered that the Oracle GlassFish Server REST interface is vulnerable to Cross
Site Request Forgery (CSRF) attacks. Although the javax.faces.ViewState is employed in the standard web administrative interface and it prevents such attacks, the REST interface remains vulnerable, as shown in the Proof-of-Concept (PoC) below.
Exploitation
The Proof-of-Concept (PoC) below has been successfully tested with Firefox 8.0.1 and Chrome 15.0.874.121 with Basic Authentication enabled.
Arbitrary WAR Archive File Upload – CSRF PoC
Solution Oracle has created a fix for this vulnerability which has been included as part of Critical Patch Update Advisory - April 2012. Security-Assessment.com recommends applying the latest patch provided by the vendor. For more information, visit: http://www.oracle.com/technetwork/topics/security/cpuapr2012-366314.htmlOracle GlassFish Server 3.1.1 (build 12) - CSRF arbitrary file upload
by Roberto Suggi Liverani - Security-Assessment.com This is a Proof-of-Concept - the start() function can be invoked automatically. The CSRF upload technique used in this case is a slight variation of the technique demonstrated here: http://blog.kotowicz.net/2011/04/how-to-upload-arbitrary-file-contents.html Other pieces of code were taken from: http://hublog.hubmed.org/archives/001941.html
Comments
Post a Comment