Add Active Directory group membership to the audit #1
Loading…
Reference in a new issue
No description provided.
Delete branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds Active Directory group membership to the account-usage audit, in response to a
user request: permissions are often granted to AD groups rather than directly to an
account, so scanning for the account alone can miss access granted through a group it
belongs to. Opt-in via
--include-groups.What it does
tokenGroupsattribute (nested groups andthe primary group included), translating each SID to
DOMAIN\group. Broad well-knowngroups (Domain Users, Everyone, Authenticated Users, BUILTIN\Users, ...) are excluded
by default;
--include-wellknown-groupsoverrides. SIDs that cannot be resolved (forexample from a trusted-but-unreachable domain) are recorded by SID rather than dropped.
AdGroupMembershipfindings, keyed by subject + group.every scanner also flags artifacts that reference the group (SQL group logins, SSRS
role assignments, configuration files, local groups). Group-derived findings are
labelled with a
MatchedViapath (e.g.CONTOSO\hannah is a member of CONTOSO\sql-admins) so direct references and group-derived access can be told apart.localgroupscanner: reports direct membership in machine-local groups (forexample the local Administrators group) using the WinNT provider - deliberately not
Win32_GroupUser(WMI), which is very slow on domain-joined machines.Schema
MatchedViacolumn toFinding(idempotent migration) and an@MatchedViaparameter tousp_UpsertFinding;vUnresolvedFindingsexposes it.upgraded automatically fails fast with a clear message.
MatchedVia.Deploy mode
The orchestrator resolves groups once and passes them to each agent via an internal
--group-formoption, so agents match the same groups without re-querying AD (agents donot re-report the memberships themselves).
Notes and scope
reported for completeness of the access-surface picture, not as a rotation blocker.
a dedicated NTFS / share / registry ACL and User-Rights-Assignment scan.
Testing
dropped): schema migration and
@MatchedViapreflight, membership rows keyed bysubject, and the local-group scanner (direct Administrators / docker-users membership,
sub-second) all confirmed. A rubber-duck review was completed and its findings
addressed (membership row identity, local-vs-domain name disambiguation, cancellation
durability of membership rows, and the preflight schema-version check).
Assumptions
to the account object (the tool already relies on this for name-form resolution).
traversal is explicitly out of scope for this change (tracked as follow-up).