Skip to content
Remote Java classpath enumeration via deserialization
Java Python
Branch: master
Clone or download
Latest commit d6416ad Feb 10, 2020
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Add files via upload Feb 10, 2020
src/com/stefanbroeder/serially Add files via upload Feb 10, 2020 Add files via upload Feb 10, 2020 Update Feb 10, 2020 Add files via upload Feb 10, 2020
pom.xml Add files via upload Feb 10, 2020


EnumJavaLibs: Remote Java classpath enumeration via deserialization.


EnumJavaLibs can be used to discover which libraries are loaded (i.e. available on the classpath) by a remote Java application when it supports deserialization.

Serially - v1.1
by Stefan Broeder

EnumJavaLibs {MODE} [OPTIONS]

base64                  Write base64 encoded serialized objects to CSV file in current directory
rmi {host} {port}       RMI mode. Connect to RMI endpoint and try deserialization.

-f {string}             Only serialize classes from packages which contain the given string (e.g. org.apache.commons)
-d                      Debug mode on

For more information about how to use the tool, please see this blog post.

Obtaining jar files

A local repository of jar files is required in ~/.serially/jars. You should run the JavaClassDB python3 script to index the jar files, before running EnumJavaLibs. One way to build a local repository is to download the most popular Java libraries from maven central. I provide a script that can be used as follows:

./ 20 | while read x; do wget --quiet -P ~/.serially/jars $x; sleep 5; done

This command will scrape the 20 most popular jar files from

Another way to bootstrap your local jar repository if you are using maven, is to copy the jar files you already have in the maven cache (~/.m2/repository)


To test RMI, I created a docker image you can fetch from [], which spins up a host listening to RMI on port 1617. It's running Java 8u40, which is vulnerable. It has library nanohttpd-2.2.0.jar loaded on the classpath to showcase that EnumJavaLibs is able to discover this library remotely (given that you prepared your local repository with this jar)

You can’t perform that action at this time.