Giter VIP home page Giter VIP logo

vt-cli's Introduction

VirusTotal CLI

Welcome to the VirusTotal CLI, a tool designed for those who love both VirusTotal and command-line interfaces. With this tool you can do everything you'd normally do using VirusTotal's web page, including:

And much more...

See it in action

asciicast

Getting started

As this tool uses the VirusTotal API under the hood, you will need a VirusTotal API key. By signing up with VirusTotal you will receive a free API key however, free API keys have a limited amount of requests per minute, and they don't have access to some premium features like searches and file downloads. If you are interested in using those premium features please contact us.

Installing the tool

There are two ways of installing the tool: by using one of our pre-compiled binaries or by building it by yourself.

Pre-compiled binaries

The pre-compiled binaries can be found on the releases page. There are binaries for Windows, Linux and Mac OS X. To use them, just download the file, decompress it and place it in a directory where you think is more convenient to use.

Manual building

To compile the program you'll need Go 1.14.x or higher installed in your system and type the following commands:

$ git clone https://github.com/VirusTotal/vt-cli
$ cd vt-cli
$ make install

NOTE: in order to use the vt binary, make sure the GOBIN is part of your PATH env variable:

$ export GOBIN=`go env GOPATH`/bin
$ export PATH=$PATH:$GOBIN
Mac OS

For Mac OS users, there's a brew formula available. Please note this is not maintained by VirusTotal.

$ brew install virustotal-cli
Windows

For Windows users, there's a Winget manifest available. Please note this is not maintained by VirusTotal.

winget install VirusTotal.vt-cli

Chocolatey is also supported (Also not maintained by VirusTotal):

choco install vt-cli

A note on Window's console

If you plan to use vt-cli in Windows on a regular basis we highly recommend you avoid the standard Windows console and use Cygwin instead. The Windows console is very slow when printing large amounts of text (as vt-cli usually does) while Cygwin performs much better. Additionally, you can benefit from Cygwin's support for command auto-completion, a handy feature that the Windows console doesn't offer. In order to take advantage of auto-completion make sure to include the bash-completion package while installing Cygwin.

Configuring your API key

Once you have installed the vt-cli tool you may want to configure it with your API key. This is not strictly necessary, as you can provide your API key every time you invoke the tool by using the --apikey option (-k in short form), but that's a bit of a hassle if you are going to use the tool frequently (and we bet you'll do!). For configuring your API key just type:

$ vt init

This command will ask for your API key, and save it to a config file in your home directory (~/.vt.toml). You can also specify your API key using the VTCLI_APIKEY environment variable. If you specify your API key in multiple ways, the --apikey option will have the highest precedence, followed by the VTCLI_APIKEY environment variable, the API key in the configuration file will be used as the last resort.

Use with a proxy

If you are behind an HTTP proxy you can tell vt-cli which is the address of your proxy server in multiple ways. One is using the --proxy option, like in:

$ vt --proxy http://myproxy.com:1234 <command>

You can also use the VTCLI_PROXY environment variable, or add the following line to the config file:

proxy="http://myproxy.com:1234"

Setup Bash completion

