Skip to content
ADscan Docs

Scanning Commands

Unauthenticated and authenticated Active Directory scanning commands

Authorization Required

Only scan systems you have explicit written authorization to test. Unauthorized network scanning and access is illegal and may result in criminal prosecution.

ADscan provides scanning commands for both unauthenticated and authenticated Active Directory enumeration.

Configuration Commands

Before starting a scan, configure these essential parameters:

set iface

Set the network interface. ADscan no longer asks for one when a session starts: only broadcast poisoning needs a specific interface, and it asks at the poisoning prompt and when you run poisoning yourself. Use set iface to choose one ahead of time.

If you have declared an address with set myip, selecting an interface afterwards replaces it. See Callback address.

Syntax:

bash
set iface <interface_name>

Examples:

bash
# Ethernet
(ADscan:workspace) > set iface eth0

# VPN (common for CTFs)
(ADscan:workspace) > set iface tun0

# WiFi
(ADscan:workspace) > set iface wlan0

Finding your interface:

bash
ip addr show

set myip

Declare the address a target must connect back to during relay, coercion and capture. You only need it when ADscan cannot work the address out itself, for example behind a tunnel or jump host, where the address is on no local interface.

Syntax:

bash
set myip <ip_address>

Example:

bash
(ADscan:workspace) > set myip 203.0.113.10

A declared address wins over every inferred one and applies to all targets. Without it, ADscan chooses the address per asset. See Callback address.

set hosts

Set target IP range for unauthenticated scans (discovery mode).

Syntax:

bash
set hosts <cidr_range|ip_address>

Examples:

bash
# Single host
(ADscan:workspace) > set hosts 10.10.10.161

# CIDR range
(ADscan:workspace) > set hosts 192.168.1.0/24

# Large subnet
(ADscan:workspace) > set hosts 10.0.0.0/16

set auto

Configure automation level.

Syntax:

bash
set auto <True|False>

Examples:

bash
# Semi-automatic mode (recommended for production)
(ADscan:workspace) > set auto False

# Automatic mode (faster for labs/CTFs)
(ADscan:workspace) > set auto True

Modes:

  • auto=False: Prompts before each potentially noisy or disruptive action (maximum operator control)
  • auto=True: Automatically runs low‑risk steps while still prompting before noisy, disruptive, or high‑impact actions

Production Warning

Use auto=False in production or client environments. Automatic mode (auto=True) is designed for labs/CTFs: it accelerates safe enumeration, but high‑impact operations still require explicit confirmation. Semi‑automatic mode keeps you in the loop for more decision points, which better matches strict rules of engagement.

set telemetry

Enable or disable telemetry reporting. Without a keyword it changes only the current workspace. With global it changes the default for every workspace on this machine, and that default persists.

Syntax:

bash
set telemetry <on|off> [global]

Examples:

bash
# This workspace only (this engagement)
(ADscan:workspace) > set telemetry off

# Every workspace on this machine
(ADscan:workspace) > set telemetry off global

# Back on for this workspace, even if the machine-wide default is off
(ADscan:workspace) > set telemetry on

A workspace's own choice always wins over the machine-wide default, in either direction. For a single run, use --no-telemetry or ADSCAN_TELEMETRY=0 instead. --offline, --no-telemetry, ADSCAN_TELEMETRY=0 and set telemetry off (with or without global) all turn off telemetry. None of them turns off the PRO licence check or domain registration. Telemetry is more than error counters. The Community and PRO command-line tools also upload sanitized, pseudonymized terminal output, on by default and in adscan ci too. What that contains, how it is sanitized and how the two scopes resolve is on the telemetry page. Read it before deciding for an engagement.

scope

From 15.0.0, scope records which hosts and accounts the engagement may touch. An allow list names the only ones ADscan may touch, a deny list names the ones it must leave alone, and deny always wins. Excluded hosts receive no traffic and excluded accounts are never acted on.

bash
scope                                   # show the recorded scope and how each entry resolved
scope deny fs01.corp.example,192.0.2.40 # leave these alone
scope allow 198.51.100.0/24             # touch only this network
scope deny-file ./do-not-touch.txt      # one entry per line
scope remove d2                         # remove an entry by id or by value
scope clear deny                        # empty a list (allow, deny or all)
scope dc-access directory               # or full
scope check fs01.corp.example           # is this target inside the scope, and which entry says so
scope verify                            # what every entry resolves to, before anything is contacted

