GithubHelp home page GithubHelp logo

greatspider / jinfinity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from contrast-security-oss/jinfinity

0.0 1.0 0.0 8 KB

An API for consuming all the memory of Java apps using deserialization

License: BSD 3-Clause "New" or "Revised" License

Java 100.00%

jinfinity's Introduction

jinfinity

An API and demonstration program for consuming all the memory of applications that deserialize data from untrusted sources (like HTTP requests) using the Java serialization specification.

How do I use this?

Use the com.contrastsecurity.jinfinity.JInfinity.java#sendAttack() API to push an unreasonably large serialized String to a target OutputStream. You'll need to figure out how to get the OutputStream of your target set up correctly.

How can I run the demo program?

First, build the app:

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

To run the demo Jetty server, run this:

java -jar target/jinfinity-jar-with-dependencies.jar server

In another console, run the attacking client:

java -jar target/jinfinity-jar-with-dependencies.jar client

Within 30 seconds, the server will produce an OutOfMemoryError that looks something like this:

java.lang.OutOfMemoryError: Java heap space
	at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:518)
	at java.lang.StringBuffer.append(StringBuffer.java:307)
	at java.io.ObjectInputStream$BlockDataInputStream.readUTFSpan(ObjectInputStream.java:3044)
	at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(ObjectInputStream.java:2952)
	at java.io.ObjectInputStream$BlockDataInputStream.readLongUTF(ObjectInputStream.java:2935)
	at java.io.ObjectInputStream.readString(ObjectInputStream.java:1570)

jinfinity's People

Contributors

nahsra avatar

Watchers

James Cloos 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.