| Crates.io | malwaredb |
| lib.rs | malwaredb |
| version | 0.1.2 |
| created_at | 2023-08-22 03:33:56.796807+00 |
| updated_at | 2025-08-31 02:48:08.09885+00 |
| description | Service for storing malicious, benign, or unknown files and related metadata and relationships. |
| homepage | https://malwaredb.net/ |
| repository | https://github.com/malwaredb/malwaredb-rs |
| max_upload_size | |
| id | 950696 |
| size | 494,815 |
Inspired by VXCage and VirusTotal, Malware DB is a malware knowledge management system which handles the bookkeeping regarding malware/goodware samples: hashes, origination, similarity, file types, and more. Its intention is to help malware/cybersecurity researchers, forensic investigators, and others who have a need to handle malware, or other files of potentially unknown origin. This is very much a work in progress and beta-quality project at present. Additionally, this program is not designed to prevent adverse issues which may arise from storing, handling, or allowing access to malware samples; use at your own risk. Be sure to follow best practices. There are no warranties or guarantees, expressed or implied.
file command. Install libmagic-dev on Linux, or brew install libmagic on macOS with Homebrew.
cargo install cargo-vcpkg; vcpkg install libmagic; vcpkg integrate installMAGIC environment variable may be used to specify the paths for the libmagic database.This project is in active development and not yet stable, nor are all the features implemented.
Install from source. Check out the repository and build (recommended), or build from crates.io:
cargo install malwaredb-clientcargo install malwaredb --features=admin,admin-gui,sqlite,vt (activates all the features, requires some external dependencies)pip install malwaredb to get the Python moduleServer Features (which are all opt-in):
admin: command-line administrative functionalityadmin-gui: Slint-powered GUI, tested and works on macOS, Linux, Windows, might work elsewhere?sqlite: Allow the use of SQLite as a database backend. Should only be used for testing and evaluation, as it lacks the similarity optimisations we have for Postgres.vt: Allow (but still be enabled) the Virus Total functionality (cache AV data for contained samples)ClarAVy (Code, Paper) or AVClass2.--features=admin,sqlite.sqlite feature to use SQLite. This is more for testing and evaluation than using in a real environment. See the example file in the root of the repository for an example./etc/mdb_server/mdb_config.toml on Linux, or /usr/local/etc/mdb_server/mdb_config.toml on FreeBSD for automatic config file detection. Otherwise, run with mdb_server run load /path/to/file, or mdb_server run config to specify arguments on the command line. Run with --help to see details.admin feature above, you can run mdb_server admin --help to see administrative options. Admin options require -c /path/to/config.toml to prevent making accidental changes. Note: using the admin command interactions with the database directly, so the server does not need to be running.mdb_server admin -c /path/to/config.toml list users. There is a default admin user, but no password is set. So let's set one.mdb_server admin -c /path/to/config.toml reset-password --uname admin. You'll be prompted for the password and it won't echo. The admin user doesn't do anything special at the moment, but that will change.mdb_server admin -c /path/to/config.toml create source --helpmdb_server admin -c /path/to/config.toml create group --helpmdb_server admin -c /path/to/config.toml add-group-to-source --helpmdb_server admin -c /path/to/config.toml add-user-to-group --helpmdb_client while mdb_server is running: mdb_client login http://localhost:8080 admin, replacing the URL with the actual IP and port you chose in the server configuration file.mdb_client whoami, it should show the user information and available groups and sources.mdb_client submit-samples -s SOURCE_ID /path/to/files_or_dirs. Paths may be to files or directories, and more than one path may be specified. All items will be uploaded to the same source (specified by the ID). If the file is a Zip, it will be decompressed in memory and each file submitted individually as long as it's not a known document type (like MS Office .docx, .xlsx, etc.).mdb_server admin -c /path/to/config.toml -s SOURCE_ID -u USER_ID /path/to/files_or_dirs. With the server admin function, a user ID must also be provided. Otherwise, this works the same way as the client, directories and files may be provided, they will be associated with the same source, and Zip files will be decompressed in memory and submitted individually if not a known MS Office format.mdb_client retrieve-sample SPECIFY_HASH_HERE. One hash per request, and it will be downloaded if it exists, and if the user has access to the group and source to which the sample is linked.mdb_client find-similar /path/to/file.bin. The same restriction with downloading applies: the user must have access to the group and source to which a potential similar file is linked. The output will be the hashes of the similar files, and by what means (similarity algorithm) the result is similar.mdb_client server-info displays some statics about the server, including version numbers, database type, and total amount of files.mdb_client server-types displays a list and magic numbers of supported file types.Some overall goals and design: