mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
Dynamic (#77)
This commit is contained in:
parent
55247b7fcd
commit
991c84a1eb
1464 changed files with 225448 additions and 1985 deletions
16
tests/dynamic_fixtures/deserialize/java/Vuln.java
Normal file
16
tests/dynamic_fixtures/deserialize/java/Vuln.java
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// Phase 03 (Track J.1) — Java deserialize vuln fixture.
|
||||
//
|
||||
// The function reads bytes off the wire and hands them straight to
|
||||
// `ObjectInputStream.readObject` without restricting `resolveClass`.
|
||||
// A gadget chain inside the byte stream is materialised before any
|
||||
// allowlist check fires, so a CVE-class object-injection is reachable.
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
|
||||
public class Vuln {
|
||||
public static Object run(byte[] payload) throws Exception {
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(payload);
|
||||
ObjectInputStream ois = new ObjectInputStream(bis);
|
||||
return ois.readObject();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue