-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialization questions #1
Comments
I implemented my payload generator from scratch because:
Each Java serialization attack targets a specific class; for the attack to work, that class must be in the target app's classpath. I know Jython 2.7.2 is available in Ghidra, so I targeted that. |
@zhuowei How deserializing is dispatched by the victim app if the deserializer located in the Java class is not invoked in normal conditions? |
nothing (See the "javaSerializedObject" section in HPE's Black Hat presentation) JNDI will try to deserialize any object you provide in LDAP. As long as the classes are on the classpath, it'd work. You just need to create a set of objects that, when deserialized, runs arbitrary code.
I looked at the list of existing exploits on ysoserial, saw that Jython is vulnerable, looked at the patch, saw that it only patchd PyFunction while PyMethod had the exact same vulnerability, and wrote mine. |
Nice explanation! Thanks a lot! |
I noticed that you use customized implementation of the Jython1 payload generator.
https://github.com/frohoff/ysoserial/blob/8eb5cbfbf6c47a23682f6186bea9baf6439e57b9/src/main/java/ysoserial/payloads/Jython1.java#L95
What was the main reason don't use the original ysoserial's implementation by the command
java -jar ysoserial-0.0.6-SNAPSHOT-all.jar Jython1 "payload.py;/tmp/payload.py" > bingo.obj
And the second question is what is dependancy of using the specific serialization engine to generate the serialized object and the victim process?
ysoserial.jar has a lot of different engines like:
Say, for ghidra you use Jython1 but not Jdk7u21 payload generator or something else.
The text was updated successfully, but these errors were encountered: