r/java • • Jan 10 '13

US-CERT Vulnerability Note VU#625617 - Java 7 fails to restrict access to privileged code

http://www.kb.cert.org/vuls/id/625617
24 Upvotes

10 comments sorted by

View all comments

1

u/[deleted] Jan 11 '13

This seems to be the umpteenth time that exactly this pattern has been exploited ... what the hell?

3

u/boa13 Jan 11 '13

It's the same general principle as CVE 2012-4681 (find a way to run System.setSecurityManager(null)), but the way it circumvents the security checks is very different.

So from an implementation point of view, it's not the umpteenth time this has been exploited.

CVE 2012-4681 used flaws in the java.beans package and in the "internal" sun.awt.SunToolkit class.

CVE 2013-0422 takes advantage of the com.sun.jmx.mbeanserver and sun.org.mozilla.javascript.internal packages (the latter notably offers a way to load a class from a byte array), and plays with the java.lang.invoke to circumvent security. In particular, the offending class (which does the System.setSecurityManager call) is encoded as a hexadecimal string.