[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-mrwadams--attackgen":3,"tool-mrwadams--attackgen":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160784,2,"2026-04-19T11:32:54",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":76,"owner_website":76,"owner_url":77,"languages":78,"stars":87,"forks":88,"last_commit_at":89,"license":90,"difficulty_score":32,"env_os":91,"env_gpu":92,"env_ram":93,"env_deps":94,"category_tags":103,"github_topics":76,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":104,"updated_at":105,"faqs":106,"releases":136},9847,"mrwadams\u002Fattackgen","attackgen","AttackGen is a cybersecurity incident response testing tool that leverages the power of large language models and the comprehensive MITRE ATT&CK framework. The tool generates tailored incident response scenarios based on user-selected threat actor groups and your organisation's details.","AttackGen 是一款专为网络安全应急响应设计的智能测试工具。它巧妙结合了大型语言模型的生成能力与权威的 MITRE ATT&CK 及 ATLAS 框架，能够根据用户指定的威胁组织、行业背景及企业规模，自动生成高度定制的应急演练场景。\n\n该工具主要解决了传统安全演练中场景构建耗时久、针对性不强以及难以覆盖新兴 AI 威胁的痛点。通过 AttackGen，安全团队可以快速获得包含具体攻击技战术细节的实战化剧本，从而高效检验和提升组织的应急响应能力。\n\n它非常适合网络安全分析师、红蓝对抗团队成员、安全研究人员以及负责制定应急预案的企业安全负责人使用。无论是针对传统企业网络、工业控制系统（ICS），还是前沿的人工智能系统，AttackGen 都能提供专业支持。\n\n其独特亮点在于全面支持最新的 MITRE ATLAS 框架，内置了 45 个真实的 AI 攻击案例（如提示词注入、模型窃取等）和专用模板，填补了 AI 安全演练的空白。此外，AttackGen 兼容多种主流大模型接口，提供交互式助手辅助调整场景，并支持 Docker 一键部署，让复杂的安全测试变得灵活且易于上手。","# AttackGen\n\nAttackGen is a cybersecurity incident response testing tool that leverages the power of large language models and the comprehensive MITRE ATT&CK and ATLAS frameworks. The tool generates tailored incident response scenarios based on user-selected threat actor groups, AI attack case studies, and your organisation's details.\n\n## Table of Contents\n- [Star the Repo](#star-the-repo)\n- [Features](#features)\n- [Releases](#releases)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Data Setup](#data-setup)\n- [Running AttackGen](#running-attackgen)\n- [Usage](#usage)\n- [Security Best Practices](#security-best-practices)\n- [Contributing](#contributing)\n- [Licence](#licence)\n\n## Star the Repo\nIf you find AttackGen useful, please consider starring the repository on GitHub. This helps more people discover the tool. Your support is greatly appreciated! ⭐\n\n\n## Features\n\n- Generates unique incident response scenarios based on chosen threat actor groups or ATLAS case studies.\n- Allows you to specify your organisation's size and industry for a tailored scenario.\n- Supports MITRE ATT&CK Enterprise, ICS (Industrial Control Systems), and ATLAS (Adversarial Threat Landscape for AI Systems) frameworks.\n- Displays a detailed list of techniques used by the selected threat actor group or case study.\n- Create custom scenarios based on a selection of ATT&CK or ATLAS techniques.\n- Use scenario templates to quickly generate custom scenarios based on common types of cyber incidents, including AI\u002FML-specific attack patterns.\n- AttackGen Assistant - a chat interface for updating and\u002For asking questions about generated scenarios.\n- Capture user feedback on the quality of the generated scenarios.\n- Downloadable scenarios in Markdown format.\n- Use the OpenAI API, Anthropic API (Claude models), Azure OpenAI Service, Google AI API, Mistral API, Groq API, locally hosted Ollama models, or custom OpenAI-compatible API endpoints to generate incident response scenarios.\n- Available as a Docker container image for easy deployment.\n- Optional integration with [LangSmith](https:\u002F\u002Fdocs.smith.langchain.com\u002F) for powerful debugging, testing, and monitoring of model performance.\n- Secure credential management using .env file for API keys and secrets.\n\n![AttackGen Screenshot](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmrwadams_attackgen_readme_2ec4d9fbacaa.png)\n\n## Releases\n\n### v0.11\n| What's new? | Why is it useful? |\n| ----------- | ----------------- |\n| MITRE ATLAS Framework Support | - AI\u002FML Threat Coverage: AttackGen now supports the MITRE ATLAS (Adversarial Threat Landscape for AI Systems) framework, enabling generation of incident response scenarios for threats targeting AI and machine learning systems.\u003Cbr>\u003Cbr>- Case Study-Based Scenarios: Generate scenarios based on 45 documented real-world AI attack case studies, including 14 actual incidents and 31 research exercises covering attacks like prompt injection, model extraction, and data poisoning.\u003Cbr>\u003Cbr>- 147 ATLAS Techniques: Access the full ATLAS technique library covering 16 AI-specific tactics including AI Model Access, AI Attack Staging, and traditional attack phases adapted for AI systems.\u003Cbr>\u003Cbr>- AI-Specific Templates: Six new custom scenario templates for common AI\u002FML attacks: Model Evasion, Data Poisoning, Model Extraction, Prompt Injection, LLM Jailbreak, and AI Supply Chain attacks. |\n| Updated MITRE ATT&CK Data to v18.1 | - Latest Threat Intelligence: AttackGen now uses MITRE ATT&CK v18.1 data, ensuring generated scenarios reflect the most current tactics, techniques, and procedures used by threat actors.\u003Cbr>\u003Cbr>- Expanded Enterprise Coverage: The Enterprise threat groups list has grown from 150+ to 187 groups, including newly tracked actors.\u003Cbr>\u003Cbr>- Expanded ICS Coverage: The ICS threat groups list has grown from 7 to 16 groups, providing better coverage for industrial control systems scenarios. |\n| Updated LLM Model Support | - OpenAI: Added GPT-5.2 and GPT-5.2 Pro models; streamlined model list by removing deprecated o-series reasoning models.\u003Cbr>\u003Cbr>- Anthropic: Updated to Claude 4.5 family with Sonnet 4.5, Haiku 4.5, and Opus 4.5.\u003Cbr>\u003Cbr>- Google AI: Added Gemini 3 Pro and Flash preview models; updated Gemini 2.5 options.\u003Cbr>\u003Cbr>- Groq: Added GPT-OSS 120B and 20B models for high-performance inference.\u003Cbr>\u003Cbr>- Mistral: Updated to dated model versions (Large 2512, Medium 2508, Small 2506); added Ministral 14B. |\n| Bug Fixes | - Fixed Google AI Response Handling: Updated response parsing to handle structured content format returned by newer Gemini models, ensuring scenario text is properly extracted and displayed.\u003Cbr>\u003Cbr>- Fixed ICS Matrix Error Messages: Error messages now correctly display \"ICS ATT&CK\" instead of \"Enterprise ATT&CK\" when using the ICS matrix.\u003Cbr>\u003Cbr>- Improved Empty Technique Handling: Added graceful handling when a threat group has no associated techniques, preventing secondary errors. |\n\n### v0.10.1\n| What's new? | Why is it useful? |\n| ----------- | ----------------- |\n| LangChain v1.0 Compatibility | - Fixed Breaking Import Changes: Updated all imports from deprecated `langchain.prompts.chat` to `langchain_core.prompts`, ensuring compatibility with LangChain v1.0 and preventing `ModuleNotFoundError` issues. This maintains stability as the LangChain ecosystem evolves. |\n| Comprehensive Security Infrastructure | - Automated Security Scanning: Introduced GitHub Actions workflows for continuous security monitoring using Bandit (Python code analysis), CodeQL (vulnerability detection), pip-audit (dependency scanning), Safety (known vulnerabilities), Gitleaks (secrets detection), and Trivy (Docker image scanning).\u003Cbr>\u003Cbr>- Security Best Practices Documentation: Added comprehensive SECURITY.md covering supported versions, vulnerability reporting, API key management, data privacy considerations, and deployment security guidance.\u003Cbr>\u003Cbr>- Enhanced README Security Section: Expanded security guidance with clear do's and don'ts for API key protection, data privacy considerations, and responsible deployment practices. |\n| Docker Improvements | - Enhanced Security: Updated Dockerfile to run as non-root user, improving container security posture.\u003Cbr>\u003Cbr>- Docker Compose Support: Added docker-compose.yml for streamlined multi-service deployment and easier local development setup.\u003Cbr>\u003Cbr>- Better Build Optimization: Enhanced .dockerignore to reduce image size and prevent sensitive files from being included in container images.\u003Cbr>\u003Cbr>- Comprehensive Configuration Template: Updated .env.example with all supported API keys (OpenAI, Anthropic, Azure, Google, Mistral, Groq) for easier initial setup. |\n| Bug Fixes | - Ollama API Timeout: Added timeout configuration to Ollama API requests to prevent hanging connections.\u003Cbr>\u003Cbr>- Safety CLI Updates: Updated from deprecated `safety check` command to new `safety scan` command, ensuring continued security scanning functionality.\u003Cbr>\u003Cbr>- Bandit Configuration: Corrected Bandit security scanning configuration for more accurate Python code analysis. |\n\n### v0.10\n| What's new? | Why is it useful? |\n| ----------- | ----------------- |\n| OpenAI Responses API Integration | - Next-Generation API: AttackGen now uses OpenAI's latest Responses API for all supported models, providing a unified and enhanced interface. |\n| Latest Frontier Model Support | - GPT-5 Integration: Added support for OpenAI's latest GPT-5 model series including gpt-5, gpt-5-mini, and gpt-5-nano, providing access to the most advanced AI capabilities for scenario generation.\u003Cbr>\u003Cbr>- Claude Sonnet 4.5: Added support for Anthropic's latest Claude Sonnet 4.5 (claude-sonnet-4-5-20250929) model, along with updated Claude model versions including Claude Opus 4.1 (claude-opus-4-1-20250805). |\n| Bug Fixes and Improvements | - Fixed Streamlit Deprecation Warning: Replaced deprecated `use_container_width` parameter with the new `width` parameter to ensure compatibility with future Streamlit versions.\u003Cbr>\u003Cbr>- Enhanced Documentation: Updated CLAUDE.md with comprehensive guidance for future development work and added detailed architecture information. |\n\n### v0.9\n| What's new? | Why is it useful? |\n| ----------- | ----------------- |\n| Expanded Model Support | - Latest OpenAI Reasoning Models: AttackGen now supports OpenAI's newest reasoning models including o4-mini (the latest reasoning model), o3\u002Fo3-mini, and o1-pro (enhanced reasoning capabilities). These models excel at complex scenario generation requiring deep logical thinking.\u003Cbr>\u003Cbr>- GPT-4.1 Series: Added support for the GPT-4.1 series models (gpt-4.1, gpt-4.1-mini, and gpt-4.1-nano), offering the latest improvements in general AI capabilities with lighter alternatives for cost-sensitive use cases.\u003Cbr>\u003Cbr>- Anthropic Claude Models: Added comprehensive support for Anthropic's Claude models including claude-opus-4-20250514, claude-sonnet-4-20250514, claude-3-7-sonnet-latest, and claude-3-5-haiku-latest. These models offer excellent performance for generating detailed and contextually aware incident response scenarios with strong reasoning capabilities.\u003Cbr>\u003Cbr>- Updated Google AI Models: Refreshed the Google AI model selection to include the latest Gemini 2.5 preview models (gemini-2.5-flash-preview-05-20 and gemini-2.5-pro-preview-05-06) alongside Gemini 2.0 models, providing access to the most recent improvements in Google's AI technology.\u003Cbr>\u003Cbr>- Improved Model Organization: Reorganized model selection dropdowns to prioritize newer models and updated descriptions to clearly distinguish between different model types and capabilities. |\n| Enhanced Technique Selection Logic | - More Robust Group Handling: Fixed an issue where empty threat actor groups could cause errors during technique selection. The tool now properly handles empty groups by returning an empty DataFrame, ensuring stable operation even with limited threat actor data.\u003Cbr>\u003Cbr>- Phase Name Preservation: Improved the technique selection process to properly include 'Phase Name' in the output, maintaining the kill chain phase information throughout the scenario generation process. This ensures generated scenarios maintain proper context about which phase of an attack each technique belongs to. |\n| Development Environment Improvements | - Enhanced .gitignore: Added support for `.venv` virtual environment directories in addition to `venv`, accommodating different developer preferences and Python environment management tools.\u003Cbr>\u003Cbr>- Code Cleanup: Removed unused imports across scenario generation scripts, improving code maintainability and reducing potential confusion. |\n\n### v0.8\n| What's new? | Why is it useful? |\n| ----------- | ----------------- |\n| Custom OpenAI-Compatible API Endpoints | - Increased Flexibility: AttackGen now supports custom OpenAI-compatible API endpoints like Anyscale, Together AI, or any self-hosted compatible API. This feature allows users to leverage a wider range of models and services beyond the officially supported providers.\u003Cbr>\u003Cbr>- Self-Hosting Support: Organizations with their own deployments of OpenAI-compatible models can now connect AttackGen directly to these endpoints.\u003Cbr>\u003Cbr>- Control Over Model Selection: Users can specify the base URL, model name, and API key for any compatible service, providing greater control over which models and endpoints are used for scenario generation. |\n| Updated Model Selection | - Access to Latest Models: The OpenAI model selection now includes the new GPT-4.1 series models (gpt-4.1, gpt-4.1-mini, gpt-4.1-nano), offering improved performance in coding, instruction following, and long context tasks.\u003Cbr>\u003Cbr>- Expanded Gemini Support: Added support for the latest Gemini 2.5 Pro Preview, 2.0 Flash, and 2.0 Flash Lite models. |\n\n### v0.7\n| What's new? | Why is it useful? |\n| ----------- | ----------------- |\n| Groq API Integration | - Enhanced Performance: AttackGen now supports Groq's high-performance API, providing access to models like llama-3.3-70b-versatile and deepseek-r1-distill-llama-70b. This integration offers fast inference times while maintaining high-quality scenario generation.\u003Cbr>\u003Cbr>- Improved Model Output Display: For models like DeepSeek that provide reasoning alongside their output, AttackGen now displays this reasoning in a collapsible expander widget. This allows users to view the model's thought process when desired while keeping the main scenario output clean and focused. |\n| Updated OpenAI Model Support | - Latest Models: AttackGen now supports OpenAI's latest o3 reasoning model and the GA (general availability) version of the o1 model, replacing the previous preview version. These updates provide access to more stable and improved models for scenario generation. |\n\n\u003Cdetails>\n  \u003Csummary>Click to view release notes for earlier versions.\u003C\u002Fsummary>\n\n### v0.6\n| What's new? | Why is it useful? |\n| ----------- | ----------------- |\n| Support for OpenAI's new 'reasoning' models | - Enhanced Scenario Generation: AttackGen now supports OpenAI's new 'reasoning' models (o1-preview and o1-mini), enabling the generation of highly detailed and nuanced incident response scenarios. These models offer improved coherence and depth in scenario creation. |\n| MITRE ATT&CK ICS matrix support | - Expanded Scope: AttackGen now supports generating incident response testing scenarios using the MITRE ATT&CK ICS (Industrial Control Systems) matrix, in addition to the Enterprise matrix. This allows users to create scenarios tailored to industrial and critical infrastructure environments. |\n| Updated ATT&CK source data to v15.1 | - Latest Threat Intelligence: The tool now uses the most up-to-date MITRE ATT&CK data (v15.1), ensuring that generated scenarios reflect the latest known tactics, techniques, and procedures used by threat actors. |\n| Updated threat actor groups data | - Comprehensive Coverage: The groups data has been updated to include the latest groups tracked in MITRE ATT&CK, such as Scattered Spider. This ensures that users can generate scenarios based on the most current threat actor information available. |\n| Loading API keys \u002F secrets from a .env file | - Enhanced Security: Users can now store their API keys and other sensitive information in a .env file, improving security and making it easier to manage credentials across different environments. |\n\n### v0.5.2\n| What's new? | Why is it useful? |\n| ----------- | ---------------- |\n| GPT-4o mini Model Support | - Expanded Model Options: AttackGen now supports the use of OpenAI's GPT-4o mini model. GPT4-o mini is a highly cost-efficient small model. |\n| Updated model choices for Google AI API | - Expanded Model Options: AttackGen now supports the stable and preview versions of Gemini 1.5 Pro. | \n\n### v0.5.1\n| What's new? | Why is it useful? |\n| ----------- | ---------------- |\n| GPT-4o Model Support | - Enhanced Model Options: AttackGen now supports the use of OpenAI's GPT-4o model. GPT4-o is OpenAI's leading model, able to generate scenarios twice as fast as GPT-4 for half the cost. |\n\n### v0.5\n| What's new? | Why is it useful? |\n| ----------- | ---------------- |\n| AttackGen Assistant | - Iterative Scenario Refinement: The new chat interface allows users to interact with their generated incident response scenarios, making it easy to update and ask questions about the scenario without having to regenerate it from scratch. This feature enables an iterative approach to scenario development, where users can refine and improve their scenarios based on the AI assistant's responses.\u003Cbr>\u003Cbr>- Contextual Assistance: The AI assistant responds to user queries based on the context of the generated scenario and the conversation history. This ensures that the assistant's responses are relevant and helpful in refining the scenario. |\n| Quick Start Templates for Custom Scenarios | - Quick Scenario Generation: Users can now quickly generate custom incident response scenarios based on predefined templates for common types of cyber incidents, such as phishing attacks, ransomware attacks, malware infections, and insider threats. This feature makes it easier to create realistic scenarios without having to select individual ATT&CK techniques.\u003Cbr>\u003Cbr>- Streamlined Workflow: The template selection is integrated seamlessly into the custom scenario generation process. Users can choose a template, which automatically populates the relevant ATT&CK techniques, and then further customize the scenario if needed. |\n| Google AI API Integration  | - Expanded Model Options: AttackGen now supports the use of Google's Gemini models for generating incident response scenarios. This integration expands the range of high-quality models available to users, allowing them to leverage Google's AI capabilities for creating realistic and diverse scenarios. |\n\n### v0.4\n\n| What's new? | Why is it useful? |\n| ----------- | ---------------- |\n| Mistral API Integration | - Alternative Model Provider: Users can now leverage the Mistral AI models to generate incident response scenarios. This integration provides an alternative to the OpenAI and Azure OpenAI Service models, allowing users to explore and compare the performance of different language models for their specific use case. |\n| Local Model Support using Ollama | - Local Model Hosting: AttackGen now supports the use of locally hosted LLMs via an integration with Ollama. This feature is particularly useful for organisations with strict data privacy requirements or those who prefer to keep their data on-premises. Please note that this feature is not available for users of the AttackGen version hosted on Streamlit Community Cloud at https:\u002F\u002Fattackgen.streamlit.app |\n| Optional LangSmith Integration | - Improved Flexibility: The integration with LangSmith is now optional. If no LangChain API key is provided, users will see an informative message indicating that the run won't be logged by LangSmith, rather than an error being thrown. This change improves the overall user experience and allows users to continue using AttackGen without the need for LangSmith. |\n| Various Bug Fixes and Improvements | - Enhanced User Experience: This release includes several bug fixes and improvements to the user interface, making AttackGen more user-friendly and robust. |\n\n### v0.3\n\n| What's new? | Why is it useful? |\n| ----------- | ---------------- |\n| Azure OpenAI Service Integration | - Enhanced Integration: Users can now choose to utilise OpenAI models deployed on the Azure OpenAI Service, in addition to the standard OpenAI API. This integration offers a seamless and secure solution for incorporating AttackGen into existing Azure ecosystems, leveraging established commercial and confidentiality agreements.\u003Cbr>\u003Cbr>- Improved Data Security: Running AttackGen from Azure ensures that application descriptions and other data remain within the Azure environment, making it ideal for organizations that handle sensitive data in their threat models. |\n| LangSmith for Azure OpenAI Service | - Enhanced Debugging: LangSmith tracing is now available for scenarios generated using the Azure OpenAI Service. This feature provides a powerful tool for debugging, testing, and monitoring of model performance, allowing users to gain insights into the model's decision-making process and identify potential issues with the generated scenarios.\u003Cbr>\u003Cbr>- User Feedback: LangSmith also captures user feedback on the quality of scenarios generated using the Azure OpenAI Service, providing valuable insights into model performance and user satisfaction. |\n| Model Selection for OpenAI API | - Flexible Model Options: Users can now select from several models available from the OpenAI API endpoint, such as `gpt-4-turbo-preview`. This allows for greater customization and experimentation with different language models, enabling users to find the most suitable model for their specific use case. |\n| Docker Container Image | - Easy Deployment: AttackGen is now available as a Docker container image, making it easier to deploy and run the application in a consistent and reproducible environment. This feature is particularly useful for users who want to run AttackGen in a containerised environment, or for those who want to deploy the application on a cloud platform. |\n\n\n\n### v0.2\n\n| What's new? | Why is it useful? |\n| ----------- | ---------------- |\n| Custom Scenarios based on ATT&CK Techniques | - For Mature Organisations: This feature is particularly beneficial if your organisation has advanced threat intelligence capabilities. For instance, if you're monitoring a newly identified or lesser-known threat actor group, you can tailor incident response testing scenarios specific to the techniques used by that group.\u003Cbr>\u003Cbr>- Focused Testing: Alternatively, use this feature to focus your incident response testing on specific parts of the cyber kill chain or certain MITRE ATT&CK Tactics like 'Lateral Movement' or 'Exfiltration'. This is useful for organisations looking to evaluate and improve specific areas of their defence posture. |\n| User feedback on generated scenarios | - Collecting feedback is essential to track model performance over time and helps to highlight strengths and weaknesses in scenario generation tasks. |\n| Improved error handling for missing API keys | - Improved user experience. |\n| Replaced Streamlit `st.spinner` widgets with new `st.status` widget | - Provides better visibility into long running processes (i.e. scenario generation). |\n\n### v0.1\n\nInitial release.\n\n\u003C\u002Fdetails>\n\n## Requirements\n\n- Recent version of Python.\n- Python packages: pandas, streamlit, and any other packages necessary for the custom libraries (`langchain` and `mitreattack`).\n- OpenAI API key (or API key for your chosen model provider).\n- LangChain API key (optional) - see [LangSmith Setup](#langsmith-setup) section below for further details.\n- Data files: `enterprise-attack.json` and `ics-attack.json` (MITRE ATT&CK datasets in STIX format), and `groups.json`.\n- `.env` file for storing API keys and secrets (see [Installation](#installation) section for details).\n\n## Installation\n\n### Option 1: Cloning the Repository\n\n1. Clone this repository:\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fmrwadams\u002Fattackgen.git\n```\n\n2. Change directory into the cloned repository:\n\n```\ncd attackgen\n```\n\n3. Install the required Python packages:\n\n```\npip install -r requirements.txt\n```\n\n### Option 2: Using Docker\n\n1. Pull the Docker container image from Docker Hub:\n\n```\ndocker pull mrwadams\u002Fattackgen\n```\n\n## LangSmith Setup\n\nIf you would like to use LangSmith for debugging, testing, and monitoring of model performance, you will need to set up a LangSmith account and create a `.streamlit\u002Fsecrets.toml` file that contains your LangChain API key. Please follow the instructions [here](https:\u002F\u002Fdocs.smith.langchain.com\u002F) to set up your account and obtain your API key. You'll find a `secrets.toml-example` file in the `.streamlit\u002F` directory that you can use as a template for your own secrets.toml file.\n\nIf you do not wish to use LangSmith, you must still have a `.streamlit\u002Fsecrets.toml` file in place, but you can leave the `LANGCHAIN_API_KEY` field empty.\n\n## Data Setup\n\nDownload the latest version of the MITRE ATT&CK dataset in STIX format from [here](https:\u002F\u002Fgithub.com\u002Fmitre-attack\u002Fattack-stix-data\u002Fblob\u002Fmaster\u002Fenterprise-attack\u002Fenterprise-attack.json). Ensure to place this file in the `.\u002Fdata\u002F` directory within the repository.\n\n## Running AttackGen\n\nAfter the data setup, you can run AttackGen with the following command:\n\n```\nstreamlit run 00_👋_Welcome.py\n```\n\nYou can also try the app on [Streamlit Community Cloud](https:\u002F\u002Fattackgen.streamlit.app\u002F).\n\n## Usage\n\n### Running AttackGen\n\n#### Option 1: Running the Streamlit App Locally\n1. Run the Streamlit app:\n```\nstreamlit run 00_👋_Welcome.py\n```\n2. Open your web browser and navigate to the URL provided by Streamlit.\n3. Use the app to generate standard or custom incident response scenarios (see below for details).\n\n#### Option 2: Using the Docker Container Image\n1. Run the Docker container:\n```\ndocker run -p 8501:8501 mrwadams\u002Fattackgen\n```\nThis command will start the container and map port 8501 (default for Streamlit apps) from the container to your host machine.\n2. Open your web browser and navigate to `http:\u002F\u002Flocalhost:8501`.\n3. Use the app to generate standard or custom incident response scenarios (see below for details).\n\n### Generating Scenarios\n\n#### Standard Scenario Generation\n1. Choose whether to use the OpenAI API, Azure OpenAI Service, Google AI API, Mistral API, Groq API, or locally hosted Ollama models.\n2. Enter your API key for the chosen model provider, or the API key and deployment details for your model on the Azure OpenAI Service.\n3. Select your preferred model from the dropdown.\n4. Select your organisation's industry and size from the dropdown menus.\n5. Navigate to the `Threat Group Scenarios` page.\n6. Select the Threat Actor Group that you want to simulate.\n7. Click on 'Generate Scenario' to create the incident response scenario.\n8. Use the 👍 or 👎 buttons to provide feedback on the quality of the generated scenario. N.B. The feedback buttons only appear if a value for LANGCHAIN_API_KEY has been set in the `.streamlit\u002Fsecrets.toml` file.\n\n#### Custom Scenario Generation\n1. Choose whether to use the OpenAI API, Azure OpenAI Service, Google AI API, Mistral API, Groq API, or locally hosted Ollama models.\n2. Enter your API key for the chosen model provider, or the API key and deployment details for your model on the Azure OpenAI Service.\n3. Select your preferred model from the dropdown.\n4. Select your organisation's industry and size from the dropdown menus.\n5. Navigate to the `Custom Scenario` page.\n6. Use the multi-select box to search for and select the ATT&CK techniques relevant to your scenario.\n7. Click 'Generate Scenario' to create your custom incident response testing scenario based on the selected techniques.\n8. Use the 👍 or 👎 buttons to provide feedback on the quality of the generated scenario. N.B. The feedback buttons only appear if a value for LANGCHAIN_API_KEY has been set in the `.streamlit\u002Fsecrets.toml` file.\n\nPlease note that generating scenarios may take a minute or so. Once the scenario is generated, you can view it on the app and also download it as a Markdown file.\n\n## Security Best Practices\n\nAttackGen is designed for local, single-user deployment. When using the tool:\n\n### Protecting Your API Keys\n\n**Your API keys are sensitive credentials that can incur charges on your account.**\n\n✅ **DO:**\n- Enter API keys through the UI (they stay in your browser session)\n- Use .env file for convenience on your personal machine\n- Set spending limits in your LLM provider dashboard\n- Regularly review your API usage and costs\n- Clear session when using on shared computers\n\n❌ **DON'T:**\n- Commit .env files to version control (already in .gitignore)\n- Share screenshots with API keys visible\n- Run AttackGen on untrusted\u002Fcompromised systems\n- Share your API keys with others\n- Ignore unexpected API charges\n\n### Data Privacy Considerations\n\nWhen you generate scenarios, AttackGen sends data to your chosen LLM provider:\n- Organization details (industry, company size)\n- Selected ATT&CK techniques\n- Custom input text\n- Generated scenarios (via AttackGen Assistant)\n\n**What this means:**\n- OpenAI, Anthropic, etc. may log this data per their privacy policies\n- Consider using generic\u002Ffictional organization details for demonstrations\n- Review your LLM provider's data retention and privacy policies\n- For sensitive use cases, consider providers with stricter privacy guarantees\n\n### For Team\u002FOrganization Deployments\n\nIf deploying AttackGen for multiple users (not the default use case):\n- Add authentication\u002Fauthorization (not included by default)\n- Use a secrets management service for API keys\n- Deploy behind VPN or internal network\n- Review this threat model document for additional considerations\n- Consider data residency and compliance requirements\n\n### Dependency Security\n\nWe maintain dependencies and monitor for vulnerabilities:\n- Dependencies are updated regularly\n- Security advisories are tracked in GitHub Issues\n- Run `pip list --outdated` to check for updates\n- Consider using `pip-audit` for vulnerability scanning\n\n### Reporting Security Issues\n\nFound a security issue? Please report it responsibly:\n- Create a security advisory via GitHub's [private vulnerability reporting](https:\u002F\u002Fgithub.com\u002Fmrwadams\u002Fattackgen\u002Fsecurity\u002Fadvisories\u002Fnew)\n- Don't post security issues publicly\n- We'll acknowledge within 48 hours\n- Fixes will be prioritized and released quickly\n\n## Contributing\n\nI'm very happy to accept contributions to this project. Please feel free to submit an issue or pull request.\n\n## Licence\n\nThis project is licensed under [GNU GPLv3](https:\u002F\u002Fchoosealicense.com\u002Flicenses\u002Fgpl-3.0\u002F).","# AttackGen\n\nAttackGen 是一款网络安全事件响应测试工具，它利用大型语言模型的强大功能以及全面的 MITRE ATT&CK 和 ATLAS 框架。该工具会根据用户选择的威胁行为者组织、AI 攻击案例研究以及贵组织的具体信息，生成量身定制的事件响应场景。\n\n## 目录\n- [给仓库加星](#star-the-repo)\n- [功能](#features)\n- [版本发布](#releases)\n- [要求](#requirements)\n- [安装](#installation)\n- [数据设置](#data-setup)\n- [运行 AttackGen](#running-attackgen)\n- [使用方法](#usage)\n- [安全最佳实践](#security-best-practices)\n- [贡献](#contributing)\n- [许可证](#licence)\n\n## 给仓库加星\n如果您觉得 AttackGen 很有用，请考虑在 GitHub 上为本仓库加星。这将帮助更多人发现这款工具。您的支持对我们来说意义重大！⭐\n\n\n## 功能\n\n- 根据所选的威胁行为者组织或 ATLAS 案例研究，生成独特的事件响应场景。\n- 允许您指定组织规模和行业，以获得量身定制的场景。\n- 支持 MITRE ATT&CK 企业版、ICS（工业控制系统）以及 ATLAS（面向 AI 系统的对抗性威胁态势）框架。\n- 显示所选威胁行为者组织或案例研究使用的详细技术列表。\n- 基于选定的 ATT&CK 或 ATLAS 技术创建自定义场景。\n- 使用场景模板快速生成基于常见类型网络事件的自定义场景，包括针对 AI\u002FML 的特定攻击模式。\n- AttackGen 助手——一个用于更新和\u002F或询问生成场景相关问题的聊天界面。\n- 捕获用户对生成场景质量的反馈。\n- 可下载的 Markdown 格式场景。\n- 可使用 OpenAI API、Anthropic API（Claude 模型）、Azure OpenAI 服务、Google AI API、Mistral API、Groq API、本地托管的 Ollama 模型，或自定义的 OpenAI 兼容 API 端点来生成事件响应场景。\n- 提供 Docker 容器镜像，便于部署。\n- 可选集成 [LangSmith](https:\u002F\u002Fdocs.smith.langchain.com\u002F)，以实现强大的调试、测试和模型性能监控。\n- 使用 .env 文件安全地管理 API 密钥和密钥等凭据。\n\n![AttackGen 截图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmrwadams_attackgen_readme_2ec4d9fbacaa.png)\n\n## 版本发布\n\n### v0.11\n| 新增内容 | 为什么有用？ |\n| ----------- | ----------------- |\n| 支持 MITRE ATLAS 框架 | - AI\u002FML 威胁覆盖：AttackGen 现在支持 MITRE ATLAS（面向 AI 系统的对抗性威胁态势）框架，能够生成针对 AI 和机器学习系统的事件响应场景。\u003Cbr>\u003Cbr>- 基于案例研究的场景：可以根据 45 个已记录的真实 AI 攻击案例生成场景，其中包括 14 起实际事件和 31 次研究演练，涵盖提示注入、模型提取和数据污染等攻击方式。\u003Cbr>\u003Cbr>- 147 种 ATLAS 技术：访问完整的 ATLAS 技术库，涵盖 16 种与 AI 相关的战术，包括 AI 模型访问、AI 攻击准备阶段，以及针对 AI 系统的传统攻击阶段。\u003Cbr>\u003Cbr>- 面向 AI 的专用模板：新增六种针对常见 AI\u002FML 攻击的自定义场景模板：模型规避、数据污染、模型提取、提示注入、LLM 越狱以及 AI 供应链攻击。 |\n| 更新 MITRE ATT&CK 数据至 v18.1 | - 最新威胁情报：AttackGen 现在使用 MITRE ATT&CK v18.1 数据，确保生成的场景反映威胁行为者当前使用的最新战术、技术和程序。\u003Cbr>\u003Cbr>- 扩展的企业版覆盖范围：企业版威胁组织列表从 150 多个增加到 187 个，包括新追踪到的组织。\u003Cbr>\u003Cbr>- 扩展的 ICS 版本覆盖范围：ICS 版本威胁组织列表从 7 个增加到 16 个，从而更好地覆盖工业控制系统相关的场景。 |\n| 更新 LLM 模型支持 | - OpenAI：新增 GPT-5.2 和 GPT-5.2 Pro 模型；精简了模型列表，移除了已弃用的 o 系列推理模型。\u003Cbr>\u003Cbr>- Anthropic：升级至 Claude 4.5 系列，包括 Sonnet 4.5、Haiku 4.5 和 Opus 4.5。\u003Cbr>\u003Cbr>- Google AI：新增 Gemini 3 Pro 和 Flash 预览模型；更新了 Gemini 2.5 的选项。\u003Cbr>\u003Cbr>- Groq：新增 GPT-OSS 120B 和 20B 模型，用于高性能推理。\u003Cbr>\u003Cbr>- Mistral：更新至最新版本模型（Large 2512、Medium 2508、Small 2506）；新增 Ministral 14B。 |\n| 错误修复 | - 修复了 Google AI 响应处理问题：更新了响应解析逻辑，以正确处理较新 Gemini 模型返回的结构化内容格式，确保场景文本能够被正确提取并显示。\u003Cbr>\u003Cbr>- 修复了 ICS 矩阵错误信息：现在使用 ICS 矩阵时，错误信息会正确显示“ICS ATT&CK”，而不是“Enterprise ATT&CK”。\u003Cbr>\u003Cbr>- 改进了空技术处理机制：增加了对威胁组织无关联技术情况的优雅处理，避免引发二次错误。 |\n\n### v0.10.1\n| 新增内容 | 有何用处？ |\n| ----------- | ----------------- |\n| LangChain v1.0 兼容性 | - 修复破坏性导入变更：将所有来自已弃用的 `langchain.prompts.chat` 的导入更新为 `langchain_core.prompts`，确保与 LangChain v1.0 兼容，并防止出现 `ModuleNotFoundError` 问题。这有助于在 LangChain 生态系统演进过程中保持稳定性。 |\n| 全面的安全基础设施 | - 自动化安全扫描：引入了 GitHub Actions 工作流，用于持续进行安全监控，工具包括 Bandit（Python 代码分析）、CodeQL（漏洞检测）、pip-audit（依赖项扫描）、Safety（已知漏洞检测）、Gitleaks（敏感信息检测）和 Trivy（Docker 镜像扫描）。\u003Cbr>\u003Cbr>- 安全最佳实践文档：新增了全面的 SECURITY.md 文件，涵盖支持的版本、漏洞报告流程、API 密钥管理、数据隐私注意事项以及部署安全指南。\u003Cbr>\u003Cbr>- 优化 README 安全章节：扩展了安全指导，明确列出 API 密钥保护、数据隐私考虑及负责任部署实践方面的注意事项。 |\n| Docker 改进 | - 增强安全性：更新 Dockerfile 以非 root 用户身份运行，从而提升容器的安全性。\u003Cbr>\u003Cbr>- 支持 Docker Compose：添加了 docker-compose.yml 文件，便于多服务的简化部署和本地开发环境的搭建。\u003Cbr>\u003Cbr>- 更好的构建优化：改进 .dockerignore 文件，以减小镜像体积并避免敏感文件被包含在容器镜像中。\u003Cbr>\u003Cbr>- 全面的配置模板：更新 .env.example 文件，加入所有支持的 API 密钥（OpenAI、Anthropic、Azure、Google、Mistral、Groq），方便初次设置。 |\n| 错误修复 | - Ollama API 超时问题：为 Ollama API 请求添加了超时配置，以防止连接挂起。\u003Cbr>\u003Cbr>- Safety CLI 更新：将已弃用的 `safety check` 命令更新为新的 `safety scan` 命令，确保安全扫描功能的持续性。\u003Cbr>\u003Cbr>- Bandit 配置：修正了 Bandit 安全扫描配置，以实现更准确的 Python 代码分析。 |\n\n### v0.10\n| 新增内容 | 有何用处？ |\n| ----------- | ----------------- |\n| OpenAI Responses API 集成 | - 新一代 API：AttackGen 现在使用 OpenAI 最新的 Responses API 来处理所有支持的模型，提供统一且增强的接口。 |\n| 最新 Frontier 模型支持 | - GPT-5 集成：新增对 OpenAI 最新 GPT-5 系列模型的支持，包括 gpt-5、gpt-5-mini 和 gpt-5-nano，为场景生成提供最先进的 AI 能力。\u003Cbr>\u003Cbr>- Claude Sonnet 4.5：新增对 Anthropic 最新 Claude Sonnet 4.5（claude-sonnet-4-5-20250929）模型的支持，同时更新了 Claude 模型版本，包括 Claude Opus 4.1（claude-opus-4-1-20250805）。 |\n| 错误修复和改进 | - 修复 Streamlit 弃用警告：将已弃用的 `use_container_width` 参数替换为新的 `width` 参数，以确保与未来 Streamlit 版本的兼容性。\u003Cbr>\u003Cbr>- 文档增强：更新 CLAUDE.md 文件，提供面向未来开发工作的全面指导，并增加了详细的架构信息。 |\n\n### v0.9\n| 新增内容 | 有何用处？ |\n| ----------- | ----------------- |\n| 扩展模型支持 | - 最新 OpenAI 推理模型：AttackGen 现在支持 OpenAI 最新的推理模型，包括 o4-mini（最新推理模型）、o3\u002Fo3-mini 以及 o1-pro（增强推理能力）。这些模型擅长生成需要深度逻辑思维的复杂场景。\u003Cbr>\u003Cbr>- GPT-4.1 系列：新增对 GPT-4.1 系列模型（gpt-4.1、gpt-4.1-mini 和 gpt-4.1-nano）的支持，提供最新的通用 AI 功能改进，同时为成本敏感型应用场景提供了轻量级替代方案。\u003Cbr>\u003Cbr>- Anthropic Claude 模型：全面支持 Anthropic 的 Claude 模型，包括 claude-opus-4-20250514、claude-sonnet-4-20250514、claude-3-7-sonnet-latest 以及 claude-3-5-haiku-latest。这些模型在生成细节丰富、上下文感知的事件响应场景方面表现出色，并具备强大的推理能力。\u003Cbr>\u003Cbr>- 更新 Google AI 模型：重新调整了 Google AI 模型选择，加入了最新的 Gemini 2.5 预览模型（gemini-2.5-flash-preview-05-20 和 gemini-2.5-pro-preview-05-06），并与 Gemini 2.0 模型一同提供，使用户能够体验到 Google AI 技术的最新进展。\u003Cbr>\u003Cbr>- 优化模型组织：重新整理了模型选择下拉菜单，优先展示较新的模型，并更新了描述，以清晰区分不同模型类型及其功能。 |\n| 技术选择逻辑增强 | - 更稳健的威胁组织处理：修复了一个问题，即空的威胁组织可能导致技术选择时出错。现在，该工具会正确处理空组织，返回一个空 DataFrame，即使威胁组织数据有限，也能确保稳定运行。\u003Cbr>\u003Cbr>- 保留阶段名称：改进了技术选择流程，确保输出中包含“阶段名称”，从而在整个场景生成过程中保持杀伤链阶段信息。这保证了生成的场景能够准确反映每项技术属于攻击的哪个阶段。 |\n| 开发环境改进 | - 优化 .gitignore：除了 `venv` 外，还增加了对 `.venv` 虚拟环境目录的支持，以适应不同开发者的偏好和 Python 环境管理工具。\u003Cbr>\u003Cbr>- 代码清理：移除了场景生成脚本中的未使用导入，提高了代码可维护性并减少了潜在的混淆。 |\n\n### v0.8\n| 新增内容 | 有何用处？ |\n| ----------- | ----------------- |\n| 自定义 OpenAI 兼容 API 端点 | - 提高灵活性：AttackGen 现在支持自定义的 OpenAI 兼容 API 端点，例如 Anyscale、Together AI 或任何自托管的兼容 API。此功能允许用户利用更广泛的模型和服务，而不仅限于官方支持的提供商。\u003Cbr>\u003Cbr>- 自托管支持：拥有自己部署的 OpenAI 兼容模型的组织现在可以直接将 AttackGen 连接到这些端点。\u003Cbr>\u003Cbr>- 模型选择控制：用户可以指定任意兼容服务的基 URL、模型名称和 API 密钥，从而更好地控制用于场景生成的模型和端点。 |\n| 更新模型选择 | - 访问最新模型：OpenAI 模型选择现已纳入全新的 GPT-4.1 系列模型（gpt-4.1、gpt-4.1-mini、gpt-4.1-nano），这些模型在编码、指令遵循和长上下文任务方面性能更优。\u003Cbr>\u003Cbr>- 扩大 Gemini 支持：新增对最新 Gemini 2.5 Pro Preview、2.0 Flash 和 2.0 Flash Lite 模型的支持。 |\n\n### v0.7\n| 有哪些新功能？ | 为什么有用？ |\n| ----------- | ----------------- |\n| Groq API 集成 | - 性能提升：AttackGen 现在支持 Groq 的高性能 API，可访问 llama-3.3-70b-versatile 和 deepseek-r1-distill-llama-70b 等模型。这一集成在保持高质量场景生成的同时，提供了快速的推理时间。\u003Cbr>\u003Cbr>- 改进的模型输出显示：对于 DeepSeek 等在输出中同时提供推理过程的模型，AttackGen 现在会将推理内容显示在一个可折叠的展开组件中。这样，用户可以在需要时查看模型的思考过程，同时保持主场景输出的简洁和聚焦。 |\n| 更新的 OpenAI 模型支持 | - 最新模型：AttackGen 现在支持 OpenAI 最新的 o3 推理模型以及 o1 模型的 GA（正式发布）版本，取代了之前的预览版。这些更新为场景生成提供了更稳定、更优秀的模型选择。 |\n\n\u003Cdetails>\n  \u003Csummary>点击查看早期版本的发布说明。\u003C\u002Fsummary>\n\n### v0.6\n| 有哪些新功能？ | 为什么有用？ |\n| ----------- | ----------------- |\n| 支持 OpenAI 新的“推理”模型 | - 场景生成增强：AttackGen 现在支持 OpenAI 新的“推理”模型（o1-preview 和 o1-mini），能够生成高度详细且富有细微差别的事件响应场景。这些模型在场景创建方面提供了更好的连贯性和深度。 |\n| MITRE ATT&CK ICS 矩阵支持 | - 范围扩展：除了企业矩阵之外，AttackGen 现在还支持使用 MITRE ATT&CK ICS（工业控制系统）矩阵生成事件响应测试场景。这使得用户能够创建针对工业和关键基础设施环境的定制化场景。 |\n| 更新 ATT&CK 源数据至 v15.1 | - 最新威胁情报：该工具现在使用最新的 MITRE ATT&CK 数据（v15.1），确保生成的场景反映威胁行为者所使用的最新战术、技术和程序。 |\n| 更新威胁组织团体数据 | - 全面覆盖：团体数据已更新，加入了 MITRE ATT&CK 中追踪到的最新组织，例如 Scattered Spider。这确保用户可以根据当前可用的最新威胁组织信息生成场景。 |\n| 从 .env 文件加载 API 密钥\u002F密钥 | - 安全性提升：用户现在可以将 API 密钥和其他敏感信息存储在 .env 文件中，从而提高安全性，并更方便地管理不同环境下的凭据。 |\n\n### v0.5.2\n| 有哪些新功能？ | 为什么有用？ |\n| ----------- | ---------------- |\n| GPT-4o mini 模型支持 | - 模型选项扩展：AttackGen 现在支持使用 OpenAI 的 GPT-4o mini 模型。GPT4-o mini 是一款极具成本效益的小型模型。 |\n| 更新 Google AI API 的模型选择 | - 模型选项扩展：AttackGen 现在支持 Gemini 1.5 Pro 的稳定版和预览版。 |\n\n### v0.5.1\n| 有哪些新功能？ | 为什么有用？ |\n| ----------- | ---------------- |\n| GPT-4o 模型支持 | - 模型选项增强：AttackGen 现在支持使用 OpenAI 的 GPT-4o 模型。GPT4-o 是 OpenAI 的旗舰模型，能够在成本仅为 GPT-4 一半的情况下，以两倍的速度生成场景。 |\n\n### v0.5\n| 有哪些新功能？ | 为什么有用？ |\n| ----------- | ---------------- |\n| AttackGen 助手 | - 场景迭代优化：新的聊天界面允许用户与其生成的事件响应场景进行交互，轻松更新场景并提出相关问题，而无需从头重新生成。这一特性实现了场景开发的迭代式方法，用户可以根据 AI 助手的回复不断优化和完善场景。\u003Cbr>\u003Cbr>- 上下文辅助：AI 助手会根据生成场景的上下文及对话历史来回应用户的提问，从而确保助手的回答与场景优化相关且有帮助。 |\n| 自定义场景快速启动模板 | - 快速场景生成：用户现在可以根据常见类型的网络事件（如钓鱼攻击、勒索软件攻击、恶意软件感染和内部威胁）的预定义模板，快速生成自定义事件响应场景。这一功能使创建真实场景变得更加容易，无需单独选择 ATT&CK 技术。\u003Cbr>\u003Cbr>- 流程简化：模板选择已无缝集成到自定义场景生成流程中。用户可以选择一个模板，系统会自动填充相关的 ATT&CK 技术，随后可根据需要进一步自定义场景。 |\n| Google AI API 集成 | - 模型选项扩展：AttackGen now supports the use of Google's Gemini models for generating incident response scenarios. This integration expands the range of high-quality models available to users, allowing them to leverage Google's AI capabilities for creating realistic and diverse scenarios. |\n\n### v0.4\n\n| 有哪些新功能？ | 为什么有用？ |\n| ----------- | ---------------- |\n| Mistral API 集成 | - 替代模型提供商：用户现在可以利用 Mistral AI 的模型生成事件响应场景。这一集成为 OpenAI 和 Azure OpenAI Service 模型提供了替代方案，使用户能够探索和比较不同语言模型在其特定用例中的表现。 |\n| 使用 Ollama 支持本地模型 | - 本地模型托管：AttackGen 现在通过与 Ollama 的集成，支持使用本地部署的大规模语言模型。此功能对具有严格数据隐私要求或倾向于将数据保留在本地的企业尤为有用。请注意，此功能不适用于在 Streamlit Community Cloud 上托管的 AttackGen 版本用户，网址为 https:\u002F\u002Fattackgen.streamlit.app |\n| 可选的 LangSmith 集成 | - 灵活性提升：与 LangSmith 的集成现已成为可选项。如果未提供 LangChain API 密钥，用户将看到一条提示信息，说明此次运行不会被 LangSmith 记录，而不是抛出错误。这一改动提升了整体用户体验，使用户无需依赖 LangSmith 即可继续使用 AttackGen。 |\n| 各种错误修复和改进 | - 用户体验提升：本次发布包含多项错误修复和用户界面改进，使 AttackGen 更加易用且稳定。 |\n\n### v0.3\n\n| 有哪些新功能？ | 为什么有用？ |\n| ----------- | ---------------- |\n| Azure OpenAI 服务集成 | - 更强的集成性：用户现在可以选择使用部署在 Azure OpenAI 服务上的 OpenAI 模型，而不仅仅是标准的 OpenAI API。这种集成提供了一种无缝且安全的解决方案，可将 AttackGen 融入现有的 Azure 生态系统中，同时利用已建立的商业和保密协议。\u003Cbr>\u003Cbr>- 数据安全性提升：从 Azure 运行 AttackGen 可确保应用程序描述及其他数据始终保留在 Azure 环境内，非常适合在其威胁模型中处理敏感数据的企业。 |\n| LangSmith 用于 Azure OpenAI 服务 | - 更强大的调试功能：现在可以对使用 Azure OpenAI 服务生成的情景进行 LangSmith 跟踪。此功能为调试、测试以及监控模型性能提供了强有力的工具，使用户能够深入了解模型的决策过程，并识别生成情景中可能存在的问题。\u003Cbr>\u003Cbr>- 用户反馈：LangSmith 还会收集用户对使用 Azure OpenAI 服务生成的情景质量的反馈，从而为评估模型性能和用户满意度提供宝贵信息。 |\n| OpenAI API 的模型选择 | - 灵活的模型选项：用户现在可以从 OpenAI API 端点提供的多种模型中进行选择，例如 `gpt-4-turbo-preview`。这使得用户能够更灵活地定制和尝试不同的语言模型，从而找到最适合其特定用例的模型。 |\n| Docker 容器镜像 | - 易于部署：AttackGen 现在以 Docker 容器镜像的形式提供，便于在一致且可重复的环境中部署和运行该应用。此功能对于希望在容器化环境中运行 AttackGen，或希望在云平台上部署该应用的用户尤为有用。 |\n\n\n\n### v0.2\n\n| 有哪些新功能？ | 为什么有用？ |\n| ----------- | ---------------- |\n| 基于 ATT&CK 技术的自定义场景 | - 适用于成熟组织：如果贵组织具备先进的威胁情报能力，此功能将特别有益。例如，当您正在监测一个新发现或不太知名的威胁行为者组织时，您可以根据该组织所使用的具体技术量身定制事件响应测试场景。\u003Cbr>\u003Cbr>- 重点测试：此外，您也可以利用此功能，将事件响应测试聚焦于网络杀伤链的特定环节，或某些 MITRE ATT&CK 战术，如“横向移动”或“数据外泄”。这对于希望评估并改进自身防御态势特定领域的组织非常有帮助。 |\n| 对生成场景的用户反馈 | - 收集反馈对于长期跟踪模型性能至关重要，有助于突出场景生成任务中的优势与不足。 |\n| 针对缺失 API 密钥的错误处理优化 | - 提升用户体验。 |\n| 将 Streamlit 的 `st.spinner` 组件替换为新的 `st.status` 组件 | - 为长时间运行的任务（如场景生成）提供更好的可见性。 |\n\n### v0.1\n\n初始版本。\n\n\u003C\u002Fdetails>\n\n## 需求\n\n- 最新版本的 Python。\n- Python 包：pandas、streamlit，以及自定义库（langchain 和 mitreattack）所需的其他包。\n- OpenAI API 密钥（或您所选模型提供商的 API 密钥）。\n- LangChain API 密钥（可选）——有关详细信息，请参阅下方的 [LangSmith 设置] 部分。\n- 数据文件：`enterprise-attack.json` 和 `ics-attack.json`（STIX 格式的 MITRE ATT&CK 数据集），以及 `groups.json`。\n- 用于存储 API 密钥和密钥的 `.env` 文件（详情请参阅 [安装] 部分）。\n\n## 安装\n\n### 方法 1：克隆仓库\n\n1. 克隆本仓库：\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fmrwadams\u002Fattackgen.git\n```\n\n2. 进入克隆后的仓库目录：\n\n```\ncd attackgen\n```\n\n3. 安装所需的 Python 包：\n\n```\npip install -r requirements.txt\n```\n\n### 方法 2：使用 Docker\n\n1. 从 Docker Hub 拉取 Docker 容器镜像：\n\n```\ndocker pull mrwadams\u002Fattackgen\n```\n\n## LangSmith 设置\n\n如果您希望使用 LangSmith 进行调试、测试和监控模型性能，您需要先注册 LangSmith 账户，并创建一个包含您的 LangChain API 密钥的 `.streamlit\u002Fsecrets.toml` 文件。请按照 [此处](https:\u002F\u002Fdocs.smith.langchain.com\u002F) 的说明设置账户并获取您的 API 密钥。您可以在 `.streamlit\u002F` 目录中找到一个名为 `secrets.toml-example` 的示例文件，可用作您自己的 secrets.toml 文件模板。\n\n如果您不打算使用 LangSmith，则仍需在 `.streamlit\u002F` 目录下创建一个 `secrets.toml` 文件，但可以将 `LANGCHAIN_API_KEY` 字段留空。\n\n## 数据准备\n\n从 [这里](https:\u002F\u002Fgithub.com\u002Fmitre-attack\u002Fattack-stix-data\u002Fblob\u002Fmaster\u002Fenterprise-attack\u002Fenterprise-attack.json) 下载最新版本的 STIX 格式 MITRE ATT&CK 数据集。请确保将其放置在仓库内的 `.\u002Fdata\u002F` 目录中。\n\n## 运行 AttackGen\n\n完成数据准备后，您可以通过以下命令运行 AttackGen：\n\n```\nstreamlit run 00_👋_Welcome.py\n```\n\n您也可以在 [Streamlit Community Cloud](https:\u002F\u002Fattackgen.streamlit.app\u002F) 上试用该应用。\n\n## 使用方法\n\n### 运行 AttackGen\n\n#### 方法 1：本地运行 Streamlit 应用程序\n1. 运行 Streamlit 应用程序：\n```\nstreamlit run 00_👋_Welcome.py\n```\n2. 打开您的浏览器，访问 Streamlit 提供的 URL。\n3. 使用该应用生成标准或自定义的事件响应场景（详情见下文）。\n\n#### 方法 2：使用 Docker 容器镜像\n1. 运行 Docker 容器：\n```\ndocker run -p 8501:8501 mrwadams\u002Fattackgen\n```\n此命令将启动容器，并将容器内的 8501 端口（Streamlit 应用程序的默认端口）映射到您的主机。\n2. 打开您的浏览器，访问 `http:\u002F\u002Flocalhost:8501`。\n3. 使用该应用生成标准或自定义的事件响应场景（详情见下文）。\n\n### 生成场景\n\n#### 标准场景生成\n1. 选择使用 OpenAI API、Azure OpenAI 服务、Google AI API、Mistral API、Groq API，或本地托管的 Ollama 模型。\n2. 输入所选模型提供商的 API 密钥，或在 Azure OpenAI 服务上使用的模型的 API 密钥及部署详情。\n3. 从下拉菜单中选择您偏好的模型。\n4. 从下拉菜单中选择贵组织的行业和规模。\n5. 导航到“威胁组织场景”页面。\n6. 选择您想要模拟的威胁行为者组织。\n7. 点击“生成场景”以创建事件响应场景。\n8. 使用 👍 或 👎 按钮对生成场景的质量进行反馈。请注意：反馈按钮仅在 `.streamlit\u002Fsecrets.toml` 文件中设置了 LANGCHAIN_API_KEY 值时才会显示。\n\n#### 自定义场景生成\n1. 选择使用 OpenAI API、Azure OpenAI 服务、Google AI API、Mistral API、Groq API，或本地托管的 Ollama 模型。\n2. 输入所选模型提供商的 API 密钥，或在 Azure OpenAI 服务上使用的模型的 API 密钥及部署详情。\n3. 从下拉菜单中选择您偏好的模型。\n4. 从下拉菜单中选择贵组织的行业和规模。\n5. 导航到“自定义场景”页面。\n6. 使用多选框搜索并选择与您的场景相关的 ATT&CK 技术。\n7. 点击“生成场景”以根据所选技术创建自定义的事件响应测试场景。\n8. 使用 👍 或 👎 按钮对生成场景的质量进行反馈。请注意：反馈按钮仅在 `.streamlit\u002Fsecrets.toml` 文件中设置了 LANGCHAIN_API_KEY 值时才会显示。\n\n请注意，生成场景可能需要一两分钟的时间。场景生成完成后，您可以在应用中查看它，也可以将其下载为 Markdown 文件。\n\n## 安全最佳实践\n\nAttackGen 专为本地单用户部署而设计。在使用该工具时：\n\n### 保护您的 API 密钥\n\n**您的 API 密钥是敏感凭据，可能会导致您的账户产生费用。**\n\n✅ **请这样做：**\n- 通过 UI 输入 API 密钥（它们仅保留在您的浏览器会话中）\n- 在个人电脑上使用 .env 文件以方便管理\n- 在 LLM 提供商的仪表板中设置支出限额\n- 定期检查您的 API 使用情况和费用\n- 在共享计算机上使用后清除会话数据\n\n❌ **不要：**\n- 将 .env 文件提交到版本控制系统（已包含在 .gitignore 中）\n- 分享包含可见 API 密钥的截图\n- 在不受信任或已被入侵的系统上运行 AttackGen\n- 与他人共享您的 API 密钥\n- 忽视意外的 API 费用\n\n### 数据隐私注意事项\n\n当您生成场景时，AttackGen 会将数据发送到您选择的 LLM 提供商：\n- 组织详细信息（行业、公司规模）\n- 所选的 ATT&CK 技术\n- 自定义输入文本\n- 生成的场景（通过 AttackGen 助手）\n\n**这意味着：**\n- OpenAI、Anthropic 等可能会根据其隐私政策记录这些数据\n- 在演示时，请考虑使用通用或虚构的组织信息\n- 请仔细阅读您的 LLM 提供商的数据保留和隐私政策\n- 对于敏感用途，请考虑选择具有更严格隐私保障的服务提供商\n\n### 团队\u002F组织部署\n\n如果要为多个用户部署 AttackGen（这不是默认用法）：\n- 添加身份验证和授权功能（默认不包含）\n- 使用密钥管理服务来存储 API 密钥\n- 将部署置于 VPN 或内部网络之后\n- 查阅此威胁模型文档以获取更多注意事项\n- 考虑数据驻留和合规性要求\n\n### 依赖项安全\n\n我们定期维护依赖项并监控漏洞：\n- 定期更新依赖项\n- 在 GitHub Issues 中跟踪安全公告\n- 运行 `pip list --outdated` 来检查是否有更新\n- 可以考虑使用 `pip-audit` 进行漏洞扫描\n\n### 报告安全问题\n\n发现安全问题了吗？请负责任地报告：\n- 通过 GitHub 的[私有漏洞报告](https:\u002F\u002Fgithub.com\u002Fmrwadams\u002Fattackgen\u002Fsecurity\u002Fadvisories\u002Fnew)创建安全公告\n- 不要在公开场合发布安全问题\n- 我们将在 48 小时内确认收到\n- 修复将被优先处理并尽快发布\n\n## 贡献\n我非常欢迎对该项目的贡献。请随时提交问题或拉取请求。\n\n## 许可证\n本项目采用 [GNU GPLv3](https:\u002F\u002Fchoosealicense.com\u002Flicenses\u002Fgpl-3.0\u002F) 许可证。","# AttackGen 快速上手指南\n\nAttackGen 是一款网络安全事件响应测试工具，利用大语言模型（LLM）结合 MITRE ATT&CK 和 ATLAS 框架，根据用户选择的威胁组织、AI 攻击案例及企业详情，生成定制化的事件响应场景。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**：Linux、macOS 或 Windows（支持 Docker 环境）。\n*   **运行时环境**：\n    *   **方案 A（推荐）**：安装 [Docker](https:\u002F\u002Fwww.docker.com\u002F) 和 Docker Compose。这是最简便的部署方式，无需配置本地 Python 环境。\n    *   **方案 B**：安装 Python 3.9+ 及 pip。若选择此方案，需自行管理虚拟环境和依赖。\n*   **API 密钥**：您需要至少拥有一个支持的 LLM 服务商的 API Key（如 OpenAI, Anthropic\u002FClaude, Google AI\u002FGemini, Mistral, Groq, Azure OpenAI 或本地 Ollama）。\n*   **网络环境**：确保能够访问所选 LLM 服务的 API 端点。国内用户若使用海外模型服务，可能需要配置网络代理；若使用本地 Ollama 或国内兼容接口，请确保服务可达。\n\n## 安装步骤\n\n### 方式一：使用 Docker（推荐）\n\n这是最简单且隔离性最好的安装方式。\n\n1.  **克隆仓库**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Fattackgen\u002Fattackgen.git\n    cd attackgen\n    ```\n\n2.  **配置环境变量**\n    复制示例配置文件并填入您的 API 密钥。\n    ```bash\n    cp .env.example .env\n    ```\n    使用文本编辑器打开 `.env` 文件，取消注释您使用的服务商并填入密钥，例如：\n    ```env\n    OPENAI_API_KEY=sk-your-key-here\n    # 或者\n    ANTHROPIC_API_KEY=sk-ant-your-key-here\n    # 如果使用本地 Ollama\n    OLLAMA_BASE_URL=http:\u002F\u002Flocalhost:11434\n    ```\n\n3.  **启动服务**\n    使用 Docker Compose 启动应用：\n    ```bash\n    docker compose up --build\n    ```\n    启动成功后，终端将显示访问地址（通常为 `http:\u002F\u002Flocalhost:8501`）。\n\n### 方式二：本地 Python 安装\n\n如果您希望在本地开发或直接运行：\n\n1.  **创建虚拟环境**\n    ```bash\n    python -m venv venv\n    source venv\u002Fbin\u002Factivate  # Windows 用户使用: venv\\Scripts\\activate\n    ```\n\n2.  **安装依赖**\n    ```bash\n    pip install -r requirements.txt\n    ```\n    *(注：国内用户可使用清华源加速安装：`pip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`)*\n\n3.  **配置环境变量**\n    同 Docker 方式，复制并编辑 `.env` 文件填入 API Key。\n\n4.  **运行应用**\n    ```bash\n    streamlit run app.py\n    ```\n\n## 基本使用\n\n启动成功后，在浏览器中访问 `http:\u002F\u002Flocalhost:8501` 即可进入 AttackGen 交互界面。以下是生成一个基础场景的流程：\n\n1.  **选择框架与数据源**\n    *   在侧边栏或主界面选择 **MITRE ATT&CK**（传统网络威胁）或 **MITRE ATLAS**（AI\u002FML 系统威胁）。\n    *   若选择 ATLAS，您可以从 45 个真实 AI 攻击案例（如提示注入、模型窃取）中选择，或直接选择具体的攻击技术。\n\n2.  **定义组织画像**\n    *   输入您的组织规模（如：小型初创、大型企业）和行业（如：金融、医疗、制造业）。这将帮助模型生成更具针对性的场景。\n\n3.  **选择威胁模型**\n    *   在下拉菜单中选择用于生成内容的 LLM 模型（如 `gpt-4o`, `claude-sonnet-4-5`, `gemini-2.5-pro` 等）。\n    *   确保 `.env` 中已配置对应模型的密钥。\n\n4.  **生成场景**\n    *   点击 **\"Generate Scenario\"** 按钮。\n    *   系统将自动列出所选威胁组织使用的具体技术（Techniques），并生成一份详细的事件响应剧本，包含攻击阶段、预期行为和响应建议。\n\n5.  **交互与导出**\n    *   使用内置的 **AttackGen Assistant** 聊天窗口，对生成的场景进行追问或修改（例如：“增加针对数据泄露的具体缓解措施”）。\n    *   点击 **\"Download Markdown\"** 按钮，将最终方案保存为 `.md` 文件供团队审阅或演练使用。\n\n---\n*提示：为了获得最佳效果，建议在使用 ATLAS 框架时选择较新的推理模型（如 o1, Claude Sonnet 4.5 等），以处理复杂的 AI 攻击逻辑。*","某金融科技公司安全团队正筹备年度红蓝对抗演练，急需针对其新上线的 AI 信贷风控系统设计高仿真的攻击剧本。\n\n### 没有 attackgen 时\n- 人工梳理 MITRE ATLAS 框架中关于“提示词注入”或“模型窃取”的技战术耗时费力，难以将理论映射到具体业务场景。\n- 设计的演练脚本往往通用性太强，缺乏针对金融行业特性和特定威胁组织（如 APT29）行为特征的深度定制。\n- 团队需花费数天时间手动编写背景故事和攻击步骤，且难以覆盖最新的 AI 攻击案例（如数据投毒），导致演练覆盖面窄。\n- 缺乏标准化的文档输出格式，不同成员编写的剧本风格不一，增加了后续复盘和评估的难度。\n\n### 使用 attackgen 后\n- 直接选定\"AI 供应链攻击”模板并输入公司规模与行业，attackgen 瞬间生成包含完整攻击链的定制化场景，精准对应 ATLAS 技术点。\n- 基于选定的威胁组织画像，attackgen 自动融合真实案例细节，生成的剧本高度贴合金融风控系统的实际架构与潜在弱点。\n- 利用内置的 45+ 个真实 AI 攻击案例库，attackgen 快速构建出涵盖模型逃避、大模型越狱等前沿攻击手法的多样化演练内容。\n- 一键导出结构清晰的 Markdown 格式报告，并通过 AttackGen Assistant 对话接口实时调整剧本细节，大幅提升了文档标准化程度。\n\nattackgen 将原本需要数天的复杂剧本设计工作缩短至分钟级，让安全团队能专注于防御策略的验证而非素材的搜集。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmrwadams_attackgen_2ec4d9fb.png","mrwadams","Matt Adams","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmrwadams_156d704f.jpg",null,"https:\u002F\u002Fgithub.com\u002Fmrwadams",[79,83],{"name":80,"color":81,"percentage":82},"Python","#3572A5",99.3,{"name":84,"color":85,"percentage":86},"Dockerfile","#384d54",0.7,1217,162,"2026-04-19T01:49:17","GPL-3.0","未说明 (支持 Docker，理论上兼容所有主流操作系统)","非必需 (主要依赖云端 API 或本地 Ollama；若使用本地大模型，需求取决于具体模型)","未说明",{"notes":95,"python":96,"dependencies":97},"该工具主要通过调用外部 API（如 OpenAI, Anthropic, Google, Groq, Mistral）或本地 Ollama 服务运行，自身对硬件无特殊高要求。支持以 Docker 容器方式部署（推荐），也可通过 Python 环境安装。需配置 .env 文件管理 API 密钥。若选择本地运行 Ollama 模型，则硬件需求取决于所选模型的大小。","未说明 (需兼容 LangChain v1.0 及 Streamlit)",[98,99,100,101,102],"langchain>=1.0","langchain-core","streamlit","docker","requests",[35,13],"2026-03-27T02:49:30.150509","2026-04-20T07:17:14.325445",[107,112,117,122,127,132],{"id":108,"question_zh":109,"answer_zh":110,"source_url":111},44209,"生成场景时出现 'ascii' codec 编码错误（例如包含 £ 符号）怎么办？","该错误通常是因为 API 密钥中包含了特殊字符（如英镑符号 £）。解决方法是重新生成一个不包含特殊字符的 API 密钥，然后替换旧密钥即可解决问题。","https:\u002F\u002Fgithub.com\u002Fmrwadams\u002Fattackgen\u002Fissues\u002F5",{"id":113,"question_zh":114,"answer_zh":115,"source_url":116},44210,"我没有 LangChain API 密钥，如何禁用 LangSmith 以避免启动报错？","如果不想使用 LangSmith，仅仅注释掉环境变量可能不够。请尝试删除 `~\u002F.streamlit\u002Fsecrets.toml` 文件中的相关配置，或者重新克隆仓库以获取修复后的版本，确保完全移除了 LangSmith 相关的初始化调用。","https:\u002F\u002Fgithub.com\u002Fmrwadams\u002Fattackgen\u002Fissues\u002F8",{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},44211,"访问工具时遇到 ModuleNotFoundError: No module named 'langchain_community.llms' 错误如何解决？","这是因为缺少必要的依赖包。维护者已在 `requirements.txt` 中补充了缺失的依赖。请更新您的本地代码库并重新安装依赖（运行 `pip install -r requirements.txt`），如果是 Streamlit Cloud 用户，刷新应用通常会自动解决此问题。","https:\u002F\u002Fgithub.com\u002Fmrwadams\u002Fattackgen\u002Fissues\u002F15",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},44212,"生成场景时提示模型不存在或无权访问（Error code: 404, model_not_found）？","这通常是因为配置的模型名称不正确或您的 API 密钥没有该模型的访问权限。请检查您使用的模型名称（例如 `gpt-4-turbo-preview` 可能已变更或不可用），尝试更换为其他可用模型（如 `gpt-3.5-turbo` 或最新的 `gpt-4-turbo`），并确认 API 密钥有效且拥有对应模型的配额。","https:\u002F\u002Fgithub.com\u002Fmrwadams\u002Fattackgen\u002Fissues\u002F7",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},44213,"是否可以在生成威胁场景后进一步提问或获取详细信息？","是的，新版本已支持该功能。在生成基础场景后，您可以使用界面中的问答功能（Ask question）向 LLM 追问。例如，您可以询问关于 TTPs 的更多细节、涉及的角色人员、逐步执行指南，或是估算时间和资源成本，以便将场景适配到您的具体组织中。","https:\u002F\u002Fgithub.com\u002Fmrwadams\u002Fattackgen\u002Fissues\u002F12",{"id":133,"question_zh":134,"answer_zh":135,"source_url":116},44214,"在 Streamlit Community Cloud 上部署时遇到环境配置问题怎么办？","如果您在云端部署遇到问题，请确保已经正确设置了所有必要的环境变量（如 OLLAMA_MODEL, OLLAMA_ENDPOINT 或 API KEY）。如果之前修改过本地配置文件导致冲突，建议清除本地的 `~\u002F.streamlit\u002Fsecrets.toml` 或在云端重新连接仓库以同步最新的配置修复。",[]]