Downloads · 30 days
0
Spoko-dev/huntr-mfv-dl4j-jackson-idclass
huntr-mfv-dl4j-jackson-idclass is a machine learning model from Spoko-dev. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Security-research PoC for a huntr MFV submission. Not malware — the demonstrator only writes harmless /tmp markers, and is a stand-in for a victim-classpath gadget (full RCE is gadget-gated).
Downloads · 30 days
0
Access
Public
Updated Jul 10, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.java10.8 KB · 67%
From the Hugging Face model README
Security-research PoC for a huntr MFV submission. Not malware — the demonstrator only writes harmless /tmp markers, and is a stand-in for a victim-classpath gadget (full RCE is gadget-gated).
Loading a DL4J model via the default ModelSerializer.restoreMultiLayerNetwork(File) deserializes configuration.json with Jackson; seven per-layer interfaces use @JsonTypeInfo(use=Id.CLASS) with LaissezFaireSubTypeValidator, so any "@class" value drives Class.forName(name, /*initialize=*/true) — the named class's static initializer runs before the subtype check (CWE-502/CWE-470). Full no-arg construction follows for any class assignable to one of the seven interfaces, and the load then completes silently.
DL4J/ND4J 1.0.0-M2.1, JDK 17. Build the classpath from libs/ (via mvn dependency:copy-dependencies on the included pom.xml).
./run.sh
# [A] activationFn @class=poc.Evil -> poc.Evil <clinit> RAN
# [B] activationFn @class=poc.EvilActivation -> <clinit> + constructor RAN, restore returned network=true (silent)
# /tmp markers: huntr_r2_jackson_clinit , huntr_r2_jackson_ctor
Files: poc/CraftAndRestore.java (craft+load), poc/Probe.java (T1–T4 probe), poc/{Evil,EvilActivation}.java (demonstrators), poc/GenModel.java, pom.xml.