三只貓
Rich Mindset Zone
richmindsetzone.com
← All posts

多 Agent 自動化滲透測試:LLM Security 的下一個戰場

多 Agent 自動化滲透測試:LLM Security 的下一個戰場

講一個反常識嘅觀察:2026 年的今日,最驚 LLM 嘅唔係內容審查部門,而係 CISO。點解?因為 LLM 嘅能力曲線已經越過咗一條關鍵門檻——佢哋唔再只係被動生成文本,而係可以主動操作瀏覽器、執行指令、調用 API、同埋自主規劃多步驟攻擊鏈。當一個 GPT-4o 級別的 agent 可以連續 45 分鐘無間斷咁嘗試滲透,唔使食飯唔使瞓覺,仲可以自我修正攻擊策略,傳統嘅 penetration testing 公司嘅 business model 面臨根本性衝擊。

Multi-Agent 漏洞發現:從 Brute Force 到策略推理

傳統自動化滲透工具(Nuclei、Metasploit 呢類)本質係 signature-based:佢哋跟住 playbook 行,掃到對應 fingerprint 就 trigger 對應 payload。呢種方法嘅天花板好明確——佢哋唔會「諗」。而 Multi-Agent 架構嘅核心突破在於引入咗推理層。一個典型嘅設定係三個 agent:Planner(制定攻擊策略)、Executor(執行指令並回傳結果)、Analyzer(分析 output 並推斷下一步)。Planner 每次只行一步,睇住 Analyzer 嘅 feedback 再調整,形成一個 closed-loop reasoning cycle。

實際測試中,呢種方法喺挖掘 business logic vulnerability 方面效果顯著。舉個例,傳統 scanner 好難 detect 到「先註冊一個帳號、再修改 email、然後用 password reset 嘅 token 去提權」呢類跨步驟攻擊,因為每一步單獨睇都係正常操作。但 Multi-Agent system 可以將成條 chain 建模成一個 graph search problem,用類似 Monte Carlo Tree Search 嘅方式去 explore 攻擊路徑。某啲研究顯示,喺複雜 web application 嘅測試中,agent-based 方法嘅漏洞覆蓋率比傳統 scanner 高出 3-5 倍,特別係喺 access control 同 workflow bypass 呢類需要「理解業務邏輯」嘅場景。

MCP/VLLM 嘅攻擊面:Protocol 層嘅新戰場

Model Context Protocol(MCP)喺 2025 年開始普及之後,LLM agent 可以直接連接 database、file system、API gateway——呢個係極大嘅生產力提升,同時亦係災難性嘅攻擊面擴張。最早嘅 MCP 實作普遍冇做足夠嘅 permission scoping,agent 拎到一個 tool access 就等同於有咗成個 system 嘅 capability。你諗下:一個 prompt injection 如果成功令 agent 執行 DELETE FROM users,呢個唔係 agent 嘅錯,而係 protocol layer 冇 enforce least privilege。

VLLM(Various LLM,即係 self-hosted 開源模型)嘅情況更棘手。因為開源模型嘅 safety alignment 普遍弱過閉源模型,加上部署者往往唔會做額外嘅 guardrail,攻擊者可以透過 adversarial suffix 或者 jailbreak template 直接繞過模型本身嘅限制。更恐怖嘅係 agent 之間嘅 cross-contamination:一個 compromised agent 可以污染 shared memory pool 或者 tool execution result,令其他 agent「學壞」。呢個概念類似 software supply chain attack,但速度更快、更難 detect。

防守策略:Agent 打 Agent 嘅時代

防守方面,我睇到一個明確嘅趨勢:用 agent 去打 agent。傳統嘅 WAF 同 RASP 喺面對 adaptive attacker 嘅時候太被動。新一代嘅防守系統開始採用 adversary emulation agent,佢哋同攻擊 agent 共用同一套 infrastructure,但目標係「搵自己系統嘅弱點然後自動修補」。呢個做法有幾個好處:第一,防守 agent 同攻擊 agent 嘅能力對等,唔會出現「道高一尺魔高一丈」嘅資訊不對稱;第二,自動修補可以做到 sub-minute 級別嘅 response time,而唔係等 security team 第二朝起身先睇 alert。

另一條重要戰線係 MCP 嘅 security hardening。Protocol 層應該強制要求 tool declaration 入面聲明每項操作嘅 risk level,agent runtime 根據 risk level 同 context 嘅 sensitivity 去做 dynamic consent。舉例:一個 agent 要 read 一個 public file,唔使 confirmation;但 write 到 production database,就一定要 multi-agent consensus(至少兩個 agent 獨立判斷之後先執行)。呢個概念叫做「Agent-side Request Forgery Prevention」,本質上係將 browser 嘅同源政策概念移植到 agent ecosystem。

商業化可能:Product 同 Service 嘅新賽道

講到尾,呢個領域嘅商業機會喺邊?我睇到三個方向。第一,Agent Security Audit as a Service:好似而家啲 startup 做 smart contract audit 咁,專門幫企業嘅 LLM agent deployment 做 security review,包括 prompt security、tool permission model、agent-to-agent communication encryption。第二,Red Team Agent Platform:一個 SaaS 平台俾 security team 用 agent 去做持續性滲透測試,唔係一年一次嘅 engagement,而係 24/7 嘅 automated red teaming。第三,MCP Security Gateway:一個 middleware layer,坐喺 agent 同 tool 之間做 policy enforcement、audit logging、同 anomaly detection,類似當年的 API gateway 市場。

呢個市場嘅 TAM 同當年嘅 Cloud Security(Cloudflare、Wiz、Zscaler 呢類公司)嘅早期階段好相似——大家都知 security 重要,但未意識到新 paradigm 需要全新嘅工具。如果你而家開始 build,你唔需要同 CrowdStrike 或者 Palo Alto 競爭,你要做嘅係定義一個新 category。

具體建議:揀一個垂直場景深挖。唔好做 general purpose agent security platform——你贏唔到。專注 healthcare / finance / legal 其中一個領域,理解佢哋嘅 compliance requirement,然後用 agent 去 automate 佢哋嘅 security testing workflow。呢班客願意俾錢,而且 switching cost 高。