Skip to content

refactor: remove localuser_spray automation and update domain naming to contoso.local#324

Merged
l50 merged 5 commits into
mainfrom
chore/localuser-spray-and-test-domain-cleanup
May 16, 2026
Merged

refactor: remove localuser_spray automation and update domain naming to contoso.local#324
l50 merged 5 commits into
mainfrom
chore/localuser-spray-and-test-domain-cleanup

Conversation

@l50
Copy link
Copy Markdown
Contributor

@l50 l50 commented May 16, 2026

Key Changes:

  • Removed the localuser_spray automation module and all related references
  • Standardized domain naming in code, tests, and documentation to use contoso.local
  • Improved NTDS dump hash extraction to correctly attribute Administrator hashes
  • Enhanced raise_child tool error detection for more accurate failure handling

Added:

  • EC2 reset and deployment workflow documentation - included detailed clean test
    cycle in README.md and AGENTS.md with explicit shell commands, variable
    definitions, and troubleshooting tips for file descriptor limits
  • Additional unit tests - covered new error-detection logic in
    privesc::delegation::raise_child and improved test coverage for
    hash/domain attribution edge cases

Changed:

  • Domain naming - replaced all instances of north.sevenkingdoms.local,
    sevenkingdoms.local, and similar with child.contoso.local or
    contoso.local across code, tests, and sample data for clarity and
    consistency
  • Documentation - updated AGENTS.md and README.md with new EC2 clean test cycle
    instructions, including required environment variables and shell notes
  • Hash extraction logic - improved is_well_known_local_sam and
    parse_secretsdump to ensure Administrator hashes from NTDS/domain dumps are
    properly attributed to the correct domain, fixing escalation path bugs
  • Trust automation - enhanced error handling in raise_child by inspecting
    stdout/stderr for Kerberos and Python exception markers, unmarking dedup keys
    on failure for reliable retry behavior
  • Test data and comments - updated examples, assertions, and comments throughout
    the codebase to use the new contoso.local naming convention

Removed:

  • Localuser credential spray automation - deleted localuser_spray.rs and all
    references in orchestrator task spawning, module imports, deduplication sets,
    and strategy weighting
  • Test script test.sh for EC2 deployment cycle (now replaced by new
    documentation)

l50 added 4 commits May 16, 2026 10:36
…ta to contoso.local

**Changed:**

- Updated test data across modules from "sevenkingdoms.local" and "example.com"
  to "contoso.local" and similar modern domain names for consistency and clarity
- Replaced test user/domain/hostnames in orchestrator, dedup, credential expansion,
  PTH spray, and domain probe with contoso.local, fabrikam.local, and child.contoso.local
- Updated documentation comments and user guidance strings to use contoso.local
  and related domains instead of placeholder or legacy examples
- Improved domain attribution logic in hash extraction to more accurately assign
  built-in accounts (e.g., Administrator) to domains when dump evidence is present
- Adjusted hash parsing logic and tests to ensure Administrator and other built-ins
  are attributed to the correct domain in both ares-cli and ares-tools

**Removed:**

- Removed the `localuser_spray` automation module, associated test cases, and
  all references to its deduplication set and strategy weights
- Eliminated `auto_localuser_spray` from automation spawner and public exports
- Deleted deduplication constant and set for localuser_spray in state management
- Removed localuser_spray weights from all orchestrator strategy profiles
- Cleared localuser_spray from dedup set arrays and related orchestrator tests
**Added:**

- Added detailed instructions and example commands for running a full clean test
  cycle on EC2, including environment setup, deployment, and Redis wipe to
  README.md and AGENTS.md
- Provided warnings about `ulimit` and zig linker limitations in documentation

**Removed:**

- Removed `test.sh` script as its functionality is now fully documented in
  markdown guides and is redundant
**Changed:**

- Expanded EC2 test cycle example to set and reuse shell variables for
  EC2_NAME, TARGET, and BLUE_ENABLED to improve clarity and reduce repetition
- Moved shell setup commands (ulimit, export S3_BUCKET) out of comments and
  into executable lines for better usability
- Updated all task command examples to reference shell variables instead of
  hardcoded values, making instructions more adaptable
…for retry

**Added:**

- Added detection of common failure markers in raise_child output even when exit
  status is zero; raise_child now marks result as failed if such markers are found
- Added unit tests to verify detection of SessionError and KDC_ERR_ in
  raise_child output, as well as correct success handling without such markers

**Changed:**

- Updated auto_trust_follow to clear deduplication state and allow retry when
  raise_child reports error or fails to dispatch, improving reliability of
  trust-follow logic
@dreadnode-renovate-bot dreadnode-renovate-bot Bot added the area/docs Changes made to project documentation label May 16, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

❌ Patch coverage is 90.72165% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.85%. Comparing base (1f2d24c) to head (f56b7b9).

Files with missing lines Patch % Lines
ares-cli/src/orchestrator/automation/trust.rs 0.00% 14 Missing ⚠️
ares-tools/src/privesc/delegation.rs 96.22% 2 Missing ⚠️
ares-cli/src/dedup/domains.rs 96.00% 1 Missing ⚠️
...s-cli/src/orchestrator/output_extraction/hashes.rs 96.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #324      +/-   ##
==========================================
+ Coverage   78.83%   78.85%   +0.01%     
==========================================
  Files         439      438       -1     
  Lines      125591   125532      -59     
==========================================
- Hits        99012    98983      -29     
+ Misses      26579    26549      -30     
Files with missing lines Coverage Δ
ares-cli/src/dedup/tests.rs 100.00% <100.00%> (ø)
...s-cli/src/orchestrator/automation/acl_discovery.rs 81.94% <ø> (ø)
...rc/orchestrator/automation/credential_expansion.rs 80.29% <100.00%> (-0.02%) ⬇️
...i/src/orchestrator/automation/cross_forest_enum.rs 85.42% <ø> (ø)
.../src/orchestrator/automation/foreign_group_enum.rs 84.87% <ø> (ø)
...i/src/orchestrator/automation/group_enumeration.rs 78.85% <ø> (ø)
ares-cli/src/orchestrator/automation/mod.rs 100.00% <ø> (ø)
ares-cli/src/orchestrator/automation/pth_spray.rs 93.24% <100.00%> (ø)
ares-cli/src/orchestrator/automation_spawner.rs 0.00% <ø> (ø)
ares-cli/src/orchestrator/mod.rs 0.00% <ø> (ø)
... and 13 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

**Changed:**

- Reformatted test code to reduce unnecessary line breaks and improve code
  readability in test modules for credential_expansion.rs, pth_spray.rs,
  inner.rs, and publishing/credentials.rs
- Updated multi-line function calls and chained method calls to use more
  concise, consistent formatting in test setups
@l50 l50 merged commit 3374f01 into main May 16, 2026
12 checks passed
@l50 l50 deleted the chore/localuser-spray-and-test-domain-cleanup branch May 16, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Changes made to project documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant