turbot/virustotal
steampipe plugin install virustotal

VirusTotal + Steampipe

VirusTotal is an Internet security, file and URL analyzer.

Steampipe is an open-source zero-ETL engine to instantly query cloud APIs using SQL.

Get VirusTotal scan data for a local file:

select
meaningful_name,
reputation
from
virustotal_file
where
path = '/full/path/to/file'
+----------------------------------+------------+
| meaningful_name | reputation |
+----------------------------------+------------+
| terraform_1.0.1_darwin_amd64.zip | 0 |
+----------------------------------+------------+

Documentation

Get started

Install

Download and install the latest VirusTotal plugin:

steampipe plugin install virustotal

Credentials

ItemDescription
CredentialsVirusTotal requires a free API key for all requests.
RadiusEach connection represents a single VirusTotal account.

Configuration

Installing the latest virustotal plugin will create a config file (~/.steampipe/config/virustotal.spc) with a single connection named virustotal:

connection "virustotal" {
plugin = "virustotal"
api_key = "beec40da46647b5e31d5377af470c0c525fd4185fb14ed2d0b38a038718ae3bf"
}
  • api_key - Your VirusTotal API key.

Postgres FDW

This plugin is available as a native Postgres FDW. Unlike Steampipe CLI, which ships with an embedded Postgres server instance, the Postgres FDW can be installed in any supported Postgres database version.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_postgres_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/postgres.sh)" -- virustotal

The installer will prompt you for the plugin name and version, download and install the appropriate files for your OS, system architecture, and Postgres version.

To configure the Postgres FDW, you will create an extension, foreign server, and schema and import the foreign schema.

CREATE EXTENSION IF NOT EXISTS steampipe_postgres_virustotal;
CREATE SERVER steampipe_virustotal FOREIGN DATA WRAPPER steampipe_postgres_virustotal OPTIONS (config '<your_config>');
CREATE SCHEMA virustotal;
IMPORT FOREIGN SCHEMA virustotal FROM SERVER steampipe_virustotal INTO virustotal;

SQLite Extension

This plugin is available as a SQLite Extension, making the tables available as SQLite virtual tables.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_sqlite_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/sqlite.sh)" -- virustotal

The installer will prompt you for the plugin name, version, and destination directory. It will then determine the OS and system architecture, and it will download and install the appropriate package.

To configure the SQLite extension, load the extension module and then run the steampipe_configure_virustotal function to configure it with plugin-specific options.

$ sqlite3
sqlite> .load ./steampipe_sqlite_extension_virustotal.so
sqlite> select steampipe_configure_virustotal('<your_config>');

Export

This plugin is available as a standalone Export CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- virustotal

You can pass the configuration to the command with the --config argument:

steampipe_export_virustotal --config '<your_config>' <table_name>