Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Services
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Security
Unlock the full power of Microsoft Security
Offensive Security
Solutions to maximize your security ROI
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats

Fresh Coffee Served by CoolEK

As you may already know, the past few months have been problematic to Oracle when it comes to security issues discovered in the popular and notorious Java browser plugin. The latest vulnerability that has been spotted to be exploited in the wild is CVE-2013-1493.

It has already been published that CoolEK became the first exploit kit to add an exploit to CVE-2013-1493, soI won't bother you with the details of that. What's probably more interesting is the nature of this exploit. Most Java exploits from the past year or two used missing security checks in the Java source code in order to bypass Security Manager – the part in Java which is responsible to make sure that unsafe code (unsigned code written by 3rd parties) won't be able toper form certain operations which require elevated privileges. Other exploits used some type confusions or tricked the optimizer into doing the same thing. Yet, in our current case, a memory corruption bug was found which allows the attacker to entirely nullify the Security Manager.

This is the kind of exploits which are usually found in browsers and other non-sandboxed applications, so it was a little bit of a surprise to see such techniques in Java code.

Prior to the memory corruption bug triggers, the exploit author first creates a bunch of imaging objects amongst them - two "Buffered Image" objects – a source object and a destination object, the source object will be filled with raster data.

8549_2eb5018f-4e08-478f-82a8-7de431e52ce9

[image1: code snippet showing the creation of the two image objects and the invocation of the color conversion method]

The exploit flow will later get to the "spray" method, its job is to call the garbage collector (twice!) to free every last bit of heap memory and then, to reserve the entire JRE memory by filling the heap with meaningless data.

The "spray" method in this exploit share similarities with the "heap-spray" exploit delivery technique which is used in browsers, PDF and Flash, although we believe it's used prior to the memory corruption bug in order to control the JRE sensitive memory addresses (such as the security manager address :O).

When the spray method is done, we can see that the entire heap memory of the JVM is fully "occupied":

10250_7fcdddfa-ba28-4b11-b7d3-683b1a4a473b

[image2: dump created by the JVM showing the heap has been exhausted]

Both "Buffered Image" objects (named "sbi" and "dbi") are then sent to the filter method, where the memory corruption vulnerability takes place.

The vulnerability itself resides in the built-in Java classes which allows for color conversion of in-memory images. These classes rely on the supplied image classes to provide information regarding how to convert the sRGB and CIEXYZ color representations. Fooling those classes may cause corruptions in the Java heap memory, which can later be used to get the addresses for the built-in classes and methods and override those.

As we all know, when an applet can control the security manager state, it is game-over for the entire java applet security architecture in our host, thus may allow the exploit author to create and run malicious files, download malwares and much more.

As usual, Trustwave SWG customers are protected against exploitation attempts of this vulnerability, without needing to install any security update.

 

The research and post were done by Dan Meged and Moshe Basanchig.

ABOUT TRUSTWAVE

Trustwave is a globally recognized cybersecurity leader that reduces cyber risk and fortifies organizations against disruptive and damaging cyber threats. Our comprehensive offensive and defensive cybersecurity portfolio detects what others cannot, responds with greater speed and effectiveness, optimizes client investment, and improves security resilience. Learn more about us.

Latest Intelligence

Discover how our specialists can tailor a security program to fit the needs of
your organization.

Request a Demo