refactor: centralize and enforce domain domination checks in orchestrator automation#323
Merged
Merged
Conversation
…modules **Added:** - Unit tests verifying that automation work selection skips dominated domains for: - Low-hanging credential work - Credential expansion and hash expansion - GPP SYSVOL collection - Pass-the-hash spray - Share spidering - Stall detection spray and LHF work - Tests for new domain domination logic and edge cases in state management **Changed:** - Refactored report fetching logic in ec2 Taskfile to transfer large reports in chunks and verify checksums for reliability - Updated multi-agent red team operation workflow to poll operation status and fetch reports only after completion, with improved status monitoring and error handling in Taskfile - Taskfile now defaults WAIT to true for multi-agent ops for safer automation - Refined ares-cli ops command to clarify `auto_report` is implied by `--follow` - Updated orchestrator automation modules (credential expansion, gpp_sysvol, pth_spray, shares, stall_detection) to skip work in domains marked as dominated - Improved hash expansion to only select hosts/DCs within the same forest/domain and to prefer resolved domain names - Enhanced pass-the-hash spray to enforce domain boundaries and filter out machine/krbtgt hashes and dominated domains - Refined share spider work selection to exclude shares in dominated domains - Updated stall detection logic to avoid unnecessary work in dominated domains - Monitoring: stale orchestrator tasks are now marked failed and completed in state, preventing resource leaks and improving reporting - Added `is_domain_dominated` method to state, handling NetBIOS and FQDN resolution, with tests **Removed:** - Removed legacy direct port-forward and Redis fetch logic from Taskfile in favor of operation-aware polling and report transfer - Removed deprecated manual domain inference in pass-the-hash spray logic
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #323 +/- ##
==========================================
+ Coverage 78.81% 78.83% +0.02%
==========================================
Files 439 439
Lines 125356 125591 +235
==========================================
+ Hits 98800 99013 +213
- Misses 26556 26578 +22
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key Changes:
prevent redundant work in already-dominated domains
is_domain_dominatedlogic in shared state for accurate,netbios-aware domain normalization
sysvol, and stall detection logic to skip dominated domains
relevant modules
Added:
Changed:
credential_access,credential_expansion,gpp_sysvol,pth_spray,shares,stall_detection)now call
state.is_domain_dominated()to skip work for dominated domainsmatch, and handle domain normalization more robustly
scheduled
is_domain_dominatedtoStateInnerwith netbios/FQDN handlingconsistently
including more robust polling and output handling
Removed:
automation modules, replaced with a centralized approach via shared state