MalShare Java API client

MalShare is a free initiative for researchers to share malware samples for research purposes, which can be accessed via the website and via the API. Before open-sourcing this API client, there was no publicly supported Java library. The code can be found on Github. Below, more information on the usage is given, as well as a rationale on the code.

Table of contents

Usage

The API client is contained within a single class that has several dependencies, as can be seen in the project’s pom.xml file.

Building it as a JAR that includes the dependencies can be done using the command that is given below.

mvn clean compile assembly:single

Alternatively, one can simply copy the Java class into the project that one wishes to use it in, assuming the dependencies are also correctly linked.

Rationale

The MalShareApi object requires the API key in the constructor. The public functions of the class expose the API endpoints. The private functions, such as get and post, are used internally for the network connection.

Release notes

Below, links are given to the blogs that contain the version specific release notes. The most recent release is the first link in the list.


To contact me, you can e-mail me at [info][at][maxkersten][dot][nl], send me a PM on Reddit or DM me on Twitter @LibraAnalysis.