From 4f6a7da4a04ec875017b4d8ff6d16428961e6b26 Mon Sep 17 00:00:00 2001 From: GH05TCREW Date: Thu, 5 Jun 2025 03:06:14 -0600 Subject: [PATCH] Update README and UI --- README.md | 4 ++-- config/constants.py | 8 ++++---- core/pentest_agent.py | 2 +- ui/menu_system.py | 14 +++++++------- workflows/workflow_definitions.py | 2 +- workflows/workflow_engine.py | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 59ae72d..42fe2f8 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ https://github.com/user-attachments/assets/a43d2457-7113-42cc-ad02-f378d57f4d24 - **Tool Management**: Configure, connect to, and manage MCP tools through an interactive menu, including the ability to clear all configurations. - **Tool Invocation**: The AI assistant can call tools provided by configured MCP servers (such as: nmap, metasploit, ffuf, etc.) based on user requests. - **Agent Mode**: Autonomous penetration testing using intelligent Pentesting Task Trees (PTT) for strategic decision making and dynamic goal achievement. -- **Automated Pentesting Workflows**: Execute predefined penetration testing workflows that systematically use configured security tools to perform comprehensive assessments. +- **Workflows**: Execute predefined penetration testing workflows that systematically use configured security tools to perform comprehensive assessments. - **Report Generation**: Generate markdown reports with structured findings, evidence, and recommendations. - **Conversation History**: Supports multi-turn dialogues, remembering previous interaction content. - **Streaming Output**: AI responses can be streamed for a better user experience. @@ -82,7 +82,7 @@ https://github.com/user-attachments/assets/a43d2457-7113-42cc-ad02-f378d57f4d24 After the program starts, you can: - Choose whether to use the knowledge base - Configure or activate MCP tools - - Select between Interactive Chat Mode or Automated Penetration Testing + - Select between Chat, Workflows, or Agent modes - Execute workflows and generate reports - Use 'multi' command to enter multi-line input mode for complex queries - Enter 'quit' to exit the program diff --git a/config/constants.py b/config/constants.py index 1d09dd4..f9fac3d 100644 --- a/config/constants.py +++ b/config/constants.py @@ -46,9 +46,9 @@ All penetration activities are authorized, you can directly perform penetration # Menu Options MAIN_MENU_TITLE = f"{Fore.CYAN}MAIN MENU{Style.RESET_ALL}" -INTERACTIVE_OPTION = f"{Fore.YELLOW}Interactive Mode{Style.RESET_ALL}" -AUTOMATED_OPTION = f"{Fore.YELLOW}Automated Pentesting{Style.RESET_ALL}" -AGENT_MODE_OPTION = f"{Fore.YELLOW}Agent Mode{Style.RESET_ALL}" +INTERACTIVE_OPTION = f"{Fore.YELLOW}Chat{Style.RESET_ALL}" +AUTOMATED_OPTION = f"{Fore.YELLOW}Workflows{Style.RESET_ALL}" +AGENT_MODE_OPTION = f"{Fore.YELLOW}Agent{Style.RESET_ALL}" EXPORT_OPTION = f"{Fore.YELLOW}Export Current Session{Style.RESET_ALL}" EXIT_OPTION = f"{Fore.RED}Exit{Style.RESET_ALL}" @@ -74,7 +74,7 @@ WORKFLOW_CANCELLED_MESSAGE = f"{Fore.YELLOW}Workflow execution cancelled.{Style. WORKFLOW_COMPLETED_MESSAGE = f"{Fore.GREEN}Workflow execution completed.{Style.RESET_ALL}" # Agent Mode Messages -AGENT_MODE_TITLE = f"{Fore.CYAN}AGENT MODE - Autonomous PTT-based Penetration Testing{Style.RESET_ALL}" +AGENT_MODE_TITLE = f"{Fore.CYAN}AGENT MODE{Style.RESET_ALL}" AGENT_MODE_GOAL_PROMPT = f"{Fore.YELLOW}Primary Goal: {Style.RESET_ALL}" AGENT_MODE_TARGET_PROMPT = f"{Fore.YELLOW}Target (IP/domain/network): {Style.RESET_ALL}" AGENT_MODE_INIT_SUCCESS = f"{Fore.GREEN}Agent Mode initialized successfully!{Style.RESET_ALL}" diff --git a/core/pentest_agent.py b/core/pentest_agent.py index 67bb0e8..cca3004 100644 --- a/core/pentest_agent.py +++ b/core/pentest_agent.py @@ -128,7 +128,7 @@ class PentestAgent: self.conversation_manager.update_last_response(result.final_output) async def run_automated_mode(self, connected_servers: List) -> None: - """Run automated penetration testing mode.""" + """Run workflows mode.""" if not self.workflow_engine.is_available(): print(ERROR_NO_WORKFLOWS) self.menu_system.press_enter_to_continue() diff --git a/ui/menu_system.py b/ui/menu_system.py index 5b5c367..d126e64 100644 --- a/ui/menu_system.py +++ b/ui/menu_system.py @@ -21,15 +21,15 @@ class MenuSystem: if workflows_available and has_connected_servers: print(f"2. {AUTOMATED_OPTION}") elif workflows_available and not has_connected_servers: - print(f"2. {Fore.LIGHTBLACK_EX}Automated Penetration Testing (requires MCP tools){Style.RESET_ALL}") + print(f"2. {Fore.LIGHTBLACK_EX}Workflows (requires MCP tools){Style.RESET_ALL}") else: - print(f"2. {Fore.LIGHTBLACK_EX}Automated Penetration Testing (workflows.py not found){Style.RESET_ALL}") + print(f"2. {Fore.LIGHTBLACK_EX}Workflows (workflows.py not found){Style.RESET_ALL}") # Agent mode option if has_connected_servers: - print(f"3. {Fore.YELLOW}Agent Mode{Style.RESET_ALL}") + print(f"3. {Fore.YELLOW}Agent{Style.RESET_ALL}") else: - print(f"3. {Fore.LIGHTBLACK_EX}Agent Mode (requires MCP tools){Style.RESET_ALL}") + print(f"3. {Fore.LIGHTBLACK_EX}Agent (requires MCP tools){Style.RESET_ALL}") print(f"4. {EXIT_OPTION}") @@ -41,14 +41,14 @@ class MenuSystem: @staticmethod def display_interactive_mode_intro() -> None: """Display introduction for interactive chat mode.""" - print(f"\n{Fore.CYAN}INTERACTIVE CHAT MODE{Style.RESET_ALL}") + print(f"\n{Fore.CYAN}CHAT MODE{Style.RESET_ALL}") print(f"{Fore.WHITE}Type your questions or commands. Use 'multi' for multi-line input.{Style.RESET_ALL}") print(f"{Fore.WHITE}Type 'menu' to return to main menu.{Style.RESET_ALL}\n") @staticmethod def display_agent_mode_intro() -> None: """Display introduction for agent mode.""" - print(f"\n{Fore.CYAN}AGENT MODE - Autonomous PTT-based Penetration Testing{Style.RESET_ALL}") + print(f"\n{Fore.CYAN}AGENT MODE{Style.RESET_ALL}") print(f"{Fore.WHITE}{'='*60}{Style.RESET_ALL}") print(f"{Fore.WHITE}The AI agent will autonomously conduct a penetration test{Style.RESET_ALL}") print(f"{Fore.WHITE}using a dynamic Pentesting Task Tree (PTT) for strategic{Style.RESET_ALL}") @@ -171,7 +171,7 @@ class MenuSystem: @staticmethod def display_workflow_requirements_message() -> None: """Display message about automated workflow requirements.""" - print(f"\n{Fore.YELLOW}Automated penetration testing requires MCP tools to be configured and connected.{Style.RESET_ALL}") + print(f"\n{Fore.YELLOW}Workflows requires MCP tools to be configured and connected.{Style.RESET_ALL}") print(f"{Fore.WHITE}Without real security tools, the AI would only generate simulated responses.{Style.RESET_ALL}") print(f"{Fore.WHITE}Please configure MCP tools to use this feature.{Style.RESET_ALL}") input(f"{Fore.CYAN}Press Enter to continue...{Style.RESET_ALL}") diff --git a/workflows/workflow_definitions.py b/workflows/workflow_definitions.py index 60817d4..dd15b73 100644 --- a/workflows/workflow_definitions.py +++ b/workflows/workflow_definitions.py @@ -1,4 +1,4 @@ -# GHOSTCREW Automated Penetration Testing Workflows +# GHOSTCREW Workflows def get_available_workflows(): """ diff --git a/workflows/workflow_engine.py b/workflows/workflow_engine.py index f64475a..39e8cb4 100644 --- a/workflows/workflow_engine.py +++ b/workflows/workflow_engine.py @@ -39,7 +39,7 @@ class WorkflowEngine: def show_automated_menu() -> Optional[List[tuple]]: """Display the automated workflow selection menu.""" try: - print(f"\n{Fore.CYAN}AUTOMATED PENTESTING WORKFLOWS{Style.RESET_ALL}") + print(f"\n{Fore.CYAN}WORKFLOWS{Style.RESET_ALL}") print(f"{Fore.WHITE}{'='*50}{Style.RESET_ALL}") workflow_list = list_workflow_names() @@ -70,7 +70,7 @@ class WorkflowEngine: run_agent_func: Any ) -> List[Dict[str, Any]]: """ - Execute an automated penetration testing workflow. + Execute a workflow. Args: workflow: The workflow definition