Hi Paolo,
There are two ways to run the CLI binary -
The first way is with the --config flag on the actual server - where the binary directly accesses the filestore and uploads the file locally.
The second way is with the -a flag we use the API config to make an API connection to the server (from remotely). This is only used by the query command though.
The way you ran the command `tools upload ` in the example you provided is without a config file - instead you provided an API config file (which is ignored since this command does not use the api). This means it does not know which filestore to upload it to and the error is that it can not load a valid config file at all.
If you are running on the server itself you can upload a tool binary like this
velociraptor.exe --config server.config.yaml tools upload --name NameOfTool /path/to/binary
Because the config file is provided , the CLI program knows where to put the binary and how to update the inventory files in the datastore.
If you want to upload a tool with an API call you can use the VQL inventory_add() function
https://docs.velociraptor.app/vql_reference/server/inventory_add/ and provide a filename (on the actual server) to take the binary from. Note that when making an API call the query is actually running on the server itself and the filename needs to be accessible from there. You can use the accessor parameter to get creative on how to actually fetch the file onto the server (e.g. via SMB or S3 or SSH ) but the server needs to get the file there by itself.
Hope this helps clarify matters
Mike
| Mike Cohen Digital Paleontologist, Velocidex Enterprises |
| | | | |
|
|