Giter VIP home page Giter VIP logo

Comments (3)

frohoff avatar frohoff commented on July 2, 2024

The Groovy1 payload and any other that depends on an AnnotationInvocationHandler instance will require some annotation class to be present in the stream to work properly. java.lang.Override was arbitrary chosen because it was a parameter-less annotation class that was present in the JRE itself since annotations were introduced in Java 1.5.

I don't have specific experience with elasticsearch, but looking at some source code it looks like it uses a slightly modified deserialization stream format and behavior via ThrowableObjectOutputStream and ThrowableObjectInputStream that:

  • omits the STREAM_MAGIC (0xACED) bytes in writeStreamHeader()/readStreamHeader()
  • prefixes class descriptions with additional TYPE_EXCEPTION (0x2), TYPE_STACKTRACE_ELEMENT (0x3), TYPE_FAT_DESCRIPTOR (0x0), TYPE_THIN_DESCRIPTOR (0x1) bytes in writeClassDescriptor()/readClassDescriptor()
  • has a custom loadClass() method that may load a custom classloader with fewer classes available

In this scenario, it seems likely that the last of these customizations may be getting in the way of it working, but it's hard to say for sure without more information about which path it's following through the readClassDescriptor() and loadClass() and what it's classpath environment looks like.

It may also be worth asking in the gitter chat to see if anyone else has come across this specific vector and/or issue before.

from ysoserial.

SivaDotRender avatar SivaDotRender commented on July 2, 2024

Thank you for the reply @frohoff. I will try and look into the issue further with your feedback in mind.

from ysoserial.

frohoff avatar frohoff commented on July 2, 2024

Closing after resolution via gitter chat.

from ysoserial.

Related Issues (20)

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.