If you are going to use this tool frequently you may want to have command auto-completion. It saves both precious time and keystrokes. Notice however that you must configure your API as described in the previous section before following the steps listed below. The API is necessary for determining the commands that you will have access to.

  • Linux:

    $ vt completion bash > /etc/bash_completion.d/vt
  • Mac OS X:

    $ brew install bash-completion
    $ vt completion bash > $(brew --prefix)/etc/bash_completion.d/vt

    Add the following lines to ~/.bash_profile:

    if [ -f $(brew --prefix)/etc/bash_completion ]; then
    . $(brew --prefix)/etc/bash_completion
    fi
  • Cygwin:

    Make sure the bash-completion package is installed (Cygwin doesn't install it by default) and type:

    $ vt completion bash > /usr/share/bash-completion/completions/vt

❗ You may need to restart your shell in order for autocompletion to start working.

Setup ZSH completion

The output script from vt completion zsh needs to be put somewhere under the $fpath directory. For example, .oh-my-zsh/completions directory:

$ mkdir /Users/$USERNAME/.oh-my-zsh/completions
$ vt completion zsh > /Users/$USERNAME/.oh-my-zsh/completions/_vt

Restart the shell.

Usage examples

  • Get information about a file:

    $ vt file 8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85
  • Get information about a file in JSON format:

    $ vt file 8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85 --format json
  • Get a specific analysis report for a file:

    $ # File analysis IDs can be given as `f-<file_SHA256_hash>-<UNIX timestamp>`...
    $ vt analysis f-8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85-1546309359
    $ # ...or as a Base64 encoded string, retrieved from the `vt scan file` command:
    $ vt scan file test.txt
    test.txt MDJiY2FiZmZmZmQxNmZlMGZjMjUwZjA4Y2FkOTVlMGM6MTU0NjQ1NDUyMA==
    $ vt analysis MDJiY2FiZmZmZmQxNmZlMGZjMjUwZjA4Y2FkOTVlMGM6MTU0NjQ1NDUyMA==
    - _id: "MDJiY2FiZmZmZmQxNmZlMGZjMjUwZjA4Y2FkOTVlMGM6MTU0NjQ1NDUyMA=="
      _type: "analysis"
      date: 1546454520  # 2019-01-02 13:42:00 -0500 EST
      stats:
        failure: 0
        harmless: 0
        malicious: 0
        suspicious: 0
        timeout: 0
        type-unsupported: 0
        undetected: 0
      status: "queued"
  • Download files given a list of hashes in a text file, one hash per line:

    $ cat /path/list_of_hashes.txt | vt download -
  • Get information about a URL:

    $ vt url http://www.virustotal.com
  • Get the IP address that served a URL:

    $ vt url last_serving_ip_address http://www.virustotal.com
  • Search for files:

    $ vt search "positives:5+ type:pdf"
  • Scan a file:

    $ vt scan file <yourfile>
    <yourfile> ZDZiOTcxY2JhNDE0MWU5ZWRjN2JjNGQ2NTdhN2VjODU6MTU3MDE3Mjg1NQ==
    $ vt analysis ZDZiOTcxY2JhNDE0MWU5ZWRjN2JjNGQ2NTdhN2VjODU6MTU3MDE3Mjg1NQ==
    - _id: "ZDZiOTcxY2JhNDE0MWU5ZWRjN2JjNGQ2NTdhN2VjODU6MTU3MDE3Mjg1NQ=="
      _type: "analysis"
      date: 1570172855  # 2019-10-04 09:07:35 +0200 CEST
      stats:
        failure: 0
        harmless: 0
        malicious: 0
        suspicious: 0
        timeout: 0
        type-unsupported: 0
        undetected: 0
      status: "queued"
  • Export detections and tags of files from a search in CSV format:

    $ vt search "positives:5+ type:pdf" -i sha256,last_analysis_stats.malicious,tags --format csv
  • Export detections and tags of files from a search in JSON format:

    $ vt search "positives:5+ type:pdf" -i sha256,last_analysis_stats.malicious,tags --format json

Getting only what you want

When you ask for information about a file, URL, domain, IP address or any other object in VirusTotal, you get a lot of data (by default in YAML format) that is usually more than what you need. You can narrow down the information shown by the vt-cli tool by using the --include and --exclude command-line options (-i and -x in short form).

These options accept patterns that are matched against the fields composing the data, and allow you to include only a subset of them, or exclude any field that is not interesting for you. Let's see how it works using the data we have about http://www.virustotal.com as an example:

$ vt url http://www.virustotal.com
- _id: 1db0ad7dbcec0676710ea0eaacd35d5e471d3e11944d53bcbd31f0cbd11bce31
  _type: "url"
  first_submission_date: 1275391445  # 2010-06-01 13:24:05 +0200 CEST
  last_analysis_date: 1532442650  # 2018-07-24 16:30:50 +0200 CEST
  last_analysis_results:
    ADMINUSLabs:
      category: "harmless"
      engine_name: "ADMINUSLabs"
      result: "clean"
    AegisLab WebGuard:
      category: "harmless"
      engine_name: "AegisLab WebGuard"
      result: "clean"
    AlienVault:
      category: "harmless"
      engine_name: "AlienVault"
      result: "clean"
  last_http_response_code: 200
  last_http_response_content_length: 7216
  last_http_response_content_sha256: "7ed66734d9fb8c5a922fffd039c1cd5d85f8c2bb39d14803983528437852ba94"
  last_http_response_headers:
    age: "26"
    cache-control: "public, max-age=60"
    content-length: "7216"
    content-type: "text/html"
    date: "Tue, 24 Jul 2018 14:30:24 GMT"
    etag: "\"bGPKJQ\""
    expires: "Tue, 24 Jul 2018 14:31:24 GMT"
    server: "Google Frontend"
    x-cloud-trace-context: "131ac6cb5e2cdb7970d54ee42fd5ce4a"
    x-frame-options: "DENY"
  last_submission_date: 1532442650  # 2018-07-24 16:30:50 +0200 CEST
  private: false
  reputation: 1484
  times_submitted: 213227
  total_votes:
    harmless: 660
    malicious: 197

Notice that the returned data usually follows a hierarchical structure, with some top-level fields that may contain subfields which in turn can contain their own subfields. In the example above last_http_response_headers has subfields age, cache-control, content-length and so on, while total_votes has harmless and malicious. For referring to a particular field within the hierarchy we can use a path, similar to how we identify a file in our computers, but in this case, we are going to use a dot character (.) as the separator for path components, instead of the slashes (or backslashes) used by most file systems. The following ones are valid paths for our example structure:

  • last_http_response_headers.age
  • total_votes.harmless
  • last_analysis_results.ADMINUSLabs.category
  • last_analysis_results.ADMINUSLabs.engine_name

The filters accepted by both --include and --exclude are paths in which we can use * and ** as placeholders for one and many path elements respectively. For example foo.* matches foo.bar but not foo.bar.baz, while foo.** matches foo.bar, foo.bar.baz and foo.bar.baz.qux. In the other hand, foo.*.qux matches foo.bar.qux and foo.baz.qux but not foo.bar.baz.qux, while foo.**.qux matches foo.bar.baz.qux and any other path starting with foo and ending with qux.

For cherry-picking only the fields you want, you should use --include followed by a path pattern as explained above. You can also include more than one pattern either by using the --include argument multiple times, or by using it with a comma-separated list of patterns. The following two options are equivalent:

$ vt url http://www.virustotal.com --include=reputation --include=total_votes.*
$ vt url http://www.virustotal.com --include=reputation,total_votes.*

Here you have different examples with their outputs (assuming that vt url http://www.virustotal.com returns the structure shown above):

$ vt url http://www.virustotal.com --include=last_http_response_headers.server
- last_http_response_headers:
    server: "Google Frontend"
$ vt url http://www.virustotal.com --include=last_http_response_headers.*
- last_http_response_headers:
    age: "26"
    cache-control: "public, max-age=60"
    content-length: "7216"
    content-type: "text/html"
    date: "Tue, 24 Jul 2018 14:30:24 GMT"
    etag: "\"bGPKJQ\""
    expires: "Tue, 24 Jul 2018 14:31:24 GMT"
    server: "Google Frontend"
    x-cloud-trace-context: "131ac6cb5e2cdb7970d54ee42fd5ce4a"
    x-frame-options: "DENY"
$ vt url http://www.virustotal.com --include=last_analysis_results.**
- last_analysis_results:
    ADMINUSLabs:
      category: "harmless"
      engine_name: "ADMINUSLabs"
      result: "clean"
    AegisLab WebGuard:
      category: "harmless"
      engine_name: "AegisLab WebGuard"
      result: "clean"
    AlienVault:
      category: "harmless"
      engine_name: "AlienVault"
      result: "clean"
$ vt url http://www.virustotal.com --include=last_analysis_results.*.result
- last_analysis_results:
    ADMINUSLabs:
      result: "clean"
    AegisLab WebGuard:
      result: "clean"
    AlienVault:
      result: "clean"
$ vt url http://www.virustotal.com --include=**.result
- last_analysis_results:
    ADMINUSLabs:
      result: "clean"
    AegisLab WebGuard:
      result: "clean"
    AlienVault:
      result: "clean"

Also notice that _id and _type are also field names and therefore you can use them in your filters:

$ vt url http://www.virustotal.com --include=_id,_type,**.result
- _id: "1db0ad7dbcec0676710ea0eaacd35d5e471d3e11944d53bcbd31f0cbd11bce31"
  _type: "file"
  last_analysis_results:
    ADMINUSLabs:
      result: "clean"
    AegisLab WebGuard:
      result: "clean"
    AlienVault:
      result: "clean"

The --exclude option works similarly to --include but instead of including the matching fields in the output, it includes everything except the matching fields. You can use this option when you want to keep most of the fields, but leave out a few of them that are not interesting. If you use --include and --exclude simultaneously --include enters in action first, including only the fields that match the --include patterns, while --exclude comes in after that, removing any remaining field that matches the --exclude patterns.

vt-cli's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vt-cli's Issues

Installation issue on macOS

I cloned the repo.
The Go version is 1.19.5.
When I run make install:

➜ vt-cli git:(master) make install
go install -ldflags "-X github.com/VirusTotal/vt-cli/cmd.Version=" github.com/VirusTotal/vt-cli/vt
➜ vt-cli git:(master)

And when I run the go install -ldflags "-X github.com/VirusTotal/vt-cli/cmd.Version=" github.com/VirusTotal/vt-cli/vt directly, nothing happens!

TestYAML fails when timezone != CET

I'm maintaining the vt-cli package in the AUR and one user reported the failing test.
Looking at the output he provided I could quickly reproduce it and it turns out to be an upstream issue.

Reproduce (master/HEAD)

TZ='Europe/Moscow' go test ./yaml

Output:

--- FAIL: TestYAML (0.00s)
    yaml_test.go:188: 
                Error Trace:    yaml_test.go:188
                Error:          Not equal: 
                                expected: "Foo_date: 10000  # 1970-01-01 03:46:40 +0100 CET\n"
                                actual  : "Foo_date: 10000  # 1970-01-01 05:46:40 +0300 MSK\n"
                            
                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1,2 +1,2 @@
                                -Foo_date: 10000  # 1970-01-01 03:46:40 +0100 CET
                                +Foo_date: 10000  # 1970-01-01 05:46:40 +0300 MSK
                                 
                Test:           TestYAML
                Messages:       Test {10000}
FAIL
FAIL    github.com/VirusTotal/vt-cli/yaml       0.003s
FAIL

Some files details produce invalid YAML

While running a larger search, I was unable to parse the Yaml results. Triaging some files details in my search results I found some .NET files analysis produce invalid Yaml output.

To reproduce:

vt search 07720ce506b5cf4ecb1b276f673c4dcc7c1c2bb0c145e2eca4b1d5a3f9abcfb5 

The error is here:

    external_assemblies: 
      : 
        version: "3488.93.146.3490"

Full broken results for this file can be found here https://gist.github.com/schrodyn/8f2c84b563b5209d516def36783a175e Tried a couple of Yaml parsers and they fail most notably the Python yaml parser and the yq utility.

VT CLI Download Error

Description

I encountered an issue while using the vt download command from this project on GitHub. Below, I have provided details about the problem I faced.

Issue Severity

Minor

Environment

OS: MacOS
Version: Ventura 13.4.1

Issue Details

I found the below command in the main page of this project which basically downloads all shas listed in an arbitrary text file:

cat /path/list_of_hashes.txt | vt download -

Now, if a sha doesn't exist in VT, the script doesn't ignore that sha and casts an error as below:

Error: File "sha256" not found

Expected Behavior

Ideally, one would like the script to continue processing and downloading the rest of hashes although some of them do not exist in VT but this is not the way this script works at the moment.

Can you please fix this issue?

Crash when running analysis command while including >

Get this crash when running this line vt an ZmM1MThiMzY4MTJiYjBiMTNhYmMwMTYwN2JhNjg2ZjI6MTYxMjgwNTE4MQ== > supplied-sample1/supplied_sample1.out.virustotaldata

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5fd476]

goroutine 7 [running]:
net/url.(*URL).ResolveReference(0xdc3e20, 0x0, 0x0)
        /home/travis/.gimme/versions/go1.14.15.linux.amd64/src/net/url/url.go:998 +0x36
github.com/VirusTotal/vt-go.URL(0x9958c8, 0xb, 0xc000040758, 0x1, 0x1, 0x0)
        /home/travis/gopath/pkg/mod/github.com/!virus!total/[email protected]/vt.go:71 +0x89
github.com/VirusTotal/vt-cli/utils.(*APIClient).RetrieveObjects.func1(0xc0001acba0, 0xc000010a60, 0x9958c8, 0xb, 0xc000076360, 0xc0001acb40, 0xc0001b8610, 0x0, 0x7ffe7d4d16f3, 0x40)
        /home/travis/gopath/src/github.com/VirusTotal/vt-cli/utils/client.go:77 +0xb4
created by github.com/VirusTotal/vt-cli/utils.(*APIClient).RetrieveObjects
        /home/travis/gopath/src/github.com/VirusTotal/vt-cli/utils/client.go:75 +0x238

Seems like it's trying to parse the redirection from STDOUT?

Search issues one API request per sample causing massive API usage

Hey there,

Been using VirusTotal for a while, and vt-cli seemed perfect, until I checked our API request usage and discovered that using vt search even with the -I option results in one request being made to the API for every sample returned, the issue seems to be that the -I option doesn't actually do anything except hide the output from the user, the request is still made on the backend, what I was hoping was something more like the VT web search, except an easy way to export all results.

It'd be good to see an option that issues one API request per search, even if it's per 20-30 results, vs 1 per result, easily eating up a modestly sized quota in a matter of hours.

error - gzip: invalid header

Hi, I downloaded the tool, and when I try to insert an API it gives me an error every time:

gzip: invalid header

possible security issue with request method

I noticed a difference in the response on a network which I did not trust and a trusted network in the response, and this has led me to believe that the request method the api uses does not force an https connection when it makes the request to the virustotal url. I have not reviewed every line of code in your binary but I think that what I am seeing is compelling enough to lead me to the conclusion that your binary uses http to make the call to virus total for a response. If this is correct the program is vulnerable to man in the middle attacks. I apologize if I have opened this bug in error but the difference I am seeing in the response leads to this conclusion. Feel free to just close if the program does indeed force an https connection when using the request method. I have been experimenting at home with your software and I noticed this.

FreeBSD Release

Hi,

Can you please include FreeBSD in your releases and as a target in the Makefile.

Thanks.

Make issue (Debian)

go1.21.1 linux/amd64 is installed (manually installed it).

I see the following error message after downloading vt-cli and running "make install"

Make install
go install -ldflags "-X github.com/VirusTotal/vt-cli/cmd.Version=" github.com/VirusTotal/vt-cli/vt
cannot find package "github.com/VirusTotal/vt-cli/vt" in any of:
/usr/local/go/src/github.com/VirusTotal/vt-cli/vt (from $GOROOT)
/home/maorhz/Documents/Code/GO/src/github.com/VirusTotal/vt-cli/vt (from $GOPATH)
make: *** [Makefile:13: install] Error 1

Any idea where this is going wrong?

possible problem with the code or documentation

The documentation says you can query a group of URLs with this syntax:

cat list_of_urls | vt url -

this is taken from the help file on the command line binary.

~/virustotal_workspace$ cat test.txt | vt url -k KEY -
URL "LQ" not found

I have replaced my API key with KEY

I have tested this same code on both Linux and Windows with PowerShell and get the same results. The commands should work on both platforms. This leads me to two possible conclusions. Either there is a problem with the documentation, or there is a problem with the code. I may grep the code to see if I can find this string, but I am working at the moment. If I am typing something wrong, please correct me. Thank you.

Option to suppress upload progress

Could we have an option to not show the upload progress?

If I'm calling this from a script then having the progress displayed isn't as useful.

cannot download file with public api

Hi,

I don't know if my public api won't work or skipped a line in the instructions; however, I cannot download any file with the given SHA256. I get :

$ cat hashes.txt | vt download -
ca6597375fe4738a15021d9712c30b907293756436ed3a784d2feafed010a286 [You are not authorized to perform the requested operation]
d03339104a85a196ea98e3caebda458931f2af281e5ed93f867d8caf1b157726 [You are not authorized to perform the requested operation]

Allow for filtering in hunting notifications

the hunting notifications returns a list with a cursor, but it is just sequential order of all notifications. It would be helpful to be able to filter by specific "subject" content i.e. rule names. In the example below I'd want to filter in rules that match AV_trojan_*

image

Content search returns duplicate hashes

vt search "content:FirstStageDropper.dll OR content:SecondStageDropper.dll" -I -n 50
feaa627fa65c452b75522ea3633e51f1842fc7577a523d43c5ea529c8aa08713
3485c9b79dfd3e00aef9347326b9ccfee588018a608f89ecd6597da552e3872f
a09273b4cc08c39afe0c964f14cef98e532ae530eb60b93aec669731c185ea23
a09273b4cc08c39afe0c964f14cef98e532ae530eb60b93aec669731c185ea23
43f7ae58e8e5471917178430f3425061d333b736974f4b2784ca543e3093204b
a260d222dfc94b91a09485647c21acfa4a26469528ec4b1b49469db3b283eb9a
a260d222dfc94b91a09485647c21acfa4a26469528ec4b1b49469db3b283eb9a
2d7cb5ff4a449fa284721f83e352098c2fdea125f756322c90a40ad3ebc5e40d
2d7cb5ff4a449fa284721f83e352098c2fdea125f756322c90a40ad3ebc5e40d
d75de8f7a132e0eb922d4b57f1ce8db47dfcae4477817d9f737762e486283795
d75de8f7a132e0eb922d4b57f1ce8db47dfcae4477817d9f737762e486283795
3c2187bc2a16f408f3aef4cbcebaf8f03134578086bac531b827ec0f7f7612bb
3c2187bc2a16f408f3aef4cbcebaf8f03134578086bac531b827ec0f7f7612bb
a63437a044d3ad01c52b0b18016bfdb8af2338067a4216be2dcaa04ec8ecee97
bf38bea3f89a697b0be13413b0fb1db2154b3dc79fffbee238014e4adeb0b880

Please add zsh-completion instructions to README

I'd like to see instructions on how to enable zsh tab completion added to the README. I've gotten bash completion to work, but having issues with zsh completion. Admittedly new to zsh, so not sure exactly where to put the file. I've tried using /usr/share/zsh/functions/Completion/vt, as well as ~/.oh-my-zsh/completions, but this doesn't seem to work.

Best

Pre-compiled binaries not working w/ openSUSE Leap 42.3

Downloaded the most recent (vt-cli 0.6.1) 64bit binary but it's somehow not working.
Running ./vt init and providing the API key returns:

Get https://[my_hostname]/api/v3/metadata: Forbidden

Providing the API key via the command line returns (using verbose mode), e.g.:

* API key: [my_API key]
* API host: [my_hostname]
Get https://[my_hostname]/api/v3/files/8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85: Forbidden

On another openSUSE Leap 42.3 I get the following message:

Get https:// [...] dial tcp: lookup [my_FQDN] on 192.168.1.1:53 no such host

vt version doesn't print the version number

I wanted to check my current vt CLI version (Homebrew) and was surprised to see vt version didn't print any version number.

So I checked out the repo to find out this is a current problem:

$ make
$ make install
$ ~/go/bin/vt version
vt-cli 

And I verified on an old setup, this isn't a regression as of commit 031203cad77b.

Help with Installation.

Hi,
I've been trying to install the vt-cli tool but i keep get the same error while using
make install
The Error it gives me is:

go install -ldflags "-X github.com/VirusTotal/vt-cli/cmd.Version=" github.com/VirusTotal/vt-cli/vt
/bin/sh: 1: go: not found
make: *** [Makefile:13: install] Error 127

Please assist, I don't know what to do from this point..

Output Options (Feature Request)

For post processing or feeding into other tools, it would be very useful to be able to convert output into JSON (and potentially CSV).

vt: command not found

Hello i am using Windows and sub system linux shell i have problem about vt init also output there is vt: command not found.

vt-cli init not saving the conf file with an a bytes-like object is required, not 'str'

If I try to init vt-cli, I get the following error and start the init process again:

molinajavier@jramirez-samples:~$ vt
[+] Config setup start
        [0] .vtapi
        [1] vtapi.conf
        [2] ~/.vtapi
        [3] ~/vtapi.conf
[+] Select option, where you want to create config, or type custom path:1
[+] Provide your apikey: $myapikey
[+] Your apikey is pubic/private:private
[+] You have access to VT intelligence True/False:False
[optional] Your username for weblogin, only for rule menagment$user
[optional] Your password for weblogin, only for rule menagment$pass
[optional] Rule match notification email$email
[optional] Share rules with user$user2
a bytes-like object is required, not 'str'
[+] Config setup start
        [0] .vtapi
        [1] vtapi.conf
        [2] ~/.vtapi
        [3] ~/vtapi.conf
[+] Select option, where you want to create config, or type custom path:

If I abort the process, the configuration file is created empty and the tool can't be used.

how do i install this?

i downloaded the binary package and i am kinda high and i need help installing this, please senapi help.

How do I turn off the --verbose flag?

I tried using the --verbose flag once, just to see what it does, and now it is forever enabled even after several OS X reboots. How can I turn it off? I really don't need all that verbiage, which gets in the way of testing different command options and scripts. There is no --quiet flag.

proxy issue

how can i add my proxy in the command ? i tried to search but couldn't find a parameter to use to add my proxy
because all my devices are behind a proxy

How to scan contents of a folder?

I am using a tool that auto-extracts archives (ExtractNow) and it has the option to run commands and run external programs after completion.

It has many variables, such as %DestinationFolder%, but not the variable for the files.

I am trying to set it up to scan the folder after extraction, but it says it's invalid.

I get the same error when I try to manually scan any folder.

Any ideas?

image

image

image

image

Conditional Formatting - Feature Request

I think we need a feature that can help do some conditional formatting for the results. Like I just want to have results for the categories that are malicious. not everything.

Make the scanning of a file/URL less cumbersome

When the only thing you want is to upload a file/url and get the verdicts back, the existing method is a bit cumbersome. The vt scan command returns an analysis ID that then you need to use with vt analysis in order to get the analysis results. And you may need to call vt analysis multiple times until the analysis is completed.

It would be great if this process can be simplified.

scan file is returning "Expecting JSON response from POST"

I'm trying to upload a file using vt scan file "C:\Users\david\Downloads\JetBrains.dotUltimate.2021.1.3.exe" -k xxxxxxx.

The file uploads and then I get the following:

C:\Users\david\Downloads\JetBrains.dotUltimate.2021.1.3.exe uploading... 99.1%

C:\Users\david\Downloads\JetBrains.dotUltimate.2021.1.3.exe scanning...

Expecting JSON response from POST https://www.virustotal.com/_ah/upload/really-long-url/

I assume the upload failed because when I search for the sha256 on the website, it doesn't find anything.

Unable to obtain more than 100 results per lookup

Summary

With the vt domain subdomains <subdomain> -n 10000 query, it only returns more than 100 results in a single query, and the command does not return with a cursor - therefore it does not appear to be possible to query for

Expected Behavior

The command should yield either a cursor value for the user to make multiple queries, or make it automatically continue until the desired amount of results is reached.

help with the installation of this repository

image

What am I doing wrong? Why the "vt" command doesn't work for me.
I did the following actions:

  1. git clone https://github.com/VirusTotal/vt-cli

  2. cd vt-cli

  3. make install

  4. sudo apt-get install bash-completion

  5. When, after all the points I had done, I wrote "vt", then I was written that
    image

  6. I thought that it was necessary and took installed vt, which was recommended by kali linux itself, but as it turns out later - this is absolutely not what I need

  7. I even tried "export PATH=$PATH:'go env GOPATH'/bin" to fix it somehow, but it didn't help, I don't know what to do, please help
    even just $GOPATH doesn't work for me, even though I installed:

  8. sudo apt-get golang installation

  9. sudo apt-get gccgo installation-go

How is the `behash` value calculated?

Hi VT!

We love the behash value found here: https://developers.virustotal.com/reference/file-behaviour-summary

However, we would like to use this value across multiple dynamic analysis / file behaviour feeds, some that are not from VT, in order to relate similar runs.

Would you be able to clarify how to calculate that behash value such that we would be able to reproduce it given a set of input values? Or is the calculation somewhere in a repository somewhere that I could be directed to?

Thanks,

Kevin

Download functionality does not work

The tool does not download files from VirusTotal and fails without an error. I was able to track it down to an improper URL provided by the VT API. When client.GetData(u, &downloadURL) is called on line 39 in cmd/download.go the json response from the API looks something like this:

{
    "data": "https://vtsamples.commondatastorage.googleapis.com...&response-content-disposition=attachment; filename=\"...\"&response-content-type=application/octet-stream;"
}

The returned data is treated as an URL but it is either not properly encoded or contains some data that it shouldn't.

Show the analysis result before scanning the file again, just like the web GUI?

I wonder if the cli can support the behavior just like the web GUI, sometimes, a large file just scanned a few hours ago, and it actually came from an authorized source that doesn't worry us to scan and wait for the result again, just hours or even minutes later after the last scanning. That feature could also saving the resources on VirtusTotal!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.