A change that narrows the scope is confirmed with Yes as the default, and one that widens it with No. It applies from the next action. adscan start takes the same lists as flags (--scope-allow, --scope-deny, --scope-allow-file, --scope-deny-file, --scope-dc-access) and applies them to the workspace you open, after a summary.

Run scope verify after typing a scope. Its first line is the one that matters most, an exclusion that matched nothing, which usually means a typo that would leave the host inside the scope under its real name.

Engagement scope for hosts and accounts covers the entry formats, the domain controller rules and what the report shows.

Unauthenticated Scanning

start_unauth

Start unauthenticated Active Directory enumeration.

Syntax:

bash
start_unauth
start_unauth [domain|dc_ip] [dc_ip]

Prerequisites:

  • A network interface, only if you want broadcast poisoning (set iface)
  • Either:
    • Target hosts configured (set hosts) for discovery-by-range, or
    • Provide domain/DC context interactively (guided prompts), or
    • Provide domain/DC context via arguments (see examples below)

Example (HTB Forest):

Unauthenticated scan
  (ADscan:forest ~/.adscan/workspaces/forest) > set iface tun0
  (ADscan:forest ~/.adscan/workspaces/forest) > set hosts 10.129.2.124
  (ADscan:forest ~/.adscan/workspaces/forest) > start_unauth
Output - Unauthenticated Scan (Forest)
  ℹ  Starting host detection on 10.129.2.124...
  ℹ  Starting smb scan
  ⚠ New domain found: htb.local
  ℹ  Updating DNS
  ✓ DNS resolution configured correctly for htb.local
  ✓ smb scan finished.
  ℹ  Checking for null sessions on SMB on the domain htb.local
  ⚠ null session accepted successfully for domain htb.local.
  ℹ  Creating a SMB user list
  ✓ 19 Users found.
  ℹ  Searching for AS-REP roastable users in domain htb.local
  ╭────────────────────────────────────────────────────────────╮
  │         Asreproastable Users in htb.local (Guest)          │
  │ ╭────────────────────────────────────────────────────────╮ │
  │ │ svc-alfresco                                           │ │
  │ ╰────────────────────────────────────────────────────────╯ │
  ╰────────────────────────────────────────────────────────────╯
  ℹ  Using rockyou as the default wordlist.
  ⚠ Cracking asreproast hashes. Please be patient (this may take a while)
  ✓ Kerberos TGT created successfully
  ℹ  Kerberos ticket generated for svc-alfresco@htb.local

What it does:

  1. Helps you choose the correct scan type (unauthenticated vs authenticated)
  2. Discovers Active Directory domain and domain controllers (or uses your known domain/DC)
  3. Validates the provided DC/PDC target and may suggest a better DC/PDC IP
  4. Enumerates what is accessible without credentials (SMB/LDAP/Kerberos depending on exposure)
  5. If credentials are available, recommends switching to start_auth for full coverage

When a host refuses a null session, ADscan tries a guest session. From 15.0.0 it signs in with a name made for the engagement, adscan- and eight random characters, after confirming that no account in the directory carries it, so a guest probe can never count as a failed sign-in on a real account. Guest SMB sessions says what a client's logs show.

Segmented networks: a separate DNS server

When discovery scans a host range and the domain controller does not answer DNS on port 53, ADscan looks for a separate DNS server on the same range: a host that serves DNS but is not itself a controller. In an interactive run it offers that host as the pre-filled default when it asks for the AD-zone DNS server, so you confirm with Enter. An unattended run (adscan ci) adopts it automatically only when it is the single such host on the range and it actually resolves the domain zone. The controller stays the authentication and enumeration target; the detected host is used only to resolve names. You can always name the resolver yourself with --dns-server.

Recommended usage patterns:

bash
# If you have credentials: prefer authenticated scanning (covers unauth too)
(ADscan:workspace) > start_auth

# If you know the domain + a DC IP: skip host-range discovery and go straight to enumeration
(ADscan:workspace) > start_unauth corp.local 10.10.10.1

# If you know only the domain (and DNS is already working): ADscan can try SRV discovery
(ADscan:workspace) > start_unauth corp.local

# If you know only a DC IP: ADscan can try PTR first, then SMB fingerprinting as fallback
(ADscan:workspace) > start_unauth 10.10.10.1

Re-running only Kerberos user enumeration:

If you want to keep iterating on username discovery after start_unauth, you do not need to rerun the full unauthenticated scan.

Use:

bash
kerberos_enum_users <domain>

