From a66c6892a8edd14b3ab6ad7a6e47722cef999102 Mon Sep 17 00:00:00 2001 From: Sycun <165354365+Sycun@users.noreply.github.com> Date: Wed, 11 Nov 2026 14:34:31 +0800 Subject: [PATCH] docs: refresh bilingual README for Pi and delegated work --- README.md | 552 ++++++++++++++++----------------------------------- README_CN.md | 543 ++++++++++++++++---------------------------------- 2 files changed, 332 insertions(+), 763 deletions(-) diff --git a/README.md b/README.md index 245ecef3..5690e063 100644 --- a/README.md +++ b/README.md @@ -1,438 +1,218 @@
- CyberStrikeAI Logo + CyberStrikeAI +

CyberStrikeAI

+

Describe the goal. Let an agent do the work, report progress, and ask when it needs your judgment.

+

中文 · English

+

+ Pi runtime CI + Build and regression CI +

-# CyberStrikeAI +CyberStrikeAI is a cybersecurity agent workbench built with **Go + Pi**. Describe the outcome you want: the agent interprets your intent, plans steps, calls tools, and records evidence. It reports progress as it works, asks for missing information or decisions, and continues from the saved state after you answer. +This repository is maintained by **Sycun**, building on [AIPentest/CyberStrikeAI](https://github.com/AIPentest/CyberStrikeAI) with the upstream history, license, and copyright notices preserved. The current version is ready for team trials. Start the new workflow from **Deep Assessment → Delegate work**. -[中文](README_CN.md) | [English](README.md) +[Quick start](#quick-start) · [Delegate your first task](#delegation) · [Capabilities](#capabilities) · [Architecture](#architecture) · [Documentation](#documentation) · [Feedback](#contributing) -> **Repository role:** Sycun's personal maintenance line, based on [AIPentest/CyberStrikeAI](https://github.com/AIPentest/CyberStrikeAI). Daily development is published here. The [architecture refactor](https://github.com/Sycun/csai-decouple-refactor) evolves separately; [Sycun/CyberStrikeAI-upstream-fork](https://github.com/Sycun/CyberStrikeAI-upstream-fork) is the fork used for selected upstream contributions. -> -> The current main line includes the [deep assessment workbench](docs/DEEP_ASSESSMENTS.md). Proxy-pool settings and local-model context profiles are integrated into this main line; see the [repository and branch guide](docs/REPOSITORY_GUIDE.md) for integration status. Code availability and automated checks do not establish acceptance with real models and real targets. + -**The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.** +## Quick start -CyberStrikeAI connects planning, execution, human oversight, evidence, and replay in one auditable workspace. Built in Go, it combines Pi-powered agents, MCP-native tools, RAG knowledge, visual workflows, and attack-chain modeling and analysis for authorized security operations. +### 1. Prepare the environment -**Start here:** [Quick start](#quick-start-one-command-deployment) · [Documentation](docs/en-US/README.md) · [Security hardening](docs/en-US/security-hardening.md) +| Dependency | Requirement | Purpose | +| --- | --- | --- | +| Go | 1.25+; see [go.mod](go.mod) | Build the server | +| Node.js and npm | Node.js 22.19+ | Build and run the Pi worker | +| Python | 3.10+, with venv support | Launcher and Python tool dependencies | +| Git | Available on PATH | Clone and update the source | -> [!IMPORTANT] -> Use CyberStrikeAI only on systems you own or are explicitly authorized to test. For shared or production environments, review the [security model](docs/en-US/security-model.md) and [hardening guide](docs/en-US/security-hardening.md) before enabling high-risk tools, WebShell, or C2 capabilities. +You also need a model channel that supports tool calling, plus the tools or MCP services required by your task. The repository contains tool recipes; it **does not install every security tool automatically**. The first build needs access to Go, npm, and Python dependency sources. -## Interface & Integration Preview +### 2. Clone and start -
+The following commands use Bash on macOS or Linux: -### System Dashboard Overview - - - - - - -
-Light Mode
-System Dashboard (Light) -
-Dark Mode
-System Dashboard (Dark) -
- -*The dashboard provides a comprehensive overview of system runtime status, security vulnerabilities, tool usage, and knowledge base, helping users quickly understand the platform's core features and current state.* - -
-More interface screenshots - -### Core Features Overview - - - - - - - - - - - - - - - - - - - - - - -
-Web Console
-Web Console -
-Task Management
-Task Management -
-Vulnerability Management
-Vulnerability Management -
-WebShell Management
-WebShell Management -
-MCP Management
-MCP management -
-Knowledge Base
-Knowledge Base -
-Skills Management
-Skills Management -
-Agent Management
-Agent Management -
-Role Management
-Role Management -
-System Settings
-System settings -
-MCP stdio Mode
-MCP stdio mode -
-Burp Suite Plugin
-Burp Suite plugin -
- -
- -
- -## Highlights - -### Agents and orchestration - -- 🤖 **Agentic execution** translates natural-language intent into governed, auditable security actions. -- 🧩 **Pi orchestration** supports single-agent execution plus Deep, Plan-Execute, and Supervisor multi-agent modes. -- 🔀 **Graph workflows** combine Agents, tools, conditions, approvals, and outputs into reusable flows. -- 🎭 **Role-based testing** provides focused prompts and tool policies for common security scenarios. - -### Tools and knowledge - -- 🧰 **Security tools** include 100+ curated YAML recipes with custom extensions and role-scoped access. -- 🔌 **MCP integration** supports HTTP, stdio, SSE, external federation, and dynamic tool discovery. -- ⏱️ **Resilient tool execution** runs blocking MCP/tool calls in workers with bounded agent waits, resumable `execution_id` polling, cancellation, per-server circuit breakers, concurrency limits, and unified output caps. -- 🎯 **Agent Skills** follow the standard Skill layout and support progressive, on-demand loading. -- 📚 **Knowledge base** combines query rewriting, vector retrieval, reranking, and result post-processing. -- 🖼️ **Vision analysis** uses a separate vision model for screenshots, captchas, and UI while retaining text summaries only. - -### Governance and audit - -- 🧑‍⚖️ **Human in the loop** provides approval modes, tool allowlists, audit-agent review, and traceable decisions. -- 🛡️ **Call blocking** under Security adds configurable regex checks before MCP execution, reminder templates, and dry runs, with government-domain protection enabled by default. See [Tool call blocking](docs/en-US/tool-call-guard.md). -- 🔐 **Platform RBAC** supports multiple users, system and custom roles, scoped permissions, ownership, and explicit assignments. -- 🔒 **Security and audit** provide authenticated access, audit logs, SQLite persistence, and operational evidence retention. -- 📄 **Result governance** stores the same capped tool result seen by the agent, protects resume paths from oversized historical output, and adds UI safeguards for large detail views. See [Tool Execution Governance](docs/en-US/tool-execution-governance.md). - -### Security operations - -- 📁 **Conversation management** provides pinning, renaming, and batch organization. -- 📂 **Projects and attack chains** connect cross-session facts, risk scoring, graph views, and step-by-step replay. -- 🗂️ **Asset management** normalizes and deduplicates domains, IP addresses, ports, and services; supports XLSX/CSV import and export, advanced filters and saved views, ownership and business metadata, cross-page bulk maintenance, and duplicate merging; and tracks scan coverage, linked vulnerabilities, and risk state. See the [Asset Management guide](docs/en-US/asset-management.md). -- 🛡️ **Vulnerability management** provides severity classification, lifecycle tracking, filtering, and statistics. -- 📋 **Batch tasks** provide queued execution, editing, status tracking, and retained results. -- 📱 **Chatbots** connect Personal WeChat, WeCom, DingTalk, Lark, Telegram, Slack, Discord, and QQ Bot. - -### Authorized security operations - -- 🐚 **WebShell management** provides connection management, a virtual terminal, file operations, and AI-assisted workflows. -- 📡 **Built-in C2** provides listeners, encrypted beacons, sessions, task queues, payload helpers, and live events. - -> WebShell, C2, and other high-risk capabilities are for systems you own or are explicitly authorized to test. See the [security model](docs/en-US/security-model.md) and [hardening guide](docs/en-US/security-hardening.md). - -## Plugins - -CyberStrikeAI includes optional integrations under `plugins/`. - -- **Burp Suite extension**: `plugins/burp-suite/cyberstrikeai-burp-extension/` - Build output: `plugins/burp-suite/cyberstrikeai-burp-extension/dist/cyberstrikeai-burp-extension.jar` - Docs: `plugins/burp-suite/cyberstrikeai-burp-extension/README.md` -- **Browser extension (Chrome / Edge)**: `plugins/browser-extension/cyberstrikeai-browser-extension/` - Capture Network traffic in DevTools and send it to CyberStrikeAI for AI-assisted security testing—aligned with the Burp plugin. - Install: `chrome://extensions/` → Load unpacked → F12 → **CyberStrikeAI** tab - Package output: `plugins/browser-extension/cyberstrikeai-browser-extension/dist/cyberstrikeai-browser-extension.zip` - Docs: `plugins/browser-extension/cyberstrikeai-browser-extension/README.md` / `README.zh-CN.md` - -## Tool Overview - -CyberStrikeAI ships with 100+ curated tools covering the whole kill chain: - -
-View the complete tool categories - -- **Network Scanners** – nmap, masscan, rustscan, arp-scan, nbtscan -- **Web & App Scanners** – sqlmap, nikto, dirb, gobuster, feroxbuster, ffuf, httpx -- **Vulnerability Scanners** – nuclei, wpscan, wafw00f, dalfox, xsser -- **Subdomain Enumeration** – subfinder, amass, findomain, dnsenum, fierce -- **Network Space Search Engines** – fofa_search, zoomeye_search, quake_search, shodan_search -- **API Security** – graphql-scanner, arjun, api-fuzzer, api-schema-analyzer -- **Container Security** – trivy, clair, docker-bench-security, kube-bench, kube-hunter -- **Cloud Security** – prowler, scout-suite, cloudmapper, pacu, terrascan, checkov -- **Binary Analysis** – gdb, radare2, ghidra, objdump, strings, binwalk -- **Exploitation** – metasploit, msfvenom, pwntools, ropper, ropgadget -- **Password Cracking** – hashcat, john, hashpump -- **Forensics** – volatility, volatility3, foremost, steghide, exiftool -- **Post-Exploitation** – linpeas, winpeas, mimikatz, bloodhound, impacket, responder -- **CTF Utilities** – stegsolve, zsteg, hash-identifier, fcrackzip, pdfcrack, cyberchef -- **System Helpers** – exec, create-file, delete-file, list-files, modify-file - -
- -See [tools/README_EN.md](tools/README_EN.md) for tool definitions, customization, and usage notes. - -## Basic Usage - -### Quick Start (One-Command Deployment) - -**Prerequisites:** -- Go 1.25+ ([Install](https://go.dev/dl/); required by `go.mod`) -- Python 3.10+ ([Install](https://www.python.org/downloads/)) -- Node.js 22.19+ (Pi runtime) - -**One-Command Deployment:** ```bash -git clone https://github.com/Sycun/CyberStrikeAI.git +git clone --branch main https://github.com/Sycun/CyberStrikeAI.git cd CyberStrikeAI -chmod +x run.sh && ./run.sh +cp config.example.yaml config.yaml ``` -The `run.sh` script will automatically: -- ✅ Check and validate Go & Python environments -- ✅ Create Python virtual environment -- ✅ Install Python dependencies -- ✅ Download Go dependencies -- ✅ Build the project -- ✅ Start the server +For a local trial, change the existing `server.host` in `config.yaml` to `127.0.0.1`, keeping the other settings. Then start the server: -**Verify the startup:** - -1. Confirm the terminal displays `● ONLINE` followed by the actual Web UI URL. -2. Open that URL; the default HTTPS mode uses a local self-signed certificate, so accept the browser warning once. -3. On a new installation, store the one-time `admin` password shown under `ADMIN SETUP REQUIRED`, sign in, and change it immediately. - -**Networking defaults:** `run.sh` starts the server with **`--https`** and the repo **`config.yaml`** (local self-signed TLS; better for many concurrent streams). Use **`./run.sh --http`** for plain HTTP. In production, set **`server.tls_cert_path`** / **`server.tls_key_path`** in **`config.yaml`** (see comments there). For manual runs, add **`--https`** or **`CYBERSTRIKE_HTTPS=1`**; if **`-config`** is wrong, the binary prints a short usage hint on stderr. - -**First-Time Configuration:** -1. **Configure AI channels** (required before first use) - - After launch, open **`https://127.0.0.1:8080/`** (or **`https://localhost:8080/`**; replace **8080** with `server.port` in `config.yaml`) and accept the self-signed certificate warning once. If you used `./run.sh --http`, use **`http://`** instead. - - Go to `System Settings` → `Basic Settings` → `AI Channel Configuration`, add or edit a channel, then fill in provider, Base URL, API key, model, and token limits. Click **Save changes**. The left channel list supports setting a default, copy, delete, and bulk probe. - ```yaml - ai: - default_channel: openai-main - channels: - openai-main: - name: OpenAI Main - provider: openai_compatible - api_key: "${OPENAI_API_KEY}" - base_url: "https://api.openai.com/v1" # or https://api.deepseek.com/v1 - model: "gpt-4o" # or deepseek-chat, qwen3-max, etc. - max_total_tokens: 120000 - max_completion_tokens: 16384 - ``` - - Or edit `config.yaml` directly before launching. `ai.default_channel` is used for new conversations and tasks that do not explicitly select a channel; the chat page can also select any saved channel per session. -2. **Login** - On first startup the console prints an auto-generated initial `admin` password; create accounts from **Platform permissions → User management** -3. **Install security tools (optional)** - Install tools from `tools/` as needed; missing tools are skipped or substituted at runtime. Common examples: - - **macOS (Homebrew):** - ```bash - brew install nmap masscan sqlmap nikto gobuster ffuf hydra hashcat nuclei subfinder - ``` - - **Linux (Kali / Debian / Ubuntu):** - ```bash - sudo apt update - sudo apt install -y nmap masscan sqlmap nikto gobuster hydra hashcat john binwalk - # On some distros, install ffuf/nuclei/subfinder via go install or upstream docs - ``` - - See the `tools/` directory for the full list; refer to each tool's official docs for install details. - -**Alternative Launch Methods:** ```bash -# Direct Go run (set up env yourself); add --https to match run.sh defaults -go run ./cmd/server --https - -# Manual build -go build -o cyberstrike-ai ./cmd/server -./cyberstrike-ai --https +bash run.sh --http ``` -If server logs show `client sent an HTTP request to an HTTPS server`, a client is still using **`http://`** on a TLS-only port—switch the URL to **`https://`**. +The script prepares the Pi worker, creates a Python virtual environment, installs dependencies, and builds the server. Open [http://127.0.0.1:8080/](http://127.0.0.1:8080/) by default; use the port shown in your configuration and terminal output. -**Note:** The Python virtual environment (`venv/`) is automatically created and managed by `run.sh`. Tools that require Python (like `api-fuzzer`, `http-framework-test`, etc.) will automatically use this environment. +Without `--http`, `run.sh` uses HTTPS and generates a local self-signed certificate when none is configured. For a shared deployment, see the [deployment guide](docs/en-US/deployment.md) for listening addresses, certificates, and access controls. -### Upgrade and Compatibility +### 3. Complete the initial setup -**Prefer the platform's own one-click update** (console System settings -> One-click update, or -`./cyberstrike-ai -update` / `-check-update` / `-update-rollback`): it pulls the newest commit of the -**update source repository**'s default branch (the official repository by default; one setting points -it at your own fork or a mirror), fast-forwards, rebuilds and swaps the binary atomically, keeps your -`roles/skills/tools/agents/data/config.yaml` untouched (the result names every file it kept; only -`config.yaml`'s `version` field is synced to the new code, so the header badge matches it), and -refuses - rather than overwrites - when source is modified locally or the local history has diverged. -See the [deployment guide](docs/en-US/deployment.md). +1. Sign in with the initial `admin` password shown under `ADMIN SETUP REQUIRED` in the terminal, then change it. +2. In **System settings → Basic → AI channel config**, enter the provider, Base URL, API key, and model, then select a default channel. Credentials in the example configuration are placeholders. +3. Install the local tools needed for your task, or connect an available external MCP service. Verify that each tool works before assigning it to an agent. +4. For a shared service, create separate accounts and permissions for teammates under **Platform Access → Add Member**. -`upgrade.sh` still works: when this directory is a git work tree it is a thin shell over the command -above; only a non-git (tarball) installation falls back to the old "download a GitHub Release and -rsync it in" path, where the source repository comes from `--repo owner/name` or `GITHUB_REPO` and the -built-in default applies only when neither is given (with a warning naming the repository). +Use [config.example.yaml](config.example.yaml) as the configuration reference. See [configuration](docs/en-US/configuration.md) and [configuration profiles](docs/en-US/configuration-profiles.md) for model channels, local models, and context settings. -The update source is one setting, a repository address in the `update` section of `config.yaml` or -right on the console page - the official repository, your own fork, or somebody else's fork. An -installation unpacked from a Release archive (no git) can be previewed and connected from the same -page and updates in one click from then on. +
+Build and run manually -**CyberStrikeAI upgrade script:** -1. (First time) enable the script: `chmod +x upgrade.sh` -2. Upgrade with: `./upgrade.sh` (optional flags: `--check`, `--tag vX.Y.Z`, `--repo owner/name`, `--no-venv`, `--yes`). Local `tools/`, `roles/`, `skills/` and `agents/` are always preserved. -3. The script will back up your `config.yaml` and `data/`, upgrade the code, update `config.yaml`'s `version`, then restart the server. +After completing the configuration above, you can build the Pi worker and Go server separately: -Recommended one-liner: -`chmod +x upgrade.sh && ./upgrade.sh --yes` +```bash +bash scripts/build-pi-runtime.sh +go build -o cyberstrike-ai ./cmd/server +./cyberstrike-ai -config config.yaml --http +``` -If something goes wrong: inside a git work tree just run `./cyberstrike-ai -update-rollback` (back to -the commit and binary kept before that update); for a tarball installation restore from -`.upgrade-backup/` (or manually copy `data/` and `config.yaml` back) and run `./run.sh` again. +A deployment needs the runtime source and a matching Pi worker bundle, or a fresh build on the destination machine. Copying only the Go binary is not enough to run agents. Prepare Python tool dependencies separately. See the [Pi runtime guide](docs/en-US/pi-runtime.md). -Requirements / tips (tarball path only): -* You need `curl` or `wget` for downloading Release packages. -* `rsync` is recommended/required for the safe code sync. -* If GitHub API rate-limits you, set `export GITHUB_TOKEN="..."` before running `./upgrade.sh`. +
-⚠️ **Before upgrading:** review the target release notes for configuration, database, and API changes. Backups are required even for patch upgrades; a version number alone is not a compatibility guarantee. + +## Delegate, execute, report, ask, and continue -## Configuration +Open **Deep Assessment → Delegate work**, select a project if needed, choose the available tools, model, and budget, then describe the desired outcome. For example, after listing readable local report files in the materials field: -Use [`config.example.yaml`](config.example.yaml) as the authoritative configuration template and copy only the values required for your environment. At minimum, configure the server and one AI channel: +> Organize this project's existing assessment materials into a report of verified results and evidence gaps. Read only the local files listed in the materials field; do not access new targets. Organize the report by module. At each milestone, tell me what is done and what remains. Ask me directly when a decision is needed. + +```mermaid +flowchart LR + A[Describe the goal] --> B[Interpret intent] + B --> C[Plan and execute] + C --> D[Report progress] + D --> C + D --> E[Review and deliver] + B -->|Missing information| F[Ask the owner] + C -->|Decision needed| F + F --> G[Owner answers] + G -->|Intake clarification| B + G -->|Execution decision| C +``` + +- **Start with an incomplete description:** the agent creates an intake draft and asks specific questions when essential goals, scope, or acceptance criteria are unclear. +- **Execute once the task is clear:** selected tools advance the work, with step state, results, and execution records saved. +- **Inspect factual stage reports:** see completed work, remaining work, blockers, next actions, and supporting execution references. +- **Keep independent work moving:** a step awaiting an answer does not stop existing independent steps. When no work remains runnable, execution resources are released. +- **Resume after answering:** **Answer and continue** restores the original step context. Repeating an identical answer does not repeat execution. +- **Keep questions and progress:** closing the page does not lose the task; pending questions and saved results remain available after a server restart. + +Owner questions and tool approvals are separate. The current entry points are the workbench and API. Automatic chat/robot routing, cross-project name resolution, external notifications, and ARTEX adapters remain future work. + +See [delegated work and owner questions](docs/en-US/task-delegation.md) for usage, recovery behavior, and API details. + + + +## Capabilities + +| Capability | What it provides | Details | +| --- | --- | --- | +| Pi agents | Single-agent, Deep, Plan-Execute, and Supervisor modes | [Agents and roles](docs/en-US/agent-and-role-guide.md) | +| Durable tasks | Planning, dependencies, bounded concurrency, budgets, pause/resume, and review | [Task delegation](docs/en-US/task-delegation.md) | +| Tools and skills | YAML recipes, MCP connections, role-specific tool sets, and on-demand skills | [Tools](tools/README_EN.md) · [Skills](skills/README.md) | +| Visual workflows | Compose agent, tool, condition, and approval nodes | [Workflows](docs/en-US/workflow-graph.md) | +| Knowledge and evidence | RAG retrieval, project facts, tool records, reports, and attack-chain analysis | [Knowledge base](docs/en-US/knowledge-base.md) | +| Project workspace | Assets, vulnerabilities, conversations, batch tasks, and shared project context | [Asset management](docs/en-US/asset-management.md) | +| Human oversight | RBAC, tool approvals, call guards, and audit logs | [Security model](docs/en-US/security-model.md) | +| Integrations | Burp Suite, browser extensions, bots, and external MCP services | [Plugins](#integrations) · [MCP](docs/en-US/mcp-federation.md) | + +Specialized operations also include [WebShell](docs/en-US/webshell.md) and [C2](docs/en-US/c2.md). Configure the capabilities your task needs; a tool recipe does not mean its executable is installed or validated in your environment. + + + +## Architecture + +| Component | Responsibility | +| --- | --- | +| **Go server and task engine** | Task state, dependencies, budgets, owner questions, tool execution, and evidence | +| **Pi runtime** | Model interaction, agent tool loops, sessions, compaction, steering, and tool discovery | +| **Tool gateway** | Dispatch to MCP or local tools under role restrictions, permissions, approvals, and execution monitoring | +| **SQLite and Pi sessions** | Business state and evidence in SQLite; model conversations and compaction records in Pi sessions | +| **Web workbench** | Tasks, questions, stage reports, execution traces, and project materials | + +**Pi 1.5.2 is the only agent runtime.** The Eino execution engine and dependencies have been removed. Durable assessments use the Go task engine to control execution and Pi for individual model proposals. They share the runtime with chat agents while managing their own task lifecycle. + +An optional **DSH-Purge-inspired prompt profile** adds capability selection, main/child task anchors, and model-specific instructions. It can be disabled; Go retains tool permissions and approvals. Implementation and attribution are documented in the [Pi runtime guide](docs/en-US/pi-runtime.md) and [third-party notices](runtime/pi/THIRD_PARTY_NOTICES.md). + + + +## Plugins and interface + +| Integration | Usage | Documentation and download | +| --- | --- | --- | +| Burp Suite | Send selected HTTP requests to CyberStrikeAI for analysis | [Setup](plugins/burp-suite/cyberstrikeai-burp-extension/README.md) · [JAR](plugins/burp-suite/cyberstrikeai-burp-extension/dist/cyberstrikeai-burp-extension.jar) | +| Chrome / Edge | Capture and send requests from the CyberStrikeAI DevTools tab | [Setup](plugins/browser-extension/cyberstrikeai-browser-extension/README.md) · [ZIP](plugins/browser-extension/cyberstrikeai-browser-extension/dist/cyberstrikeai-browser-extension.zip) | + +
+Explore the workbench + + + + + + + + + + + + + + +
Dashboard
Dashboard
Dark theme
Dark theme
Chat console
Chat console
Knowledge base
Knowledge base
MCP management
MCP management
Burp Suite extension
Burp Suite extension
+ +These repository screenshots illustrate existing features. For the new task-delegation entry point and workflow, follow the [usage guide](docs/en-US/task-delegation.md). + +
+ +## Updates and migration + +For new installations, [config.example.yaml](config.example.yaml) points updates to this repository: ```yaml -server: - host: "127.0.0.1" - port: 8080 -ai: - default_channel: openai-main - channels: - openai-main: - provider: openai_compatible - api_key: "${OPENAI_API_KEY}" - base_url: "https://api.openai.com/v1" - model: "your-model" +update: + repo: https://github.com/Sycun/CyberStrikeAI ``` -`openai` is a backward-compatible runtime field; maintain new model settings in `ai.channels`. Do not commit real credentials. Review the [configuration reference](docs/en-US/configuration.md), [recommended profiles](docs/en-US/configuration-profiles.md), and [security hardening guide](docs/en-US/security-hardening.md) before exposing the service beyond localhost. +For an existing installation, check the source under **Settings → One-click Update**. An empty `update.repo` still selects the official upstream, not this independently maintained version. The update process builds a Pi worker matching the source. See [deployment](docs/en-US/deployment.md) for the procedure. -## Related documentation +Before migrating from an Eino version, back up runtime configuration and data, and finish or export existing workflows: **old Eino binary workflow checkpoints cannot resume in this version**. Legacy API routes, configuration keys, and historical records retain data compatibility; there is no old-engine switch. See the [migration guide](docs/en-US/pi-runtime.md). -- **New users:** [Deployment](docs/en-US/deployment.md) → [Configuration](docs/en-US/configuration.md) → [Troubleshooting](docs/en-US/troubleshooting.md) -- **Operators:** [Configuration profiles](docs/en-US/configuration-profiles.md) → [Security hardening](docs/en-US/security-hardening.md) → [Runbooks](docs/en-US/runbooks.md) -- **Integrators:** [API reference](docs/en-US/api-reference.md) → [API recipes](docs/en-US/api-recipes.md) → [MCP federation](docs/en-US/mcp-federation.md) -- **Contributors:** [Developer guide](docs/en-US/developer-guide.md) → [Testing](docs/en-US/testing.md) → [Contributing](docs/en-US/contributing-guide.md) -- **All topics:** [English documentation](docs/en-US/README.md) · [Bilingual documentation index](docs/README.md) +## Validation status -## Project Layout +The current implementation has been checked with full Go tests, race tests, Pi SDK integration tests, frontend regressions, and local browser checks. An isolated live-model smoke run completed the sequence **ambiguous request → clarification → owner answer → echo tool execution → stage reports → completion**, using synthetic inputs and tool results. -``` -CyberStrikeAI/ -├── cmd/ # Server, MCP stdio entrypoints, tooling -├── internal/ # Agent, MCP core, handlers, C2 (`internal/c2`), security executor -├── web/ # Static SPA + templates -├── tools/ # YAML tool recipes (100+ examples provided) -├── roles/ # Role configurations (12+ predefined security testing roles) -├── skills/ # Agent Skills dirs (SKILL.md + optional files; demo: cyberstrike-pi-demo) -├── agents/ # Multi-agent Markdown (orchestrator.md + sub-agent *.md) -├── docs/ # Topic docs (deployment, config, security, API, knowledge base, C2, WebShell, etc.) -├── images/ # Docs screenshots & diagrams -├── config.yaml # Runtime configuration -├── run.sh # Convenience launcher -└── README*.md -``` +This supports team trials. Complex long-running tasks, compatibility across model channels, general intent accuracy, cost, and effectiveness still need further evaluation. See the latest checks in [GitHub Actions](https://github.com/Sycun/CyberStrikeAI/actions). -## Basic Usage Examples + -``` -Scan open ports on 192.168.1.1 -Perform a comprehensive port scan on 192.168.1.1 focusing on 80,443,22 -Check if https://example.com/page?id=1 is vulnerable to SQL injection -Scan https://example.com for hidden directories and outdated software -Enumerate subdomains for example.com, then run nuclei against the results -``` +## Documentation -## Advanced Playbooks +| What you want to do | Start here | +| --- | --- | +| Deploy and configure models | [Deployment](docs/en-US/deployment.md) · [Configuration](docs/en-US/configuration.md) · [Troubleshooting](docs/en-US/troubleshooting.md) | +| Delegate tasks | [Usage and API](docs/en-US/task-delegation.md) · [Design background, Chinese](docs/zh-CN/task-delegation-design.md) | +| Customize agents and tools | [Pi runtime](docs/en-US/pi-runtime.md) · [Agents and roles](docs/en-US/agent-and-role-guide.md) · [Tool recipes](tools/README_EN.md) | +| Integrate an application | [API reference](docs/en-US/api-reference.md) · [API examples](docs/en-US/api-recipes.md) · [MCP](docs/en-US/mcp-federation.md) | +| Operate a team service | [Security hardening](docs/en-US/security-hardening.md) · [Runbooks](docs/en-US/runbooks.md) | +| Contribute code | [Developer guide](docs/en-US/developer-guide.md) · [Testing](docs/en-US/testing.md) · [Repository guide](docs/REPOSITORY_GUIDE.md) | -``` -Load the recon-engagement template, run amass/subfinder, then brute-force dirs on every live host. -Use external Burp-based MCP server for authenticated traffic replay, then pass findings back for graphing. -Compress the 5 MB nuclei report, summarize critical CVEs, and attach the artifact to the conversation. -Build an attack chain for the latest engagement and export the node list with severity >= high. -``` +Browse all topics in the [English documentation](docs/en-US/README.md) or [bilingual index](docs/README.md). -## 404Starlink + - +## Feedback and contributions -CyberStrikeAI has joined [404Starlink](https://github.com/knownsec/404StarLink) +Report trial feedback in [this repository's Issues](https://github.com/Sycun/CyberStrikeAI/issues). Include the commit, operating system, model protocol/channel type, reproduction steps, and redacted logs. Do not upload API keys, credentials, or sensitive engagement materials. PRs for tool adapters, usability improvements, and regression cases are welcome. -## TCH Top-Ranked Intelligent Pentest Project -
- - TCH Top-Ranked Intelligent Pentest Project - -
+This repository and the official upstream publish independently. For upstream community information, visit [AIPentest/CyberStrikeAI](https://github.com/AIPentest/CyberStrikeAI). Thanks to the original authors and contributors, and to Pi, MCP, and the other open-source projects used here. +## License and intended use - ---- - -## Community and Support - -- Join the community on [Discord](https://discord.gg/8PjVCMu8Zw). - -
-WeCom group - -CyberStrikeAI WeCom group QR code - -
- -## License - -CyberStrikeAI is licensed under the Apache License 2.0. -See the [LICENSE](LICENSE) file for details. - ---- - -## ⚠️ Disclaimer - -**This tool is for educational and authorized testing purposes only!** - -CyberStrikeAI is a professional security testing platform designed to assist security researchers, penetration testers, and IT professionals in conducting security assessments and vulnerability research **with explicit authorization**. - -**By using this tool, you agree to:** -- Use this tool only on systems where you have clear written authorization -- Comply with all applicable laws, regulations, and ethical standards -- Take full responsibility for any unauthorized use or misuse -- Not use this tool for any illegal or malicious purposes - -**The developers are not responsible for any misuse!** Please ensure your usage complies with local laws and regulations, and that you have obtained explicit authorization from the target system owner. - -For vulnerability reporting and deployment hardening guidance, see [SECURITY.md](SECURITY.md). - ---- - -Need help or want to contribute? Open an issue or PR—community tooling additions are welcome! - -### Deep assessments - -The Deep Assessment sidebar runs durable assessments independently of chat, with adaptive planning, bounded workers, evidence, approvals, pause/recovery and reports. See [usage, permissions and budget behavior](docs/DEEP_ASSESSMENTS.md). +The project is licensed under [Apache License 2.0](LICENSE); third-party components retain their own licenses and notices. Use it for security work on systems you own or are explicitly authorized to assess, within the agreed scope and applicable law. See [SECURITY.md](SECURITY.md) for security reporting. diff --git a/README_CN.md b/README_CN.md index 1508b290..7b813e0b 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,429 +1,218 @@
- CyberStrikeAI Logo + CyberStrikeAI +

CyberStrikeAI

+

交代目标,让智能体执行、汇报,并在需要时向你请示。

+

中文 · English

+

+ Pi runtime CI + Build and regression CI +

-# CyberStrikeAI +CyberStrikeAI 是基于 **Go + Pi** 的网络安全智能体工作台。你描述希望完成的工作,智能体理解意图、规划步骤、调用工具并保存证据;执行中持续汇报进展,遇到缺失信息或需要你决定的问题时主动请示,得到答复后从原进度继续。 -[中文](README_CN.md) | [English](README.md) +本仓库由 **Sycun** 维护,基于 [AIPentest/CyberStrikeAI](https://github.com/AIPentest/CyberStrikeAI) 持续开发,保留上游历史、许可证与版权声明。当前版本适合团队内测,新功能入口为 **「深度测评 → 交代任务」**。 -> **仓库定位:** 本仓库是 Sycun 基于 [AIPentest/CyberStrikeAI](https://github.com/AIPentest/CyberStrikeAI) 的个人维护线,承接日常修复与优化。[架构重构线](https://github.com/Sycun/csai-decouple-refactor)独立演进;[Sycun/CyberStrikeAI-upstream-fork](https://github.com/Sycun/CyberStrikeAI-upstream-fork) 保留为向官方贡献选定改动的 fork。 -> -> 当前主线包含[深度测评工作台](docs/DEEP_ASSESSMENTS.md)。代理池设置和本地模型上下文优化已整合进当前主线,使用与整合状态见[仓库与分支说明](docs/REPOSITORY_GUIDE.md)。代码已保存、自动化检查通过与真实模型、真实目标验收分别记录。 +[快速上手](#quick-start) · [体验任务闭环](#delegation) · [主要能力](#capabilities) · [架构](#architecture) · [文档](#documentation) · [反馈](#contributing) -**CyberStrikeAI 是 AI 原生网络安全的智能执行中枢——让意图转化为受治理的行动,让证据沉淀为运营记忆,并让每次行动优化下一次行动。** + -CyberStrikeAI 将规划、执行、人工监督、证据与复盘连接在同一个可审计工作空间中。项目基于 Go 构建,使用 Pi 智能体,融合MCP 原生工具、RAG 知识、可视化工作流以及攻击链建模与分析能力,面向已获得明确授权的安全任务。 +## 快速上手 -**从这里开始:** [快速上手](#快速上手一条命令部署) · [中文文档](docs/zh-CN/README.md) · [安全加固](docs/zh-CN/security-hardening.md) +### 1. 准备环境 -> [!IMPORTANT] -> 仅可对自有系统或已获得明确授权的目标使用 CyberStrikeAI。在共享或生产环境启用高风险工具、WebShell 或 C2 前,请先阅读[安全模型](docs/zh-CN/security-model.md)和[安全加固指南](docs/zh-CN/security-hardening.md)。 +| 依赖 | 要求 | 用途 | +| --- | --- | --- | +| Go | 1.25+,以 [go.mod](go.mod) 为准 | 构建服务 | +| Node.js 与 npm | Node.js 22.19+ | 构建和运行 Pi Worker | +| Python | 3.10+,可创建 venv | 启动脚本及 Python 工具依赖 | +| Git | 可用 | 获取源码与更新 | -## 界面与集成预览 +还需要一个支持工具调用的模型渠道,以及本次任务实际使用的工具或 MCP 服务。仓库提供工具配方,**不会自动安装所有安全工具**。首次构建需要访问 Go、npm 和 Python 依赖源。 -
+### 2. 获取源码并启动 -### 系统仪表盘概览 +以下命令用于 macOS / Linux 的 Bash 环境: - - - - - -
-浅色模式
-系统仪表盘(浅色) -
-深色模式
-系统仪表盘(深色) -
- -*仪表盘提供系统运行状态、安全漏洞、工具使用情况和知识库的全面概览,帮助用户快速了解平台核心功能和当前状态。* - -
-查看更多界面截图 - -### 核心功能概览 - - - - - - - - - - - - - - - - - - - - - - -
-Web 控制台
-Web 控制台 -
-任务管理
-任务管理 -
-漏洞管理
-漏洞管理 -
-WebShell 管理
-WebShell 管理 -
-MCP 管理
-MCP 管理 -
-知识库
-知识库 -
-Skills 管理
-Skills 管理 -
-Agent 管理
-Agent 管理 -
-角色管理
-角色管理 -
-系统设置
-系统设置 -
-MCP stdio 模式
-MCP stdio 模式 -
-Burp Suite 插件
-Burp Suite 插件 -
- -
- -
- -## 特性速览 - -### 智能体与编排 - -- 🤖 **智能体执行层**:将自然语言意图转化为受控、可审计的安全行动。 -- 🧩 **Pi 编排**:支持单智能体及 Deep、Plan-Execute、Supervisor 多智能体模式。 -- 🔀 **工作流**:通过 Agent、工具、条件、审批和输出节点构建可复用流程。 -- 🎭 **角色化测试**:为常见安全场景提供聚焦的提示词和工具策略。 - -### 工具与知识扩展 - -- 🧰 **安全工具**:提供 100+ 精选 YAML 工具配方,支持自定义扩展和按角色控制。 -- 🔌 **MCP 集成**:支持 HTTP、stdio、SSE、外部 MCP 联邦和动态工具发现。 -- ⏱️ **弹性工具执行**:阻塞型 MCP/工具调用交给 worker 执行,Agent 只有限等待;支持 `execution_id` 多轮等待、主动取消、单 server 熔断、并发限制和统一输出兜底。 -- 🎯 **Agent Skills**:遵循标准 Skill 目录结构,支持渐进式按需加载。 -- 📚 **知识库**:组合查询改写、向量检索、精排和结果后处理能力。 -- 🖼️ **视觉分析**:使用独立视觉模型分析截图、验证码和 UI,对话中仅保留文字摘要。 - -### 安全治理与审计 - -- 🧑‍⚖️ **人机协同**:支持审批模式、工具白名单、审计 Agent 复核和决策追踪。 -- 🛡️ **调用拦截**:「安全防护」下配置 MCP 执行前正则拦截、提醒模板和试匹配,默认启用政府域名保护。详见[调用拦截](docs/zh-CN/tool-call-guard.md)。 -- 🔐 **平台 RBAC**:支持多用户、系统及自定义角色、权限 Scope、资源归属和显式授权。 -- 🔒 **安全与审计**:提供登录保护、审计日志、SQLite 持久化和行动证据留存。 -- 📄 **结果治理**:数据库保存与 Agent 实际看到的同一份兜底后工具结果,恢复路径会再次防御历史超大输出,前端详情也有展示保护。详见[工具执行治理](docs/zh-CN/tool-execution-governance.md)。 - -### 安全运营管理 - -- 📁 **对话管理**:支持分组、置顶、重命名和批量管理。 -- 📂 **项目与攻击链**:关联跨会话事实、风险评分、图谱视图和步骤回放。 -- 🗂️ **资产管理**:统一归档和去重域名、IP、端口与服务,支持 XLSX/CSV 导入导出、高级筛选与保存视图、责任和业务属性、跨页批量维护、重复资产合并,并跟踪扫描覆盖、关联漏洞和风险状态。详见[资产管理指南](docs/zh-CN/asset-management.md)。 -- 🛡️ **漏洞管理**:支持严重程度分级、状态流转、过滤和统计看板。 -- 📋 **批量任务**:支持任务队列、编辑、状态跟踪和结果留存。 -- 📱 **机器人接入**:支持个人微信、企业微信、钉钉、飞书、Telegram、Slack、Discord 和 QQ。 - -### 授权安全操作 - -- 🐚 **WebShell 管理**:提供连接管理、虚拟终端、文件操作和 AI 辅助工作流。 -- 📡 **内置 C2**:提供监听器、加密 Beacon、会话、任务队列、Payload 辅助和实时事件。 - -> WebShell、C2 及其他高风险能力仅限自有系统或已获得明确授权的测试环境。使用前请阅读[安全模型](docs/zh-CN/security-model.md)和[安全加固指南](docs/zh-CN/security-hardening.md)。 - -## 插件(Plugins) - -可选集成在 `plugins/` 目录下。 - -- **Burp Suite 插件**:`plugins/burp-suite/cyberstrikeai-burp-extension/` - 构建产物:`plugins/burp-suite/cyberstrikeai-burp-extension/dist/cyberstrikeai-burp-extension.jar` - 说明文档:`plugins/burp-suite/cyberstrikeai-burp-extension/README.zh-CN.md` -- **浏览器扩展(Chrome / Edge)**:`plugins/browser-extension/cyberstrikeai-browser-extension/` - 在 DevTools 中捕获 Network 流量并发送到 CyberStrikeAI 进行 AI 辅助安全测试,能力与 Burp 插件对齐。 - 安装:`chrome://extensions/` → 加载已解压 → F12 → **CyberStrikeAI** 标签页 - 打包产物:`plugins/browser-extension/cyberstrikeai-browser-extension/dist/cyberstrikeai-browser-extension.zip` - 说明文档:`plugins/browser-extension/cyberstrikeai-browser-extension/README.zh-CN.md` - -## 工具概览 - -系统预置 100+ 渗透/攻防工具,覆盖完整攻击链: - -
-查看完整工具分类 - -- **网络扫描**:nmap、masscan、rustscan、arp-scan、nbtscan -- **Web 应用扫描**:sqlmap、nikto、dirb、gobuster、feroxbuster、ffuf、httpx -- **漏洞扫描**:nuclei、wpscan、wafw00f、dalfox、xsser -- **子域名枚举**:subfinder、amass、findomain、dnsenum、fierce -- **网络空间搜索引擎**:fofa_search、zoomeye_search、quake_search、shodan_search -- **API 安全**:graphql-scanner、arjun、api-fuzzer、api-schema-analyzer -- **容器安全**:trivy、clair、docker-bench-security、kube-bench、kube-hunter -- **云安全**:prowler、scout-suite、cloudmapper、pacu、terrascan、checkov -- **二进制分析**:gdb、radare2、ghidra、objdump、strings、binwalk -- **漏洞利用**:metasploit、msfvenom、pwntools、ropper、ropgadget -- **密码破解**:hashcat、john、hashpump -- **取证分析**:volatility、volatility3、foremost、steghide、exiftool -- **后渗透**:linpeas、winpeas、mimikatz、bloodhound、impacket、responder -- **CTF 实用工具**:stegsolve、zsteg、hash-identifier、fcrackzip、pdfcrack、cyberchef -- **系统辅助**:exec、create-file、delete-file、list-files、modify-file - -
- -工具定义、自定义方式与使用说明见 [tools/README.md](tools/README.md)。 - -## 基础使用 - -### 快速上手(一条命令部署) - -**环境要求:** -- Go 1.25+([下载安装](https://go.dev/dl/),以 `go.mod` 为准) -- Python 3.10+ ([下载安装](https://www.python.org/downloads/)) -- Node.js 22.19+ (Pi runtime) - -**一条命令部署:** ```bash -git clone https://github.com/Sycun/CyberStrikeAI.git +git clone --branch main https://github.com/Sycun/CyberStrikeAI.git cd CyberStrikeAI -chmod +x run.sh && ./run.sh +cp config.example.yaml config.yaml ``` -`run.sh` 脚本会自动完成: -- ✅ 检查并验证 Go 和 Python 环境 -- ✅ 创建 Python 虚拟环境 -- ✅ 安装 Python 依赖包 -- ✅ 下载 Go 依赖模块 -- ✅ 编译构建项目 -- ✅ 启动服务器 +本机体验时,先将 `config.yaml` 中已有的 `server.host` 改为 `127.0.0.1`,保留其他配置。然后启动: -**验证是否启动成功:** - -1. 确认终端显示 `● ONLINE`,并在其后给出实际 Web UI 地址。 -2. 打开该地址;默认 HTTPS 使用本地自签证书,首次访问需接受一次浏览器证书提示。 -3. 全新安装时,妥善保存 `ADMIN SETUP REQUIRED` 下仅展示一次的 `admin` 密码,登录后立即修改。 - -**网络默认:** `run.sh` 会以 **`--https`** 并传入项目根 **`config.yaml`** 启动(本机自签证书,多路流式场景更稳)。只要明文 HTTP 用 **`./run.sh --http`**。生产环境在 **`config.yaml`** 的 **`server.tls_cert_path` / `server.tls_key_path`** 配正式证书(见文件内注释)。手动启动可加 **`--https`** 或环境变量 **`CYBERSTRIKE_HTTPS=1`**;`-config` 写错时程序会在终端提示正确写法。 - -**首次配置:** -1. **配置 AI 通道**(首次使用前必填) - - 启动后在浏览器打开 **`https://127.0.0.1:8080/`**(或 **`https://localhost:8080/`**;端口以 `config.yaml` 中 **`server.port`** 为准,默认 8080),并按提示信任自签证书。若使用 **`./run.sh --http`**,则改用 **`http://`** 访问。 - - 进入 `系统设置` → `基本设置` → `AI 通道配置`,新增或编辑通道,填写 API 提供商、Base URL、API Key、模型和 Token 上限,点击 **保存更改**。左侧通道列表支持设为默认、复制、删除和批量探活。 - ```yaml - ai: - default_channel: openai-main - channels: - openai-main: - name: OpenAI Main - provider: openai_compatible - api_key: "${OPENAI_API_KEY}" - base_url: "https://api.openai.com/v1" # 或 https://api.deepseek.com/v1 - model: "gpt-4o" # 或 deepseek-chat, qwen3-max 等 - max_total_tokens: 120000 - max_completion_tokens: 16384 - ``` - - 或启动前直接编辑 `config.yaml` 文件。`ai.default_channel` 会作为新对话和未显式选择通道任务的默认模型;对话页也可以在会话设置里选择某个已保存通道。 -2. **登录系统** - 首次启动时控制台会显示自动生成的 `admin` 初始密码;也可在「平台权限 → 用户管理」中创建账号 -3. **安装安全工具(可选)** - 按需安装 `tools/` 目录中的工具;未安装的工具在执行时会自动跳过或改用替代方案。常用示例: - - **macOS(Homebrew):** - ```bash - brew install nmap masscan sqlmap nikto gobuster ffuf hydra hashcat nuclei subfinder - ``` - - **Linux(Kali / Debian / Ubuntu):** - ```bash - sudo apt update - sudo apt install -y nmap masscan sqlmap nikto gobuster hydra hashcat john binwalk - # 部分发行版需自行安装:ffuf、nuclei、subfinder 等可用 go install 或见各工具官网 - ``` - - 完整工具列表见 `tools/` 目录;各工具安装方式以官方文档为准。 - -**其他启动方式:** ```bash -# 直接运行(需自行配环境);与 run.sh 默认一致可加 --https -go run ./cmd/server --https - -# 手动编译 -go build -o cyberstrike-ai ./cmd/server -./cyberstrike-ai --https +bash run.sh --http ``` -若日志出现 `client sent an HTTP request to an HTTPS server`,说明仍有客户端用 **`http://`** 访问只提供 HTTPS 的端口,请改为 **`https://`**。 +脚本会准备 Pi Worker、创建 Python 虚拟环境、安装依赖并构建服务。默认访问 [http://127.0.0.1:8080/](http://127.0.0.1:8080/);端口以配置和终端输出为准。 -**说明:** Python 虚拟环境(`venv/`)由 `run.sh` 自动创建和管理。需要 Python 的工具(如 `api-fuzzer`、`http-framework-test` 等)会自动使用该环境。 +不加 `--http` 时,`run.sh` 默认使用 HTTPS;未配置证书时使用本地自签证书。团队共享部署的监听地址、证书和访问控制见[部署指南](docs/zh-CN/deployment.md)。 -### 版本升级与兼容性 +### 3. 完成首次配置 -**优先用平台自带的「一键更新」**(控制台「系统设置 → 一键更新」,或 `./cyberstrike-ai -update` / -`-check-update` / `-update-rollback`):它从**更新源仓库**(默认官方仓库,可一处配置改成自己的二开或镜像) -拉取默认分支的最新代码,快进后重编译并原子换二进制,你的 `roles/skills/tools/agents/data/config.yaml` -会被原样保留(结果里逐个点名保留了什么,只有 `config.yaml` 的 `version` 字段会随新代码同步,让页头版本号与代码对上), -本地源码有改动或本地历史与更新源分叉时它会拒绝而不是覆盖。 -详见 [部署指南](docs/zh-CN/deployment.md)。 +1. 使用终端 `ADMIN SETUP REQUIRED` 提示中的初始 `admin` 密码登录,然后修改密码。 +2. 在 **系统设置 → 基本设置 → AI 通道配置** 中填写提供商、Base URL、API Key 和模型,并设为默认渠道。示例配置中的凭据只是占位符。 +3. 安装本次任务需要的本地工具,或接入可用的外部 MCP 服务。确认工具能正常运行后,再将它交给智能体使用。 +4. 多人共用服务时,在 **平台权限 → 添加成员** 中为队友创建各自的账号和权限。 -`upgrade.sh` 仍然可用:本目录是 git 工作树时它就是上面那条命令的薄壳;不是 git 工作树(tarball 安装)时 -才回落到"下载 GitHub Release 包 + rsync"的老路径,此时源码仓库由 `--repo owner/name` 或 `GITHUB_REPO` -决定(都不给才用内置默认值,并会警告说明代码来自哪个仓库)。 +完整配置以 [config.example.yaml](config.example.yaml) 为准;模型渠道、本地模型与上下文设置见[配置参考](docs/zh-CN/configuration.md)和[配置画像](docs/zh-CN/configuration-profiles.md)。 -更新源是 `config.yaml` `update` 段里的一个仓库地址(`repo`),也可以在控制台「一键更新」页填写保存 -(跟随官方仓库、自己的二开、别人的二开或镜像都只是这一处;不写就是官方仓库);解压安装(目录里没有 git) -也能在同一页「预览并接入」后进入一键更新。 +
+手动构建与启动 -1. (首次使用)启用脚本:`chmod +x upgrade.sh` -2. 升级:`./upgrade.sh`(可选参数:`--check`、`--tag vX.Y.Z`、`--repo owner/name`、`--no-venv`、`--yes`)。本地的 `tools/`、`roles/`、`skills/`、`agents/` 会始终保留不被覆盖。 -3. 脚本会备份你的 `config.yaml` 和 `data/`,升级代码,更新 `config.yaml` 的 `version` 字段后重启服务。 +完成上述配置后,也可以分别构建 Pi Worker 和 Go 服务: -推荐的一键指令: -`chmod +x upgrade.sh && ./upgrade.sh --yes` +```bash +bash scripts/build-pi-runtime.sh +go build -o cyberstrike-ai ./cmd/server +./cyberstrike-ai -config config.yaml --http +``` -如果升级失败:git 工作树里直接 `./cyberstrike-ai -update-rollback`(回到那次更新前的提交与二进制); -tarball 安装则从 `.upgrade-backup/` 恢复,或手动拷回 `data/` 和 `config.yaml` 后再运行 `./run.sh`。 +部署需要运行时源码及匹配的 Pi Worker 构建包,或在目标机器重新构建;只复制 Go 二进制不足以运行智能体。Python 工具依赖需另行准备。详见 [Pi 运行时说明](docs/zh-CN/pi-runtime.md)。 -依赖/提示(只有 tarball 路径用得到): -* 需要 `curl` 或 `wget` 用于下载 GitHub Release 包。 -* 建议/需要 `rsync` 用于安全同步代码。 -* 如果遇到 GitHub API 限流,运行前设置 `export GITHUB_TOKEN="..."` 再执行 `./upgrade.sh`。 +
-⚠️ **升级前必读:** 请查看目标版本的 Release Notes,确认配置、数据库和 API 是否变化。即使只是补丁版本也应先备份,不能仅凭版本号判断兼容性。 + +## 体验「交代工作 → 执行 → 汇报 → 请示 → 继续」 -## 配置 +进入 **深度测评 → 交代任务**,选择项目(可选)、允许使用的工具、模型与预算,然后描述期望的结果。例如,在材料栏列出可读取的本地报告文件后: -请以 [`config.example.yaml`](config.example.yaml) 作为权威配置模板,只复制当前环境需要的配置。最少需要配置服务监听地址和一个 AI 通道: +> 帮我整理这个项目已有的测试材料,报告已验证的结果和证据缺口。只读取材料栏列出的本地文件,不访问新的目标。按模块组织报告,每完成一个阶段告诉我做了什么、还缺什么;需要我决定时直接问我。 + +```mermaid +flowchart LR + A[描述目标] --> B[理解意图] + B --> C[规划与执行] + C --> D[阶段汇报] + D --> C + D --> E[验收与交付] + B -->|信息不足| F[主动请示] + C -->|需要决定| F + F --> G[用户答复] + G -->|接单澄清| B + G -->|执行决策| C +``` + +- **描述不完整也能接单**:先形成任务理解草稿;关键目标、范围或验收条件不明确时,提出具体问题。 +- **明确后自主执行**:使用所选工具推进工作,保存步骤状态、工具结果和执行记录。 +- **阶段报告可核对**:展示已完成、未完成、阻碍和下一步,关联执行证据。 +- **等待只影响相关工作**:某一步需要答复时,已有的独立步骤仍可继续;没有可继续的工作后释放运行资源。 +- **答复后接着做**:点击「答复并继续」,恢复原步骤上下文;重复提交相同答复不会重复执行。 +- **问答与进度持久化**:关闭页面不丢失任务;服务重启后仍可查看待答问题和已保存的结果。 + +普通请示与工具审批分开处理。当前闭环入口是工作台与 API;聊天和机器人自动分流、跨项目名称消歧、站外通知与 ARTEX 统一适配器属于后续工作。 + +使用方式、恢复语义和 API 示例见[任务委派与主动请示](docs/zh-CN/task-delegation.md)。 + + + +## 主要能力 + +| 能力 | 可以做什么 | 说明 | +| --- | --- | --- | +| Pi 智能体 | 单智能体、Deep、Plan-Execute、Supervisor 编排 | [智能体与角色](docs/zh-CN/agent-and-role-guide.md) | +| 持久任务 | 规划、依赖步骤、有限并发、预算、暂停恢复与验收 | [任务委派](docs/zh-CN/task-delegation.md) | +| 工具与 Skills | YAML 工具配方、MCP 接入、角色工具集合、按需加载技能 | [工具](tools/README.md) · [Skills](skills/README.md) | +| 可视化工作流 | 组合智能体、工具、条件和人工审批节点 | [工作流](docs/zh-CN/workflow-graph.md) | +| 知识与证据 | RAG 检索、项目事实、工具记录、报告和攻击链分析 | [知识库](docs/zh-CN/knowledge-base.md) | +| 项目工作空间 | 资产、漏洞、对话、批量任务与跨会话资料管理 | [资产管理](docs/zh-CN/asset-management.md) | +| 人工监督 | RBAC、工具审批、调用拦截和审计日志 | [安全模型](docs/zh-CN/security-model.md) | +| 外部集成 | Burp Suite、浏览器扩展、机器人和外部 MCP | [插件](#integrations) · [MCP](docs/zh-CN/mcp-federation.md) | + +专用操作还包括 [WebShell](docs/zh-CN/webshell.md) 和 [C2](docs/zh-CN/c2.md)。按任务配置实际需要的能力;工具配方不代表对应程序已经安装或通过了当前环境的验收。 + + + +## 架构 + +| 组成 | 职责 | +| --- | --- | +| **Go 服务与任务引擎** | 管理任务状态、依赖、预算、用户问答、工具执行与证据 | +| **Pi 运行时** | 模型交互、智能体工具循环、会话、上下文压缩、steering 与工具检索 | +| **工具网关** | 将调用交给 MCP 或本地工具,沿用角色、权限、审批和执行监控 | +| **SQLite 与 Pi 会话** | 分别保存业务状态与证据、模型会话与压缩记录 | +| **Web 工作台** | 展示任务、问题、阶段报告、执行轨迹与项目资料 | + +当前仅使用 **Pi 1.5.2**,Eino 执行内核与依赖已移除。深度测评由 Go 持久任务引擎控制执行,Pi 提供单步模型提案;它与聊天智能体的自动工具循环共用运行时,但各自管理任务生命周期。 + +可选的 **DSH-Purge 启发式提示增强**提供能力选择、主/子代理任务锚点和模型定制指令,支持关闭;工具权限和人工审批仍由 Go 服务处理。实现、来源和许可证见 [Pi 运行时说明](docs/zh-CN/pi-runtime.md)与[第三方声明](runtime/pi/THIRD_PARTY_NOTICES.md)。 + + + +## 插件与界面 + +| 集成 | 使用方式 | 文档与下载 | +| --- | --- | --- | +| Burp Suite | 将选定 HTTP 请求交给 CyberStrikeAI 分析 | [安装说明](plugins/burp-suite/cyberstrikeai-burp-extension/README.zh-CN.md) · [JAR](plugins/burp-suite/cyberstrikeai-burp-extension/dist/cyberstrikeai-burp-extension.jar) | +| Chrome / Edge | 在 DevTools 的 CyberStrikeAI 标签页捕获并发送请求 | [安装说明](plugins/browser-extension/cyberstrikeai-browser-extension/README.zh-CN.md) · [ZIP](plugins/browser-extension/cyberstrikeai-browser-extension/dist/cyberstrikeai-browser-extension.zip) | + +
+查看工作台界面 + + + + + + + + + + + + + + +
系统仪表盘
系统仪表盘
深色主题
深色主题
对话控制台
对话控制台
知识库
知识库
MCP 管理
MCP 管理
Burp Suite 插件
Burp Suite 插件
+ +仓库中的界面截图用于展示已有功能;任务委派的新入口和操作流程以[使用说明](docs/zh-CN/task-delegation.md)为准。 + +
+ +## 更新与迁移 + +新安装的 [config.example.yaml](config.example.yaml) 已将更新源设为本仓库: ```yaml -server: - host: "127.0.0.1" - port: 8080 -ai: - default_channel: openai-main - channels: - openai-main: - provider: openai_compatible - api_key: "${OPENAI_API_KEY}" - base_url: "https://api.openai.com/v1" - model: "your-model" +update: + repo: https://github.com/Sycun/CyberStrikeAI ``` -`openai` 是兼容旧版本的运行时字段,新配置优先维护 `ai.channels`。不要提交真实凭证。将服务暴露到 localhost 之外前,请阅读[配置参考](docs/zh-CN/configuration.md)、[推荐配置画像](docs/zh-CN/configuration-profiles.md)和[安全加固指南](docs/zh-CN/security-hardening.md)。 +已有安装请在 **系统设置 → 一键更新** 核对来源。`update.repo` 留空仍会回到官方上游,不会自动选择这个个人维护版本。更新流程会构建匹配源码的 Pi Worker;部署步骤见[部署指南](docs/zh-CN/deployment.md)。 -## 相关文档 +从 Eino 版本迁移时,先备份运行配置和数据,并完成或导出旧工作流:**旧 Eino 工作流二进制检查点不能在新版直接续跑**。旧 API 路由、配置键和历史记录只保留数据兼容,不提供旧引擎切换。详见[迁移说明](docs/zh-CN/pi-runtime.md)。 -- **新用户:** [部署指南](docs/zh-CN/deployment.md) → [配置参考](docs/zh-CN/configuration.md) → [排错指南](docs/zh-CN/troubleshooting.md) -- **运维人员:** [配置画像](docs/zh-CN/configuration-profiles.md) → [安全加固](docs/zh-CN/security-hardening.md) → [运维 Runbooks](docs/zh-CN/runbooks.md) -- **集成开发:** [API 参考](docs/zh-CN/api-reference.md) → [API Recipes](docs/zh-CN/api-recipes.md) → [MCP 联邦](docs/zh-CN/mcp-federation.md) -- **项目贡献:** [开发者指南](docs/zh-CN/developer-guide.md) → [测试指南](docs/zh-CN/testing.md) → [贡献规范](docs/zh-CN/contributing-guide.md) -- **全部专题:** [中文文档](docs/zh-CN/README.md) · [双语文档索引](docs/README.md) +## 验证状态 -## 项目结构 +当前版本已进行 Go 全量与竞态测试、Pi SDK 集成测试、前端回归及本地界面检查。隔离的真实模型验收走通了「模糊任务 → 澄清 → 用户答复 → 回声工具执行 → 阶段报告 → 完成」,输入和工具结果均为合成材料。 -``` -CyberStrikeAI/ -├── cmd/ # Web 服务、MCP stdio 入口及辅助工具 -├── internal/ # Agent、MCP 核心、路由、C2(`internal/c2`)与执行器 -├── web/ # 前端静态资源与模板 -├── tools/ # YAML 工具目录(含 100+ 示例) -├── roles/ # 角色配置文件目录(含 12+ 预设安全测试角色) -├── skills/ # Agent Skills 目录(SKILL.md + 可选文件;示例 cyberstrike-pi-demo) -├── agents/ # 多代理 Markdown(orchestrator.md + 子代理 *.md) -├── docs/ # 专题文档(部署、配置、安全、API、知识库、C2、WebShell 等) -├── images/ # 文档配图 -├── config.yaml # 运行配置 -├── run.sh # 启动脚本 -└── README*.md -``` +这些验证支持团队内测;复杂长任务、各模型渠道的兼容性,以及意图识别准确率、成本和效果仍需继续评估。最新检查见 [GitHub Actions](https://github.com/Sycun/CyberStrikeAI/actions)。 -## 基础体验示例 + -``` -扫描 192.168.1.1 的开放端口 -对 192.168.1.1 做 80/443/22 重点扫描 -检查 https://example.com/page?id=1 是否存在 SQL 注入 -枚举 https://example.com 的隐藏目录与组件漏洞 -获取 example.com 的子域并批量执行 nuclei -``` +## 文档导航 -## 进阶剧本示例 +| 你想做什么 | 从这里开始 | +| --- | --- | +| 部署并配置模型 | [部署](docs/zh-CN/deployment.md) · [配置](docs/zh-CN/configuration.md) · [排错](docs/zh-CN/troubleshooting.md) | +| 使用任务委派 | [操作与 API](docs/zh-CN/task-delegation.md) · [设计背景](docs/zh-CN/task-delegation-design.md) | +| 调整智能体和工具 | [Pi 运行时](docs/zh-CN/pi-runtime.md) · [智能体与角色](docs/zh-CN/agent-and-role-guide.md) · [工具配方](tools/README.md) | +| 接入自己的应用 | [API 参考](docs/zh-CN/api-reference.md) · [API 示例](docs/zh-CN/api-recipes.md) · [MCP](docs/zh-CN/mcp-federation.md) | +| 维护团队服务 | [安全加固](docs/zh-CN/security-hardening.md) · [运维手册](docs/zh-CN/runbooks.md) | +| 参与开发 | [开发者指南](docs/zh-CN/developer-guide.md) · [测试](docs/zh-CN/testing.md) · [仓库说明](docs/REPOSITORY_GUIDE.md) | -``` -加载侦察剧本:先 amass/subfinder,再对存活主机进行目录爆破。 -挂载基于 Burp 的外部 MCP,完成认证流量回放并回传到攻击链。 -将 5MB nuclei 报告压缩并生成摘要,附加到对话记录。 -构建最新一次测试的攻击链,只导出风险 >= 高的节点列表。 -``` +全部专题见[中文文档](docs/zh-CN/README.md)与[双语索引](docs/README.md)。 -## 404星链计划 - + -CyberStrikeAI 现已加入 [404星链计划](https://github.com/knownsec/404StarLink) +## 反馈与贡献 -## TCH Top-Ranked Intelligent Pentest Project -
- - TCH Top-Ranked Intelligent Pentest Project - -
+请在[本仓库 Issues](https://github.com/Sycun/CyberStrikeAI/issues)反馈内测问题。附上提交版本、操作系统、模型协议/渠道类型、复现步骤和脱敏日志;不要上传 API Key、登录凭据或真实项目的敏感材料。欢迎提交工具适配、体验改进与回归用例的 PR。 +本仓库与官方上游独立发布;上游项目及其社区信息请参阅 [AIPentest/CyberStrikeAI](https://github.com/AIPentest/CyberStrikeAI)。感谢原项目作者、贡献者,以及 Pi、MCP 和其他开源项目。 ---- +## 许可证与使用范围 -## 社区与支持 - -- 在 [Discord](https://discord.gg/8PjVCMu8Zw) 加入社区。 - -
-企业微信群 - -CyberStrikeAI 企业微信群二维码 - -
- -## 许可证 - -CyberStrikeAI 采用 **Apache License 2.0** 开源许可。 -完整条款见仓库根目录 [LICENSE](LICENSE) 文件。 - ---- - -## ⚠️ 免责声明 - -**本工具仅供教育和授权测试使用!** - -CyberStrikeAI 是一个专业的安全测试平台,旨在帮助安全研究人员、渗透测试人员和IT专业人员在**获得明确授权**的情况下进行安全评估和漏洞研究。 - -**使用本工具即表示您同意:** -- 仅在您拥有明确书面授权的系统上使用此工具 -- 遵守所有适用的法律法规和道德准则 -- 对任何未经授权的使用或滥用行为承担全部责任 -- 不会将本工具用于任何非法或恶意目的 - -**开发者不对任何滥用行为负责!** 请确保您的使用符合当地法律法规,并获得目标系统所有者的明确授权。 - -安全问题报告与部署加固建议见 [SECURITY.md](SECURITY.md)。 - ---- - -欢迎提交 Issue/PR 贡献新的工具模版或优化建议! - -### 深度测评 - -侧边栏「深度测评」提供独立于聊天的长程任务:动态规划、有限并发执行、证据回流、审批、暂停恢复与报告。使用方法、权限及预算说明见 [深度测评文档](docs/DEEP_ASSESSMENTS.md)。 +项目遵循 [Apache License 2.0](LICENSE),第三方组件保留各自许可证与声明。仅用于自有系统或已获明确授权的安全工作;使用者应遵守授权范围和适用法律。安全问题报告方式见 [SECURITY.md](SECURITY.md)。