Home / malwarePDF  

Exploit:Java/CVE-2010-0840


First posted on 15 February 2019.
Source: Microsoft

Aliases :

Exploit:Java/CVE-2010-0840 is also known as EXP/CVE-2010-0094.F.67, Exploit.CVE2010-0840.2, Exploit.Java.Agent.fd, Java/Agent.CU, Mal/JavaHel-B.

Explanation :

Threat in context

Java is a general-purpose programming language, but cases of this exploit are targeted against the Java plug-in for web browsers. The intent of the Java plug-in is that Java programs (or "applets") can be offered by websites, and run in a "sandbox" where the Java plug-in enforces rules on what the Java applet can do so that it cannot escape restricted environment.

What is an exploit?

Exploits are written to take advantage of weaknesses (or vulnerabilities) in legitimate software. A project called Common Vulnerabilities and Exposures (CVE) gives each vulnerability a unique number, in this case "CVE-2010-0840". The portion "2010" refers to the year the vulnerability was discovered, and "0840" is a unique ID for this specific vulnerability. You can find more information on the CVE website.

Payload

Downloads and installs files

This threat can download and run files, including other malware, under your security context.

The malware is contained in a .class file or multiple .class files, depending on the variant. It may download and run malicious programs from a specified URL.

Usually the files are downloaded in the temporary folder (%TEMP%) with a random name, and run from there.

Additional technical details

Exploit:Java/CVE-2010-0840 uses a problem in java.beans.Expression class to run privileged code from untrusted Java code like Java applets. The problem is related to how Java trusted code checks for the privilege of current context when it is called. It checks the call stack to make sure the caller is from trusted code when it is running sensitive code which requires additional privileges.

The exploit abuses the java.util.Map interface and javax.swing.JList class in a way that a subclass of java.beans.Expression is called with additional privilege. Java.util.Map is an interface that defines data interface that deal with map entries. The exploit declares a class that implements the java.util.Map interface. That malicious class is also declared as a subclass of java.beans.Expression.

The java.beans.Expression class can do reflection operations. You can define what method from which class is called when the class is instantiated. The actual method call is done when the getValue method from this class is called.

GetValue is also defined with the java.util.Map interface. If the inherited class doesn't implement this method, the getValue method from the java.beans.Expression class is regarded as an implementation of the java.util.Map interface.

The problem happens when this malicious class is passed to javax.swing.JList class and the JList UI is added to current Java applet main UI. The JRE system will try to render the JList interface and will instantiate the user-supplied malicious java.beans.Expression subclass. After the exploit succeeds, privileged code will be run with trusted privilege and the payload will be dropped and run.

Exploit:Java/CVE-2010-0840 attacks the security model instead of memory corruption issues. With memory corruption issues, the exploit is dependent on the specific CPU type and operating system, and might be affected by mitigation technology like DEP (Data Execution Prevention) or ASLR (Address Space Layout Randomization).

Attacking the security model means that the exploit might be effective on any platform the Java interpreter is on, for example Windows, MacOS, Linux, etc.

Usually exploits are written using a few Java classes working together. The various class files are bundled into an archive called a JAR, which uses the ZIP file format. Every JAR contains a Manifest.MF file to identify itself to the Java Runtime. Since it is found in every JAR, it won't be listed.

The following are some examples of files that exploit the vulnerability described in CVE-2010-0840:

29c7430b8501eea07c56a0d6476d141a62e16a47 Dot.class ll.class lz.class ra.class rb.class rc.class rd.class cb8b76d1ca4bce532563e01abae54c511356e8d1 k.class pakg.class pakj.class pakk.class pak
.class pako.class pak
.class paku.class pakwall.class 0af9c001d2f1710937c4bca40b0842db790e6873 hfoakzwaeckdtaxhb hfoakzwaeckdtaxhbgsfuhfudix.class hfoakzwaeckdtaxhbopzzvdcuivyoh.class hfoakzwaeckdtaxhb
svgabavifqllqqcuotuvlaq.class hfoakzwaeckdtaxhbuvgfvcfafqdyq.class hfoakzwaeckdtaxhbyqztllubezlaot.class 306d9f8f393891397231572dd52306015f3d701b calecalecalea1.class calecalecalea.class caleCLEA.class 311d6347da67dbc6e10237eff73e03a67d248a5d datasJocker.class datasJoz7.class datasSquarePants.class dataswall1.class dataswallzordo.class dataswall.class datasom.class datasonkeys.class 61e664065d5695d26accd4392030b10c58a2a159 a.class asa.class b.class c.class d.class

Once the exploit has full privileges on your PC, it may:

Run an executable file (that may be detected as malware) included in the JAR Run an executable file from (that may be detected as malware) a URL hardcoded in the exploit's file Take instructions from the HTML file (like a URL to the malware executable) that loaded them

Analysis by Andrei Florin Saygo and Jeong Wook Oh

Last update 15 February 2019

 

TOP