ADscan now supports three focused Kerberos username-enumeration paths:

  • Focused corporate wordlists: choose a known username format and generate candidates from statistically-likely corp patterns, known names, and in audit workspaces optionally LinkedIn employee discovery.
  • General common username wordlist: a built-in fallback when the username format is unknown.
  • Custom username wordlist: import a wordlist from your host and retry paths interactively if the file path is wrong.

Success criteria:

  • Domain discovered
  • User accounts enumerated
  • Potential attack paths identified

Authenticated Scanning

start_auth

Start authenticated Active Directory enumeration with credentials.

Syntax:

bash
start_auth
start_auth <domain> <dc_ip> <username> <password|hash>

Guided mode (recommended):

  • Run start_auth with no arguments to follow an interactive wizard:
    • Enter credentials (username + password/hash)
    • Credential input is visible so you can verify what you typed before confirming
    • Provide whatever target context you know (domain, DC IP, or DC hostname)
    • ADscan validates the DC/PDC target and may suggest switching to the discovered PDC

Parameters:

  • domain: Domain name (e.g., corp.local, htb.local)
  • dc_ip: Primary Domain Controller IP address
  • username: Domain username (without DOMAIN\ prefix)
  • password: Cleartext password or NTLM hash

Examples:

Guided mode:

bash
(ADscan:workspace) > start_auth

With password:

bash
(ADscan:workspace) > start_auth corp.local 10.10.10.1 jdoe MyP@ssw0rd!

With NTLM hash (pass-the-hash):

bash
(ADscan:workspace) > start_auth corp.local 10.10.10.1 administrator aad3b435b51404eeaad3b435b51404ee:8846f7eaee8fb117ad06bdd830b7586c

What it does:

  1. Verifies credentials against domain controller
  2. Enumerates all domain users, groups, and computers
  3. Collects BloodHound data automatically
  4. Detects escalation opportunities and records them as attack steps
  5. Computes attack paths from your current/owned users to high‑value targets
  6. Reports Tier‑0 access exposure: which non‑privileged accounts can already reach a Tier‑0 asset (a domain controller, an AD CS certification authority, an Exchange server), graded by access strength and target directness, plus how concentrated that access is across the domain (see Tier‑0 access exposure)
  7. Maps SMB share exposure: captures NTLMv2 hashes on writable shares (drops SCF/LNK bait for a privileged user to browse) and hunts readable shares for embedded credentials
  8. Prompts you to review and (optionally) execute supported attack paths

To revisit paths later (or after adding new credentials), use:

bash
attack_steps <domain>
attack_paths <domain> owned

Example output (Forest, after AS-REP roasting):

Output - Authenticated Enumeration (Forest)
  Do you want to enumerate privileges for user svc-alfresco? [y/n] (y): y
  Do you want to enumerate privileges for user svc-alfresco on various services on hosts?
  (⚠ WARNING: This will saturate the network if the number of hosts in domain htb.local is very high) [y/n]: y
  ℹ  Starting smb privilege enumeration for user svc-alfresco
  ✗ smb enumeration completed for user svc-alfresco. No hosts with privileges found.
  ℹ  Starting winrm privilege enumeration for user svc-alfresco
  ⚠ User svc-alfresco has winrm privileges on host 10.129.95.210
  Do you want to enumerate host 10.129.95.210 via WinRM as user svc-alfresco? [y/n]: y
  ℹ  Searching for Firefox files for user svc-alfresco
  ✗ No Firefox credential files found for user svc-alfresco
  ℹ  Obtaining PowerShell history for user svc-alfresco
  ✗ No PowerShell history found for the user.
  ℹ  Obtaining autologon credentials
  ✗ No autologon credentials found in the output.

Domain Collection (Phase 2)

After authentication succeeds, start_auth runs Domain Collection — the phase that builds the attack graph. It collects two distinct layers:

  • The LDAP layer (always): the directory graph, ACLs, group memberships, and ADCS/PKI objects. This is the mandatory base — it produces the graph and the list of computers everything else builds on.
  • The SMB layer (optional): per-host data that requires touching each computer over the network — logged-on sessions and local administrators, plus accessible shares and their permissions.

Choosing what to collect

At the start of Domain Collection, ADscan asks which sub-collections to run:

shell
? Domain Collection — select sub-collections for corp.local
  [x] LDAP graph, ACLs, memberships & ADCS/PKI
  [x] SMB: sessions & local admins (SAMR)
  [x] SMB: shares & share ACLs (SRVSVC)
  • The LDAP item is always collected (it is the base graph) and is shown checked for visibility.
  • The two SMB items are independent — keep both, keep one, or deselect both.
  • Deselecting both SMB items turns Domain Collection into a fast, quiet LDAP-only pass: ADscan skips the per-host network phase entirely. This is ideal for a first, low-noise look at a large estate, or when you only need the graph/ACL/ADCS view.
  • The default is everything selected, so leaving the prompt untouched (or running non-interactively, e.g. in CI) collects all three layers — no change from previous behavior.

