Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2025-6218 — 针对WinRAR路径遍历漏洞(CVE-2025-6218)的概念验证利用工具,能够通过精心构造的存档文件实现远程代码执行。包含RAR格式测试工具集。 | Kitploit
工具/GitHubGitHub/ignis-sec/cve-2025-6218
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试二进制利用
GitHubignis-sec/cve-2025-6218

CVE-2025-6218

针对WinRAR路径遍历漏洞(CVE-2025-6218)的概念验证利用工具,能够通过精心构造的存档文件实现远程代码执行。包含RAR格式测试工具集。

查看仓库
126741年前尚未审核
分享

CVE-2025-6218 | ZDI-CAN-27198 | ZDI-25-409 - WinRAR 路径遍历 -> 远程代码执行 (RCE)

概念验证

更多信息:

  • https://www.win-rar.com/singlenewsview.html?&L=0
  • https://www.cvedetails.com/cve/CVE-2025-6218/
  • https://www.zerodayinitiative.com/advisories/ZDI-25-409/

RARLAB WinRAR 目录遍历远程代码执行漏洞。此漏洞允许远程攻击者在受影响的 RARLAB WinRAR 安装上执行任意代码。漏洞利用需要用户交互,即目标必须访问恶意页面或打开恶意文件。

具体缺陷存在于存档文件中文件路径的处理。精心构造的文件路径可导致进程遍历到意外的目录。攻击者可利用此漏洞在当前用户上下文中执行代码。之前编号为 ZDI-CAN-27198。

发布时间 2025-06-21 00:09:03 更新时间 2025-06-23 20:16:22 来源 Zero Day Initiative

漏洞类别:目录遍历 | 执行代码

这是 CVE-2025-6218 WinRAR 路径遍历漏洞的一个非常简洁的概念验证。(还包括:我用于漏洞测试的 RAR 格式工具集)

概念验证中不包含路径遍历到 RCE 的完整利用链,但在 Windows 上从任意文件写入到 RCE 是轻而易举的。

创建概念验证:

$ python3 cve-2025-6218.py

如果你解压此存档,test.txt 将会被解压到当前目录的上一级目录。

该问题源于 WinRAR 可执行文件(版本 7.11 及之前)在清理空格与扫描路径遍历之间存在特定冲突:

一个经过简化和清理的版本:

void file_name_check(char *a1){
  cur_filename = a1;
  j = 0;
  cur_pos = 0;
  if ( *(a1 + 4) > 0 )
  {
    offset = 0;
    while ( 1 )
    {
      if ( (cur_pos + 1) == cur_filename[2] )
        goto BREAK;
      str = cur_filename;
      if ( cur_filename[3] > 7 )
        str = *cur_filename;
      if ( str[offset + 1] == '\\' || str[offset + 1] == '/' )
      {
BREAK:
        if ( cur_pos >= 0 )
          break;
      }
LOOP_START:
      ++cur_pos;
      ++offset;
      if ( cur_pos >= *(cur_filename + 4) )
        goto LABEL_47;
    }
    while ( 1 )
    {
      if ( str[offset] != '.' )
      {
        if ( str[offset] != ' ' )
          goto LOOP_START;
      }
      if ( !cur_pos )
      {
        if ( str[offset] == ' ' )
        {
          str[offset] = '_';
          goto LOOP_START;
        }
      }
      if ( str[offset] == '.' )
      {
        if ( !cur_pos )
          goto LOOP_START;
        if ( str[offset - 1] == '\\' || str[offset - 1] == '/' )
          goto LOOP_START;
        if ( cur_pos == 2 )
        {
          if ( is_safe_character(cur_filename) )
            goto LOOP_START;
        }
        else if ( cur_pos < 1 )
        {
          goto DELETE;
        }
        if ( str[offset - 1] == '.' )
        {
          if ( cur_pos == 1 )
            goto LOOP_START;
          if ( str[offset - 2] == '\\' || str[offset - 2] == '/' || cur_pos == 3 && is_safe_character(cur_filename) )
            goto LOOP_START;
        }
      }
DELETE:
      delete_char(cur_filename, cur_pos, 1u);
      --offset;
      if ( --cur_pos < 0 )
        goto LOOP_START;
    }
  }

//...
}

在 7.12 之后:

void __fastcall file_name_check(char **a1){
  cur_filename = a1;
  j = 0;
  if ( *(a1 + 4) > 0 )
  {
    offset = 0;
    fname_index = 1;
    do
    {
      if ( fname_index == cur_filename[2] )
        goto HANDLE_DIR_NEXT;
      str = cur_filename;
      if ( str[offset + 1] == '\\' || str[offset + 1] == '/' )
      {
HANDLE_DIR_NEXT:
        if ( offset >= 0 )
        {
          if ( str[offset] == '.' )
            goto FILENAME_BEGINS;
          if ( str[offset] == ' ' )
          {
FILENAME_BEGINS:
            if ( str[offset] != '.' )
              goto CONT;
            if ( offset )
            {
              if ( str[offset - 1] != '\\'
                && str[offset - 1] != '/'
                && (offset != 2 || !is_safe_character(cur_filename)) )
              {
                if ( str[offset - 1] != '.' )
                  goto CONT;
                if ( offset != 1 )
                {
                  if ( str[offset - 2] != '\\'
                    && str[offset - 2] != '/'
                    && (offset != 3 || !is_safe_character(cur_filename)) )
                  {
CONT:
                    str[offset] = '_';
                  }
                }
              }
            }
          }
        }
      }
      ++j;
      ++offset;
      ++fname_index;
    }
    while ( j < *(cur_filename + 4) );
  }

//...
}
下载工具

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    772
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    505
  • 3

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    420
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    345
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    260
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    251

探索所有工具

浏览我们的工具集合

查看所有工具 →