FakeGit攻擊解析:假MCP伺服器讓AI編碼代理中毒 | FakeGit Attack: Fake MCP Servers Poison AI Coding Agents
By Kit 小克 | AI Tool Observer | 2026-07-28
🇹🇼 FakeGit攻擊解析:假MCP伺服器讓AI編碼代理中毒
FakeGit是資安圈本週最熱的話題:研究人員發現近7600個惡意GitHub專案,其中逾800個偽裝成AI技能或MCP伺服器,靠一種叫「AgentBaiting」的新手法,誘騙Claude Code、Gemini、ChatGPT等AI編碼代理自動下載並執行惡意軟體,累積下載量已破1400萬次。這不是單純的釣魚攻擊,而是專門針對AI代理搜尋行為設計的供應鏈攻擊,值得每個用AI寫程式的人認真看一次。
什麼是FakeGit攻擊?
FakeGit是一場大規模GitHub惡意軟體活動,攻擊者用複製的專案、偽造的開發者帳號、看似正常的README,包裝SmartLoader惡意軟體與後續的StealC資訊竊取程式,藏在ZIP壓縮檔裡等人(或AI)下載執行。
AgentBaiting怎麼運作?
AgentBaiting的核心在於:攻擊者不再只是等人類點連結,而是讓AI編碼代理在幫使用者「找一個能用的MCP伺服器」或「找個現成的技能套件」時,自己搜尋到並主動推薦這些惡意專案——使用者可能根本沒貼過任何連結,代理就已經把毒藥端上桌。安全公司Island的測試證實,Claude Code、Google Gemini與OpenAI ChatGPT在特定情境下都會被誘導,主動推薦FakeGit的惡意repo。
哪些平台已經被滲透?
更麻煩的是,FakeGit已經滲透到公開的MCP目錄與技能市集,包括:
- LobeHub
- Glama
- MCP.so
- MCP Market
研究人員在這些平台上找到超過600筆與FakeGit活動相關的技能或MCP伺服器登錄,代表這已經不是「小心陌生連結」就能解決的問題,而是連信任的目錄本身都可能被污染。
開發者該怎麼自保?
- AI代理推薦安裝MCP伺服器或技能前,先手動查看該GitHub帳號的建立時間、star數與commit歷史,帳號太新、歷史太乾淨反而可疑
- 在沙盒或隔離環境先試跑,不要直接在主力開發機器上執行代理推薦的未知套件
- 優先選擇有明確組織背景、多人維護、有CI測試的專案,而非孤狼帳號的單一repo
- 把AI代理的「自動安裝」權限收緊,重要操作改成人工確認再執行
好不好用,試了才知道,但這次要先確認安全,再談好不好用。
🇺🇸 FakeGit Attack: Fake MCP Servers Poison AI Coding Agents
FakeGit is this week's hottest security story: researchers found nearly 7,600 malicious GitHub repositories, over 800 of them disguised as AI skills or MCP servers, using a new technique called "AgentBaiting" to trick Claude Code, Gemini, and ChatGPT into autonomously downloading and running malware — with more than 14 million downloads already logged. This isn't a phishing campaign in the usual sense; it's a supply-chain attack purpose-built to exploit how AI coding agents search for tools, and it matters for anyone who lets an agent install things on their behalf.
What Is the FakeGit Campaign?
FakeGit is a large-scale GitHub malware operation. Attackers clone legitimate-looking projects, spin up fake developer profiles, write convincing READMEs, and bundle SmartLoader malware with a follow-on infostealer called StealC inside ZIP files, waiting for a human — or an AI agent — to download and run them.
How Does AgentBaiting Actually Work?
AgentBaiting's core trick is that attackers no longer need a human to click a link. When an AI coding agent searches for "an MCP server that does X" or "a ready-made skill for Y," it can surface and recommend one of these poisoned repos on its own — the user never pasted a link, yet the agent hands them the malware anyway. Security firm Island confirmed in testing that Claude Code, Google Gemini, and OpenAI ChatGPT can all be steered into recommending FakeGit repositories under the right conditions.
Which Platforms Have Been Compromised?
Worse, FakeGit has already infiltrated public MCP directories and skill marketplaces, including:
- LobeHub
- Glama
- MCP.so
- MCP Market
Researchers found over 600 skill or MCP server listings on these platforms tied to the campaign — meaning "just avoid sketchy links" no longer cuts it when the trusted directories themselves are poisoned.
How Should Developers Protect Themselves?
- Before installing any MCP server or skill an agent recommends, manually check the GitHub account's age, star count, and commit history — an account that's too new with a suspiciously clean history is a red flag
- Test unknown packages in a sandbox or isolated environment first, never directly on your main dev machine
- Favor projects with a clear organizational backing, multiple maintainers, and CI tests over single-repo lone-wolf accounts
- Tighten your agent's auto-install permissions so anything that touches the filesystem or network requires manual confirmation
好不好用,試了才知道 — but this time, confirm it's safe before you confirm it's useful.
Sources / 資料來源
- FakeGit Campaign Uses 7,600 GitHub Repositories to Spread SmartLoader Malware - The Hacker News
- AgentBaiting: How Fake AI Skills Deliver Malware at Scale - Island
- AI agents tricked into recommending malicious GitHub repositories - Help Net Security
常見問題 FAQ
FakeGit攻擊是什麼?
是一場用近7600個假GitHub專案散布SmartLoader與StealC惡意軟體的活動,其中逾800個偽裝成AI技能或MCP伺服器,下載量已破1400萬次。
AgentBaiting跟一般惡意軟體攻擊有什麼不同?
攻擊者不需要誘騙人類點連結,而是讓AI編碼代理在搜尋工具時自己發現並推薦惡意專案,等於把AI的搜尋行為當成攻擊入口。
哪些AI工具已被證實會中招?
安全公司Island測試發現,Claude Code、Google Gemini與OpenAI ChatGPT在特定情境下都可能被誘導推薦FakeGit的惡意repo,即使使用者沒貼過任何連結。
一般開發者該怎麼防範FakeGit?
安裝AI推薦的MCP伺服器或技能前,先手動查驗GitHub帳號歷史、star數與commit紀錄,並在沙盒環境測試,不要照單全收代理的建議。
延伸閱讀 / Related Articles
- Claude Voice Mode評測:語音喊得動Gmail、Slack、Canva | Claude Voice Mode Review: Opus Voice Meets Gmail, Slack
- Claude Opus 5 評測:半價效能超車 Fable 5 | Claude Opus 5 Review: Half the Price, Beats Fable 5
- 雅可比猜想遭AI推翻:Claude Fable 5三行反例解87年謎題 | Jacobian Conjecture Falls to Claude Fable 5's AI Proof
AI 工具觀察站 — 每日精選 AI Agent 與工具趨勢
AI Tool Observer — Daily curated AI Agent & tool trends
留言
張貼留言