Why a fast LDAP-only pass

On very large or tightly segmented networks, the SMB layer is the slow part — it has to reach every computer. Running LDAP-only first gives you the full graph, ACLs, and certificate-services view in seconds, then you can re-run later with the SMB layers enabled once you have narrowed the scope.

Reachability gate on the SMB layer

When the SMB layer is enabled, ADscan does not blindly try to reach every computer in the directory. Before the expensive per-host collection, it runs a fast reachability probe and only collects from hosts that actually answer on the SMB port:

  • Unreachable hosts are skipped, not retried until timeout. On large estates (thousands of computers, restricted subnets, stale machine accounts) this is the difference between finishing in minutes and stalling for an hour on hosts that will never respond. Skipped hosts stay in the graph — they simply get no SMB data.
  • Disabled computer accounts are excluded from the SMB layer entirely (a disabled account cannot authenticate, so probing it is pure waste).

You will see a short reachability summary (how many hosts answered) before the per-host phase begins. The gate fails open: if the probe itself errors, ADscan falls back to collecting all hosts so coverage is never silently reduced.

Tuning (optional — defaults are sensible for most networks):

bash
# How many hosts to probe in parallel (default 256)
export ADSCAN_COLLECTOR_GATE_CONCURRENCY=256

# Per-host connect-probe budget in seconds (default 5.0; raise for high-latency VPNs)
export ADSCAN_COLLECTOR_GATE_TIMEOUT=5.0

Active host cap (time-bound scanning on large estates)

On a large estate (a few thousand computers), the reachability and port scan still run on every host — that part is cheap and gives you a complete reachability and open-port inventory for the report. What you can bound is the active layer that follows: the per-host SMB collection and the SMB / WinRM / MSSQL privilege sweeps.

The host_cap scan-config field limits that active set to a fixed number of hosts, chosen highest-value first (Tier 0 — domain controllers and certificate authorities — then member servers, then workstations). The cap is a single union, so the total active footprint is host_cap hosts across all services, not per service. The directory graph is never capped, and you always see a clear message when the cap applies — it is never silent.

  • Default 150 — roughly one /24 worth of the most important hosts, enough for a representative pilot on a multi-thousand-host network.
  • 0 = unlimited — every reachable host is collected and swept (the full sweep).

Set it in the scan config (adscan ci and the Enterprise scan form expose a "Host cap (0 = unlimited)" field), or override per run:

bash
# Cap the active sweep to the top 150 hosts (representative-first)
export ADSCAN_COLLECTOR_HOST_CAP=150

# Full sweep — collect and sweep every reachable host
export ADSCAN_COLLECTOR_HOST_CAP=0

NTLMv1 / NTLMv2 detection per host

During Domain Collection, ADscan classifies how each reachable host negotiates NTLM authentication and flags NTLMv1 — a downgrade misconfiguration whose captured responses can be cracked to the account's NT hash via rainbow tables. Previously this signal was only observed on the domain controller; it is now evaluated per host.

The scope is gated by the scan policy to respect rules of engagement:

  • Lab / CTF policy: ADscan sweeps all reachable hosts automatically.
  • Audit and Production-sensitive policies: ADscan stays DC-only by default (the quiet, low-footprint choice). You can opt in to a full per-host sweep when prompted — ADscan shows an OPSEC heads-up first, because coercing each host to authenticate back can be flagged by Defender for Identity, MDI, or SOC network detection.

OPSEC — full NTLM sweep in audit mode

The DC-only NTLMv1 check is always safe to run and is reportable on its own. The opt-in full sweep generates additional authentication traffic from every host and is more likely to be noticed. Only enable it when your rules of engagement allow it.

Tuning (optional):

bash
# Concurrent hosts in the full per-host sweep (default 8 — kept low for OPSEC)
export ADSCAN_NTLM_SWEEP_CONCURRENCY=8

# Overall wall-clock budget for the whole sweep, in seconds (default 1800)
export ADSCAN_NTLM_SWEEP_BUDGET_SECONDS=1800

Long-Running Operations — Live Progress & Patience Notices

