AI工具协议扫描
A.I.G使用了基于AI Agent驱动的AI工具协议检测方案,支持MCP Server、Skills源代码安全审计与远程MCP Server URL安全扫描。
注意:架构内容部分仍在升级中。
A.I.G的AI工具协议扫描能力完全由Agent驱动,检测准确性与时长取决于用户选择的大模型API。
添加用检测AI工具的模型API
方式一:AI工具源代码压缩包扫描
- 选择“AI工具协议扫描”
- 添加附件上传源代码压缩包
- 开始扫描
方式二:AI工具代码仓库扫描
- 选择“AI工具协议扫描”
- 输入框输入代码仓库地址,如:https://github.com/xxx/mcp-server
- 开始扫描
方式三:远程MCP服务扫描
- 选择“AI工具协议扫描”
- 输入框输入MCP服务地址 (SSE或Streamable HTTP协议),如:http://127.0.0.1:9000/sse
- 开始扫描
查看扫描状态和结果
推荐使用的大模型API
- GLM4.6
- DeepSeek-V3.2
- Kimi-K2-Instruct
- Qwen3-Coder-480B
- Hunyuan-Turbos
MCP 插件
MCP扫描基于AI Agent对代码进行检测,A.I.G将MCP漏洞抽象为了插件,可以在前端查看。
MCP插件模板如下,关键的是prompt_template字段,用提示词告诉大模型漏洞类型和应该如何扫描。
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 framework default configuration with documentation, do not report
- **Test Identifiers**: Do not report those containing test, demo, example, mock keywords
- **Development Environment**: Do not report configurations clearly used for development debugging
- **Correct Implementation**: Do not report authentication implementations that follow security best practices
- **Permission Verification Project Level Assessment**: If no permission verification exists, assess whether the project information collection indicates an important project (i.e., capable of operating local host or database operations). If the project is not important, 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.**