Credential Management
Manage and utilize discovered Active Directory credentials
ADscan automatically discovers and stores credentials during enumeration and exploitation. Use these commands to view and work with discovered credentials.
Commands
creds show
Display all discovered credentials in the current workspace.
Syntax:
creds showExample (Forest workspace):
(ADscan:htb_forest ~/.adscan/workspaces/htb_forest) > creds show ╭─ htb.local · PWNED ───────────────────────────────────────────────────────────────────────────────╮
│ Domain Credentials │
│ ╭───┬──────────────────────┬────────────┬──────────────────────────────────┬────────────────────╮ │
│ │ │ User │ Kind │ Credential │ Provenance │ │
│ ├───┼──────────────────────┼────────────┼──────────────────────────────────┼────────────────────┤ │
│ │ ✓ │ Administrator │ • hash │ 32693b11e6aa90eb43d32c72a07ceea6 │ via DCSync │ │
│ │ ✓ │ krbtgt │ • hash │ 819af826bb148e603acb0f33d17632f8 │ via DCSync │ │
│ │ ✓ │ $331000-VK4ADACQNUCA │ • hash │ 31d6cfe0d16ae931b73c59d7e0c089c0 │ via DCSync │ │
│ │ ✓ │ svc-alfresco │ • pass │ s3rvice │ via AS-REP roast │ │
│ │ ✓ │ andy │ • hash │ 29dfccaf39618ff101de5165b19d524b │ via DCSync │ │
│ │ ✓ │ mark │ • hash │ 9e63ebcb217bf3c6b27056fdcb6150f7 │ via DCSync │ │
│ ╰───┴──────────────────────┴────────────┴──────────────────────────────────┴────────────────────╯ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────╯What it shows:
- Every credential ADscan holds for the domain, one row each
- Kind — whether it is a cleartext password or a hash
- The credential itself
- Provenance — the technique that produced it (
via DCSync,via AS-REP roast,via GPP cpassword,via password spray, …), or a neutral marker when nothing was recorded - Local-account credentials, listed separately under the host and service they belong to
Credentials are shown in the clear
creds show prints passwords and hashes verbatim. That is deliberate: the operator needs the credential, and a tool that hides its own loot is useless. Nothing is masked, blurred, or truncated on screen.
The telemetry side is separate. Every value on this panel is marked at the source so the export sanitizer replaces it with a deterministic pseudonym before any terminal output is uploaded as telemetry — see telemetry. Cleartext on your terminal, pseudonymized in anything that leaves the machine.
Treat a terminal running creds show the way you would treat the credentials themselves: no screen sharing, no screenshots into a ticket, no scrollback in a shared session.
creds select
Select a specific credential to use for further enumeration and exploitation.
Syntax:
creds select <domain>Parameters:
domain: The domain name of the credentials to select
Example (Forest workspace):
(ADscan:htb_forest ~/.adscan/workspaces/htb_forest) > creds select htb.local ╭─ Domain ─────────╮
│ ● htb.local │
╰──────────────────╯
Available Users
╭────────┬───┬────────────────┬──────────────────────╮
│ ID │ │ Username │ Provenance │
├────────┼───┼────────────────┼──────────────────────┤
│ 1 │ ✓ │ svc-alfresco │ via AS-REP roast │
├────────┼───┼────────────────┼──────────────────────┤
│ 2 │ ✓ │ Administrator │ via DCSync │
├────────┼───┼────────────────┼──────────────────────┤
│ 3 │ ✓ │ andy │ via DCSync │
╰────────┴───┴────────────────┴──────────────────────╯
? Select credential for domain htb.local: Administrator
✓ Selected credential: Administrator@htb.local
ℹ Subsequent authenticated enumeration will use this account.What it does: When you select credentials, ADscan will:
- Show available credentials for the specified domain
- Allow you to choose which credential to use
- Enumerate privileges and access for the selected user:
- Accessible SMB shares
- ACL permissions
- Group memberships
- Special privileges
- Attack steps and paths, computed from the collected graph
Use cases:
- Switch between different compromised accounts
- Test access levels of different users
- Enumerate lateral movement opportunities
- Identify privilege escalation paths
creds save
Add a credential manually to continue an existing campaign.
Syntax:
creds save <domain> <username> <password_or_hash> [host] [service]Alias also supported:
creds add <domain> <username> <password_or_hash> [host] [service]Important workflow rule:
- Initialize the domain first with
start_auth. - Use
creds saveafterwards to add extra credentials you found outside ADscan.
If the domain is not initialized in the current workspace, ADscan will block the save and guide you to run start_auth first.
Examples:
# 1) Initialize domain context first
start_auth
# 2) Later, add an additional domain credential
creds save htb.local svc-backup 'Winter2026!'
# 3) Optional local credential (host + service)
creds save htb.local administrator 'P@ssw0rd!' dc01.htb.local smbOwned users and attack paths
In ADscan, “owned users” are users with a verified credential stored in the workspace. Once you have owned users, you can search for escalation chains from those entry points:
attack_paths <domain> owned
attack_steps <domain>This is especially useful after password spraying, roasting, or any technique that adds new valid credentials. See Attack Paths & Steps for the full workflow.
Cleanup-only account
ADscan undoes the changes it makes in the directory, such as a computer account it created or a key credential it added. Your client can provide an account reserved for that cleanup, for example one allowed only to delete computer objects. ADscan tries it first whenever it reverts a change and never uses it for the assessment. No attack step, credential sweep or attack path runs as it, and it never appears among the owned users.
When ADscan asks
start_unauth and start_auth ask once per workspace, before anything can change the directory. The default is No. ADscan does not ask when automatic reversion is off (set auto_revert off) or when the run is unattended. The answer is saved in the workspace either way, so the question does not come back. When an account is saved, the scan prints one line naming it.
cleanup_credential
| Command | What it does |
|---|---|
cleanup_credential set [<domain>] | Saves the account for a domain, the current one by default. The secret is asked for at a masked prompt. |
cleanup_credential show | Lists the cleanup accounts available. It never prints the secret. |
cleanup_credential clear [<domain>|all] | Removes the saved account for a domain, or every one. |
The secret is never passed as an argument, so it stays out of your shell history.
Unattended runs
adscan ci takes the account by reference, never inline. Set ADSCAN_CLEANUP_USERNAME, ADSCAN_CLEANUP_SECRET and optionally ADSCAN_CLEANUP_DOMAIN, or add a cleanup_credential section to the scan configuration with username, domain and secret_env, the name of an ADSCAN_* environment variable that holds the secret. An account passed this way is used for that run only and is not saved.
When a run passes no account for a domain and the workspace has one saved, adscan ci uses the saved account and says so in the run output. The report's cleanup section then states that the account was saved with the engagement in an earlier session.
System Command
system
Execute shell commands in the environment where ADscan is running.
Syntax:
system <command>Parameters:
command: Any shell command to execute locally
Examples:
# Check local user
(ADscan:workspace) > system whoami
kali
# View network interfaces
(ADscan:workspace) > system ip addr show
# Check VPN connection
(ADscan:workspace) > system ping -c 1 10.10.10.161Important Notes:
- By default, ADscan runs inside Docker, so
systemexecutes inside the ADscan container (with host networking) systemdoes NOT execute commands on the target domain- Useful for checking local system state, files, and network connectivity
- All standard Linux/bash commands are available
Docker Mode Note
If you need to run commands on the host (for example docker ps), use a separate terminal on the host OS.
Common Use Cases:
# Verify VPN connectivity
system ping <target_ip>
# Check available disk space
system df -h
# Check network routes
system ip route
# Verify tool installations
system which hashcatTo inspect workspace files on the host, use a separate terminal:
ls -la ~/.adscan/workspaces/
cp ~/.adscan/workspaces/<workspace>/report.json /tmp/Credential Storage
Credentials are automatically saved as part of the workspace state:
~/.adscan/workspaces/<workspace>/
├── variables.json # Structured state: domains, credentials, services, config
└── report.json # JSON report of discovered issues and attack pathsSecurity:
variables.jsoncontains discovered credentials (cleartext passwords and hashes), encrypted when the workspace is (see below)- A saved cleanup-only account lives in the same file, under its own
cleanup_credentialskey and outside the captured credentials. It is kept out of the terminal output sent as telemetry, and it is encrypted with the other credentials. - On Linux ADscan writes
variables.jsonreadable by your user only (600). On Windows it inherits the permissions of the ADscan folder in your user profile. - Cleartext passwords are only stored when explicitly cracked
Encryption at rest
A workspace can keep the credentials it stores encrypted. When you create a workspace for a real environment (the Audit or Production-sensitive policy), ADscan asks one question, "Encrypt the credentials stored in this workspace?", with three answers.
- Yes, key kept on this machine (recommended). Each workspace gets its own key, and that key is protected by a machine key in
~/.adscan/state/engagement.kek(the ADscan folder under%LOCALAPPDATA%on Windows). There is nothing to type, soadscan ciruns unattended as before. - Yes, with a passphrase. ADscan asks for it once per session. For
adscan ci, setADSCAN_VAULT_PASSPHRASE. - No. Credentials are stored unencrypted, as in earlier versions.
A Lab / CTF workspace is not asked and is not encrypted. An unattended run that creates a workspace for a real environment takes the first answer and says so in one line. You can change the choice at any time with workspace encrypt, workspace decrypt and workspace rekey.
Passwords, NT hashes, Kerberos keys, the cleanup-only account and the password-spraying history are encrypted with AES-256-GCM. Account names, domains and the rest of the workspace stay readable. ADscan decrypts the values in memory when it needs them, and your terminal still shows recovered credentials in clear text.
If the key is not available (another machine, or a wrong passphrase), the workspace still opens. The stored credentials stay encrypted and are never overwritten, and ADscan asks for credentials where a step needs them. Run workspace unlock to try the passphrase again.
This protects a workspace that is zipped, backed up, copied to another machine or read by another account on this one. It does not protect against someone who can also read the machine key file, so keep ~/.adscan/state private, or choose a passphrase.
Some files a scan writes beside the credential store are not encrypted yet, such as hash lists prepared for cracking and the results of credential hunting in shares. Treat the workspace folder as sensitive either way.
An older version of ADscan cannot read an encrypted workspace. Run workspace decrypt first if you need to open it with one.
Credential Sources
ADscan discovers credentials through various techniques:
| Technique | Description | Output |
|---|---|---|
| AS-REP Roasting | Pre-authentication disabled accounts | Password (cracked hash) |
| Kerberoasting | Service accounts with SPNs | Password (cracked TGS) |
| DCSync | Domain replication rights | NTLM hashes (all users) |
| SAM Dump | Local account database | NTLM hashes (local users) |
| LSA Secrets | LSA cached credentials | Passwords or hashes |
| DPAPI | Data Protection API credentials | Passwords (decrypted) |
Workflow Example
Complete credential management workflow (Forest example):
You can run start_auth in guided mode and enter the target details when prompted:
- Domain:
htb.local - DC IP:
10.129.2.124 - Username:
svc-alfresco - Password:
s3rvice
(ADscan:htb_forest ~/.adscan/workspaces/htb_forest) > start_authIf you prefer to skip the guided prompts, you can also run:
(ADscan:workspace) > start_auth htb.local 10.129.2.124 svc-alfresco s3rvice [+] Credentials validated successfully for svc-alfresco@htb.local
ℹ Enumerating domain privileges and ACLs for user svc-alfresco
⚠ There is an ACE with GenericAll on 'Exchange Windows Permissions'
Do you want to exploit the GenericAll/GenericWrite privilege on Exchange Windows Permissions? [y/n] (y): y
ℹ Executing AddSelf attack
✓ User svc-alfresco successfully added to group Exchange Windows Permissions
ℹ Adding DCSync permissions to user svc-alfresco on the domain domain
✓ GenericAll added successfully
ℹ Performing DCSync for user Administrator
✓ Found credential: htb.local/Administrator with hash 32693b11e6aa90eb43d32c72a07ceea6 (ADscan:htb_forest ~/.adscan/workspaces/htb_forest) > creds show [...same output as above 'Discovered Credentials (Forest)' example...] (ADscan:htb_forest ~/.adscan/workspaces/htb_forest) > creds select htb.local ╭─ Domain ─────────╮
│ ● htb.local │
╰──────────────────╯
Available Users
╭────────┬───┬────────────────┬──────────────────────╮
│ ID │ │ Username │ Provenance │
├────────┼───┼────────────────┼──────────────────────┤
│ 1 │ ✓ │ svc-alfresco │ via AS-REP roast │
├────────┼───┼────────────────┼──────────────────────┤
│ 2 │ ✓ │ Administrator │ via DCSync │
├────────┼───┼────────────────┼──────────────────────┤
│ 3 │ ✓ │ andy │ via DCSync │
╰────────┴───┴────────────────┴──────────────────────╯
? Select credential for domain htb.local: Administrator
✓ Selected credential: Administrator@htb.local
ℹ Subsequent authenticated enumeration will use this account.# On the host (separate terminal)
ls ~/.adscan/workspaces/htb_forest/Best Practices
Credential Rotation
When you discover new credentials:
- Use
creds showto view all accounts - Test each credential with
creds select - Document which accounts have which access
- Prioritize high-privilege accounts for further exploitation
Secure Storage
- Never share variables.json publicly
- Encrypt workspace backups before transferring
- Delete old workspaces after engagement completion
- Use
clear_allto wipe workspace data when done
Sensitive Data Protection
In a workspace that is not encrypted, variables.json contains cleartext passwords and NTLM hashes. Encrypt the workspace with workspace encrypt, keep restrictive permissions (600), encrypt backups before transfer, and securely delete workspace data after engagement completion using clear_all.
Credential Testing
# Select different credentials to test access
creds select corp.local # Test user1
creds select corp.local # Test user2
# Compare access levels between accounts
# Identify which accounts have DA/EA privilegesRelated Commands
- Scanning Commands - Discover credentials through scanning
- Workspace Management - Manage workspace data
Next Steps
After discovering credentials:
- Use
creds showto view all credentials - Select high-value credentials with
creds select - Enumerate privileges and accessible resources
- Follow BloodHound attack paths to escalate privileges