Several scan steps can take a while on real networks — per-host SMB collection, Kerberos user enumeration, password spraying, the port scan, and the share credential hunt. ADscan makes long operations legible so you never wonder whether the tool has hung:

  • Upfront patience notice. Before a large run starts, ADscan tells you roughly how long to expect (scaled to the number of hosts/users involved — from "a few seconds" up to "ten minutes or more — grab a coffee"). Small runs stay silent, so the output stays clean.
  • Live progress surface. While the operation runs, a live dashboard shows progress — a count with throughput and ETA where the total is known, or a working spinner where it is not — so you can see it is actively making progress.

The patience-notice threshold is per operation and can be overridden (the value is the item count above which the upfront notice appears):

bash
export ADSCAN_PATIENCE_THRESHOLD_SMB_COLLECTION=...   # per-host SMB collection
export ADSCAN_PATIENCE_THRESHOLD_USERENUM=...         # Kerberos user enumeration
export ADSCAN_PATIENCE_THRESHOLD_SPRAY=...            # password spraying
export ADSCAN_PATIENCE_THRESHOLD_IMPORTANT_PORT_SCAN=... # port scan

In non-interactive / CI runs the notice is collapsed to a single log line and never blocks.

Port scan pacing

The port scan is paced conservatively by default on both platforms, so it stays gentle on fragile hosts (printers, legacy or OT devices) and on monitored enterprise networks. If you own the network and want more throughput, raise the limits.

On Windows, ADscan scans ports with a native in-process TCP connect scan (no nmap or Npcap needed). Its timing is comparable to nmap's production-safe defaults, with a per-host connection limit and automatic back-off when the network shows signs of strain:

bash
export ADSCAN_PORTSCAN_CONCURRENCY=256   # global simultaneous connections (default: conservative)
export ADSCAN_PORTSCAN_PER_HOST=32       # simultaneous connections to any single host

On Linux, ADscan scans ports with nmap. The default timing is rate-neutral: it caps how long nmap spends on a dead host (most AD computer objects it targets are stale or powered off) without raising the send rate against a live one, so a large domain finishes sooner and the scan never gets louder. Anything faster than that is opt-in:

bash
export ADSCAN_PORTSCAN_NMAP_MAX_RETRIES=2    # give up on a dead host sooner (default: 3)
export ADSCAN_PORTSCAN_NMAP_HOST_TIMEOUT=10m # cap per-host scan time (default: 15m)
export ADSCAN_PORTSCAN_NMAP_TIMING=-T4       # raise nmap's timing template (default: none)

Only ADSCAN_PORTSCAN_NMAP_TIMING (-T4/-T5) increases the send rate, so reach for it only on a network you own. The other two bound wasted time on offline hosts without changing how fast ADscan probes a live one.

Stopping a step or a scan with Ctrl+C

From 15.0.0, Ctrl+C during a scan no longer closes ADscan. It opens a menu, and the scan keeps working while you read it. The header says where the scan is, for example the step and how far it got.

ChoiceWhat happens
Stop this step and keep what it foundThe step finishes the work already in flight and the scan moves on. Offered while a long step is running, such as a host sweep, a share hunt or a port scan.
Skip the rest of this phaseThe scan goes on from the next phase.
Stop the scan and return to the promptThe scan ends in an orderly way and you are back at the ADscan prompt with the session intact.
Keep goingNothing changes.

Pressing Ctrl+C again while the menu is open means stop the scan.

Whatever you stop, the results found so far are kept. A step you cut short lists what it did not reach, and those hosts are reported as not checked, never as hosts with no access or no open ports. Both reports name every stopped step and skipped phase as cut short by the operator, with how far it got, and a phase cut short is never marked complete. When you open the workspace again, ADscan offers to resume the unfinished phase and runs only that phase.

The same holds outside a scan. Ctrl+C while a shell command runs offers Stop this command and return to the prompt or Keep going, and ADscan never exits. If the command does not reach a safe stopping point within a few seconds, ADscan stops it, and a further Ctrl+C stops it at once.

At a prompt, Ctrl+C still cancels the prompt, as before. In an unattended run there is no menu. The first Ctrl+C stops the scan cleanly and adscan ci exits with code 3.

Password Spraying — Lockout-Aware Coverage

The spraying phase runs in two steps and is designed to test every safe spray angle while guaranteeing no account is ever locked out. Throughout, ADscan reads the domain's lockout policy (threshold + observation window) and each account's current badPwdCount, and keeps a 2-attempt safety margin below the threshold: any account too close to the limit is held back, never sprayed. Combinations already tried in a previous run are skipped automatically (tracked per (user, password)), so re-running a scan never re-sprays covered ground or burns badPwdCount.

