VirusTotal
Synopsis
Enriches events by querying the VirusTotal API for threat intelligence about files, URLs, domains, and IP addresses.
Schema
virustotal:
- field: <ident>
- api_key: <string>
- query_type: <enum>
- interval: <numeric>
- timeout: <numeric>
- description: <text>
- if: <script>
- ignore_failure: <boolean>
- ignore_missing: <boolean>
- on_failure: <processor[]>
- on_success: <processor[]>
- tag: <string>
- target_field: <ident>
Configuration
Field | Required | Default | Description |
---|---|---|---|
field | Y | - | Field containing hash, URL, domain, or IP to query |
api_key | Y | ${VIRUSTOTAL_API_KEY} | VirusTotal API key for authentication |
query_type | N | hash | Type of query: hash , url , domain , or ip |
interval | N | 1 | Polling interval in seconds for URL analysis |
timeout | N | 10 | Maximum number of polling attempts |
target_field | N | field | Field to store the API response |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue if API call fails |
ignore_missing | N | false | Continue if source field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
The processor supports queries for file hashes (e.g. MD5, SHA-1, SHA-256), URLs (including scanning and analysis retrieval), domain names, and IP addresses. It also fetches reputation data.
Consider VirusTotal API rate limits.
Responses are returned as structured objects. Analysis stats provide counts from multiple engines.
Automated URL scanning, and rich threat intelligence are also available, so responses may include rich metadata.
File scan results may not be immediately available, and URL scanning may have additional delays.
Error handling and success/failure options are supported, as well.
API keys should be securely stored.
Examples
File Hashes
Checking a file hash... |
|
retrieves the relevant results: |
|
URLs
Analyze a URL with custom polling settings... |
|
submits the scan and retrieves the results: |
|
Domains
Querying domain reputation... |
|
adds domain intelligence: |
|
Error Handling
Anticipating API failures... |
|
continues execution: |
|
- URL analysis includes both scanning and result retrieval with configurable polling
- API key can be specified directly or via environment variable
- Responses are returned as structured objects
- Analysis stats provide counts from multiple engines
- API responses may include rich metadata
- API keys should be securely stored
- Consider VirusTotal API rate limits
- URL scanning may have additional delays based on polling settings
- File scan results may not be immediately available
- Long polling intervals may impact processing time