malsub: online malware analysis and threat intelligence services
malsub is a Python 3.6.x framework that wraps several web services of online malware and URL analysis sites through their RESTful Application Programming Interfaces (APIs). It supports submitting files or URLs for analysis, retrieving reports by hash values, domains, IPv4 addresses or URLs, downloading samples and other files, making generic searches and getting API quota values. The framework is designed in a modular way so that new services can be added with ease by following the provided template module and functions to make HTTP GET
and POST
requests and to pretty print results. This approach avoids having to write individual and specialized wrappers for each and every API by leveraging what they have in common in their calls and responses. The framework is also multi-threaded and dispatches service API functions across a thread pool for each input argument, meaning that it spawns a pool of threads per each file provided for submission or per each hash value provided for report retrieval, for example.
The following services are currently included in malsub:
- AVCaesar;
- Have I been pwned?;
- Hybrid Analysis;
- Joe Sandbox Cloud;
- MalShare;
- maltracker;
- malwr;
- Metadefender;
- OpenPhish;
- PDF Examiner;
- PhishTank;
- QuickSand;
- Safe Browsing;
- Threat Crowd;
- ThreatStream;
- URLVoid;
- VirusTotal;
- VxStream.
Most of these services require API keys that are generated after registering an account in their respective websites, which need to be specified in the apikey.yaml
file according to the given structure. Note that some of the already bundled services are limited in supported operations due to the fact that they were developed with free API keys. API keys associated with paid subscriptions are allowed to make additional calls not open to the public and may not be restricted by a given quota. Yet, malsub can process multiple input arguments and pause between requests as a workaround for cooldown periods.
The main goal of malsub is to serve as a one-stop-shop for querying multiple online services of malware analysis and for aiding investigators. It is thus suitable for incident response, forensic and malware analysts, as well as for security practitioners alike.
Installation
git clone https://github.com/diogo-fernan/malsub.git
cd malsub
pip install -r requirements.txt
Usage
Copyright © 2017 Diogo A. B. Fernandes.
All rights reserved.
Source: https://github.com/diogo-fernan/