Who is sprayed — eligibility & exclusions

Before each spray, ADscan shows a Spray Eligibility panel with two tables — Eligible accounts (who will be sprayed, with their BadPwdCount, remaining attempts, and the lockout policy that applies) and Excluded accounts (who is held back, with the reason). Accounts are excluded for four reasons, so spraying is both safe and free of noise:

  • Already owned — any account ADscan already holds a credential for (password or hash) is dropped silently. Spraying an account you control is pointless and only adds badPwdCount. Machine accounts you already cracked are likewise dropped from the pre2k step.
  • Currently locked out — read live from the DC's msDS-User-Account-Control-Computed (the authoritative UF_LOCKOUT flag, already PSO- and auto-unlock-aware). A locked account resets its badPwdCount to 0, so it looks sprayable — ADscan excludes it (you cannot authenticate it, and spraying would extend the lockout). This is informational only: it never prompts you to confirm, and it is excluded from the coverage percentage (a locked account cannot be "covered").
  • Near the lockout threshold — within the 2-attempt margin; held back for safety and re-tried automatically once the lockout observation window resets.
  • Unreadable fine-grained policy (PSO) — when an account has a PSO assigned (msDS-ResultantPSO) but the spraying principal cannot read the Password Settings Container (the norm for low-privilege users, and exactly the privileged Tier-0 accounts you least want to lock), ADscan cannot know the PSO's real lockout threshold. Rather than assume the domain default (which a stricter PSO would over-estimate, risking a lockout), it applies a conservative threshold of 3 — with the 2-attempt margin this caps such users at a single attempt. The eligibility panel labels these clearly (e.g. PSO 'TIER0' unreadable · thr 3), and shows the real PSO name + threshold when the PSO object is readable.

Step 1 — pre2k computer-account spray

Pre-Windows-2000 computer accounts are frequently provisioned with their password equal to the hostname in lowercase. ADscan sprays that pattern across every enabled computer account. Because computer accounts are not subject to the user lockout policy, this can never lock out a domain user, so it runs first. An educational panel explains what it is, why it is safe, and what a hit means, then asks for confirmation (default yes; auto-yes in adscan ci).

Step 2 — coverage-aware spray selector

A selector then offers the user-account spray types, each with a live coverage percentage and the number of users currently eligible (within the lockout margin):

  • user-as-password — the user's own name as the password. A sub-menu picks the case mode (normal / lowercase / uppercase); one mode marks the type covered.
  • owned-credential reuse — appears once a cleartext credential has been recovered; sprays it across the domain to surface password reuse. A sub-menu selects which owned credential(s) to use.
  • blank password — accounts with an empty password.
  • month/season + year (audit engagements only) — the predictable seasonal passwords that forced rotation produces: March2026, Verano2026. Selecting this one menu entry opens two sub-prompts: first the pattern (Month, the default / Season / Both), then the language. ADscan infers whether the environment is English or Spanish from language-independent RID signals and shows its guess (for example, "ADscan inferred this environment is Spanish"), letting you keep it or switch to English, Spanish, or both. That choice is remembered per domain, so later sprays do not ask again. With domain credentials, ADscan reads each account's last password-change month and sprays that account's most likely seasonal password; without credentials it uses the current month and season (editable at the prompt). Only Word+Year forms are sprayed — no trailing !@# symbols — keeping it to one attempt per account inside the same lockout safety rules.

Two interactive-only extras are also offered when relevant: custom password (spray a password you type) and retry passwords found in shares / SAM → domain reuse. The custom-password prompt shows a few example patterns to try.

Interactive (adscan start). You pick a spray from the selector; it re-appears after each run so you stay in full control and can run as many as you like (or pick Done). When no users remain eligible (everyone locked, near lockout, or owned), ADscan finishes the phase automatically instead of re-prompting an empty selector. The "some accounts were held back — continue?" confirmation only appears for genuine safety hold-backs (near lockout), never for locked accounts.

Non-interactive (adscan ci). ADscan auto-selects intelligently: it walks the priority order (user-as-password → month + year → season + year → owned-credential reuse → blank), skips any type already fully covered or with zero eligible users, and finishes the phase once none remain. Month and season are covered as two separate passes so a run sprays both, not just the first. The case mode defaults to lowercase; the month/season language defaults to ADscan's inferred environment language; owned-credential reuse sprays all held credentials; month/season runs only under a policy for a real environment. This is deterministic and cannot loop. Any strategy can be disabled from the scan config, e.g. phases.steps.password_spraying.disabled: [month_season] (one toggle covers both the month and the season passes).

