Git Product home page Git Product logo

contrast-ro0's Introduction

contrast-rO0

A lightweight Java agent for preventing attacks against object deserialization like those discussed by @breenmachine and the original researchers @frohoff and @gebl, affecting WebLogic, JBoss, Jenkins and more.

Why did you make this?

This is the only way to hotpatch your application against this vulnerability. Patching the code is possible, but for many applications, patches will not be available for a long time. Because of the nature of the vulnerability, some applications will have to re-architect their messaging completely.

How do I use the agent?

Build the agent, first:

git clone https://github.com/Contrast-Security-OSS/contrast-rO0.git
cd contrast-rO0
mvn clean package test

Then add the following JVM option to your server or application:

-javaagent:/path/to/contrast-rO0.jar

You're safe.

What does it do?

If the agent is enabled, it will throw a SecurityException if any of the following classes are attempted to be deserialized. These classes represent the "last mile" of the exploit chain in the only publicly known proofs-of-concept, and are extremely unlikely to be used for legitimate purposes during deserialization.

  • org.apache.commons.collections.functors.InvokerTransformer
  • org.apache.commons.collections4.functors.InvokerTransformer
  • org.apache.commons.collections.functors.InstantiateTransformer
  • org.apache.commons.collections4.functors.InstantiateTransformer
  • org.codehaus.groovy.runtime.ConvertedClosure
  • org.codehaus.groovy.runtime.MethodClosure
  • org.springframework.beans.factory.ObjectFactory

Though there likely exists other exploitable classes, they are difficult to find, and likely won't be part of any mass exploitation tool for a while.

Supported systems

Although it's not tested on them all, the agent should work well on the following platforms:

  • Java 5-8
  • OpenJDK/HotSpot, JRockit, IBM

contrast-ro0's People

Contributors

nahsra avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.