HV User Manuale
HV User Manuale
Page 1 of 35
Copyright (c) 2024 Hex-Rays SA
3.5. Misc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.5.1. passwd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.5.2. commit edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.5.3. licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.5.4. borrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.5.5. return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.6. Administrative commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.6.1. Managing users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.6.1.1. user add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.6.1.2. user edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.6.1.3. user del . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.6.2. Managing groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.6.2.1. group add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.6.2.2. group edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.6.2.3. group del . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.6.3. Managing permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.6.3.1. perm get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.6.3.2. perm set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.6.3.3. perm check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.6.4. Others . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.6.4.1. sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.6.4.2. purge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4. Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1. What is a "site"? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1.1. Root directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1.2. Path filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1.2.1. Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2. Resolving conflicts in a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2.1. Auto-resolve (if no conflicts) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.2.2. Auto-resolve, prefer local . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.2.3. Auto-resolve, prefer remote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.2.4. Interactive merge mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.2.5. Use local, discard remote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.2.6. Use remote, discard local . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.3. hvignore (and .hvignore) files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.3.1. The main hvignore file (path/to/install-dir/hvignore) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.3.2. Additional .hvignore files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.4. The registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.5. Passwords storage in the OS’s keychain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.6. Managing permissions on a vault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1. hv credentials
In order to connect to the vault server, hv must at least have:
• a username
• a password
• a hostname
For example:
Page 2 of 35
Copyright (c) 2024 Hex-Rays SA
2022-06-27 * admin
2022-06-22 alice Alice <[email protected]>
Never bob Bob <[email protected]>
...
All credentials, including usernames, are case-senstive, meaning that "Joe" and "joe" would be
IMPORTANT
different users.
--set remember credentials. This option doesn’t require the credentials to be passed through the
command line, credentials passed through environment variables will work as well
The user, host (and optional site) will be persisted in the registry, while the password will be saved to the OS’s keychain.
NOTE For this operation to succeed, at least a user and host must be provided
In order to keep the various commands' syntax as clear as possible, we will assume that the user has
TIP
stored credentials (in either the registry+keychain or environment variables) for the rest of this manual.
Page 3 of 35
Copyright (c) 2024 Hex-Rays SA
>./hv info
if you login to the server using hvui and save the login information, it will end up in the the
TIP
registry+keychain method, and thus hv will then be able to use that information as well.
Page 4 of 35
Copyright (c) 2024 Hex-Rays SA
2. Path formats
Local paths refer to a file on the host file system.
Vault paths refer to a file mapped on the vault. They can start with // to refer to the root of the vault.
Some vault paths can optionally specify the revision of the path.
* all revisions
2.1. Examples
Get the first revision of a file:
$ hv sync //malware/Ransomware.WannaCry/41aa.exe.i64#1
ok synced //malware/Ransomware.WannaCry/41aa.exe.i64#1 (838724 bytes)
ok sync completed
$ hv sync malware/Ransomware.WannaCry/41aa.exe.i64#^
ok synced //malware/Ransomware.WannaCry/41aa.exe.i64#3 (846916 bytes)
ok sync completed
Force sync to the current revision (we must specify -f to force a file transfer):
$ hv sync -f malware/Ransomware.WannaCry/41aa.exe.i64#=
ok synced //malware/Ransomware.WannaCry/41aa.exe.i64#2 (846916 bytes)
ok sync completed
$ hv md5 malware/Ransomware.WannaCry/41aa.exe.i64#*
ok 8F464140FA3DA4A20B03166F2E80325B //malware/Ransomware.WannaCry/41aa.exe.i64#1
ok E0F7B984151FEF497985F375C64FA5C7 //malware/Ransomware.WannaCry/41aa.exe.i64#2
ok 5C3B88306CF0D93DC35FFD67A710AE3B //malware/Ransomware.WannaCry/41aa.exe.i64#3
$ hv dir //
2022-06-02 10:29:30 140267 CL29/edit //malware/cppobj_virtcall.i64#9
2022-06-14 16:44:19 2173541 CL36/edit //iOS/dyld_ios16.i64#3
Page 5 of 35
Copyright (c) 2024 Hex-Rays SA
$ hv add /path/to/local_rootdir/enable.png
ok added '//enabled.png'
$ hv add /path/to/local_rootdir/REsearch
ok added '//REsearch/vm2vm.dat'
ok added '//REsearch/vm2vm.exe'
ok added '//REsearch/vm2vm.i64'
$ hv del /path/to/local_rootdir/REsearch/*.dat
ok checked out '//REsearch/vm2vm.dat' for 'del' (worklist 1)
$ hv worklist show
WL 1 add //REsearch/vm2vm.exe#0
WL 1 add //REsearch/vm2vm.i64#0
WL 1 edit //cppobj_virtcall.i64#9
WL 1 add //enabled.png#0
It is safe to interrupt a command using Ctrl-C. The file transfers in action will be gracefully terminated, so that no partially
received files will be left on the disk. However, the requests that were delivered to the server will still be carried out up to
the completion. For example, if the user asked to check out thousands of files for editing, this will be performed even if
the user presses Ctrl-C after invoking the command.
If the command syntax specifies ellipsis (…), it means that multiple path patterns can be
IMPORTANT specified. The path patterns can be specified using local paths or vault paths, which start with a
double slash (//).
Page 6 of 35
Copyright (c) 2024 Hex-Rays SA
3. Commands
3.1. Sites
Commands in this section manipulate sites.
A user must be using a site in order for most commands to work correctly.
The specified user will be the owner of the new site. If the user is not specified, the current user will own the site. Only the
site owner can use a site.
Parameters
-u USER The user (owner) of the new site, must be an existing username. Defaults to the current user. Admins
can specify a different user.
SITENAME The name of the site that will be created, it must be unique (no site can already exist with that name).
It must not exceed 64 characters, and it must be composed of alphanumerics or underscore or dash.
The first character cannot be a digit or a dash.
ROOTDIR The absolute path to the directory that will hold the vault files.
HOST The computer from which the site can be used. It can be specified as an empty string. In this case the
server will let the site to be used by any computer. However, since it is a safety feature that prevents
from inadvertently using a site from a wrong computer, we do not recommend to specify it as an
empty string. When creating a site for the current user, the host defaults to the current computer.
Examples:
alice@alice_PC$ hv sites
Site name User Host Last Used Rootdir
--------- ----- -------- ---------- ------------
alicepc alice alice_PC Never /home/alice/vault_site
Page 7 of 35
Copyright (c) 2024 Hex-Rays SA
If -f was passed and the site has some pending worklists, they will be deleted.
Parameters
-f Force the deletion even if the site still has worklists.
Example:
Admins can reassign a site to a new user or edit sites of other users.
Parameters
-u USER The new user (owner) of the site, can only be different than the previous owner if the current user is
admin.
SITENAME The name of the site that will be edited. It must exist and be owned by the current user, unless if the
current user is admin.
ROOTDIR The new absolute path to the directory that will hold the site files.
HOST The new hostname that will be used for the site. It can be omitted if no changes are desired.
Examples:
3.1.4. sites
sites [SITENAME]
Page 8 of 35
Copyright (c) 2024 Hex-Rays SA
Parameters
SITENAME Name of the site to show.
Example:
alice@alice_PC$ hv sites
Site name User Host Last Used Rootdir Cur
---------- ------ ---------- ---------- ---------------------- ---
alicepc alice alice_PC 2022-06-22 /home/alice/vault_site *
joe_laptop joe ThinkPad14 2022-05-30 c:/work/vault
chrispc chris chris_PC Never W:/vault
Parameters
-s SITENAME The sitename whose filter table should be displayed. If omitted, defaults to the current site.
Examples:
Page 9 of 35
Copyright (c) 2024 Hex-Rays SA
Information about the format of site filters can be retrieved by issuing the filt get command.
Parameters
-s SITENAME The sitename whose filter table should be set. If omitted, defaults to current site.
Examples:
Page 10 of 35
Copyright (c) 2024 Hex-Rays SA
3.2.1. add
add [-s] [-w WORKLIST_ID] PATH_PATTERN…
Adds new file(s) to a worklist.
Issuing this command will not upload the file(s) to the server right away: the new file name(s) will be placed into a
worklist, which then needs to be committed to the server. Once a worklist is committed, its files will be available to other
users.
The specified file(s) are not required to exist, it is possible to add a file that does not exist yet.
Parameters
-s Silent mode; do not output any messages.
-w WORKLIST_ID The id of the worklist that the file(s) will be added to. If omitted, defaults to worklist 1.
Examples:
3.2.2. copy
copy [-s] [-w WORKLIST_ID] SRC_PATH DST_PATH
Makes a copy of vault file(s).
This command creates a copy of the original file at the requested destination, and place the new file into a worklist. Once
the worklist is committed, the new file will be visible to other users.
The source file will be downloaded from the server to the new file. If the source file was modified locally,
NOTE those modifications won’t be part of the copy. This implies that if a file has just been added to the Hex-
Rays Vault server but not committed yet, it can’t be copied because it does not exist on the server yet.
Parameters
Page 11 of 35
Copyright (c) 2024 Hex-Rays SA
-w WORKLIST_ID The id of the worklist that the files will be added to. If omitted, defaults to worklist 1.
Examples:
Copy newfile into the rust_samples subdirectory. The worklist #2 will hold the change.
Copy a file that was just added but not yet committed, it will fail:
3.2.3. move
move [-s] [-w WORKLIST_ID] SRC_PATH DST_PATH
Opens tracked file(s) for moving/renaming.
This is similar to performing a copy, followed by a del: the new file will be checked out for copy while the original file will
be checked out for deletion.
Parameters
-s Silent mode; do not output any messages.
-w WORKLIST_ID The id of the worklist that the file(s) will be added to. If omitted, defaults to the worklist 1.
Example:
alice@alice_PC$ hv wk show 1
WL 1 copy //VxWorks/CP05x/info.md#0
WL 1 del //VxWorks/CP05x/info.txt#1
Page 12 of 35
Copyright (c) 2024 Hex-Rays SA
3.2.4. del
del [-s] [-w WORKLIST_ID] PATH_PATTERN…
Opens tracked file(s) for deletion, adding them to a worklist.
Once the worklist is committed, the file(s) won’t be tracked anymore by the Hex-Rays Vault server, and will be removed
from the local filesystem.
NOTE That this does not remove all revisions of the file on the server: that is the role of the purge command.
Parameters
-s Silent mode; do not output any messages.
-w WORKLIST_ID The id of the worklist that the file(s) will be added to. If omitted, defaults to worklist 1.
Example:
alice@alice_PC$ ls /path/to/site_rootdir/cat
/path/to/site_rootdir/cat
alice@alice_PC$ ls /path/to/site_rootdir/cat
/path/to/site_rootdir/cat
alice@alice_PC$ ls /path/to/site_rootdir/cat
ls: cannot access '/path/to/site/rootdir/cat': No such file or directory
3.2.5. edit
edit [-s] [-w WORKLIST_ID] PATH_PATTERN…
Opens tracked file(s) for edit, adding them to a worklist.
This command is used to instruct the Hex-Rays Vault server that we will be working on files, so that it knows what
revision of the file(s) that work will be based on and so later cmd.diff or resolve commands can work correctly.
Parameters
-s Silent mode; do not output any messages.
-w WORKLIST_ID The id of the worklist that the file(s) will be added to. If omitted, defaults to worklist 1.
Example:
Page 13 of 35
Copyright (c) 2024 Hex-Rays SA
3.2.6. scan
scan [-a] [-e] [-d] [-s] [PATH_PATTERN…]
Reconciles the contents of the current directory (or the one(s) provided) on the local filesystem, with those of the
corresponding path(s) on the server.
If any is found will create a new worklist and, add those for addition/deletion/modification.
This command is particularly useful if the user didn’t have access to the server at a time it was necessary (e.g., to issue
an edit command, while flying across the Atlantic.) Users can still get work done in such cases, and once they gain
access to the server again, issue a scan to commit the changes.
The -e option causes the scan command to compute checksums of the local files, in order to compare
NOTE
them against those known to the server, in order to spot modifications.
Parameters
-a Checkout for add files that are present only on the client side.
-e Checkout for edit files that are present on both the vault and the client side but differ.
-d Checkout for delete files that are present only on the server side.
Example:
alice@alice_PC$ hv scan -a -e -d //
added worklist 3
checked out '//afile' for 'del' (worklist 3)
checked out '//Win32.Emotet/29D6161522C7F7F21B35401907C702BDDB05ED47.bin.i64' for 'edit' (worklist 3)
Page 14 of 35
Copyright (c) 2024 Hex-Rays SA
3.3.1. worklists
worklists [WORKLIST_ID] [USER]
Lists information about worklists.
Parameters
WORKLIST_ID Restrict to the provided worklist, defaults to showing all worklists.
Example:
alice@alice_PC$ hv worklists
WL 4 2022-06-27 17:24:51 2 files; $USER@$ALICE_SITE More work on L30DS2 firmware
Files can be associated to that new worklist when they are marked for addition, deletion, or edition.
Parameters
DESCRIPTION The description of the new worklist.
Example:
Page 15 of 35
Copyright (c) 2024 Hex-Rays SA
Show a list of files opened for editing, addition or deletion, and their associated worklist(s).
Parameters
-s SITE Restrict to site SITE. If omitted, defaults to the current site.
Examples:
Parameters
WORKLIST_ID The worklist to modify.
Example:
Page 16 of 35
Copyright (c) 2024 Hex-Rays SA
Parameters
WORKLIST_ID The worklist to delete.
Example:
3.3.3.1. commit
commit [-f] [-s] WORKLIST_ID [DESCRIPTION]
Commits files to the vault (push).
This command uploads files from the local computer to the vault.
After a successful commit, the modifications made to the files contained in the worklist will be made available for other
users.
A commit may fail if another user uploaded another revision of the changed files meanwhile. In this case resolve is
necessary to merge the changes.
If the worklist does not yet have a proper description, the DESCRIPTION is mandatory.
Parameters
-f Force commit of unchanged files.
Example:
alice@alice_PC$ hv commit 1
worklist 1 has empty description
alice@alice_PC$ hv commit 1 "more samples"
ok accepted //newfile#1 (5 bytes)
ok commit #2 completed
3.3.4.1. sync
sync [-f] [-p] [-s] [@COMMIT_ID] [PATH_PATTERN[=REVISION]…]
Downloads the requested revisions of the files from the server, and stores them on the local filesystem.
NOTE If no paths are provided, all files from the server will be retrieved.
Page 17 of 35
Copyright (c) 2024 Hex-Rays SA
Parameters
-f Force sync. This will force a download of the files, even when the server thinks the
client has the desired revision. This is a dangerous operation: any modification
made to local files will be lost.
-p The server will perform sync without really transferring files. This options is useful
if the local files are already in sync but the server has stale info about them.
@COMMIT_ID Sync to state right after COMMIT_ID was committed, cannot be used with
=REVISION.
PATH_PATTERN[=REVISION]… Vault path of file(s) to sync, if path is omitted, defaults to current directory, if no
revision is specified, defaults to last revision available on vault (#^).
Examples:
Sync all
alice@alice_PC$ hv sync
3.3.4.2. resolve
resolve METHOD PATH_PATTERN
Resolves conflicts in a file, using the specified strategy.
After the strategy is successfully applied and the local file has incorporated both the "local" and "remote" changes, it will
be ready to be committed.
Parameters
METHOD One of "auto", "lmerge", "rmerge", "manual", "local" or "remote".
Example:
3.3.4.3. revert
revert [-a] [-p] [-s] PATH_PATTERN…
Reverts opened files to their current revisions.
Parameters
Page 18 of 35
Copyright (c) 2024 Hex-Rays SA
-s Silent mode; do not output any messages. This options is useful if the local files are already in
sync but the server has stale info about them.
Example:
alice@alice_PC$ hv revert -a //
ok reverted //Win32.Emotet/29D6161522C7F7F21B35401907C702BDDB05ED47.bin
ok reverted //Win32.Emotet/29D6161522C7F7F21B35401907C702BDDB05ED47.bin.asm
ok reverted //Win32.Emotet/29D6161522C7F7F21B35401907C702BDDB05ED47.bin.log
3.3.4.4. migrate
migrate [-s] PATH_PATTERN… WORKLIST_ID
Moves opened files between worklists.
Parameters
-s Silent Mode; do not output any messages.
WORKLIST_ID The id of the worklist to move the files to, the worklist must already exist.
Example:
Page 19 of 35
Copyright (c) 2024 Hex-Rays SA
3.4.1. files
files [-d] [-s] [PATH_PATTERN_OR_SUBSTRING[=REVISION]…]
Displays the list of the files present in the vault.
The command will collect files from the vault (that match the selection) and display for each file:
Parameters
-d Include deleted files.
Examples:
3.4.2. dir
dir [-d] [-s] [-u] PATH_PATTERN_OR_SUBSTRING…
Displays vault directory listing (current revisions).
Page 20 of 35
Copyright (c) 2024 Hex-Rays SA
Parameters
-d Include deleted files.
PATH_PATTERN_OR_SUBSTRING… Vault path of file(s) to include in search or substring to search for if -s.
Examples:
alice@alice_PC$ hv dir -u -d //
1970-02-04 01:52:08 573440 CL1/add //malware/EquationGroup.GrayFish/A904#1
2022-06-29 11:30:10 0 CL2/del //malware/EquationGroup.GrayFish/A904.asm#0/2 UNSYNCED
1970-02-04 01:52:08 2929035 CL1/add //malware/EquationGroup.GrayFish/A904.i64#1
2022-06-29 11:30:10 0 CL2/del //malware/EquationGroup.GrayFish/A904.log#0/2 UNSYNCED
1970-02-04 01:52:08 3514368 CL1/add //malware/Ransomware.WannaCry/41aa.exe#1
2022-06-29 11:30:10 0 CL2/del //malware/Ransomware.WannaCry/41aa.exe.asm#0/2 UNSYNCED
2022-06-29 13:52:57 846916 CL3/edit //malware/Ransomware.WannaCry/41aa.exe.i64#2/3 UNSYNCED
3.4.3. show
show PATH_PATTERN[=REVISION]
Writes the contents of a file on the vault to the command line.
Parameters
PATH_PATTERN[=REVISION] Vault path to file(s) to display. If no revision is specified, defaults to current revision
(#=). If the file revision denotes a deleted revision of the file, the contents will not be
displayed.
Example:
Page 21 of 35
Copyright (c) 2024 Hex-Rays SA
3.4.4. diff
diff PATH[=REVISION] PATH_OR_REV[=REVISION]
Compares two databases, will launch IDA in diff mode.
Only IDA databases (.i64, .idb) can be diffed with this command. If revisions of databases requested for comparison
are currently not in the site, they will be downloaded to a temporary directory and will be deleted when IDA exits. On unix
the temporary directory can be specified with $TMPDIR.
Parameters
PATH[=REVISION] Database 1.
Examples:
with interfaces.i64 opened for edit and changed, this will open IDA and show the differences with the current revision on vault
3.4.5. md5
md5 PATH_PATTERN[=REVISION]
Prints the md5 checksum of a file on the vault.
Parameters
PATH_PATTERN[=REVISION] Vault path of file(s) to process, if no revision is specified, defaults to the current
revision (#=).
Example:
3.4.6. info
info
Displays info about the vault and current session.
Example:
alice@alice_PC$ hv info
Hex-Rays Vault Server v1
Vault time: 2022-06-29 00:13:55, up since 2022-06-28 09:40:53
License user : Johnny Appleseed
License email: [email protected]
License: IDAULTTL; 10 users out of 30; expires on 2023-10-13
Page 22 of 35
Copyright (c) 2024 Hex-Rays SA
3.4.7. changes
changes [-s SITENAME] [-u USERNAME] [-c MIN_COMMIT] [-C MAX_COMMIT] [-m
MAX_REPORTED_ENTRIES] [-d MIN_DATE] [-D MAX_DATE] [-l] [PATH_PATTERN…]
Displays list of commits that affect a path.
• the commit id
• the timestamp of the commit
• if only one file was changed, the action that was done to it (e.g. edit)
• the user who sent the commit
• the site from which the commit was sent
• a description of the commit, truncated to 40 chars unless if -l is enabled
Parameters
-s SITENAME Restrict to commits from SITENAME.
Examples:
Page 23 of 35
Copyright (c) 2024 Hex-Rays SA
3.4.8. users
users
Shows users.
Example:
alice@alice_PC$ hv users
LastActive Adm Login RealName/Email Notes
---------- --- ------- ---------------------- -----
2022-07-27 * admin
2022-09-16 alice Alice <[email protected]>
Never bob Bob <[email protected]>
3.4.9. groups
groups
Displays all the existing groups and their users.
Example:
alice@alice_PC$ hv groups
malware: alice michael matt sarah jason
audit: stephen ilse
interns: russ
Parameters
GROUP_NAME A group name.
Example:
Page 24 of 35
Copyright (c) 2024 Hex-Rays SA
Parameters
USERNAME The username of the user to display.
Example:
This will list all of the files that were changed by the commit.
Parameters
COMMIT_ID The id of the commit to display.
Example:
Page 25 of 35
Copyright (c) 2024 Hex-Rays SA
3.5. Misc.
3.5.1. passwd
passwd PASS [USER]
Sets a new password for a user.
Parameters
PASS The new password.
USER The username whose password should be changed. Only admins can change other users' passwords. If
omitted, defaults to the current user.
Examples:
Regular users may modify only their own commits. Admins may modify any commit.
Parameters
COMMIT_ID The id of the commit to amend.
Example:
alice@alice_PC$ hv commit edit 42 "removed unused file, it had been wrongfully added with commit #39"
3.5.3. licenses
licenses
Shows active licenses
Example:
alice@alice_PC$ hv licenses
Vault licenses:
99-9999-9999-99 IDAULTTW: used 2 out of 10 seat(s)
Expires: 2023-04-15
Online users: john@johnpc (99.999.99.99): 1 IDA instance(s)
Page 26 of 35
Copyright (c) 2024 Hex-Rays SA
3.5.4. borrow
borrow PRODUCT END_DATE
Borrow a license
A borrowed license can be used offline but other users will not have access to it.
A borrowed license can be returned to the vault using return. If not returned earlier, it will automatically be returned to
the vault at the expiration time.
Parameters
PRODUCT The product code or license id.
END_DATE YYYY-MM-DD - exact date, +Nd - N days since now, +Nw - N weeks since now. DD-MON-YYYY can be
used to specify an exact date too.
Example:
3.5.5. return
return PRODUCT
Return a borrowed license
Parameters
PRODUCT The product code or license id.
Example:
Page 27 of 35
Copyright (c) 2024 Hex-Rays SA
Parameters
USERNAME The username of the user.
Example:
Parameters
USERNAME The username of the user to modify.
Example:
Cuation: deleting a user with borrowed licenses will make the borrowed licenses unavailable until their expiration date.
Parameters
Page 28 of 35
Copyright (c) 2024 Hex-Rays SA
Example:
Parameters
GROUP_NAME the name of the new group.
Example:
Parameters
GROUP_NAME the name of the group.
ADD_OR_DELETE add or delete the specified user from the group, 0 is delete, 1 is add.
Example:
Parameters
GROUP_NAME the name of the group to delete.
Page 29 of 35
Copyright (c) 2024 Hex-Rays SA
Example:
Example:
We recommend using perm check to ensure that the new permission table works correctly.
Parameters
@FILE The file from which to set the new permissions table.
Example:
The list of files that are visible to the user is printed, along with the permissions that the user has. The read access is
denoted by 'r' and the write access is denoted by 'w'.
Parameters
USERNAME The USERNAME of the user whose permissions that will be tested.
Page 30 of 35
Copyright (c) 2024 Hex-Rays SA
Example:
3.6.4. Others
3.6.4.1. sessions
sessions
Displays the sessions info.
For each session on the vault, the following info will be displayed:
• the site
• the user
• the hostname
• the timestamp of the login time
• the timestamp of the last activity
• "ADM" if the user has admin privileges
• "*" for the session executing the command
Example:
alice@alice_PC$ hv sessions
gregpc gregm GREGPC-554HW LOGIN=2022-07-04 LAST=2022-07-04 ADM *
lindapc linda lindasmac LOGIN=2022-07-02 LAST=2022-07-04
3.6.4.2. purge
purge [-s] [-y] PATH_PATTERN…
Purges file(s) from the Vault server, permanently deleting it and all of its history.
The path patterns must be specified using full paths, starting with //
Parameters
-s Silent mode; do not output any messages.
-y Really purge the files, without this parameter the command does a dry-run.
Example:
Page 31 of 35
Copyright (c) 2024 Hex-Rays SA
4. Concepts
4.1. What is a "site"?
A site represents a mapping of the server files to the local filesystem. Normally each computer has a site associated with
it. A site has the following attributes:
• A site name
• A host name
• The path to a folder on the filesystem (a.k.a., "root directory")
• Path filters (optional)
The vault server cannot manage files located outside the root directory. However, this limitation is straightforward to
overcome: create a symbolic link (or, on Windows, a junction point) from the root directory to the directory of your choice.
This will make the target of the symbolic link visible as part of the root directory.
The vault server keeps track of each site’s state: what files have been downloaded to the local disk, what files have been
checked out for editing, etc. This simplifies the housekeeping tasks, especially for big repositories with millions of files.
Even for them, downloading the latest files or reconciling the local disk with the server, are almost instantaneous.
The host name is a security feature that prevents from using a site on a wrong computer. Since the server keeps track of
the files downloaded to each site, using a wrong site may lead to an inconsistent mapping between the server and local
disk. However, if the user does not want this protection, it is possible to erase the host name in the site definition.
Page 32 of 35
Copyright (c) 2024 Hex-Rays SA
Site filters provide a mechanism that lets users restrict the set of files their IDA Teams client works with. Users who want
to work on some specific projects can set a filter that restricts the visibility only to selected subdirectories.
Each site has its own filters, that con be modified at any time. Filters do not directly affect any files on the local disk, or
on the server: they are strictly about visibility.
Site filters are meant simplify a user’s life by letting them focus on specific projects. Since they can
WARNING be modified by users, they should not be considered a security measure: that would be the role of
the permissions system, which can only be managed by Hex-Rays Vault server administrators.
The purpose of site filters is to create a subset of the full set of files provided by the server. Site filters
NOTE don’t directly affect what locally-available files (i.e., present in the site’s rootdir, but not tracked by the
server) are visible by IDA Teams clients.
There is another mechanism to specify what files should not be added to the vault. See .hvignore for more info.
4.1.2.1. Examples
An empty filter
$ cat empty_filter.txt
$
$ cat only_malware.txt
malware/
$
$ cat hide_pentest.txt
!pentesting/
$
Show all files but those from the pentesting team, except their produced documents
$ cat hide_pentest_but_docs.txt
!pentesting/
pentesting/research_docs/
$
When the two sets of modifications do not overlap, merging is trivial - at least conceptually. But when they do overlap,
they produce conflict(s).
Since IDA Teams focuses on collaboration over IDA database files, the rest of this section will focus on the different
strategies that are available for resolving conflicts among those.
IDA Teams comes with multiple strategies to help in conflict resolution of IDA database files:
Page 33 of 35
Copyright (c) 2024 Hex-Rays SA
If any conflict is discovered, bail out of the merge process, and don’t modify the local database.
If a conflict is discovered, assume that the "local" change (i.e., the current user’s change) is the correct one, and apply
that.
Once all merging is done and conflicts are resolved, write those to the local database and exit IDA
If a conflict is discovered, assume that the "remote" change (i.e., the change made by another user) is the correct one,
and apply that.
Once all merging is done and conflicts are resolved, write those to the local database and exit IDA
This will launch IDA in an interactive, 3-pane mode, allowing the user to decide how to resolve each conflict.
Once all merging is done and conflicts are resolved, exit IDA and write the changes to the local database.
When found, those files' contents will be appended to the main file’s contents.
Page 34 of 35
Copyright (c) 2024 Hex-Rays SA
• On Windows, the Windows Credential Store is used (therefore requiring Windows 7 or newer)
• On macOS, the macOS Keychain is used
• On Linux, the "Secret service" is used (through libsecret-1)
The permission file is a text file that contains the permission table. The file consists of lines that grant or deny access to
certain path patterns in the vault. The syntax for an entry is the following:
Possible PERMISSION values are: list, read and write. read includes list, write includes read (and thus also includes
list).
deny user * list //secret/ # nobody can see //secret. this line is superfluous
# because everything is denied by default.
grant user hughes write //secret/ # but hughes can write to secret and its subdirs
grant user john read //secret/ # and john can read the entire directory.
deny user * list //secret/supersecret # supersecret is not visible to anyone
grant user hughes write //secret/supersecret # but hughes can modify it (john cannot)
grant user * write //local_files/ # everyone can work with 'local_files'
deny group remote list //local_files/ # except that the 'remote' group cannot see 'local_files'
An empty permission table means that no permissions are enforced rendering all files accessible by everyone. As soon
as a non-empty permission table is specified, all access is denied to everyone by default.
Path patterns may refer to (yet) unexisting files. Users and groups too may refer to unexisting users and groups.
The order of the permission file is important as the last lines will take precedence over the preceding lines (if there are
conflicts).
Admins are not affected by the permission table, they are granted all access.
Page 35 of 35