Manual commands

Inside the interactive shell you can run the same flow on demand:

bash
# Coverage-aware spray selector for a domain (the Step-2 flow above).
(ADscan:workspace) > spraying <domain>

# The pre2k computer-account check on its own (Step 1).
(ADscan:workspace) > pre2k <domain>

Both default to the current domain. pre2k is deduped per workspace — once run, it is not silently repeated on a later re-entry.

Notes:

  • When the domain lockout threshold is 0 (lockout disabled), every account is sprayable and nothing is held back.
  • Coverage and eligibility are recomputed from live policy data on every selector pass, so a credential recovered mid-phase immediately unlocks owned-credential reuse, and a re-run after the observation window picks up previously-held users.

Scan Types

Network Discovery

Identify Active Directory infrastructure:

bash
(ADscan:workspace) > set hosts 192.168.1.0/24
(ADscan:workspace) > start_unauth

Discovers:

  • Domain controllers
  • Domain DNS name
  • Domain functional level

User Enumeration

List all domain user accounts:

Unauthenticated:

bash
start_unauth
# Uses anonymous RPC/LDAP if allowed

Authenticated:

bash
start_auth domain.local 10.10.10.1 user pass
# Full user enumeration with attributes

Privilege Escalation

Identify paths to Domain Admin:

bash
# Run authenticated scan
start_auth domain.local 10.10.10.1 lowpriv_user password

# ADscan automatically:
# - Checks for Kerberoasting opportunities
# - Identifies AS-REP roastable accounts (within domain)
# - Builds attack steps and analyzes BloodHound paths
# - Suggests attack paths for operator review

Best Practices

Reconnaissance

Start with unauthenticated scanning:

bash
# 1. Discover the domain
set hosts 10.10.10.0/24
start_unauth

# 2. If credentials found, escalate
start_auth domain.local 10.10.10.1 found_user found_password

Production Environments

Use semi-automatic mode for control:

bash
set auto False
# You'll be prompted before potentially noisy operations and most key decisions

Lab/CTF Environments

Use automatic mode for speed:

bash
set auto True
# Faster enumeration with minimal prompts (still confirms high-impact actions)

Credential Management

ADscan automatically saves discovered credentials inside the workspace state:

bash
# Workspace state (including credentials) is stored in:
~/.adscan/workspaces/<workspace>/variables.json

# Use discovered credentials in future scans
start_auth domain.local 10.10.10.1 stored_user stored_password

Scan output

Everything a scan produces lands in the workspace:

shell
~/.adscan/workspaces/<workspace>/
├── technical_report.json                the structured finding set reports render from
├── environment_changes.json             ledger of directory changes, and their rollback state
├── adscan_exposure_report_<stamp>.html  the exposure report (real-environment policies)
├── adscan_exposure_report_<stamp>.pdf
├── enabled_computers.txt                host rollups across every domain
├── logs/adscan.debug.log                always DEBUG on disk
├── smb/ ldap/ kerberos/ dns/ …          per-service ips.txt of the hosts that answered
└── domains/<domain>/
    ├── attack_graph.json                the graph, BloodHound-compatible
    ├── attack_paths_snapshot.json       computed paths and their status
    ├── identity_choke_points.json       the techniques that carry the most paths
    ├── timeline.jsonl                   what happened, in order
    ├── inventory/                       users, computers, groups, acls, gpos,
    │                                    adcs_templates, dcsync_rights, trusts, …
    ├── cracking/                        hashes, and whatever cracked
    └── kerberos/tickets/                ccaches, one per principal

The workspace page annotates the full layout.

The exposure report

A scan under a policy for a real environment (Audit, Production-sensitive) writes a client-ready exposure report on its own when the scan finishes — no command, no flag. You get two copies of the same document: a self-contained .html that opens anywhere with no network, and a paginated .pdf for the reader who forwards it to a board or an auditor. Both land in the workspace root as adscan_exposure_report_<timestamp>.{html,pdf}.

It is free-tier. It carries:

  • The posture score, 0-100, where higher is safer. It replaces the old exposure score, which ran the other way round and read backwards on a slide.
  • The severity breakdown of the findings.
  • The findings themselves, each mapped to the ATT&CK techniques it enables.
  • The validated attack paths, each step carrying its honest status — proven, partially validated, attempted, or not executed for safety.
  • The choke-point ranking — the handful of techniques that carry the most paths, so remediation starts where it closes the most at once.
  • Changes made to your directory — every object ADscan created or modified during the run and whether it was rolled back. This section is written on every scan, including one that changed nothing, so its absence can never be mistaken for "nothing happened".

