Expand description
§Malware DB API
This crate stores the API endpoints and data types expected for each endpoint. This could be used to build a custom client.
Modules§
- digest
- Wrapper for fixed-size cryptographic hash digests from hex strings
Structs§
- GetAPI
KeyRequest - User authentication with username and password to get the API key
- GetAPI
KeyResponse - Respond to authentication with the key if the credentials were correct, and possibly show a message related to errors or warnings.
- GetUser
Info Response - User account information
- Label
- A label, used for describing sources and/or samples
- Labels
- One or more available labels
- NewSample
B64 - New file sample being sent to Malware DB via
UPLOAD_SAMPLE_JSON_URL - NewSample
Bytes - New file sample being sent to Malware DB via
UPLOAD_SAMPLE_CBOR_URL - Report
- Information for an individual sample
- Search
Request - Search for a file by some criteria Specifying both a hash and file name is an AND operation!
- Search
Request Parameters - Search for a file by some criteria, all of which are an AND operation:
- Search
Response - Search result
- Server
Info - Information about the server
- Similar
Sample - Relation between a similar sample and the hashes by which the sample is similar
- Similar
Samples Request - Requesting hashes of possible similar samples by similarity hash
- Similar
Samples Response - Response indicating samples which are similar
- Source
Info - Information about a sample source
- Sources
- Sources response for request for sources
- Supported
File Type - One record of supported file types
- Supported
File Types - Server’s supported types, the response
- Virus
Total Summary - Virus Total hits summary for a specific sample
Enums§
- Partial
Hash Search Type - Specify the type of hash when searching for a partial match
- Search
Type - Searching the next batch from a prior search, or the initial search
- Server
Error - Server error responses
- Server
Response - For request types, wrap in this struct to handle some error conditions
- Similarity
Hash Type - The hash by which a sample is identified
Constants§
- DOWNLOAD_
SAMPLE_ CART_ URL - API endpoint for downloading a sample as a
CaRTcontainer file, GET Example:/v1/samples/download/cart/aabbccddeeff0011223344556677889900Response is the file encoded in aCaRTcontainer file, or HTTP 404 if not found - DOWNLOAD_
SAMPLE_ URL - API endpoint for downloading a sample, GET. The hash value goes at the end of the URL.
Example:
/v1/samples/download/aabbccddeeff0011223344556677889900Response is raw bytes of the file, or HTTP 404 if not found - LIST_
LABELS_ URL - API endpoint for finding samples which are similar to a specific file, POST
- LIST_
SOURCES_ URL - Endpoint for the sources, per-user, GET, authenticated
- MDB_
API_ HEADER - HTTP header used to present the API key to the server
- MDB_
VERSION - MDB version
- MDNS_
NAME - Endpoint name for use with Multicast DNS
- SAMPLE_
REPORT_ URL - API endpoint to get a report for a given sample
Example:
/v1/samples/report/aabbccddeeff0011223344556677889900 - SEARCH_
URL - APU endpoint for searching for files with some criteria
- SERVER_
INFO_ URL - Server information, request is empty, GET, Unauthenticated.
- SIMILAR_
SAMPLES_ URL - API endpoint for finding samples which are similar to a specific file, POST, Authenticated.
- SUPPORTED_
FILE_ TYPES_ URL - File types supported by Malware DB, request is empty, GET, Unauthenticated.
- UPLOAD_
SAMPLE_ CBOR_ URL - API endpoint for uploading a sample with CBOR, POST, Authenticated
- UPLOAD_
SAMPLE_ JSON_ URL - API endpoint for uploading a sample with JSON, POST, Authenticated
- USER_
INFO_ URL - User’s account information API endpoint, GET, authenticated
- USER_
LOGIN_ URL - Authentication endpoint, POST
- USER_
LOGOUT_ URL - Logout API endpoint to clear their API key, GET, authenticated.