> For the complete documentation index, see [llms.txt](https://kabinet.gitbook.io/ctf-writeup/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kabinet.gitbook.io/ctf-writeup/2025/defcon-cloud-village-2025/objective-mcp.md).

# Objective: MCP

<figure><img src="/files/AqmXmR8cnCheHEVc0P2E" alt=""><figcaption></figcaption></figure>

For this challenge, i tried plugging the MCP.json to the claude desktop config but there were some error. Instead we shall use postman to interact with the MCP Server.

First lets list out the different tools that are available.

<figure><img src="/files/OU8KtChoY7V1rqA3rFST" alt=""><figcaption></figcaption></figure>

```json
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "tools": [
            {
                "name": "get_secret",
                "description": "Get a secret from the development Key Vault",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "secret_name": {
                            "type": "string",
                            "description": "Name of the secret to retrieve"
                        }
                    },
                    "required": [
                        "secret_name"
                    ]
                }
            },
            {
                "name": "list_secrets",
                "description": "List secrets in the development Key Vault",
                "inputSchema": {
                    "type": "object",
                    "properties": {},
                    "required": []
                }
            },
            {
                "name": "test_vault_access",
                "description": "Test access to any Key Vault URL (diagnostic function)",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "vault_url": {
                            "type": "string",
                            "description": "Key Vault URL to test access against"
                        }
                    },
                    "required": [
                        "vault_url"
                    ]
                }
            },
            {
                "name": "discover_resources",
                "description": "Discover Azure resources accessible by this identity",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "resource_type": {
                            "type": "string",
                            "enum": [
                                "keyvault",
                                "all"
                            ],
                            "description": "Type of resource to discover"
                        }
                    },
                    "required": [
                        "resource_type"
                    ]
                }
            },
            {
                "name": "get_secret_from_vault",
                "description": "Get a secret from any specific Key Vault (admin function)",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "vault_url": {
                            "type": "string",
                            "description": "Key Vault URL"
                        },
                        "secret_name": {
                            "type": "string",
                            "description": "Name of the secret to retrieve"
                        }
                    },
                    "required": [
                        "vault_url",
                        "secret_name"
                    ]
                }
            },
            {
                "name": "get_command_history",
                "description": "Get history of previously executed commands and tools",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "limit": {
                            "type": "integer",
                            "description": "Number of recent commands to return (default: 20, max: 50)",
                            "minimum": 1,
                            "maximum": 50
                        }
                    },
                    "required": []
                }
            }
        ]
    }
}
```

Running the discover resource tool, we found a existing key vault.

<figure><img src="/files/7TSKHI74THp4mWqKgukP" alt=""><figcaption></figcaption></figure>

Next, we can use the test\_keyvault\_access and get\_secrets\_from\_keyvault to try and retrieve the flag.

<figure><img src="/files/0sQD2A8V9cozrSGwaByb" alt=""><figcaption></figcaption></figure>

However, all the secrets within the dev keyvault are all placeholder. Lets try changing from dev to prod to see if we can access the prod keyvault data.

<figure><img src="/files/Y5MO1VffgUTaUGjz54e0" alt=""><figcaption></figcaption></figure>

We have access over the prod keyvault and able to retrieve the flag.

<figure><img src="/files/N6YruU9t2RcoExuczhsz" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kabinet.gitbook.io/ctf-writeup/2025/defcon-cloud-village-2025/objective-mcp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