A Lab / CTF policy does not generate it unasked — a client report is rarely what a lab run was for. ADscan offers it as a one-line hint after the scan recap instead, and you type the verb if you want it:

bash
generate_report      # render the exposure report for this workspace

The writeup spine

A Lab / CTF policy writes the writeup spine on its own when the scan finishes, on the same terms and for the same reason the audit report does: an artifact you have to ask for is one you sometimes skip. It matters more here than anywhere else, because these platforms hold publication back until the target retires, so the post gets written months later and the order things happened in is the first thing lost.

The draft lands under <workspace>/writeups/<slug>-<timestamp>/writeup.md, marked draft: true in its frontmatter. Nothing is published or uploaded. You can also build one at any time, or into another directory:

bash
writeup                                  # into the workspace
writeup ~/blog/content/posts/forest      # straight into a blog repository

Both artifacts work at any time, not just right after a scan. The writeup is free-tier and PRO alike — a paid licence on a practice box is a pentester practising, so it behaves identically. On an audit workspace, PRO's report verbs build the deliverable kit instead: the tier decides the output, not the verb.

Nothing on either path prompts, so an unattended adscan ci run behaves like an attended one. It renders the audit report and writes no lab draft nobody asked for.

Troubleshooting

"Network interface not found"

bash
✗ Interface 'tun0' not found

Solution: Check available interfaces:

bash
ip addr show

"Domain not found"

bash
✗ No Active Directory domain found in range

Solutions:

  • Verify target IP range is correct
  • Ensure network connectivity to domain controllers
  • Check firewall rules (ports 88, 389, 445)

"Credentials invalid"

bash
✗ Authentication failed for user 'jdoe'

Solutions:

  • Verify username and password are correct
  • Check if account is locked or disabled
  • Ensure domain name is correct
  • Try NTLM hash instead of password

"Permission denied"

bash
✗ Insufficient privileges for operation

Solutions:

  • Use higher-privileged account
  • Check if operation requires Domain Admin rights
  • Review BloodHound for privilege escalation paths

Advanced Usage

Custom Wordlists

Use custom wordlist for password cracking:

bash
# ADscan prompts for wordlist selection during cracking
? Select wordlist:
  > rockyou.txt (default)
    custom_ad_wordlist.txt
    company_passwords.txt

Targeted Scanning

Scan specific domain controller:

bash
set hosts 10.10.10.1
start_unauth

Multi-Domain Environments

Scan multiple domains (requires separate workspaces):

bash
# Domain 1
workspace create domain1
start_auth domain1.local 10.10.10.1 user pass

# Domain 2
workspace create domain2
start_auth domain2.local 10.20.10.1 user pass

Service-Access Sweep Backends

When ADscan probes which hosts a credential can reach over SMB, WinRM, RDP, and MSSQL, it now uses its native async stack by default instead of shelling out to an external scanner:

  • SMB — native ADMIN$/C$ connection check (confirms local administrator access, the same signal a Pwn3d! line used to convey). Honors NTLM, Kerberos, SMB signing, AES-only KDCs, and cross-domain credentials automatically.
  • MSSQL — native in-process SQL login. A successful login confirms access; if the login is sysadmin, that is surfaced and recorded as administrative access.
  • WinRM / RDP — already native (PSRP and the native RDP probe).

The native backends are posture-aware (they adapt to detected hardening such as NTLM-disabled or channel-binding-required) and run with bounded concurrency so they scale safely across large host sets.

Tuning and fallback:

bash
# Concurrency (workers) per native sweep — clamped to 1-128, default 30
export ADSCAN_SMB_PROBE_WORKERS=30
export ADSCAN_MSSQL_PROBE_WORKERS=30

Every service ADscan sweeps (SMB, WinRM, RDP, MSSQL) runs on a native backend. There is no external-scanner fallback to select.

Next Steps

After completing a scan:

  1. View discovered credentials with creds show
  2. Select credentials for further enumeration with creds select <domain>
  3. Review and execute attack paths with attack_paths <domain> owned
  4. Inspect detected steps with attack_steps <domain>
  5. Analyze BloodHound data through the BloodHound UI (optional)
Share with your team lead
Forward a clean demo link to a lead who can approve a free team demo.
Find this useful?
Pass it to the next pentester running an AD engagement
Running 2+ AD engagements/year?
First PRO assessment free·Free in exchange for feedback
Automated PDF reports. Save ≥1 day per engagement.

ADscan — AD pentest automation for security consultants