Repository navigation
04 ‐ Configuration
Aliasr is configured via a single TOML file. Refer to the built-in config.toml for every available option. Configuration is loaded in this order (highest priority first):
-
ALIASR_CONFIG(if set) -
$ALIASR_HOME/config.toml(defaults to~/.aliasr/config.toml) -
$XDG_CONFIG_HOME/aliasr/config.toml(ifXDG_CONFIG_HOMEis set) ~/.config/aliasr/config.toml- Built-in defaults shipped with Aliasr
If multiple locations exist, the first one found wins.
On first run Aliasr creates ~/.aliasr/ and drops an editable copy of the default config.toml there; your edits are merged over the built-in defaults at runtime. Globals live beside it at ~/.aliasr/globals.json (a pre-existing ~/.aliasr.json is migrated automatically). Set ALIASR_HOME to relocate the whole folder.
A few notable options:
-
[creds].confirm_delete- prompt before deleting a row in the credentials/hosts menu (setfalsefor one-key deletes). -
[nxc].block_bulk_delete- forbid theclearcommands from deleting anything in NetExec (see Credentials and Hosts).
When aliasr starts and your config.toml is missing options that a newer version added, it lists them and offers to back your file up to config.toml.bak and drop in the current defaults. Decline (or run non-interactively) and it simply proceeds - the missing options still take their default values, since your file is merged over the built-in defaults either way.
Aliasr supports project-specific configs with the tool direnv.
To create an Aliasr project, set ALIASR_CONFIG to point to either a file (e.g. /path/to/.aliasr.toml) or a directory (Aliasr will use <dir>/config.toml).
Example layout:
/root/projects/
├── project-1/
│ ├── .envrc # direnv config
│ ├── .aliasr.toml # local aliasr config
│ ├── .aliasr-globals.json # project-specific globals
│ ├── .credentials.db # project-specific creds (SQLite)
│ ├── exploits/
│ ├── loot/
│ └── scans/
└── project-2/
├── .envrc
├── .aliasr.toml
└── ...
Example .envrc:
export ALIASR_MACHINE_DIR="$PWD"
export ALIASR_CONFIG="$PWD/.aliasr.toml"Example .aliasr.toml:
[globals]
path = "${ALIASR_MACHINE_DIR}/.aliasr-globals.json"
[creds]
db = "${ALIASR_MACHINE_DIR}/.credentials.db"
[globals.defaults]
ip = ["10.10.11.123"]
hostname = ["machine-1"]
domain = ["htb.local"]
fqdn = ["machine-1.htb.local"]
lhost = ["10.10.14.5"]
lport = ["4444"]Load and apply the changes in .envrc with:
direnv allowThen verify the configuration is being picked up:
aliasr audit --configFor a project created in /root/projects/project-1/ you should see, for example:
✓ ALIASR_CONFIG /root/projects/project-1/.aliasr.toml
...
✓ Globals file: /root/projects/project-1/.aliasr-globals.json
...
✓ Credentials DB (Exegol-history): /root/projects/project-1/.credentials.db
Documentation for aliasr. Spotted an error or want a feature? Open an issue