Ida Teams Admin Guide
Ida Teams Admin Guide
Page 1 of 28
Copyright (c) 2024 Hex-Rays SA
3.2. Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2.1. What is the Lumina server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Lumina server vs Hex-Rays Vault server: what is the difference? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Functions metadata. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Metadata contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Pushing & overriding metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Metadata history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
File contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.1. What is a "site"? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.1.1. Root directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.1.2. Path filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.2. The registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3. Passwords storage in the OS’s keychain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Page 2 of 28
Copyright (c) 2024 Hex-Rays SA
1. Introduction
This manual describes the installation, management, and interaction with the key server-side components of an IDA
Teams deployment.
It is primarily intended for administrators, and will focus on the different servers that are part of IDA Teams:
While we will (at least superficially) make use of the command-line clients that are used to access/manage those
servers, this manual will not offer a detailed explanation of their usage: there are dedicated documents for that (e.g., the
hv user manual, the lc user manual, …).
Page 3 of 28
Copyright (c) 2024 Hex-Rays SA
• an installer for the IDA Teams server (also called the "Hex-Rays Vault server")
• this guide
• an installer for IDA
• an ida.key
You will also need root access on the host where you will be installing the server.
2.2. Installation
This chapter explains how to install two parts of IDA Teams: the vault server, and a client.
We recommend installing a client first, to be able to connect to the server immediately after installation. The very first
user to connect to the server becomes the administrator.
Vault clients are bundled with IDA Teams installers: simply run the IDA installer and follow the instructions. That will
install IDA, and the 2 clients next to it.
To install the server, run the Hex-Rays Vault installer as root and follow the instructions (the server will not require root
permissions; only the installer does.)
If your Linux system is based on systemd (e.g., Debian/Ubuntu, Red-Hat, CentOS, …), it is recommended to
TIP
let the installer create systemd units so that the server will start automatically at the next reboot.
From a command prompt, run /sbin/ifconfig, and lookup the "ether" address for the network interface through which
the server will be accessible.
>/sbin/ifconfig
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
[...snipped...]
ether bf:e2:91:10:58:d2 txqueuelen 1000 (Ethernet)
[...snipped...]
Page 4 of 28
Copyright (c) 2024 Hex-Rays SA
You will be able to activate both Hex-Rays Vault server and Lumina server in one activation if you have also the Host ID of
your Lumina server.
Go to https://hex-rays.com/activate , and submit both the ida.key file and your MAC address. You will then receive
another e-mail with instructions to download the following files:
• hexvault.crt
• hexvault.key
• hexvault.lic
>cd /opt/hexvault
>cp .../path/to/hexvault.crt .
>cp .../path/to/hexvault.key .
>cp .../path/to/hexvault.lic .
>chown hexvault:hexvault hexvault.crt hexvault.key hexvault.lic
>chmod 640 hexvault.crt hexvault.key hexvault.lic
If your system is already in production and hosts files, skip this section. Using the --recreate
CAUTION
-schema option as in the example below, will re-create an empty database and lose all history.
On the first install, you will need to initialize the database the server will use:
Good, the server appears to run! (If you are observing more worrying messages than this one, please refer to the
troubleshooting section.)
At this point, you may want to either let the server run, or stop it (Ctrl+C will do) and restart it using systemd:
Page 5 of 28
Copyright (c) 2024 Hex-Rays SA
If you don’t see a running vault_server process, please refer to the systemd diagnostic tools (e.g., journalctl) for more
info.
Page 6 of 28
Copyright (c) 2024 Hex-Rays SA
For the sake of the examples below, we’ll imagine the following fictional group of users:
Once the server is up and running, login to server using a username and password of your choice (hv is the vault client
utility, it is installed as part of the client package.)
NOTE We will assume Jane installed IDA (and thus hv) in /home/jane/idateams.
>cd /home/jane/idateams
>./hv -hhexvault.acme.com -ujane -psecr3t info
TIP Please note that there is no space between the command line switches and values.
Since Jane is the first user to login to the server, the credentials she provided, will be used to create the server’s primary
administrator.
You can verify that you are the only user by checking the user list:
You may also add information (like your real name) to your user record by issuing:
>./hv -hhexvault.acme.com -ujane -psecr3t user edit jane "Jane Smith" [email protected] 1 "" 48-XXXX-XXXX-XX
>./hv -hhexvault.acme.com -ujane -psecr3t users
Page 7 of 28
Copyright (c) 2024 Hex-Rays SA
However, note that having to pass a user name, host name and a password on the command line each time will get very
tedious very fast. The next chapter will show how we can make our lives easier.
2.3.2. hv credentials
In order to connect to the vault server, hv must at least have:
• a username
• a password
• a hostname
For example:
All credentials, including usernames, are case-senstive, meaning that "Joe" and "joe" would be
IMPORTANT
different users.
Command line
Passing credentials on the command line will always take precedence over environment variables and registry+keychain.
--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
Environment variables
Credentials can also be passed through environment variables. They will take precedence over those possibly found in
the registry+keychain.
Page 8 of 28
Copyright (c) 2024 Hex-Rays SA
Registry + keychain
Unless environment variables or command-line arguments are provided, hv will look for credentials in the registry (and
the OS’s keychain for passwords.)
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.
Best practices
We recommend persisting credentials using the registry+keychain method.
>./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 9 of 28
Copyright (c) 2024 Hex-Rays SA
Using the groups command, we can see the new groups are still empty:
>./hv groups
analysts:
org:
Page 10 of 28
Copyright (c) 2024 Hex-Rays SA
2.4. Management
This chapter explains in detail how to perform regular administrator tasks.
You will need to prepare a new permission table and put it into a file. The permission table consists of lines with the
following format:
where:
ACTION
one of "grant" or "deny"
CATEGORY
one of "user" or "group"
WHO
name of the user or group to match
PERM
one of "list", "read", "write"
PATH
path pattern that the rule is for
We’ll assume the server has been in use for a while, and holds some files in the directories subdir-for-
NOTE
fred/, local-secret/, and subdir/for/idbs/.
# The permission for each vault file is determined as the result of applying
# all matching lines, from the beginning of the permission table to the end.
# An empty permission table grants all access to everyone.
# A non-empty permission table starts by denying all access to everyone.
# Fred can freely list, read, and modify all files inside "subdir-for-fred"
grant user fred write //subdir-for-fred/
Page 11 of 28
Copyright (c) 2024 Hex-Rays SA
Once the permission table is ready and stored in a file, we can install it:
After setting the permissions, it is a good idea to verify them. For example, this is how we can get a full list of files that
fred can see, with the rw or r- prefixes, depending on the permissions:
The empty output means that fred cannot see local-secret even though it exists.
Alternatively, it is possible to use sqlite3 backup functionality to make a backup of the database. Vault files can be
copied using any Linux command (e.g. rsync or tar).
1. stopping the server. E.g., sudo systemctl stop hexvault if you are using systemd to manage the server.
2. performing a backup of the database
3. putting the new server instead of the old one
4. making sure the new server runs, upgrading the database schema to the new version if needed
5. restarting the server. E.g., sudo systemctl start hexvault
Page 12 of 28
Copyright (c) 2024 Hex-Rays SA
In this case, the server complains that the database schema is outdated. This may happen as we will keep improving the
Hex-Rays Vault server, and new versions might require an upgrade of the database schema in order to be able to work
correctly.
Note that the Hex-Rays Vault server will not perform that upgrade automatically. That is on-purpose, to give you a chance
to backup the database before proceeding.
WARNING Please ensure you performed a backup of the database before issuing this command.
Once this is done, you should be able to restart the server in a normal way, and resume work.
• obliteration of files
• periodic vault self-verification
• periodic backups
• usage stats
Page 13 of 28
Copyright (c) 2024 Hex-Rays SA
(--recreate-schema) Drop & re-create schema; then quit THIS WILL ERASE ALL DATA
Page 14 of 28
Copyright (c) 2024 Hex-Rays SA
2.6. Troubleshooting
This chapter explains how to solve typical problems with the vault server.
The vault server uses secure TLS connections with the clients. The TLS layer requires the certificate (.crt) and private key
(.key) files. Usually, they are attached to the email message with the activation information.
The uppercase USERNAME and PASSWORD placeholders should be replaced by the desired values. The user name and
the password are separated by a colon.
The specified user must exist. If sh/e was not an admin before, s/he will be promoted to an admin by this command.
If you do not know any valid users of the vault, use the sqlite3 command line utility to list the users. They
TIP
are stored in the users table.
PATH
path pattern to retrieve checksums from
REVISION
optional file revision. If not specified, the checksum of the last revision is reported
• hexvault.conf: this file file holds the connection string to the database the server will use, and might contain
credentials.
• hexvault.crt: the certificate chain
• hexvault.key: the private key file
• hexvault.lic: the license file
Page 15 of 28
Copyright (c) 2024 Hex-Rays SA
As a precaution, the Hex-Rays Vault server will refuse to start if these files are readable by unauthorized users.
2.6.5. Licensing
The hexvault.lic file is tied to the MAC address of the first network interface. If they do not match, the server will not start.
To change the MAC address, please contact [email protected]
Page 16 of 28
Copyright (c) 2024 Hex-Rays SA
A Lumina server will have to be configured to point to the Hex-Rays Vault server
3.1.1. Prerequisites
After your purchase of IDA Teams licenses, you have received an e-mail that contains links to a download area where you
will find, among other things:
NOTE ida.key and lumact.key may contain the same licenses information.
You will also need root access on the host where you will be installing the Lumina server (to install the server, not to run
it).
MySQL server
The Lumina server stores its data in a MySQL DBMS server. It is therefore necessary to have valid credentials to such a
server, as well as a fresh, empty database.
NOTE The Lumina server requires a MySQL server version 5.8 or newer.
For illustration purposes, let’s assume the MySQL database the server will use, is called: "lumina_db".
Please make sure the Hex-Rays Vault server is properly installed & running.
3.1.2. Installation
At installation-time, the Lumina server installer will need information about the MySQL instance the Lumina server will be
using (host, port, username, password). Eventually, that information will end up in the lumina.conf file, sitting next to the
lumina_server_teams binary:
CONNSTR="mysql;Server=127.0.0.1;Port=3306;Database=lumina;Uid=lumina;Pwd=<snipped>"
In addition to information about the MySQL database in which the Lumina server will store the metadata, the installer
asks for the host+port pair where to find a running Hex-Rays Vault server to which user authentication will be delegated.
VAULT_HOST="vault.acme.com:65433"
Page 17 of 28
Copyright (c) 2024 Hex-Rays SA
Supported platforms
The Lumina server can be installed on Linux servers. We have tested it on Debian and Ubuntu, but other major flavors of
Linux should be fine too.
To install the server, run the Lumina installer as root and follow the instructions (the server will not require root
permissions; only the installer does.)
If your Linux system is based on systemd (e.g., Debian/Ubuntu, Red-Hat, CentOS, …), it is recommended to
TIP
let the installer create systemd units so that the server will start automatically at the next reboot.
In order for the Lumina server license to be activated, it must be bound to a Host ID (an Ethernet MAC address.)
From a command prompt, run /sbin/ifconfig, and lookup the "ether" address for the network interface through which
the server will be accessible.
>/sbin/ifconfig
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
[...snipped...]
ether bf:e2:91:10:58:d2 txqueuelen 1000 (Ethernet)
[...snipped...]
Go to https://hex-rays.com/activate , and submit both the ida.key file and your MAC address. You will then receive
another e-mail with instructions to download the following files:
• lumina.crt
• lumina.key
• lumina.lic
>cd /opt/lumina
>cp .../path/to/lumina.crt .
>cp .../path/to/lumina.key .
>cp .../path/to/lumina.lic .
>chown lumina:lumina lumina.crt lumina.key lumina.lic
>chmod 640 lumina.crt lumina.key lumina.lic
If your system is already in production and hosts files, skip this section. Using the --recreate
CAUTION
-schema option as in the example below, will re-create an empty database and lose all data.
For the Lumina server to work, it needs to have a proper database schema to work with (at this point, the MySQL
database (i.e., "lumina_db") must already exist but is still empty.)
That is why, on the first install, you will need to initialize the database the server will use:
Page 18 of 28
Copyright (c) 2024 Hex-Rays SA
If you see "Error: Cannot connect to lumina db" please refer to troubleshooting section.
Good, the server appears to run! (If you are observing more worrying messages than this one, please refer to the
troubleshooting section.)
At this point, you may want to either let the server run, or stop it (Ctrl+C will do) and restart it using systemd:
If you don’t see a running lumina_server_teams process, please refer to the systemd diagnostic tools (e.g., journalctl)
for more info.
Page 19 of 28
Copyright (c) 2024 Hex-Rays SA
Consequently, it is the exact same set of users, with the exact same credentials as those that are able to use the Hex-
Rays Vault server, that will be able to make use of the Lumina server.
Assuming Alice was registered in the Hex-Rays Vault server (and has admin rights), she should be able to use the lc
utility to perform operations on the Lumina server.
lc is the Lumina command-line administration client, which comes with the Lumina server installer. We
NOTE
will assume the server has been installed in /opt/lumina/, and thus lc is present in /opt/lumina/lc.
>cd /opt/lumina
>./lc -hlumina.acme.com -ualice -psecr3t info
Hex-Rays Lumina Server v8.0
Lumina time: 2022-09-01 14:28:02, up since 2022-09-01 14:27:58
MAC address: <snipped macaddr>
Client name: alice *ADMIN*
Client host: 127.0.0.1
Every time a user opens a new connection to the Lumina server it will in turn perform a call to the Hex-Rays Vault server
to authenticate the user against the provided credentials.
Depending on the success of that latter call, a "shadow" of the user will be recorded, updated, or deleted from the Lumina
server’s database.
Not everything is copied to the Lumina server’s shadow users table; in particular, the password hash
NOTE
isn’t.
export LUMINA_HOST=lumina.acme.com
export LUMINA_USER=alice
export LUMINA_PASS=secr3t
After that, you can connect to the server effortlessly. For example, this command will print information about the server
and the client:
>./lc info
Hex-Rays Lumina Server v8.0
Lumina time: 2022-09-01 14:28:02, up since 2022-09-01 14:27:58
MAC address: <snipped macaddr>
Client name: alice *ADMIN*
Client host: 127.0.0.1
Page 20 of 28
Copyright (c) 2024 Hex-Rays SA
...
Page 21 of 28
Copyright (c) 2024 Hex-Rays SA
(--recreate-schema …) Drop & re-create schema. Note that THIS WILL ERASE ALL DATA
(--upgrade-schema) Upgrade database schema; then quit. Only necessary when upgrading to a newer
version of the Lumina server.
Page 22 of 28
Copyright (c) 2024 Hex-Rays SA
3.1.5. Troubleshooting
• lumina.conf: this file file holds the connection string to the database the server will use, and might contain
credentials.
• lumina.crt: the certificate chain
• lumina.key: the private key file
• lumina.lic: the license file
As a precaution, the Lumina server will refuse to start if these files are readable by unauthorized users.
MySQL
Before the first --recreate-schema command can succeed, it is necessary to create the MySQL database, as well as the
user that it will be accessed as.
In order for the Lumina server to able to use this strategy, it would have to ship with a libmysqlclient.so file that is
linked against libssl.so.3.
Unfortunately, this library is not yet available on all of the various [versions of] distributions that we currently support, and
introducing this dependency would significantly reduce the diversity of platforms on whith the Lumina server can run.
Consequently (for now) we have opted for another approach: the "lumina" MySQL user should use MySQL’s "native
password" strategy. This can be accomplished by issuing the following command in a MySQL prompt:
Once libssl.so.3 is more generally available, Lumina will not require this particular fine-tuning anymore.
Page 23 of 28
Copyright (c) 2024 Hex-Rays SA
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
"Index column size too large. The maximum column size is 767 bytes."
The Lumina server cannot create its schema due to a particularly stringent limit on "index prefix sizes" in older versions
of MySQL.
This limit was increased in MySQL 5.8, and thus this is the minimum version the Lumina server can work with.
Page 24 of 28
Copyright (c) 2024 Hex-Rays SA
3.2. Concepts
It is a place where IDA users can push, and pull such metadata, to ease their reverse-engineering work: metadata can be
extracted from existing projects, and re-applied effortlessly to new projects, thereby reducing (sometimes dramatically)
the amount of time needed to analyze binaries.
In effect, the Lumina server offers another "dimension" to collaborative reverse-engineering efforts.
Functions metadata
The Lumina server associates "function metadata" to functions, by means of a (md5) hash of those functions: whenever it
wants to push information to, or pull information from the server, IDA will first have to compute hashes of the functions it
wants to retrieve metadata for, and send those hashes to the Lumina server.
Similarly, when IDA pushes information to the Lumina server, it will first compute hashes for the corresponding functions,
extract the metadata corresponding to those from the .idb file, and send those hash+metadata pairs to the server.
Metadata contents
Metadata about functions can include:
• function name
• function address
• function size
• function prototype
• function [repeatable] comments
• instruction-specific [repeatable] comments
• anterior/posterior (i.e., "extra") comments
• user-defined "stack points" in the function’s frame
• the function frame description and stack variables
• instructions operands representations
However, when a user pushes metadata about a function whose md5 hash (and associated metadata) is already present
in the database, the Lumina server will attempt to "score" the quality of the old metadata and the quality of the new
metadata. If the score of the new metadata is higher, the new function metadata will override the previous one.
When a user asks IDA to push all functions to the Lumina server, IDA will automatically skip some
NOTE functions: those that still have a "dummy" name (e.g., sub_XXXX), or that are below a certain size
threshold (i.e., 32 bytes) will be ignored.
Metadata history
The Lumina server retains a history of the metadata associated to functions. Using the lc utility, it is possible to dig into
that history, and view changes (detailed diffs, too.)
Page 25 of 28
Copyright (c) 2024 Hex-Rays SA
File contents
It’s worth pointing out that when pushing metadata to the Lumina server, IDA will not push the binary file itself. Only the
following metadata about the file itself will be sent:
The Lumina server cannot therefore be used as a backup/repository for binary files & IDBs (that would be the role of the
Hex-Rays Vault server)
Page 26 of 28
Copyright (c) 2024 Hex-Rays SA
4. Miscellaneous
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 27 of 28
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.
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/
$
• 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)
Page 28 of 28