feat: enhance red team automation with exploitation toolsets and forced exploitation logic#35
Merged
l50 merged 3 commits intoJan 12, 2026
Conversation
…irst workflow **Added:** - Introduced new exploitation toolsets: CoercionTools (petitpotam, coercer), MSSQLTools (mssqlclient), ACLExploitTools (pywhisker, bloodyAD), CVEExploitTools (noPac, PrintNightmare), TrustAttackTools (raiseChild), and LateralMovementTools (evil-winrm, psexec) to the red team arsenal - Implemented vulnerability_discovery_hook to automatically inject exploit guidance when critical vulnerabilities or exploitation paths are detected during tool execution - Added detailed error recovery and attack fallback chain guidance to agent system instructions to ensure persistent exploitation attempts **Changed:** - Refactored BloodHoundTools and CertipyTools to return structured JSON output, including actionable exploitation steps, discovered attack paths, and prioritized next actions for automation - Updated tool import and export structure to expose all new toolsets in the red team tools module - Enhanced create_redteam_agent to register and initialize all new exploitation toolsets, ensuring agent can leverage the full range of attacks in automated workflows - Expanded agent instructions to explicitly forbid summarization or completion until all discovered vulnerabilities and attack paths are exploited, establishing exploitation-first operational logic - Improved docstrings and usage examples for exploitation tool methods to guide correct tool usage and chaining **Removed:** - Removed outdated usage examples and replaced with updated, more concise demonstrations matching new toolsets and output structures
CAP-838 Fix Red Agent: Behavioral Gaps & Missing Tool Wrappers
Description: Objective: Ensure the Red Agent reliably exploits all discovered attack paths by introducing structured output parsing, proactive exploitation triggers, anti-summarization directives, and wrappers for critical exploitation tools. Scope of Work:
Dependencies:
Acceptance Criteria:
Additional Notes:
|
**Added:** - Added test class for `CoercionTools` covering initialization, state management, PetitPotam (authenticated/unauthenticated/failure), and Coercer scenarios - Added test class for `MSSQLTools` including login, xp_cmdshell, and exception handling tests - Added test class for `ACLExploitTools` covering pywhisker, bloodyAD group member addition, password reset, and exception paths - Added test class for `CVEExploitTools` testing noPac and PrintNightmare exploitation and error handling - Added test class for `TrustAttackTools` including trust escalation, target domain handling, and failure cases - Added test class for `LateralMovementTools` for evil-winrm (password/hash/no creds/exception), psexec (password/hash/exception), and state management - All new tests mock remote execution and verify both positive and negative paths - Increased coverage for error handling and credential edge cases in network tools
…eminders **Added:** - Implemented tracking of discovered and exploited vulnerabilities using in-memory state, with helpers for registering new discoveries and exploitation attempts - Added `track_vulnerability_discoveries` async hook to monitor tool results and update vulnerability state based on tool output patterns - Introduced `periodic_priority_check` async hook to periodically remind the agent about unexploited vulnerabilities and inject warnings every N steps - Comprehensive unit tests for discovery, exploitation, and periodic reminder logic in the red team agent factory, including edge cases and idempotency **Changed:** - Extended `reset_event_tracking` to clear vulnerability tracking state for clean agent runs - Updated agent creation to register the new hooks for vulnerability tracking and periodic reminders **Removed:** - No removals
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:
Added:
ares.tools.red.__init__.pyto register all new toolsetsChanged:
create_redteam_agentnow includes all new exploitation toolsets and registers the vulnerability discovery hook to enforce exploitation-first workflowsRemoved: