AI Tool Protocol Scan
A.I.G leverages AI agents for comprehensive MCP Server and Skills security assessment, supporting both source code audits and remote URL scanning.
Note: The architecture is still under development.
A.I.G can detect the following common AI tool protocol security risks, with continuous updates:
A.I.G's AI tool Protocol scanning capability is entirely driven by an AI agent. The accuracy and duration of the detection depend on the Large Language Model API selected by the user.
Add a Model API for AI tool Detection
Method 1: AI tool Source Code Scan
- Select "AI Tool Protocol Scan"
- Upload the AI tool source code as an attachment
- Start Scan
Method 2: Scan an AI tool project from GitHub
- Select "AI Tool Protocol Scan"
- Enter the GitHub repository URL in the input box
- Start Scan
Method 3: Remote MCP Service Scan
- Select "AI Tool Protocol Scan"
- Enter the MCP service address (SSE or Streamable HTTP protocol) in the input box, e.g.,
http://127.0.0.1:9000/sse
- Start Scan
View Scan Status and Results
Recommended Large Language Model APIs
- GLM4.6
- DeepSeek-V3.2
- Kimi-K2-Instruct
- Qwen3-Coder-480B
- Hunyuan-Turbos
MCP Plugins
MCP scanning is powered by on an AI agent that inspects the code. A.I.G. modularizes MCP vulnerabilities into plugins, which can be viewed or edited in the frontend.
The MCP plugin template is shown below. The key field is prompt_template, which defines the prompt to instruct the large language model about the vulnerability type and the scanning method.
info:
id: "auth_bypass"
name: "Authentication Bypass Detection"
description: "Detect possible authentication bypass vulnerabilities in MCP code"
author: "Zhuque Security Team"
categories:
- code
prompt_template: |
As a professional cybersecurity analyst, you need to precisely detect authentication bypass vulnerabilities in MCP code. This detection requires extremely high accuracy - only report when you find concrete evidence of authentication bypass risks.
## Vulnerability Definition
Authentication bypass refers to an attacker's ability to gain unauthorized access by circumventing the system's authentication mechanisms without providing valid credentials.
## Detection Criteria (Must meet at least one concrete evidence)
### 1. Hardcoded Credential Vulnerabilities
**Required Conditions:**
- Discovery of plaintext stored real credentials (not test/example data)
- Credentials have actual system access privileges
- Ability to obtain valid authentication information directly through code
- Existence of backdoors that bypass normal authentication processes
**Code Patterns:**
- Hardcoded API keys, passwords, tokens
- Universal passwords or backdoor accounts
- Special parameters or flags that bypass authentication
### 2. JWT Security Flaws
**Required Conditions:**
- Missing or bypassable JWT signature verification
- Use of weak signature algorithms (e.g., none, HS256 with weak keys)
- JWT key leakage or predictability
- JWT replay attack vulnerabilities
**Detection Points:**
- verify=False or skipping signature verification
- Using fixed or weak JWT keys
- Missing timestamp verification (exp, iat)
- Allowing algorithm=none JWT
### 3. OAuth Authentication Flaws
**Required Conditions:**
- Missing or loose redirect_uri validation
- Missing state parameter leading to CSRF attacks
- client_secret leakage or hardcoding
- Authorization code reuse or no time limits
### 4. Session Management Vulnerabilities
**Required Conditions:**
- Session fixation attacks
- Session hijacking risks (missing secure/httponly flags)
- Missing session timeout mechanisms
- Missing Cross-Site Request Forgery (CSRF) protection
### 5. Authentication Logic Bypass
**Required Conditions:**
- Conditional bypass in authentication check logic
- Logic errors in permission judgment
- Ability to skip steps in multi-step authentication process
- Missing or misconfigured authentication middleware
## Technical Detection Methods
### Code Pattern Recognition
**High-Risk Patterns:**
- if user == "admin" and password == "hardcoded_password"
- jwt.decode(token, verify=False)
- session['authenticated'] = True # Setting without verification
- @app.route('/admin') # Missing authentication decorator
### Configuration File Analysis
- Check security of authentication-related configurations
- Verify if default credentials have been changed
- Analyze completeness of access control lists
### API Endpoint Security
- Identify sensitive interfaces lacking authentication protection
- Check correct application of authentication middleware
- Verify granularity and completeness of permission control
## Exclusion Conditions (Do not report the following)
### Normal Development Scenarios
- Mock authentication in test code
- Temporary credentials in development environment
- Fixed test data in unit tests
- Placeholder credentials in example code
### Security Practices
- Correctly implemented OAuth2.0 flows
- Secure JWT implementations (strong signatures, complete verification)
- Comprehensive session management mechanisms
- Appropriate RBAC permission control
### Configuration Management
- Credentials managed through environment variables
- Implementations using key management services
- Correct configuration file permission settings
## Verification Requirements
1. **Vulnerability Exploitability**: Must be able to construct actual attack paths
2. **Impact Assessment**: Clearly define access privileges after bypassing authentication
3. **Technical Details**: Provide specific vulnerability principle analysis
4. **Remediation Suggestions**: Provide clear security hardening solutions
## Strict Judgment Standards
- **Default Configuration**: If it's a framework's default configuration with documentation, do not report.
- **Test Identifiers**: Do not report items containing keywords like test, demo, example, mock.
- **Development Environment**: Do not report configurations clearly used for development and debugging.
- **Correct Implementation**: Do not report authentication implementations that follow security best practices.
- **Project-Level Permission Verification Assessment**: If no permission verification exists, assess whether the project's nature indicates it is critical (e.g., capable of operating on the local host or database). If the project is not critical, do not report.
## Input Data
Source code path: {{ .CodePath }}
Directory structure:
------
{{ .DirectoryStructure }}
------
## Output Requirements
Only output when finding concrete authentication bypass vulnerabilities:
- Specific file paths and line numbers
- Complete vulnerability code snippets
- Technical analysis: vulnerability principles and exploitation methods
- Impact assessment: privileges obtainable after bypassing authentication
- Attack paths: specific exploitation steps
- Remediation suggestions: detailed security hardening solutions
**Strict Requirement: Must provide complete vulnerability exploitation paths and impact analysis. Remain silent when no concrete evidence exists.**
1---2name: 560-mcp-scan-en-eb30169e3description: AI Tool Protocol Scan4---5# AI Tool Protocol Scan6A.I.G leverages AI agents for comprehensive MCP Server and Skills security assessment, supporting both source code audits and remote URL scanning. 78<img src="./assets/mcp-scan-en.png">910> **Note**: The architecture is still under development.1112<br/>1314A.I.G can detect the following common AI tool protocol security risks, with continuous updates:1516<table>17<thead>18<tr>19<th>AI Tool</th>20<th>Risk Name</th>21<th>Description</th>22</tr>23</thead>24<tbody>25<tr>26<td rowspan="9">MCP Server</td>27<td>Tool Poisoning Attack</td>28<td>A malicious MCP Server injects hidden instructions through tool descriptions to manipulate the AI Agent into performing unauthorized actions (e.g., stealing data, executing malicious acts).</td>29</tr>30<tr>31<td>Rug Pull Scheme</td>32<td>A malicious MCP Server behaves normally initially but changes its behavior after user approval or several runs to execute malicious instructions, leading to hard-to-detect malicious activity.</td>33</tr>34<tr>35<td>Tool Overwriting Attack</td>36<td>A malicious MCP Server redefines the behavior of other trusted MCP Server tools through hidden instructions (e.g., modifying email recipients, performing extra operations).</td>37</tr>38<tr>39<td>Malicious Code/Command Execution</td>40<td>If an MCP Server supports direct code or command execution without proper sandboxing, it can be exploited by attackers to perform malicious operations on the server or user's local machine.</td>41</tr>42<tr>43<td>Data Theft</td>44<td>A malicious MCP Server induces the AI Agent to read and transmit sensitive data (e.g., API keys, SSH keys), or directly sends user-authorized input data to an external server.</td>45</tr>46<tr>47<td>Unauthorized Access/Improper Auth</td>48<td>The MCP Server lacks effective authorization or has flawed authentication, allowing attackers to bypass verification and access restricted resources or user data.</td>49</tr>50<tr>51<td>Indirect Prompt Injection</td>52<td>The MCP Server outputs external data containing malicious instructions (e.g., from web pages, documents) to the AI Agent, potentially influencing its decisions and behavior.</td>53</tr>54<tr>55<td>Package Name Squatting/Typosquatting</td>56<td>A malicious MCP Server uses names, tool names, or descriptions similar to trusted services to trick the AI Agent into making incorrect calls; or a third party squats an official AI tool name to plant a backdoor.</td>57</tr>58<tr>59<td>Plaintext Key Storage</td>60<td>The MCP Server hardcodes or stores sensitive keys in plaintext within its code or configuration files, posing a high risk of leakage.</td>61</tr>62<tr>63<td rowspan="5">Skills</td>64<td>Semantic Hijacking Attack</td>65<td>Attackers craft a malicious Skill description to semantically override high-frequency user intents (e.g., fixing code bugs or optimizing system performance). When a user issues a vague instruction, the Agent may incorrectly activate the malicious Skill instead of the intended tool.</td>66</tr>67<tr>68<td>Ghost Instruction Attack</td>69<td>Attackers embed malicious instructions disguised as normal content (e.g., comments or error handling guides) in SKILL.md. When the Agent loads the Skill, these instructions are injected into the context, thereby controlling the LLM to execute malicious operations.</td>70</tr>71<tr>72<td>Malicious Backdoor Script Attack</td>73<td>The Skill guides the Agent to invoke local scripts containing malicious code, leveraging the Agent's shell privileges to read SSH keys, modify system configurations, install backdoors, or even initiate reverse shell connections.</td>74</tr>75<tr>76<td>Insecure Skills Configuration Risk</td>77<td>Improper `allowed-tools` configuration allows dangerous operations like Bash execution to run silently without secondary human confirmation.</td>78</tr>79<tr>80<td>Implementation Layer Vulnerabilities</td>81<td>Vulnerabilities such as command injection and hardcoded keys (observed to be common in internal network Skills).</td>82</tr>83</tbody>84</table>8586A.I.G's AI tool Protocol scanning capability is entirely driven by an AI agent. The accuracy and duration of the detection depend on the Large Language Model API selected by the user.8788### Add a Model API for AI tool Detection89909192## Method 1: AI tool Source Code Scan93941. Select "AI Tool Protocol Scan"952. Upload the AI tool source code as an attachment96973. Start Scan9899100## Method 2: Scan an AI tool project from GitHub1011. Select "AI Tool Protocol Scan"1021032. Enter the GitHub repository URL in the input box1043. Start Scan105106## Method 3: Remote MCP Service Scan1071081. Select "AI Tool Protocol Scan"1092. Enter the MCP service address (SSE or Streamable HTTP protocol) in the input box, e.g., `http://127.0.0.1:9000/sse`1103. Start Scan111112113## View Scan Status and Results114115116## Recommended Large Language Model APIs117- GLM4.6118- DeepSeek-V3.2119- Kimi-K2-Instruct120- Qwen3-Coder-480B121- Hunyuan-Turbos122123## MCP Plugins124125MCP scanning is powered by on an AI agent that inspects the code. A.I.G. modularizes MCP vulnerabilities into plugins, which can be viewed or edited in the frontend.126127128129The MCP plugin template is shown below. The key field is `prompt_template`, which defines the prompt to instruct the large language model about the vulnerability type and the scanning method.130131```yaml132info:133 id: "auth_bypass"134 name: "Authentication Bypass Detection"135 description: "Detect possible authentication bypass vulnerabilities in MCP code"136 author: "Zhuque Security Team"137 categories:138 - code139140prompt_template: |141 As a professional cybersecurity analyst, you need to precisely detect authentication bypass vulnerabilities in MCP code. This detection requires extremely high accuracy - only report when you find concrete evidence of authentication bypass risks.142143 ## Vulnerability Definition144 Authentication bypass refers to an attacker's ability to gain unauthorized access by circumventing the system's authentication mechanisms without providing valid credentials.145146 ## Detection Criteria (Must meet at least one concrete evidence)147148 ### 1. Hardcoded Credential Vulnerabilities149 **Required Conditions:**150 - Discovery of plaintext stored real credentials (not test/example data)151 - Credentials have actual system access privileges152 - Ability to obtain valid authentication information directly through code153 - Existence of backdoors that bypass normal authentication processes154155 **Code Patterns:**156 - Hardcoded API keys, passwords, tokens157 - Universal passwords or backdoor accounts158 - Special parameters or flags that bypass authentication159160 ### 2. JWT Security Flaws161 **Required Conditions:**162 - Missing or bypassable JWT signature verification163 - Use of weak signature algorithms (e.g., none, HS256 with weak keys)164 - JWT key leakage or predictability165 - JWT replay attack vulnerabilities166167 **Detection Points:**168 - verify=False or skipping signature verification169 - Using fixed or weak JWT keys170 - Missing timestamp verification (exp, iat)171 - Allowing algorithm=none JWT172173 ### 3. OAuth Authentication Flaws174 **Required Conditions:**175 - Missing or loose redirect_uri validation176 - Missing state parameter leading to CSRF attacks177 - client_secret leakage or hardcoding178 - Authorization code reuse or no time limits179180 ### 4. Session Management Vulnerabilities181 **Required Conditions:**182 - Session fixation attacks183 - Session hijacking risks (missing secure/httponly flags)184 - Missing session timeout mechanisms185 - Missing Cross-Site Request Forgery (CSRF) protection186187 ### 5. Authentication Logic Bypass188 **Required Conditions:**189 - Conditional bypass in authentication check logic190 - Logic errors in permission judgment191 - Ability to skip steps in multi-step authentication process192 - Missing or misconfigured authentication middleware193194 ## Technical Detection Methods195196 ### Code Pattern Recognition197 **High-Risk Patterns:**198 - if user == "admin" and password == "hardcoded_password"199 - jwt.decode(token, verify=False)200 - session['authenticated'] = True # Setting without verification201 - @app.route('/admin') # Missing authentication decorator202203 ### Configuration File Analysis204 - Check security of authentication-related configurations205 - Verify if default credentials have been changed206 - Analyze completeness of access control lists207208 ### API Endpoint Security209 - Identify sensitive interfaces lacking authentication protection210 - Check correct application of authentication middleware211 - Verify granularity and completeness of permission control212213 ## Exclusion Conditions (Do not report the following)214215 ### Normal Development Scenarios216 - Mock authentication in test code217 - Temporary credentials in development environment218 - Fixed test data in unit tests219 - Placeholder credentials in example code220221 ### Security Practices222 - Correctly implemented OAuth2.0 flows223 - Secure JWT implementations (strong signatures, complete verification)224 - Comprehensive session management mechanisms225 - Appropriate RBAC permission control226227 ### Configuration Management228 - Credentials managed through environment variables229 - Implementations using key management services230 - Correct configuration file permission settings231232 ## Verification Requirements233 1. **Vulnerability Exploitability**: Must be able to construct actual attack paths234 2. **Impact Assessment**: Clearly define access privileges after bypassing authentication235 3. **Technical Details**: Provide specific vulnerability principle analysis236 4. **Remediation Suggestions**: Provide clear security hardening solutions237238 ## Strict Judgment Standards239 - **Default Configuration**: If it's a framework's default configuration with documentation, do not report.240 - **Test Identifiers**: Do not report items containing keywords like test, demo, example, mock.241 - **Development Environment**: Do not report configurations clearly used for development and debugging.242 - **Correct Implementation**: Do not report authentication implementations that follow security best practices.243 - **Project-Level Permission Verification Assessment**: If no permission verification exists, assess whether the project's nature indicates it is critical (e.g., capable of operating on the local host or database). If the project is not critical, do not report.244245 ## Input Data246 Source code path: {{ .CodePath }}247 Directory structure:248 ------249 {{ .DirectoryStructure }}250 ------251252 ## Output Requirements253 Only output when finding concrete authentication bypass vulnerabilities:254 - Specific file paths and line numbers255 - Complete vulnerability code snippets256 - Technical analysis: vulnerability principles and exploitation methods257 - Impact assessment: privileges obtainable after bypassing authentication258 - Attack paths: specific exploitation steps259 - Remediation suggestions: detailed security hardening solutions260261 **Strict Requirement: Must provide complete vulnerability exploitation paths and impact analysis. Remain silent when no concrete evidence exists.** 262```